Compare commits

...

442 Commits

Author SHA1 Message Date
Jim Meyering
7d72c942bb . 1996-12-12 01:34:44 +00:00
Jim Meyering
f17cc2e29c . 1996-12-12 01:34:08 +00:00
Jim Meyering
4f4111709c . 1996-12-12 01:33:13 +00:00
Jim Meyering
beed39a03c . 1996-12-11 06:08:42 +00:00
Jim Meyering
d5f09a0fd1 . 1996-12-11 05:38:45 +00:00
Jim Meyering
3692f57123 . 1996-12-11 04:49:30 +00:00
Jim Meyering
d3d5565035 [_POSIX_VERSION]: Don't declare wait. That declaration
conflicted with the one on i386-pc-isc3.0, now that I've removed the
AC_ISC_POSIX macro and _POSIX_VERSION is no longer defined.
1996-12-11 04:48:51 +00:00
Jim Meyering
3e39947b49 . 1996-12-11 04:38:33 +00:00
Jim Meyering
c8a3fc9bed . 1996-12-11 04:37:22 +00:00
Jim Meyering
d43b4dcaf8 (EXTRA_DIST): Add strftime.c to appease automake.
Although it's not used yet, it'll be used by ls's (to-be-done)
--format=FORMAT option.
1996-12-11 04:34:37 +00:00
Jim Meyering
54f9b87874 . 1996-12-10 22:40:16 +00:00
Jim Meyering
1c28626053 . 1996-12-10 21:37:09 +00:00
Jim Meyering
6c674869b3 . 1996-12-10 21:32:54 +00:00
Jim Meyering
888a5250a5 . 1996-12-10 21:20:41 +00:00
Jim Meyering
d468c227b0 renamed from build-script.pl 1996-12-10 21:16:48 +00:00
Jim Meyering
52314f2cd8 . 1996-12-10 21:16:47 +00:00
Jim Meyering
8d2b4f9786 . 1996-12-10 21:16:08 +00:00
Jim Meyering
b44299cfd7 mk-script.pl: Rename from build-script.pl. 1996-12-10 21:11:55 +00:00
Jim Meyering
5ea5ea9d2c . 1996-12-10 20:59:35 +00:00
Jim Meyering
7d21f2f4d0 . 1996-12-10 20:59:15 +00:00
Jim Meyering
73db5c12b9 . 1996-12-10 20:49:27 +00:00
Jim Meyering
53ac4c028b (EXTRA_DIST): Add mktime.c.
Reported by Thomas Bushnell.
1996-12-10 20:48:12 +00:00
Jim Meyering
916a46a980 . 1996-12-10 13:04:48 +00:00
Jim Meyering
8b59538e69 . 1996-12-10 13:02:55 +00:00
Jim Meyering
eb34cbfc13 . 1996-12-10 13:01:32 +00:00
Jim Meyering
4360d0f52d . 1996-12-10 06:14:52 +00:00
Jim Meyering
e74a22ebb7 . 1996-12-10 06:12:41 +00:00
Jim Meyering
fcc65666b5 . 1996-12-10 06:11:50 +00:00
Jim Meyering
a16b0a142f Include config.h.
[!HAVE_BCOPY && HAVE_MEMCPY && !defined (bcopy)]: Define bcopy
in terms of memcpy.  Reported by Marcus Daniels.
1996-12-10 05:22:12 +00:00
Jim Meyering
5c39a3b65b . 1996-12-10 05:10:56 +00:00
Jim Meyering
4885753994 . 1996-12-10 04:54:02 +00:00
Jim Meyering
156de2ae7a . 1996-12-10 04:46:16 +00:00
Jim Meyering
40f8a7ad2b . 1996-12-10 04:43:44 +00:00
Jim Meyering
8f477a9072 (Convert): Don't reject all dates in 2038.
Some fit in 31 bits.
1996-12-10 04:34:18 +00:00
Jim Meyering
d5ce3b1c3c . 1996-12-10 04:27:12 +00:00
Jim Meyering
54d0c0bb5a . 1996-12-10 04:26:40 +00:00
Jim Meyering
09c73133aa . 1996-12-10 03:17:10 +00:00
Jim Meyering
17fe725ebb add a space 1996-12-10 03:17:01 +00:00
Jim Meyering
c02f8ed500 revert last change. 1996-12-10 03:16:36 +00:00
Jim Meyering
90b901cd1c . 1996-12-10 03:01:43 +00:00
Jim Meyering
73c7efa3ee . 1996-12-10 02:58:00 +00:00
Jim Meyering
e155f4bf01 [HAVE_TZNAME || defined __LIBC]: Declare tzname. 1996-12-10 02:46:42 +00:00
Jim Meyering
1d3c57118b (find_mount_point): Convert from K&R style header to ANSI.
Patch from Kaveh Ghazi.
1996-12-10 00:28:02 +00:00
Jim Meyering
195b5ebbe7 . 1996-12-10 00:25:00 +00:00
Jim Meyering
ba788477a8 Include config.h before testing for TERMIOS_NEEDS_XOPEN_SOURCE.
Patch from Karl Heuer.
1996-12-10 00:20:17 +00:00
Jim Meyering
6846ffa9d9 . 1996-12-09 23:54:45 +00:00
Jim Meyering
4fb3a6f765 [HAVE_TZNAME]: Declare tzname.
Patch from Karl Heuer.
1996-12-09 13:02:21 +00:00
Jim Meyering
5460d4a9c8 . 1996-12-09 04:45:08 +00:00
Jim Meyering
7f5d303c61 . 1996-12-09 03:13:15 +00:00
Jim Meyering
a65bae921e . 1996-12-09 03:12:38 +00:00
Jim Meyering
89cf1fc2cf . 1996-12-08 13:31:12 +00:00
Jim Meyering
a13947a7a3 . 1996-12-08 13:30:49 +00:00
Jim Meyering
ddc2531899 . 1996-12-08 13:29:07 +00:00
Jim Meyering
80729c5841 (noinst_LIBRARIES): Rename to lib?u.a as per
new automake requirement.
Rename ?u_* variables to lib?u_a_*.
1996-12-08 13:28:43 +00:00
Jim Meyering
83ada8596c . 1996-12-08 06:09:29 +00:00
Jim Meyering
2a1d6f9b5f (get_win_size): Rename formal parameter from fileno to FD. 1996-12-08 06:09:21 +00:00
Jim Meyering
f2ac53d4ea . 1996-12-08 05:56:37 +00:00
Jim Meyering
f31b9b9fee . 1996-12-08 05:35:20 +00:00
Jim Meyering
acc8601b65 (main): Call setlocale, bindtextdomain, and textdomain.
From Michel Robitaille.
1996-12-08 04:24:35 +00:00
Jim Meyering
8dd5415e02 . 1996-12-08 04:24:26 +00:00
Jim Meyering
8a4da0e3ff . 1996-12-07 19:54:02 +00:00
Jim Meyering
95f9b268e9 . 1996-12-07 19:45:44 +00:00
Jim Meyering
d2ad9d8cf4 . 1996-12-07 19:25:40 +00:00
Jim Meyering
0ccd71dd94 (init_header): Fix typo: cons tchar' -> const char'. From Roland. 1996-12-07 19:12:44 +00:00
Jim Meyering
1c7be9d1bb . 1996-12-07 19:03:23 +00:00
Jim Meyering
c9893d18e3 [__SVR4]: Define SVR4.
Remove duplicate `|| defined(SVR4)' disjunct guarding the
#define KERNEL_FILE "/unix" definiton.
1996-12-07 19:03:13 +00:00
Jim Meyering
fb1f09c76e . 1996-12-07 18:57:11 +00:00
Jim Meyering
b1cc662215 (strftime): Remove " %Z" part of format for %c. Suggestion from Paul Eggert. 1996-12-07 18:52:54 +00:00
Jim Meyering
f86a3c16d3 patch from Roland Huebner 1996-12-07 05:47:28 +00:00
Jim Meyering
6d244887aa . 1996-12-06 12:39:39 +00:00
Jim Meyering
f86df3250c (init_store_cols): Put parens around ... ? ... : ... expr. 1996-12-05 05:01:30 +00:00
Jim Meyering
65a915647c Use NULL instead of e.g., `(char *) 0'. 1996-12-05 04:59:26 +00:00
Jim Meyering
2882d4477d (init_header): Move dcl of FMT into block where it's used. 1996-12-05 04:55:51 +00:00
Jim Meyering
2793223907 Reindent with -TCOLUMN.
(main): Add two sets of curly braces for readability.
1996-12-05 04:49:12 +00:00
Jim Meyering
a5937bbc71 (usage): Add \n\ at end of first line. 1996-12-05 04:43:19 +00:00
Jim Meyering
d0cac59c72 (separator_string): dcl parameter const.
Add __P in fwd dcl.
1996-12-05 04:35:39 +00:00
Jim Meyering
ed0923a11c Apply big patch (patch-20) from Roland Huebner. 1996-12-05 04:33:33 +00:00
Jim Meyering
42096600e3 . 1996-12-05 03:18:34 +00:00
Jim Meyering
523fb680f6 . 1996-12-05 03:16:24 +00:00
Jim Meyering
3f36b30756 . 1996-12-05 03:13:39 +00:00
Jim Meyering
4a1512e4b2 (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
[:upper:] to [:upper:] and [:lower:] to [:lower:].
(main) [POSIXLY_CORRECT]: Give a more specific diagnostic for the
identity mappings [:upper:] to [:upper:] and [:lower:] to [:lower:].
(class_ok): Update table to reflect that tr now allows these
identity mappings.
1996-12-05 03:13:33 +00:00
Jim Meyering
ad44ac84c8 (print_color_indicator): Initialize EXT to NULL. 1996-12-04 01:21:28 +00:00
Jim Meyering
c7975ba578 . 1996-12-03 03:02:45 +00:00
Jim Meyering
62a92dec57 . 1996-12-03 02:58:59 +00:00
Jim Meyering
a37e7e6b78 . 1996-12-03 02:57:47 +00:00
Jim Meyering
d5718682cc . 1996-12-03 02:46:09 +00:00
Jim Meyering
81e3dc9283 . 1996-12-03 02:45:07 +00:00
Jim Meyering
daa3f22091 . 1996-12-03 02:35:01 +00:00
Jim Meyering
b87899c834 (print_color_indicator): Check the file's suffix only
if it's a regular file.
(print_type_indicator): Use S_IXUGO instead of writing out
(S_IEXEC | S_IXGRP | S_IXOTH).
(length_of_file_name_and_frills): Likewise.
1996-12-03 02:33:09 +00:00
Jim Meyering
4accfeb4e0 [!S_IXUGO] (S_IXUGO): Define it. 1996-12-03 02:32:44 +00:00
Jim Meyering
377b0c7942 . 1996-12-01 19:21:49 +00:00
Jim Meyering
4331f5f978 . 1996-12-01 19:18:08 +00:00
Jim Meyering
fb19eec511 . 1996-12-01 19:17:36 +00:00
Jim Meyering
b712dcba25 . 1996-12-01 19:17:07 +00:00
Jim Meyering
caad57f5d0 . 1996-12-01 19:15:10 +00:00
Jim Meyering
807b8b05c2 (date): Interpret the date, L/M/N, as YYYY/MM/DD
if L >= 1000, otherwise as MM/DD/YY.  With this change,
date --date=DATE accepts dates like those in an RCS log listing.
1996-12-01 19:15:03 +00:00
Jim Meyering
5f3fa7a284 . 1996-12-01 19:14:43 +00:00
Jim Meyering
c1032f08e5 . 1996-12-01 04:12:08 +00:00
Jim Meyering
0aa0b007b0 Update from GNU libc. 1996-12-01 04:08:17 +00:00
Jim Meyering
c6973beeec Change `:' in text of menu to <colon> to avoid problems
with M-x info follow-node.
1996-11-30 14:21:01 +00:00
Jim Meyering
d99d106c55 . 1996-11-30 05:37:43 +00:00
Jim Meyering
61f8fa059c . 1996-11-30 04:34:58 +00:00
Jim Meyering
9279ffdf29 . 1996-11-30 04:33:36 +00:00
Jim Meyering
0682a5efe9 (copy_file): Allow installation from non-directory (rather than only regular)
files.  Suggestion from Charles Karney.
1996-11-30 04:33:30 +00:00
Jim Meyering
dc68073b21 . 1996-11-30 04:20:37 +00:00
Jim Meyering
78c6df8fb8 (uname): Document --processor (-p). 1996-11-30 04:20:01 +00:00
Jim Meyering
f03282e857 (main) [HAVE_SYSINFO && SI_ARCHITECTURE]: Support -p (print processor type).
(usage): Document it.
1996-11-30 04:18:19 +00:00
Jim Meyering
7e9e29f392 (main): Accept -F as a synonym for -t for compatibility
with Solaris.  From Peter Eriksson.
1996-11-30 04:08:02 +00:00
Jim Meyering
28f8f53bb6 . 1996-11-30 04:07:32 +00:00
Jim Meyering
ab8182fa71 . 1996-11-30 03:21:11 +00:00
Jim Meyering
d740a98d4a (main): Close stdout and check result, in case any deferred writes fail.
Use EXIT_SUCCESS and EXIT_FAILURE in exit and usage calls.
1996-11-30 03:20:48 +00:00
Jim Meyering
40e0727bed . 1996-11-30 03:08:46 +00:00
Jim Meyering
a387531246 . 1996-11-28 23:50:17 +00:00
Jim Meyering
be44044a29 (find_mount_point): Use strip_trailing_slashes and dirname
instead of open-coding them.  When given FILE containing no slashes,
chdir to the directory containing it (the current directory) rather
than to `..'.
1996-11-28 23:50:13 +00:00
Jim Meyering
ae9d905134 . 1996-11-28 23:18:45 +00:00
Jim Meyering
bcb8610977 (get_fs_usage): If DISK is 0 and we needed to use
it, return -1 with 0 in ERRNO.

From Miles.
1996-11-28 19:37:01 +00:00
Jim Meyering
ac66871c65 (find_mount_point): Use save_cwd/restore_cwd.
"save-cwd.h": New include.

(show_dev): Deal with null values for DISK and FSTYPE,
including interpreting special 0 errno return from get_fs_usage.
(show_point): Don't fail if we can't find a mount entry for POINT,
just call show_dev with 0 values and let it fail if necessary.
(main): Require a non-zero MOUNT_LIST only if showing all filesystems.
(find_mount_point): New function.
(xgetcwd): New declaration.

All from Miles.
1996-11-28 19:35:33 +00:00
Jim Meyering
3fa102417e . 1996-11-28 06:32:39 +00:00
Jim Meyering
59b58a58f6 . 1996-11-28 06:30:36 +00:00
Jim Meyering
f46bcc918b . 1996-11-27 05:24:41 +00:00
Jim Meyering
784928401d merge with 0.10.25 1996-11-27 05:13:21 +00:00
Jim Meyering
1a62ae1a5c . 1996-11-27 05:06:09 +00:00
Jim Meyering
952a4436eb (fraccompare): Add explicit int' in register' dcl, to
avoid new warning from gcc.
1996-11-27 05:05:52 +00:00
Jim Meyering
a098f5b9b6 . 1996-11-27 05:04:48 +00:00
Jim Meyering
5d691b7b74 . 1996-11-27 05:00:15 +00:00
Jim Meyering
84ee79c745 Fix Franc,ois' name. From Karl B. 1996-11-25 14:36:18 +00:00
Jim Meyering
4b091b8a14 Fix Franc,ois' name. From Karl B. 1996-11-25 14:35:45 +00:00
Jim Meyering
c51d0a5a9b . 1996-11-25 04:45:59 +00:00
Jim Meyering
29ea1d5db9 . 1996-11-25 04:42:37 +00:00
Jim Meyering
b910477e63 . 1996-11-25 04:42:15 +00:00
Jim Meyering
2f74178b8b . 1996-11-25 03:15:46 +00:00
Jim Meyering
fe171f7d8f . 1996-11-25 03:12:57 +00:00
Jim Meyering
b0244698f9 . 1996-11-25 03:10:03 +00:00
Jim Meyering
7c0ec3e569 . 1996-11-25 03:09:33 +00:00
Jim Meyering
4677a7e42f (t): Add names of those 5 tests. 1996-11-25 03:09:22 +00:00
Jim Meyering
520f4efee9 Add 5 tests to exercize just-fixed code. 1996-11-25 03:08:52 +00:00
Jim Meyering
0d43bad18e (set_ordering): Revert 1994-05-04 change to this function
so that blanks are not unconditionally ignored when computing start
and end positions for numeric keys.  Reported by Markus Demleitner.
1996-11-25 03:07:52 +00:00
Jim Meyering
0dd914edd1 . 1996-11-24 18:11:22 +00:00
Jim Meyering
161db26bd1 (get_win_size): Take a FILENO parameter rather than
trying to get a size from both stdin and stdout.
Update callers.
Use STDIN_FILENO and STDOUT_FILENO instead of literal 0, 1.
1996-11-24 18:06:35 +00:00
Jim Meyering
a992c841ae Big patch from Karl Heuer. FIXME: fill in details 1996-11-24 17:03:24 +00:00
Jim Meyering
9299cf1e78 (EXTRA_DIST): Add getline.c now that getline
isn't mentioned in AC_REPLACE_FUNCS.
1996-11-24 05:38:29 +00:00
Jim Meyering
970083559f . 1996-11-24 05:27:21 +00:00
Jim Meyering
459453639e . 1996-11-24 05:21:39 +00:00
Jim Meyering
0e0ae2b348 remove trailing blanks 1996-11-24 03:05:11 +00:00
Jim Meyering
cb7fcc32ff remove trailing blanks 1996-11-24 03:04:12 +00:00
Jim Meyering
d7e8ccb6f3 (usage): Remove trailing pair of blanks. 1996-11-24 03:00:37 +00:00
Jim Meyering
a811674834 . 1996-11-23 22:16:31 +00:00
Jim Meyering
fa9f16326a (usage): Alphabetize option descriptions the way sort -f would. 1996-11-23 22:16:19 +00:00
Jim Meyering
c13ff9b8bc . 1996-11-23 22:13:55 +00:00
Jim Meyering
bded355394 (usage): Alphabetize option descriptions the way sort -f would. 1996-11-23 22:13:00 +00:00
Jim Meyering
f43bd3fafc . 1996-11-23 22:10:08 +00:00
Jim Meyering
e298f1f300 (usage): Alphabetize options like sort -f would. 1996-11-23 22:06:55 +00:00
Jim Meyering
8102404465 . 1996-11-23 05:04:56 +00:00
Jim Meyering
bef51e36a4 . 1996-11-23 04:22:46 +00:00
Jim Meyering
5425625fb3 . 1996-11-23 04:16:43 +00:00
Jim Meyering
94d1ea4fa9 (copy): With -i and not -f, prompt for any type of
(non-directory) source file before overwriting an existing target.
Reported by Mark A. Thomas.
1996-11-23 04:15:35 +00:00
Jim Meyering
9645d076db . 1996-11-23 02:36:54 +00:00
Jim Meyering
b683d9194f . 1996-11-23 02:36:09 +00:00
Jim Meyering
38da840313 (main): Warn if excess arguments are ignored.
E.g., printf foo bar now ignores the single non-format argument, bar.
1996-11-23 02:34:31 +00:00
Jim Meyering
b36e061e8a . 1996-11-23 02:32:19 +00:00
Jim Meyering
0d3f6a6665 (process_regexp): Update CURRENT_LINE only if
the new value would be larger.  This avoids the infinite loop
otherwise provoked by situations like this:
printf "\na\n" | csplit - '/a/-1' '{*}'
From Jens Schmidt.
1996-11-23 02:32:10 +00:00
Jim Meyering
aa00ea2e88 remove my @comco address 1996-11-21 02:42:52 +00:00
Jim Meyering
aad274a82b . 1996-11-21 02:39:37 +00:00
Jim Meyering
fc949b713e (xgethostname): Work around bug in SunOS5.5's gethostname. 1996-11-21 02:38:40 +00:00
Jim Meyering
fbc246ca8f . 1996-11-20 06:36:09 +00:00
Jim Meyering
789a8aa03a . 1996-11-20 06:34:41 +00:00
Jim Meyering
179a2c3034 . 1996-11-20 05:18:13 +00:00
Jim Meyering
a27d168615 . 1996-11-20 05:17:50 +00:00
Jim Meyering
29fa517ae4 . 1996-11-20 05:13:57 +00:00
Jim Meyering
4b7c7e9d33 Remove unused declaration of mktime. From Tony Leneis. 1996-11-18 02:54:14 +00:00
Jim Meyering
daf9bddd16 . 1996-11-18 02:51:09 +00:00
Jim Meyering
9b3733bd9a . 1996-11-18 02:50:30 +00:00
Jim Meyering
a4f0dde547 (main): Ignore -a, for compatibility with SVR4. 1996-11-18 02:50:21 +00:00
Jim Meyering
e604ed756f . 1996-11-05 05:24:53 +00:00
Jim Meyering
1cf3018183 . 1996-11-05 05:20:03 +00:00
Jim Meyering
138d155fb8 . 1996-11-05 04:47:40 +00:00
Jim Meyering
4d091498a4 Thu Oct 31 19:32:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
[ENAMETOOLONG] (xgethostname): If gethostname
returns an error other than buffer overflow, exit with an error
message instead of allocating infinite amounts of space.
[!EXIT_FAILURE] (EXIT_FAILURE): New macro.
<errno.h>: New include.
[!errno] (errno): New declaration.
1996-11-05 04:38:41 +00:00
Jim Meyering
1e3de0b6d9 . 1996-11-05 04:26:34 +00:00
Jim Meyering
25a9b70b2e Fix copyright. 1996-11-05 04:23:22 +00:00
Jim Meyering
45bf8ec9d0 Fix copyright. 1996-11-05 04:22:40 +00:00
Jim Meyering
4a253e5be0 . 1996-11-05 04:11:31 +00:00
Jim Meyering
71a04268b5 libitize 1996-11-05 03:38:23 +00:00
Jim Meyering
6c6ea1a14d . 1996-11-05 02:31:02 +00:00
Jim Meyering
9691c2050b from franc,ois 1996-11-04 18:15:56 +00:00
Jim Meyering
2876587b55 libitize 1996-11-04 18:11:58 +00:00
Jim Meyering
1eb3a8c9ba libitize 1996-11-04 18:07:38 +00:00
Jim Meyering
39fd156a8e New version from Franois Pinard. 1996-11-04 18:05:10 +00:00
Jim Meyering
f137758903 libitize 1996-11-04 18:01:20 +00:00
Jim Meyering
895c2213db libitize 1996-11-04 17:59:28 +00:00
Jim Meyering
50720fb367 libitize 1996-11-04 17:58:21 +00:00
Jim Meyering
f6516b6dd3 libitize 1996-11-04 17:57:34 +00:00
Jim Meyering
564001a9e7 . 1996-11-04 17:56:16 +00:00
Jim Meyering
25abc2a9b4 (recover_mode): Fail also if there are too many fields. From Karl Heuer. 1996-11-04 00:22:26 +00:00
Jim Meyering
70196747af cpp-indent + change some #ifdef to #if 1996-11-03 23:53:51 +00:00
Jim Meyering
04e102f64f . 1996-11-03 23:44:15 +00:00
Jim Meyering
432ebf7912 . 1996-11-03 23:43:36 +00:00
Jim Meyering
84b3a78396 Include sys/types.h for the definitions
(otherwise missing on some systems) of caddr_t (used by
sys/socket.h) and ushort (used by netinet/in.h).  From Karl Heuer.
1996-11-03 20:59:43 +00:00
Jim Meyering
9eb9f31c3a . 1996-11-03 14:44:30 +00:00
Jim Meyering
7f82c56f15 . 1996-11-03 14:42:03 +00:00
Jim Meyering
5582e6dad3 change bug-reporting address 1996-11-03 03:16:27 +00:00
Jim Meyering
2e55854100 change bug-reporting address 1996-11-03 03:16:23 +00:00
Jim Meyering
8114f3fcdb change bug-reporting address 1996-11-02 23:40:19 +00:00
Jim Meyering
45c541daa1 . 1996-11-02 20:51:40 +00:00
Jim Meyering
17c0c658f1 change bug-reporting address 1996-11-02 20:44:52 +00:00
Jim Meyering
b8e689dc67 change bug-reporting address 1996-11-02 20:44:15 +00:00
Jim Meyering
87b19e8a11 . 1996-11-02 19:24:35 +00:00
Jim Meyering
a1c6ed64c0 . 1996-11-02 16:05:47 +00:00
Jim Meyering
f2c14100c3 . 1996-11-02 15:28:22 +00:00
Jim Meyering
1a58046071 (gobble_file): Set linkok for non-orphaned symlinks.
From Bauke Jan Douma.
(gobble_file): Initialize linkok.
With these two changes, ls --color should display orphaned symlinks
as blinking text on terminals that support it.
1996-11-02 15:28:08 +00:00
Jim Meyering
b3b3cf98c6 . 1996-11-02 15:06:36 +00:00
Jim Meyering
30bf49ce02 . 1996-11-02 15:05:57 +00:00
Jim Meyering
a5ecd84c1f . 1996-11-02 15:02:25 +00:00
Jim Meyering
9b29731f08 . 1996-11-02 14:53:43 +00:00
Jim Meyering
a140942848 . 1996-11-02 14:50:31 +00:00
Jim Meyering
1291b1652a (MAKEINFO): Set to makeinfo --no-split.
Otherwise, the generated info files have 15-byte names and that
loses on systems with 14-byte max.
1996-11-02 14:47:46 +00:00
Jim Meyering
1b5b75d13e . 1996-11-02 06:16:56 +00:00
Jim Meyering
f1af346ad5 (main): Give better diagnostic.
Suggestion from Karl Berry.
1996-11-02 06:16:44 +00:00
Jim Meyering
431bbb9c57 update copyright 1996-11-02 06:00:18 +00:00
Jim Meyering
7d62b5ce1c update copyright 1996-11-02 05:59:20 +00:00
Jim Meyering
a345a56001 . 1996-11-02 05:53:00 +00:00
Jim Meyering
b5f8cdecfb Update from GNU libc. 1996-11-02 05:51:53 +00:00
Jim Meyering
fa53b43c97 . 1996-11-02 05:28:36 +00:00
Jim Meyering
23bce5b115 . 1996-11-02 05:28:21 +00:00
Jim Meyering
da952f6227 . 1996-11-02 05:24:50 +00:00
Jim Meyering
31926f3a37 . 1996-11-02 05:24:25 +00:00
Jim Meyering
a71e22991b Add a test to exercize this fix. 1996-11-02 05:19:40 +00:00
Jim Meyering
d74d789bea Add test 17. 1996-11-02 05:19:02 +00:00
Jim Meyering
950325ee23 . 1996-11-02 05:14:21 +00:00
Jim Meyering
c941e1742d . 1996-11-02 05:09:54 +00:00
Jim Meyering
0bd1289ad1 . 1996-11-02 03:51:47 +00:00
Jim Meyering
febf70b73f [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
(checkfp): Fix off-by-one error that resulted in writing one byte
beyond the end of a malloc'd buffer.  It caused `sort -c' to segfault
on Linux systems having a relatively recent libc.  Before, running
the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
would provoke the memory overrun (though not necessarily the failure).
Add an assertion.
1996-11-02 03:47:04 +00:00
Jim Meyering
b5a71af82a Remap yacc globals to have gd_ prefix.
Suggestion to do as in gdb/c-exp.y from Tom Tromey.
1996-11-01 00:32:12 +00:00
Jim Meyering
876c63c92f Remap yacc globals to have pt_ prefix.
Suggestion to do as in gdb/c-exp.y from Tom Tromey.
1996-11-01 00:31:57 +00:00
Jim Meyering
b3ca6696cd . 1996-11-01 00:09:34 +00:00
Jim Meyering
24e88142ba (key_init): New function.
(main): Use key_init in the two places where it was open-coded.
1996-11-01 00:08:58 +00:00
Jim Meyering
f9cd2cf6e2 (decode_field_spec): Always give FIELD_INDEX a value.
This avoids spurious UMR from purify.
(prjoin): Add an assertion.
(add_field): Update assertion.
1996-10-31 23:55:04 +00:00
Jim Meyering
0a1ac00ad6 (es_free): New function.
(parse_str): Use it to plug small memory leak.
1996-10-31 23:49:42 +00:00
Jim Meyering
e5947e883e . 1996-10-31 02:10:18 +00:00
Jim Meyering
679918ec84 . 1996-10-29 18:06:05 +00:00
Jim Meyering
a9b6fe5c83 . 1996-10-29 18:05:50 +00:00
Jim Meyering
8619a0d598 . 1996-10-29 17:56:06 +00:00
Jim Meyering
d34e6897d8 . 1996-10-29 17:55:38 +00:00
Jim Meyering
55681891e5 . 1996-10-29 17:47:50 +00:00
Jim Meyering
3772a9e885 . 1996-10-29 17:44:03 +00:00
Jim Meyering
1220685f78 libitize 1996-10-29 14:45:55 +00:00
Jim Meyering
f3129d9b19 . 1996-10-29 14:25:25 +00:00
Jim Meyering
b0fd7c9185 . 1996-10-29 14:25:15 +00:00
Jim Meyering
7d70c26629 . 1996-10-29 14:24:52 +00:00
Jim Meyering
ac96de6db4 . 1996-10-29 14:21:15 +00:00
Jim Meyering
1f49981a1f cpp-indent 1996-10-29 14:17:29 +00:00
Jim Meyering
d09ffcb711 libitize 1996-10-29 14:14:08 +00:00
Jim Meyering
33b2a8a1ae . 1996-10-29 13:57:43 +00:00
Jim Meyering
32969f8571 . 1996-10-29 13:56:39 +00:00
Jim Meyering
4abe75d3b1 . 1996-10-29 13:50:37 +00:00
Jim Meyering
e623bf9a03 . 1996-10-29 13:47:56 +00:00
Jim Meyering
0815914f28 . 1996-10-29 13:42:56 +00:00
Jim Meyering
70cf07775b . 1996-10-29 13:41:43 +00:00
Jim Meyering
06382a007d . 1996-10-29 13:40:56 +00:00
Jim Meyering
d7749da3e9 (decode_switches): Make -A set really_all_files to zero
as well as setting all_files to 1.  With this change, ls -f -A prints
everything but . and .., unsorted.  Before, the -A was effectively
ignored.  From Karl Berry.
1996-10-29 12:51:37 +00:00
Jim Meyering
84b8cf9fcf (main): Ignore SIGPIPE. 1996-10-29 04:16:59 +00:00
Jim Meyering
c673119b0b . 1996-10-28 23:52:51 +00:00
Jim Meyering
45d223328e . 1996-10-28 23:49:53 +00:00
Jim Meyering
b8ad9be908 Guard inclusion of stdarg.h and definition of VA_START
with #if PROTOTYPES rather than with #ifdef __STDC__.  The latter
loses with Dynix/PTX.
(wrapf) [PROTOTYPES]: Similarly, guard ANSI-style ... definition.
Suggestion from Marcus Daniels.
1996-10-24 04:46:33 +00:00
Jim Meyering
2be918d5cd . 1996-10-24 03:03:08 +00:00
Jim Meyering
db69dbe9ab Update from GNU libc. 1996-10-24 03:02:57 +00:00
Jim Meyering
4215f6b53a . 1996-10-23 01:39:16 +00:00
Jim Meyering
e1298617bf . 1996-10-23 01:24:26 +00:00
Jim Meyering
720341312b . 1996-10-23 01:24:03 +00:00
Jim Meyering
ed44302c4a . 1996-10-22 23:02:22 +00:00
Jim Meyering
c3b3d48cd4 . 1996-10-22 22:51:22 +00:00
Jim Meyering
a73047bde4 . 1996-10-22 05:07:12 +00:00
Jim Meyering
20862d675d . 1996-10-22 05:05:36 +00:00
Jim Meyering
17e8314c79 . 1996-10-22 05:01:37 +00:00
Jim Meyering
ee791d8ca1 [__linux__]: Don't bother with a.out/nlist/kernel
defines or includes -- Linux systems simply read /proc/loadavg.
1996-10-22 05:01:13 +00:00
Jim Meyering
0c410767ab . 1996-10-22 04:56:22 +00:00
Jim Meyering
3896da90cc (EXTRA_DIST): Remove group-member.c.
Add (temporary hack to work around bug in automake-1.1f) mvdir.c and rmdir.c.
1996-10-22 04:51:44 +00:00
Jim Meyering
0ed25421c6 . 1996-10-22 04:07:14 +00:00
Jim Meyering
194f3d7f5a . 1996-10-22 03:28:44 +00:00
Jim Meyering
e028e025df . 1996-10-22 03:19:35 +00:00
Jim Meyering
8978c64869 . 1996-10-22 03:15:22 +00:00
Jim Meyering
0fd3107ec7 . 1996-10-22 03:09:55 +00:00
Jim Meyering
0416bd8ed0 . 1996-10-21 22:27:48 +00:00
Jim Meyering
d63a1efe26 . 1996-10-21 22:05:28 +00:00
Jim Meyering
43294523f4 . 1996-10-21 21:58:44 +00:00
Jim Meyering
625354dd9e . 1996-10-21 21:54:03 +00:00
Jim Meyering
dc14f81457 Comment out DOS-style suffixes. 1996-10-21 21:52:53 +00:00
Jim Meyering
32f42e0a34 . 1996-10-21 21:50:51 +00:00
Jim Meyering
263773a385 (validate): Remove TAB from diagnostic, for consistency. 1996-10-21 21:50:32 +00:00
Jim Meyering
6afff604a4 . 1996-10-21 21:49:54 +00:00
Jim Meyering
7b4f54f83f (main): Remove TAB from diagnostic, for consistency. 1996-10-21 21:49:41 +00:00
Jim Meyering
24b532175e . 1996-10-21 15:42:14 +00:00
Jim Meyering
543f479cc8 . 1996-10-21 13:46:50 +00:00
Jim Meyering
4b1e41570b . 1996-10-21 03:33:37 +00:00
Jim Meyering
d0fa9d9689 (INCLUDES): Add -I../intl. Reported by Eric Backus. 1996-10-21 03:33:19 +00:00
Jim Meyering
4516e9ec55 . 1996-10-21 00:38:50 +00:00
Jim Meyering
d15f56325a . 1996-10-20 19:16:49 +00:00
Jim Meyering
1dde8333c1 . 1996-10-20 19:14:50 +00:00
Jim Meyering
ac22b4589d (print_entry): Don't take address of UT_TIME_MEMBER directly.
From Ulrich Drepper.
1996-10-20 19:14:37 +00:00
Jim Meyering
2f03e544e1 . 1996-10-20 18:50:41 +00:00
Jim Meyering
412cc2f3fc (md5_process_bytes): Cast void* pointer to char* before
doing arithmetic with it.
1996-10-20 18:44:39 +00:00
Jim Meyering
3cbc95de84 . 1996-10-20 18:43:54 +00:00
Jim Meyering
b3d2d7745e . 1996-10-20 18:06:50 +00:00
Jim Meyering
66d52e0b28 . 1996-10-20 14:07:17 +00:00
Jim Meyering
5ba02801bd Update from GNU libc. 1996-10-20 04:14:25 +00:00
Jim Meyering
03c0cd6569 . 1996-10-19 02:33:20 +00:00
Jim Meyering
c12be5c1d8 . 1996-10-18 05:10:42 +00:00
Jim Meyering
d565995d9b . 1996-10-18 05:09:27 +00:00
Jim Meyering
9fd1b85231 . 1996-10-18 05:09:03 +00:00
Jim Meyering
350690112e . 1996-10-18 05:08:13 +00:00
Jim Meyering
d0acd7bfa5 . 1996-10-18 05:00:15 +00:00
Jim Meyering
4ba06c4102 . 1996-10-18 04:59:01 +00:00
Jim Meyering
cb84de4217 . 1996-10-18 04:56:53 +00:00
Jim Meyering
7111d93669 . 1996-10-18 04:56:19 +00:00
Jim Meyering
97f0f916a2 . 1996-10-18 04:55:16 +00:00
Jim Meyering
42e52b5017 . 1996-10-18 03:05:32 +00:00
Jim Meyering
8ce9769e2f . 1996-10-18 03:02:52 +00:00
Jim Meyering
7d969dab50 libitize 1996-10-17 03:05:09 +00:00
Jim Meyering
d7074bc0e4 . 1996-10-17 03:01:19 +00:00
Jim Meyering
e24c0713be Define and use macro, PARAMS, not __P. 1996-10-17 02:59:09 +00:00
Jim Meyering
9b3498acb2 . 1996-10-17 02:46:33 +00:00
Jim Meyering
ffc5c802c4 libitize 1996-10-17 02:45:32 +00:00
Jim Meyering
12b4578595 libitize 1996-10-17 01:58:19 +00:00
Jim Meyering
e98991ee51 libitize 1996-10-17 01:49:07 +00:00
Jim Meyering
10076ae36a . 1996-10-17 01:44:24 +00:00
Jim Meyering
c96ca77338 . 1996-10-16 04:31:32 +00:00
Jim Meyering
e82e83086c . 1996-10-16 04:29:10 +00:00
Jim Meyering
70ef71caf5 (get_next): Rewrite to treat lower/upper mapping as a special case.
(main): Write separate loops to initialize mapping for lower->upper
and upper->lower conversion.
1996-10-16 04:29:02 +00:00
Jim Meyering
56d2307664 . 1996-10-16 04:25:18 +00:00
Jim Meyering
e98dee7cdd . 1996-10-15 23:22:41 +00:00
Jim Meyering
f3701815f7 . 1996-10-14 20:47:42 +00:00
Jim Meyering
cf3c9c6a11 . 1996-10-13 19:08:39 +00:00
Jim Meyering
beb67dc954 (print_long_format): Use strftime of localtime
(not ctime) to produce the date/time in long listings.
From Rafal Maszkowski.
1996-10-13 19:04:51 +00:00
Jim Meyering
242f2fa2e1 . 1996-10-13 18:27:17 +00:00
Jim Meyering
3d91b69385 . 1996-10-13 17:58:55 +00:00
Jim Meyering
41dfaf296a (__xstrtol): Return an error for invalid suffix.
Before, e.g., `split -b 1M' would be silently accepted and treated
like `split -b 1'.  Reported by Franc,ois.
1996-10-13 17:58:50 +00:00
Jim Meyering
bc2d814543 (usage): Remove parameter, REASON.
(main): Update callers to use combination of error (0, 0, ... and
usage (EXIT_FAILURE).
1996-10-13 17:53:47 +00:00
Jim Meyering
8cb23387cb . 1996-10-13 13:00:34 +00:00
Jim Meyering
82fa812558 . 1996-10-13 12:34:56 +00:00
Jim Meyering
1487a7da95 . 1996-10-12 23:21:40 +00:00
Jim Meyering
1751c454c2 (fstype_to_string): Handle fstypes of freebsd.
From Arne Henrik Juul.
1996-10-12 23:21:32 +00:00
Jim Meyering
da59dde0bb . 1996-10-12 23:19:30 +00:00
Jim Meyering
6099958eda . 1996-10-12 14:02:48 +00:00
Jim Meyering
ffd5a79535 (EXTRA_DIST): Remove. 1996-10-12 05:09:28 +00:00
Jim Meyering
320268ae6d . 1996-10-12 05:04:44 +00:00
Jim Meyering
e45d62703e . 1996-10-12 05:04:04 +00:00
Jim Meyering
6ed9fd4b58 . 1996-10-12 04:17:28 +00:00
Jim Meyering
d0909b6911 (print_uptime): Change #ifdef guard on getloadavg
call from just HAVE_GETLOADAVG to HAVE_GETLOADAVG || C_GETLOADAVG.
From Kaveh R. Ghazi.
1996-10-12 04:17:25 +00:00
Jim Meyering
a64289005d . 1996-10-12 04:06:15 +00:00
Jim Meyering
e42dca4684 . 1996-10-12 04:04:16 +00:00
Jim Meyering
51293cdf6f . 1996-10-11 04:50:54 +00:00
Jim Meyering
4d0af9ead4 (EXTRA_DIST): Remove posixtm.y and getdate.y.
(fu_SOURCES): Put them here instead.
Remove rules for building getdate.c and posixtm.c;  now automake
generates those rules.
1996-10-11 04:49:50 +00:00
Jim Meyering
eed23c25dc (md5_stream): Apply fix from Ralph Loader
<loader@maths.ox.ac.uk> via Ulrich Drepper.
1996-10-11 04:43:40 +00:00
Jim Meyering
8204d34b97 . 1996-10-11 03:42:11 +00:00
Jim Meyering
d80da392e0 . 1996-10-10 14:08:46 +00:00
Jim Meyering
4c53aee40c . 1996-10-10 14:07:29 +00:00
Jim Meyering
3d35ef8670 . 1996-10-10 04:18:05 +00:00
Jim Meyering
5921df05c5 . 1996-10-10 04:15:54 +00:00
Jim Meyering
1a7260cada . 1996-10-10 04:14:40 +00:00
Jim Meyering
969950e526 . 1996-10-10 04:11:07 +00:00
Jim Meyering
fb9ee923ba [__sun]: Define sun. Reported by Kaveh Ghazi. 1996-10-10 03:14:48 +00:00
Jim Meyering
8af03634e6 . 1996-10-10 03:10:41 +00:00
Jim Meyering
e5e9f3ee5d (strftime): Accommodate the broken C compiler
that comes with SunOS -- don't initialize aggregates in decls of
automatic variables.  Reported by Kaveh Ghazi.
1996-10-10 02:56:10 +00:00
Jim Meyering
62ae6ccc22 . 1996-10-10 02:53:58 +00:00
Jim Meyering
c3830e800f indent copyright comment. 1996-10-10 02:51:16 +00:00
Jim Meyering
7200c7fd2e Use #if, not #ifdef in test for HAVE_CONFIG_H. 1996-10-10 02:50:37 +00:00
Jim Meyering
d16bea8f84 . 1996-10-10 02:48:37 +00:00
Jim Meyering
ae0dc43e79 . 1996-10-09 16:14:39 +00:00
Jim Meyering
c6500ed364 . 1996-10-09 12:27:16 +00:00
Jim Meyering
2a5b5534ab . 1996-10-09 12:25:28 +00:00
Jim Meyering
2dc3ad1a76 (usage): Improve brief descriptions of --sort and --time.
From Franois Pinard.
1996-10-09 12:24:26 +00:00
Jim Meyering
1e2d02ace5 . 1996-10-09 12:18:48 +00:00
Jim Meyering
fde482ef0e . 1996-10-09 12:00:05 +00:00
Jim Meyering
9de1f7a589 [!WITH_REGEX]: Include rx.h.
From Andreas Schwab.
1996-10-09 11:55:22 +00:00
Jim Meyering
983e0032e0 . 1996-10-09 05:27:46 +00:00
Jim Meyering
60cb394696 . 1996-10-09 03:47:10 +00:00
Jim Meyering
c5c0528abe update from texinfo-3.9 1996-10-09 03:20:31 +00:00
Jim Meyering
fecbdd9ab1 . 1996-10-09 02:42:17 +00:00
Jim Meyering
5b2210ce71 . 1996-10-09 02:37:53 +00:00
Jim Meyering
3df36d5e2f . 1996-10-09 02:36:55 +00:00
Jim Meyering
a49fa29fed . 1996-10-09 02:35:23 +00:00
Jim Meyering
bb3ecf85bc Include error.h to align with libit -- under protest, Franois :-). 1996-10-09 02:33:18 +00:00
Jim Meyering
b5a2377dc2 . 1996-10-09 02:29:10 +00:00
Jim Meyering
46b5894b8f , 1996-10-09 02:27:56 +00:00
Jim Meyering
1a68844645 . 1996-10-09 02:25:44 +00:00
Jim Meyering
dc522f984c . 1996-10-09 02:19:09 +00:00
Jim Meyering
8573fc6ac9 (usage): Improve diagnostic 1996-10-08 04:37:19 +00:00
Jim Meyering
d4cf394f30 (usage): Improve usage messages 1996-10-08 04:35:19 +00:00
Jim Meyering
79f3064bfa . 1996-10-08 04:34:11 +00:00
Jim Meyering
900e16e5d5 (EXTRA_DIST): Remove names of several files
that automake adds automatically.
(fu_SOURCES): Likewise.
(fu_DEPENDENCIES): Depend on fu_LIBADD.
1996-10-08 04:33:47 +00:00
Jim Meyering
dfc9fc2202 . 1996-10-08 04:31:57 +00:00
Jim Meyering
1b5b3bf6e2 . 1996-10-08 04:26:01 +00:00
Jim Meyering
cb806c0218 . 1996-10-08 02:23:35 +00:00
Jim Meyering
0e6d3d87e4 [__hpux]: Define hpux. From Eric Backus. 1996-10-08 02:06:34 +00:00
Jim Meyering
4b08923fe8 . 1996-10-08 00:58:23 +00:00
Jim Meyering
2edcf647de . 1996-10-08 00:54:50 +00:00
Jim Meyering
0a713ad019 . 1996-10-08 00:54:12 +00:00
Jim Meyering
7026c59810 . 1996-10-08 00:51:25 +00:00
Jim Meyering
4c4eb1ab6c . 1996-10-06 13:03:02 +00:00
Jim Meyering
638d6e19f0 . 1996-10-06 13:02:12 +00:00
Jim Meyering
27d2263af1 . 1996-10-06 03:19:07 +00:00
Jim Meyering
320b9cc697 . 1996-10-06 03:07:35 +00:00
Jim Meyering
28e0bda43b . 1996-10-06 02:54:21 +00:00
Jim Meyering
04af619ed2 . 1996-10-06 02:53:18 +00:00
Jim Meyering
255931762f . 1996-10-05 20:18:41 +00:00
Jim Meyering
f98969cf69 . 1996-10-05 20:17:53 +00:00
Jim Meyering
7c17502e74 (print_long_format): Add support for Cray's migrated dmf files.
From Johan Danielsson.
1996-10-05 20:17:09 +00:00
Jim Meyering
4a2eda04aa (ftypelet): Add support for Cray's migrated dmf files.
From Johan Danielsson.
1996-10-05 20:15:06 +00:00
Jim Meyering
ed43629995 . 1996-10-05 19:14:01 +00:00
Jim Meyering
c177b96b17 . 1996-10-05 18:06:07 +00:00
Jim Meyering
c5de1e3532 (main): update --version output to conform to coding standard 1996-10-05 18:04:52 +00:00
Jim Meyering
148ec1ad9c [HAVE_CONFIG_H]: Include config.h.
From Karl Berry.
1996-10-05 17:40:50 +00:00
Jim Meyering
a13e04ed9d fix --version output 1996-10-05 17:12:55 +00:00
Jim Meyering
98564790bd . 1996-10-05 16:47:37 +00:00
Jim Meyering
f04044ed86 (main): update --version output to conform to coding standard 1996-10-05 16:37:57 +00:00
Jim Meyering
09711894fe . 1996-10-05 13:15:07 +00:00
Jim Meyering
4f28f318d8 (main): update --version output to conform to coding standard 1996-10-05 13:14:11 +00:00
Jim Meyering
e22c80dcf0 . 1996-10-05 03:58:37 +00:00
Jim Meyering
b350b74916 Remove assertions. 1996-10-04 13:42:43 +00:00
Jim Meyering
3400ffe3f2 Add assertions. 1996-10-04 13:42:20 +00:00
Jim Meyering
fdd16fdb62 Update prototype. 1996-10-04 12:22:17 +00:00
Jim Meyering
6f67177fae (parse_long_options): Separate package name
and version number to accomodate new --version output requirement.
1996-10-04 12:21:39 +00:00
Jim Meyering
2c035a7cfd (main): update --version output again 1996-10-04 04:28:35 +00:00
Jim Meyering
be4153d2a8 (main): Remove dead code that used to print --version output. 1996-10-04 04:28:28 +00:00
Jim Meyering
630b771f1b (main): update --version output again 1996-10-04 04:25:46 +00:00
Jim Meyering
de05a873ec (main): update --version output to conform to coding standard 1996-10-04 04:16:01 +00:00
Jim Meyering
3361bd2bca (main): update --version output to conform to coding standard 1996-10-04 04:15:08 +00:00
Jim Meyering
1c6698b17d . 1996-10-03 02:46:05 +00:00
Jim Meyering
a3edb3f940 (usage): Deprecate --print-data-base even though
that's the way GNU make writes it.  `database' is one word.
Add description of FILE argument.
1996-10-03 02:45:59 +00:00
Jim Meyering
9b34a4a7c6 . 1996-10-02 02:57:29 +00:00
Jim Meyering
56c8b44ec6 . 1996-10-02 00:45:15 +00:00
Jim Meyering
50c823be8a . 1996-10-01 17:59:05 +00:00
Jim Meyering
4909374105 . 1996-10-01 17:57:29 +00:00
Jim Meyering
2a91869144 (fu_SOURCES): Remove getline.c
(EXTRA_DIST): Add getline.c
1996-10-01 17:57:04 +00:00
Jim Meyering
41bf50ecb3 . 1996-10-01 17:52:42 +00:00
Jim Meyering
349c3796be Oops! Use ../../src 1996-10-01 17:37:35 +00:00
Jim Meyering
717429e4bc . 1996-10-01 11:55:14 +00:00
Jim Meyering
6c81b98e46 (md5sum): Use ../src/md5sum. 1996-10-01 11:55:01 +00:00
Jim Meyering
cf64a504d8 (md5sum): Set to $srcdir/md5sum. 1996-10-01 04:47:55 +00:00
Jim Meyering
ec693397f0 . 1996-10-01 04:47:21 +00:00
Jim Meyering
04838c31ce . 1996-10-01 04:43:44 +00:00
Jim Meyering
fa3bbe8eb2 . 1996-10-01 04:38:28 +00:00
Jim Meyering
39c406f18a . 1996-10-01 01:10:54 +00:00
170 changed files with 5928 additions and 2455 deletions

View File

@@ -134,7 +134,7 @@ Each translation team has its own mailing list, courtesy of Linux
International. You may reach your translation team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as the country codes given
in ISO 3166. The following translation teams exist, as of August 1996:
in ISO 3166. The following translation teams exist, as of October 1996:
Arabic `ar', Chinese `zh', Czech `cs', Danish `da', Dutch `nl',
English `en', Esperanto `eo', Finnish `fi', French `fr', German
@@ -172,40 +172,41 @@ Available Packages
Languages are not equally supported in all GNU packages. The
following matrix shows the current state of GNU internationalization,
as of August 1996. The matrix shows, in regard of each package, for
as of October 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 nl no pl pt sl sv
.-------------------------------------------.
bash | [] [] | 2
bison | [] [] | 2
bison | [] [] [] | 3
clisp | [] [] [] | 3
cpio | [] [] [] | 3
diffutils | [] [] [] | 3
cpio | [] [] [] [] | 4
diffutils | [] [] [] [] | 4
enscript | [] [] [] [] [] | 5
fileutils | [] [] [] [] [] [] | 6
findutils | [] [] [] [] [] | 5
fileutils | [] [] [] [] [] [] [] [] | 8
findutils | [] [] [] [] [] [] | 6
flex | [] | 1
gcal | [] | 1
gettext | [] [] [] [] [] [] [] [] [] | 10
glibc | [] [] [] | 3
grep | [] [] [] [] [] [] [] | 7
hello | [] [] [] [] [] [] [] [] | 8
gcal | [] [] [] | 3
gettext | [] [] [] [] [] [] [] [] [] [] | 11
grep | [] [] [] [] [] [] [] [] | 8
hello | [] [] [] [] [] [] [] [] [] [] | 10
id-utils | [] [] | 2
libc | [] [] [] [] [] [] | 6
m4 | [] [] [] [] [] | 5
make | [] [] | 2
mkid | [] [] | 2
make | [] [] [] [] | 4
music | [] | 1
ptx | [] [] [] [] [] | 5
ptx | [] [] [] [] [] [] [] | 7
recode | [] [] [] [] [] [] [] | 7
sh-utils | [] [] | 2
sh-utils | [] [] [] [] [] | 5
sharutils | [] [] [] [] | 4
tar | [] [] [] [] [] [] [] [] | 8
textutils | [] [] [] [] [] | 5
wdiff | [] [] [] [] [] | 5
tar | [] [] [] [] [] [] [] [] [] | 9
texinfo | | 0
textutils | [] [] [] [] [] [] | 6
wdiff | [] [] [] [] [] [] [] [] | 8
`-------------------------------------------'
cs de en es fi fr ja ko nl no pl pt sl sv
1 18 1 4 1 22 1 7 16 3 10 3 6 12 105
1 20 1 9 1 24 1 8 20 7 14 6 7 13 132
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
@@ -218,6 +219,6 @@ distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
GNU distribution.
If August 1996 seems to be old, you may fetch a more recent copy of
If October 1996 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites.

13
THANKS Normal file
View File

@@ -0,0 +1,13 @@
This is just a start at listing e-mail addresses of contributors.
The rest of the addresses are still in the ChangeLog.
Bauke Jan Douma: bjdouma@xs4all.nl
Charles Karney: karney@pppl.gov
Emile LeBlanc: leblanc@math.toronto.edu
Marcus Daniels: marcus@sysc.pdx.edu
Mark A. Thomas: thommark@access.digex.net
Miles Bader: miles@gnu.ai.mit.edu
Peter Eriksson: peter@ifm.liu.se
Santiago Vila Doncel: sanvila@ctv.es
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
Tony Leneis: tony@plaza.ds.adp.com

View File

@@ -4,3 +4,9 @@ info_TEXINFOS = fileutils.texi
# FIXME: remove texinfo.tex when automake has been fixed to include it
# automatically
EXTRA_DIST = perm.texi getdate.texi texinfo.tex
# Tell makeinfo to put everything in a single info file: sh-utils.info.
# Otherwise, it would also generate files with names like sh-utils.info-[123],
# and those names all map to one 14-byte name (sh-utils.info-) on some crufty
# old systems.
MAKEINFO = makeinfo --no-split

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.1e from Makefile.am
# Makefile.in generated automatically by automake 1.1l from Makefile.am
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -37,44 +37,56 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
YACC = @YACC@
GENCAT = @GENCAT@
PERL = @PERL@
MV = @MV@
GMSGFMT = @GMSGFMT@
CC = @CC@
RANLIB = @RANLIB@
LN = @LN@
RM = @RM@
info_TEXINFOS = fileutils.texi
# FIXME: remove texinfo.tex when automake has been fixed to include it
# automatically
EXTRA_DIST = perm.texi getdate.texi texinfo.tex
mkinstalldirs = $(top_srcdir)/mkinstalldirs
# Tell makeinfo to put everything in a single info file: sh-utils.info.
# Otherwise, it would also generate files with names like sh-utils.info-[123],
# and those names all map to one 14-byte name (sh-utils.info-) on some crufty
# old systems.
MAKEINFO = makeinfo --no-split
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
INFOS = fileutils.info fileutils.info[-0-9]*
INFO_DEPS = fileutils.info
DVIS = fileutils.dvi
TEXINFOS = fileutils.texi
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
version.texi
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
$(TEXINFOS) $(MANS) $(EXTRA_DIST)
TAR = tar
default: all
.SUFFIXES:
.SUFFIXES: .texi .texinfo .info .dvi .ps
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL)
cd $(top_srcdir) && automake --gnu doc/Makefile
$(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
cd $(top_srcdir) && automake $(subdir)/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Makefile: $(top_builddir)/config.status Makefile.in
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
version.texi: @MAINT@stamp-vti
@@ -101,12 +113,15 @@ fileutils.info: fileutils.texi version.texi
fileutils.dvi: fileutils.texi version.texi
DVIPS = dvips
.texi.info:
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texi.dvi:
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texinfo.info:
cd $(srcdir) \
@@ -114,21 +129,45 @@ fileutils.dvi: fileutils.texi version.texi
.texinfo.dvi:
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info: $(INFO_DEPS)
install-info-am: $(INFO_DEPS)
$(NORMAL_INSTALL)
$(mkinstalldirs) $(infodir)
for file in $(INFO_DEPS); do \
@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 \
echo "$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile"; \
$(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
else : ; fi; \
done; \
done
$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
for file in $(INFO_DEPS); do \
echo "install-info --info-dir=$(infodir) $(infodir)/$$file";\
install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
done; \
else : ; fi
uninstall-info:
cd $(srcdir) && for file in *.info*; do \
rm -f $(infodir)/$$file; \
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
for file in $(INFO_DEPS); do \
(cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \
done
dist-info: $(INFO_DEPS)
for base in $(INFO_DEPS); do \
d=$(srcdir); \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done; \
done
mostlyclean-info:
@@ -142,7 +181,7 @@ clean-info:
distclean-info:
maintainer-clean-info:
rm -f $(INFOS)
for i in $(INFO_DEPS); do rm `eval echo $$i*`; done
tags: TAGS
TAGS:
@@ -150,24 +189,23 @@ TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
$(MAKE) distdir="$(distdir)" dist-info
info: $(INFO_DEPS)
dvi: $(DVIS)
check: all
$(MAKE)
installcheck:
install-exec:
$(NORMAL_INSTALL)
install-data: install-info
install-data: install-info-am
$(NORMAL_INSTALL)
install: install-exec install-data all
@@ -188,36 +226,34 @@ 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)
rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
rm -f config.cache config.log stamp-h
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-vti mostlyclean-info mostlyclean-generic
clean: clean-vti clean-info clean-generic mostlyclean
clean: clean-vti clean-info clean-generic mostlyclean
distclean: distclean-vti distclean-info distclean-generic clean
distclean: distclean-vti distclean-info distclean-generic clean
rm -f config.status
maintainer-clean: maintainer-clean-vti maintainer-clean-info \
maintainer-clean-generic distclean
maintainer-clean-generic distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
.PHONY: default mostlyclean-vti distclean-vti clean-vti \
maintainer-clean-vti install-info uninstall-info mostlyclean-info \
maintainer-clean-vti install-info-am uninstall-info mostlyclean-info \
distclean-info clean-info maintainer-clean-info tags distdir info dvi \
check installcheck install-exec install-data install uninstall all \
installcheck install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.SUFFIXES:
.SUFFIXES: .texi .texinfo .info .dvi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -1,10 +1,3 @@
@ifinfo
@set Francois Franc,ois
@end ifinfo
@tex
@set Francois Fran\noexpand\ptexc cois
@end tex
@node Date input formats
@chapter Date input formats
@@ -77,7 +70,7 @@ many flavors of items:
@item time zone items
@item day of the week items
@item relative items
@item pure numbers.
@item pure numbers.
@end itemize
@noindent We describe each of these item types in turn, below.
@@ -113,7 +106,7 @@ zeros on numbers are ignored.
@cindex calendar date item
A @dfn{calendar date item} specifies a day of the year. It is
A @dfn{calendar date item} specifies a day of the year. It is
specified differently, depending on whether the month is specified
numerically or literally. All these strings specify the same calendar date:
@@ -503,6 +496,6 @@ and others.
@cindex Pinard, F.
@cindex Berry, K.
This chapter was originally produced by @value{Francois} Pinard
This chapter was originally produced by Fran@,{c}ois Pinard
(@samp{pinard@@iro.umontreal.ca}) from the @file{getdate.y} source code,
and then edited by K.@: Berry (@samp{kb@@cs.umb.edu}).

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# mdate-sh - get modification time of a file and pretty-print it
# Copyright (C) 1995 Software Foundation, Inc.
# mdate-sh - get modification time of a file and pretty-print it.
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify

View File

@@ -18,12 +18,7 @@
@syncodeindex pg cp
@syncodeindex vr cp
@ifinfo
@set Francois Franc,ois
@end ifinfo
@tex
@set Francois Fran\noexpand\ptexc cois
@end tex
@set Francois Fran@,{c}ois
@ifinfo
@format
@@ -172,7 +167,7 @@ The GNU shell utilities are mostly compatible with the POSIX.2 standard.
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
@c sh-utils.texi too -- so be sure to keep them consistent.
@cindex bugs, reporting
Please report bugs to @samp{bug-gnu-utils@@prep.ai.mit.edu}. Remember
Please report bugs to @samp{sh-utils-bugs@@gnu.ai.mit.edu}. Remember
to include the version number, machine architecture, input files, and
any other information needed to reproduce the bug: your input, what you
expected, what you got, and why it is wrong. Diffs are welcome, but
@@ -184,7 +179,7 @@ sometimes difficult to infer. @xref{Bugs, , , gcc, GNU CC}.
@cindex Meyering, Jim
@c Sorry, but the @value trick doesn't work with TeX in indexing
@c commands, and I don't want to fix it right now. --karl.
@cindex Pinard, Francois
@cindex Pinard, @value{Francois}
@cindex Berry, Karl
@cindex Stallman, Richard
This manual is based on the Unix man pages in the distribution, which
@@ -724,7 +719,7 @@ Exit status:
@menu
* Relations for expr:: | & < <= = == != >= >
* Numeric expressions:: + - * / %
* String expressions:: : match substr index length
* String expressions:: <colon> match substr index length
* Examples of expr:: Examples.
@end menu
@@ -2504,6 +2499,13 @@ Print the machine (hardware) type.
@cindex network node name
Print the machine's network node hostname.
@item -p
@itemx --processor
@opindex -p
@opindex --processor
@cindex host processor type
Print the machine's processor type
@item -r
@itemx --release
@opindex -r

View File

@@ -35,7 +35,7 @@
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
\deftexinfoversion$Revision: 1.11 $
\deftexinfoversion$Revision: 1.12 $
\message{Loading texinfo package [Version \texinfoversion]:}
% If in a .fmt file, print the version number
@@ -46,20 +46,20 @@
% Save some parts of plain tex whose names we will redefine.
\let\ptextilde=\~
\let\ptexb=\b
\let\ptexbullet=\bullet
\let\ptexc=\c
\let\ptexcomma=\,
\let\ptexdot=\.
\let\ptexdots=\dots
\let\ptexend=\end
\let\ptexequiv = \equiv
\let\ptexi=\i
\let\ptexlbrace=\{
\let\ptexrbrace=\}
\let\ptexdots=\dots
\let\ptexdot=\.
\let\ptexstar=\*
\let\ptexend=\end
\let\ptexbullet=\bullet
\let\ptexb=\b
\let\ptexc=\c
\let\ptexi=\i
\let\ptext=\t
\let\ptexl=\l
\let\ptexL=\L
\let\ptextilde=\~
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
@@ -104,10 +104,9 @@
\hyphenation{eshell}
% Margin to add to right of even pages, to left of odd pages.
\newdimen \bindingoffset \bindingoffset=0pt
\newdimen \normaloffset \normaloffset=\hoffset
\newdimen \bindingoffset
\newdimen \normaloffset
\newdimen\pagewidth \newdimen\pageheight
\pagewidth=\hsize \pageheight=\vsize
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
@@ -128,7 +127,7 @@
\newdimen\cornerlong \newdimen\cornerthick
\newdimen \topandbottommargin
\newdimen \outerhsize \newdimen \outervsize
\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
\outerhsize=7in
%\outervsize=9.5in
% Alternative @smallbook page size is 9.25in
@@ -138,15 +137,24 @@
%---------------------End change-----------------------
% \onepageout takes a vbox as an argument. Note that \pagecontents
% does insertions itself, but you have to call it yourself.
% does insertions, but you have to call it yourself.
\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
\def\onepageout#1{\hoffset=\normaloffset
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
{\escapechar=`\\\relax % makes sure backslash is used in output files.
\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
{\let\hsize=\pagewidth \makefootline}}}%
\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
\def\onepageout#1{%
\hoffset=\normaloffset
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
{%
\escapechar = `\\ % use backslash in output files.
\indexdummies
\shipout\vbox{%
{\let\hsize=\pagewidth \makeheadline}%
\pagebody{#1}%
{\let\hsize=\pagewidth \makefootline}%
}%
}%
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
%%%% For @cropmarks command %%%%
@@ -158,8 +166,8 @@
%
\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
{\escapechar=`\\\relax % makes sure backslash is used in output files.
\shipout
\vbox to \outervsize{\hsize=\outerhsize
\shipout
\vbox to \outervsize{\hsize=\outerhsize
\vbox{\line{\ewtop\hfill\ewtop}}
\nointerlineskip
\line{\vbox{\moveleft\cornerthick\nstop}
@@ -167,19 +175,19 @@
\vbox{\moveright\cornerthick\nstop}}
\vskip \topandbottommargin
\centerline{\ifodd\pageno\hskip\bindingoffset\fi
\vbox{
{\let\hsize=\pagewidth \makeheadline}
\pagebody{#1}
{\let\hsize=\pagewidth \makefootline}}
\ifodd\pageno\else\hskip\bindingoffset\fi}
\vskip \topandbottommargin plus1fill minus1fill
\vbox{
{\let\hsize=\pagewidth \makeheadline}
\pagebody{#1}
{\let\hsize=\pagewidth \makefootline}}
\ifodd\pageno\else\hskip\bindingoffset\fi}
\vskip \topandbottommargin plus1fill minus1fill
\boxmaxdepth\cornerthick
\line{\vbox{\moveleft\cornerthick\nsbot}
\hfill
\vbox{\moveright\cornerthick\nsbot}}
\nointerlineskip
\vbox{\line{\ewbot\hfill\ewbot}}
}}
}}
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi}
%
@@ -367,11 +375,43 @@
%\def\'{{'}}
% Used to generate quoted braces.
\def\mylbrace {{\tt \char '173}}
\def\myrbrace {{\tt \char '175}}
\let\{=\mylbrace
\let\}=\myrbrace
\begingroup
% Definitions to produce actual \{ & \} command in an index.
\catcode`\{ = 12 \catcode`\} = 12
\catcode`\[ = 1 \catcode`\] = 2
\catcode`\@ = 0 \catcode`\\ = 12
@gdef@lbracecmd[\{]%
@gdef@rbracecmd[\}]%
@endgroup
% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
\let\, = \c
\let\dotaccent = \.
\def\ringaccent#1{{\accent23 #1}}
\let\tieaccent = \t
\let\ubaraccent = \b
\let\udotaccent = \d
% Other special characters: @questiondown @exclamdown
% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
\def\questiondown{?`}
\def\exclamdown{!`}
% Dotless i and dotless j, used for accents.
\def\imacro{i}
\def\jmacro{j}
\def\dotless#1{%
\def\temp{#1}%
\ifx\temp\imacro \ptexi
\else\ifx\temp\jmacro \j
\else \errmessage{@dotless can be used only with i or j}%
\fi\fi
}
% @: forces normal size whitespace following.
\def\:{\spacefactor=1000 }
@@ -726,6 +766,7 @@ where each line of input produces a line of output.}
\immediate\write16{If you are running another version of TeX, relax.}
\immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
\immediate\write16{ Then upgrade your TeX installation if you can.}
\immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
\immediate\write16{If you are stuck with version 3.0, run the}
\immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
\immediate\write16{ to use a workaround.}
@@ -831,9 +872,9 @@ where each line of input produces a line of output.}
% @value{foo} gets the text saved in variable foo.
%
\def\value#1{\expandafter
\ifx\csname SET#1\endcsname\relax
{\{No value for ``#1''\}}
\else \csname SET#1\endcsname \fi}
\ifx\csname SET#1\endcsname\relax
{\{No value for ``#1''\}}
\else \csname SET#1\endcsname \fi}
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
@@ -933,6 +974,7 @@ where each line of input produces a line of output.}
\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
\global\let\lastnode=\relax}
% @refill is a no-op.
\let\refill=\relax
% @setfilename is done at the beginning of every texinfo file.
@@ -995,7 +1037,7 @@ where each line of input produces a line of output.}
\fi
% Support font families that don't use the same naming scheme as CM.
\def\rmshape{r}
\def\rmbshape{bx} %where the normal face is bold
\def\rmbshape{bx} %where the normal face is bold
\def\bfshape{b}
\def\bxshape{bx}
\def\ttshape{tt}
@@ -1082,9 +1124,9 @@ where each line of input produces a line of output.}
% \setfont\ssectt\ttshape{10}{\magstep1}
% \setfont\ssecsf\sfshape{10}{\magstep1}
%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
%\setfont\ssectt\ttshape{10}{1315}
%\setfont\ssecsf\sfshape{10}{1315}
@@ -1287,12 +1329,15 @@ where each line of input produces a line of output.}
\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
\def\l#1{{\li #1}\null} %
% @l was never documented to mean ``switch to the Lisp font'',
% and it is not used as such in any manual I can find. We need it for
% Polish suppressed-l. --karl, 22sep96.
%\def\l#1{{\li #1}\null}
\def\r#1{{\rm #1}} % roman font
\def\r#1{{\rm #1}} % roman font
% Use of \lowercase was suggested.
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
% @pounds{} is a sterling sign.
\def\pounds{{\it\$}}
@@ -1311,7 +1356,7 @@ where each line of input produces a line of output.}
\def\shorttitlepage{\parsearg\shorttitlepagezzz}
\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
\endgroup\page\hbox{}\page}
\endgroup\page\hbox{}\page}
\def\titlepage{\begingroup \parindent=0pt \textfonts
\let\subtitlerm=\tenrm
@@ -1328,9 +1373,9 @@ where each line of input produces a line of output.}
% Now you can print the title using @title.
\def\title{\parsearg\titlezzz}%
\def\titlezzz##1{\leftline{\titlefont{##1}}
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
% No rule at page bottom unless we print one at the top with @title.
\finishedtitlepagetrue
%
@@ -1348,7 +1393,7 @@ where each line of input produces a line of output.}
\let\oldpage = \page
\def\page{%
\iffinishedtitlepage\else
\finishtitlepage
\finishtitlepage
\fi
\oldpage
\let\page = \oldpage
@@ -1436,12 +1481,12 @@ where each line of input produces a line of output.}
%
}% unbind the catcode of @.
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
% @headings off turns them off.
% @headings on same as @headings double, retained for compatibility.
% @headings after turns on double-sided headings after this page.
% @headings doubleafter turns on double-sided headings after this page.
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
% @headings off turns them off.
% @headings on same as @headings double, retained for compatibility.
% @headings after turns on double-sided headings after this page.
% @headings doubleafter turns on double-sided headings after this page.
% @headings singleafter turns on single-sided headings after this page.
% By default, they are off at the start of a document,
% and turned `on' after @end titlepage.
@@ -1929,7 +1974,8 @@ July\or August\or September\or October\or November\or December\fi
% We don't need this so we don't use it.
\else
\global\advance\colcount by1
\setbox0=\hbox{#1}%
\setbox0=\hbox{#1 }% Add a normal word space as a separator;
% typically that is always in the input, anyway.
\expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
\fi%
\fi%
@@ -1990,7 +2036,7 @@ July\or August\or September\or October\or November\or December\fi
% In either case we will make \leftskip=\multitablecolspace:
\leftskip=\multitablecolspace
\fi
\noindent##}\cr%
\noindent##\multistrut}\cr%
% \everycr will reset column counter, \colcount, at the end of
% each line. Every column entry will cause \colcount to advance by one.
% The table preamble
@@ -2003,11 +2049,10 @@ July\or August\or September\or October\or November\or December\fi
\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
% If so, do nothing. If not, give it an appropriate dimension based on
% current baselineskip.
\setbox0=\vbox{Xy}
\ifdim\multitablelinespace=0pt
%% strut to put in table in case some entry doesn't have descenders,
%% to keep lines equally spaced
\gdef\multistrut{\vrule height\ht0 depth\dp0 width0pt\relax}
\let\multistrut = \strut
%% Test to see if parskip is larger than space between lines of
%% table. If not, do nothing.
%% If so, set to same dimension as multitablelinespace.
@@ -2038,14 +2083,14 @@ width0pt\relax} \fi
% It automatically defines \fooindex such that
% \fooindex ...rest of line... puts an entry in the index foo.
% It also defines \fooindfile to be the number of the output channel for
% the file that accumulates this index. The file's extension is foo.
% the file that accumulates this index. The file's extension is foo.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
\def\newindex #1{
\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\doindex {#1}}
}
@@ -2057,8 +2102,8 @@ width0pt\relax} \fi
\def\newcodeindex #1{
\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\docodeindex {#1}}
}
@@ -2069,7 +2114,7 @@ width0pt\relax} \fi
\def\synindex #1 #2 {%
\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
\expandafter\let\csname#1indfile\endcsname=\synindexfoo
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\doindex {#2}}%
}
@@ -2078,7 +2123,7 @@ width0pt\relax} \fi
\def\syncodeindex #1 #2 {%
\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
\expandafter\let\csname#1indfile\endcsname=\synindexfoo
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\docodeindex {#2}}%
}
@@ -2126,24 +2171,31 @@ width0pt\relax} \fi
\def\L{\realbackslash L}%
\def\ss{\realbackslash ss}%
% Take care of texinfo commands likely to appear in an index entry.
% (Must be a way to avoid doing expansion at all, and thus not have to
% laboriously list every single command here.)
\def\@{@}% will be @@ when we switch to @ as escape char.
%\let\{ = \lbracecmd
%\let\} = \rbracecmd
\def\_{{\realbackslash _}}%
\def\w{\realbackslash w }%
\def\bf{\realbackslash bf }%
\def\rm{\realbackslash rm }%
%\def\rm{\realbackslash rm }%
\def\sl{\realbackslash sl }%
\def\sf{\realbackslash sf}%
\def\tt{\realbackslash tt}%
\def\gtr{\realbackslash gtr}%
\def\less{\realbackslash less}%
\def\hat{\realbackslash hat}%
\def\char{\realbackslash char}%
%\def\char{\realbackslash char}%
\def\TeX{\realbackslash TeX}%
\def\dots{\realbackslash dots }%
\def\copyright{\realbackslash copyright }%
\def\tclose##1{\realbackslash tclose {##1}}%
\def\code##1{\realbackslash code {##1}}%
\def\dotless##1{\realbackslash dotless {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
\def\t##1{\realbackslash r {##1}}%
\def\,##1{\realbackslash ,{##1}}%
\def\t##1{\realbackslash t {##1}}%
\def\r##1{\realbackslash r {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\b##1{\realbackslash b {##1}}%
@@ -2171,6 +2223,7 @@ width0pt\relax} \fi
\def\indexnofonts{%
% Just ignore accents.
\let\,=\indexdummyfont
\let\"=\indexdummyfont
\let\`=\indexdummyfont
\let\'=\indexdummyfont
@@ -2183,6 +2236,7 @@ width0pt\relax} \fi
\let\u=\indexdummyfont
\let\v=\indexdummyfont
\let\H=\indexdummyfont
\let\dotless=\indexdummyfont
% Take care of the plain tex special European modified letters.
\def\oe{oe}%
\def\ae{ae}%
@@ -2216,6 +2270,7 @@ width0pt\relax} \fi
\let\var=\indexdummyfont
\let\TeX=\indexdummytex
\let\dots=\indexdummydots
\def\@{@}%
}
% To define \realbackslash, we must make \ not be an escape.
@@ -2231,29 +2286,37 @@ width0pt\relax} \fi
% workhorse for all \fooindexes
% #1 is name of index, #2 is stuff to put there
\def\doind #1#2{%
% Put the index entry in the margin if desired.
\ifx\SETmarginindex\relax\else%
\insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
\fi%
{\count10=\lastpenalty %
{\indexdummies % Must do this here, since \bf, etc expand at this stage
\escapechar=`\\%
{\let\folio=0% Expand all macros now EXCEPT \folio
\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash in the indx.
%
% Now process the index-string once, with all font commands turned off,
% to get the string to sort the index by.
{\indexnofonts
\xdef\temp1{#2}%
}%
% Now produce the complete index entry. We process the index-string again,
% this time with font commands expanded, to get what to print in the index.
\edef\temp{%
\write \csname#1indfile\endcsname{%
\realbackslash entry {\temp1}{\folio}{#2}}}%
\temp }%
}\penalty\count10}}
% Put the index entry in the margin if desired.
\ifx\SETmarginindex\relax\else
\insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
\fi
{%
\count255=\lastpenalty
{%
\indexdummies % Must do this here, since \bf, etc expand at this stage
\escapechar=`\\
{%
\let\folio=0 % We will expand all macros now EXCEPT \folio.
\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash.
%
% First process the index-string with all font commands turned off
% to get the string to sort by.
{\indexnofonts \xdef\indexsorttmp{#2}}%
%
% Now produce the complete index entry, with both the sort key and the
% original text, including any font commands.
\toks0 = {#2}%
\edef\temp{%
\write\csname#1indfile\endcsname{%
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
}%
\temp
}%
}%
\penalty\count255
}%
}
\def\dosubind #1#2#3{%
{\count10=\lastpenalty %
@@ -2325,6 +2388,8 @@ width0pt\relax} \fi
% character. It would be better to use @, but that's too big a change
% to make right now.
\catcode`\\ = 0
\catcode`\@ = 11
\escapechar = `\\
\begindoublecolumns
%
% See if the index file exists and is nonempty.
@@ -2440,15 +2505,15 @@ width0pt\relax} \fi
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
}}
%% Define two-column mode, which is used in indexes.
%% Adapted from the TeXbook, page 416.
\catcode `\@=11
% Define two-column mode, which we use to typeset indexes.
% Adapted from the TeXbook, page 416, which is to say,
% the manmac.tex format used to print the TeXbook itself.
\catcode`\@=11
\newbox\partialpage
\newdimen\doublecolumnhsize
\def\begindoublecolumns{\begingroup
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
\output = {\global\setbox\partialpage
=\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
@@ -2481,48 +2546,47 @@ width0pt\relax} \fi
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
\vsize = 2\vsize
\doublecolumnpagegoal
}
\def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage}
\def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth
\global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage
\global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1}
\global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3}
\ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
\ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
}
\def\doublecolumnpagegoal{%
\dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@
}
\def\pagesofar{\unvbox\partialpage %
\hsize=\doublecolumnhsize % have to restore this since output routine
\wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
\def\doublecolumnout{%
\setbox5=\copy255
{\vbadness=10000 \doublecolumnsplit}
\ifvbox255
\setbox0=\vtop to\dimen@{\unvbox0}
\setbox2=\vtop to\dimen@{\unvbox2}
\onepageout\pagesofar \unvbox255 \penalty\outputpenalty
\else
\setbox0=\vbox{\unvbox5}
\ifvbox0
\dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
\divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth
{\vbadness=10000
\loop \global\setbox5=\copy0
\setbox1=\vsplit5 to\dimen@
\setbox3=\vsplit5 to\dimen@
\ifvbox5 \global\advance\dimen@ by1pt \repeat
\setbox0=\vbox to\dimen@{\unvbox1}
\setbox2=\vbox to\dimen@{\unvbox3}
\global\setbox\partialpage=\vbox{\pagesofar}
\doublecolumnpagegoal
}
\fi
\fi
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
% previous page.
\dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
% box0 will be the left-hand column, box1 the right.
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
\onepageout\pagesofar
\unvbox255 \penalty\outputpenalty
}
\def\pagesofar{%
% The contents of the output page -- any previous material,
% followed by the two boxes we just split.
\unvbox\partialpage
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
}
\def\enddoublecolumns{%
\output={\balancecolumns}\eject % split what we have
\endgroup
% Back to normal single-column typesetting, but take account of the
% fact that we just accumulated some stuff on the output page.
\pagegoal=\vsize
}
\def\balancecolumns{%
% Called on the last page of the double column material.
\setbox0=\vbox{\unvbox255}%
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\divide\dimen@ by 2
\splittopskip = \topskip
% Loop until we get a decent breakpoint.
{\vbadness=10000 \loop \global\setbox3=\copy0
\global\setbox1=\vsplit3 to\dimen@
\ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}%
\setbox0=\vbox to\dimen@{\unvbox1}%
\setbox2=\vbox to\dimen@{\unvbox3}%
\pagesofar
}
\catcode `\@=\other
@@ -2887,10 +2951,10 @@ width0pt\relax} \fi
% NOTE on use of \vbox for chapter headings, section headings, and
% such:
% 1) We use \vbox rather than the earlier \line to permit
% overlong headings to fold.
% 2) \hyphenpenalty is set to 10000 because hyphenation in a
% heading is obnoxious; this forbids it.
% 1) We use \vbox rather than the earlier \line to permit
% overlong headings to fold.
% 2) \hyphenpenalty is set to 10000 because hyphenation in a
% heading is obnoxious; this forbids it.
% 3) Likewise, headings look best if no \parindent is used, and
% if justification is not attempted. Hence \raggedright.
@@ -3069,12 +3133,12 @@ width0pt\relax} \fi
\contentsalignmacro
\immediate\closeout \contentsfile
\ifnum \pageno>0
\pageno = -1 % Request roman numbered pages.
\pageno = -1 % Request roman numbered pages.
\fi
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
\unnumbchapmacro{#1}\def\thischapter{}%
\begingroup % Set up to handle contents files properly.
\begingroup % Set up to handle contents files properly.
\catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
\raggedbottom % Worry more about breakpoints than the bottom.
@@ -3100,6 +3164,7 @@ width0pt\relax} \fi
\secfonts
\let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
\rm
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
\def\secentry ##1##2##3##4{}
\def\unnumbsecentry ##1##2{}
@@ -3143,7 +3208,7 @@ width0pt\relax} \fi
% This space should be plenty, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in in \shortchapentry above.)
% the label; that gets put in by \shortchapentry above.)
\advance\dimen0 by 1.1em
\hbox to \dimen0{#1\hfil}%
}
@@ -3164,22 +3229,21 @@ width0pt\relax} \fi
\dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
% This parameter controls the indentation of the various levels.
\newdimen\tocindent \tocindent = 3pc
% Now for the actual typesetting. In all these, #1 is the text and #2 is the
% page number.
%
% If the toc has to be broken over pages, we would want to be at chapters
% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
\def\dochapentry#1#2{%
\penalty-300 \vskip\baselineskip
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
\chapentryfonts
\tocentry{#1}{\dopageno{#2}}%
\endgroup
\nobreak\vskip .25\baselineskip
\nobreak\vskip .25\baselineskip plus.1\baselineskip
}
\def\dosecentry#1#2{\begingroup
@@ -3204,7 +3268,7 @@ width0pt\relax} \fi
%
% \turnoffactive is for the sake of @" used for umlauts.
\def\tocentry#1#2{\begingroup
\hyphenpenalty = 10000
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
\entry{\turnoffactive #1}{\turnoffactive #2}%
\endgroup}
@@ -3229,8 +3293,6 @@ width0pt\relax} \fi
\newbox\pushcharbox \newbox\bullbox
\newbox\equivbox \newbox\errorbox
\let\ptexequiv = \equiv
%{\tentt
%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
@@ -3277,7 +3339,7 @@ width0pt\relax} \fi
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
\catcode `\%=14
\catcode 43=12
\catcode 43=12 % plus
\catcode`\"=12
\catcode`\==12
\catcode`\|=12
@@ -3285,6 +3347,7 @@ width0pt\relax} \fi
\catcode`\>=12
\escapechar=`\\
%
\let\,=\ptexcomma
\let\~=\ptextilde
\let\{=\ptexlbrace
\let\}=\ptexrbrace
@@ -3295,8 +3358,7 @@ width0pt\relax} \fi
\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}
\def\@{@}%
\let\bullet=\ptexbullet
\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
\let\L=\ptexL
\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
%
\let\Etex=\endgroup}
@@ -3355,50 +3417,50 @@ width0pt\relax} \fi
\def\cbl{{\circle\char'012\hskip -6pt}}
\def\cbr{{\hskip 6pt\circle\char'011}}
\def\carttop{\hbox to \cartouter{\hskip\lskip
\ctl\leaders\hrule height\circthick\hfil\ctr
\hskip\rskip}}
\ctl\leaders\hrule height\circthick\hfil\ctr
\hskip\rskip}}
\def\cartbot{\hbox to \cartouter{\hskip\lskip
\cbl\leaders\hrule height\circthick\hfil\cbr
\hskip\rskip}}
\cbl\leaders\hrule height\circthick\hfil\cbr
\hskip\rskip}}
%
\newskip\lskip\newskip\rskip
\long\def\cartouche{%
\begingroup
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt %we want these *outside*.
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
\cartouter=\hsize
\advance\cartouter by 18pt % allow for 3pt kerns on either
% side, and for 6pt waste from
% each corner char
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing=\comment
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
\hskip\lskip
\vrule\kern3pt
\vbox\bgroup
\hsize=\cartinner
\kern3pt
\begingroup
\baselineskip=\normbskip
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt %we want these *outside*.
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
\cartouter=\hsize
\advance\cartouter by 18pt % allow for 3pt kerns on either
% side, and for 6pt waste from
% each corner char
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing=\comment
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
\hskip\lskip
\vrule\kern3pt
\vbox\bgroup
\hsize=\cartinner
\kern3pt
\begingroup
\baselineskip=\normbskip
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
\def\Ecartouche{%
\endgroup
\kern3pt
\egroup
\kern3pt\vrule
\hskip\rskip
\egroup
\cartbot
\egroup
\endgroup
\kern3pt
\egroup
\kern3pt\vrule
\hskip\rskip
\egroup
\cartbot
\egroup
\endgroup
}}
@@ -4441,6 +4503,11 @@ width0pt\relax} \fi
\global\pageheight=\vsize
}
\bindingoffset=0pt
\normaloffset=\hoffset
\pagewidth=\hsize
\pageheight=\vsize
% Allow control of the text dimensions. Parameters in order: textheight;
% textwidth; voffset; hoffset; binding offset; topskip.
% All require a dimension;

View File

@@ -16,13 +16,6 @@
@syncodeindex pg cp
@syncodeindex vr cp
@ifinfo
@set Francois Franc,ois
@end ifinfo
@tex
@set Francois Fran\noexpand\ptexc cois
@end tex
@ifinfo
@format
START-INFO-DIR-ENTRY
@@ -150,7 +143,7 @@ The GNU text utilities are mostly compatible with the @sc{POSIX.2} standard.
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
@c sh-utils.texi too -- so be sure to keep them consistent.
@cindex bugs, reporting
Please report bugs to @samp{bug-gnu-utils@@prep.ai.mit.edu}. Remember
Please report bugs to @samp{textutils-bugs@@gnu.ai.mit.edu}. Remember
to include the version number, machine architecture, input files, and
any other information needed to reproduce the bug: your input, what you
expected, what you got, and why it is wrong. Diffs are welcome, but
@@ -160,7 +153,7 @@ sometimes difficult to infer. @xref{Bugs, , , gcc, GNU CC}.
This manual is based on the Unix man pages in the distribution, which
were originally written by David MacKenzie and updated by Jim Meyering.
The original @code{fmt} man page was written by Ross Paterson.
@value{Francois} Pinard did the initial conversion to Texinfo format.
Fran@,{c}ois Pinard did the initial conversion to Texinfo format.
Karl Berry did the indexing, some reorganization, and editing of the results.
Richard Stallman contributed his usual invaluable insights to the
overall process.
@@ -841,10 +834,12 @@ leaving the code unchanged.
@pindex pr
@cindex printing, preparing files for
@cindex multicolumn output, generating
@cindex merging files in parallel
@code{pr} writes each @var{file} (@samp{-} means standard input), or
standard input if none are given, to standard output, paginating and
optionally outputting in multicolumn format. Synopsis:
optionally outputting in multicolumn format; optionally merges all
@var{file}s, printing all in parallel, one per column. Synopsis:
@example
pr [@var{option}]@dots{} [@var{file}]@dots{}
@@ -852,33 +847,50 @@ pr [@var{option}]@dots{} [@var{file}]@dots{}
By default, a 5-line header is printed: two blank lines; a line with the
date, the file name, and the page count; and two more blank lines. A
five line footer (entirely) is also printed.
footer of five blank lines is also printed. With the @samp{-f} option, a
3-line header is printed: the leading two blank lines are omitted; no
footer used. The default @var{page_length} in both cases is 66 lines.
The text line of the header takes up the full @var{page_width} in the
form @samp{yy-mm-dd HH:MM string Page nnnn}. String is a centered
string.
Form feeds in the input cause page breaks in the output.
Form feeds in the input cause page breaks in the output. Multiple form
feeds produce empty pages.
Columns have equal width, separated by an optional string (default
space). Lines will always be truncated to line width (default 72),
unless you use the @samp{-j} option. For single column output no line
truncation occurs by default. Use @samp{-w} option to truncate lines
in that case.
The program accepts the following options. Also see @ref{Common options}.
@table @samp
@item +@var{page}
Begin printing with page @var{page}.
@item +@var{first_page}[@var{:last_page}]
@opindex +@var{first_page}[@var{:last_page}]
Begin printing with page @var{first_page} and stop with
@var{last_page}. Missing @samp{:LAST_PAGE} implies end of file. While
estimating the number of skipped pages each form feed in the input file
results in a new page. Page counting with and without
@samp{+@var{first_page}} is identical. By default, it starts with the
first page of input file (not first page printed). Page numbering may be
altered by @samp{-N} option.
@item -@var{column}
@opindex -@var{column}
Produce @var{column}-column output and print columns down. The column
width is automatically decreased as @var{column} increases; unless you
use the @samp{-w} option to increase the page width as well, this option
might well cause some input to be truncated.
@cindex down columns
With each single @var{file}, produce @var{column}-column output and
print columns down. The column width is automatically estimated from
@var{page_width}. This option might well cause some columns to be
truncated. The number of lines in the columns on each page will be
balanced. @samp{-@var{column}} may not be used with @samp{-m} option.
@item -a
@opindex -a
@cindex across columns
Print columns across rather than down.
@item -b
@opindex -b
@cindex balancing columns
Balance columns on the last page.
With each single @var{file}, print columns across rather than down.
@var{column} must be greater than one.
@item -c
@opindex -c
@@ -903,11 +915,19 @@ is 8).
@itemx -F
@opindex -F
@opindex -f
Use a formfeed instead of newlines to separate output pages.
Use a form feed instead of newlines to separate output pages. Default
page length of 66 lines is not altered. But the number of lines of text
per page changes from 56 to 63 lines.
@item -h @var{header}
@item -h @var{HEADER}
@opindex -h
Replace the file name in the header with the string @var{header}.
Replace the file name in the header with the centered string
@var{header}. Left-hand-side truncation (marked by a @samp{*}) may occur
if the total header line @samp{yy-mm-dd HH:MM HEADER Page nnnn}
becomes larger than @var{page_width}. @samp{-h ""} prints a blank line
header. Don't use @samp{-h""}. A space between the -h option and the
argument is always peremptory.
@item -i[@var{out-tabchar}[@var{out-tabwidth}]]
@opindex -i
@@ -917,30 +937,54 @@ is the output tab character (default is @key{TAB}). Second optional
argument @var{out-tabwidth} is the output tab character's width (default
is 8).
@item -l @var{n}
@item -j
@opindex -j
Merge lines of full length. Used together with the column options
@samp{-@var{column}}, @samp{-a -@var{column}} or @samp{-m}. Turns off
@samp{-w} line truncation; no column alignment used; may be used with
@samp{-s[@var{separator}]}.
@item -l @var{page_length}
@opindex -l
Set the page length to @var{n} (default 66) lines. If @var{n} is less
than 10, the headers and footers are omitted, as if the @samp{-t} option
had been given.
Set the page length to @var{page_length} (default 66) lines. If
@var{page_length} is less than or equal 10 (and <= 3 with @samp{-f}),
the headers and footers are omitted, and all form feeds set in input
files are eliminated, as if the @samp{-T} option had been given.
@item -m
@opindex -m
Print all files in parallel, one in each column.
Merge and print all @var{file}s in parallel, one in each column. If a
line is too long to fit in a column, it is truncated (but see
@samp{-j}). @samp{-s[@var{separator}]} may be used. Empty pages in some
@var{file}s (form feeds set) produce empty columns, still marked by
@var{separator}. Completely empty common pages show no separators or
line numbers. The default header becomes
@samp{yy-mm-dd HH:MM <blanks> Page nnnn}; may be used with
@samp{-h @var{header}} to fill up the middle part.
@item -n[@var{number-separator}[@var{digits}]]
@opindex -n
Precede each column with a line number; with parallel files (@samp{-m}),
precede each line with a line number. Optional argument
Precede each column with a line number; with parallel @var{file}s
(@samp{-m}), precede only each line with a line number. Optional argument
@var{number-separator} is the character to print after each number
(default is @key{TAB}). Optional argument @var{digits} is the number of
digits per line number (default is 5).
digits per line number (default is 5). Default line counting starts with
first line of the input file (not with the first line printed, see
@samp{-N}).
@item -N @var{line_number}
@opindex -N
Start line counting with no. @var{line_number} at first line of first
page printed.
@item -o @var{n}
@opindex -o
@cindex indenting lines
@cindex left margin
Indent each line with @var{n} (default is zero) spaces wide, i.e., set
the left margin. The total page width is @samp{n} plus the width set
the left margin. The total page width is @var{n} plus the width set
with the @samp{-w} option.
@item -r
@@ -948,25 +992,44 @@ with the @samp{-w} option.
Do not print a warning message when an argument @var{file} cannot be
opened. (The exit status will still be nonzero, however.)
@item -s[@var{c}]
@item -s[@var{separator}]
@opindex -s
Separate columns by the single character @var{c}. If @var{c} is
omitted, the default is space; if this option is omitted altogether, the
default is @key{TAB}.
Separate columns by a string @var{separator}. Don't use
@samp{-s @var{separator}}, no space between flag and argument. If this
option is omitted altogether, the default is a space, same as
@samp{-s" "}. With @samp{-s} only, no separator is used, same as
@samp{-s""}. @samp{-s} does not affect line truncation or column
alignment.
@item -t
@opindex -t
Do not print the usual 5-line header and the 5-line footer on each page,
and do not fill out the bottoms of pages (with blank lines or
formfeeds).
Do not print the usual header [and footer] on each page, and do not fill
out the bottoms of pages (with blank lines or a form feed). No page
structure is produced, but retain form feeds set in the input files. The
predefined page layout is not changed. @samp{-t} or @samp{-T} may be
useful together with other options; e.g.: @samp{-t -e4}, expand
@key{TAB} in the input file to 4 spaces but do not do any other changes.
Use of @samp{-t} overrides @samp{-h}.
@item -T
@opindex -T
Do not print header [and footer]. In addition eliminate all form feeds
set in the input files.
@item -v
@opindex -v
Print unprintable characters in octal backslash notation.
@item -w @var{n}
@item -w @var{page_width}
@opindex -w
Set the page width to @var{n} (default is 72) columns.
Set the page width to @var{page_width} (default 72) characters.
With/without @samp{-w}, header lines are always truncated to
@var{page_width} characters. With @samp{-w}, text lines are truncated,
unless @samp{-j} is used. Without @samp{-w} together with one of the
column options @samp{-@var{column}}, @samp{-a -@var{column}} or
@samp{-m}, default truncation of text lines to 72 characters is used.
Without @samp{-w} and without any of the column options, no line
truncation is used. That's equivalent to @samp{-w 72 -j}.
@end table

View File

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

View File

@@ -1,46 +1,25 @@
## Process this file with automake to produce Makefile.in
noinst_LIBRARIES = fu
noinst_LIBRARIES = libfu.a
EXTRA_DIST = alloca.c basename.c error.c euidaccess.c fnmatch.c fsusage.c \
ftruncate.c getdate.y group-member.c memcmp.c memcpy.c memset.c \
mkdir.c mktime.c mountlist.c obstack.c posixtm.y regex.c rx.c \
rename.c rmdir.c rpmatch.c \
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
## FIXME: Remove mvdir.c, and rmdir.c when
## automake is fixed -- probably for 1.1g
EXTRA_DIST = mkdir.c rmdir.c getline.c mktime.c strftime.c
INCLUDES = -I.. -I$(srcdir)
INCLUDES = -I.. -I$(srcdir) -I../intl
fu_SOURCES = getdate.c getline.c getopt.c getopt1.c posixtm.c \
argmatch.c backupfile.c \
dirname.c fileblocks.c filemode.c \
libfu_a_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
argmatch.c backupfile.c dirname.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
fu_LIBADD = @LIBOBJS@ @ALLOCA@
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
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 path-concat.h pathmax.h regex.h rx.h \
mountlist.h path-concat.h pathmax.h \
save-cwd.h xstrtol.h xstrtoul.h
BUILT_SOURCES = getdate.c posixtm.c
# Since this directory contains two parsers, we have to be careful to avoid
# running two $(YACC)s during parallel makes. See below.
getdate.c: @MAINT@getdate.y
@echo expect 10 shift/reduce conflicts
$(YACC) $(srcdir)/getdate.y
mv y.tab.c getdate.c
# Make the rename atomic, in case sed is interrupted and later rerun.
# The artificial dependency on getdate.c keeps the two parsers from being
# built in parallel. Enforcing this little bit of sequentiality lets
# everyone (even those without bison) still run mostly parallel builds.
posixtm.c: @MAINT@posixtm.y getdate.c
$(YACC) $(srcdir)/posixtm.y
mv y.tab.c posixtm.tab.c
sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
mv tposixtm.c posixtm.c
rm -f posixtm.tab.c

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.1e from Makefile.am
# Makefile.in generated automatically by automake 1.1l from Makefile.am
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -37,102 +37,111 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
YACC = @YACC@
GENCAT = @GENCAT@
PERL = @PERL@
MV = @MV@
GMSGFMT = @GMSGFMT@
CC = @CC@
RANLIB = @RANLIB@
LN = @LN@
RM = @RM@
noinst_LIBRARIES = fu
noinst_LIBRARIES = libfu.a
EXTRA_DIST = alloca.c basename.c error.c euidaccess.c fnmatch.c fsusage.c \
ftruncate.c getdate.y group-member.c memcmp.c memcpy.c memset.c \
mkdir.c mktime.c mountlist.c obstack.c posixtm.y regex.c rx.c \
rename.c rmdir.c rpmatch.c \
stpcpy.c strcasecmp.c strdup.c strndup.c strstr.c strtol.c strtoul.c
EXTRA_DIST = mkdir.c rmdir.c getline.c mktime.c strftime.c
INCLUDES = -I.. -I$(srcdir)
INCLUDES = -I.. -I$(srcdir) -I../intl
fu_SOURCES = getdate.c getline.c getopt.c getopt1.c posixtm.c \
argmatch.c backupfile.c \
dirname.c fileblocks.c filemode.c \
libfu_a_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
argmatch.c backupfile.c dirname.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
fu_LIBADD = @LIBOBJS@ @ALLOCA@
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
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 path-concat.h pathmax.h regex.h rx.h \
mountlist.h path-concat.h pathmax.h \
save-cwd.h xstrtol.h xstrtoul.h
BUILT_SOURCES = getdate.c posixtm.c
mkinstalldirs = $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
LIBRARIES = $(noinst_LIBRARIES)
noinst_LIBFILES = libfu.a
DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
fu_DEPENDENCIES = @LIBOBJS@ @ALLOCA@
fu_OBJECTS = getdate.o getline.o getopt.o getopt1.o posixtm.o argmatch.o \
backupfile.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 = $(pkglib_LIBFILES) $(noinst_LIBFILES) $(check_LIBFILES) \
$(lib_LIBFILES)
libfu_a_OBJECTS = getdate.o posixtm.o getopt.o getopt1.o argmatch.o \
backupfile.o dirname.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
AR = ar
RANLIB = @RANLIB@
CC = @CC@
INTERLOCK = ./interlock
YLWRAP = ./ylwrap
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
HEADERS = $(noinst_HEADERS)
HEADERS = $(noinst_HEADERS)
DIST_COMMON = Makefile.am Makefile.in alloca.c error.c fileblocks.c \
fnmatch.c fsusage.c ftruncate.c getline.c mountlist.c obstack.c regex.c \
regex.h rx.c rx.h
DIST_COMMON = Makefile.am Makefile.in alloca.c basename.c error.c \
error.h euidaccess.c fileblocks.c fnmatch.c fsusage.c ftruncate.c \
getdate.c getline.c getloadavg.c group-member.c interlock memcmp.c \
memcpy.c memset.c mkdir.c mktime.c mountlist.c obstack.c obstack.h \
posixtm.c regex.c regex.h rename.c rmdir.c rpmatch.c rx.c rx.h stpcpy.c \
strcasecmp.c strdup.c strftime.c strndup.c strstr.c strtol.c strtoul.c \
ylwrap
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
$(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
$(TEXINFOS) $(MANS) $(EXTRA_DIST)
TAR = tar
DEP_FILES = .deps/alloca.P .deps/argmatch.P .deps/backupfile.P \
.deps/dirname.P .deps/error.P .deps/fileblocks.P .deps/filemode.P \
.deps/fnmatch.P .deps/fsusage.P .deps/ftruncate.P .deps/full-write.P \
.deps/getdate.P .deps/getline.P .deps/getopt.P .deps/getopt1.P \
.deps/getversion.P .deps/idcache.P .deps/isdir.P .deps/long-options.P \
.deps/makepath.P .deps/modechange.P .deps/mountlist.P .deps/obstack.P \
.deps/path-concat.P .deps/posixtm.P .deps/regex.P .deps/rx.P \
.deps/safe-read.P .deps/save-cwd.P .deps/savedir.P .deps/stripslash.P \
DEP_FILES = .deps/alloca.P .deps/argmatch.P .deps/backupfile.P \
.deps/basename.P .deps/dirname.P .deps/error.P .deps/euidaccess.P \
.deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P .deps/fsusage.P \
.deps/ftruncate.P .deps/full-write.P .deps/getdate.P .deps/getline.P \
.deps/getloadavg.P .deps/getopt.P .deps/getopt1.P .deps/getversion.P \
.deps/group-member.P .deps/idcache.P .deps/isdir.P .deps/long-options.P \
.deps/makepath.P .deps/memcmp.P .deps/memcpy.P .deps/memset.P \
.deps/mkdir.P .deps/mktime.P .deps/modechange.P .deps/mountlist.P \
.deps/obstack.P .deps/path-concat.P .deps/posixtm.P .deps/regex.P \
.deps/rename.P .deps/rmdir.P .deps/rpmatch.P .deps/rx.P \
.deps/safe-read.P .deps/save-cwd.P .deps/savedir.P .deps/stpcpy.P \
.deps/strcasecmp.P .deps/strdup.P .deps/strftime.P .deps/stripslash.P \
.deps/strndup.P .deps/strstr.P .deps/strtol.P .deps/strtoul.P \
.deps/userspec.P .deps/xgetcwd.P .deps/xmalloc.P .deps/xstrdup.P \
.deps/xstrtol.P .deps/xstrtoul.P .deps/yesno.P
SOURCES = $(fu_SOURCES)
OBJECTS = $(fu_OBJECTS)
SOURCES = $(libfu_a_SOURCES)
OBJECTS = $(libfu_a_OBJECTS)
default: all
.SUFFIXES:
.SUFFIXES: .c .o .y
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL)
cd $(top_srcdir) && automake --gnu lib/Makefile
$(srcdir)/Makefile.in: @MAINT@Makefile.am $(top_srcdir)/configure.in
cd $(top_srcdir) && automake $(subdir)/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Makefile: $(top_builddir)/config.status Makefile.in
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
mostlyclean-noinstLIBRARIES:
clean-noinstLIBRARIES:
test -z "$(noinst_LIBFILES)" || rm -f $(noinst_LIBFILES)
test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
distclean-noinstLIBRARIES:
@@ -150,20 +159,28 @@ distclean-compile:
rm -f *.tab.c
maintainer-clean-compile:
$(fu_OBJECTS): ../config.h
$(libfu_a_OBJECTS): ../config.h
libfu.a: $(fu_OBJECTS) $(fu_DEPENDENCIES)
libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
rm -f libfu.a
$(AR) cru libfu.a $(fu_OBJECTS) $(fu_LIBADD)
$(AR) cru libfu.a $(libfu_a_OBJECTS) $(libfu_a_LIBADD)
$(RANLIB) libfu.a
.y.c:
$(SHELL) $(INTERLOCK) =yacclockdir $(YLWRAP) "$(YACC)" y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS) $<
tags: TAGS
ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
tags=; \
here=`pwd`; \
list="$(SUBDIRS)"; for subdir in $$list; do \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
done; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$$tags" \
|| cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) -o $$here/TAGS
mostlyclean-tags:
@@ -177,17 +194,18 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = lib
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
.deps/.P:
test -d .deps || mkdir .deps
echo > $@
@@ -204,21 +222,15 @@ maintainer-clean-depend:
rm -rf .deps
.deps/%.P: $(srcdir)/%.c
$(MKDEP) $< > $@-tmp
if test -n "$o"; then \
sed 's/\.o:/$$o:/' $@-tmp > $@; \
rm $@-tmp; \
else \
mv $@-tmp $@; \
fi
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< | sed "s/^\(.*\)\.o:/\1.$$o \1.l$$o:/" > $@
info:
dvi:
check: all
$(MAKE)
installcheck:
install-exec:
$(NORMAL_INSTALL)
@@ -230,7 +242,7 @@ install: install-exec install-data all
uninstall:
all: $(LIBFILES) $(HEADERS) Makefile
all: $(LIBRARIES) $(BUILT_SOURCES) $(HEADERS) Makefile
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
@@ -242,11 +254,11 @@ 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)
rm -f config.cache config.log $(CONFIG_HEADER) stamp-h
rm -f config.cache config.log stamp-h
test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
@@ -255,16 +267,16 @@ mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
clean: clean-noinstLIBRARIES clean-compile clean-tags clean-depend \
clean-generic mostlyclean
clean-generic mostlyclean
distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
distclean-depend distclean-generic clean
distclean-depend distclean-generic clean
rm -f config.status
maintainer-clean: maintainer-clean-noinstLIBRARIES \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean
distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@@ -273,32 +285,12 @@ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info dvi check \
distclean-depend clean-depend maintainer-clean-depend info dvi \
installcheck install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Since this directory contains two parsers, we have to be careful to avoid
# running two $(YACC)s during parallel makes. See below.
getdate.c: @MAINT@getdate.y
@echo expect 10 shift/reduce conflicts
$(YACC) $(srcdir)/getdate.y
mv y.tab.c getdate.c
# Make the rename atomic, in case sed is interrupted and later rerun.
# The artificial dependency on getdate.c keeps the two parsers from being
# built in parallel. Enforcing this little bit of sequentiality lets
# everyone (even those without bison) still run mostly parallel builds.
posixtm.c: @MAINT@posixtm.y getdate.c
$(YACC) $(srcdir)/posixtm.y
mv y.tab.c posixtm.tab.c
sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
mv tposixtm.c posixtm.c
rm -f posixtm.tab.c
.SUFFIXES:
.SUFFIXES: .c .o
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,37 +1,42 @@
/*
alloca -- (mostly) portable public-domain implementation -- D A Gwyn
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
last edit: 86/05/30 rms
include config.h, since on VMS it renames some symbols.
Use xmalloc instead of malloc.
This implementation of the PWB library alloca function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
J.Otto Tennant <jot@cray.com> contributed the Cray support.
This implementation of the PWB library alloca() function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
It should work under any C implementation that uses an
actual procedure stack (as opposed to a linked list of
frames). There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
The general concept of this implementation is to keep
track of all alloca()-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection.
*/
#ifndef lint
static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef emacs
#include "config.h"
#include "blockinput.h"
#endif
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
#ifndef alloca
#ifdef emacs
#ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
@@ -45,72 +50,90 @@ lose
#endif /* static */
#endif /* emacs */
#ifndef alloca /* If compiling with GCC, this file's not needed. */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
#ifdef __STDC__
typedef void *pointer; /* generic pointer type */
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
#else
typedef char *pointer; /* generic pointer type */
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
#define NULL 0 /* null pointer constant */
#if __STDC__
typedef void *pointer;
#else
typedef char *pointer;
#endif
extern void free();
extern pointer xmalloc();
#define NULL 0
/*
Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc, because
ordinary malloc isn't protected from input signals. On the other
hand, the utilities in lib-src need alloca to call malloc; some of
them are very simple, and don't have an xmalloc routine.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
Non-Emacs programs expect this to call xmalloc.
Callers below should use malloc. */
#ifndef emacs
#define malloc xmalloc
#endif
extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#ifndef STACK_DIRECTION
#define STACK_DIRECTION 0 /* direction unknown */
#define STACK_DIRECTION 0 /* Direction unknown. */
#endif
#if STACK_DIRECTION != 0
#define STACK_DIR STACK_DIRECTION /* known at compile-time */
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
#else /* STACK_DIRECTION == 0; need run-time code */
#else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known */
static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir
static void
find_stack_direction (/* void */)
find_stack_direction ()
{
static char *addr = NULL; /* address of first
`dummy', once known */
auto char dummy; /* to get stack address */
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
if (addr == NULL)
{ /* initial entry */
addr = &dummy;
{ /* Initial entry. */
addr = ADDRESS_FUNCTION (dummy);
find_stack_direction (); /* recurse once */
find_stack_direction (); /* Recurse once. */
}
else
{
/* Second entry. */
if (ADDRESS_FUNCTION (dummy) > addr)
stack_dir = 1; /* Stack grew upward. */
else
stack_dir = -1; /* Stack grew downward. */
}
else /* second entry */
if (&dummy > addr)
stack_dir = 1; /* stack grew upward */
else
stack_dir = -1; /* stack grew downward */
}
#endif /* STACK_DIRECTION == 0 */
#endif /* STACK_DIRECTION == 0 */
/*
An "alloca header" is used to:
(a) chain together all alloca()ed blocks;
(b) keep track of stack depth.
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
(b) keep track of stack depth.
It is very important that sizeof(header) agree with malloc()
alignment chunk size. The following default should work okay.
*/
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
#ifndef ALIGN_SIZE
#define ALIGN_SIZE sizeof(double)
@@ -118,77 +141,352 @@ find_stack_direction (/* void */)
typedef union hdr
{
char align[ALIGN_SIZE]; /* to force sizeof(header) */
char align[ALIGN_SIZE]; /* To force sizeof(header). */
struct
{
union hdr *next; /* for chaining headers */
char *deep; /* for stack depth measure */
union hdr *next; /* For chaining headers. */
char *deep; /* For stack depth measure. */
} h;
} header;
/*
alloca( size ) returns a pointer to at least `size' bytes of
storage which will be automatically reclaimed upon exit from
the procedure that called alloca(). Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32.
*/
static header *last_alloca_header = NULL; /* -> last alloca header. */
static header *last_alloca_header = NULL; /* -> last alloca header */
/* Return a pointer to at least SIZE bytes of storage,
which will be automatically reclaimed upon exit from
the procedure that called alloca. Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
pointer
alloca (size) /* returns pointer to storage */
unsigned size; /* # bytes to allocate */
alloca (size)
unsigned size;
{
auto char probe; /* probes stack depth: */
register char *depth = &probe;
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
#if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* unknown growth direction */
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
#endif
/* Reclaim garbage, defined as all alloca()ed storage that
was allocated from deeper in the stack than currently. */
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
{
register header *hp; /* traverses linked list */
register header *hp; /* Traverses linked list. */
#ifdef emacs
BLOCK_INPUT;
#endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
{
register header *np = hp->h.next;
register header *np = hp->h.next;
free ((pointer) hp); /* collect garbage */
free ((pointer) hp); /* Collect garbage. */
hp = np; /* -> next header */
hp = np; /* -> next header. */
}
else
break; /* rest are not deeper */
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage */
last_alloca_header = hp; /* -> last valid storage. */
#ifdef emacs
UNBLOCK_INPUT;
#endif
}
if (size == 0)
return NULL; /* no allocation required */
return NULL; /* No allocation required. */
/* Allocate combined header + user data storage. */
/* Allocate combined header + user data storage. */
{
register pointer new = xmalloc (sizeof (header) + size);
/* address of header */
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
((header *)new)->h.next = last_alloca_header;
((header *)new)->h.deep = depth;
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;
last_alloca_header = (header *)new;
last_alloca_header = (header *) new;
/* User storage begins just after header. */
/* User storage begins just after header. */
return (pointer)((char *)new + sizeof(header));
return (pointer) ((char *) new + sizeof (header));
}
}
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
#ifdef DEBUG_I00AFUNC
#include <stdio.h>
#endif
#ifndef CRAY_STACK
#define CRAY_STACK
#ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
long shgrow:32; /* Number of times stack has grown. */
long shaseg:32; /* Size of increments to stack. */
long shhwm:32; /* High water mark of stack. */
long shsize:32; /* Current size of stack (all segments). */
};
/* The stack segment linkage control information occurs at
the high-address end of a stack segment. (The stack
grows from low addresses to high addresses.) The initial
part of the stack segment linkage control information is
0200 (octal) words. This provides for register storage
for the routine which overflows the stack. */
struct stack_segment_linkage
{
long ss[0200]; /* 0200 overflow words. */
long sssize:32; /* Number of words in this segment. */
long ssbase:32; /* Offset to stack base. */
long:32;
long sspseg:32; /* Offset to linkage control of previous
segment of stack. */
long:32;
long sstcpt:32; /* Pointer to task common address block. */
long sscsnm; /* Private control structure number for
microtasking. */
long ssusr1; /* Reserved for user. */
long ssusr2; /* Reserved for user. */
long sstpid; /* Process ID for pid based multi-tasking. */
long ssgvup; /* Pointer to multitasking thread giveup. */
long sscray[7]; /* Reserved for Cray Research. */
long ssa0;
long ssa1;
long ssa2;
long ssa3;
long ssa4;
long ssa5;
long ssa6;
long ssa7;
long sss0;
long sss1;
long sss2;
long sss3;
long sss4;
long sss5;
long sss6;
long sss7;
};
#else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
{
long now; /* Current total stack size. */
long maxc; /* Amount of contiguous space which would
be required to satisfy the maximum
stack demand to date. */
long high_water; /* Stack high-water mark. */
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
long hits; /* Number of internal buffer hits. */
long extends; /* Number of block extensions. */
long stko_mallocs; /* Block allocations by $STKOFEN. */
long underflows; /* Number of stack underflow calls ($STKRETN). */
long stko_free; /* Number of deallocations by $STKRETN. */
long stkm_free; /* Number of deallocations by $STKMRET. */
long segments; /* Current number of stack segments. */
long maxs; /* Maximum number of stack segments so far. */
long pad_size; /* Stack pad size. */
long current_address; /* Current stack segment address. */
long current_size; /* Current stack segment size. This
number is actually corrupted by STKSTAT to
include the fifteen word trailer area. */
long initial_address; /* Address of initial segment. */
long initial_size; /* Size of initial segment. */
};
/* The following structure describes the data structure which trails
any stack segment. I think that the description in 'asdef' is
out of date. I only describe the parts that I am sure about. */
struct stk_trailer
{
long this_address; /* Address of this block. */
long this_size; /* Size of this block (does not include
this trailer). */
long unknown2;
long unknown3;
long link; /* Address of trailer block of previous
segment. */
long unknown5;
long unknown6;
long unknown7;
long unknown8;
long unknown9;
long unknown10;
long unknown11;
long unknown12;
long unknown13;
long unknown14;
};
#endif /* CRAY2 */
#endif /* not CRAY_STACK */
#ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
{
struct stk_stat status;
struct stk_trailer *trailer;
long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
step is to get the stack status structure. We could do this
more quickly and more directly, perhaps, by referencing the
$LM00 common block, but I know that this works. */
STKSTAT (&status);
/* Set up the iteration. */
trailer = (struct stk_trailer *) (status.current_address
+ status.current_size
- 15);
/* There must be at least one stack segment. Therefore it is
a fatal error if "trailer" is null. */
if (trailer == 0)
abort ();
/* Discard segments that do not contain our argument address. */
while (trailer != 0)
{
block = (long *) trailer->this_address;
size = trailer->this_size;
if (block == 0 || size == 0)
abort ();
trailer = (struct stk_trailer *) trailer->link;
if ((block <= address) && (address < (block + size)))
break;
}
/* Set the result to the offset in this segment and add the sizes
of all predecessor segments. */
result = address - block;
if (trailer == 0)
{
return result;
}
do
{
if (trailer->this_size <= 0)
abort ();
result += trailer->this_size;
trailer = (struct stk_trailer *) trailer->link;
}
while (trailer != 0);
/* We are done. Note that if you present a bogus address (one
not in any segment), you will get a different number back, formed
from subtracting the address of the first block. This is probably
not what you want. */
return (result);
}
#else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
routine is to linearize, in some sense, stack addresses
for alloca. */
static long
i00afunc (long address)
{
long stkl = 0;
long size, pseg, this_segment, stack;
long result = 0;
struct stack_segment_linkage *ssptr;
/* Register B67 contains the address of the end of the
current stack segment. If you (as a subprogram) store
your registers on the stack and find that you are past
the contents of B67, you have overflowed the segment.
B67 also points to the stack segment linkage control
area, which is what we are really interested in. */
stkl = CRAY_STACKSEG_END ();
ssptr = (struct stack_segment_linkage *) stkl;
/* If one subtracts 'size' from the end of the segment,
one has the address of the first word of the segment.
If this is not the first segment, 'pseg' will be
nonzero. */
pseg = ssptr->sspseg;
size = ssptr->sssize;
this_segment = stkl - size;
/* It is possible that calling this routine itself caused
a stack overflow. Discard stack segments which do not
contain the target address. */
while (!(this_segment <= address && address <= stkl))
{
#ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
#endif
if (pseg == 0)
break;
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
this_segment = stkl - size;
}
result = address - this_segment;
/* If you subtract pseg from the current end of the stack,
you get the address of the previous stack segment's end.
This seems a little convoluted to me, but I'll bet you save
a cycle somewhere. */
while (pseg != 0)
{
#ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
#endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
result += size;
}
return (result);
}
#endif /* not CRAY2 */
#endif /* CRAY */
#endif /* no alloca */
#endif /* not GCC version 2 */

