Compare commits

...

303 Commits

Author SHA1 Message Date
Jim Meyering
4c9586c01b . 1996-09-02 16:31:23 +00:00
Jim Meyering
d9be56f638 . 1996-09-02 16:18:59 +00:00
Jim Meyering
57592bb00e (ENABLE_NLS): Include libintl.h and define _ to gettext. 1996-09-02 16:18:48 +00:00
Jim Meyering
d4fc1b970c . 1996-09-02 15:59:22 +00:00
Jim Meyering
c609fd3e0a . 1996-09-02 15:53:04 +00:00
Jim Meyering
e9d17da073 (usage): Tell where to report bugs. 1996-09-02 15:52:45 +00:00
Jim Meyering
82e99127d2 . 1996-09-02 15:35:05 +00:00
Jim Meyering
c609ba2d13 (usage): Tell where to report bugs. 1996-09-02 15:34:25 +00:00
Jim Meyering
6a52479e0a . 1996-09-02 14:12:33 +00:00
Jim Meyering
1cd5fb882c . 1996-09-01 13:21:48 +00:00
Jim Meyering
27586e4d1b . 1996-09-01 00:02:25 +00:00
Jim Meyering
bfe2a56ac6 (utime_now): Protoize.
Reported by David S. Miller (davem@caip.rutgers.edu).
1996-08-31 23:49:29 +00:00
Jim Meyering
c9fff51897 (usage): remove spurious trailing \n in puts. 1996-08-31 04:44:31 +00:00
Jim Meyering
7e294bac78 (usage): Tell where to report bugs. 1996-08-29 05:05:57 +00:00
Jim Meyering
3d672b27ca quote via kb 1996-08-29 04:23:53 +00:00
Jim Meyering
8726a1e79e . 1996-08-26 04:07:15 +00:00
Jim Meyering
7aea26b817 (EXTRA_DIST): Add $x-tests.
($x-tests): Guard dependencies with @MAINT@.
1996-08-26 04:05:51 +00:00
Jim Meyering
a8676a3282 . 1996-08-26 03:51:49 +00:00
Jim Meyering
e8f7310474 (EXTRA_DIST): Add $x-tests.
($x-tests): Guard dependencies with @MAINT@.
1996-08-26 03:51:33 +00:00
Jim Meyering
3e1ecd65dd . 1996-08-26 03:45:32 +00:00
Jim Meyering
b0ed797534 . 1996-08-25 03:43:03 +00:00
Jim Meyering
3329d17b3e . 1996-08-24 19:30:01 +00:00
Jim Meyering
41e757beb6 (cat): Cast first arg to stpcpy to char*. 1996-08-24 19:28:27 +00:00
Jim Meyering
efe35c166d . 1996-08-24 17:58:08 +00:00
Jim Meyering
2f70dd59c6 . 1996-08-24 17:57:58 +00:00
Jim Meyering
d57a5cc166 Reverse 10f and 10g so sort passes these tests. 1996-08-24 17:57:14 +00:00
Jim Meyering
7216f62cad . 1996-08-22 04:19:34 +00:00
Jim Meyering
f2be7b3cc4 . 1996-08-22 03:29:54 +00:00
Jim Meyering
5c0b9744ab Nit fixes from kb. 1996-08-20 04:44:13 +00:00
Jim Meyering
b0a21fce4c . 1996-08-19 02:30:32 +00:00
Jim Meyering
3649121dff . 1996-08-19 02:30:04 +00:00
Jim Meyering
383690a5f2 . 1996-08-19 02:28:42 +00:00
Jim Meyering
90ce25327c . 1996-08-19 02:24:52 +00:00
Jim Meyering
840c73b381 . 1996-08-19 02:10:31 +00:00
Jim Meyering
7ec03a4414 (noinst_HEADERS): Add path-concat.h.
(fu_SOURCES): Add path-concat.c.
1996-08-19 02:10:25 +00:00
Jim Meyering
0ba429223d Include path-concat.h.
(do_copy): Check path_concat return value.
(path_concat): Remove function.
1996-08-19 02:09:23 +00:00
Jim Meyering
7d234bb98e Include path-concat.h.
(movefile): Use path_concat instead of open-coding its functionality.
Declare pointer parameters const as appropriate.
1996-08-19 02:09:07 +00:00
Jim Meyering
a0d34ce173 . 1996-08-19 01:41:53 +00:00
Jim Meyering
1a6ee7a625 . 1996-08-19 01:28:11 +00:00
Jim Meyering
34ac19cd34 . 1996-08-19 01:27:40 +00:00
Jim Meyering
a79e4f054a Close comment. 1996-08-18 14:56:54 +00:00
Jim Meyering
ad1a0015be . 1996-08-18 14:53:00 +00:00
Jim Meyering
2592c30822 . 1996-08-18 14:40:07 +00:00
Jim Meyering
5e6706b750 . 1996-08-18 14:39:47 +00:00
Jim Meyering
77f32e0b49 In cmp, use $exp_name, not \$srcdir/$exp_name. 1996-08-18 14:39:33 +00:00
Jim Meyering
a0810c6cae . 1996-08-18 14:37:32 +00:00
Jim Meyering
a023f4519e . 1996-08-18 14:32:50 +00:00
Jim Meyering
0055d0a4cc . 1996-08-18 14:32:13 +00:00
Jim Meyering
416715cf93 . 1996-08-18 14:31:42 +00:00
Jim Meyering
730ec4650a Factor out tr as much as possible. 1996-08-18 05:25:08 +00:00
Jim Meyering
98b9e6e30b . 1996-08-18 05:23:53 +00:00
Jim Meyering
9d76e7ffbb . 1996-08-18 05:21:07 +00:00
Jim Meyering
d9f30fc643 . 1996-08-18 05:20:45 +00:00
Jim Meyering
597e0b2a8e . 1996-08-18 05:20:38 +00:00
Jim Meyering
56cd9b9a02 Rename Trtest.pm to Test.pm. 1996-08-18 05:19:55 +00:00
Jim Meyering
12d30b5cd0 . 1996-08-18 05:18:57 +00:00
Jim Meyering
c64c32d89e Converting to perl5 and LoL. 1996-08-18 05:00:28 +00:00
Jim Meyering
7d490ad462 . 1996-08-18 02:51:38 +00:00
Jim Meyering
0347f76632 . 1996-08-18 00:09:15 +00:00
Jim Meyering
b012712ff5 . 1996-08-17 23:59:18 +00:00
Jim Meyering
6f1a0acdbd . 1996-08-17 18:51:16 +00:00
Jim Meyering
b32398d02c (EXTRA_DIST): Distribute tests: inputs and expected outputs. 1996-08-17 18:50:54 +00:00
Jim Meyering
ea15a1e0e5 Prepend srcdir to @INC@. 1996-08-17 18:33:27 +00:00
Jim Meyering
c7066e8caa . 1996-08-17 18:30:48 +00:00
Jim Meyering
fa674d651c . 1996-08-17 18:30:28 +00:00
Jim Meyering
5220e9a46b Remove now-useless Trtest.pm arg to build-script. 1996-08-17 18:30:24 +00:00
Jim Meyering
afddedbd9f . 1996-08-17 17:53:24 +00:00
Jim Meyering
b98971b7a0 Rename test.data.pl to Trtest.pm. 1996-08-17 17:53:21 +00:00
Jim Meyering
9cccef82ce . 1996-08-17 17:50:07 +00:00
Jim Meyering
f6d73bdb80 . 1996-08-17 17:47:49 +00:00
Jim Meyering
91c0d0de6a . 1996-08-17 17:46:54 +00:00
Jim Meyering
283b1a297d . 1996-08-17 17:29:35 +00:00
Jim Meyering
26259134ee . 1996-08-17 17:28:20 +00:00
Jim Meyering
39cf848828 Revamp to use perl5-style list of lists. 1996-08-17 17:27:46 +00:00
Jim Meyering
8dd548d895 . 1996-08-17 17:27:10 +00:00
Jim Meyering
daa3462c64 Don't use main anymore. 1996-08-17 17:27:03 +00:00
Jim Meyering
b7bf84fd73 . 1996-08-17 17:26:29 +00:00
Jim Meyering
a62273dca5 . 1996-08-17 05:15:53 +00:00
Jim Meyering
32f7fc5503 Update from GNU libc -- this adds back %z and %s
formats and reverts to old behavior where unrecognized format like
%E is treated as eqivalent to `E'.
1996-08-17 05:15:44 +00:00
Jim Meyering
99708d72f6 . 1996-08-17 03:39:44 +00:00
Jim Meyering
ec4159d6f6 . 1996-08-17 03:38:17 +00:00
Jim Meyering
3c39169751 . 1996-08-17 03:37:22 +00:00
Jim Meyering
1a68c9ac75 . 1996-08-17 03:22:40 +00:00
Jim Meyering
e7a59c2594 . 1996-08-17 03:13:54 +00:00
Jim Meyering
1ddf714c24 (parse_group): Fail when given an invalid group name.
Reported as Debian Bug#4119 via Erick Branderhorst (branderh@IAEhv.nl).
Declare pointer parameters const as appropriate.
1996-08-17 03:13:46 +00:00
Jim Meyering
69a2d6bce1 . 1996-08-14 02:51:17 +00:00
Jim Meyering
408cfc09b2 . 1996-08-12 03:51:18 +00:00
Jim Meyering
eebe6a6c0c . 1996-08-12 03:48:18 +00:00
Jim Meyering
abd282bf34 . 1996-08-12 03:45:18 +00:00
Jim Meyering
441ebad5cc . 1996-08-12 03:44:11 +00:00
Jim Meyering
26a8544c83 . 1996-08-12 03:42:53 +00:00
Jim Meyering
4fd0132dfc . 1996-08-12 03:42:07 +00:00
Jim Meyering
bd3627904b . 1996-08-12 03:41:47 +00:00
Jim Meyering
a1ab7fb789 . 1996-08-09 04:03:31 +00:00
Jim Meyering
0e4f0390ef . 1996-08-09 03:59:16 +00:00
Jim Meyering
b741c592c5 . 1996-08-05 04:07:42 +00:00
Jim Meyering
81d574033a . 1996-08-05 04:06:11 +00:00
Jim Meyering
aa49f63378 . 1996-08-05 04:04:49 +00:00
Jim Meyering
1a038cb55e . 1996-08-05 03:49:29 +00:00
Jim Meyering
1c892790d9 . 1996-08-05 03:36:01 +00:00
Jim Meyering
bd51f25754 . 1996-08-05 00:14:16 +00:00
Jim Meyering
406c6613bb . 1996-08-04 23:34:33 +00:00
Jim Meyering
c5449cea5a . 1996-08-04 19:44:04 +00:00
Jim Meyering
7cc00778d1 . 1996-08-04 19:43:53 +00:00
Jim Meyering
1dc1d2996a Update for perl5 and use strict. 1996-08-04 16:03:00 +00:00
Jim Meyering
3cf0da722f . 1996-08-04 15:44:42 +00:00
Jim Meyering
7532e57941 (main): Allow `+' in options like -+8 and -+13. 1996-08-04 14:15:25 +00:00
Jim Meyering
5b8cad3534 (main): Set minus_flag to zero in two places.
Otherwise, `nice --1 -3' would mistakenly do the equivalent of `nice --3'.
Thanks to Eric Backus <ericb@lsid.hp.com> for the test cases.
1996-08-03 04:23:43 +00:00
Jim Meyering
e1df5e7167 . 1996-08-03 04:23:08 +00:00
Jim Meyering
1d8ed38329 . 1996-08-03 02:49:46 +00:00
Jim Meyering
c87d06546a (print_uptime) [HAVE_PROC_UPTIME]: Read from /proc/uptime.
From Ulrich Drepper.
1996-08-03 02:49:34 +00:00
Jim Meyering
afe669874a . 1996-08-02 03:45:50 +00:00
Jim Meyering
ee2e84bb6f . 1996-08-02 03:25:54 +00:00
Jim Meyering
d5aa78b540 (ST_NBLOCKS) [_CRAY]: Special case for Cray.
From by Johan Danielsson.
1996-08-02 03:25:39 +00:00
Jim Meyering
2a5f4c45e1 (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define f_bavail to f_bfree.
From by Johan Danielsson.
1996-08-02 03:25:10 +00:00
Jim Meyering
0fa3eb4d22 . 1996-08-01 04:46:51 +00:00
Jim Meyering
b10f778bf5 [LINK_TYPE]: Remove macro. NLS messages aren't
extracted from macros.
(link_type_string): New global variable to be used instead of
LINK_TYPE.
(main): Set it here.
(do_link): Use it (instead of macro) here.
1996-08-01 04:42:08 +00:00
Jim Meyering
e9ed1c0601 tty: Use terminal, not `tty' in description of tty command.
date %W: fix typo in description
Both from Andreas Schwab.
1996-07-31 12:37:58 +00:00
Jim Meyering
729bd79cb8 . 1996-07-31 04:47:04 +00:00
Jim Meyering
402b4612f8 [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
to work around bug in sys/filsys.h of Fujitsu UXP/V.
Reported by Johan Danielsson.
1996-07-31 04:43:59 +00:00
Jim Meyering
a044608569 . 1996-07-31 04:39:33 +00:00
Jim Meyering
d660831c5a (DO_CHOWN): New macro -- derived from code in copy.
(copy): Use DO_CHOWN to assure that any newly-created symbolic
links have proper owner and group.
1996-07-31 04:39:25 +00:00
Jim Meyering
9ba877cf28 Update from GNU libc master. 1996-07-30 05:33:30 +00:00
Jim Meyering
e22b1e56e6 *** empty log message *** 1996-07-29 05:06:11 +00:00
Jim Meyering
cd2e2180d9 . 1996-07-27 22:30:11 +00:00
Jim Meyering
6932ade12e (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
redefinition warnings on solaris.
(textdomain) [!ENABLE_NLS]: Likewise.
1996-07-27 22:29:01 +00:00
Jim Meyering
c49c9a04e1 . 1996-07-26 04:32:30 +00:00
Jim Meyering
b294dd43a1 (unexpand): Move EOF check to follow code that
processes and generates output for pending spaces.
Before `printf '  ' |unexpand -t 1,2' generated no output.
1996-07-26 04:31:29 +00:00
Jim Meyering
7ce576ff06 (md5_check): Remove parameter, BINARY.
Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
from the input stream rather than the one from the command line.
(main): Fail with a diagnostic if --binary or --text is specified
when verifying checksums.
Reported by Eli Zaretskii <eliz@is.elta.co.il>.
1996-07-26 04:11:21 +00:00
Jim Meyering
733c16465d . 1996-07-26 04:11:11 +00:00
Jim Meyering
981f5ba012 (main): Fix typo in getopt_long string: s/n/h/.
Reported by Ken Pizzini.
1996-07-26 02:11:34 +00:00
Jim Meyering
0e180c8f19 (usage): Remove -h. It is not an option.
Reported by Ulrich Drepper.
1996-07-25 03:25:32 +00:00
Jim Meyering
005ed75540 cv. 1996-07-22 04:50:43 +00:00
Jim Meyering
52211041ad . 1996-07-22 04:42:16 +00:00
Jim Meyering
304295c24c . 1996-07-22 01:57:10 +00:00
Jim Meyering
a56da10982 (rpmatch): Add back [[:alpha:]]. Drepper says it's the standard. 1996-07-22 01:01:10 +00:00
Jim Meyering
1089f9b929 . 1996-07-21 22:48:46 +00:00
Jim Meyering
ccd0e2e27a (yesno) [!HAVE_RPMATCH]: Remove function since we'll
always use the rpmatch-based version.
Declare rpmatch.
1996-07-21 22:48:41 +00:00
Jim Meyering
96a39fa3f6 . 1996-07-21 22:46:46 +00:00
Jim Meyering
08ffff5615 [STDC_HEADERS]: Guard inclusion of stdlib.h.
(_) [!_]: Define it.
(try): Add RESPONSE parameter.
(rpmatch): Update caller.
Change the regular expressions to be ^[yY] and ^[nN].
1996-07-21 22:46:39 +00:00
Jim Meyering
16efa02b77 . 1996-07-21 22:41:26 +00:00
Jim Meyering
7f26c2724a . 1996-07-21 17:25:50 +00:00
Jim Meyering
81b7ecbc14 (EXTRA_DIST): Add rpmatch.c. 1996-07-21 17:25:10 +00:00
Jim Meyering
bd6aa3080a . 1996-07-21 17:16:13 +00:00
Jim Meyering
7f1cf81aba . 1996-07-21 17:13:47 +00:00
Jim Meyering
3af4a12ae3 (yesno) [HAVE_RPMATCH]: New rpmatch-based version of the function. 1996-07-21 17:13:41 +00:00
Jim Meyering
deee2015f3 (EXTRA_DIST): Put error.c and obstack.c here...
(fu_SOURCES): Instead of here.
1996-07-21 17:11:10 +00:00
Jim Meyering
9d06a0075d . 1996-07-21 17:11:01 +00:00
Jim Meyering
1d791a1487 . 1996-07-21 17:01:52 +00:00
Jim Meyering
998e5ad1c0 . 1996-07-21 16:59:36 +00:00
Jim Meyering
67c2366944 . 1996-07-21 16:57:47 +00:00
Jim Meyering
bb952869e7 . 1996-07-21 14:52:33 +00:00
Jim Meyering
35b1d6a948 . 1996-07-21 14:51:46 +00:00
Jim Meyering
63dece38a1 (usage): Correct typo (-iucl -> -iuclc) in usage message.
From Thomas Olsson <d95to@efd.lth.se>.
1996-07-21 14:51:02 +00:00
Jim Meyering
3904fb599e . 1996-07-20 22:14:05 +00:00
Jim Meyering
7b7b289e2d . 1996-07-20 21:01:55 +00:00
Jim Meyering
f8939357a3 . 1996-07-20 05:24:15 +00:00
Jim Meyering
5f79c9e91b (path_concat): Rewrite to return new parameter.
(do_copy): Update uses of path_concat to use new parameter.
Use that new pointer to compute correct offset for make_path_private.
Before, cp --recursive --parents SRC DEST failed when SRC was
an absolute file name.  E.g.,
% cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d
cp: tmp: No such file or directory
Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
1996-07-20 05:24:09 +00:00
Jim Meyering
16c56c7d73 [_AIX]: Add #pragma alloca.
From Bernd Leibing <bernd.leibing@rz.uni-ulm.de>.
1996-07-19 03:56:23 +00:00
Jim Meyering
8c074a6577 . 1996-07-19 03:15:30 +00:00
Jim Meyering
2feeeb5972 . 1996-07-19 03:00:00 +00:00
Jim Meyering
89495b81dd (main): Initialize for internationalized message support:
call setlocale, bindtextdomain, and textdomain.  Reported by
Michel Robitaille <robitail@IRO.UMontreal.CA>.
1996-07-19 02:59:54 +00:00
Jim Meyering
a5c67e1c05 . 1996-07-18 04:44:54 +00:00
Jim Meyering
b288e0f8f5 . 1996-07-18 04:36:09 +00:00
Jim Meyering
5d3af013b0 . 1996-07-18 04:15:00 +00:00
Jim Meyering
b734adb860 Include <sys/types.h> before system.h. 1996-07-18 04:14:51 +00:00
Jim Meyering
88db35dd77 Include <sys/types.h> before system.h. 1996-07-18 04:14:19 +00:00
Jim Meyering
6efc03fd41 Include <sys/types.h> before system.h. 1996-07-18 04:13:52 +00:00
Jim Meyering
befcaa08e8 . 1996-07-18 03:37:55 +00:00
Jim Meyering
59834c2c06 . 1996-07-17 05:34:40 +00:00
Jim Meyering
ed48dc8cae Use `;' instead of (void)0. 1996-07-17 05:29:47 +00:00
Jim Meyering
f3bcc28b21 . 1996-07-17 03:30:55 +00:00
Jim Meyering
e549af7279 (OFF_T_MAX): Remove definition.
(main): Compare against LONG_MAX rather than OFF_T_MAX.
1996-07-17 03:13:54 +00:00
Jim Meyering
e5c3e23ec4 . 1996-07-17 03:13:45 +00:00
Jim Meyering
03cc8c8ca3 [OFF_T_MAX]: Use (unsigned long)1' rather than (off_t)1'
so the left operand of the << isn't signed.
From Kaveh Ghazi.
1996-07-16 05:14:00 +00:00
Jim Meyering
dc84f5c5c9 . 1996-07-16 05:13:16 +00:00
Jim Meyering
e0ac832842 Use `(void)0' as second arg to add macro.
Omitting that second arg made some HPUX C compiler report an error.
From Kaveh R. Ghazi.
1996-07-16 05:08:29 +00:00
Jim Meyering
ff1fc50954 Update from FSF. 1996-07-16 04:58:04 +00:00
Jim Meyering
9e10989282 (print_uptime): Reverse days' and day' in uptime message.
From Kaveh R. Ghazi.
1996-07-16 04:50:12 +00:00
Jim Meyering
4bca95c431 Update from libit. 1996-07-16 04:47:23 +00:00
Jim Meyering
f60dafdac2 Update FSF address.
Remove trailing blanks.
1996-07-16 04:44:29 +00:00
Jim Meyering
ee9cf50a0f . 1996-07-16 04:43:51 +00:00
Jim Meyering
e023911555 Oops. Always return destination. 1996-07-16 03:06:32 +00:00
Jim Meyering
b19da298ac . 1996-07-15 04:49:34 +00:00
Jim Meyering
7efa2ba5c4 indent cpp-directives 1996-07-15 03:57:44 +00:00
Jim Meyering
19bff1c02d indent cpp-directives 1996-07-15 03:56:06 +00:00
Jim Meyering
fd984b9655 . 1996-07-15 03:44:04 +00:00
Jim Meyering
6014da9e30 update FSF address in copyright 1996-07-15 03:43:36 +00:00
Jim Meyering
e5e6e34ead update FSF address in copyright 1996-07-15 03:38:07 +00:00
Jim Meyering
e8b07e3796 update FSF address in copyright 1996-07-15 03:36:16 +00:00
Jim Meyering
1b5bb5c05a update FSF address in copyright and remove any trailing blanks 1996-07-15 02:44:11 +00:00
Jim Meyering
1df37f767c update FSF address in copyright and remove any trailing blanks 1996-07-15 02:41:49 +00:00
Jim Meyering
77973edc33 cpp-indent 1996-07-15 02:29:59 +00:00
Jim Meyering
48e4b51e96 . 1996-07-15 01:07:26 +00:00
Jim Meyering
9c53920ae6 (print_uptime): Use 0, not undefined errno in
couldn't-get-boot-time diagnostic.  From Ulrich Drepper.
1996-07-15 01:07:16 +00:00
Jim Meyering
993b49a693 update fsf address 1996-07-15 00:04:51 +00:00
Jim Meyering
bf72a5728f update fsf address 1996-07-15 00:02:50 +00:00
Jim Meyering
48209ca1ba update fsf address 1996-07-15 00:00:57 +00:00
Jim Meyering
7cb6a4e2f1 update fsf address
cpp-indent
1996-07-14 23:59:45 +00:00
Jim Meyering
7d026dd508 [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
[!INT_MAX]: Define it.
(main): Append INT_MAX to command-line-specified tab list to
ensure termination in unexpand's inner loop.
Derived from a patch from Keith Owens.
1996-07-14 22:28:52 +00:00
Jim Meyering
178f23fbb7 (unexpand): Fix bug that contributed to endless loop
when invoking `echo '  ' |unexpand -t 1,2': use print_tab_index, not
tab_index in inner flush_pend: while loop.  From Keith Owens
<kaos@audio.apana.org.au>.
1996-07-14 22:24:28 +00:00
Jim Meyering
75b93231ca Remove my address. 1996-07-14 21:47:23 +00:00
Jim Meyering
23684f8383 formatting... 1996-07-14 19:09:41 +00:00
Jim Meyering
4b8b59894b Return a value! 1996-07-14 15:05:40 +00:00
Jim Meyering
ade337e1a8 . 1996-07-14 12:54:20 +00:00
Jim Meyering
d38f60e27c (usage): Sort option descriptions in dictionary order. 1996-07-14 12:54:12 +00:00
Jim Meyering
bf75b72e46 Indent nested CPP-directives. 1996-07-14 12:45:09 +00:00
Jim Meyering
dbd0c33f24 update FSF address in copyright 1996-07-14 12:44:09 +00:00
Jim Meyering
4d7a57cf34 (long_options): Add missing last line of NULL
entries.  From Ralph Loader <loader@maths.ox.ac.uk>.
1996-07-14 12:37:24 +00:00
Jim Meyering
1c2c9330d9 . 1996-07-14 12:36:51 +00:00
Jim Meyering
836935c5e6 Libit tweaks. 1996-07-14 12:35:45 +00:00
Jim Meyering
2e789ea9b2 Tweak for libit. 1996-07-14 12:32:25 +00:00
Jim Meyering
a4a64560c0 Tweak for libit. 1996-07-14 12:32:01 +00:00
Jim Meyering
65f957107e fix comment 1996-07-14 12:19:15 +00:00
Jim Meyering
e9d60dc000 . 1996-07-14 04:11:25 +00:00
Jim Meyering
c58cd08bf9 (usage): Add a \' after \n' in usage message.
Otherwise, SunOS's /bin/cc chokes.
1996-07-14 04:11:17 +00:00
Jim Meyering
900a826cf8 . 1996-07-13 19:31:51 +00:00
Jim Meyering
7fe510422e [GWINSZ_BROKEN]: Remove thus-guarded `#undef TIOCGWINSZ'.
GWINSZ_BROKEN can't be defined anymore.
1996-07-13 19:31:34 +00:00
Jim Meyering
1ba9563160 . 1996-07-13 19:27:59 +00:00
Jim Meyering
4bef2ec5f7 . 1996-07-13 19:26:22 +00:00
Jim Meyering
c98ea50c21 . 1996-07-12 03:25:19 +00:00
Jim Meyering
78697777d7 . 1996-07-12 03:05:04 +00:00
Jim Meyering
83696460f0 . 1996-07-12 02:56:51 +00:00
Jim Meyering
bb8acb3640 . 1996-07-12 02:55:08 +00:00
Jim Meyering
4f29f1aeb2 . 1996-07-11 05:01:47 +00:00
Jim Meyering
36a4ba8ba3 . 1996-07-11 04:27:54 +00:00
Jim Meyering
aaafa60129 . 1996-07-11 04:27:27 +00:00
Jim Meyering
866e778210 . 1996-07-11 03:58:31 +00:00
Jim Meyering
805484b693 use latest from gettext-0.10.23 1996-07-11 03:57:04 +00:00
Jim Meyering
a10e992cbc . 1996-07-10 05:00:21 +00:00
Jim Meyering
44b11d6e67 (usage): Fix parentheses. 1996-07-10 03:56:45 +00:00
Jim Meyering
108f50670d . 1996-07-10 03:45:03 +00:00
Jim Meyering
5885cbf0d2 (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>.
1996-07-10 03:33:01 +00:00
Jim Meyering
640cdd2df4 . 1996-07-10 03:32:41 +00:00
Jim Meyering
a4d13e4b8f (long_options): Add print-data-base and print-database.
(usage): Rearrange option descriptions.
1996-07-10 03:26:18 +00:00
Jim Meyering
12beb90e58 . 1996-07-10 03:18:55 +00:00
Jim Meyering
4623f5dca3 (usage): Add a one-line description to --help message.
From Karl Berry.
1996-07-10 03:18:31 +00:00
Jim Meyering
b124be4eb1 Change C-shell to `C shell'. 1996-07-10 03:16:30 +00:00
Jim Meyering
c8feafc2a5 . 1996-07-10 03:15:51 +00:00
Jim Meyering
84b6d13a3c (dc_parse_stream): Don't give `unrecognized keyword'
message unless we've processed a matching TERM directive.
1996-07-10 03:15:39 +00:00
Jim Meyering
fb604ebdf4 . 1996-07-10 03:09:05 +00:00
Jim Meyering
778dd49f55 . 1996-07-10 03:06:54 +00:00
Jim Meyering
3e0fdc1a0b (MAXCOST): Use (unsigned long)1' rather than (COST)1'
so the left operand of the << isn't signed.
From Kjetil Torgrim Homme.
1996-07-10 03:02:54 +00:00
Jim Meyering
c4610f8bb6 . 1996-07-09 23:23:49 +00:00
Jim Meyering
824081f660 (install-data): Don't install NLS files when they're not requested.
From Ulrich Drepper.  Reported by Kjetil Torgrim Homme <kjetilho@ifi.uio.no>.
1996-07-09 23:23:33 +00:00
Jim Meyering
417bda1b99 . 1996-07-08 04:26:31 +00:00
Jim Meyering
dbb6fa88fd . 1996-07-08 04:26:09 +00:00
Jim Meyering
013f2fe433 Make initial colors for `color_indicator' match those
currently in dircolors.hin.
1996-07-08 04:25:49 +00:00
Jim Meyering
de75384c2b . 1996-07-08 04:23:38 +00:00
Jim Meyering
9d691ba42f 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>.
1996-07-08 04:19:36 +00:00
Jim Meyering
744ef2d96f Recognize more filename extensions. From Joshua Cowan. 1996-07-08 03:58:36 +00:00
Jim Meyering
0d978396d7 . 1996-07-08 03:55:55 +00:00
Jim Meyering
581db2ffeb . 1996-07-08 03:41:37 +00:00
Jim Meyering
0d1de84756 . 1996-07-07 20:20:44 +00:00
Jim Meyering
c4f9b63aea . 1996-07-06 22:53:29 +00:00
Jim Meyering
0472107417 (usage): Factor out backup-related text into separate string/printf statement. 1996-07-06 22:50:57 +00:00
Jim Meyering
e1de1d3a93 (usage): Factor out backup-related text into separate string/printf statement. 1996-07-06 22:50:36 +00:00
Jim Meyering
46b486ab5b . 1996-07-06 22:29:57 +00:00
Jim Meyering
68bd38e8a0 . 1996-07-06 21:55:23 +00:00
Jim Meyering
b5c86e8130 (su_SOURCES): Remove group-member.c.
(EXTRA_DIST): Add group-member.c here.
1996-07-06 17:50:16 +00:00
Jim Meyering
bd54740062 . 1996-07-06 17:49:27 +00:00
Jim Meyering
8596e37d97 . 1996-07-06 12:04:47 +00:00
Jim Meyering
5eb689ade0 Fix typo: top-srcdir -> top_srcdir. 1996-07-06 04:05:15 +00:00
Jim Meyering
195f8a213e [!STDC_HEADERS]: Declare free. From Marcus Daniels. 1996-07-06 03:17:09 +00:00
Jim Meyering
4d6b56a932 . 1996-07-06 03:02:44 +00:00
Jim Meyering
62a9c01c6d . 1996-07-06 03:00:44 +00:00
Jim Meyering
12dd329a29 Merge from gettext-0.10.23. 1996-07-06 02:59:12 +00:00
Jim Meyering
4a7000742c ($(PACKAGE).pot): Merge from gettext-0.10.23. 1996-07-06 02:58:59 +00:00
Jim Meyering
f41e1ff806 . 1996-07-05 03:58:06 +00:00
Jim Meyering
fa5ef15197 . 1996-07-05 03:40:39 +00:00
Jim Meyering
2b1f600cbd (usage): Remove space before newline in usage message. 1996-07-05 03:40:21 +00:00
Jim Meyering
0396e35b5a . 1996-07-05 03:39:21 +00:00
Jim Meyering
9824efff73 (usage): Remove space before newline in usage message. 1996-07-05 03:39:12 +00:00
Jim Meyering
7fbe57368e (usage): Remove space before newline in usage message. 1996-07-05 02:49:48 +00:00
Jim Meyering
21c0d8f1f0 (usage): Remove space before newline in usage message. 1996-07-05 02:29:10 +00:00
Jim Meyering
316490baea (usage): Remove space before newline in usage message. 1996-07-05 02:28:29 +00:00
Jim Meyering
bd77322580 . 1996-07-04 22:52:25 +00:00
Jim Meyering
09cf102456 . 1996-07-04 22:52:01 +00:00
Jim Meyering
f8514af7a6 (split_3): Add missing semicolon. From Jim Blandy. 1996-07-04 22:51:52 +00:00
Jim Meyering
6b4aadc588 . 1996-07-04 18:18:03 +00:00
Jim Meyering
e2e512d2d6 . 1996-07-04 18:14:46 +00:00
Jim Meyering
a7d29c59fa (main): Fix typo in last change. 1996-07-04 17:41:05 +00:00
Jim Meyering
b2e339dc25 . 1996-07-04 17:35:51 +00:00
Jim Meyering
e7342330e5 Make dir --version' and vdir --version' print their names, not `ls'.
Reported by Ulrich Drepper.
1996-07-04 17:35:47 +00:00
Jim Meyering
3f868304cf . 1996-07-04 14:53:28 +00:00
Jim Meyering
2926167cfa (md5_file): Replace obsolete comment with a description
of the function.
(md5_check): Don't use "s"-adding trick to form the plural of
`checksum.'  That doesn't work well with translation.
Suggestions from Ulrich Drepper.
1996-07-04 14:53:25 +00:00
Jim Meyering
84448306a4 . 1996-07-04 12:41:58 +00:00
Jim Meyering
b97436b18b (MIN_DIGEST_LINE_LENGTH): New macro.
[NEWLINE_REPLACEMENT_STRING*]: Remove macros.
(main): Output a leading backslash for a line describing a file
whose name contains a newline.  Then translate each NEWLINE byte
in the file name to the string, "\\n", and each backslash to "\\\\".
File names that don't contain NEWLINE aren't translated.
(split_3): Rewrite to handle file names with embedded newlines.
Miles Bader and Jim Blandy suggested this new encoding scheme.
1996-07-04 12:41:53 +00:00
Jim Meyering
db07df5448 . 1996-07-04 12:36:18 +00:00
Jim Meyering
4adeb81260 (split_3): Correct test for 35-byte line to accomodate
fact that leading blanks may be stripped.
1996-07-04 04:22:25 +00:00
Jim Meyering
9684207d04 . 1996-07-03 23:00:45 +00:00
Jim Meyering
b467d6d513 Include sys/types.h before system.h.
From Jim Blandy (jimb@cyclic.com).
1996-07-03 22:59:18 +00:00
Jim Meyering
36454232a5 . 1996-07-03 22:42:58 +00:00
Jim Meyering
ce85352146 [!MAXUID]: Define after inclusion of system.h to avoid
warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3.
From Kaveh Ghazi.
1996-07-03 22:42:41 +00:00
Jim Meyering
7786c6e2cf . 1996-07-03 04:18:38 +00:00
Jim Meyering
4bd1ffa49a . 1996-07-03 04:05:07 +00:00
Jim Meyering
38762b8f78 (usage): Add omitted \n\ at the end of a line in the usage message. 1996-07-03 04:04:06 +00:00
Jim Meyering
7b2cea5ab2 [!EXIT_SUCCESS]: Define it.
[!EXIT_FAILURE]: Define it.
1996-07-03 04:00:36 +00:00
Jim Meyering
b0d3bfa316 . 1996-07-03 04:00:29 +00:00
Jim Meyering
1672bf6d27 (strndup): Include stdio.h and sys/types.h to
get definition of NULL and size_t on SunOS4.1.3.
1996-07-03 03:59:02 +00:00
Jim Meyering
8736952b0b . 1996-07-03 02:52:20 +00:00
Jim Meyering
bd1fc1c256 . 1996-07-02 04:55:06 +00:00
Jim Meyering
bb4d193ac7 [NEWLINE_REPLACEMENT_STRING]: Define.
(split_3): Translate NL bytes not to NUL, but to
NEWLINE_REPLACEMENT_STRING.
Suggested by Ulrich Drepper.
(main): Translate back to NL-containing filename.
1996-07-02 04:54:51 +00:00
190 changed files with 5286 additions and 1106 deletions

View File

@@ -175,35 +175,36 @@ following matrix shows the current state of GNU internationalization,
as of May 1996. The matrix shows, in regard of each package, for which
languages PO files have been submitted to translation coordination.
cs de en es fi fr ja ko no pl pt sl sv
.----------------------------------------.
bash | [] | 1
bison | | 0
clisp | [] [] [] | 3
cpio | [] | 1
diffutils | [] [] | 2
enscript | [] [] [] [] | 4
fileutils | [] [] [] [] | 4
findutils | [] [] | 2
flex | [] | 1
gettext | [] [] [] [] [] [] [] | 8
glibc | [] [] [] | 3
grep | [] [] [] [] | 4
hello | [] [] [] [] [] | 5
m4 | [] [] [] [] | 4
make | | 0
mkid | [] [] | 2
music | [] | 1
ptx | [] [] [] | 3
recode | [] [] [] [] [] | 5
sh-utils | [] [] | 2
sharutils | [] [] [] | 3
tar | [] [] [] [] [] [] [] | 7
textutils | [] [] [] | 3
wdiff | [] [] [] [] | 4
`----------------------------------------'
cs de en es fi fr ja ko no pl pt sl sv
1 16 1 3 1 21 1 6 3 1 3 6 9
cs de en es fi fr ja ko nl no pl pt sl sv
.-------------------------------------------.
bash | [] | 1
bison | [] | 1
clisp | [] [] [] | 3
cpio | [] | 1
diffutils | [] [] [] | 3
enscript | [] [] [] [] | 4
fileutils | [] [] [] [] | 4
findutils | [] [] | 2
flex | [] | 1
gcal | [] | 1
gettext | [] [] [] [] [] [] [] [] | 9
glibc | [] [] [] | 3
grep | [] [] [] [] [] [] | 6
hello | [] [] [] [] [] [] | 6
m4 | [] [] [] [] | 4
make | | 0
mkid | [] [] | 2
music | [] | 1
ptx | [] [] [] | 3
recode | [] [] [] [] [] | 5
sh-utils | [] [] | 2
sharutils | [] [] [] [] | 4
tar | [] [] [] [] [] [] [] | 7
textutils | [] [] [] [] | 4
wdiff | [] [] [] [] | 4
`-------------------------------------------'
cs de en es fi fr ja ko nl no pl pt sl sv
1 17 1 3 1 22 1 6 3 3 4 3 6 10 81
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.0 from Makefile.am
# Makefile.in generated automatically by automake 1.1c from Makefile.am
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -45,15 +45,17 @@ info_TEXINFOS = fileutils.texi
EXTRA_DIST = perm.texi getdate.texi texinfo.tex
mkinstalldirs = $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
INFOS = fileutils.info*
INFOS = fileutils.info fileutils.info-[0-9] fileutils.info-[0-9][0-9]
INFO_DEPS = fileutils.info
DVIS = fileutils.dvi
TEXINFOS = fileutils.texi
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti version.texi
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
version.texi
PACKAGE = @PACKAGE@
@@ -99,20 +101,24 @@ maintainer-clean-vti:
@MAINT@rm -f stamp-vti version.texi
fileutils.info: fileutils.texi version.texi
fileutils.dvi: fileutils.texi version.texi
.texi.info:
$(MAKEINFO) -I$(srcdir) $< -o $(srcdir)/$@
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texi.dvi:
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
install-info: $(INFO_DEPS)
$(mkinstalldirs) $(infodir)
for file in $(INFO_DEPS); do \
for ifile in `cd $(srcdir) && echo $$file*`; do \
$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
done; \
for file in $(INFO_DEPS); do \
for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $(srcdir)/$$ifile; then \
$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
else : ; fi; \
done; \
done
uninstall-info:
@@ -136,8 +142,9 @@ tags: TAGS
TAGS:
subdir = doc
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
test -f $(distdir)/$$file \
@@ -174,6 +181,7 @@ mostlyclean-generic:
clean-generic:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)

View File

@@ -11,6 +11,30 @@
@cindex date input formats
@findex getdate
@quotation
Our units of temporal measurement, from seconds on up to months, are so
complicated, asymmetrical and disjunctive so as to make coherent mental
reckoning in time all but impossible. Indeed, had some tyrannical god
contrived to enslave our minds to time, to make it all but impossible
for us to escape subjection to sodden routines and unpleasant surprises,
he could hardly have done better than handing down our present system.
It is like a set of trapezoidal building blocks, with no vertical or
horizontal surfaces, like a language in which the simplest thought
demands ornate constructions, useless particles and lengthy
circumlocutions. Unlike the more successful patterns of language and
science, which enable us to face experience boldly or at least
level-headedly, our system of temporal calculation silently and
persistently encourages our terror of time.
@dots{} It is as though architects had to measure length in feet, width
in meters and height in ells; as though basic instruction manuals
demanded a knowledge of five different languages. It is no wonder then
that we often look into our own immediate past or future, last Tuesday
or a week from Sunday, with feelings of helpless confusion. @dots{}
--- Robert Grudin, @cite{Time and the Art of Living}.
@end quotation
This section describes the textual date representations that GNU
programs accept. These are the strings you, as a user, can supply as
arguments to the various programs. The C interface (via the

View File

@@ -79,12 +79,11 @@ case $3 in
Dec) nummonthtod=12;;
esac
# For the first six month of the year the time notation can also
# be used for file modified in the last year.
# be used for files modified in the last year.
if (expr $nummonth \> $nummonthtod) > /dev/null;
then
year=`expr $year - 1`
fi
;;
fi;;
*) year=$3;;
esac

View File

@@ -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
@@ -1280,7 +1280,7 @@ Translate carriage return to newline. May be negated.
@opindex ixon
@kindex C-s/C-q flow control
@cindex XON/XOFF flow control
Enable XON/XOFF flow control (that is, @key{CTRL-s}/@key{CTRL-Q}). May
Enable XON/XOFF flow control (that is, @kbd{CTRL-S}/@kbd{CTRL-Q}). May
be negated.
@item ixoff
@@ -1602,7 +1602,7 @@ For GNU stty, giving a value of @code{^-} or @code{undef} disables that
special character. (This is incompatible with Ultrix @code{stty},
which uses a value of @samp{u} to disable a special character. GNU
@code{stty} treats a value @samp{u} like any other, namely to set that
special character to @key{u}.)
special character to @key{U}.)
@table @samp
@@ -1768,8 +1768,8 @@ Exit status:
@cindex print terminal file name
@cindex terminal file name, printing
@code{tty} prints the file name of the tty connected to its standard
input. It prints @samp{not a tty} if standard input is not a tty.
@code{tty} prints the file name of the terminal connected to its standard
input. It prints @samp{not a tty} if standard input is not a terminal.
Synopsis:
@example
@@ -1794,8 +1794,8 @@ Print nothing; only return an exit status.
Exit status:
@display
0 if standard input is a tty
1 if standard input is not a tty
0 if standard input is a terminal
1 if standard input is not a terminal
2 if given incorrect arguments
3 if a write error occurs
@end display
@@ -2203,7 +2203,7 @@ standard.)
day of week (0@dots{}6) with 0 corresponding to Sunday
@item %W
week number of year with Monday as first day of week (00@dots{}53).
Days in a new year preceding the first Sunday are in week zero.
Days in a new year preceding the first Monday are in week zero.
@item %x
locale's date representation (mm/dd/yy)
@item %y
@@ -2714,7 +2714,7 @@ nohup @var{command} [@var{arg}]@dots{}
@flindex nohup.out
@code{nohup} increases the scheduling priority of @var{command} by 5, so
it has a slightly smaller change to run. If standard output is a tty,
it has a slightly smaller change to run. If standard output is a terminal,
it and standard error are redirected so that they are appended to the
file @file{nohup.out}; if that cannot be written to, they are appended
to the file @file{$HOME/nohup.out}. If that cannot be written to, the

View File

@@ -7,3 +7,4 @@ safe-lstat.c
safe-lstat.h
getdate.tab.c
.deps
group_member.c

View File

@@ -1,17 +1,18 @@
## Process this file with automake to produce Makefile.in
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 \
mkdir.c mktime.c mountlist.c posixtm.y rename.c rmdir.c \
EXTRA_DIST = alloca.c basename.c error.c euidaccess.c fnmatch.c fsusage.c \
ftruncate.c getdate.y getopt.c getopt1.c group-member.c \
memcmp.c memcpy.c memset.c \
mkdir.c mktime.c mountlist.c obstack.c posixtm.y rename.c rmdir.c rpmatch.c \
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
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 \
isdir.c long-options.c makepath.c modechange.c obstack.c \
dirname.c fileblocks.c filemode.c \
full-write.c getversion.c idcache.c \
isdir.c long-options.c makepath.c modechange.c path-concat.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
@@ -19,7 +20,7 @@ fu_LIBADD = @LIBOBJS@ @ALLOCA@
noinst_HEADERS = argmatch.h backupfile.h error.h fnmatch.h fsusage.h \
getline.h getopt.h group-member.h long-options.h makepath.h modechange.h \
mountlist.h obstack.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
mountlist.h obstack.h path-concat.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
BUILT_SOURCES = getdate.c posixtm.c

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.0 from Makefile.am
# Makefile.in generated automatically by automake 1.1c from Makefile.am
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -40,17 +40,18 @@ 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 \
mkdir.c mktime.c mountlist.c posixtm.y rename.c rmdir.c \
EXTRA_DIST = alloca.c basename.c error.c euidaccess.c fnmatch.c fsusage.c \
ftruncate.c getdate.y getopt.c getopt1.c group-member.c \
memcmp.c memcpy.c memset.c \
mkdir.c mktime.c mountlist.c obstack.c posixtm.y rename.c rmdir.c rpmatch.c \
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
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 \
isdir.c long-options.c makepath.c modechange.c obstack.c \
dirname.c fileblocks.c filemode.c \
full-write.c getversion.c idcache.c \
isdir.c long-options.c makepath.c modechange.c path-concat.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
@@ -58,36 +59,34 @@ fu_LIBADD = @LIBOBJS@ @ALLOCA@
noinst_HEADERS = argmatch.h backupfile.h error.h fnmatch.h fsusage.h \
getline.h getopt.h group-member.h long-options.h makepath.h modechange.h \
mountlist.h obstack.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
mountlist.h obstack.h path-concat.h pathmax.h save-cwd.h xstrtol.h xstrtoul.h
BUILT_SOURCES = getdate.c posixtm.c
mkinstalldirs = $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
noinst_LIBFILES = libfu.a
CC = @CC@
LEX = @LEX@
YACC = @YACC@
DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
fu_DEPENDENCIES = @LIBOBJS@ @ALLOCA@
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
dirname.o fileblocks.o filemode.o full-write.o getversion.o idcache.o \
isdir.o long-options.o makepath.o modechange.o path-concat.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
RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
HEADERS = $(noinst_HEADERS)
DIST_COMMON = Makefile.am Makefile.in
@@ -110,10 +109,10 @@ $(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/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/path-concat.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 \
@@ -135,14 +134,14 @@ Makefile: $(top_builddir)/config.status Makefile.in
mostlyclean-noinstLIBRARIES:
clean-noinstLIBRARIES:
rm -f $(noinst_LIBFILES)
test -z "$(noinst_LIBFILES)" || rm -f $(noinst_LIBFILES)
distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) $<
$(COMPILE) -c $<
mostlyclean-compile:
rm -f *.o core
@@ -155,7 +154,7 @@ distclean-compile:
maintainer-clean-compile:
$(fu_OBJECTS): ../config.h
libfu.a: $(fu_OBJECTS) $(fu_LIBADD)
libfu.a: $(fu_OBJECTS) $(fu_DEPENDENCIES)
rm -f libfu.a
$(AR) cru libfu.a $(fu_OBJECTS) $(fu_LIBADD)
$(RANLIB) libfu.a
@@ -173,12 +172,13 @@ mostlyclean-tags:
clean-tags:
distclean-tags:
rm -f TAGS ID
maintainer-clean-tags:
rm -f TAGS ID
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = lib
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
test -f $(distdir)/$$file \
@@ -186,10 +186,6 @@ distdir: $(DEP_DISTFILES)
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
done
# This fragment is probably only useful for maintainers. It relies on
# GNU make and gcc. It is only included in the generated Makefile.in
# if `automake' is not passed the `--include-deps' flag.
MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-include $(srcdir)/.deps/.P
@@ -210,8 +206,6 @@ $(srcdir)/.deps/%.P: $(srcdir)/%.c
else \
mv $@-tmp $@; \
fi
# End of maintainer-only section
info:
dvi:
@@ -241,6 +235,7 @@ mostlyclean-generic:
clean-generic:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@ai.mit.edu> */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* David MacKenzie <djm@gnu.ai.mit.edu>.
Some algorithms adapted from GNU Emacs. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* When to make backup files. */
enum backup_type

View File

@@ -12,11 +12,11 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
/* Return NAME with any leading path stripped off.

View File

@@ -15,31 +15,31 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
# include <netdb.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
# include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
# include <arpa/inet.h>
#endif
/* Returns the canonical hostname associated with HOST (allocated in a static
@@ -53,24 +53,24 @@ canon_host (host)
if (he)
{
#ifdef HAVE_GETHOSTBYADDR
# ifdef HAVE_GETHOSTBYADDR
char *addr = 0;
/* Try and get an ascii version of the numeric host address. */
switch (he->h_addrtype)
{
#ifdef HAVE_INET_NTOA
# ifdef HAVE_INET_NTOA
case AF_INET:
addr = inet_ntoa (*(struct in_addr *) he->h_addr);
break;
#endif /* HAVE_INET_NTOA */
# endif /* HAVE_INET_NTOA */
}
if (addr && strcmp (he->h_name, addr) == 0)
/* gethostbyname() cheated! Lookup the host name via the address
this time to get the actual host name. */
he = gethostbyaddr (he->h_addr, he->h_length, he->h_addrtype);
#endif /* HAVE_GETHOSTBYADDR */
# endif /* HAVE_GETHOSTBYADDR */
if (he)
return (char *) (he->h_name);

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -16,22 +16,22 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _error_h_
#define _error_h_
# define _error_h_
#ifndef __attribute__
# ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
# endif
#endif
#if defined (__STDC__) && __STDC__
# if defined (__STDC__) && __STDC__
/* Print a message with `fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
@@ -49,11 +49,11 @@ extern void error_at_line (int status, int errnum, const char *fname,
function without parameters instead. */
extern void (*error_print_progname) (void);
#else
# else
void error ();
void error_at_line ();
extern void (*error_print_progname) ();
#endif
# endif
/* This variable is incremented each time `error' is called. */
extern unsigned int error_message_count;

View File

@@ -15,8 +15,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
not, write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie and Torbjorn Granlund.
Adapted for GNU C library by Roland McGrath. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Brian L. Matthews, blm@6sceng.UUCP. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -14,8 +14,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,48 +1,57 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
This library is distributed in the hope that it will be useful,
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _FNMATCH_H
#define _FNMATCH_H 1
#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
#undef __P
#define __P(args) args
#define __P(protos) protos
#else /* Not C++ or ANSI C. */
#undef __P
#define __P(args) ()
#undef const
#define const
#define __P(protos) ()
/* We can get away without defining `const' here only because in this file
it is used only inside the prototype for `fnmatch', which is elided in
non-ANSI C where `const' is problematical. */
#endif /* C++ or ANSI C. */
/* Bits set in the FLAGS argument to `fnmatch'. */
#define FNM_PATHNAME (1 << 0)/* No wildcard can ever match `/'. */
#define FNM_NOESCAPE (1 << 1)/* Backslashes don't quote special chars. */
#define FNM_PERIOD (1 << 2)/* Leading `.' is matched only explicitly. */
#define FNM_TARPATH (1 << 4)/* Ignore `/...' after a match. */
#define __FNM_FLAGS (FNM_PATHNAME|FNM_NOESCAPE|FNM_PERIOD|FNM_TARPATH)
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE)
#define FNM_FILE_NAME FNM_PATHNAME
/* We #undef these before defining them because some losing systems
(HP-UX A.08.07 for example) define these in <unistd.h>. */
#undef FNM_PATHNAME
#undef FNM_NOESCAPE
#undef FNM_PERIOD
/* Bits set in the FLAGS argument to `fnmatch'. */
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
#endif
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
@@ -50,12 +59,11 @@ extern "C"
/* Match STRING against the filename pattern PATTERN,
returning zero if it matches, FNM_NOMATCH if not. */
extern int fnmatch __P ((const char *__pattern, const char *__string,
int __flags));
extern int fnmatch __P ((const char *__pattern, const char *__string,
int __flags));
#ifdef __cplusplus
}
#endif
#endif /* fnmatch.h */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -37,6 +37,10 @@ int statfs ();
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */
#include <sys/fs/s5param.h>
#endif
#if defined(HAVE_SYS_FILSYS_H) && !defined(_CRAY)
#include <sys/filsys.h> /* SVR2. */
#endif
@@ -179,8 +183,11 @@ get_fs_usage (path, disk, fsp)
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
# if _AIX
# if _AIX || defined(_CRAY)
# define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_bsize, 512)
# ifdef _CRAY
# define f_bavail f_bfree
# endif
# else
# define CONVERT_BLOCKS(b) (b)
# ifndef _SEQUENT_ /* _SEQUENT_ is DYNIX/ptx. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Space usage statistics for a filesystem. Blocks are 512-byte. */
struct fs_usage

View File

@@ -12,20 +12,20 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Copied largely from GNU C's cccp.c.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#include <errno.h>

View File

@@ -12,13 +12,17 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* David MacKenzie <djm@gnu.ai.mit.edu> */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_UNAME
#include <sys/utsname.h>
# include <sys/utsname.h>
#endif
/* Put up to LEN chars of the host name into NAME.

View File

@@ -18,17 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
/* The `getdelim' function is only declared if there following symbol
/* The `getdelim' function is only declared if the following symbol
is defined. */
#define _GNU_SOURCE 1
#include <stdio.h>
#include <sys/types.h>
#if defined __GNU_LIBRARY__ && defined HAVE_GETDELIM
#if defined __GNU_LIBRARY__ && HAVE_GETDELIM
int
getline (lineptr, n, stream)
@@ -42,17 +42,17 @@ getline (lineptr, n, stream)
#else /* ! have getdelim */
#define NDEBUG
#include <assert.h>
# define NDEBUG
# include <assert.h>
#if STDC_HEADERS
# include <stdlib.h>
#else
# if STDC_HEADERS
# include <stdlib.h>
# else
char *malloc (), *realloc ();
#endif
# endif
/* Always add at least this many bytes when extending the buffer. */
#define MIN_CHUNK 64
# define MIN_CHUNK 64
/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR
+ OFFSET (and null-terminate it). *LINEPTR is a pointer returned from

View File

@@ -15,17 +15,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _getline_h_
#define _getline_h_ 1
# define _getline_h_ 1
#include <stdio.h>
# include <stdio.h>
#ifndef PARAMS
# if defined (__GNUC__) || __STDC__
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif /* GCC. */
#endif /* Not PARAMS. */
# ifndef PARAMS
# if defined (__GNUC__) || __STDC__
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif /* GCC. */
# endif /* Not PARAMS. */
int
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));

