mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
41 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c98ea50c21 | ||
|
|
78697777d7 | ||
|
|
83696460f0 | ||
|
|
bb8acb3640 | ||
|
|
4f29f1aeb2 | ||
|
|
36a4ba8ba3 | ||
|
|
aaafa60129 | ||
|
|
866e778210 | ||
|
|
805484b693 | ||
|
|
a10e992cbc | ||
|
|
44b11d6e67 | ||
|
|
108f50670d | ||
|
|
5885cbf0d2 | ||
|
|
640cdd2df4 | ||
|
|
a4d13e4b8f | ||
|
|
12beb90e58 | ||
|
|
4623f5dca3 | ||
|
|
b124be4eb1 | ||
|
|
c8feafc2a5 | ||
|
|
84b6d13a3c | ||
|
|
fb604ebdf4 | ||
|
|
778dd49f55 | ||
|
|
3e0fdc1a0b | ||
|
|
c4610f8bb6 | ||
|
|
824081f660 | ||
|
|
417bda1b99 | ||
|
|
dbb6fa88fd | ||
|
|
013f2fe433 | ||
|
|
de75384c2b | ||
|
|
9d691ba42f | ||
|
|
744ef2d96f | ||
|
|
0d978396d7 | ||
|
|
581db2ffeb | ||
|
|
0d1de84756 | ||
|
|
c4f9b63aea | ||
|
|
0472107417 | ||
|
|
e1de1d3a93 | ||
|
|
46b486ab5b | ||
|
|
68bd38e8a0 | ||
|
|
b5c86e8130 | ||
|
|
bd54740062 |
@@ -140,7 +140,7 @@ utilities.
|
||||
* Working context:: pwd stty printenv tty
|
||||
* User information:: id logname whoami groups users who
|
||||
* System context:: date uname hostname
|
||||
* Modified command invocation:: env nice nohup su
|
||||
* Modified command invocation:: chroot env nice nohup su
|
||||
* Delaying:: sleep
|
||||
* Numeric operations:: factor seq
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
noinst_LIBRARIES = fu
|
||||
|
||||
EXTRA_DIST = alloca.c basename.c euidaccess.c fnmatch.c fsusage.c \
|
||||
ftruncate.c getdate.y getopt.c getopt1.c memcmp.c memcpy.c memset.c \
|
||||
ftruncate.c getdate.y getopt.c getopt1.c group-member.c \
|
||||
memcmp.c memcpy.c memset.c \
|
||||
mkdir.c mktime.c mountlist.c posixtm.y rename.c rmdir.c \
|
||||
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
|
||||
|
||||
@@ -10,7 +11,7 @@ INCLUDES = -I.. -I$(srcdir)
|
||||
|
||||
fu_SOURCES = getdate.c getline.c posixtm.c argmatch.c backupfile.c \
|
||||
dirname.c error.c fileblocks.c filemode.c \
|
||||
full-write.c getversion.c group-member.c idcache.c \
|
||||
full-write.c getversion.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c obstack.c \
|
||||
safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
|
||||
xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
|
||||
@@ -41,7 +41,8 @@ transform = @program_transform_name@
|
||||
noinst_LIBRARIES = fu
|
||||
|
||||
EXTRA_DIST = alloca.c basename.c euidaccess.c fnmatch.c fsusage.c \
|
||||
ftruncate.c getdate.y getopt.c getopt1.c memcmp.c memcpy.c memset.c \
|
||||
ftruncate.c getdate.y getopt.c getopt1.c group-member.c \
|
||||
memcmp.c memcpy.c memset.c \
|
||||
mkdir.c mktime.c mountlist.c posixtm.y rename.c rmdir.c \
|
||||
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
|
||||
|
||||
@@ -49,7 +50,7 @@ INCLUDES = -I.. -I$(srcdir)
|
||||
|
||||
fu_SOURCES = getdate.c getline.c posixtm.c argmatch.c backupfile.c \
|
||||
dirname.c error.c fileblocks.c filemode.c \
|
||||
full-write.c getversion.c group-member.c idcache.c \
|
||||
full-write.c getversion.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c obstack.c \
|
||||
safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
|
||||
xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
@@ -81,9 +82,9 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(LDFLAGS) -o $@
|
||||
fu_OBJECTS = getdate.o getline.o posixtm.o argmatch.o backupfile.o \
|
||||
dirname.o error.o fileblocks.o filemode.o full-write.o getversion.o \
|
||||
group-member.o idcache.o isdir.o long-options.o makepath.o modechange.o \
|
||||
obstack.o safe-read.o save-cwd.o savedir.o stripslash.o userspec.o \
|
||||
xgetcwd.o xmalloc.o xstrdup.o xstrtol.o xstrtoul.o yesno.o
|
||||
idcache.o isdir.o long-options.o makepath.o modechange.o obstack.o \
|
||||
safe-read.o save-cwd.o savedir.o stripslash.o userspec.o xgetcwd.o \
|
||||
xmalloc.o xstrdup.o xstrtol.o xstrtoul.o yesno.o
|
||||
EXTRA_fu_SOURCES =
|
||||
LIBFILES = libfu.a
|
||||
AR = ar
|
||||
@@ -110,16 +111,16 @@ $(srcdir)/.deps/fsusage.P $(srcdir)/.deps/ftruncate.P \
|
||||
$(srcdir)/.deps/full-write.P $(srcdir)/.deps/getdate.P \
|
||||
$(srcdir)/.deps/getline.P $(srcdir)/.deps/getopt.P \
|
||||
$(srcdir)/.deps/getopt1.P $(srcdir)/.deps/getversion.P \
|
||||
$(srcdir)/.deps/group-member.P $(srcdir)/.deps/idcache.P \
|
||||
$(srcdir)/.deps/isdir.P $(srcdir)/.deps/long-options.P \
|
||||
$(srcdir)/.deps/makepath.P $(srcdir)/.deps/modechange.P \
|
||||
$(srcdir)/.deps/mountlist.P $(srcdir)/.deps/obstack.P \
|
||||
$(srcdir)/.deps/posixtm.P $(srcdir)/.deps/safe-read.P \
|
||||
$(srcdir)/.deps/save-cwd.P $(srcdir)/.deps/savedir.P \
|
||||
$(srcdir)/.deps/stripslash.P $(srcdir)/.deps/userspec.P \
|
||||
$(srcdir)/.deps/xgetcwd.P $(srcdir)/.deps/xmalloc.P \
|
||||
$(srcdir)/.deps/xstrdup.P $(srcdir)/.deps/xstrtol.P \
|
||||
$(srcdir)/.deps/xstrtoul.P $(srcdir)/.deps/yesno.P
|
||||
$(srcdir)/.deps/idcache.P $(srcdir)/.deps/isdir.P \
|
||||
$(srcdir)/.deps/long-options.P $(srcdir)/.deps/makepath.P \
|
||||
$(srcdir)/.deps/modechange.P $(srcdir)/.deps/mountlist.P \
|
||||
$(srcdir)/.deps/obstack.P $(srcdir)/.deps/posixtm.P \
|
||||
$(srcdir)/.deps/safe-read.P $(srcdir)/.deps/save-cwd.P \
|
||||
$(srcdir)/.deps/savedir.P $(srcdir)/.deps/stripslash.P \
|
||||
$(srcdir)/.deps/userspec.P $(srcdir)/.deps/xgetcwd.P \
|
||||
$(srcdir)/.deps/xmalloc.P $(srcdir)/.deps/xstrdup.P \
|
||||
$(srcdir)/.deps/xstrtol.P $(srcdir)/.deps/xstrtoul.P \
|
||||
$(srcdir)/.deps/yesno.P
|
||||
SOURCES = $(fu_SOURCES)
|
||||
OBJECTS = $(fu_OBJECTS)
|
||||
|
||||
|
||||
111
lib/getopt.c
111
lib/getopt.c
@@ -3,7 +3,7 @@
|
||||
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
|
||||
before changing it!
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -53,12 +53,28 @@
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* Don't include stdlib.h for non-GNU C libraries because some of them
|
||||
contain conflicting prototypes for getopt. */
|
||||
#include <stdlib.h>
|
||||
#if defined (_LIBC) || defined (HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif /* GNU C library. */
|
||||
|
||||
#ifdef VMS
|
||||
#include <unixlib.h>
|
||||
#if HAVE_STRING_H - 0
|
||||
#include <string.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
/* It's not Unix, really. See? Capital letters. */
|
||||
#include <windows.h>
|
||||
#define getpid() GetCurrentProcessId()
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
/* This is for other GNU distributions with internationalized messages.
|
||||
When compiling libc, the _ macro is predefined. */
|
||||
@@ -166,7 +182,7 @@ static enum
|
||||
/* Value of POSIXLY_CORRECT environment variable. */
|
||||
static char *posixly_correct;
|
||||
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* We want to avoid inclusion of string.h with non-GNU libraries
|
||||
because there are many ways it can cause trouble.
|
||||
On some systems, it contains special magic macros that don't work
|
||||
@@ -217,6 +233,12 @@ extern int strlen (const char *);
|
||||
static int first_nonopt;
|
||||
static int last_nonopt;
|
||||
|
||||
/* Bash 2.0 gives us an environment variable containing flags
|
||||
indicating ARGV elements that should not be considered arguments. */
|
||||
|
||||
static const char *nonoption_flags;
|
||||
static int nonoption_flags_len;
|
||||
|
||||
/* Exchange two adjacent subsequences of ARGV.
|
||||
One subsequence is elements [first_nonopt,last_nonopt)
|
||||
which contains all the non-options that have been skipped so far.
|
||||
@@ -226,6 +248,10 @@ static int last_nonopt;
|
||||
`first_nonopt' and `last_nonopt' are relocated so that they describe
|
||||
the new indices of the non-options in ARGV after they are moved. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
static void exchange (char **);
|
||||
#endif
|
||||
|
||||
static void
|
||||
exchange (argv)
|
||||
char **argv;
|
||||
@@ -284,6 +310,9 @@ exchange (argv)
|
||||
|
||||
/* Initialize the internal data when the first call is made. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
static const char *_getopt_initialize (const char *);
|
||||
#endif
|
||||
static const char *
|
||||
_getopt_initialize (optstring)
|
||||
const char *optstring;
|
||||
@@ -315,6 +344,21 @@ _getopt_initialize (optstring)
|
||||
else
|
||||
ordering = PERMUTE;
|
||||
|
||||
if (posixly_correct == NULL)
|
||||
{
|
||||
/* Bash 2.0 puts a special variable in the environment for each
|
||||
command it runs, specifying which ARGV elements are the results of
|
||||
file name wildcard expansion and therefore should not be
|
||||
considered as options. */
|
||||
char var[100];
|
||||
sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ());
|
||||
nonoption_flags = getenv (var);
|
||||
if (nonoption_flags == NULL)
|
||||
nonoption_flags_len = 0;
|
||||
else
|
||||
nonoption_flags_len = strlen (nonoption_flags);
|
||||
}
|
||||
|
||||
return optstring;
|
||||
}
|
||||
|
||||
@@ -391,10 +435,24 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optind = 1; /* Don't scan ARGV[0], the program name. */
|
||||
}
|
||||
|
||||
/* Test whether ARGV[optind] points to a non-option argument.
|
||||
Either it does not have option syntax, or there is an environment flag
|
||||
from the shell indicating it is not an option. */
|
||||
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||
|| (optind < nonoption_flags_len \
|
||||
&& nonoption_flags[optind] == '1'))
|
||||
|
||||
if (nextchar == NULL || *nextchar == '\0')
|
||||
{
|
||||
/* Advance to the next ARGV-element. */
|
||||
|
||||
/* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
|
||||
moved back by the user (who may also have changed the arguments). */
|
||||
if (last_nonopt > optind)
|
||||
last_nonopt = optind;
|
||||
if (first_nonopt > optind)
|
||||
first_nonopt = optind;
|
||||
|
||||
if (ordering == PERMUTE)
|
||||
{
|
||||
/* If we have just processed some options following some non-options,
|
||||
@@ -408,8 +466,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
/* Skip any additional non-options
|
||||
and extend the range of non-options previously skipped. */
|
||||
|
||||
while (optind < argc
|
||||
&& (argv[optind][0] != '-' || argv[optind][1] == '\0'))
|
||||
while (optind < argc && NONOPTION_P)
|
||||
optind++;
|
||||
last_nonopt = optind;
|
||||
}
|
||||
@@ -447,7 +504,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
/* If we have come to a non-option and did not permute it,
|
||||
either stop the scan or describe it to the caller and pass it by. */
|
||||
|
||||
if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
|
||||
if (NONOPTION_P)
|
||||
{
|
||||
if (ordering == REQUIRE_ORDER)
|
||||
return EOF;
|
||||
@@ -479,8 +536,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
|
||||
if (longopts != NULL
|
||||
&& (argv[optind][1] == '-'
|
||||
|| (long_only && (argv[optind][2]
|
||||
|| !my_index (optstring, argv[optind][1])))))
|
||||
|| (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
|
||||
{
|
||||
char *nameend;
|
||||
const struct option *p;
|
||||
@@ -493,8 +549,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
|
||||
/* Do nothing. */ ;
|
||||
|
||||
#ifdef lint
|
||||
indfound = 0; /* Avoid spurious compiler warning. */
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
indfound = 0;
|
||||
#endif
|
||||
|
||||
/* Test all long options for either exact match
|
||||
@@ -528,6 +584,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
optind++;
|
||||
optopt = 0;
|
||||
return '?';
|
||||
}
|
||||
|
||||
@@ -544,18 +601,20 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
|
||||
nextchar += strlen (nextchar);
|
||||
|
||||
optopt = pfound->val;
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
@@ -567,9 +626,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
nextchar += strlen (nextchar);
|
||||
optopt = pfound->val;
|
||||
return optstring[0] == ':' ? ':' : '?';
|
||||
}
|
||||
}
|
||||
@@ -604,6 +664,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
nextchar = (char *) "";
|
||||
optind++;
|
||||
optopt = 0;
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
@@ -663,8 +724,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr,
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
}
|
||||
optopt = c;
|
||||
if (optstring[0] == ':')
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H 1
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
||||
@@ -1,3 +1,80 @@
|
||||
Thu Jul 11 21:50:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* Version 3.13.
|
||||
|
||||
* dircolors.1: New file -- but just a pointer to texinfo docs.
|
||||
* man/Makefile.am (man_MANS): Add dircolors.1.
|
||||
|
||||
* configure.in (VERSION): Bump to 3.13.
|
||||
|
||||
Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
|
||||
so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
|
||||
those options on that system, sys/stat.h gets compile errors.
|
||||
With help from Marcus Daniels.
|
||||
|
||||
* getopt.c: Update from gettext-0.10.23.
|
||||
* getopt1.c: Likewise.
|
||||
* getopt.h: Likewise.
|
||||
|
||||
Tue Jul 9 20:19:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/dircolors.c (usage): Improve --help message. From Karl Berry.
|
||||
(long_options): Add print-data-base and print-database.
|
||||
|
||||
* src/dircolors.c (dc_parse_stream): Don't give `unrecognized keyword'
|
||||
message unless we've processed a matching TERM directive. Reported
|
||||
by Karl Berry and François Pinard.
|
||||
|
||||
* src/install.c (UID_T_MAX): Use `(unsigned long)1' rather than
|
||||
`(uid_t)1' to avoid problems on systems where uid_t is signed.
|
||||
(GID_T_MAX): Likewise for gid_t.
|
||||
From Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
|
||||
|
||||
Sun Jul 7 22:40:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/ls.c: Change initial colors for `color_indicator' to match
|
||||
those currently in dircolors.hin. From Joshua Cowan.
|
||||
|
||||
* src/dircolors.hin: Recognize more filename extensions.
|
||||
From Joshua Cowan.
|
||||
|
||||
* src/Makefile.am (CLEANFILES): Add dcgen. From Joshua Cowan
|
||||
<jcowan@jcowan.reslife.okstate.edu>.
|
||||
|
||||
* src/Makefile.am (MAINTAINERCLEANFILES): Add dircolors.h.
|
||||
|
||||
* configure.in (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use it.
|
||||
* acconfig.h [GWINSZ_IN_SYS_IOCTL]: Add #undef.
|
||||
|
||||
* src/ls.c: Include termios.h.
|
||||
Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL,
|
||||
rather than HAVE_SYS_IOCTL_H. Modelled after sh-utils' stty.c
|
||||
at suggestion from Chip Bennett <BennettC@j64.stratcom.af.mil>
|
||||
to make ls adjust its idea of screen width upon window resize
|
||||
on systems (SunOS, Solaris) where TIOCGWINSZ is defined in
|
||||
termios.h, and not sys/ioctl.h.
|
||||
|
||||
* aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test
|
||||
in the configure.in from sh-utils.
|
||||
(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
|
||||
|
||||
Sat Jul 6 12:46:27 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/cp-aux.c (usage): Factor out backup-related text into
|
||||
separate string/printf statement so translators deal with only
|
||||
one corresponding string in .pot file.
|
||||
* src/install.c (usage): Likewise.
|
||||
* src/ln.c (usage): Likewise.
|
||||
* src/mv.c (usage): Likewise.
|
||||
Suggestion from Santiago Vila Doncel.
|
||||
|
||||
* configure.in (AC_REPLACE_FUNCS): Add group_member.
|
||||
(AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c.
|
||||
* lib/Makefile.am (fu_SOURCES): Remove group-member.c.
|
||||
(EXTRA_DIST): Add group-member.c here.
|
||||
|
||||
Fri Jul 5 22:16:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/dircolors.c [!STDC_HEADERS]: Declare free.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Changes in release 3.13:
|
||||
* ls properly determines window size on SunOS and Solaris systems
|
||||
* ls accepts new option --color[=WHEN] where WHEN is `always', `never',
|
||||
or `auto'. --color=never is the default. --color is equivalent
|
||||
to --color=always (documented only in --help message FIXME)
|
||||
* new program: dircolors (not yet documented FIXME)
|
||||
to --color=always.
|
||||
* new program: dircolors
|
||||
* ls allows 0 as argument to --tabsize (-T) option. Using --tabsize=0
|
||||
inhibits the use of TAB characters for separating columns.
|
||||
* you can create a backup of FILE with cp --force --backup FILE FILE. Before,
|
||||
@@ -18,8 +19,7 @@ Changes in release 3.13:
|
||||
--sync option to make df invoke sync before getting file system sizes.
|
||||
* internationalized diagnostic messages
|
||||
* mkdir accepts new option: --verbose
|
||||
* cp has been fixed so that the full file name it uses for the destination
|
||||
in `cp file D/' is `D/file', not `D//file'.
|
||||
* `cp file D/' uses the full file name `D/file' instead of `D//file'.
|
||||
* cp --backup a~ a fails instead of silently destroying the source file
|
||||
* df and du have new options --human-readable (-h) and --megabytes (-m).
|
||||
* install now honors --backup (-b), --suffix=SUFFIX (-S SUFFIX), and
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
|
||||
so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
|
||||
those options on that system, sys/stat.h gets compile errors.
|
||||
With help from Marcus Daniels.
|
||||
|
||||
* getopt.c: Update from gettext-0.10.23.
|
||||
* getopt1.c: Likewise.
|
||||
* getopt.h: Likewise.
|
||||
|
||||
Sun Jul 7 22:40:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test
|
||||
in configure.in.
|
||||
(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
|
||||
|
||||
Sat Jul 6 12:47:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* configure.in (AC_REPLACE_FUNCS): Add group_member.
|
||||
(AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c.
|
||||
* lib/Makefile.am (su_SOURCES): Remove group-member.c.
|
||||
(EXTRA_DIST): Add group-member.c here.
|
||||
|
||||
Thu Jul 4 22:40:06 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/expr.c (docolon): Remove space before newline in usage message.
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* Version 1.19.
|
||||
|
||||
* configure.in (VERSION): Bump to 1.19.
|
||||
|
||||
Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
|
||||
so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
|
||||
those options on that system, sys/stat.h gets compile errors.
|
||||
With help from Marcus Daniels.
|
||||
|
||||
* getopt.c: Update from gettext-0.10.23.
|
||||
* getopt1.c: Likewise.
|
||||
* getopt.h: Likewise.
|
||||
|
||||
Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
|
||||
so the left operand of the << isn't signed.
|
||||
From Kjetil Torgrim Homme.
|
||||
|
||||
* po/Makefile.in.in (install-data): Don't install NLS files when
|
||||
they're not requested. From Ulrich Drepper. Reported by
|
||||
Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
|
||||
|
||||
Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
|
||||
|
||||
@@ -120,7 +120,9 @@ stamp-cat-id: $(PACKAGE).pot
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: all
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r $(MKINSTALLDIRS); then \
|
||||
$(MKINSTALLDIRS) $(datadir); \
|
||||
else \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* FIXME: dircolors - parse a Slackware-style DIR_COLORS file.
|
||||
/* dircolors - output commands to set the LS_COLOR environment variable
|
||||
Copyright (C) 1994, 1995 H. Peter Anvin
|
||||
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
@@ -88,6 +88,8 @@ static struct option const long_options[] =
|
||||
{"csh", no_argument, NULL, 'c'},
|
||||
{"c-shell", no_argument, NULL, 'c'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"print-data-base", no_argument, NULL, 'p'},
|
||||
{"print-database", no_argument, NULL, 'p'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
};
|
||||
|
||||
@@ -103,12 +105,15 @@ usage (int status)
|
||||
{
|
||||
printf (_("Usage: %s [OPTION]... [FILE]\n"), program_name);
|
||||
printf (_("\
|
||||
Output commands to set the LS_COLOR environment variable.\n\
|
||||
\n\
|
||||
Determine format of output:\n\
|
||||
-b, --sh, --bourne-shell output Bourne shell code to set LS_COLOR\n\
|
||||
-c, --csh, --c-shell output C shell code to set LS_COLOR\n\
|
||||
-p, --print-data-base output defaults\n\
|
||||
-h, --help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
Determine format of output:\n\
|
||||
-p, --print-data-base output defaults\n\
|
||||
-b, --sh, --bourne-shell output Bourne shell code to set LS_COLOR\n\
|
||||
-c, --csh, --c-shell output C-shell code to set LS_COLOR\n"));
|
||||
"));
|
||||
}
|
||||
|
||||
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
@@ -124,7 +129,7 @@ xstrndup (const char *s, size_t n)
|
||||
}
|
||||
|
||||
/* If the SHELL environment variable is set to `csh' or `tcsh,'
|
||||
assume C-shell. Else Bourne shell. */
|
||||
assume C shell. Else Bourne shell. */
|
||||
|
||||
static enum Shell_syntax
|
||||
guess_shell_syntax (void)
|
||||
@@ -348,7 +353,7 @@ dc_parse_stream (FILE *fp, const char *filename)
|
||||
}
|
||||
}
|
||||
|
||||
if (unrecognized)
|
||||
if (unrecognized && (state == ST_TERMSURE || state == ST_TERMYES))
|
||||
{
|
||||
error (0, 0, _("%s:%lu: unrecognized keyword `%s'"),
|
||||
filename, (long unsigned) line_number, keywd);
|
||||
@@ -422,7 +427,7 @@ main (int argc, char **argv)
|
||||
syntax = SHELL_SYNTAX_BOURNE;
|
||||
break;
|
||||
|
||||
case 'c': /* C-shell syntax. */
|
||||
case 'c': /* C shell syntax. */
|
||||
syntax = SHELL_SYNTAX_C;
|
||||
break;
|
||||
|
||||
|
||||
@@ -57,9 +57,16 @@ EXEC 01;32
|
||||
.z 01;31
|
||||
.Z 01;31
|
||||
.gz 01;31
|
||||
.deb 01;31
|
||||
.jpg 01;35 # image formats
|
||||
.gif 01;35
|
||||
.bmp 01;35
|
||||
.ppm 01;35
|
||||
.tga 01;35
|
||||
.xbm 01;35
|
||||
.xpm 01;35
|
||||
.tif 01;35
|
||||
.mpg 01;37
|
||||
.avi 01;37
|
||||
.gl 01;37
|
||||
.dl 01;37
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
typedef long COST;
|
||||
|
||||
#define MAXCOST (~(((COST) 1) << (8 * sizeof (COST) -1)))
|
||||
#define MAXCOST (~(((unsigned long) 1) << (8 * sizeof (COST) -1)))
|
||||
|
||||
#define SQR(n) ((n) * (n))
|
||||
#define EQUIV(n) SQR ((COST) (n))
|
||||
|
||||
@@ -102,11 +102,13 @@ int wait ();
|
||||
#define READ_SIZE (32 * 1024)
|
||||
|
||||
#ifndef UID_T_MAX
|
||||
# define UID_T_MAX ((uid_t)(~((uid_t)1 << (sizeof (uid_t) * BITSPERBYTE - 1))))
|
||||
# define UID_T_MAX ((uid_t)(~((unsigned long)1 << ((sizeof (uid_t) \
|
||||
* BITSPERBYTE - 1)))))
|
||||
#endif
|
||||
|
||||
#ifndef GID_T_MAX
|
||||
# define GID_T_MAX ((gid_t)(~((gid_t)1 << (sizeof (gid_t) * BITSPERBYTE - 1))))
|
||||
# define GID_T_MAX ((gid_t)(~((unsigned long)1 << ((sizeof (gid_t) \
|
||||
* BITSPERBYTE - 1)))))
|
||||
#endif
|
||||
|
||||
char *basename ();
|
||||
@@ -604,6 +606,8 @@ format, make all components of the given DIRECTORY(ies).\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
\n\
|
||||
"));
|
||||
printf (_("\
|
||||
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The\n\
|
||||
version control may be set with VERSION_CONTROL, values are:\n\
|
||||
\n\
|
||||
|
||||
2
src/ln.c
2
src/ln.c
@@ -338,6 +338,8 @@ Makes hard links by default, symbolic links with -s.\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
\n\
|
||||
"));
|
||||
printf (_("\
|
||||
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The\n\
|
||||
version control may be set with VERSION_CONTROL, values are:\n\
|
||||
\n\
|
||||
|
||||
39
src/ls.c
39
src/ls.c
@@ -43,7 +43,8 @@
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_SYS_IOCTL_H
|
||||
#include <termios.h>
|
||||
#ifdef GWINSZ_IN_SYS_IOCTL
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
@@ -129,24 +130,6 @@ struct bin_str
|
||||
char *string; /* Pointer to the same */
|
||||
};
|
||||
|
||||
struct bin_str color_indicator[] =
|
||||
{
|
||||
{ LEN_STR_PAIR ("\033[") }, /* lc: Left of color sequence */
|
||||
{ LEN_STR_PAIR ("m") }, /* rc: Right of color sequence */
|
||||
{ 0, NULL }, /* ec: End color (replaces lc+no+rc) */
|
||||
{ LEN_STR_PAIR ("0") }, /* no: Normal */
|
||||
{ LEN_STR_PAIR ("0") }, /* fi: File: default */
|
||||
{ LEN_STR_PAIR ("32") }, /* di: Directory: green */
|
||||
{ LEN_STR_PAIR ("36") }, /* ln: Symlink: cyan */
|
||||
{ LEN_STR_PAIR ("31") }, /* pi: Pipe: red */
|
||||
{ LEN_STR_PAIR ("33") }, /* so: Socket: yellow/brown */
|
||||
{ LEN_STR_PAIR ("44;37") }, /* bd: Block device: white on blue */
|
||||
{ LEN_STR_PAIR ("44;37") }, /* cd: Char device: white on blue */
|
||||
{ 0, NULL }, /* mi: Missing file: undefined */
|
||||
{ 0, NULL }, /* or: Orphanned symlink: undefined */
|
||||
{ LEN_STR_PAIR ("35") } /* ex: Executable: purple */
|
||||
};
|
||||
|
||||
#ifndef STDC_HEADERS
|
||||
char *ctime ();
|
||||
time_t time ();
|
||||
@@ -392,6 +375,24 @@ struct col_ext_type
|
||||
struct col_ext_type *next; /* Next in list */
|
||||
};
|
||||
|
||||
static struct bin_str color_indicator[] =
|
||||
{
|
||||
{ LEN_STR_PAIR ("\033[") }, /* lc: Left of color sequence */
|
||||
{ LEN_STR_PAIR ("m") }, /* rc: Right of color sequence */
|
||||
{ 0, NULL }, /* ec: End color (replaces lc+no+rc) */
|
||||
{ LEN_STR_PAIR ("0") }, /* no: Normal */
|
||||
{ LEN_STR_PAIR ("0") }, /* fi: File: default */
|
||||
{ LEN_STR_PAIR ("01;34") }, /* di: Directory: bright blue */
|
||||
{ LEN_STR_PAIR ("01;36") }, /* ln: Symlink: bright cyan */
|
||||
{ LEN_STR_PAIR ("33") }, /* pi: Pipe: yellow/brown */
|
||||
{ LEN_STR_PAIR ("01;35") }, /* so: Socket: bright magenta */
|
||||
{ LEN_STR_PAIR ("01;33") }, /* bd: Block device: bright yellow */
|
||||
{ LEN_STR_PAIR ("01;33") }, /* cd: Char device: bright yellow */
|
||||
{ 0, NULL }, /* mi: Missing file: undefined */
|
||||
{ 0, NULL }, /* or: Orphanned symlink: undefined */
|
||||
{ LEN_STR_PAIR ("01;32") } /* ex: Executable: bright green */
|
||||
};
|
||||
|
||||
/* FIXME: comment */
|
||||
struct col_ext_type *col_ext_list = NULL;
|
||||
|
||||
|
||||
2
src/mv.c
2
src/mv.c
@@ -393,6 +393,8 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
\n\
|
||||
"));
|
||||
printf (_("\
|
||||
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The\n\
|
||||
version control may be set with VERSION_CONTROL, values are:\n\
|
||||
\n\
|
||||
|
||||
Reference in New Issue
Block a user