View File

@@ -22,6 +22,7 @@
# include <config.h>
#endif
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif

View File

@@ -1,23 +1,23 @@
/* error.c -- error handler for noninteractive utilities
Copyright (C) 1990, 91, 92, 93, 94, 95, 96 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -47,6 +47,9 @@ void exit ();
# define _(String) String
#endif
/* Get prototypes for the functions defined here. */
#include <error.h>
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
@@ -65,7 +68,7 @@ unsigned int error_message_count;
# define program_name program_invocation_name
# include <errno.h>
#else
#else /* not _LIBC */
/* The calling program should define program_name and set it to the
name of the executing program. */
@@ -89,7 +92,7 @@ private_strerror (errnum)
}
# define strerror private_strerror
# endif /* HAVE_STRERROR */
#endif /* _LIBC */
#endif /* not _LIBC */
/* Print the program name and error message MESSAGE, which is a printf-style
format string with optional args.

View File

@@ -1,22 +1,22 @@
/* error.h -- declaration for error-reporting function
Copyright (C) 1995, 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 _error_h_
# define _error_h_
#ifndef ERROR_H_
# define ERROR_H_
# ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
@@ -62,4 +62,4 @@ extern unsigned int error_message_count;
variable controls whether this mode is selected or not. */
extern int error_one_per_line;
#endif /* _error_h_ */
#endif /* not ERROR_H_ */