View File

@@ -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] == ':')

View File

@@ -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

View File

@@ -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>

View File

@@ -12,13 +12,13 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <sys/types.h>
@@ -26,7 +26,7 @@
#include <grp.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
/* setgrent, getgrent, and endgrent are not specified by POSIX.1,
@@ -36,9 +36,9 @@
struct group *getgrent ();
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
# include <string.h>
#else
#include <strings.h>
# include <strings.h>
#endif
/* Like `getgroups', but for user USERNAME instead of for

View File

@@ -12,25 +12,25 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#ifndef SHELLS_FILE
/* File containing a list of nonrestricted shells, one per line. */
#define SHELLS_FILE "/etc/shells"
# define SHELLS_FILE "/etc/shells"
#endif
#include <stdio.h>
#include <ctype.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
# include <stdlib.h>
#else
char *malloc ();
char *realloc ();

View File

@@ -12,11 +12,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "backupfile.h"
#ifdef STDC_HEADERS

View File

@@ -12,22 +12,22 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
# include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#include "group-member.h"

View File

@@ -1,5 +1,5 @@
#ifndef _group_member_h_
#define _group_member_h_ 1
# define _group_member_h_ 1
int
group_member ();

View File

@@ -12,15 +12,19 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
#if defined(USG) || defined(STDC_HEADERS)
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
#else
#include <strings.h>
@@ -199,7 +203,7 @@ getgidbyname (group)
group_alist = tail;
return &tail->id.g;
}
tail->next = nogroup_alist;
nogroup_alist = tail;
return 0;

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -12,10 +12,10 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Jim Meyering (meyering@comco.com) */
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -12,11 +12,10 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> and
Jim Meyering <meyering@cs.utexas.edu>. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> and Jim Meyering. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,15 +1,15 @@
#if __STDC__
#undef __P
#define __P(args) args
# undef __P
# define __P(args) args
#else
#define __P(args) ()
# define __P(args) ()
#endif
int
make_path __P ((const char *_argpath,
int _mode,
int _parent_mode,
uid_t _owner,
gid_t _group,
int _preserve_existing,
const char *_verbose_fmt_string));
make_path __P ((const char *_argpath,
int _mode,
int _parent_mode,
uid_t _owner,
gid_t _group,
int _preserve_existing,
const char *_verbose_fmt_string));