View File

@@ -198,6 +198,17 @@ ftypelet (bits)
if (S_ISNWK (bits))
return 'n';
#endif
#ifdef S_ISOFD
/* Cray migrated dmf file. */
if (S_ISOFD (bits))
return 'M';
#endif
#ifdef S_ISOFL
/* Cray migrated dmf file. */
if (S_ISOFL (bits))
return 'M';
#endif
return '?';
}

View File

@@ -1,30 +1,38 @@
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
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.
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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <errno.h>
#include <fnmatch.h>
#include <ctype.h>
#if defined (STDC_HEADERS) || !defined (isascii)
# define ISASCII(c) 1
#else
# define ISASCII(c) isascii(c)
#endif
#define ISUPPER(c) (ISASCII (c) && isupper (c))
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
@@ -37,9 +45,9 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
#ifndef errno
# ifndef errno
extern int errno;
#endif
# endif
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
@@ -53,7 +61,7 @@ fnmatch (pattern, string, flags)
register char c;
/* Note that this evalutes C many times. */
#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
while ((c = *p++) != '\0')
{
@@ -197,6 +205,8 @@ fnmatch (pattern, string, flags)
return 0;
return FNM_NOMATCH;
# undef FOLD
}
#endif /* _LIBC or not __GNU_LIBRARY__. */