View File

@@ -13,8 +13,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Jim Meyering (meyering@na-net.ornl.gov) */

View File

@@ -20,7 +20,8 @@ GNU General Public License for more details.
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, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -15,8 +15,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"

View File

@@ -4,21 +4,25 @@
By David MacKenzie <djm@gnu.ai.mit.edu>. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
void
void *
memmove (dest, source, length)
char *dest;
const char *source;
unsigned length;
{
char *d0 = dest;
if (source < dest)
/* Moving from low mem to hi mem; start at end. */
for (source += length, dest += length; length; --length)
*--dest = *--source;
else if (source != dest)
/* Moving from hi mem to low mem; start at beginning. */
for (; length; --length)
*dest++ = *source++;
{
/* Moving from hi mem to low mem; start at beginning. */
for (; length; --length)
*dest++ = *source++;
}
return (void *) d0;
}

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
char *
memset (str, c, len)

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -15,8 +15,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
not, write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. */
/* Define this to have a standalone program to test this implementation of
mktime. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@ai.mit.edu> */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Masks for the `flags' field in a `struct mode_change'. */
@@ -45,11 +45,11 @@ struct mode_change
#define MODE_MEMORY_EXHAUSTED (struct mode_change *) 1
#ifndef __P
#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
#define __P(args) args
#else
#define __P(args) ()
#endif /* GCC. */
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
# define __P(args) args
# else
# define __P(args) ()
# endif /* GCC. */
#endif /* Not __P. */
struct mode_change *mode_compile __P ((const char *, unsigned));

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* A mount table entry. */
struct mount_entry

View File

@@ -12,8 +12,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "obstack.h"
@@ -31,7 +31,7 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
#ifdef __STDC__
#if defined (__STDC__) && __STDC__
#define POINTER void *
#else
#define POINTER char *
@@ -267,7 +267,7 @@ _obstack_newchunk (h, length)
This is here for debugging.
If you use it in a program, you are probably losing. */
#ifdef __STDC__
#if defined (__STDC__) && __STDC__
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
obstack.h because it is just for debugging. */
int _obstack_allocated_p (struct obstack *h, POINTER obj);
@@ -374,7 +374,7 @@ obstack_free (h, obj)
/* Now define the functional versions of the obstack macros.
Define them to simply use the corresponding macros to do the job. */
#ifdef __STDC__
#if defined (__STDC__) && __STDC__
/* These function definitions do not work with non-ANSI preprocessors;
they won't pass through the macro names in parentheses. */

View File

@@ -12,8 +12,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Summary:

58
lib/path-concat.c Normal file
View File

@@ -0,0 +1,58 @@
/* path-concat.c -- concatenate two arbitrary pathnames
Copyright (C) 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
char *malloc ();
char *stpcpy ();
/* Concatenate two pathname components, DIR and BASE, in newly-allocated
storage and return the result. Return 0 if out of memory. Add a slash
between DIR and BASE in the result if neither would contribute one.
If each would contribute at least one, elide one from the end of DIR.
Otherwise, simply concatenate DIR and BASE. In any case, if
BASE_IN_RESULT is non-NULL, set *BASE_IN_RESULT to point to the copy of
BASE in the returned concatenation. */
char *
path_concat (const char *dir, const char *base, char **base_in_result)
{
char *p;
char *p_concat;
p_concat = malloc (strlen (dir) + strlen (base) + 2);
if (!p_concat)
return 0;
p = stpcpy (p_concat, dir);
if (*(p - 1) == '/' && *base == '/')
--p;
else if (*(p - 1) != '/' && *base != '/')
p = stpcpy (p, "/");
if (base_in_result)
*base_in_result = p;
stpcpy (p, base);
return p_concat;
}