View File

@@ -1,5 +1,5 @@
/* fsusage.c -- return space usage of mounted filesystems
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Copyright (C) 1991, 1992, 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
@@ -15,8 +15,8 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
@@ -25,40 +25,40 @@
int statfs ();
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#if HAVE_SYS_MOUNT_H
# include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#if HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */
#include <sys/fs/s5param.h>
#if 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. */
#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY)
# include <sys/filsys.h> /* SVR2 */
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#if HAVE_FCNTL_H
# include <fcntl.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#if HAVE_SYS_STATFS_H
# include <sys/statfs.h>
#endif
#ifdef HAVE_DUSTAT_H /* AIX PS/2. */
#include <sys/dustat.h>
#if HAVE_DUSTAT_H /* AIX PS/2 */
# include <sys/dustat.h>
#endif
#ifdef HAVE_SYS_STATVFS_H /* SVR4. */
#include <sys/statvfs.h>
#if HAVE_SYS_STATVFS_H /* SVR4 */
# include <sys/statvfs.h>
int statvfs ();
#endif
@@ -78,11 +78,11 @@ adjust_blocks (blocks, fromsize, tosize)
if (fromsize <= 0)
return -1;
if (fromsize == tosize) /* E.g., from 512 to 512. */
if (fromsize == tosize) /* e.g., from 512 to 512 */
return blocks;
else if (fromsize > tosize) /* E.g., from 2048 to 512. */
else if (fromsize > tosize) /* e.g., from 2048 to 512 */
return blocks * (fromsize / tosize);
else /* E.g., from 256 to 512. */
else /* e.g., from 256 to 512 */
return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize);
}
@@ -90,42 +90,56 @@ adjust_blocks (blocks, fromsize, tosize)
the filesystem on which PATH resides.
DISK is the device on which PATH is mounted, for space-getting
methods that need to know it.
Return 0 if successful, -1 if not. */
Return 0 if successful, -1 if not. When returning -1, ensure that
ERRNO is either a system error value, or zero if DISK is NULL
on a system that requires a non-NULL value. */
int
get_fs_usage (path, disk, fsp)
const char *path;
const char *disk;
struct fs_usage *fsp;
{
#if defined (STAT_STATFS3_OSF1)
#ifdef STAT_STATFS3_OSF1
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512)
struct statfs fsd;
if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
return -1;
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_fsize, 512)
#endif /* STAT_STATFS3_OSF1 */
#ifdef STAT_STATFS2_FS_DATA /* Ultrix. */
#ifdef STAT_STATFS2_FS_DATA /* Ultrix */
# define CONVERT_BLOCKS(B) adjust_blocks ((B), 1024, 512)
struct fs_data fsd;
if (statfs (path, &fsd) != 1)
return -1;
#define CONVERT_BLOCKS(b) adjust_blocks ((b), 1024, 512)
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.fd_req.btot);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.fd_req.bfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.fd_req.bfreen);
fsp->fsu_files = fsd.fd_req.gtot;
fsp->fsu_ffree = fsd.fd_req.gfree;
#endif
#ifdef STAT_READ_FILSYS /* SVR2. */
#ifndef SUPERBOFF
#define SUPERBOFF (SUPERB * 512)
#endif
#endif /* STAT_STATFS2_FS_DATA */
#ifdef STAT_READ_FILSYS /* SVR2 */
# ifndef SUPERBOFF
# define SUPERBOFF (SUPERB * 512)
# endif
# define CONVERT_BLOCKS(B) \
adjust_blocks ((B), (fsd.s_type == Fs2b ? 1024 : 512), 512)
struct filsys fsd;
int fd;
if (! disk)
{
errno = 0;
return -1;
}
fd = open (disk, O_RDONLY);
if (fd < 0)
return -1;
@@ -136,21 +150,24 @@ get_fs_usage (path, disk, fsp)
return -1;
}
close (fd);
#define CONVERT_BLOCKS(b) adjust_blocks ((b), (fsd.s_type == Fs2b ? 1024 : 512), 512)
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.s_fsize);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.s_tfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.s_tfree);
fsp->fsu_files = (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1);
fsp->fsu_ffree = fsd.s_tinode;
#endif
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX. */
#endif /* STAT_READ_FILSYS */
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_bsize, 512)
struct statfs fsd;
if (statfs (path, &fsd) < 0)
return -1;
#ifdef STATFS_TRUNCATES_BLOCK_COUNTS
# ifdef STATFS_TRUNCATES_BLOCK_COUNTS
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
struct statfs are truncated to 2GB. These conditions detect that
truncation, presumably without botching the 4.1.1 case, in which
@@ -162,20 +179,35 @@ get_fs_usage (path, disk, fsp)
fsd.f_bfree = fsd.f_spare[1];
fsd.f_bavail = fsd.f_spare[2];
}
#endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_bsize, 512)
#endif
#endif /* STAT_STATFS2_BSIZE */
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512)
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD. */
struct statfs fsd;
if (statfs (path, &fsd) < 0)
return -1;
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_fsize, 512)
#endif
#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX. */
#endif /* STAT_STATFS2_FSIZE */
#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, 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 */
# ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
# define f_bavail f_bfree
# endif
# endif
# endif
struct statfs fsd;
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
@@ -183,38 +215,31 @@ 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 || 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. */
# ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
# define f_bavail f_bfree
# endif
# endif
# endif
#endif
#ifdef STAT_STATVFS /* SVR4. */
#endif /* STAT_STATFS4 */
#ifdef STAT_STATVFS /* SVR4 */
# define CONVERT_BLOCKS(B) \
adjust_blocks ((B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
struct statvfs fsd;
if (statvfs (path, &fsd) < 0)
return -1;
/* f_frsize isn't guaranteed to be supported. */
#define CONVERT_BLOCKS(b) \
adjust_blocks ((b), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
#endif
#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS) /* !Ultrix && !SVR2. */
#endif /* STAT_STATVFS */
#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS)
/* !Ultrix && !SVR2 */
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree);
fsp->fsu_bavail = CONVERT_BLOCKS (fsd.f_bavail);
fsp->fsu_files = fsd.f_files;
fsp->fsu_ffree = fsd.f_ffree;
#endif
#endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */
return 0;
}
@@ -245,4 +270,5 @@ statfs (path, fsb)
fsb->f_fsid.val[1] = fsd.du_pckno;
return 0;
}
#endif /* _AIX && _I386 */