9
lib/path-concat.h Normal file
View File

@@ -0,0 +1,9 @@
#if __STDC__
# undef __P
# define __P(args) args
#else
# define __P(args) ()
#endif
char *
path_concat __P ((const char *dir, const char *base, char **base_in_result));

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _PATHMAX_H
#define _PATHMAX_H

View File

@@ -12,28 +12,50 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jim Kingdon and David MacKenzie. */
%{
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* The following block of alloca-related preprocessor directives is here
solely to allow compilation by non GNU-C compilers of the C parser
produced from this file by old versions of bison. Newer versions of
bison include a block similar to this one in bison.simple. */
#ifdef __GNUC__
#define alloca __builtin_alloca
#else
#ifdef sparc
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#else
#ifdef _AIX
#pragma alloca
#else
char *alloca ();
void *alloca ();
#endif
#endif
#endif
#include <stdio.h>
#include <sys/types.h>
#ifdef TM_IN_SYS_TIME
#include <sys/time.h>
#else
#include <time.h>
#endif
/* Some old versions of bison generate parsers that use bcopy.
That loses on systems that don't provide the function, so we have
to redefine it here. */
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
#define bcopy(from, to, len) memcpy ((to), (from), (len))
#endif
#define YYDEBUG 1

View File

@@ -15,13 +15,13 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <errno.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
/* Define-away any (possibly conflicting) prototype of putenv.
@@ -29,26 +29,26 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define putenv _sys_putenv
#if defined (__GNU_LIBRARY__) || defined (HAVE_STDLIB_H)
#include <stdlib.h>
# include <stdlib.h>
#endif
#if defined (__GNU_LIBRARY__) || defined (HAVE_STRING_H)
#include <string.h>
# include <string.h>
#endif
#if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H)
#include <unistd.h>
# include <unistd.h>
#endif
#undef putenv
#if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR)
#define strchr index
# define strchr index
#endif
#if !defined (__GNU_LIBRARY__) && !defined (HAVE_MEMCPY)
#define memcpy(d,s,n) bcopy ((s), (d), (n))
# define memcpy(d,s,n) bcopy ((s), (d), (n))
#endif
#if HAVE_GNU_LD
#define environ __environ
# define environ __environ
#else
extern char **environ;
#endif

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Written by Jim Meyering. */
@@ -28,23 +28,23 @@
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <stdio.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
# include <stdlib.h>
#endif
#if defined (STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
# include <string.h>
/* An ANSI string.h and pre-ANSI memory.h might conflict. */
#if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
#include <memory.h>
#endif /* not STDC_HEADERS and HAVE_MEMORY_H */
# if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
# include <memory.h>
# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
#else /* not STDC_HEADERS and not HAVE_STRING_H */
#include <strings.h>
# include <strings.h>
/* memory.h and strings.h conflict on some systems. */
#endif /* not STDC_HEADERS and not HAVE_STRING_H */

View File

@@ -1,12 +1,12 @@
#ifndef H_READTOKENS_H
#define H_READTOKENS_H
# define H_READTOKENS_H
#ifndef INITIAL_TOKEN_LENGTH
#define INITIAL_TOKEN_LENGTH 20
#endif
# ifndef INITIAL_TOKEN_LENGTH
# define INITIAL_TOKEN_LENGTH 20
# endif
#ifndef TOKENBUFFER_DEFINED
#define TOKENBUFFER_DEFINED
# ifndef TOKENBUFFER_DEFINED
# define TOKENBUFFER_DEFINED
struct tokenbuffer
{
long size;
@@ -14,14 +14,14 @@ struct tokenbuffer
};
typedef struct tokenbuffer token_buffer;
#endif /* not TOKENBUFFER_DEFINED */
# endif /* not TOKENBUFFER_DEFINED */
#undef __P
#if defined (__STDC__) && __STDC__
#define __P(x) x
#else
#define __P(x) ()
#endif
# undef __P
# if defined (__STDC__) && __STDC__
# define __P(x) x
# else
# define __P(x) ()
# endif
void init_tokenbuffer __P ((token_buffer *tokenbuffer));

View File

@@ -16,8 +16,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* AIX requires this to be the first thing in the file. */
#if defined (_AIX) && !defined (REGEX_MALLOC)

View File

@@ -14,8 +14,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __REGEXP_LIBRARY_H__
#define __REGEXP_LIBRARY_H__
@@ -42,7 +42,7 @@ typedef unsigned reg_syntax_t;
#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
/* If this bit is not set, then + and ? are operators, and \+ and \? are
literals.
literals.
If set, then \+ and \? are operators and + and ? are literals. */
#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
@@ -58,7 +58,7 @@ typedef unsigned reg_syntax_t;
^ is an anchor if it is at the beginning of a regular
expression or after an open-group or an alternation operator;
$ is an anchor if it is at the end of a regular expression, or
before a close-group or an alternation operator.
before a close-group or an alternation operator.
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
POSIX draft 11.2 says that * etc. in leading positions is undefined.
@@ -69,7 +69,7 @@ typedef unsigned reg_syntax_t;
/* If this bit is set, then special characters are always special
regardless of where they are in the pattern.
If this bit is not set, then special characters are special only in
some contexts; otherwise they are ordinary. Specifically,
some contexts; otherwise they are ordinary. Specifically,
* + ? and intervals are only special when not after the beginning,
open-group, or alternation operator. */
#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
@@ -91,7 +91,7 @@ typedef unsigned reg_syntax_t;
#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
/* If this bit is set, either \{...\} or {...} defines an
interval, depending on RE_NO_BK_BRACES.
interval, depending on RE_NO_BK_BRACES.
If not set, \{, \}, {, and } are literals. */
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
@@ -116,7 +116,7 @@ typedef unsigned reg_syntax_t;
If not set, then \<digit> is a back-reference. */
#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
/* If this bit is set, then | is an alternation operator, and \| is literal.
/* If this bit is set, then | is an alternation operator, and \| is literal.
If not set, then \| is an alternation operator, and | is literal. */
#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
@@ -142,7 +142,7 @@ extern reg_syntax_t re_syntax_options;
/* Define combinations of the above bits for the standard possibilities.
(The [[[ comments delimit what gets put into the Texinfo file, so
don't delete them!) */
don't delete them!) */
/* [[[begin syntaxes]]] */
#define RE_SYNTAX_EMACS 0
@@ -209,7 +209,7 @@ extern reg_syntax_t re_syntax_options;
#ifdef RE_DUP_MAX
#undef RE_DUP_MAX
#endif
#define RE_DUP_MAX ((1 << 15) - 1)
#define RE_DUP_MAX ((1 << 15) - 1)
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
@@ -221,7 +221,7 @@ extern reg_syntax_t re_syntax_options;
/* If this bit is set, then ignore case when matching.
If not set, then case is significant. */
#define REG_ICASE (REG_EXTENDED << 1)
/* If this bit is set, then anchors do not match at newline
characters in the string.
If not set, then anchors do match at newlines. */
@@ -260,7 +260,7 @@ typedef enum
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* Unmatched left bracket. */
REG_EPAREN, /* Parenthesis imbalance. */
REG_EPAREN, /* Parenthesis imbalance. */
REG_EBRACE, /* Unmatched \{. */
REG_BADBR, /* Invalid contents of \{\}. */
REG_ERANGE, /* Invalid range end. */
@@ -279,7 +279,7 @@ typedef enum
compiled, the `re_nsub' field is available. All other fields are
private to the regex routines. */
#ifndef RE_TRANSLATE_TYPE
#ifndef RE_TRANSLATE_TYPE
#define RE_TRANSLATE_TYPE char *
#endif
@@ -295,7 +295,7 @@ struct re_pattern_buffer
unsigned long allocated;
/* Number of bytes actually used in `buffer'. */
unsigned long used;
unsigned long used;
/* Syntax setting with which the pattern was compiled. */
reg_syntax_t syntax;
@@ -339,7 +339,7 @@ struct re_pattern_buffer
unsigned no_sub : 1;
/* If set, a beginning-of-line anchor doesn't match at the
beginning of the string. */
beginning of the string. */
unsigned not_bol : 1;
/* Similarly for an end-of-line anchor. */
@@ -446,7 +446,7 @@ extern int re_match
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
extern int re_match_2
extern int re_match_2
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
int length1, const char *string2, int length2,
int start, struct re_registers *regs, int stop));

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

81
lib/rpmatch.c Normal file
View File

@@ -0,0 +1,81 @@
/* rpmatch - determine whether string value is affirmation or negative
response according to current locale's data
Copyright (C) 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if STDC_HEADERS || _LIBC
# include <stdlib.h>
#endif
#include <regex.h>
#if ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
#else
# define _(Text) Text
#endif
static int
try (response, pattern, match, nomatch, lastp, re)
const char *response;
const char *pattern;
const int match;
const int nomatch;
const char **lastp;
regex_t *re;
{
if (pattern != *lastp)
{
/* The pattern has changed. */
if (*lastp)
{
/* Free the old compiled pattern. */
regfree (re);
*lastp = NULL;
}
/* Compile the pattern and cache it for future runs. */
if (regcomp (re, pattern, REG_EXTENDED) != 0)
return -1;
*lastp = pattern;
}
/* See if the regular expression matches RESPONSE. */
return regexec (re, response, 0, NULL, 0) == 0 ? match : nomatch;
}
int
rpmatch (response)
const char *response;
{
/* Match against one of the response patterns, compiling the pattern
first if necessary. */
/* We cache the response patterns and compiled regexps here. */
static const char *yesexpr, *noexpr;
static regex_t yesre, nore;
int result;
return ((result = try (response, _("^[yY][[:alpha:]]*"), 1, 0,
&yesexpr, &yesre))
? result
: try (response, _("^[nN][[:alpha:]]*"), 0, -1, &noexpr, &nore));
}

View File

@@ -12,18 +12,18 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#include <errno.h>

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jim Meyering <meyering@na-net.ornl.gov>. */

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */

View File

@@ -19,23 +19,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <errno.h>
#if _LIBC || HAVE_STDLIB_H
#include <stdlib.h>
# include <stdlib.h>
#endif
#if _LIBC || HAVE_STRING_H
#include <string.h>
# include <string.h>
#endif
#if _LIBC || HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#ifndef HAVE_GNU_LD
#define __environ environ
# define __environ environ
#endif
int

View File

@@ -1,12 +1,12 @@
#ifndef SETENV_H
#define SETENV_H 1
# define SETENV_H 1
#undef __P
#if defined (__STDC__) && __STDC__
#define __P(x) x
#else
#define __P(x) ()
#endif
# undef __P
# if defined (__STDC__) && __STDC__
# define __P(x) x
# else
# define __P(x) ()
# endif
int
setenv __P ((const char *name, const char *value, int replace));

View File

@@ -12,11 +12,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* David MacKenzie <djm@ai.mit.edu> */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/time.h>

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -11,20 +11,20 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
# include <string.h>
#else
#include <strings.h>
#ifndef strchr
#define strchr index
#endif
# include <strings.h>
# ifndef strchr
# define strchr index
# endif
#endif
/* Return the length of the maximum inital segment of S

View File

@@ -12,8 +12,12 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef STDC_HEADERS
#include <string.h>
@@ -23,10 +27,6 @@ char *malloc ();
char *strcpy ();
#endif
#if !__STDC__
#define const
#endif
/* Return a newly allocated copy of STR,
or 0 if out of memory. */

View File

@@ -77,7 +77,11 @@ USA. */
#endif
#endif
static unsigned int week __P((const struct tm *const, int, int));
/* Uncomment following line in the production version. */
/* #define NDEBUG */
#include <assert.h>
static unsigned int week __P ((const struct tm *const, int, int));
#define add(n, f) \
@@ -93,7 +97,7 @@ static unsigned int week __P((const struct tm *const, int, int));
p += (n); \
} \
} while (0)
#define cpy(n, s) add((n), memcpy((PTR) p, (PTR) (s), (n)))
#define cpy(n, s) add ((n), memcpy((PTR) p, (PTR) (s), (n)))
#ifdef _LIBC
#define fmt(n, args) add((n), if (sprintf args != (n)) return 0)
@@ -189,8 +193,8 @@ strftime (s, maxsize, format, tp)
size_t am_len = 3;
size_t ap_len = 2;
#endif
size_t wkday_len = strlen(f_wkday);
size_t month_len = strlen(f_month);
size_t wkday_len = strlen (f_wkday);
size_t month_len = strlen (f_month);
const unsigned int y_week0 = week (tp, 0, 7);
const unsigned int y_week1 = week (tp, 1, 7);
const unsigned int y_week2 = week (tp, 1, 3);
@@ -230,10 +234,10 @@ strftime (s, maxsize, format, tp)
const char *subfmt;
#if HAVE_MBLEN
if (!isascii(*f))
if (!isascii (*f))
{
/* Non-ASCII, may be a multibyte. */
int len = mblen(f, strlen(f));
int len = mblen (f, strlen (f));
if (len > 0)
{
cpy(len, f);
@@ -244,7 +248,7 @@ strftime (s, maxsize, format, tp)
if (*f != '%')
{
add(1, *p = *f);
add (1, *p = *f);
continue;
}
@@ -270,24 +274,24 @@ strftime (s, maxsize, format, tp)
{
case '\0':
case '%':
add(1, *p = *f);
add (1, *p = *f);
break;
case 'a':
cpy(aw_len, a_wkday);
cpy (aw_len, a_wkday);
break;
case 'A':
cpy(wkday_len, f_wkday);
cpy (wkday_len, f_wkday);
break;
case 'b':
case 'h': /* GNU extension. */
cpy(am_len, a_month);
cpy (am_len, a_month);
break;
case 'B':
cpy(month_len, f_month);
cpy (month_len, f_month);
break;
case 'c':
@@ -301,14 +305,14 @@ strftime (s, maxsize, format, tp)
size_t len = strftime (p, maxsize - i, subfmt, tp);
if (len == 0 && *subfmt)
return 0;
add(len, );
add (len, ;);
}
break;
#define DO_NUMBER(digits, value) \
maxdigits = digits; number_value = value; goto do_number
#define DO_NUMBER_NOPAD(digits, value) \
maxdigits = digits; number_value = value; goto do_number_nopad
#define DO_NUMBER_SPACEPAD(digits, value) \
maxdigits = digits; number_value = value; goto do_number_spacepad
case 'C':
DO_NUMBER (2, (1900 + tp->tm_year) / 100);
@@ -327,21 +331,21 @@ strftime (s, maxsize, format, tp)
DO_NUMBER (2, tp->tm_mday);
case 'e': /* GNU extension: %d, but blank-padded. */
DO_NUMBER_NOPAD (2, tp->tm_mday);
DO_NUMBER_SPACEPAD (2, tp->tm_mday);
/* All numeric formats set MAXDIGITS and NUMBER_VALUE and then
jump to one of these two labels. */
do_number_nopad:
/* Force `-' flag. */
pad = pad_none;
do_number_spacepad:
/* Force `_' flag. */
pad = pad_space;
do_number:
{
/* Format the number according to the PAD flag. */
register char *nf = &number_fmt[1];
int printed;
int printed = maxdigits;
switch (pad)
{
@@ -360,6 +364,9 @@ strftime (s, maxsize, format, tp)
add (maxdigits, sprintf (p, number_fmt, number_value);
printed = strlen (p));
#endif
/* Back up if fewer than MAXDIGITS chars written for pad_none. */
p -= maxdigits - printed;
i -= maxdigits - printed;
break;
}
@@ -372,10 +379,10 @@ strftime (s, maxsize, format, tp)
DO_NUMBER (2, hour12);
case 'k': /* GNU extension. */
DO_NUMBER_NOPAD (2, tp->tm_hour);
DO_NUMBER_SPACEPAD (2, tp->tm_hour);
case 'l': /* GNU extension. */
DO_NUMBER_NOPAD (2, hour12);
DO_NUMBER_SPACEPAD (2, hour12);
case 'j':
DO_NUMBER (3, 1 + tp->tm_yday);
@@ -391,7 +398,7 @@ strftime (s, maxsize, format, tp)
break;
case 'p':
cpy(ap_len, ampm);
cpy (ap_len, ampm);
break;
case 'R': /* GNU extension. */
@@ -405,17 +412,38 @@ strftime (s, maxsize, format, tp)
case 'S':
DO_NUMBER (2, tp->tm_sec);
case 's': /* GNU extension. */
{
struct tm writable_tm = *tp;
unsigned long int num = (unsigned long int) mktime (&writable_tm);
/* `3 * sizeof (unsigned long int)' is an approximation of
the size of the decimal representation of NUM, valid
for sizes <= 16. */
int printed = 3 * sizeof (unsigned long int);
maxdigits = printed;
assert (sizeof (unsigned long int) <= 16);
#ifdef _LIBC
add (maxdigits, printed = sprintf (p, "%lu", num));
#else
add (maxdigits, sprintf (p, "%lu", num); printed = strlen (p));
#endif
/* Back up if fewer than MAXDIGITS chars written for pad_none. */
p -= maxdigits - printed;
i -= maxdigits - printed;
}
break;
case 'X':
#ifdef _NL_CURRENT
subfmt = _NL_CURRENT (LC_TIME, T_FMT);
goto subformat;
#endif
/* Fall through. */
case 'T': /* GNU extenstion. */
case 'T': /* GNU extension. */
subfmt = "%H:%M:%S";
goto subformat;
case 't': /* GNU extenstion. */
case 't': /* GNU extension. */
add (1, *p = '\t');
break;
@@ -441,8 +469,46 @@ strftime (s, maxsize, format, tp)
cpy(zonelen, zone);
break;
case 'z':
{
struct tm tml = *tp;
time_t t = mktime (&tml);
struct tm tmg;
int diff;
tml = *localtime (&t); /* Canonicalize the local time. */
tmg = *gmtime (&t);
/* Compute the difference. */
diff = tml.tm_min - tmg.tm_min;
diff += 60 * (tml.tm_hour - tmg.tm_hour);
if (tml.tm_mon != tmg.tm_mon)
{
/* We assume no timezone differs from UTC by more than
+- 23 hours. This should be safe. */
if (tmg.tm_mday == 1)
tml.tm_mday = 0;
else /* tml.tm_mday == 1 */
tmg.tm_mday = 0;
}
diff += 1440 * (tml.tm_mday - tmg.tm_mday);
if (diff < 0)
{
add (1, *p = '-');
diff = -diff;
}
else
add (1, *p = '+');
pad = pad_zero;
DO_NUMBER (4, ((diff / 60) % 24) * 100 + diff % 60);
}
default:
/* Bad format. */
add (1, *p = *f);
break;
}
}

View File

@@ -12,13 +12,17 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if defined(STDC_HEADERS) || defined(USG)
#include <string.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
# include <string.h>
#else
#include <strings.h>
# include <strings.h>
#endif
/* Remove trailing slashes from PATH.

View File

@@ -14,13 +14,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdio.h>
#include <sys/types.h>
#ifdef STDC_HEADERS
# include <string.h>
# include <stdlib.h>

View File

@@ -13,8 +13,8 @@
GNU General Public License for more details.
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. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@@ -1,49 +1,116 @@
/* strstr.c -- return the offset of one string within another
Copyright (C) 1989, 1990 Free Software Foundation, Inc.
/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Author:
Mike Rendell Department of Computer Science
michael@garfield.mun.edu Memorial University of Newfoundland
..!uunet!garfield!michael St. John's, Nfld., Canada
(709) 737-4550 A1C 5S7
*/
/*
* My personal strstr() implementation that beats most other algorithms.
* Until someone tells me otherwise, I assume that this is the
* fastest implementation of strstr() in C.
* I deliberately chose not to comment it. You should have at least
* as much fun trying to understand it, as I had to write it :-).
*
* Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
/* Return the starting address of string S2 in S1;
return 0 if it is not found. */
#include <string.h>
#include <sys/types.h>
typedef unsigned chartype;
char *
strstr (s1, s2)
char *s1;
char *s2;
strstr (phaystack, pneedle)
const char *phaystack;
const char *pneedle;
{
int i;
char *p1;
char *p2;
char *s = s1;
register const unsigned char *haystack, *needle;
register chartype b, c;
for (p2 = s2, i = 0; *s; p2 = s2, i++, s++)
haystack = (const unsigned char *) phaystack;
needle = (const unsigned char *) pneedle;
b = *needle;
if (b != '\0')
{
for (p1 = s; *p1 && *p2 && *p1 == *p2; p1++, p2++)
;
if (!*p2)
break;
}
if (!*p2)
return s1 + i;
haystack--; /* possible ANSI violation */
do
{
c = *++haystack;
if (c == '\0')
goto ret0;
}
while (c != b);
c = *++needle;
if (c == '\0')
goto foundneedle;
++needle;
goto jin;
for (;;)
{
register chartype a;
register const unsigned char *rhaystack, *rneedle;
do
{
a = *++haystack;
if (a == '\0')
goto ret0;
if (a == b)
break;
a = *++haystack;
if (a == '\0')
goto ret0;
shloop: }
while (a != b);
jin: a = *++haystack;
if (a == '\0')
goto ret0;
if (a != c)
goto shloop;
rhaystack = haystack-- + 1;
rneedle = needle;
a = *rneedle;
if (*rhaystack == a)
do
{
if (a == '\0')
goto foundneedle;
++rhaystack;
a = *++needle;
if (*rhaystack != a)
break;
if (a == '\0')
goto foundneedle;
++rhaystack;
a = *++needle;
}
while (*rhaystack == a);
needle = rneedle; /* took the register-poor aproach */
if (a == '\0')
break;
}
}
foundneedle:
return (char*) haystack;
ret0:
return 0;
}

View File