View File

@@ -18,13 +18,13 @@
Copied largely from GNU C's cccp.c.
*/
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

View File

@@ -97,9 +97,52 @@ struct timeb
extern struct tm *gmtime ();
extern struct tm *localtime ();
#define yyparse getdate_yyparse
#define yylex getdate_yylex
#define yyerror getdate_yyerror
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple
yacc generated parsers in the same program. Note that these are only
the variables produced by yacc. If other parser generators (bison,
byacc, etc) produce additional global names that conflict at link time,
then those parser generators need to be fixed instead of adding those
names to this list. */
#define yymaxdepth gd_maxdepth
#define yyparse gd_parse
#define yylex gd_lex
#define yyerror gd_error
#define yylval gd_lval
#define yychar gd_char
#define yydebug gd_debug
#define yypact gd_pact
#define yyr1 gd_r1
#define yyr2 gd_r2
#define yydef gd_def
#define yychk gd_chk
#define yypgo gd_pgo
#define yyact gd_act
#define yyexca gd_exca
#define yyerrflag gd_errflag
#define yynerrs gd_nerrs
#define yyps gd_ps
#define yypv gd_pv
#define yys gd_s
#define yy_yys gd_yys
#define yystate gd_state
#define yytmp gd_tmp
#define yyv gd_v
#define yy_yyv gd_yyv
#define yyval gd_val
#define yylloc gd_lloc
#define yyreds gd_reds /* With YYDEBUG defined */
#define yytoks gd_toks /* With YYDEBUG defined */
#define yylhs gd_yylhs
#define yylen gd_yylen
#define yydefred gd_yydefred
#define yydgoto gd_yydgoto
#define yysindex gd_yysindex
#define yyrindex gd_yyrindex
#define yygindex gd_yygindex
#define yytable gd_yytable
#define yycheck gd_yycheck
static int yylex ();
static int yyerror ();
@@ -269,9 +312,22 @@ date : tUNUMBER '/' tUNUMBER {
yyDay = $3;
}
| tUNUMBER '/' tUNUMBER '/' tUNUMBER {
yyMonth = $1;
yyDay = $3;
yyYear = $5;
/* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY.
The goal in recognizing YYYY/MM/DD is solely to support legacy
machine-generated dates like those in an RCS log listing. If
you want portability, use the ISO 8601 format. */
if ($1 >= 1000)
{
yyYear = $1;
yyMonth = $3;
yyDay = $5;
}
else
{
yyMonth = $1;
yyDay = $3;
yyYear = $5;
}
}
| tUNUMBER tSNUMBER tSNUMBER {
/* ISO 8601 format. yyyy-mm-dd. */
@@ -634,7 +690,7 @@ Convert (Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
Year += 1900;
DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0)
? 29 : 28;
if (Year < EPOCH || Year >= DOOMSDAY
if (Year < EPOCH || Year > DOOMSDAY
|| Month < 1 || Month > 12
/* Lint fluff: "conversion from long may lose accuracy" */
|| Day < 1 || Day > DaysInMonth[(int)--Month])

View File

@@ -14,8 +14,8 @@ 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 _getline_h_
# define _getline_h_ 1
#ifndef GETLINE_H_
# define GETLINE_H_ 1
# include <stdio.h>
@@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif /* GCC. */
# endif /* Not PARAMS. */
# endif
# endif
int
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
@@ -33,4 +33,4 @@ getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
int
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
#endif
#endif /* not GETLINE_H_ */

View File

@@ -133,6 +133,14 @@ extern int errno;
#define hpux
#endif
#if defined (__hpux) && !defined (hpux)
#define hpux
#endif
#if defined (__sun) && !defined (sun)
#define sun
#endif
#if defined(hp300) && !defined(hpux)
#define MORE_BSD
#endif
@@ -141,6 +149,10 @@ extern int errno;
#define decstation
#endif
#if defined (__SVR4) && !defined (SVR4)
#define SVR4
#endif
#if (defined(sun) && defined(SVR4)) || defined (SOLARIS2)
#define SUNOS_5
#endif
@@ -354,7 +366,7 @@ extern int errno;
#define KERNEL_FILE "/hp-ux"
#endif
#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4) || (defined (ardent) && defined (titan)))
#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || (defined (ardent) && defined (titan)))
#define KERNEL_FILE "/unix"
#endif
@@ -382,6 +394,7 @@ extern int errno;
#ifdef LOAD_AVE_TYPE
#ifndef VMS
#ifndef __linux__
#ifndef NLIST_STRUCT
#include <a.out.h>
#else /* NLIST_STRUCT */
@@ -401,6 +414,7 @@ extern int errno;
#ifndef LDAV_SYMBOL
#define LDAV_SYMBOL "_avenrun"
#endif /* LDAV_SYMBOL */
#endif /* __linux__ */
#else /* VMS */
@@ -487,7 +501,7 @@ static int getloadavg_initialized;
/* Offset in kmem to seek to read load average, or 0 means invalid. */
static long offset;
#if !defined(VMS) && !defined(sgi)
#if !defined(VMS) && !defined(sgi) && !defined(__linux__)
static struct nlist nl[2];
#endif /* Not VMS or sgi */
@@ -529,7 +543,7 @@ getloadavg (loadavg, nelem)
ksp = kstat_lookup (kc, "unix", 0, "system_misc");
if (ksp == 0 ) return -1;
if (kstat_read (kc, ksp, 0) == -1) return -1;
kn = kstat_data_lookup (ksp, "avenrun_1min");
if (kn == 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 _GETOPT_H
#define _GETOPT_H 1

View File

@@ -177,7 +177,7 @@ readname (name, size, stream)
/* Skip blank space. */
while ((c = getc (stream)) != EOF && isspace (c))
/* Do nothing. */ ;
while (c != EOF && !isspace (c))
{
(*name)[name_index++] = c;

View File

@@ -17,13 +17,13 @@
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "backupfile.h"
#ifdef STDC_HEADERS
#if STDC_HEADERS
# include <stdlib.h>
#endif

View File

@@ -120,7 +120,7 @@ group_member (gid)
break;
}
}
free_group_info (gi);
return found;

View File

@@ -1,7 +1,7 @@
#ifndef _group_member_h_
# define _group_member_h_ 1
#ifndef GROUP_MEMBER_H_
# define GROUP_MEMBER_H_ 1
int
group_member ();
#endif /* _group_member_h_ */
#endif /* GROUP_MEMBER_H_ */

46
lib/interlock Executable file
View File

@@ -0,0 +1,46 @@
#! /bin/sh
# interlock - wrap program invocation in lock to allow
# parallel builds to work.
# Written by Tom Tromey <tromey@cygnus.com>, Aug 10 1996
#
# 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.
# Usage:
# interlock lock-dir-name program args-to-program...
dirname="$1"
program="$2"
shift
shift
while (mkdir $dirname > /dev/null 2>&1 && exit 1 || exit 0); do
# Wait a bit.
sleep 1
done
# Race condition here: if interrupted after the loop but before this
# trap, the lock can be left around.
trap "rmdir $dirname > /dev/null 2>&1" 1 2 3 15
# We have the lock, so run the program.
$program ${1+"$@"}
ret=$?
# Release the lock.
rmdir $dirname > /dev/null 2>&1
exit $ret

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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 `struct linebuffer' holds a line of text. */
@@ -24,20 +24,21 @@ struct linebuffer
char *buffer;
};
#undef __P
#undef PARAMS
#if defined (__STDC__) && __STDC__
#define __P(x) x
# define PARAMS(Args) Args
#else
#define __P(x) ()
# define PARAMS(Args) ()
#endif
/* Initialize linebuffer LINEBUFFER for use. */
void initbuffer __P ((struct linebuffer *linebuffer));
void initbuffer PARAMS ((struct linebuffer *linebuffer));
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
Remove any newline. Does not null terminate.
Return LINEBUFFER, except at end of file return 0. */
struct linebuffer *readline __P ((struct linebuffer *linebuffer, FILE *stream));
struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
FILE *stream));
/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
void freebuffer __P ((struct linebuffer *));
void freebuffer PARAMS ((struct linebuffer *));

View File

@@ -36,11 +36,12 @@ static struct option const long_options[] =
Be careful not to gobble up `--'. */
void
parse_long_options (argc, argv, command_name, version_string, usage)
parse_long_options (argc, argv, command_name, package, version, usage)
int argc;
char **argv;
const char *command_name;
const char *version_string;
const char *package;
const char *version;
void (*usage)();
{
int c;
@@ -62,7 +63,7 @@ parse_long_options (argc, argv, command_name, version_string, usage)
(*usage) (0);
case 'v':
printf ("%s - %s\n", command_name, version_string);
printf ("%s (%s) %s\n", command_name, package, version);
exit (0);
default:

View File

@@ -1,10 +1,31 @@
#undef __P
/* long-options.h -- declaration for --help- and --version-handling function.
Copyright (C) 1993, 1994 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. */
#undef PARAMS
#if defined (__STDC__) && __STDC__
#define __P(args) args
# define PARAMS(Args) Args
#else
#define __P(args) ()
# define PARAMS(Args) ()
#endif
void
parse_long_options __P ((int _argc, char **_argv, const char *_command_name,
const char *_version_string, void (*_usage) (int)));
parse_long_options PARAMS ((int _argc, char **_argv,
const char *_command_name,
const char *_package,
const char *_version, void (*_usage) (int)));

View File

@@ -44,7 +44,7 @@ char *alloca ();
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif /* STAT_MACROS_BROKEN. */
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)

View File

@@ -1,8 +1,8 @@
#if __STDC__
# undef __P
# define __P(args) args
#if __STDC__
# define __P(Args) Args
#else
# define __P(args) ()
# define __P(Args) ()
#endif
int

183
lib/md5.c
View File

@@ -1,11 +1,13 @@
/* md5.c - Functions to compute MD5 message digest of files or memory blocks
according to the definition of MD5 in RFC 1321 from April 1992.
Copyright (C) 1995 Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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 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
@@ -16,7 +18,7 @@
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>. */
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -24,7 +26,7 @@
#include <sys/types.h>
#if STDC_HEADERS
#if STDC_HEADERS || defined _LIBC
# include <stdlib.h>
# include <string.h>
#else
@@ -35,6 +37,13 @@
#include "md5.h"
#ifdef _LIBC
# include <endian.h>
# if __BYTE_ORDER == __BIG_ENDIAN
# define WORDS_BIGENDIAN 1
# endif
#endif
#ifdef WORDS_BIGENDIAN
# define SWAP(n) \
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
@@ -58,10 +67,16 @@ md5_init_ctx (ctx)
ctx->B = 0xefcdab89;
ctx->C = 0x98badcfe;
ctx->D = 0x10325476;
ctx->total[0] = ctx->total[1] = 0;
ctx->buflen = 0;
}
/* Put result from CTX in first 16 bytes following RESBUF. The result must
be in little endian byte order. */
/* Put result from CTX in first 16 bytes following RESBUF. The result
must be in little endian byte order.
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
md5_read_ctx (ctx, resbuf)
const struct md5_ctx *ctx;
@@ -75,6 +90,39 @@ md5_read_ctx (ctx, resbuf)
return resbuf;
}
/* Process the remaining bytes in the internal buffer and the usual
prolog according to the standard and write the result to RESBUF.
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
md5_finish_ctx (ctx, resbuf)
struct md5_ctx *ctx;
void *resbuf;
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
size_t pad;
/* Now count remaining bytes. */
ctx->total[0] += bytes;
if (ctx->total[0] < bytes)
++ctx->total[1];
pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
memcpy (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
*(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
*(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
(ctx->total[0] >> 29));
/* Process last bytes. */
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
return md5_read_ctx (ctx, resbuf);
}
/* Compute MD5 message digest for bytes read from STREAM. The
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
@@ -86,16 +134,12 @@ md5_stream (stream, resblock)
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
struct md5_ctx ctx;
md5_uint32 len[2];
char buffer[BLOCKSIZE + 72];
size_t pad, sum;
size_t sum;
/* Initialize the computation context. */
md5_init_ctx (&ctx);
len[0] = 0;
len[1] = 0;
/* Iterate over full file contents. */
while (1)
{
@@ -108,7 +152,7 @@ md5_stream (stream, resblock)
/* Read block. Take care for partial reads. */
do
{
n = fread (buffer, 1, BLOCKSIZE - sum, stream);
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
sum += n;
}
@@ -116,13 +160,6 @@ md5_stream (stream, resblock)
if (n == 0 && ferror (stream))
return 1;
/* RFC 1321 specifies the possible length of the file up to 2^64 bits.
Here we only compute the number of bytes. Do a double word
increment. */
len[0] += sum;
if (len[0] < sum)
++len[1];
/* If end of file is reached, end the loop. */
if (n == 0)
break;
@@ -133,27 +170,12 @@ md5_stream (stream, resblock)
md5_process_block (buffer, BLOCKSIZE, &ctx);
}
/* We can copy 64 byte because the buffer is always big enough. FILLBUF
contains the needed bits. */
memcpy (&buffer[sum], fillbuf, 64);
/* Compute amount of padding bytes needed. Alignment is done to
(N + PAD) % 64 == 56
There is always at least one byte padded. I.e. even the alignment
is correctly aligned 64 padding bytes are added. */
pad = sum & 63;
pad = pad >= 56 ? 64 + 56 - pad : 56 - pad;
/* Put the 64-bit file length in *bits* at the end of the buffer. */
*(md5_uint32 *) &buffer[sum + pad] = SWAP (len[0] << 3);
*(md5_uint32 *) &buffer[sum + pad + 4] = SWAP ((len[1] << 3)
| (len[0] >> 29));
/* Process last bytes. */
md5_process_block (buffer, sum + pad + 8, &ctx);
/* Add the last bytes if necessary. */
if (sum > 0)
md5_process_bytes (buffer, sum, &ctx);
/* Construct result in desired memory. */
md5_read_ctx (&ctx, resblock);
md5_finish_ctx (&ctx, resblock);
return 0;
}
@@ -168,37 +190,61 @@ md5_buffer (buffer, len, resblock)
void *resblock;
{
struct md5_ctx ctx;
char restbuf[64 + 72];
size_t blocks = len & ~63;
size_t pad, rest;
/* Initialize the computation context. */
md5_init_ctx (&ctx);
/* Process whole buffer but last len % 64 bytes. */
md5_process_block (buffer, blocks, &ctx);
/* REST bytes are not processed yet. */
rest = len - blocks;
/* Copy to own buffer. */
memcpy (restbuf, &buffer[blocks], rest);
/* Append needed fill bytes at end of buffer. We can copy 64 byte
because the buffer is always big enough. */
memcpy (&restbuf[rest], fillbuf, 64);
/* PAD bytes are used for padding to correct alignment. Note that
always at least one byte is padded. */
pad = rest >= 56 ? 64 + 56 - rest : 56 - rest;
/* Put length of buffer in *bits* in last eight bytes. */
*(md5_uint32 *) &restbuf[rest + pad] = (md5_uint32) SWAP (len << 3);
*(md5_uint32 *) &restbuf[rest + pad + 4] = (md5_uint32) SWAP (len >> 29);
/* Process last bytes. */
md5_process_block (restbuf, rest + pad + 8, &ctx);
md5_process_bytes (buffer, len, &ctx);
/* Put result in desired memory area. */
return md5_read_ctx (&ctx, resblock);
return md5_finish_ctx (&ctx, resblock);
}
void
md5_process_bytes (buffer, len, ctx)
const void *buffer;
size_t len;
struct md5_ctx *ctx;
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
if (ctx->buflen != 0)
{
size_t left_over = ctx->buflen;
size_t add = 128 - left_over > len ? len : 128 - left_over;
memcpy (&ctx->buffer[left_over], buffer, add);
ctx->buflen += add;
if (left_over + add > 64)
{
md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx);
/* The regions in the following copy operation cannot overlap. */
memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
(left_over + add) & 63);
ctx->buflen = (left_over + add) & 63;
}
buffer = (const char *) buffer + add;
len -= add;
}
/* Process available complete blocks. */
if (len > 64)
{
md5_process_block (buffer, len & ~63, ctx);
buffer = (const char *) buffer + (len & ~63);
len &= 63;
}
/* Move remaining bytes in internal buffer. */
if (len > 0)
{
memcpy (ctx->buffer, buffer, len);
ctx->buflen = len;
}
}
@@ -229,6 +275,13 @@ md5_process_block (buffer, len, ctx)
md5_uint32 C = ctx->C;
md5_uint32 D = ctx->D;
/* First increment the byte count. RFC 1321 specifies the possible
length of the file up to 2^64 bits. Here we only compute the
number of bytes. Do a double word increment. */
ctx->total[0] += len;
if (ctx->total[0] < len)
++ctx->total[1];
/* Process all bytes in the buffer with 64 bytes in each round of
the loop. */
while (words < endp)

107
lib/md5.h
View File

@@ -1,23 +1,25 @@
/* md5.h - Declaration of functions and data types used for MD5 sum
computing library functions.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 _MD5_H
#define _MD5_H
#define _MD5_H 1
#include <stdio.h>
@@ -32,33 +34,38 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
the resulting executable. Locally running cross-compiled executables
is usually not possible. */
#if defined __STDC__ && __STDC__
# define UINT_MAX_32_BITS 4294967295U
#ifdef _LIBC
# include <sys/types.h>
typedef u_int32_t md5_uint32;
#else
# define UINT_MAX_32_BITS 0xFFFFFFFF
#endif
# if defined __STDC__ && __STDC__
# define UINT_MAX_32_BITS 4294967295U
# else
# define UINT_MAX_32_BITS 0xFFFFFFFF
# endif
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
This should be valid for all systems GNU cares about because
that doesn't include 16-bit systems, and only modern systems
(that certainly have <limits.h>) have 64+-bit integral types. */
#ifndef UINT_MAX
# define UINT_MAX UINT_MAX_32_BITS
#endif
# ifndef UINT_MAX
# define UINT_MAX UINT_MAX_32_BITS
# endif
#if UINT_MAX == UINT_MAX_32_BITS
typedef unsigned int md5_uint32;
#else
# if USHRT_MAX == UINT_MAX_32_BITS
typedef unsigned short md5_uint32;
# if UINT_MAX == UINT_MAX_32_BITS
typedef unsigned int md5_uint32;
# else
# if ULONG_MAX == UINT_MAX_32_BITS
typedef unsigned long md5_uint32;
# if USHRT_MAX == UINT_MAX_32_BITS
typedef unsigned short md5_uint32;
# else
/* The following line is intended to evoke an error.
Using #error is not portable enough. */
"Cannot determine unsigned 32-bit data type."
# if ULONG_MAX == UINT_MAX_32_BITS
typedef unsigned long md5_uint32;
# else
/* The following line is intended to evoke an error.
Using #error is not portable enough. */
"Cannot determine unsigned 32-bit data type."
# endif
# endif
# endif
#endif
@@ -77,6 +84,10 @@ struct md5_ctx
md5_uint32 B;
md5_uint32 C;
md5_uint32 D;
md5_uint32 total[2];
md5_uint32 buflen;
char buffer[128];
};
/*
@@ -86,30 +97,50 @@ struct md5_ctx
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
void md5_init_ctx __P ((struct md5_ctx *ctx));
extern void md5_init_ctx __P ((struct md5_ctx *ctx));
/* Starting with the result of former calls of this function (or the
initialzation function update the context for the next LEN bytes
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is necessary that LEN is a multiple of 64!!! */
void md5_process_block __P ((const void *buffer, size_t len,
struct md5_ctx *ctx));
extern void md5_process_block __P ((const void *buffer, size_t len,
struct md5_ctx *ctx));
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is NOT required that LEN is a multiple of 64. */
extern void md5_process_bytes __P ((const void *buffer, size_t len,
struct md5_ctx *ctx));
/* Process the remaining bytes in the buffer and put result from CTX
in first 16 bytes following RESBUF. The result is always in little
endian byte order, so that a byte-wise output yields to the wanted
ASCII representation of the message digest.
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
/* Put result from CTX in first 16 bytes following RESBUF. The result is
always in little endian byte order, so that a byte-wise output yields
to the wanted ASCII representation of the message digest. */
void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
to the wanted ASCII representation of the message digest.
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
/* Compute MD5 message digest for bytes read from STREAM. The
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
int md5_stream __P ((FILE *stream, void *resblock));
extern int md5_stream __P ((FILE *stream, void *resblock));
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
result is always in little endian byte order, so that a byte-wise
output yields to the wanted ASCII representation of the message
digest. */
void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
#endif

View File

@@ -1,9 +1,9 @@
#undef __P
#undef PARAMS
#if defined (__STDC__) && __STDC__
# define __P(args) args
# define PARAMS(Args) Args
#else
# define __P(args) ()
# define PARAMS(Args) ()
#endif
int
memcasecmp __P((const void *vs1, const void *vs2, size_t n));
memcasecmp PARAMS ((const void *vs1, const void *vs2, size_t n));

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
NOTE: The canonical source of this file is maintained with the GNU C Library.
@@ -364,3 +364,10 @@ memcmp (s1, s2, len)
return 0;
}
#ifdef weak_alias
#undef bcmp
weak_alias (memcmp, bcmp)
#endif

View File

@@ -2,6 +2,10 @@
if the source overlaps with the destination.
Return DESTADDR. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
char *
memcpy (destaddr, srcaddr, len)
char *destaddr;

View File