@@ -11,8 +11,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -108,12 +108,12 @@ extern int errno;
#else
# define LONG long
#ifndef ULONG_MAX
# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
#endif
#ifndef LONG_MAX
# define LONG_MAX ((long int) (ULONG_MAX >> 1))
#endif
# ifndef ULONG_MAX
# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
# endif
# ifndef LONG_MAX
# define LONG_MAX ((long int) (ULONG_MAX >> 1))
# endif
#endif
#ifdef USE_WIDE_CHAR
@@ -342,9 +342,9 @@ noconv:
#undef __P
#if defined (__STDC__) && __STDC__
#define __P(args) args
# define __P(args) args
#else
#define __P(args) ()
# define __P(args) ()
#endif
/* Prototype. */

View File

@@ -1,21 +1,22 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
The GNU C Library is distributed in the hope that it will be useful,
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define UNSIGNED 1
#include "strtol.c"
#include <strtol.c>

View File

@@ -12,8 +12,8 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */

View File

@@ -12,20 +12,13 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie, djm@gnu.ai.mit.edu. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
#ifdef HAVE_CONFIG_H
#if defined (CONFIG_BROKETS)
/* We use <config.h> instead of "config.h" so that a compilation
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
(which it would do because it found this file in $srcdir). */
#include <config.h>
#else
#include "config.h"
#endif
# include <config.h>
#endif
#include <stdio.h>
@@ -36,9 +29,9 @@ extern int errno;
#include <sys/types.h>
#include "pathmax.h"
#if !defined(_POSIX_VERSION) && !defined(HAVE_GETCWD)
#ifndef HAVE_GETCWD
char *getwd ();
#define getcwd(buf, max) getwd (buf)
# define getcwd(buf, max) getwd (buf)
#else
char *getcwd ();
#endif

View File

@@ -12,13 +12,13 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jim Meyering, meyering@comco.com */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <sys/types.h>
@@ -28,7 +28,7 @@ char *xmalloc ();
char *xrealloc ();
#ifndef INITIAL_HOSTNAME_LENGTH
#define INITIAL_HOSTNAME_LENGTH 33
# define INITIAL_HOSTNAME_LENGTH 33
#endif
char *

View File

@@ -12,23 +12,23 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#if __STDC__
#define VOID void
# define VOID void
#else
#define VOID char
# define VOID char
#endif
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
# include <stdlib.h>
#else
VOID *malloc ();
VOID *realloc ();
@@ -44,7 +44,7 @@ void free ();
#endif
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
# define EXIT_FAILURE 1
#endif
/* Exit value when the requested amount of memory is not available.

View File

@@ -12,10 +12,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if defined(USG) || defined(STDC_HEADERS)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
#else
#include <strings.h>

View File

@@ -18,11 +18,11 @@
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#ifdef STDC_HEADERS
#include <stdlib.h>
# include <stdlib.h>
#else
double strtod ();
#endif

View File

@@ -1,13 +1,13 @@
#ifndef XSTRTOD_H
#define XSTRTOD_H 1
# define XSTRTOD_H 1
#ifndef __P
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
# define __P(args) args
# else
# define __P(args) ()
# endif /* GCC. */
#endif /* Not __P. */
# ifndef __P
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
# define __P(args) args
# else
# define __P(args) ()
# endif /* GCC. */
# endif /* Not __P. */
int
xstrtod __P ((const char *str, const char **ptr, double *result));

View File

@@ -1,7 +1,7 @@
#ifndef _xstrtoul_h_
#define _xstrtoul_h_ 1
# define _xstrtoul_h_ 1
#define STRING_TO_UNSIGNED 1
#include "xstrtol.h"
# define STRING_TO_UNSIGNED 1
# include "xstrtol.h"
#endif /* _xstrtoul_h_ */

View File

@@ -12,26 +12,41 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ctype.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#include <stdio.h>
/* Read one line from standard input
and return nonzero if that line begins with y or Y,
otherwise return 0. */
int rpmatch ();
int
yesno ()
{
/* We make some assumptions here:
a) leading white space in the response are not vital
b) the first 128 characters of the answer are enough (the rest can
be ignored)
I cannot think for a situation where this is not ok. --drepper@gnu */
char buf[128];
int len = 0;
int c;
int rv;
fflush (stderr);
c = getchar ();
rv = (c == 'y') || (c == 'Y');
while (c != EOF && c != '\n')
c = getchar ();
while ((c = getchar ()) != EOF && c != '\n')
if ((len > 0 && len < 127) || (len == 0 && !isspace (c)))
buf[len++] = c;
buf[len] = '\0';
return rv;
return rpmatch (buf) == 1;
}

View File