@@ -3,7 +3,7 @@
In the public domain.
By David MacKenzie <djm@gnu.ai.mit.edu>. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,4 +1,4 @@
/* mkdir.c -- BSD compatible make directory function for System V
/* BSD compatible make directory function for System V
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
@@ -26,12 +26,12 @@
extern int errno;
#endif
#ifdef STAT_MACROS_BROKEN
#undef S_ISDIR
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* mkdir adapted from GNU tar. */

View File

@@ -1,22 +1,22 @@
/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
Contributed by Paul Eggert (eggert@twinsun.com).
This file is part of the GNU C Library.
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 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.
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.
The GNU C Library 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.
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 Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, 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 this to have a standalone program to test this implementation of
mktime. */

View File

@@ -44,7 +44,7 @@ char *malloc ();
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif /* STAT_MACROS_BROKEN. */
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)

View File

@@ -46,11 +46,11 @@ struct mode_change
#ifndef __P
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
# define __P(args) args
# define __P(Args) Args
# else
# define __P(args) ()
# endif /* GCC. */
#endif /* Not __P. */
# define __P(Args) ()
# endif
#endif
struct mode_change *mode_compile __P ((const char *, unsigned));
unsigned short mode_adjust __P ((unsigned, const struct mode_change *));

View File

@@ -134,10 +134,6 @@ fstype_to_string (t)
{
switch (t)
{
case MOUNT_UFS:
return "ufs";
case MOUNT_NFS:
return "nfs";
#ifdef MOUNT_PC
case MOUNT_PC:
return "pc";
@@ -157,6 +153,70 @@ fstype_to_string (t)
#ifdef MOUNT_TMP
case MOUNT_TMP:
return "tmp";
#endif
#ifdef MOUNT_UFS
case MOUNT_UFS:
return "ufs" ;
#endif
#ifdef MOUNT_NFS
case MOUNT_NFS:
return "nfs" ;
#endif
#ifdef MOUNT_MSDOS
case MOUNT_MSDOS:
return "msdos" ;
#endif
#ifdef MOUNT_LFS
case MOUNT_LFS:
return "lfs" ;
#endif
#ifdef MOUNT_LOFS
case MOUNT_LOFS:
return "lofs" ;
#endif
#ifdef MOUNT_FDESC
case MOUNT_FDESC:
return "fdesc" ;
#endif
#ifdef MOUNT_PORTAL
case MOUNT_PORTAL:
return "portal" ;
#endif
#ifdef MOUNT_NULL
case MOUNT_NULL:
return "null" ;
#endif
#ifdef MOUNT_UMAP
case MOUNT_UMAP:
return "umap" ;
#endif
#ifdef MOUNT_KERNFS
case MOUNT_KERNFS:
return "kernfs" ;
#endif
#ifdef MOUNT_PROCFS
case MOUNT_PROCFS:
return "procfs" ;
#endif
#ifdef MOUNT_AFS
case MOUNT_AFS:
return "afs" ;
#endif
#ifdef MOUNT_CD9660
case MOUNT_CD9660:
return "cd9660" ;
#endif
#ifdef MOUNT_UNION
case MOUNT_UNION:
return "union" ;
#endif
#ifdef MOUNT_DEVFS
case MOUNT_DEVFS:
return "devfs" ;
#endif
#ifdef MOUNT_EXT2FS
case MOUNT_EXT2FS:
return "ext2fs" ;
#endif
default:
return "?";

View File

@@ -1,10 +1,10 @@
/* obstack.c - subroutines used implicitly by object stack macros
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
Copyright (C) 1988,89,90,91,92,93,94,96 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 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
@@ -12,23 +12,35 @@ 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. */
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"
/* This is just to get __GNU_LIBRARY__ defined. */
#include <stdio.h>
/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
incremented whenever callers compiled using an old obstack.h can no
longer properly call the functions in this obstack.c. */
#define OBSTACK_INTERFACE_VERSION 1
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
actually compiling the library itself, and the installed library
supports the same library interface we do. This code is part of the GNU
C Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
program understand `configure --with-gnu-libc' and omit the object
files, it is simpler to just do this in the source for each such file. */
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
#include <gnu-versions.h>
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
#define ELIDE_CODE
#endif
#endif
#ifndef ELIDE_CODE
#if defined (__STDC__) && __STDC__
@@ -69,14 +81,14 @@ struct obstack *_obstack;
#define CALL_CHUNKFUN(h, size) \
(((h) -> use_extra_arg) \
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
: (*(h)->chunkfun) ((size)))
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
#define CALL_FREEFUN(h, old_chunk) \
do { \
if ((h) -> use_extra_arg) \
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
else \
(*(h)->freefun) ((old_chunk)); \
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
} while (0)
@@ -482,4 +494,4 @@ POINTER (obstack_copy0) (obstack, pointer, length)
#endif /* 0 */
#endif /* _LIBC or not __GNU_LIBRARY__. */
#endif /* !ELIDE_CODE */

View File

@@ -1,10 +1,10 @@
/* obstack.h - object stack macros
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
Copyright (C) 1988,89,90,91,92,93,94,96 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 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
@@ -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,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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:
@@ -102,11 +102,16 @@ Summary:
#ifndef __OBSTACK_H__
#define __OBSTACK_H__
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
# define bcopy(from, to, len) memcpy ((to), (from), (len))
#endif
/* We use subtraction of (char *)0 instead of casting to int
because on word-addressable machines a simple cast to int
may ignore the byte-within-word field of the pointer. */
@@ -136,21 +141,18 @@ Summary:
#include <stddef.h>
#endif
#include <sys/types.h>
#ifndef HAVE_PTRDIFF_T
# define ptrdiff_t off_t
#endif
#if defined (__STDC__) && __STDC__
#define PTR_INT_TYPE ptrdiff_t
#else
#define PTR_INT_TYPE long
#endif
#if HAVE_STRING_H || STDC_HEADERS
# include <string.h>
# ifndef bcopy
# define bcopy(s, d, n) memcpy ((d), (s), (n))
# endif
#else /* HAVE_STRING_H || STDC_HEADERS */
# include <strings.h>
#endif /* not (HAVE_STRING_H || STDC_HEADERS) */
struct _obstack_chunk /* Lives at front of each chunk. */
{
char *limit; /* 1 past end of this chunk */
@@ -167,9 +169,18 @@ struct obstack /* control current object in current chunk */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
#if defined (__STDC__) && __STDC__
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
struct _obstack_chunk *(*chunkfun) (void *, long);
void (*freefun) (void *, struct _obstack_chunk *);
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
#else
struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
void (*freefun) (); /* User's function to free a chunk. */
char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
#endif
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object:1;/* There is a possibility that the current
chunk contains a zero-length object. This
@@ -184,9 +195,10 @@ struct obstack /* control current object in current chunk */
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
void *(*) (), void (*) ());
void *(*) (long), void (*) (void *));
extern int _obstack_begin_1 (struct obstack *, int, int,
void *(*) (), void (*) (), void *);
void *(*) (void *, long),
void (*) (void *, void *), void *);
#else
extern void _obstack_newchunk ();
extern void _obstack_free ();
@@ -255,6 +267,34 @@ int obstack_chunk_size (struct obstack *obstack);
#define obstack_alignment_mask(h) ((h)->alignment_mask)
/* To prevent prototype warnings provide complete argument list in
standard C version. */
#if defined (__STDC__) && __STDC__
#define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
#define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun), (arg))
#define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)(long)) (newchunkfun))
#define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *)) (newfreefun))
#else
#define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
@@ -277,11 +317,13 @@ int obstack_chunk_size (struct obstack *obstack);
#define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)()) (newfreefun))
#endif
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
#if defined (__GNUC__) && defined (__STDC__)
#if defined (__GNUC__) && defined (__STDC__) && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */

View File

@@ -67,9 +67,56 @@ static struct tm t;
time_t mktime ();
#define yyparse posixtime_yyparse
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple
yacc generated parsers in the same program. Note that these are only
the variables produced by yacc. If other parser generators (bison,
byacc, etc) produce additional global names that conflict at link time,
then those parser generators need to be fixed instead of adding those
names to this list. */
#define yymaxdepth pt_maxdepth
#define yyparse pt_parse
#define yylex pt_lex
#define yyerror pt_error
#define yylval pt_lval
#define yychar pt_char
#define yydebug pt_debug
#define yypact pt_pact
#define yyr1 pt_r1
#define yyr2 pt_r2
#define yydef pt_def
#define yychk pt_chk
#define yypgo pt_pgo
#define yyact pt_act
#define yyexca pt_exca
#define yyerrflag pt_errflag
#define yynerrs pt_nerrs
#define yyps pt_ps
#define yypv pt_pv
#define yys pt_s
#define yy_yys pt_yys
#define yystate pt_state
#define yytmp pt_tmp
#define yyv pt_v
#define yy_yyv pt_yyv
#define yyval pt_val
#define yylloc pt_lloc
#define yyreds pt_reds /* With YYDEBUG defined */
#define yytoks pt_toks /* With YYDEBUG defined */
#define yylhs pt_yylhs
#define yylen pt_yylen
#define yydefred pt_yydefred
#define yydgoto pt_yydgoto
#define yysindex pt_yysindex
#define yyrindex pt_yyrindex
#define yygindex pt_yygindex
#define yytable pt_yytable
#define yycheck pt_yycheck
static int yylex ();
static int yyerror ();
%}
%token DIGIT

View File

@@ -1,4 +1,4 @@
/* rename.c -- BSD compatible directory function for System V
/* BSD compatible rename and directory rename function for System V.
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
@@ -26,12 +26,12 @@
extern int errno;
#endif
#ifdef STAT_MACROS_BROKEN
#undef S_ISDIR
#endif /* STAT_MACROS_BROKEN. */
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* Rename file FROM to file TO.
@@ -67,6 +67,12 @@ rename (from, to)
return -1;
}
#ifdef MVDIR
/* If MVDIR is defined, it should be the full filename of a setuid root
program able to link and unlink directories. If MVDIR is not defined,
then the capability of renaming directories may be missing. */
if (S_ISDIR (from_stats.st_mode))
{
/* Need a setuid root process to link and unlink directories. */
@@ -90,6 +96,9 @@ rename (from, to)
}
}
else
#endif /* MVDIR */
{
if (link (from, to))
return -1;

View File

@@ -1,4 +1,4 @@
/* rmdir.c -- BSD compatible remove directory function for System V
/* BSD compatible remove directory function for System V
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
@@ -27,12 +27,12 @@
extern int errno;
#endif
#ifdef STAT_MACROS_BROKEN
#undef S_ISDIR
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* rmdir adapted from GNU tar. */

View File

@@ -30,7 +30,11 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#include <sys/types.h>
#include <regex.h>
#ifdef WITH_REGEX
# include <regex.h>
#else
# include <rx.h>
#endif
#if ENABLE_NLS
# include <libintl.h>

436
lib/rx.c

File diff suppressed because it is too large Load Diff

490
lib/rx.h

File diff suppressed because it is too large Load Diff

View File

@@ -16,13 +16,13 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

View File

@@ -15,8 +15,8 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */

View File

@@ -1,20 +1,21 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96 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,
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.
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.
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. */
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>
@@ -24,6 +25,7 @@ Cambridge, MA 02139, USA. */
# define HAVE_LIMITS_H 1
# define HAVE_MBLEN 1
# define HAVE_MBRLEN 1
# define HAVE_STRUCT_ERA_ENTRY 1
# define HAVE_TM_GMTOFF 1
# define HAVE_TM_ZONE 1
# define MULTIBYTE_IS_FORMAT_SAFE 1
@@ -45,6 +47,10 @@ Cambridge, MA 02139, USA. */
# endif
#endif
#if HAVE_TZNAME
extern char *tzname[];
#endif
/* Do multibyte processing if multibytes are supported, unless
multibyte sequences are safe in formats. Multibyte sequences are
safe if they cannot contain byte sequences that look like format
@@ -181,14 +187,17 @@ tm_diff (a, b)
const struct tm *a;
const struct tm *b;
{
int ay = a->tm_year + TM_YEAR_BASE - 1;
int by = b->tm_year + TM_YEAR_BASE - 1;
/* Divide years by 100, rounding towards minus infinity. */
int ac = ay / 100 - (ay % 100 < 0);
int bc = by / 100 - (by % 100 < 0);
int intervening_leap_days =
((ay >> 2) - (by >> 2)) - (ac - bc) + ((ac >> 2) - (bc >> 2));
int years = ay - by;
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid int overflow in leap day calculations,
but it's OK to assume that A and B are close to each other. */
int a4 = (a->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (a->tm_year & 3);
int b4 = (b->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (b->tm_year & 3);
int a100 = a4 / 25 - (a4 % 25 < 0);
int b100 = b4 / 25 - (b4 % 25 < 0);
int a400 = a100 >> 2;
int b400 = b100 >> 2;
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
int years = a->tm_year - b->tm_year;
int days = (365 * years + intervening_leap_days
+ (a->tm_yday - b->tm_yday));
return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
@@ -257,12 +266,9 @@ strftime (s, maxsize, format, tp)
const char *const f_month = _NL_CURRENT (LC_TIME, MON_1 + tp->tm_mon);
const char *const ampm = _NL_CURRENT (LC_TIME,
hour12 > 11 ? PM_STR : AM_STR);
size_t aw_len = strlen(a_wkday);
size_t am_len = strlen(a_month);
size_t aw_len = strlen (a_wkday);
size_t am_len = strlen (a_month);
size_t ap_len = strlen (ampm);
const char *alt_digits = _NL_CURRENT (LC_TIME, ALT_DIGITS);
const char *end_alt_digits = _NL_CURRENT (LC_TIME, ALT_DIGITS + 1);
#else
const char *const f_wkday = weekday_name[tp->tm_wday];
const char *const f_month = month_name[tp->tm_mon];
@@ -420,9 +426,6 @@ strftime (s, maxsize, format, tp)
#define DO_NUMBER_SPACEPAD(d, v) \
digits = d; number_value = v; goto do_number_spacepad
case '\0': /* GNU extension: % at end of format. */
--f;
/* Fall through. */
case '%':
if (modifier != 0)
goto bad_format;
@@ -462,7 +465,7 @@ strftime (s, maxsize, format, tp)
&& *(subfmt = _NL_CURRENT (LC_TIME, ERA_D_T_FMT)) != '\0'))
subfmt = _NL_CURRENT (LC_TIME, D_T_FMT);
#else
subfmt = "%a %b %e %H:%M:%S %Z %Y";
subfmt = "%a %b %e %H:%M:%S %Y";
#endif
subformat:
@@ -477,8 +480,17 @@ strftime (s, maxsize, format, tp)
case 'C': /* POSIX.2 extension. */
if (modifier == 'O')
goto bad_format;
#ifdef _NL_CURRENT
/* XXX %EC is not implemented yet. */
#if HAVE_STRUCT_ERA_ENTRY
if (modifier == 'E')
{
struct era_entry *era = _nl_get_era_entry (tp);
if (era)
{
size_t len = strlen (era->name_fmt);
cpy (len, era->name_fmt);
break;
}
}
#endif
{
int year = tp->tm_year + TM_YEAR_BASE;
@@ -524,19 +536,13 @@ strftime (s, maxsize, format, tp)
/* Format the number according to the MODIFIER flag. */
#ifdef _NL_CURRENT
if (modifier == 'O')
if (modifier == 'O' && 0 <= number_value)
{
/* ALT_DIGITS is the first entry in an array with
alternative digit symbols. We have to find string
number NUMBER_VALUE, but must not look beyond
END_ALT_DIGITS. */
int run = number_value;
const char *cp = alt_digits;
/* Get the locale specific alternate representation of
the number NUMBER_VALUE. If none exist NULL is returned. */
const char *cp = _nl_get_alt_digit (number_value);
while (run > 0 && cp < end_alt_digits)
cp = strchr (cp, '\0') + 1;
if (cp < end_alt_digits)
if (cp != NULL)
{
size_t digitlen = strlen (cp);
if (digitlen != 0)
@@ -644,22 +650,24 @@ strftime (s, maxsize, format, tp)
case 'r': /* POSIX.2 extension. */
#ifdef _NL_CURRENT
subfmt = _NL_CURRENT (LC_TIME, T_FMT_AMPM);
#else
subfmt = "%I:%M:%S %p";
if (*(subfmt = _NL_CURRENT (LC_TIME, T_FMT_AMPM)) == '\0')
#endif
subfmt = "%I:%M:%S %p";
goto subformat;
case 'S':
if (modifier == 'E')
return 0;
goto bad_format;
DO_NUMBER (2, tp->tm_sec);
case 's': /* GNU extension. */
{
struct tm ltm = *tp;
time_t t = mktime (&ltm);
struct tm ltm;
time_t t;
ltm = *tp;
t = mktime (&ltm);
/* Generate string value for T using time_t arithmetic;
this works even if sizeof (long) < sizeof (time_t). */
@@ -773,10 +781,16 @@ strftime (s, maxsize, format, tp)
DO_NUMBER (1, tp->tm_wday);
case 'Y':
#ifdef _NL_CURRENT
if (modifier == 'E'
&& *(subfmt = _NL_CURRENT (LC_TIME, ERA_YEAR)) != '\0')
goto subformat;
#if HAVE_STRUCT_ERA_ENTRY
if (modifier == 'E')
{
struct era_entry *era = _nl_get_era_entry (tp);
if (era)
{
subfmt = strchr (era->name_fmt, '\0') + 1;
goto subformat;
}
}
#endif
if (modifier == 'O')
goto bad_format;
@@ -784,13 +798,22 @@ strftime (s, maxsize, format, tp)
DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
case 'y':
#ifdef _NL_CURRENT
/* XXX %Ey is not implemented yet. */
#if HAVE_STRUCT_ERA_ENTRY
if (modifier == 'E')
{
struct era_entry *era = _nl_get_era_entry (tp);
if (era)
{
int delta = tp->tm_year - era->start_date[0];
DO_NUMBER (1, (era->offset
+ (era->direction == '-' ? -delta : delta)));
}
}
#endif
DO_NUMBER (2, (tp->tm_year % 100 + 100) % 100);
case 'Z':
cpy(zonelen, zone);
cpy (zonelen, zone);
break;
case 'z': /* GNU extension. */
@@ -803,8 +826,11 @@ strftime (s, maxsize, format, tp)
diff = tp->tm_gmtoff;
#else
struct tm gtm;
struct tm ltm = *tp;
time_t lt = mktime (&ltm);
struct tm ltm;
time_t lt;
ltm = *tp;
lt = mktime (&ltm);
if (lt == (time_t) -1)
{
@@ -841,6 +867,9 @@ strftime (s, maxsize, format, tp)
DO_NUMBER (4, (diff / 60) * 100 + diff % 60);
}
case '\0': /* GNU extension: % at end of format. */
--f;
/* Fall through. */
default:
/* Unknown format; output the format, including the '%',
since this is most likely the right thing to do if a
@@ -848,7 +877,7 @@ strftime (s, maxsize, format, tp)
bad_format:
{
int flen;
for (flen = 2; f[1 - flen] != '%'; flen++)
for (flen = 1; f[1 - flen] != '%'; flen++)
continue;
cpy (flen, &f[1 - flen]);
}

View File

@@ -15,7 +15,7 @@
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
#if HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -14,8 +14,8 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <errno.h>
@@ -26,21 +26,21 @@ extern int errno;
#include <ctype.h>
#include <math.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#if HAVE_FLOAT_H
# include <float.h>
#else
#define DBL_MAX 1.7976931348623159e+308
#define DBL_MIN 2.2250738585072010e-308
# define DBL_MAX 1.7976931348623159e+308
# define DBL_MIN 2.2250738585072010e-308
#endif
#if STDC_HEADERS
#include <stdlib.h>
#include <string.h>
# include <stdlib.h>
# include <string.h>
#else
#define NULL 0
#ifndef HUGE_VAL
#define HUGE_VAL HUGE
#endif
# define NULL 0
# ifndef HUGE_VAL
# define HUGE_VAL HUGE
# endif
#endif
/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the

View File

@@ -1,24 +1,23 @@
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
/* strtol - Convert string representation of a number into an integer value.
Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
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.
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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -33,6 +32,9 @@ USA. */
#ifndef errno
extern int errno;
#endif
#ifndef __set_errno
# define __set_errno(Val) errno = (Val)
#endif
#ifdef HAVE_LIMITS_H
# include <limits.h>
@@ -41,6 +43,7 @@ extern int errno;
#ifdef STDC_HEADERS
# include <stddef.h>
# include <stdlib.h>
# include <string.h>
#else
# ifndef NULL
# define NULL 0
@@ -108,40 +111,38 @@ 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
# include <wchar.h>
# include <wctype.h>
# define L_(ch) L##ch
# define L_(Ch) L##Ch
# define UCHAR_TYPE wint_t
# define STRING_TYPE wchar_t
# define ISSPACE(ch) iswspace (ch)
# define ISALPHA(ch) iswalpha (ch)
# define TOUPPER(ch) towupper (ch)
# define ISSPACE(Ch) iswspace (Ch)
# define ISALPHA(Ch) iswalpha (Ch)
# define TOUPPER(Ch) towupper (Ch)
#else
# define L_(ch) ch
# define L_(Ch) Ch
# define UCHAR_TYPE unsigned char
# define STRING_TYPE char
# define ISSPACE(ch) isspace (ch)
# define ISALPHA(ch) isalpha (ch)
# define TOUPPER(ch) toupper (ch)
# define ISSPACE(Ch) isspace (Ch)
# define ISALPHA(Ch) isalpha (Ch)
# define TOUPPER(Ch) toupper (Ch)
#endif
#ifdef __STDC__
# define INTERNAL(x) INTERNAL1(x)
# define INTERNAL1(x) __##x##_internal
# define WEAKNAME(x) WEAKNAME1(x)
# define WEAKNAME1(x) __##x
# define INTERNAL(X) INTERNAL1(X)
# define INTERNAL1(X) __##X##_internal
# define WEAKNAME(X) WEAKNAME1(X)
#else
# define INTERNAL(x) __/**/x/**/_internal
# define WEAKNAME(x) __/**/x
# define INTERNAL(X) __/**/X/**/_internal
#endif
#ifdef USE_NUMBER_GROUPING
@@ -251,8 +252,9 @@ INTERNAL (strtol) (nptr, endptr, base, group)
/* Find the end of the digit string and check its grouping. */
end = s;
for (c = *end; c != L_('\0'); c = *++end)
if (c != thousands && (c < L_('0') || c > L_('9'))
&& (!ISALPHA (c) || TOUPPER (c) - L_('A') + 10 >= base))
if ((wchar_t) c != thousands
&& ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
&& (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
break;
if (*s == thousands)
end = s;
@@ -278,7 +280,7 @@ INTERNAL (strtol) (nptr, endptr, base, group)
c = TOUPPER (c) - L_('A') + 10;
else
break;
if (c >= base)
if ((int) c >= base)
break;
/* Check for overflow. */
if (i > cutoff || (i == cutoff && c > cutlim))
@@ -311,7 +313,7 @@ INTERNAL (strtol) (nptr, endptr, base, group)
if (overflow)
{
errno = ERANGE;
__set_errno (ERANGE);
#if UNSIGNED
return ULONG_MAX;
#else
@@ -324,7 +326,7 @@ INTERNAL (strtol) (nptr, endptr, base, group)
noconv:
/* We must handle a special case here: the base is 0 or 16 and the
first two characters and '0' and 'x', but the rest are no
first two characters are '0' and 'x', but the rest are no
hexadecimal digits. This is no error case. We return 0 and
ENDPTR points to the `x`. */
if (endptr != NULL)
@@ -340,19 +342,23 @@ noconv:
/* External user entry point. */
#undef __P
#if defined (__STDC__) && __STDC__
# define __P(args) args
#else
# define __P(args) ()
#endif
#if _LIBC - 0 == 0
# undef PARAMS
# if defined (__STDC__) && __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
/* Prototype. */
INT strtol __P ((const STRING_TYPE *nptr, STRING_TYPE **endptr,
int base));
INT strtol PARAMS ((const STRING_TYPE *nptr, STRING_TYPE **endptr, int base));
#endif
INT
#ifdef weak_function
weak_function
#endif
strtol (nptr, endptr, base)
const STRING_TYPE *nptr;
STRING_TYPE **endptr;

View File

@@ -1,5 +1,5 @@
/* xgetcwd.c -- return current directory with unlimited length
Copyright (C) 1992 Free Software Foundation, Inc.
Copyright (C) 1992, 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
@@ -17,7 +17,7 @@
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -26,14 +26,15 @@
#ifndef errno
extern int errno;
#endif
#include <sys/types.h>
#include "pathmax.h"
#ifndef HAVE_GETCWD
char *getwd ();
# define getcwd(buf, max) getwd (buf)
#else
#if HAVE_GETCWD
char *getcwd ();
#else
char *getwd ();
# define getcwd(Buf, Max) getwd (Buf)
#endif
/* Amount to increase buffer size by in each try. */

View File

@@ -1,5 +1,5 @@
/* xgethostname.c -- return current hostname with unlimited length
Copyright (C) 1992 Free Software Foundation, Inc.
Copyright (C) 1992, 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
@@ -15,7 +15,7 @@
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 */
/* written by Jim Meyering */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -23,12 +23,23 @@
#include <sys/types.h>
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#include "error.h"
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
int gethostname ();
char *xmalloc ();
char *xrealloc ();
#ifndef INITIAL_HOSTNAME_LENGTH
# define INITIAL_HOSTNAME_LENGTH 33
# define INITIAL_HOSTNAME_LENGTH 34
#endif
char *
@@ -42,10 +53,20 @@ xgethostname ()
hostname = xmalloc (size);
while (1)
{
hostname[size - 1] = '\0';
/* Use size - 2 here rather than size - 1 to work around the bug
in SunOS5.5's gethostname whereby it NUL-terminates HOSTNAME
even when the name is longer than the supplied buffer. */
int k = size - 2;
errno = 0;
hostname[k] = '\0';
err = gethostname (hostname, size);
if (err == 0 && hostname[size - 1] == '\0')
if (err == 0 && hostname[k] == '\0')
break;
#ifdef ENAMETOOLONG
else if (err != 0 && errno != ENAMETOOLONG && errno != 0)
error (EXIT_FAILURE, errno, "gethostname");
#endif
size *= 2;
hostname = xrealloc (hostname, size);
}

View File

@@ -1,5 +1,5 @@
/* xmalloc.c -- malloc with out of memory checking
Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
Copyright (C) 1990, 91, 92, 93, 94, 95, 96 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
@@ -15,7 +15,7 @@
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
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -30,23 +30,35 @@
#if STDC_HEADERS
# include <stdlib.h>
#else
VOID *calloc ();
VOID *malloc ();
VOID *realloc ();
void free ();
#endif
/* This is for other GNU distributions with internationalized messages.
The GNU C Library itself does not yet support such messages. */
#if HAVE_LIBINTL_H
#if ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
#else
# define gettext(msgid) (msgid)
# define textdomain(Domain)
# define _(Text) Text
#endif
#include "error.h"
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
/* Prototypes for functions defined here. */
#if defined (__STDC__) && __STDC__
static VOID *fixup_null_alloc (size_t n);
VOID *xmalloc (size_t n);
VOID *xcalloc (size_t n, size_t s);
VOID *xrealloc (VOID *p, size_t n);
#endif
/* Exit value when the requested amount of memory is not available.
The caller may set it to some other value. */
int xmalloc_exit_failure = EXIT_FAILURE;
@@ -67,7 +79,7 @@ fixup_null_alloc (n)
if (n == 0)
p = malloc ((size_t) 1);
if (p == 0)
error (xmalloc_exit_failure, 0, gettext ("Memory exhausted"));
error (xmalloc_exit_failure, 0, _("Memory exhausted"));
return p;
}
@@ -85,6 +97,20 @@ xmalloc (n)
return p;
}
/* Allocate memory for N elements of S bytes, with error checking. */
VOID *
xcalloc (n, s)
size_t n, s;
{
VOID *p;
p = calloc (n, s);
if (p == 0)
p = fixup_null_alloc (n);
return p;
}
/* Change the size of an allocated block of memory P to N bytes,
with error checking.
If P is NULL, run xmalloc. */

View File

@@ -1,5 +1,5 @@
/* xstrdup.c -- copy a string with out of memory checking
Copyright (C) 1990 Free Software Foundation, Inc.
Copyright (C) 1990, 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
@@ -15,16 +15,22 @@
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>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
# include <string.h>
#else
#include <strings.h>
# include <strings.h>
#endif
#if defined (__STDC__) && __STDC__
char *xmalloc (size_t);
char *xstrdup (char *string);
#else
char *xmalloc ();
#endif
/* Return a newly allocated copy of STRING. */

View File

@@ -1,15 +1,14 @@
#ifndef XSTRTOD_H
# 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. */
#undef PARAMS
#if defined (__STDC__) && __STDC__
# define PARAMS(Args) Args
#else
# define PARAMS(Args) ()
#endif
int
xstrtod __P ((const char *str, const char **ptr, double *result));
xstrtod PARAMS ((const char *str, const char **ptr, double *result));
#endif /* XSTRTOD_H */
#endif /* not XSTRTOD_H */

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. */
/* Jim Meyering (meyering@na-net.ornl.gov) */
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#if HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef STDC_HEADERS
#include <stdlib.h>
#if STDC_HEADERS
# include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#if HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
@@ -102,8 +102,11 @@ __xstrtol (s, ptr, base, val, valid_suffixes)
return LONGINT_INVALID_SUFFIX_CHAR;
}
if (**p != '\0' && strchr (valid_suffixes, **p))
if (**p != '\0')
{
if (!strchr (valid_suffixes, **p))
return LONGINT_INVALID_SUFFIX_CHAR;
switch (**p)
{
case 'b':
@@ -143,8 +146,8 @@ __xstrtol (s, ptr, base, val, valid_suffixes)
#ifdef TESTING_XSTRTO
#include <stdio.h>
#include "error.h"
# include <stdio.h>
# include "error.h"
char *program_name;
@@ -172,4 +175,5 @@ main (int argc, char** argv)
}
exit (0);
}
#endif /* TESTING_XSTRTO */

View File

@@ -1,24 +1,24 @@
#ifndef _xstrtol_h_
#define _xstrtol_h_ 1
#ifndef XSTRTOL_H_
# define XSTRTOL_H_ 1
#if STRING_TO_UNSIGNED
# define __xstrtol xstrtoul
# define __strtol strtoul
# define __unsigned unsigned
# define __ZLONG_MAX ULONG_MAX
#else
# define __xstrtol xstrtol
# define __strtol strtol
# define __unsigned /* empty */
# define __ZLONG_MAX LONG_MAX
#endif
# if STRING_TO_UNSIGNED
# define __xstrtol xstrtoul
# define __strtol strtoul
# define __unsigned unsigned
# define __ZLONG_MAX ULONG_MAX
# else
# define __xstrtol xstrtol
# define __strtol strtol
# define __unsigned /* empty */
# define __ZLONG_MAX LONG_MAX
# endif
#undef __P
#if defined (__STDC__) && __STDC__
#define __P(x) x
#else
#define __P(x) ()
#endif
# undef PARAMS
# if defined (__STDC__) && __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
enum strtol_error
{
@@ -27,40 +27,40 @@ enum strtol_error
typedef enum strtol_error strtol_error;
strtol_error
__xstrtol __P ((const char *s, char **ptr, int base,
__unsigned long int *val, const char *valid_suffixes));
__xstrtol PARAMS ((const char *s, char **ptr, int base,
__unsigned long int *val, const char *valid_suffixes));
#define _STRTOL_ERROR(exit_code, str, argument_type_string, err) \
# define _STRTOL_ERROR(Exit_code, Str, Argument_type_string, Err) \
do \
{ \
switch ((err)) \
switch ((Err)) \
{ \
case LONGINT_OK: \
abort (); \
\
case LONGINT_INVALID: \
error ((exit_code), 0, "invalid %s `%s'", \
(argument_type_string), (str)); \
error ((Exit_code), 0, "invalid %s `%s'", \
(Argument_type_string), (Str)); \
break; \
\
case LONGINT_INVALID_SUFFIX_CHAR: \
error ((exit_code), 0, "invalid character following %s `%s'", \
(argument_type_string), (str)); \
error ((Exit_code), 0, "invalid character following %s `%s'", \
(Argument_type_string), (Str)); \
break; \
\
case LONGINT_OVERFLOW: \
/* FIXME: make this message dependent on STRING_TO_UNSIGNED */\
error ((exit_code), 0, "%s `%s' larger than maximum long int",\
(argument_type_string), (str)); \
error ((Exit_code), 0, "%s `%s' larger than maximum long int",\
(Argument_type_string), (Str)); \
break; \
} \
} \
while (0)
#define STRTOL_FATAL_ERROR(str, argument_type_string, err) \
_STRTOL_ERROR (2, str, argument_type_string, err)
# define STRTOL_FATAL_ERROR(Str, Argument_type_string, Err) \
_STRTOL_ERROR (2, Str, Argument_type_string, Err)
#define STRTOL_FAIL_WARN(str, argument_type_string, err) \
_STRTOL_ERROR (0, str, argument_type_string, err)
# define STRTOL_FAIL_WARN(Str, Argument_type_string, Err) \
_STRTOL_ERROR (0, Str, Argument_type_string, Err)
#endif /* _xstrtol_h_ */
#endif /* not XSTRTOL_H_ */

View File

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

62
lib/ylwrap Executable file
View File

@@ -0,0 +1,62 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
# Written by Tom Tromey <tromey@cygnus.com>, Aug 11 1996
#
# 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.
# Usage:
# ylwrap PROG [OUTPUT DESIRED]... -- [ARGS]...
# * PROG is program to run.
# * OUTPUT is file PROG generates
# * DESIRED is file we actually want
# * ARGS are passed to PROG
# Any number of OUTPUT,DESIRED pairs may be used.
# The program to run.
prog="$1"
shift
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
break
fi
pairlist="$pairlist $1"
shift
done
$prog ${1+"$@"} || exit $?
set X $pairlist
shift
status=0
first=yes
while test "$#" -ne 0; do
if test -f "$1"; then
mv "$1" "$2" || status=$?
else
# A missing file is only an error for the first file. This is a
# blatant hack to let us support using "yacc -d". If -d is not
# specified, we don't want an error when the header file is
# "missing".
if test $first = yes; then
status=1
fi
fi
shift
shift
first=no
done
exit $status

View File

@@ -1,5 +1,318 @@
Wed Dec 11 19:34:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 3.14.
Tue Dec 10 00:14:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Bump version to 3.13k.
* src/install.c [_POSIX_VERSION]: Don't declare wait. That
declaration conflicted with one in a system header file on
i386-pc-isc3.0, now that I've removed the AC_ISC_POSIX macro
and _POSIX_VERSION is no longer defined.
Reported by Karl Heuer.
* configure.in (AC_ISC_POSIX): Remove kludgy macro.
Use this test instead:
(LIBS): Add -lcposix if it contains strerror.
Patch from Karl Heuer.
* lib/Makefile.am (EXTRA_DIST): Add mktime.c.
Reported by Thomas Bushnell.
* (EXTRA_DIST): Add strftime.c to appease automake.
Although it's not used yet, it'll be used by ls's (to-be-done)
--format=FORMAT option.
Mon Dec 9 18:26:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/obstack.h: Include config.h.
[!HAVE_BCOPY && HAVE_MEMCPY && !defined (bcopy)]: Define bcopy
in terms of memcpy. Reported by Marcus Daniels.
* configure.in (LIBOBJS): After AC_FUNC_FNMATCH, add fnmatch.o
and define fnmatch to rpl_fnmatch if necessary.
* acconfig.h (fnmatch): Add undef.
* src/df.c (find_mount_point): Convert from K&R style header to ANSI.
Patch from Kaveh Ghazi.
Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
=========== Update for automake-1.1k.
* Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
* configure.in (AM_CONFIG_HEADER): Use it.
(AC_OUTPUT): Remove stamp-h timestamping statement.
Now, AM_CONFIG_HEADER does it automatically.
* lib/Makefile.am (noinst_LIBRARIES): Rename to libfu.a as per
new automake requirement.
Rename fu_* variables to libfu_a_*.
Mon Dec 2 20:30:20 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (jm_FUNC_MKTIME): Use this instead of AM_FUNC_MKTIME.
* src/system.h [!S_IXUGO] (S_IXUGO): Define it.
* src/ls.c (print_color_indicator): Check the file's suffix only
if it's a regular file.
Reported by Santiago Vila Doncel.
(print_type_indicator): Use S_IXUGO instead of writing out
(S_IEXEC | S_IXGRP | S_IXOTH).
(length_of_file_name_and_frills): Likewise.
Sun Dec 1 13:07:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getdate.y (date): Interpret the date, L/M/N, as YYYY/MM/DD
if L >= 1000, otherwise as MM/DD/YY. With this change,
date --date=DATE accepts dates like those in an RCS log listing.
Sat Nov 30 22:11:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4: (jm_FUNC_MKTIME): New macro. This is like
AM_FUNC_MKTIME, but with one addition: when it replaces the
function, it also redefines mktime to gnu_mktime.
Fri Nov 29 21:19:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/install.c (copy_file): Allow installation from non-directory
(rather than only regular) files. Suggestion from Charles Karney.
* src/df.c (main): Accept -F as a synonym for -t for compatibility
with Solaris. From Peter Eriksson.
* src/ls.c (main): Close stdout and check result, in case any
deferred writes fail.
Use EXIT_SUCCESS and EXIT_FAILURE in exit and usage calls.
Thu Nov 28 13:10:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/df.c (find_mount_point): Use strip_trailing_slashes and dirname
instead of open-coding them. When given FILE containing no slashes,
chdir to the directory containing it (the current directory) rather
than to `..'.
Tue Nov 5 14:51:56 1996 Miles Bader <miles@gnu.ai.mit.edu>
* src/df.c (find_mount_point): Use save_cwd/restore_cwd.
"save-cwd.h": New include.
Wed Oct 30 00:21:16 1996 Miles Bader <miles@gnu.ai.mit.edu>
* lib/fsusage.c (get_fs_usage): If DISK is 0 and we needed to use
it, return -1 with 0 in ERRNO.
* src/df.c (show_dev): Deal with null values for DISK and FSTYPE,
including interpreting special 0 errno return from get_fs_usage.
(show_point): Don't fail if we can't find a mount entry for POINT,
just call show_dev with 0 values and let it fail if necessary.
(main): Require a non-zero MOUNT_LIST only if showing all filesystems.
(find_mount_point): New function.
(xgetcwd): New declaration.
Thu Nov 28 00:31:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
for gettext-0.10.25.
Tue Nov 26 23:24:13 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4: Update with macros from gettext-0.10.25.
Sun Nov 24 22:43:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acconfig.h (mktime): Add undef for my enhanced (beyond automake's
1.1g version of) AM_FUNC_MKTIME.
* acinclude.m4 (AM_FUNC_GETLINE): Use am_, not su_ prefix for
local/cache variables.
Sat Nov 23 16:11:59 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline
isn't mentioned in AC_REPLACE_FUNCS.
* lib/Makefile.am (EXTRA_DIST):
* chgrp.c (usage): Alphabetize option descriptions the way
sort -f would.
* chown.c (usage): Likewise.
* cp-aux.c (usage): Likewise.
* df.c (usage): Likewise.
* install.c (usage): Likewise.
* ln.c (usage): Likewise.
* ls.c (usage): Likewise.
* mkdir.c (usage): Likewise.
* mv.c (usage): Likewise.
* rm.c (usage): Likewise.
From Karl Berry.
Fri Nov 22 22:14:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this
way. AM_FUNC_GETLINE does it now.
(AM_FUNC_GETLINE): Use it here.
* src/cp.c (copy): With -i and not -f, prompt for any type of
(non-directory) source file before overwriting an existing target.
Reported by Mark A. Thomas and Emile LeBlanc.
Tue Nov 19 23:10:32 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
has this built-in.
(AC_FUNC_FNMATCH): Use this macro (new with autoconf-2.11) instead
of open-coding it.
Sun Nov 17 20:53:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/touch.c: Remove unused declaration of mktime. From Tony Leneis.
Mon Nov 4 23:18:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (test for group_member): Handle it separately
so I can keep the hyphen (not the underscore) in the filename.
* lib/rename.c: New version from François Pinard.
Sat Nov 2 07:05:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (gobble_file): Set linkok for non-orphaned symlinks.
From Bauke Jan Douma.
(gobble_file): Initialize linkok.
With these two changes, ls --color should display orphaned symlinks
as blinking text on terminals that support it.
* configure.in (ALL_LINGUAS): Add Spanish (es).
* doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
Otherwise, the generated info files have names longer than
the 14-byte max of some old systems.
Reported by Karl Heuer.
Tue Oct 29 06:49:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (decode_switches): Make -A set really_all_files to zero
as well as setting all_files to 1. With this change, ls -f -A prints
everything but . and .., unsorted. Before, the -A was effectively
ignored. From Karl Berry.
Tue Oct 22 07:00:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (dircolors.h): Depend on dcgen only in maintainer
mode.
Mon Oct 21 16:52:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove group-member.c.
Add (temporary hack to work around bug in automake-1.1f) mvdir.c and
rmdir.c.
* configure.in: Remove hack that created link from group_member.c
to group-member.c.
* lib/group_member.c: New file. Renamed from group-member.c.
* lib/group-member.c: Delete.
* src/dircolors.hin: Comment out DOS-style suffixes.
Sun Oct 20 13:49:25 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
* Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'.
(EXTRA_DIST): Remove.
* configure.in: Remove README_ALPHA related code. Automake takes
care of it automatically now when in gnits mode.
Sun Oct 13 14:02:41 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (print_long_format): Use strftime of localtime
(not ctime) to produce the date/time in long listings.
From Rafal Maszkowski.
Sat Oct 12 18:20:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/mountlist.c (fstype_to_string): Handle fstypes of freebsd.
From Arne Henrik Juul.
Thu Oct 10 23:47:34 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y.
(fu_SOURCES): Put them here instead.
Remove rules for building getdate.c and posixtm.c; now automake
generates those rules.
* lib/ylwrap: New file.
* lib/interlock: New file.
Wed Oct 9 06:51:47 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/ls.c (usage): Improve brief descriptions of --sort and --time.
From François Pinard.
* lib/rpmatch.c [!WITH_REGEX]: Include rx.h.
From Andreas Schwab.
Mon Oct 7 23:31:10 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove names of several files
that automake adds automatically.
(fu_SOURCES): Likewise.
(fu_DEPENDENCIES): Depend on fu_LIBADD.
* src/chown.c (usage): Improve usage message.
* src/cp-aux.c (usage): Likewise.
* src/ls.c (usage): Likewise.
* src/install.c (strip): Improve diagnostic.
From Ulisses Alonso.
* src/Makefile.am (noinst_HEADERS): Add dircolors.h.
(dircolors.h): Always depend on dcgen.
Sat Oct 5 08:07:03 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (AM_FUNC_ERROR_AT_LINE): New macro.
(AM_FUNC_OBSTACK): New macro.
* configure.in (AM_FUNC_ERROR_AT_LINE): Use this instead of
open-coding it.
(AM_FUNC_OBSTACK): Likewise.
* lib/filemode.c (ftypelet) [HAVE_ST_DM_MODE]: Add support for
Cray's migrated dmf files.
* src/ls.c (print_long_format) [HAVE_ST_DM_MODE]: Likewise.
* acconfig.h [HAVE_ST_DM_MODE]: New macro.
From Johan Danielsson.
* acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro.
(AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's
checking... messages don't get nested.
* configure.in (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove it.
* acconfig.h (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove now-unused variable.
* src/*.c: Update --version output to conform to the coding standard.
Wed Oct 2 21:44:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/dircolors.c (usage): Deprecate --print-data-base even though
that's the way GNU make writes it. `database' is one word.
Add description of FILE argument.
Tue Oct 1 12:56:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (fu_SOURCES): Remove getline.c.
(EXTRA_DIST): Add getline.c.
Reported by François Pinard.
Mon Sep 30 20:08:45 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (dircolors.h): Don't depend on anything unless
in maintainer-mode. Reported by Marcus Daniels.
* lib/path-concat.c (path_concat): Use K&R style function definition.
Sun Sep 29 22:00:44 1996 Jim Meyering <meyering@na-net.ornl.gov>

View File

@@ -1,4 +1,18 @@
Changes in release 3.14:
[3.13k]
[3.13j]
* ls --color highlights based on suffix rules only for regular files
* touch --date=DATE accepts dates like those in an RCS log listing, e.g.,
`1992/11/01 05:44:34'.
* install SRC DST no longer rejects non-regular, non-directory SRC
* df accepts -F as a synonym for -t for compatibility with Solaris
* cp -i /dev/null existing-file now prompts before overwriting the target
* ls --color highlights orphaned symlinks text on terminals that support it
[3.13i]
* ls -l honors current locale with respect to abbreviated month names (and,
with --full-time day names) on systems with a locale-supporting strftime
function, e.g., ones based on recent versions of the GNU C library
* ls -l recognizes Cray's migrated dmf files.
* 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

View File

@@ -1,3 +1,453 @@
Wed Dec 11 19:33:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.13.
Tue Dec 10 06:36:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (jm_SYS_PROC_UPTIME): New macro. Derived from the
code in configure.in, except now it punts when cross compiling.
Suggestion from Karl Heuer.
* configure.in (jm_SYS_PROC_UPTIME): Use it instead of open-coded
version.
* lib/Makefile.am (EXTRA_DIST): Add mktime.c.
Reported by Thomas Bushnell.
* configure.in: Bump version to 1.12t.
* Regenerate all Makefile.in using a patched version of automake-1.1l.
* acconfig.h (strftime): Add #undef.
From Karl Heuer.
* acinclude.m4 (AM_GNU_GETTEXT): Don't require AC_ISC_POSIX.
From Karl Heuer.
Mon Dec 9 06:58:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Bump version to 1.12s.
* lib/getdate.y (Convert): Don't reject all dates in 2038.
Some fit in 31 bits.
* configure.in (jm_FUNC_GNU_STRFTIME): Use it.
* acinclude.m4 (AC_REPLACE_GNU_GETOPT): Remove unused macro.
(jm_FUNC_GNU_STRFTIME): New macro.
* lib/Makefile.am (libsu_a_SOURCES): Remove strftime.c.
(EXTRA_DIST): Add strftime.c.
* configure.in (jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Fix typo:
Change $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h to
$jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h.
Patch from Kaveh R. Ghazi.
* src/stty.c: Include config.h before testing for
TERMIOS_NEEDS_XOPEN_SOURCE.
Patch from Karl Heuer.
* configure.in (AC_ISC_POSIX): Remove kludgy macro.
Use this test instead:
(LIBS): Add -lcposix if it contains strerror.
Patch from Karl Heuer.
* acinclude.m4 (AM_FUNC_GETLOADAVG): Put shell assignments to
ac_save_LIBS and LIBS on separate lines to avoid order-of-evaluation
problems -- some versions of sh (e.g. SunOS4.1.3's) evaluate such
space-separated assignments from right to left. Patch from Karl Heuer.
(AM_FUNC_GETLOADAVG): Fix typo: su_save_LIBS => am_cv_saved_LIBS.
Patch from Karl Heuer.
* lib/strftime.c [HAVE_TZNAME]: Declare tzname.
Patch from Karl Heuer.
* src/Makefile.am (.sh): Also substitute @bindir@.
Reported by Karl Heuer.
Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
=========== Update for automake-1.1k.
* Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
* configure.in (AM_CONFIG_HEADER): Use it.
(AC_OUTPUT): Remove stamp-h timestamping statement.
Now, AM_CONFIG_HEADER does it automatically.
* lib/Makefile.am (noinst_LIBRARIES): Rename to libsu.a as per
new automake requirement.
Rename su_* variables to libsu_a_*.
Sun Dec 8 00:08:44 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/stty.c (get_win_size): Rename formal parameter from fileno to FD.
Sat Dec 7 12:52:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/chroot.c (main): Call setlocale, bindtextdomain, and textdomain.
From Michel Robitaille.
* configure.in (ALL_LINGUAS): Add Portuguese (pt).
* lib/getloadavg.c [__SVR4]: Define SVR4.
Remove duplicate `|| defined(SVR4)' disjunct guarding the
#define KERNEL_FILE "/unix" definiton.
* configure.in (jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use this variant
of the AM_ prefixed macro.
(check for TIOCGWINSZ in sys/pty): In essence, require
jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H so that
$jm_cv_sys_tiocgwinsz_needs_termios_h (renamed from
$gwinsz_in_termios_h) is defined.
* lib/strftime.c (strftime): Remove " %Z" part of format for %c.
Correction from Paul Eggert.
Fri Dec 6 20:52:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (jm_FUNC_MKTIME): Rather than including the text of
AM_FUNC_MKTIME, simply AC_REQUIRE it.
Mon Dec 2 20:59:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (su_cv_func_ut_host_in_utmp): Move test that can
define WINSIZE_IN_PTEM to precede test that checks whether
`TIOCGWINSZ in sys/pty.h'. The latter test uses the symbol.
(jm_FUNC_MKTIME): Use this instead of AM_FUNC_MKTIME.
Sun Dec 1 13:07:39 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getdate.y (date): Interpret the date, L/M/N, as YYYY/MM/DD
if L >= 1000, otherwise as MM/DD/YY. With this change,
date --date=DATE accepts dates like those in an RCS log listing.
Sat Nov 30 22:08:00 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/strftime.c: Update from GNU libc.
Fri Nov 29 22:16:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/uname.c (main) [HAVE_SYSINFO && SI_ARCHITECTURE]: Support
--processor (-p). Print processor type.
(usage): Document it.
Thu Nov 28 00:28:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
for gettext-0.10.25.
(AM_FUNC_GETLINE): Move the test to just before the check for getdelim.
Sun Nov 24 11:02:29 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/system.h [!defined STDIN_FILENO]: Define it.
[!defined STDOUT_FILENO]: Define it.
[!defined STDERR_FILENO]: Define it.
* src/stty.c (get_win_size): Take a FILENO parameter rather than
trying to get a size from both stdin and stdout.
Update callers.
Use STDIN_FILENO and STDOUT_FILENO instead of literal 0, 1.
========== From Karl Heuer =========
* src/stty.c [TERMIOS_NEEDS_XOPEN_SOURCE]: Define _XOPEN_SOURCE.
i386-pc-isc3.0, needs that in order to cause all of the useful
termios symbols to be defined, instead of just those that are
required by POSIX. This enables all of: iuclc ixany olcuc ocrnl
onlcr onocr onlret ofill ofdel nl0 cr0 tab0 bs0 vt0 ff0 xcase.
[GWINSZ_IN_SYS_PTY]: Include sys/ioctl.h, sys/tty.h, and sys/pty.h.
[!VSUSP && !VSWTCH]: Map VSWTCH and CSWTCH to VSUSP and CSUSP resp.
termio.h defines VSWTCH, but termios.h defines VSUSP instead (since
POSIX requires that symbol). Define VSWTCH as a synonym if needed,
so that either one can be used on input.
(display_changed): If the slot for swtch is the same as the one for
susp, display only the setting for susp.
(display_all): Likewise.
(display_changed): Some systems still have (VEOF,VEOL) == (VMIN,VTIME).
On such systems, it's confusing to print both pairs. So, skip eof and
eol when icanon is unset, and skip min and time when icanon is set.
(display_all): Likewise.
(set_window_size): Check only stdin (the device being queried) for
window size info. You don't want "stty </dev/foo" to report the size
of your current window when /dev/foo has no size info.
(display_window_size): Likewise.
(screen_columns): Check only stdout for window size info. You want
"stty </dev/foo" to wrap columns at the right margin of your current
window, not the /dev/foo width.
* acconfig.h (GWINSZ_IN_SYS_PTY): Add #undef.
(TERMIOS_NEEDS_XOPEN_SOURCE): Add #undef.
* configure.in (whether termios.h needs _XOPEN_SOURCE): New test.
(whether TIOCGWINSZ is defined in sys/pty.h): New test.
Sat Nov 23 16:15:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline
isn't mentioned in AC_REPLACE_FUNCS.
* env.c (usage): Alphabetize option descriptions the way sort -f would.
* test.c (usage): Likewise.
* who-users.c (usage): Likewise.
From Karl Berry.
Fri Nov 22 20:33:26 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this
way. AM_FUNC_GETLINE does it now.
* configure.in New test to check for TIOCGWINSZ in sys/pty.h.
* config.h.in (GWINSZ_IN_SYS_PTY): Add #undef.
From Karl Heuer.
* src/printf.c (main): Warn if excess arguments are ignored.
E.g., printf foo bar now warns that it is ignoring the single
non-format argument, bar.
Wed Nov 20 20:37:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/xgethostname.c (xgethostname): Work around bug in SunOS5.5's
gethostname. Reported by Fletcher Mattox.
Tue Nov 19 23:01:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
has this built-in.
(OPTIONAL_BIN_ZCRIPTS): Rename from OPTIONAL_SCRIPTS -- because
automake-1.1g couldn't deal with the _SCRIPTS suffix.
* src/Makefile.am (bin_SCRIPTS): Rename @OPTIONAL_SCRIPTS@.
Sun Nov 17 20:49:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/id.c (main): Ignore -a, for compatibility with SVR4.
Suggestion from Noah Friedman.
Mon Nov 4 20:24:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (test for group_member): Handle it separately
so I can keep the hyphen (not the underscore) in the filename.
Thu Oct 31 19:32:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
* lib/xgethostname.c [ENAMETOOLONG] (xgethostname): If gethostname
returns an error other than buffer overflow, exit with an error
message instead of allocating infinite amounts of space.
[!EXIT_FAILURE] (EXIT_FAILURE): New macro.
<errno.h>: New include.
[!errno] (errno): New declaration.
* acinclude.m4 (AM_FUNC_GETLINE): Use cache.
* configure.in: Check for -linet library before checking for the
gethostbyname function. Suggested by Karl Heuer.
Use AM_FUNC_GETLINE.
* acinclude.m4 (AM_FUNC_GETLINE): Add run-time test for getline.
Based on a test from Karl Heuer.
Sun Nov 3 14:57:09 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (GETLOADAVG_LIBS): Unanchor the sed regexp that removes
am_cv_saved_LIBS from LIBS. From Karl Heuer.
* src/stty.c (recover_mode): Fail also if there are too many fields.
From Karl Heuer.
* lib/canon-host.c: Include sys/types.h for the definitions
(otherwise missing on some systems) of caddr_t (used by
sys/socket.h) and ushort (used by netinet/in.h). From Karl Heuer.
Sat Nov 2 00:16:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
* doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
Otherwise, the generated info files have names longer than
the 14-byte max of some old systems.
Reported by Karl Heuer.
* src/date.c (main): Give better diagnostic.
Suggestion from Karl Berry.
Thu Oct 31 18:28:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/posixtm.y: Remap yacc globals to have pt_ prefix.
* lib/getdate.y: Remap yacc globals to have gd_ prefix.
Suggestion to do as in gdb/c-exp.y from Tom Tromey.
Mon Oct 28 17:40:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/Makefile.am (install-exec-local): Redirect stderr of chown to
/dev/null and suggest running `make install-root' upon failure to
install su. Suggestions from François Pinard.
* configure.in: Don't output confusing diagnostic: `checking for
shadow password routines'. Suggestion from François Pinard.
Thu Oct 24 13:50:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund\
.de>
* src/tee.c (main): Ignore SIGPIPE.
Wed Oct 23 23:42:43 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/stty.c: Guard inclusion of stdarg.h and definition of VA_START
with #if PROTOTYPES rather than with #ifdef __STDC__. The latter
loses with Dynix/PTX.
(wrapf) [PROTOTYPES]: Similarly, guard ANSI-style ... definition.
Suggestion from Marcus Daniels.
Mon Oct 21 16:49:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getloadavg.c [__linux__]: Don't bother with a.out/nlist/kernel
defines or includes -- Linux systems simply read /proc/loadavg.
From Ulrich Drepper.
* lib/Makefile.am (EXTRA_DIST): Remove group-member.c.
* configure.in: Remove hack that created link from group_member.c
to group-member.c.
* lib/group_member.c: New file. Renamed from group-member.c.
* lib/group-member.c: Delete.
* src/stty.c (main): Remove TAB from diagnostic, for consistency.
Sun Oct 20 09:03:51 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (install-root): Add it here, too.
* lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
* src/Makefile.am (install-root): New rule.
Suggestion from François Pinard.
* src/who-users.c (print_entry): Don't take address of UT_TIME_MEMBER
directly. From Ulrich Drepper.
* Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'.
(EXTRA_DIST): Remove @README_ALPHA@.
* configure.in: Remove README_ALPHA related code. Automake takes
care of it automatically now when in gnits mode.
* acinclude.m4 (AM_FUNC_GETLOADAVG): Use $srcdir (not $top_srcdir) in
#include $srcdir/lib/getloadavg.c. The latter isn't defined at that
point in configure script. From Eric Backus.
Fri Oct 18 21:31:58 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Makefile.am (cvs-dist): Uncomment cvs tag command.
(cvs-dist): Use cvs tag's -c option.
Thu Oct 17 23:48:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (LIBS): Add -lypsec on m88k/svr3 DolphinOS systems
using YP. From Arne Juul.
Sun Oct 13 07:34:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Don't save and restore LIBS around AM_FUNC_GETLOADAVG.
* acinclude.m4 (AM_FUNC_GETLOADAVG): Don't modify LIBS in this macro
(by saving and restoring initial value). Instead, arrange for
substitution of @GETLOADAVG_LIBS@.
* src/Makefile.am (uptime_LDADD): Add @GETLOADAVG_LIBS@,
not @UPTIME_LIBS@.
* configure.in (ALL_LINGUAS): Add swedish (sv).
Fri Oct 11 22:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/who-users.c (print_uptime): Change #ifdef guard on getloadavg
call from just HAVE_GETLOADAVG to HAVE_GETLOADAVG || C_GETLOADAVG.
From Kaveh R. Ghazi.
* src/Makefile.am (uptime_LDADD): Add @UPTIME_LIBS@.
* acinclude.m4 (AM_FUNC_GETLOADAVG): Like AC_FUNC_GETLOADAVG, but
with the following changes:
- include $top_srcdir/lib/getloadavg.c, not src/getloadavg.c.
Reported by Eric Backus.
- Check for Solaris' libkstat.
- Define C_GETLOADAVG if we end up using getloadavg.c.
From Kaveh R. Ghazi.
* acconfig.h (C_GETLOADAVG): Add it.
From Kaveh R. Ghazi.
* configure.in: Use new AM_FUNC_GETLOADAVG and be careful to add
getloadavg-related libraries only when linking uptime.
Thu Oct 10 23:50:05 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y.
(su_SOURCES): Put them here instead.
Remove rules for building getdate.c and posixtm.c; now automake
generates those rules.
* lib/ylwrap: New file.
* lib/interlock: New file.
Wed Oct 9 00:26:55 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getloadavg.c [__sun]: Define sun. Reported by Kaveh Ghazi.
* lib/strftime.c (strftime): Accommodate the broken C compiler
that comes with SunOS -- don't initialize aggregates in decls of
automatic variables. Reported by Kaveh Ghazi.
* tests/: Renamed checks/ directory.
* Makefile.am (SUBDIRS): Rename checks to tests.
* configure.in (AC_OUTPUT): Rename checks to tests.
* configure.in (/proc/uptime check): Guard the read of /proc/uptime
with an existence test to avoid a messy configure-time warning on
systems that lack that special file. Reported by Kaveh R. Ghazi.
* configure.in (check whether floor needs -lm): Fix typo: save $LIBS,
not $LIB. From Kaveh R. Ghazi.
* checks/nice: Protect echoed args with leading `x' so echo doesn't
interpret leading -n on e.g. SunOS systems.
Mon Oct 7 18:46:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/getloadavg.c [__hpux]: Define hpux. From Eric Backus.
* lib/Makefile.am (EXTRA_DIST): Remove alloca.c, error.c, and mktime.
(su_SOURCES): Remove memcmp.c.
Automake automatically includes at least these, now.
From François Pinard.
* lib/Makefile.am (su_SOURCES): Remove getline.c.
Sat Oct 5 11:38:23 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (su_SOURCES): Remove gethostname.c --
it's AC_REPLACE'd and already in EXTRA_DIST.
* configure.in: Use AM_SANITY_CHECK_CC.
* configure.in: Use AM_FUNC_ERROR_AT_LINE.
* lib/Makefile.am (EXTRA_DIST): Put error.c here.
(su_SOURCES): Remove error.c
Suggested by Ulrich Drepper.
* configure.in (GNU_PACKAGE): AC_SUBST it for the src/*.sh scripts.
* src/Makefile.am (.sh): Substitute for @GNU_PACKAGE@ and @VERSION@
in the four installed scripts.
* src/*.sh: Update --version output to conform to the coding standard.
* acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro.
(AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's
checking... messages don't get nested.
* configure.in (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove it.
* acconfig.h (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove now-unused variable.
* src/*.c: Update --version output to conform to the coding standard.
Sun Sep 22 22:41:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_CHECK_HEADERS): Alphabetize.

View File

@@ -1,4 +1,21 @@
Changes in release 1.13
[1.12t]
* two patches for ISC
* Regenerate all Makefile.in using a patched version of automake-1.1l.
[1.12s]
* lots of little bug fixes -- see ChangeLog
[1.12r]
* uname --processor (-p) works on systems that have sysinfo and define
SI_ARCHITECTURE.
* stty works better on systems like i386-pc-isc3.0
* date --date=DATE accepts dates like those in an RCS log listing, e.g.,
`1992/11/01 05:44:34'.
* printf now warns if excess arguments are ignored.
* tee no longer fails immediately upon receipt of SIGPIPE
[1.12q]
* running `make check' runs tests of nice
* lots of configuration-related improvements
* nice allows `+' in options like -+8 and -+13.
* when matching, expr warns about non-portability when the first character
of the basic regular expression is `^'
* `id user' no longer prints bogus group list

View File

@@ -1,3 +1,251 @@
Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* Version 1.20.
Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov>
The file name, `build-script.pl' is longer than 14 characters.
Rename it.
* tests/cut-test/mk-script.pl: Rename from build-script.pl.
* tests/cut-test/Makefile.am: Reflect renaming.
* tests/tr-test/mk-script.pl: Rename from build-script.pl.
* tests/tr-test/Makefile.am: Reflect renaming.
* tests/sort-test/mk-script.pl: Rename from build-script.pl.
* tests/sort-test/Makefile.am: Reflect renaming.
* tests/join-test/mk-script.pl: Rename from build-script.pl.
* tests/join-test/Makefile.am: Reflect renaming.
Reported by Karl Heuer.
* configure.in (VERSION): Bump to 1.19r.
(AC_ISC_POSIX): Remove kludgy macro.
Use this test instead:
(LIBS): Add -lcposix if it contains strerror.
Patch from Karl Heuer.
Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov>
=========== Update for automake-1.1k.
* Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
* configure.in (AM_CONFIG_HEADER): Use it.
(AC_OUTPUT): Remove stamp-h timestamping statement.
Now, AM_CONFIG_HEADER does it automatically.
* lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
new automake requirement.
Rename tu_* variables to libtu_a_*.
Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/pr.c: Apply big patch from Roland Huebner.
* src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
[:upper:] to [:upper:] and [:lower:] to [:lower:].
(main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
to [:lower:].
(class_ok): Update table to reflect that tr now allows these
identity mappings. Suggestion from Risto Kankkunen.
Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
for gettext-0.10.25.
Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
to avoid new warning from gcc.
Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/Makefile.am (t): Add names of those 5 tests.
* tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.
* src/sort.c (set_ordering): Revert 1994-05-04 change to this function
so that blanks are not unconditionally ignored when computing start
and end positions for numeric keys with explicit character offsets.
Reported by Markus Demleitner.
Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov>
* cat.c (usage): Alphabetize option descriptions the way sort -f would.
* fmt.c (usage): Likewise.
* join.c (usage): Likewise.
* md5sum.c (usage): Likewise.
* od.c (usage): Likewise.
* pr.c (usage): Likewise.
* sort.c (usage): Likewise.
* split.c (usage): Likewise.
* wc.c (usage): Likewise.
From Karl Berry.
Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/csplit.c (process_regexp): Update CURRENT_LINE only if
the new value would be larger. This avoids the infinite loop
otherwise provoked by situations like this:
printf "\na\n" | csplit - '/a/-1' '{*}'
From Jens Schmidt.
Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11
has this built-in.
Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov>
* doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
Otherwise, the generated info files have names longer than
the 14-byte max of some old systems.
Reported by Karl Heuer.
Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/strtol.c: Update from GNU libc.
* tests/sort-test/Test.pm: Add a test to exercize this fix.
* src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
(checkfp): Fix off-by-one error that resulted in writing one byte
beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
on Linux systems having a relatively recent libc. Before, running
the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
would provoke the memory overrun (though not necessarily the failure).
Add an assertion.
Reported by Risto Kankkunen.
Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/sort.c (key_init): New function.
(main): Use key_init in the two places where it was open-coded.
This fixes a UMR of the general_numeric field.
* src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
This avoids a spurious UMR report from purify.
(prjoin): Add an assertion.
(add_field): Update assertion.
* src/tr.c (es_free): New function.
(parse_str): Use it to plug a small memory leak.
Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/md5.c: Update from GNU libc.
* lib/md5.h: Update from GNU libc.
Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/tr.c (validate): Remove TAB from diagnostic, for consistency.
Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus.
* Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
(EXTRA_DIST): Remove.
* configure.in: Remove README_ALPHA related code. Automake takes
care of it automatically now when in gnits mode.
* lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
doing arithmetic with it.
Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/md5.c: Update from GNU libc.
* lib/md5.h: Update from GNU libc.
Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_OUTPUT): Add tests/join-test/Makefile.
* tests/Makefile.am (SUBDIRS): Add join-test.
Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
special case.
(main): Write separate loops to initialize mapping for lower->upper
and upper->lower conversion.
Reported by Arne Henrik Juul.
Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
Before, e.g., `split -b 1M' would be silently accepted and treated
like `split -b 1'. Reported by Franc,ois.
* src/split.c (usage): Remove parameter, REASON.
(main): Update callers to use combination of error (0, 0, ... and
usage (EXIT_FAILURE).
(main): When a string operand cannot be converted to a number of
bytes or lines, include that string in the diagnostic.
Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.
* lib/Makefile.am (EXTRA_DIST): Remove.
Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/md5.c (md5_stream): Apply fix from Ralph Loader
<loader@maths.ox.ac.uk> via Ulrich Drepper.
Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).
Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/error.c: Include error.h to align with libit --
under protest, François :-).
Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov>
* acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
They're included in automake-1.1f.
* configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
open-coding it.
Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
From Karl Berry.
Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove it.
* acconfig.h (GNU_PACKAGE): New variable.
(PACKAGE_VERSION): Remove now-unused variable.
* lib/long-options.c (parse_long_options): Separate package name
and version number to accomodate new --version output requirement.
* lib/long-options.h: Update prototype.
Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (main): Remove dead code that used to print --version
output.
Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov>
* configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
* src/Makefile.am (sort_LDADD): Use any library (-lm) that
gets substituted for @POW_LIBM@.
* tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.
Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.
* acinclude.m4: Update definitions from gettext-0.24.
Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov>
* tests/sort-test/build-script.pl: Die if close fails.
@@ -15,7 +263,12 @@ Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov>
* src/md5sum.c (usage): Remove references in --help output to
the now-deprecated --string option. Support for it will be
removed soon.
removed soon. Using this option can provoke a memory access
violation on some systems because of (unavoidable in an efficient
implementation) alignment assumptions made by functions in md5.c.
md5sum.c could leave the option in and accomodate the alignment
restriction, but this option was intended solely for testing, and
the tests are now all file-oriented, so it's not necessary.
* tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.

View File

@@ -1,9 +1,49 @@
Changes in release 1.20
Changes in test release 1.19r
* see ChangeLog
Changes in test release 1.19q
* fix pr: -l now uses total number of lines per page also with -f
* fix pr: use left-hand-side truncation of header string to avoid line
overflow
* fix pr: it now accepts `form feeds set in input files', also with -m
and multiple form feeds at different pages in each file
* pr now accepts: -h "", print a blank line header
* pr: when skipping pages (+FIRST_PAGE option) line counting (-n option)
starts with 1st line of input file (not of 1st page printed) by default
* pr accepts new option: -N, start printing with an optional line number
* pr -t retains `form feeds set in input files' (`don't destroy page layout')
* pr accepts new option: -T, equivalent to -t, but eliminate also form feeds
(`clear file')
* pr accepts the extension: +FIRST_PAGE[:LAST_PAGE]
* pr -w and -s option disentangled (`use a separator' no longer destroys
column alignment)
* pr accepts new option: -j, merge lines of full length
* pr accepts the extension: -s[STRING], use separator string instead of
character only
* pr -b is no longer an independent option, balancing is always used
with -COLUMN (a requirement of unrestricted use of form feeds)
* pr accepts new option: --test, to run the pr tests with a constant
header string
* join passes all of its tests on Alpha OSF 4.0.
* sort no longer improperly ignores blanks in determining starting and ending
positions for keys with explicit character offsets
* fix bug in csplit with regexp and negative offset that led to infinite loop
Changes in test release 1.19q
* fix bug in sort -c that sometimes resulted in a segfault
Changes in test release 1.19p
* md5sum's --string option is being deprecated and is no longer documented.
It is still accepted, but will be removed altogether in 1.21.
* tr '[:lower:]' '[:upper:]' no longer fails when LC_CTYPE is set to
iso_8859_1 on Solaris -- or any other character set with differing
numbers of uppercase and lowercase characters
* split and tail diagnose unrecognized multiplier suffixes, in e.g.,
`split --bytes=1M' (should be `-b 1m' or `--bytes=1m')
* fix bug in md5sum's handling of partial reads
* fix bug in treatment by sort -f of bytes with high-bit set
* 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)
* distribute test suites for cut, join, sort, and tr
* 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

View File

@@ -59,7 +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"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -93,7 +93,7 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "basename", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "basename", GNU_PACKAGE, VERSION, usage);
if (argc == 1 || argc > 3)
{

View File

@@ -89,22 +89,22 @@ Usage: %s [OPTION] [FILE]...\n\
printf (_("\
Concatenate FILE(s), or standard input, to standard output.\n\
\n\
-A, --show-all equivalent to -vET\n\
-b, --number-nonblank number nonblank output lines\n\
-e equivalent to -vE\n\
-E, --show-ends display $ at end of each line\n\
-n, --number number all output lines\n\
-s, --squeeze-blank never more than one single blank line\n\
-t equivalent to -vT\n\
-u (ignored)\n\
-v, --show-nonprinting use ^ and M- notation, save for LFD and TAB\n\
-A, --show-all equivalent to -vET\n\
-E, --show-ends display $ at end of each line\n\
-T, --show-tabs display TAB characters as ^I\n\
-u (ignored)\n\
-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
With no FILE, or when FILE is -, read standard input.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -581,7 +581,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("cat - %s\n", PACKAGE_VERSION);
printf ("cat (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -282,12 +282,12 @@ Change the group membership of each FILE to GROUP.\n\
-h, --no-dereference affect symbolic links instead of any referenced file\n\
(available only on systems with lchown system call)\n\
-f, --silent, --quiet suppress most error messages\n\
-v, --verbose output a diagnostic for every file processed\n\
-R, --recursive change files and directories recursively\n\
-v, --verbose output a diagnostic for every file processed\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"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -336,7 +336,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("chgrp - %s\n", PACKAGE_VERSION);
printf ("chgrp (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}

View File

@@ -231,7 +231,7 @@ Usage: %s [OPTION]... MODE[,MODE]... FILE...\n\
Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\
one or more of the letters rwxXstugo.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -305,7 +305,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("chmod - %s\n", PACKAGE_VERSION);
printf ("chmod (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}

View File

@@ -243,15 +243,15 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
-h, --no-dereference affect symbolic links instead of any referenced file\n\
(available only on systems with lchown system call)\n\
-f, --silent, --quiet suppress most error messages\n\
-R, --recursive operate on files and directories recursively\n\
-v, --verbose explain what is being done\n\
-R, --recursive change files and directories recursively\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
to login group if implied by a period. A colon may replace the period.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -302,7 +302,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("chown - %s\n", PACKAGE_VERSION);
printf ("chown (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}

View File

@@ -48,7 +48,7 @@ Run COMMAND with root directory set to NEWROOT.\n\
\n\
If no command is given, run ``${SHELL} -i'' (default: /bin/sh).\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -57,8 +57,11 @@ int
main (int argc, char **argv)
{
program_name = argv[0];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "chroot", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "chroot", GNU_PACKAGE, VERSION, usage);
if (argc == 1)
{

View File

@@ -275,7 +275,7 @@ Print CRC checksum and byte counts of each FILE.\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"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -307,7 +307,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("cksum - %s\n", PACKAGE_VERSION);
printf ("cksum (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -78,7 +78,7 @@ Compare sorted files LEFT_FILE and RIGHT_FILE line by line.\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"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -250,7 +250,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("comm - %s\n", PACKAGE_VERSION);
printf ("comm (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -341,7 +341,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("cp - %s\n", PACKAGE_VERSION);
printf ("cp (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}
@@ -661,21 +661,22 @@ copy (const char *src_path, const char *dst_path, int new_dst, dev_t device,
return 0;
}
if (S_ISREG (src_type) && !flag_force)
if (!S_ISDIR (src_type) && !flag_force && flag_interactive)
{
if (flag_interactive)
if (euidaccess (dst_path, W_OK) != 0)
{
if (euidaccess (dst_path, W_OK) != 0)
fprintf (stderr,
_("%s: overwrite `%s', overriding mode %04o? "),
program_name, dst_path,
(unsigned int) (dst_sb.st_mode & 07777));
else
fprintf (stderr, _("%s: overwrite `%s'? "),
program_name, dst_path);
if (!yesno ())
return 0;
fprintf (stderr,
_("%s: overwrite `%s', overriding mode %04o? "),
program_name, dst_path,
(unsigned int) (dst_sb.st_mode & 07777));
}
else
{
fprintf (stderr, _("%s: overwrite `%s'? "),
program_name, dst_path);
}
if (!yesno ())
return 0;
}
if (backup_type != none && !S_ISDIR (dst_sb.st_mode))

View File

@@ -972,7 +972,8 @@ process_regexp (struct control *p, int repetition)
if (!ignore)
close_output_file ();
current_line = break_line;
if (p->offset > 0)
current_line = break_line;
}
/* Split the input file according to the control records we have built. */
@@ -1518,7 +1519,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("csplit - %s\n", PACKAGE_VERSION);
printf ("csplit (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}
@@ -1586,7 +1587,7 @@ Read standard input if FILE is -. Each PATTERN may be:\n\
\n\
A line OFFSET is a required `+' or `-' followed by a positive integer.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -220,7 +220,7 @@ range, or many ranges separated by commas. Each range is one of:\n\
\n\
With no FILE, or when FILE is -, read standard input.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -737,7 +737,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("cut - %s\n", PACKAGE_VERSION);
printf ("cut (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -123,7 +123,7 @@ batch_convert (const char *input_filename, const char *format)
{
if (line[line_length - 1] == '\n')
line[line_length - 1] = '\0';
error (0, 0, _("invalid date `%s'"), line);
error (0, 0, _("invalid date ` %s'"), line);
status = 1;
}
else
@@ -198,7 +198,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("date - %s\n", PACKAGE_VERSION);
printf ("date (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}
@@ -235,8 +235,10 @@ main (int argc, char **argv)
&& n_args == 1 && argv[optind][0] != '+')
{
error (0, 0, _("\
the argument `%s' lacks a leading `+';\n\
when using an option to specify date(s), any\n\
non-option argument must be a format string beginning with `+'"));
non-option argument must be a format string beginning with `+'"),
argv[optind]);
usage (1);
}
@@ -421,7 +423,7 @@ the following modifiers between `%%' and a numeric directive.\n\
`-' (hyphen) do not pad the field\n\
`_' (underscore) pad the field with spaces\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}

View File

@@ -339,7 +339,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("dd - %s\n", PACKAGE_VERSION);
printf ("dd (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}
@@ -1118,7 +1118,7 @@ by w for x2, by b for x512, by k for x1024. Each KEYWORD may be:\n\
noerror continue after read errors\n\
sync pad every input block with NULs to ibs-size\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}

132
src/df.c
View File

@@ -27,10 +27,14 @@
#include "mountlist.h"
#include "fsusage.h"
#include "system.h"
#include "save-cwd.h"
#include "error.h"
char *dirname ();
void strip_trailing_slashes ();
char *xmalloc ();
char *xstrdup ();
char *xgetcwd ();
/* The maximum length of a human-readable string. Be pessimistic
and assume `int' is 64-bits wide. Converting 2^63 - 1 gives the
@@ -237,7 +241,9 @@ excluded_fstype (const char *fstype)
/* Display a space listing for the disk device with absolute path DISK.
If MOUNT_POINT is non-NULL, it is the path of the root of the
filesystem on DISK.
If FSTYPE is non-NULL, it is the type of the filesystem on DISK. */
If FSTYPE is non-NULL, it is the type of the filesystem on DISK.
If MOUNT_POINT is non-NULL, then DISK may be NULL -- certain systems may
not be able to produce statistics in this case. */
static void
show_dev (const char *disk, const char *mount_point, const char *fstype)
@@ -302,10 +308,15 @@ show_dev (const char *disk, const char *mount_point, const char *fstype)
(inodes_used * 100.0 / fsu.fsu_files + 0.5);
}
if (! disk)
disk = "-"; /* unknown */
printf ((print_type ? "%-13s" : "%-20s"), disk);
if (strlen (disk) > (print_type ? 13 : 20) && !posix_format)
if ((int) strlen (disk) > (print_type ? 13 : 20) && !posix_format)
printf ((print_type ? "\n%13s" : "\n%20s"), "");
if (! fstype)
fstype = "-"; /* unknown */
if (print_type)
printf (" %-5s ", fstype);
@@ -362,10 +373,80 @@ show_disk (const char *disk)
show_dev (disk, (char *) NULL, (char *) NULL);
}
/* Return the root mountpoint of the filesystem on which FILE exists, in
malloced storage. FILE_STAT should be the result of stating FILE. */
static char *
find_mount_point (const char *file, const struct stat *file_stat)
{
struct saved_cwd cwd;
struct stat last_stat;
char *mp = 0; /* The malloced mount point path. */
if (save_cwd (&cwd))
return NULL;
if (S_ISDIR (file_stat->st_mode))
/* FILE is a directory, so just chdir there directly. */
{
last_stat = *file_stat;
if (chdir (file) < 0)
return NULL;
}
else
/* FILE is some other kind of file, we need to use its directory. */
{
int rv;
char *tmp = xstrdup (file);
char *dir;
strip_trailing_slashes (tmp);
dir = dirname (tmp);
free (tmp);
rv = chdir (dir);
free (dir);
if (rv < 0)
return NULL;
if (stat (".", &last_stat) < 0)
goto done;
}
/* Now walk up FILE's parents until we find another filesystem or /,
chdiring as we go. LAST_STAT holds stat information for the last place
we visited. */
for (;;)
{
struct stat st;
if (stat ("..", &st) < 0)
goto done;
if (st.st_dev != last_stat.st_dev || st.st_ino == last_stat.st_ino)
/* cwd is the mount point. */
break;
if (chdir ("..") < 0)
goto done;
last_stat = st;
}
/* Finally reached a mount point, see what it's called. */
mp = xgetcwd ();
done:
/* Restore the original cwd. */
{
int save_errno = errno;
if (restore_cwd (&cwd, 0, mp))
exit (1); /* We're scrod. */
free_cwd (&cwd);
errno = save_errno;
}
return mp;
}
/* Figure out which device file or directory POINT is mounted on
and show its disk usage.
STATP is the results of `stat' on POINT. */
static void
show_point (const char *point, const struct stat *statp)
{
@@ -397,8 +478,21 @@ show_point (const char *point, const struct stat *statp)
return;
}
}
error (0, 0, _("cannot find mount point for %s"), point);
exit_status = 1;
/* We couldn't find the mount entry corresponding to POINT. Go ahead and
print as much info as we can; methods that require the device to be
present will fail at a later point. */
{
/* Find the actual mount point. */
char *mp = find_mount_point (point, statp);
if (mp)
{
show_dev (0, mp, 0);
free (mp);
}
else
error (0, errno, "%s", point);
}
}
/* Determine what kind of node PATH is and show the disk usage
@@ -465,21 +559,21 @@ Show information about the filesystem on which each FILE resides,\n\
or all filesystems by default.\n\
\n\
-a, --all include filesystems having 0 blocks\n\
-h, --human-readable print sizes in human readable format (e.g. 1K 234M 2G)\n\
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\n\
-i, --inodes list inode information instead of block usage\n\
-k, --kilobytes use 1024-byte blocks, not 512 despite POSIXLY_CORRECT\n\
-m, --megabytes use 1024K-byte blocks, not 512 despite POSIXLY_CORRECT\n\
--no-sync do not invoke sync before getting usage info (default)\n\
-P, --portability use the POSIX output format\n\
--sync invoke sync before getting usage info\n\
-t, --type=TYPE limit listing to filesystems of type TYPE\n\
-T, --print-type print filesystem type\n\
-x, --exclude-type=TYPE limit listing to filesystems not of type TYPE\n\
-v (ignored)\n\
-P, --portability use the POSIX output format\n\
-T, --print-type print filesystem type\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"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -516,7 +610,7 @@ main (int argc, char **argv)
posix_format = 0;
exit_status = 0;
while ((i = getopt_long (argc, argv, "aihkmPTt:vx:", long_options, NULL))
while ((i = getopt_long (argc, argv, "aiF:hkmPTt:vx:", long_options, NULL))
!= EOF)
{
switch (i)
@@ -556,9 +650,13 @@ main (int argc, char **argv)
case 130:
require_sync = 0;
break;
case 'F':
/* Accept -F as a synonym for -t for compatibility with Solaris. */
case 't':
add_fs_type (optarg);
break;
case 'v': /* For SysV compatibility. */
/* ignore */
break;
@@ -572,7 +670,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("df - %s\n", PACKAGE_VERSION);
printf ("df (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}
@@ -639,20 +737,22 @@ with the portable output format"));
|| print_type),
show_all_fs);
if (mount_list == NULL)
error (1, errno, _("cannot read table of mounted filesystems"));
print_header ();
if (require_sync)
sync ();
if (optind == argc)
show_all_entries ();
{
if (mount_list == NULL)
error (1, errno, _("cannot read table of mounted filesystems"));
print_header ();
show_all_entries ();
}
else
{
/* Display explicitly requested empty filesystems. */
show_listed_fs = 1;
print_header ();
for (i = optind; i < argc; ++i)
if (argv[i])
show_entry (argv[i], &stats[i - optind]);

View File

@@ -88,6 +88,7 @@ static struct option const long_options[] =
{"csh", no_argument, NULL, 'c'},
{"c-shell", no_argument, NULL, 'c'},
{"help", no_argument, NULL, 'h'},
/* I deprecate --print-data-base. `database' is one word. */
{"print-data-base", no_argument, NULL, 'p'},
{"print-database", no_argument, NULL, 'p'},
{"version", no_argument, NULL, 'v'},
@@ -111,11 +112,15 @@ Output commands to set the LS_COLORS environment variable.\n\
Determine format of output:\n\
-b, --sh, --bourne-shell output Bourne shell code to set LS_COLORS\n\
-c, --csh, --c-shell output C shell code to set LS_COLORS\n\
-p, --print-data-base output defaults\n\
-p, --print-database output defaults\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
If FILE is specified, read it to determine which colors to use for which\n\
file types and extensions. Otherwise, a precompiled database is used.\n\
For details on the format of these files, run `dircolors --print-database'.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
@@ -419,7 +424,7 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "dircolors", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "dircolors", GNU_PACKAGE, VERSION, usage);
while ((optc = getopt_long (argc, argv, "bcp", long_options, NULL))
!= EOF)

View File

@@ -43,11 +43,14 @@ EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31

View File

@@ -50,7 +50,7 @@ output `.' (meaning the current directory).\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"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -66,7 +66,7 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "dirname", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "dirname", GNU_PACKAGE, VERSION, usage);
if (argc != 2)
{

View File

@@ -235,7 +235,7 @@ Summarize disk usage of each FILE, recursively for directories.\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"));
puts (_("\nReport bugs to fileutils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -336,7 +336,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("du - %s\n", PACKAGE_VERSION);
printf ("du (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}

View File

@@ -91,7 +91,7 @@ Without -E, the following sequences are recognized and interpolated:\n\
\\t horizontal tab\n\
\\v vertical tab\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -112,7 +112,7 @@ main (int argc, char **argv)
/* Don't recognize --help or --version if POSIXLY_CORRECT is set. */
if (getenv ("POSIXLY_CORRECT") == NULL)
parse_long_options (argc, argv, "echo", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "echo", GNU_PACKAGE, VERSION, usage);
/* System V machines already have a /bin/sh with a v9 behaviour. We
use the identical behaviour for these machines so that the

View File

@@ -140,7 +140,7 @@ main (register int argc, register char **argv, char **envp)
if (show_version)
{
printf ("env - %s\n", PACKAGE_VERSION);
printf ("env (%s) %s\n", GNU_PACKAGE, VERSION);
exit (0);
}
@@ -194,14 +194,14 @@ Usage: %s [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n"),
printf (_("\
Set each NAME to VALUE in the environment and run COMMAND.\n\
\n\
-u, --unset=NAME remove variable from the environment\n\
-i, --ignore-environment start with an empty environment\n\
-u, --unset=NAME remove variable from the environment\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
A mere - implies -i. If no COMMAND, print the resulting environment.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}

View File

@@ -128,7 +128,7 @@ With no FILE, or when FILE is -, read standard input.\n\
\n\
Instead of -t NUMBER or -t LIST, -NUMBER or -LIST may be used.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -368,7 +368,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("expand - %s\n", PACKAGE_VERSION);
printf ("expand (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -144,7 +144,7 @@ Comparisons are arithmetic if both ARGs are numbers, else lexicographical.\n\
Pattern matches return the string matched between \\( and \\) or null; if\n\
\\( and \\) are not used, they return the number of characters matched or 0.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -161,7 +161,7 @@ main (int argc, char **argv)
/* Don't recognize --help or --version if POSIXLY_CORRECT is set. */
if (getenv ("POSIXLY_CORRECT") == NULL)
parse_long_options (argc, argv, "expr", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "expr", GNU_PACKAGE, VERSION, usage);
if (argc == 1)
{

View File

@@ -76,7 +76,7 @@ Print factors of each NUMBER; read standard input with no arguments.\n\
Print the prime factors of all specified integer NUMBERs. If no arguments\n\
are specified on the command line, they are read from standard input.\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to sh-utils-bugs@gnu.ai.mit.edu"));
}
exit (status);
}
@@ -182,7 +182,7 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
parse_long_options (argc, argv, "factor", PACKAGE_VERSION, usage);
parse_long_options (argc, argv, "factor", GNU_PACKAGE, VERSION, usage);
fail = 0;
if (argc == 1)

View File

@@ -290,17 +290,17 @@ If no FILE or if FILE is `-', read standard input.\n\
\n\
Mandatory arguments to long options are mandatory for short options too.\n\
-c, --crown-margin preserve indentation of first two lines\n\
-p, --prefix=STRING combine only lines having STRING as prefix\n\
-s, --split-only split long lines, but do not refill\n\
-t, --tagged-paragraph indentation of first line different from second\n\
-u, --uniform-spacing one space between words, two after sentences\n\
-w, --width=NUMBER maximum line width (default of 75 columns)\n\
-p, --prefix=STRING combine only lines having STRING as prefix\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
In -wNUMBER, the letter `w' may be omitted.\n"),
stdout);
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -398,7 +398,7 @@ main (register int argc, register char **argv)
if (show_version)
{
printf ("fmt - %s\n", PACKAGE_VERSION);
printf ("fmt (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -93,7 +93,7 @@ standard output.\n\
-s, --spaces break at spaces\n\
-w, --width=WIDTH use WIDTH columns instead of 80\n\
"));
puts (_("\nReport bugs to bug-gnu-utils@gnu.ai.mit.edu"));
puts (_("\nReport bugs to textutils-bugs@gnu.ai.mit.edu"));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
@@ -310,7 +310,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("fold - %s\n", PACKAGE_VERSION);
printf ("fold (%s) %s\n", GNU_PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}

View File

@@ -37,7 +37,7 @@ case $# in
z--help )
echo "$usage"; exit 0 ;;
z--version )
echo "groups - @PKG_VERSION@"; exit 0 ;;
echo "groups (@GNU_PACKAGE@) @VERSION@"; exit 0 ;;
* ) ;;
esac
;;

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