@@ -1,3 +1,313 @@
Mon Sep 2 10:59:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* POTFILES.in: Add lib/rpmatch.c.
* lib/rpmatch.c (ENABLE_NLS): Include libintl.h and define _ to
gettext.
* src/*.c (usage): Tell where to report bugs.
Sat Aug 31 18:48:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/touch.c (utime_now): Protoize.
Reported by David S. Miller (davem@caip.rutgers.edu).
Sun Aug 25 22:43:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (AM_FUNC_MKTIME): New macro.
* configure.in (AM_FUNC_MKTIME): Use it.
(AC_REPLACE_FUNCS): Remove mktime.
Wed Aug 21 23:17:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
Automake includes them automatically.
* configure.in (AM_INIT_AUTOMAKE): Use it.
(AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
(AC_PROG_MAKE_SET): Likewise.
Sun Aug 18 09:52:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with
AM_ prefix for latest automake/aclocal.
* lib/Makefile.am (noinst_HEADERS): Add path-concat.h.
(fu_SOURCES): Add path-concat.c.
* src/mv.c: Include path-concat.h.
(movefile): Use path_concat instead of open-coding its functionality.
Declare pointer parameters const as appropriate.
* src/cp.c: Include path-concat.h.
(do_copy): Check path_concat return value.
(path_concat): Remove function.
* lib/path-concat.h: New file.
* lib/path-concat.c (path_concat): New file. Just like the function
from cp.c except the stand-alone version uses malloc instead of
xmalloc.
* configure.in (ALL_LINGUAS): Add Dutch (nl).
Fri Aug 16 21:59:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chgrp.c (parse_group): Don't abort when given a group number
larger than INT_MAX. Fix bug whereby root could run
`chgrp INVALID-GROUP FILE' and it wouldn't fail, but rather would
change FILE's group to some indeterminate value. This problem
was reported as Debian Bug#4119 via Erick Branderhorst
(branderh@IAEhv.nl).
Declare pointer parameters const as appropriate.
Thu Aug 1 22:12:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h (ST_NBLOCKS) [_CRAY]: Special case for Cray.
* lib/fsusage.c (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define
f_bavail to f_bfree.
From Johan Danielsson.
Wed Jul 31 23:39:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ln.c [LINK_TYPE]: Remove macro. NLS messages aren't
extracted from macros. Reported by Santiago Vila.
(link_type_string): New global variable to be used instead of
LINK_TYPE.
(main): Set it here.
(do_link): Use it (instead of macro) here.
Tue Jul 30 23:24:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_CHECK_HEADERS): Add sys/fs/s5param.h.
* lib/fsusage.c [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
to work around bug in sys/filsys.h of Fujitsu UXP/V.
From by Johan Danielsson.
* src/cp.c (DO_CHOWN): New macro -- derived from code in copy.
(copy): Use DO_CHOWN to assure that any newly-created symbolic
links have proper owner and group.
Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
redefinition warnings on solaris.
(textdomain) [!ENABLE_NLS]: Likewise.
Thu Jul 25 21:10:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chgrp.c (main): Fix typo in getopt_long string: s/n/h/.
Reported by Ken Pizzini.
Wed Jul 24 22:24:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (usage): Remove -h. It is not an option.
Reported by Ulrich Drepper.
Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_CHECK_HEADERS): Add sys/timeb.h for lib/getdate.y.
This was a problem for SCO OSR5. From Bela Lubkin <belal@sco.com>.
(statvfs test): Arrange for this test to fail (as it should) for
SCO OSR5. Suggestion from Bela Lubkin.
* src/Makefile.am (BUILT_SOURCES): Remove @MAINT@.
(dircolors.h): Remove @MAINT@. These prevented `make distcheck'
from working sometimes.
* lib/yesno.c (yesno) [!HAVE_RPMATCH]: Remove function since we'll
always use the rpmatch-based version.
Declare rpmatch.
* lib/rpmatch.c [STDC_HEADERS]: Guard inclusion of stdlib.h.
(_) [!_]: Define it.
(try): Add RESPONSE parameter.
(rpmatch): Update caller.
Anchor regular expressions to beginning of string.
* configure.in (AC_CHECK_FUNCS): Don't check rpmatch.
* acconfig.h (HAVE_OBSTACK): Undef it.
The following is from Ulrich Drepper.
* configure.in (AC_REPLACE_FUNCS): Add rpmatch.
* lib/Makefile.am (EXTRA_DIST): Add rpmatch.c.
* lib/rpmatch.c: New file.
* lib/yesno.c (yesno): New rpmatch-based version of the function.
* config.h.in (HAVE_RPMATCH): Undef it.
* lib/Makefile.am (EXTRA_DIST): Put error.c and obstack.c here...
(fu_SOURCES): Instead of here.
* configure.in (AC_CHECK_FUNCS): Add rpmatch.
Add checks for error_at_line and obstacks so systems with GNU libc
don't compile and link with distributed error.c and obstack.c.
* configure.in (AC_REPLACE_FUNCS): Replace getline.c.
Add related check for the getdelim function. As done in gettext.
Sat Jul 20 17:01:56 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (fu_SOURCES): Remove error.c, and obstack.c.
(EXTRA_DIST): Add error.c, and obstack.c.
* configure.in (PACKAGE_VERSION): Use space instead of hyphen to
separate PACKAGE and VERSION.
Fri Jul 19 23:28:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/cp.c (path_concat): Rewrite to return new parameter.
(do_copy): Update uses of path_concat to use new parameter.
Use that new pointer to compute correct offset for make_path_private.
Before, cp --recursive --parents SRC DEST failed when SRC was
an absolute file name. E.g.,
% cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d
cp: tmp: No such file or directory
Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
Thu Jul 18 21:58:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/install.c [_AIX]: Add #pragma alloca.
From Bernd Leibing <bernd.leibing@rz.uni-ulm.de>.
* src/chgrp.c (main): Initialize for internationalized message support:
call setlocale, bindtextdomain, and textdomain. Reported by
Michel Robitaille <robitail@IRO.UMontreal.CA>.
Wed Jul 17 22:37:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add polish (pl).
Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Many files: Update FSF address.
Sun Jul 14 07:53:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/du.c (usage): Sort option descriptions in dictionary order.
Sat Jul 13 07:34:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (long_options): Add missing last line of NULL
entries. From Ralph Loader <loader@maths.ox.ac.uk>.
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.
From Marcus Daniels.
Thu Jul 4 12:34:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dd.c (usage): Remove space before newline in usage message.
* src/mknod.c (usage): Likewise.
* src/mv.c (usage): Likewise.
* src/Makefile.am (libexec_PROGRAMS): Regenerate using patched
automake-1.0 to work around rm -f bug on Solaris2.4.
Reported by Kaveh Ghazi.
* src/ls.c: Make `dir --version' and `vdir --version' print their
names, not `ls'.
Reported by Ulrich Drepper.
Wed Jul 3 17:41:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c: Include sys/types.h before system.h.
From Jim Blandy (jimb@cyclic.com).
* src/chgrp.c [!MAXUID]: Define after inclusion of system.h to avoid
warning about redefinition on SunOS4, Solaris2.4 and SGI-irix5.3.
From Kaveh Ghazi. Also, Santiago Vila Doncel reported that defining
MAXUID before including system.h caused a compilation failure on some
ConvexOS system.
Tue Jul 2 22:56:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (VERSION): Bump to 3.12q.
* src/system.h [!EXIT_SUCCESS]: Define it.
[!EXIT_FAILURE]: Define it.
* lib/strndup.c (strndup): Include stdio.h and sys/types.h to
get definition of NULL and size_t on SunOS4.1.3.
Mon Jul 1 23:47:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ln.c (do_link): Update messages to ease translation.
@@ -6,7 +316,7 @@ Mon Jul 1 23:47:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
Sun Jun 30 16:41:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/install.c (usage): Fix typo, 3nd->3rd, in usage message.
From Santiago Vila <sanvila@unex.es>.
From Santiago Vila Doncel.
Sat Jun 29 00:33:31 1996 Jim Meyering <meyering@na-net.ornl.gov>

View File

@@ -1,8 +1,16 @@
Changes in release 3.14:
* chgrp no longer aborts when given a group number larger than INT_MAX
* chgrp now fails when run by root with an unrecognized group name
* when possible, cp -p preserves owner/group even on symlinks in case
they're in a directory that has the sticky-bit set.
* cp --recursive --parents SRC DEST works when SRC is an absolute file name.
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,
@@ -10,16 +18,16 @@ Changes in release 3.13:
* uses automake-generated Makefile templates
* chown and chgrp accept new option --no-dereference (-h)
* ln -f FILE FILE fails with a diagnostic rather than silently removing FILE
* when building on systems that have getopt_long (like Linux), the system-
provided function will be used -- so executables may be a little smaller
* when building on systems that have getopt_long (most GNU-oriented ones),
the system-provided function will be used -- so executables may be a
little smaller
* cp -p, and mv modify owner and/or group of symlinks on systems
(like Solaris) that provide the lchown system call.
* df no longer invokes the sync system call by default. You can use the
--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

View File

@@ -1,3 +1,149 @@
Mon Sep 2 10:52:55 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/*.c (usage): Tell where to report bugs.
Sun Sep 1 07:56:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_FUNC_MKTIME): Use it.
(AC_REPLACE_FUNCS): Remove mktime.
(AM_INIT_AUTOMAKE): Use it.
(AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
(AC_PROG_MAKE_SET): Likewise.
(jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with
AM_ prefix for latest automake/aclocal.
* Makefile.am (EXTRA_DIST): Add acinclude.m4.
* acinclude.m4: New file -- derived from aclocal.m4.
* aclocal.m4: This file is now generated by the aclocal program
(which comes with the automake package.)
Sat Aug 17 00:14:55 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/strftime.c: Update from GNU libc -- this adds back %z and %s
formats and reverts to old behavior where unrecognized format like
%E is treated as eqivalent to `E'.
Sun Aug 4 09:14:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* checks/: New directory.
* checks/Makefile.am: New file.
* checks/nice: New file. Derived from tests from Eric Backus.
* configure.in (AC_OUTPUT): Add new directory: checks.
* Makefile.am (SUBDIRS): Likewise.
* src/nice.c (main): Allow `+' in options like -+8 and -+13.
Fri Aug 2 21:45:06 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/nice.c (main): Set minus_flag to zero in two places.
Otherwise, `nice --1 -3' would mistakenly do the equivalent of
`nice --3'. Thanks to Eric Backus <ericb@lsid.hp.com> for the
test cases.
* configure.in (check for /proc/uptime): New check.
* acconfig.h (SAVE_PROC_UPTIME): #undef it. Reorder so symbols
are sorted again.
*src/who-users.c (print_uptime) [HAVE_PROC_UPTIME]: Read from
/proc/uptime.
From Ulrich Drepper.
Thu Aug 1 22:38:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_GNU_GETOPT): No longer use it.
It isn't necessary because the cpp-time checks of getopt.c and
getopt1.c are at least as good.
* lib/Makefile.am (EXTRA_DIST): Remove getopt.c and getopt1.c.
(su_SOURCES): Add getopt.c and getopt1.c
This reverts much of the April 23 change.
Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
redefinition warnings on solaris.
(textdomain) [!ENABLE_NLS]: Likewise.
Sun Jul 21 09:47:55 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Replace getline.c.
Add related check for the getdelim function.
From Ulrich Drepper -- as done in gettext.
* src/stty.c (usage): Correct typo (-iucl -> -iuclc) in usage message.
From Thomas Olsson <d95to@efd.lth.se>.
Sat Jul 20 17:01:56 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Use space instead of hyphen to
separate PACKAGE and VERSION.
Wed Jul 17 23:13:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chroot.c: Include <sys/types.h> before system.h.
* src/seq.c: Likewise.
* src/yes.c: Likewise.
From Arne Juul.
Tue Jul 16 00:06:33 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/strftime.c (strftime): Use `(void)0' as second arg to add macro.
Omitting that second arg made some HPUX C compiler report an error.
From Kaveh R. Ghazi.
Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/who-users.c (print_uptime): Reverse `days' and `day' in
uptime message. From Kaveh R. Ghazi.
* Many files: Update FSF address.
Sun Jul 14 20:05:34 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/who-users.c (print_uptime): Use 0, not undefined errno in
couldn't-get-boot-time diagnostic. From Ulrich Drepper.
Sat Jul 13 14:22:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chroot.c (usage): Add a `\' after `\n' in usage message.
Otherwise, SunOS's /bin/cc chokes.
* src/stty.c [GWINSZ_BROKEN]: Remove thus-guarded `#undef TIOCGWINSZ'.
GWINSZ_BROKEN can't be defined anymore.
* configure.in (boot time test): Use AC_EGREP_CPP instead of
AC_EGREP_HEADER; #endif, instead of #fi.
(AM_SYS_POSIX_TERMIOS, AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use
these macros instead of the tests from which they were derived.
($am_cv_sys_posix_termios): Renamed to have am_ prefix instead of su_.
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.
Sat Jun 29 18:58:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see

View File

@@ -1,7 +1,217 @@
Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/*.c (usage): Tell where to report bugs.
Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
* checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
($x-tests): Guard dependencies with @MAINT@.
* checks/tr-test/Makefile.am: Likewise.
Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.
Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add polish (pl).
Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
* checks/Makefile.am (SUBDIRS): Add sort-test.
Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (EXTRA_DIST): Add acinclude.m4.
Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
Automake includes them automatically.
* configure.in (AM_INIT_AUTOMAKE): Use it.
(AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this.
(AC_PROG_MAKE_SET): Likewise.
Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Rename a few macros for automake-1.1c.
(AC_REPLACE_GNU_GETOPT): Remove.
(AC_PATH_PROG): Find perl -- needed only for checks if you
change or remove things with e.g. make maintainerclean.
* lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX
adds .o files to @LIBOBJ@.
(tu_SOURCES): Add getopt.c and getopt1.c.
(EXTRA_DIST): Remove getopt.c and getopt1.c.
* acinclude.m4: New file -- derived from aclocal.m4.
* aclocal.m4: This file is now generated by the aclocal program
(which comes with the automake package.)
Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* checks/: New directory.
* checks/Makefile.am: New file.
* configure.in (AC_OUTPUT): Add new directories: checks,
checks/tr-test.
* Makefile.am (SUBDIRS): Likewise.
Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
redefinition warnings on solaris.
(textdomain) [!ENABLE_NLS]: Likewise.
Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/unexpand.c (unexpand): Move EOF check to follow code that
processes and generates output for pending spaces. Before
`printf ' ' |unexpand -t 1,2' generated no output.
* src/md5sum.c (md5_check): Remove parameter, BINARY.
Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
from the input stream rather than the one from the command line.
(main): Fail with a diagnostic if --binary or --text is specified
when verifying checksums.
Reported by Eli Zaretskii <eliz@is.elta.co.il>.
Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Add check for error_at_line so systems with
GNU libc don't compile and link with distributed error.c.
* lib/Makefile.am (tu_SOURCES): Remove error.c.
(EXTRA_DIST): Add error.c.
* configure.in (AC_REPLACE_FUNCS): Replace getline.c.
Add related check for the getdelim function.
From Ulrich Drepper -- as done in gettext.
Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Use space instead of hyphen to
separate PACKAGE and VERSION.
* aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from
macros from Bruno Haible and from Cygnus.
* configure.in (AM_SANITY_CHECK_CC): Use it.
Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* install-sh: Get version with MIT copyright.
Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* aclocal.m4 (fp_C_PROTOTYPES): Improved version from
François Pinard.
Update all other macros to reference $fp_cv_prog_cc_stdc, rather
than $ac_cv_prog_cc_stdc.
* src/od.c (OFF_T_MAX): Remove definition.
(main): Compare against LONG_MAX rather than OFF_T_MAX.
Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Many files: Update FSF address.
Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/unexpand.c (unexpand): Fix bug that contributed to endless loop
when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not
tab_index in inner flush_pend: while loop. From Keith Owens
<kaos@audio.apana.org.au>.
* src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
[!INT_MAX]: Define it.
(main): Append INT_MAX to command-line-specified tab list to
ensure termination in unexpand's inner loop.
Derived from a patch from Keith Owens.
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.
* ABOUT-NLS: Likewise.
* intl/*: Likewise.
* aclocal.m4: Likewise.
Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/uniq.c (usage): Remove space before newline in usage message.
* src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
[NEWLINE_REPLACEMENT_STRING*]: Remove macros.
(main): Output a leading backslash for a line describing a file
whose name contains a newline. Then translate each NEWLINE byte
in the file name to the string, "\\n", and each backslash to "\\\\".
File names that don't contain NEWLINE aren't translated.
(split_3): Rewrite to handle file names with embedded newlines.
Miles Bader and Jim Blandy suggested this new encoding scheme.
* src/md5sum.c (md5_file): Replace obsolete comment with a description
of the function.
(md5_check): Don't use "s"-adding trick to form the plural of
`checksum.' That doesn't work well with translation.
Suggestions from Ulrich Drepper.
(split_3): Add missing semicolon so it compiles. From Jim Blandy.
Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
fact that leading blanks may be stripped.
Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (ALL_LINGUAS): Add dutch (nl).
Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
(split_3): Translate NL bytes not to NUL, but to
NEWLINE_REPLACEMENT_STRING.
Suggested by Ulrich Drepper.
(main): Translate back to NL-containing filename.
Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (split_3): Take an additional parameter, S_LEN.
Adapt caller.
Map translated NEWLINE-containing filename back into the original
NEWLINE-containing name.
(md5_check): Translate NEWLINE bytes to NUL bytes in filename.
Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see
it in the output of --version. Reported by RMS.
* configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
appears in the output of --version. Reported by RMS.
Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov>

View File

@@ -1,3 +1,16 @@
Changes in release 1.20
* update configuration system to use automake's aclocal program
* configure performs sanity check on CC and CFLAGS to avoid a misleading
failure that suggested cross-compiling was the cause
* distribute test suites for tr, sort (more will be integrated soon)
* unexpand no longer gets in endless loop
* when verifying checksums, md5sum uses the binary mode flag from the
input stream rather than the one from the command line
Changes in release 1.19
* md5sum can verify digests of files with names containing newline characters
* update from gettext-0.10.20.
Changes in release 1.18
* when building sort, link with -lm on systems that use the replacement strtod
* update from gettext-0.10.17.

View File

@@ -35,6 +35,7 @@ subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
CC = @CC@
GENCAT = @GENCAT@
@@ -119,9 +120,15 @@ stamp-cat-id: $(PACKAGE).pot
install: install-exec install-data
install-exec:
install-data: all
$(top_srcdir)/mkinstalldirs $(datadir)
catalogs='$(CATALOGS)'; \
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(datadir); \
else \
$(top_srcdir)/mkinstalldirs $(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
@@ -129,29 +136,43 @@ install-data: all
esac; \
lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
$(top_srcdir)/mkinstalldirs $$dir; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
$(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "gettext"; then \
$(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(gettextsrcdir); \
else \
$(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
fi; \
cd $(srcdir) && \
$(INSTALL_DATA) Makefile.in.in $(gettextsrcdir)/Makefile.in.in; \
else \
true; \
: ; \
fi
# Define this as empty until I found a useful application.

View File

@@ -59,6 +59,7 @@ If specified, also remove a trailing SUFFIX.\n\
--help display this help and exit\n\
--version output version information and exit\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
}
exit (status);
}

View File

@@ -104,6 +104,7 @@ Concatenate FILE(s), or standard input, to standard output.\n\
\n\
With no FILE, or when FILE is -, read standard input.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -347,7 +348,8 @@ cat (
if (numbers && numbers_at_empty_lines)
{
next_line_num ();
bpout = (unsigned char *) stpcpy (bpout, line_num_print);
bpout = (unsigned char *) stpcpy ((char *) bpout,
line_num_print);
}
}
@@ -369,7 +371,7 @@ cat (
if (newlines >= 0 && numbers)
{
next_line_num ();
bpout = (unsigned char *) stpcpy (bpout, line_num_print);
bpout = (unsigned char *) stpcpy ((char *) bpout, line_num_print);
}
/* Here CH cannot contain a newline character. */

View File

@@ -35,14 +35,15 @@
# define INT_MAX ((int) (UINT_MAX >> 1))
#endif
#ifndef MAXUID
# define MAXUID INT_MAX
#endif
#include "system.h"
#include "xstrtoul.h"
#include "error.h"
/* MAXUID may come from limits.h *or* sys/params.h (via system.h) above. */
#ifndef MAXUID
# define MAXUID INT_MAX
#endif
#ifndef _POSIX_VERSION
struct group *getgrnam ();
#endif
@@ -62,7 +63,8 @@ char *savedir ();
char *xmalloc ();
char *xrealloc ();
static int change_dir_group __P ((char *dir, int group, struct stat *statp));
static int change_dir_group __P ((const char *dir, int group,
const struct stat *statp));
/* The name the program was run with. */
char *program_name;
@@ -84,7 +86,7 @@ static int verbose;
static int changes_only;
/* The name of the group to which ownership of the files is being given. */
static char *groupname;
static const char *groupname;
/* If nonzero, display usage information and exit. */
static int show_help;
@@ -109,7 +111,7 @@ static struct option const long_options[] =
has been given; if CHANGED is zero, FILE was that group already. */
static void
describe_change (char *file, int changed)
describe_change (const char *file, int changed)
{
if (changed)
printf (_("group of %s changed to %s\n"), file, groupname);
@@ -120,7 +122,7 @@ describe_change (char *file, int changed)
/* Set *G according to NAME. */
static void
parse_group (char *name, int *g)
parse_group (const char *name, int *g)
{
struct group *grp;
@@ -134,12 +136,17 @@ parse_group (char *name, int *g)
strtol_error s_err;
unsigned long int tmp_long;
if (!ISDIGIT (*name))
error (1, 0, _("invalid group name `%s'"), name);
s_err = xstrtoul (name, NULL, 0, &tmp_long, NULL);
if (s_err != LONGINT_OK)
STRTOL_FATAL_ERROR (name, _("group number"), s_err);
if (tmp_long > INT_MAX)
error (1, 0, _("invalid group number `%s'"), name);
*g = tmp_long;
if (s_err == LONGINT_OVERFLOW || tmp_long > INT_MAX)
{
STRTOL_FATAL_ERROR (name, _("group number"), s_err);
}
}
else
*g = grp->gr_gid;
@@ -151,7 +158,7 @@ parse_group (char *name, int *g)
Return 0 if successful, 1 if errors occurred. */
static int
change_file_group (char *file, int group)
change_file_group (const char *file, int group)
{
struct stat file_stats;
int errors = 0;
@@ -213,7 +220,7 @@ change_file_group (char *file, int group)
Return 0 if successful, 1 if errors occurred. */
static int
change_dir_group (char *dir, int group, struct stat *statp)
change_dir_group (const char *dir, int group, const struct stat *statp)
{
char *name_space, *namep;
char *path; /* Full path of each entry to process. */
@@ -278,7 +285,9 @@ Change the group membership of each FILE to GROUP.\n\
-v, --verbose output a diagnostic for every file processed\n\
-R, --recursive change files and directories recursively\n\
--help display this help and exit\n\
--version output version information and exit\n"));
--version output version information and exit\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -291,9 +300,13 @@ main (int argc, char **argv)
int optc;
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
recurse = force_silent = verbose = changes_only = 0;
while ((optc = getopt_long (argc, argv, "Rcfnv", long_options, (int *) 0))
while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, (int *) 0))
!= EOF)
{
switch (optc)

Some files were not shown because too many files have changed in this diff Show More