Compare commits

...

767 Commits

Author SHA1 Message Date
Jim Meyering
6b3f36f935 . 1997-01-27 02:18:56 +00:00
Jim Meyering
1010c1f580 . 1997-01-26 20:01:11 +00:00
Jim Meyering
7490632078 . 1997-01-26 19:04:03 +00:00
Jim Meyering
537381d409 . 1997-01-26 19:03:30 +00:00
Jim Meyering
3a01be66d4 . 1997-01-26 19:02:52 +00:00
Jim Meyering
8a87c1a169 . 1997-01-26 19:01:54 +00:00
Jim Meyering
07b07ca07c . 1997-01-26 18:57:36 +00:00
Jim Meyering
26a10a8026 (usage): Fix typo (--writeable -> --writable) in help output 1997-01-26 18:51:44 +00:00
Jim Meyering
072c1efe39 (parse_options): Add quotes to make messages identical. 1997-01-26 18:50:33 +00:00
Jim Meyering
c38939be8e . 1997-01-26 07:03:50 +00:00
Jim Meyering
e48314ac1b bracket prototype with PARAMS 1997-01-26 06:23:06 +00:00
Jim Meyering
7c94dda02d . 1997-01-26 05:57:12 +00:00
Jim Meyering
fe6c711f48 Restore dcl of free. with obstacks, you need it. 1997-01-26 05:57:04 +00:00
Jim Meyering
2c7c121c13 Revert last change. With obstack, dcl of free is *required*. 1997-01-26 05:55:02 +00:00
Jim Meyering
7a8b837062 . 1997-01-26 05:13:26 +00:00
Jim Meyering
25eb22e88f . 1997-01-26 05:08:56 +00:00
Jim Meyering
7f798f5f4f (count_entry): Fix blatant bug (typo?) that made
--megabytes report numbers in units of kilobytes.
Reported by Galen Hazelwood.
1997-01-26 05:05:06 +00:00
Jim Meyering
9d502e7240 . 1997-01-26 05:04:35 +00:00
Jim Meyering
c1ecd3afea . 1997-01-26 04:52:42 +00:00
Jim Meyering
a95088a5ea (print_factors): Reflect changes to xstrtoul interface. 1997-01-26 04:52:32 +00:00
Jim Meyering
fb43ebcbae . 1997-01-26 04:48:39 +00:00
Jim Meyering
73ed11f2b7 (parse_options): Remove unnecessary goto and label. 1997-01-26 04:48:29 +00:00
Jim Meyering
6390686aab . 1997-01-26 04:44:03 +00:00
Jim Meyering
3e0c759c3a (parse_obsolescent_option): Comment. 1997-01-26 04:43:42 +00:00
Jim Meyering
10f565971b . 1997-01-26 04:30:49 +00:00
Jim Meyering
e1ea22da05 (is_ancestor): Add it. 1997-01-26 04:30:39 +00:00
Jim Meyering
1e71247ea0 . 1997-01-26 04:14:26 +00:00
Jim Meyering
46f650f6b0 . 1997-01-26 04:13:46 +00:00
Jim Meyering
74bca24efe . 1997-01-26 04:12:46 +00:00
Jim Meyering
e385fd1e4c . 1997-01-26 04:12:20 +00:00
Jim Meyering
239899ae58 Interpret `input arg is a hash
reference' as meaning that the tested program will read no input.
Most of the tests for the date program use this feature.
Also for date, the generated script now reflects specification
(in Test.pm) of default and per-test environment settings.
1997-01-26 03:12:41 +00:00
Jim Meyering
2a3863e2b8 . 1997-01-26 03:01:01 +00:00
Jim Meyering
bd30083472 . 1997-01-26 02:59:50 +00:00
Jim Meyering
01839f9f82 remove trailing blanks 1997-01-25 13:50:24 +00:00
Jim Meyering
6f807a8598 remove now-spurious junk 1997-01-25 13:45:55 +00:00
Jim Meyering
94439345f5 . 1997-01-25 13:38:54 +00:00
Jim Meyering
e9dc554349 (noinst_HEADERS): Add getdate.h. 1997-01-25 13:38:49 +00:00
Jim Meyering
68ed0308cf . 1997-01-25 06:59:56 +00:00
Jim Meyering
fb04070061 . 1997-01-25 06:54:19 +00:00
Jim Meyering
9200311684 . 1997-01-25 06:52:50 +00:00
Jim Meyering
dd374cd779 . 1997-01-25 06:46:53 +00:00
Jim Meyering
71076df2d8 . 1997-01-25 06:46:33 +00:00
Jim Meyering
a1a27df129 . 1997-01-25 06:45:38 +00:00
Jim Meyering
fd685e41d6 Move the code from configure.in into
this macro that resorts to looking for getgroups in -lbsd.
Set new shell variable, GETGROUPS_LIB (that callers should check),
if it is found there.
1997-01-25 06:45:32 +00:00
Jim Meyering
c672fc6df6 . 1997-01-25 06:43:47 +00:00
Jim Meyering
0a735b7b9e . 1997-01-25 06:43:16 +00:00
Jim Meyering
5aaadded9d . 1997-01-25 06:37:40 +00:00
Jim Meyering
a8bcd782c4 update for changed xstrtou?l 1997-01-25 06:21:24 +00:00
Jim Meyering
2be7ff8311 . 1997-01-25 06:17:20 +00:00
Jim Meyering
0894db7b3f (XSTRTOL_H): Undefine it. 1997-01-25 06:17:13 +00:00
Jim Meyering
d58a074dea . 1997-01-25 06:15:49 +00:00
Jim Meyering
d73bc3ca57 [!_STRTOL_ERROR]: Define the type `enum strtol_error'
only if it hasn't already been defined.
1997-01-25 06:15:18 +00:00
Jim Meyering
186d893f27 (__xstrtol): Change interpretation of
VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "".  Use the former
when any suffix is valid, the later when no suffix is allowed.
1997-01-25 06:13:46 +00:00
Jim Meyering
edeada009c fix copyright filling 1997-01-25 06:11:48 +00:00
Jim Meyering
18195dd699 fix copyright filling 1997-01-25 06:11:22 +00:00
Jim Meyering
338b31ba60 . 1997-01-25 05:58:58 +00:00
Jim Meyering
562eb3d16d . 1997-01-25 05:56:52 +00:00
Jim Meyering
175fb661e0 (parse_long_options): Reset optind to zero
before just returning so that getopt internals get initialized from
the probably-new parameters when/if getopt is called later.
1997-01-25 05:37:15 +00:00
Jim Meyering
50c04a9d3e (parse_obsolescent_option): Recognize and fail for
more malformed obsolescent options.  Makes for better diagnostics.
1997-01-24 02:11:52 +00:00
Jim Meyering
8a66d0dd57 . 1997-01-24 01:16:39 +00:00
Jim Meyering
1f678023d5 . 1997-01-23 05:15:14 +00:00
Jim Meyering
b66a30133f . 1997-01-23 04:12:43 +00:00
Jim Meyering
598a7bda46 . 1997-01-23 04:03:50 +00:00
Jim Meyering
0800b55642 . 1997-01-23 04:01:58 +00:00
Jim Meyering
5ac433d292 . 1997-01-23 04:00:19 +00:00
Jim Meyering
b22469537b . 1997-01-23 03:55:50 +00:00
Jim Meyering
591844b387 . 1997-01-23 03:47:20 +00:00
Jim Meyering
2611844743 (parse_options): New function.
(parse_obsolescent_option): New function.
(main): Use the new functions instead of open-coding them.
This better fixes the bug in handling obsolescent `+Nc' options.
General cleanup.
1997-01-23 03:38:23 +00:00
Jim Meyering
c04fc60484 . 1997-01-23 03:22:16 +00:00
Jim Meyering
ffb626613a . 1997-01-23 03:02:56 +00:00
Jim Meyering
3452006a53 . 1997-01-23 03:02:17 +00:00
Jim Meyering
161422b9b2 . 1997-01-23 02:45:08 +00:00
Jim Meyering
2091adbbb1 Update from GNU via Uli 1997-01-23 02:45:02 +00:00
Jim Meyering
ccbf5f37f1 . 1997-01-23 02:25:26 +00:00
Jim Meyering
ef2b6836fd revert last change 1997-01-23 02:23:44 +00:00
Jim Meyering
44386ac6ff . 1997-01-23 02:21:03 +00:00
Jim Meyering
5c7e1b6bee . 1997-01-23 02:18:00 +00:00
Jim Meyering
3266134b2a . 1997-01-23 02:16:55 +00:00
Jim Meyering
63571532a2 (AM_FUNC_MKTIME): Run tests for each of a few values
for the TZ environment variable.  Andre Novaes Cunha provided the
hairy TZ setting that exercized the Solaris tzset bug.
1997-01-23 02:16:20 +00:00
Jim Meyering
82b01ee905 increment serial number 1997-01-23 00:39:19 +00:00
Jim Meyering
48569d6b98 [strftime]: Add parameters to macro definition. From Drepper. 1997-01-22 23:23:04 +00:00
Jim Meyering
211fe36692 (main): Use TZ=GMT0, not TZ=GMT, since only GMT0 is specified by Posix.1. 1997-01-22 22:45:47 +00:00
Jim Meyering
8dd8bb78b1 . 1997-01-22 22:43:41 +00:00
Jim Meyering
d64cc3c1ef (_strftime_copytm): New function, to work around Solaris 2.5 tzset bug.
From Paul Eggert.
1997-01-22 22:43:15 +00:00
Jim Meyering
db7201835d . 1997-01-22 22:39:41 +00:00
Jim Meyering
74cb2ee314 (AM_FUNC_MKTIME): Fix bug in mktime test -- don't
test now, test a couple of thousand times.
1997-01-22 22:38:37 +00:00
Jim Meyering
6d24eee926 . 1997-01-22 04:56:25 +00:00
Jim Meyering
aeb7c0bc47 . 1997-01-22 04:55:59 +00:00
Jim Meyering
940f23f4a4 . 1997-01-22 04:53:59 +00:00
Jim Meyering
f3f1cae097 (main): Properly handle what the POSIX spec calls
the `obsolescent' usage (e.g., tail +2c).  It didn't work.
Reported by Karl Heuer.
1997-01-22 04:53:52 +00:00
Jim Meyering
fbe50426e2 . 1997-01-22 04:48:32 +00:00
Jim Meyering
8011a147de . 1997-01-21 04:21:48 +00:00
Jim Meyering
3cca257a3b . 1997-01-19 15:24:40 +00:00
Jim Meyering
de96d28c57 . 1997-01-19 13:18:30 +00:00
Jim Meyering
783fb6b2a6 . 1997-01-19 13:11:40 +00:00
Jim Meyering
b969dad022 Indent with GNU indent. 1997-01-18 20:17:39 +00:00
Jim Meyering
c1db691c12 Indent 2 more cpp-directives to reflect nesting. 1997-01-18 20:12:10 +00:00
Jim Meyering
5f9c33edfe (get_date): Change prototype to reflect const'ness of parameters.
Indent cpp-directives to reflect nesting.
1997-01-18 20:11:05 +00:00
Jim Meyering
10d7644859 . 1997-01-18 20:08:05 +00:00
Jim Meyering
6cb5a99aa7 Include getdate.h.
(<time.h>, <sys/time.h>): Don't include -- now getdate.h does it.
1997-01-18 20:06:50 +00:00
Jim Meyering
f696bb6737 . 1997-01-18 16:58:30 +00:00
Jim Meyering
8a9acec293 . 1997-01-18 16:57:45 +00:00
Jim Meyering
7eeedf8385 . 1997-01-18 15:46:09 +00:00
Jim Meyering
4c066c3552 . 1997-01-18 15:32:52 +00:00
Jim Meyering
6e5149f0ab 1997-01-06 Paul Eggert <eggert@twinsun.com>
* getdate.y: Rewrite to use mktime.

<sys/timeb.h>: Don't include.
(mktime): Declare.

(struct timeb, timezone, DOOMSDAY, SECSPERDAY, DSTMODE, yyDSTmode,
ToSeconds, Convert, DSTcorrect, RelativeDate, RelativeMonth): Remove.
(ToHour): New function (part of the old ToSeconds fn).
(ToYear): New function (part of the old Convert fn).

(TABLE.value, yyDayOrdinal, yyDayNumber, yyTimezone, yyDay, yyHour,
yyMinutes, yyMonth, yySeconds, yyYear, yyRelMonth, yyRelSeconds,
Number): Now int instead of time_t.
(HOUR): Don't cast to time_t.

(tDAY_UNIT, tHOUR_UNIT, tYEAR_UNIT): New %tokens.
(UnitsTable): Use new units that are closer to the keywords.

(yyRelDay, yyRelHour, yyRelMinutes, yyRelYear): New variables.
(rel, relunit, get_date): Add support for them.

(time): Fix timezone calculations for negative half-hour offsets
when integer division truncates towards minus infinity.

(zone): Incorporiate DST calculation directly.

(get_date): 2nd arg is now time_t *, not struct timeb *.
Use mktime to do most of the work, instead of computing it ourselves.
Guard against falsely reporting errors near the time_t boundaries
when parsing times in other time zones.
1997-01-18 15:32:16 +00:00
Jim Meyering
af12dd6260 Add comment re HAVE_PSTAT_GETDYNAMIC. 1997-01-18 15:07:16 +00:00
Jim Meyering
f8e40348be reindent 1997-01-18 13:44:49 +00:00
Jim Meyering
be8f2b0de2 . 1997-01-17 03:01:15 +00:00
Jim Meyering
279f065a06 (AM_FUNC_GETLOADAVG): Check for pstat_getdynamic. 1997-01-17 03:00:45 +00:00
Jim Meyering
c7837e95d2 Fix up indentation a little. 1997-01-15 04:59:07 +00:00
Jim Meyering
9130f4b9d2 Indent cpp-directives to reflect nesting. 1997-01-15 04:55:39 +00:00
Jim Meyering
5aa14aeef0 [!STDC_HEADERS]: Remove unnecessary declaration of free. 1997-01-15 04:42:05 +00:00
Jim Meyering
61976fe88d [!STDC_HEADERS]: Remove unnecessary declaration of free. 1997-01-15 04:41:12 +00:00
Jim Meyering
0868a7d0bd Add struct dir_list and is_ancestor. 1997-01-15 04:35:01 +00:00
Jim Meyering
48be557ad6 . 1997-01-13 04:23:05 +00:00
Jim Meyering
371f45401c Regenerated to reflect renamed tests. 1997-01-13 04:21:30 +00:00
Jim Meyering
9b9213f122 Rename tests so that the associated files
have names that are distinct even on filesystems on which file
names are case insensitive.
1997-01-13 04:20:54 +00:00
Jim Meyering
4c3d7d6a8b . 1997-01-13 04:17:16 +00:00
Jim Meyering
720d1c1c5e Regenerated to reflect renamed tests. 1997-01-13 04:16:57 +00:00
Jim Meyering
0dac1e107c Rename tests so that the associated files
have names that are distinct even on filesystems on which file
names are case insensitive.
1997-01-13 04:16:16 +00:00
Jim Meyering
31a8ced738 . 1997-01-11 22:35:42 +00:00
Jim Meyering
eb07a88b9e . 1997-01-11 04:23:46 +00:00
Jim Meyering
0503b28076 . 1997-01-11 04:21:29 +00:00
Jim Meyering
f45eaa5782 . 1997-01-09 12:38:53 +00:00
Jim Meyering
2f00343264 Remove AC_ISC_POSIX. 1997-01-09 12:24:51 +00:00
Jim Meyering
323c9cfee7 . 1997-01-09 02:35:52 +00:00
Jim Meyering
676a608318 . 1997-01-09 02:35:30 +00:00
Jim Meyering
39d1a08208 . 1997-01-09 02:34:14 +00:00
Jim Meyering
9ca6f19a2d (print_long_format): Cast alloca return value to char*. 1997-01-09 02:33:44 +00:00
Jim Meyering
0acd885d83 . 1997-01-09 00:09:17 +00:00
Jim Meyering
9110853f39 . 1997-01-08 22:40:47 +00:00
Jim Meyering
4ffe108e39 (_getopt_internal): Use _', rather than the (sometimes-)expansion gettext'. 1997-01-08 22:40:00 +00:00
Jim Meyering
7290a43da9 . 1997-01-08 12:29:57 +00:00
Jim Meyering
9cfc701536 . 1997-01-08 04:59:01 +00:00
Jim Meyering
b0a020d50b . 1997-01-08 04:57:06 +00:00
Jim Meyering
36942690e1 . 1997-01-08 04:56:45 +00:00
Jim Meyering
afda328772 . 1997-01-08 04:52:41 +00:00
Jim Meyering
8a752e8696 [_]: Define to gettext also if ENABLE_NLS is defined. 1997-01-08 04:52:00 +00:00
Jim Meyering
8bd5d9e607 . 1997-01-08 04:50:29 +00:00
Jim Meyering
6885aee87b . 1997-01-08 04:49:33 +00:00
Jim Meyering
e4c57a939b (main): Work around failures induced by new version of
getopt.c by not modifying optind before the first getopt_long call
in main.  With suggestions from Ulrich Drepper.
1997-01-08 04:47:56 +00:00
Jim Meyering
b802aa3f55 New (more POSIX compliant) version from GNU libc. 1997-01-08 04:11:29 +00:00
Jim Meyering
8f915aadf8 . 1997-01-06 04:24:52 +00:00
Jim Meyering
662e8b4a03 . 1997-01-06 04:19:50 +00:00
Jim Meyering
3dd86270c6 . 1997-01-06 03:31:03 +00:00
Jim Meyering
ce7c0d5468 . 1997-01-06 03:23:19 +00:00
Jim Meyering
9ae64058d2 . 1997-01-06 03:21:55 +00:00
Jim Meyering
92de89ed2c . 1997-01-05 20:32:57 +00:00
Jim Meyering
5f0b9f1d99 (print_long_format): Detect and handle strftime failure
due to pathologically long strings in locale tables. Patch from Paul Eggert.
(print_long_format): Change references to BIGBUF in use of FPUT macro
to references to BUF.
Use 11 (not 20) bytes for mode string buffer.
1997-01-05 20:32:49 +00:00
Jim Meyering
8ebfd37293 (print_long_format): NUL-terminate line of output. 1997-01-05 15:39:27 +00:00
Jim Meyering
cb6351aa82 (print_long_format): First patch from Paul Eggert. 1997-01-05 15:33:44 +00:00
Jim Meyering
a518e28429 . 1997-01-05 03:32:28 +00:00
Jim Meyering
7de0d8e233 . 1997-01-05 03:24:32 +00:00
Jim Meyering
839c312d49 . 1997-01-05 03:19:46 +00:00
Jim Meyering
783bace690 (print_long_format): Clean up vestiges of legacy
ctime-oriented code.  With internationalization and strftime,
you can't presume that %a expands to a 3-byte string.
Reported by Ross Ridge.
1997-01-05 03:18:49 +00:00
Jim Meyering
31d836282b . 1997-01-04 03:09:44 +00:00
Jim Meyering
bc73cf3351 Fix typo. 1997-01-03 05:10:19 +00:00
Jim Meyering
731cbc77fb . 1997-01-03 05:05:45 +00:00
Jim Meyering
2bd16e646e . 1997-01-03 03:24:22 +00:00
Jim Meyering
7f2c13e703 . 1997-01-03 03:20:24 +00:00
Jim Meyering
635a7c3186 (init_fps): Initialize lines_stored field in three places.
This avoids uninitialized memory reads in close_file.
1997-01-03 03:20:14 +00:00
Jim Meyering
42d1927306 . 1997-01-03 03:16:59 +00:00
Jim Meyering
ba246b0f36 (EXTRA_DIST): Add getgroups.c. 1997-01-03 03:16:29 +00:00
Jim Meyering
13ff080b78 . 1997-01-02 03:13:49 +00:00
Jim Meyering
06a5782edd . 1997-01-02 02:21:58 +00:00
Jim Meyering
12f377da25 . 1997-01-01 23:35:31 +00:00
Jim Meyering
c423a2d74a . 1996-12-31 16:18:06 +00:00
Jim Meyering
04a1a572f4 . 1996-12-30 05:45:23 +00:00
Jim Meyering
1ba3bd3896 (init_header): Plug a small memory leak by using stack
rather than heap for a 15-byte temporary buffer.
1996-12-30 05:43:58 +00:00
Jim Meyering
fb59a28b16 . 1996-12-30 04:11:13 +00:00
Jim Meyering
ab48b17dca . 1996-12-29 20:34:21 +00:00
Jim Meyering
d2ca2163c6 . 1996-12-29 03:47:51 +00:00
Jim Meyering
5ae342e1a9 Two problems fixed by these changes from Joakim Rosqvist.
Quoting Joakim:
1) The "total" number and the size of the first file as
output from 'ls --color -s' did not get colorized according
to the "no"-argument in LS_COLORS. Fixed by adding a function
prep_non_filename_text which prints the C_LEFT C_NORM C_RIGHT
strings (or C_END). It is called from main before any text is
output, and from print_name_with_quoting after having output a
colorized filename.
2) If the "no"-argument of LS_COLORS is set, the terminal will be
set to print in that color after ls exits. The man-pages suggests
setting "no" and "fi" to the terminals default colors to avoid
the problem, but that would mean I can't use anything but the
default color for regular files and non-filename text. Fixed by
outputting C_LEFT immediately followed by C_RIGHT right before
exit, which restores the default color.
1996-12-29 03:47:34 +00:00
Jim Meyering
6c635d1f27 . 1996-12-29 01:48:20 +00:00
Jim Meyering
42640f71df Correct obsolete comment referring to macro that is now ls_mode. 1996-12-28 20:32:39 +00:00
Jim Meyering
0b83b3090b . 1996-12-28 16:04:01 +00:00
Jim Meyering
4b583d1691 . 1996-12-28 13:30:51 +00:00
Jim Meyering
a182aa4e5a . 1996-12-28 06:27:35 +00:00
Jim Meyering
22ca9b17a5 . 1996-12-28 06:07:39 +00:00
Jim Meyering
04916b80de . 1996-12-28 06:06:51 +00:00
Jim Meyering
d7d7ae76b2 . 1996-12-28 06:05:51 +00:00
Jim Meyering
da7809f65c (TAB_WIDTH): Cleaned up definition and renamed from tab_width.
(POS_AFTER_TAB): Cleaned up definition and renamed from pos_after_tab.
1996-12-28 06:04:36 +00:00
Jim Meyering
b7d3a68ce5 . 1996-12-28 05:34:01 +00:00
Jim Meyering
8794c292e7 Fix a couple of thinkos and typos.
Now it works with pr's tests, too.
1996-12-28 05:30:46 +00:00
Jim Meyering
ece3b1d144 . 1996-12-28 05:27:53 +00:00
Jim Meyering
8087dd5668 Regenerate list of explicit files, this time with duplicates removed. 1996-12-28 05:27:25 +00:00
Jim Meyering
1a622aa2d9 . 1996-12-28 05:15:56 +00:00
Jim Meyering
1ea9952168 . 1996-12-28 05:14:37 +00:00
Jim Meyering
4df74fe308 . 1996-12-28 05:12:09 +00:00
Jim Meyering
68545c98ed . 1996-12-28 04:58:34 +00:00
Jim Meyering
4650315342 Indent cpp directives. 1996-12-28 04:58:26 +00:00
Jim Meyering
fbfde91f6a [!WTMP_FILE]: Provide default path.
(UTMP_FILE) [UTMPX_FILE]: Use UTMPX_FILE in favor of UTMP_FILE.
Patch from Kaveh R. Ghazi.
1996-12-28 04:44:35 +00:00
Jim Meyering
e3f1d80dd9 Rewrite the test so that systems lacking
getgroups don't try to use the supplied replacement function --
that depends on the existence of such a function.
1996-12-28 02:59:25 +00:00
Jim Meyering
5e58599e6e (usage): Break long string literal into two separate
printf statements to accomodate default maximum of 2048 characters
for Irix-4.0.5.  Reported by Kaveh Ghazi.
1996-12-28 02:28:56 +00:00
Jim Meyering
c22036ab86 . 1996-12-28 00:22:01 +00:00
Jim Meyering
34ffd87f30 Make 'em arrays of references, not arrays of arrays. 1996-12-28 00:19:56 +00:00
Jim Meyering
cea704d6da . 1996-12-28 00:11:07 +00:00
Jim Meyering
ddf8459662 . 1996-12-27 23:31:41 +00:00
Jim Meyering
8320e65164 Add comment.
Rename local, ng to n_groups.
1996-12-27 03:36:53 +00:00
Jim Meyering
f42460fb09 . 1996-12-24 19:28:22 +00:00
Jim Meyering
24a118665e . 1996-12-23 23:58:14 +00:00
Jim Meyering
3bcffe04d7 revert last change 1996-12-23 23:57:56 +00:00
Jim Meyering
79523152dd remove support for --string option 1996-12-23 23:57:09 +00:00
Jim Meyering
35aaa568cd . 1996-12-23 05:59:33 +00:00
Jim Meyering
85da146bd2 . 1996-12-23 05:59:12 +00:00
Jim Meyering
ae8ee650ea . 1996-12-23 05:46:00 +00:00
Jim Meyering
4a11d01711 . 1996-12-23 05:41:42 +00:00
Jim Meyering
f76a4b618e . 1996-12-23 05:41:19 +00:00
Jim Meyering
c8c91b5e20 . 1996-12-23 05:33:05 +00:00
Jim Meyering
70155d8013 (EXTRA_DIST): Add README. 1996-12-23 05:31:46 +00:00
Jim Meyering
af14a04c19 . 1996-12-23 05:26:10 +00:00
Jim Meyering
6e62afaaed . 1996-12-23 05:15:44 +00:00
Jim Meyering
9190f77006 . 1996-12-23 05:14:55 +00:00
Jim Meyering
5d845a1678 . 1996-12-22 19:09:49 +00:00
Jim Meyering
f6c32178c7 . 1996-12-22 14:20:27 +00:00
Jim Meyering
ff5cd3f6a3 . 1996-12-22 14:18:09 +00:00
Jim Meyering
b3d8117527 . 1996-12-22 14:17:20 +00:00
Jim Meyering
103713c42b . 1996-12-22 14:15:37 +00:00
Jim Meyering
c84fb64144 . 1996-12-22 14:14:01 +00:00
Jim Meyering
8e02fb10ab Use same framework as other tests. 1996-12-22 14:12:06 +00:00
Jim Meyering
1b47ed2714 Use test_vector, not array @t. 1996-12-22 14:09:10 +00:00
Jim Meyering
dcd02c8008 Use test_vector, not array @t. 1996-12-22 14:04:47 +00:00
Jim Meyering
a80c49322b . 1996-12-22 03:32:51 +00:00
Jim Meyering
3982e9cdf8 . 1996-12-22 03:30:23 +00:00
Jim Meyering
a5b6fae599 . 1996-12-22 03:25:05 +00:00
Jim Meyering
b660d78cf5 . 1996-12-22 03:24:25 +00:00
Jim Meyering
c86883a62a . 1996-12-22 03:03:48 +00:00
Jim Meyering
e36197cd8f . 1996-12-22 02:51:34 +00:00
Jim Meyering
2185c1f3d8 Clone the Makefile.am from join-test.
Replace only the definition of $x and the auto-generated lists of test files.
1996-12-22 02:51:17 +00:00
Jim Meyering
48a76e855c Clone the Makefile.am from join-test.
Replace only the definition of $x and the auto-generated lists of test files.
1996-12-22 02:50:34 +00:00
Jim Meyering
19b5a4f761 Clone the Makefile.am from join-test.
Replace only the definition of $x and the auto-generated lists of
test files.
1996-12-22 02:50:15 +00:00
Jim Meyering
9dbd283b1e use 77 as max line len when wrapping 1996-12-22 02:46:14 +00:00
Jim Meyering
4376f9f2ce . 1996-12-22 02:44:12 +00:00
Jim Meyering
37fea371b7 . 1996-12-22 02:34:14 +00:00
Jim Meyering
bb02f48670 . 1996-12-22 02:33:17 +00:00
Jim Meyering
64cd458e0a Add @MAINT@-protected rule for verifying that Makefile.am is
consistent with Test.pm.
1996-12-22 02:32:56 +00:00
Jim Meyering
bc9aded4b9 . 1996-12-22 02:32:01 +00:00
Jim Meyering
a611c6cbf6 (wrap): New function.
Use it.
1996-12-21 22:16:03 +00:00
Jim Meyering
68c33eea03 . 1996-12-21 18:49:14 +00:00
Jim Meyering
fec6a430da update from GNU libc 1996-12-21 13:51:26 +00:00
Jim Meyering
1266fc26ee . 1996-12-21 04:21:29 +00:00
Jim Meyering
41a41dd48e Replace hard-coded /etc/wtmp with WTMP_FILE. Suggestion from Eivind. 1996-12-21 04:14:45 +00:00
Jim Meyering
e59e2e803c . 1996-12-21 04:14:24 +00:00
Jim Meyering
52c7e3147e . 1996-12-21 04:09:35 +00:00
Jim Meyering
8829551700 . 1996-12-21 04:09:07 +00:00
Jim Meyering
e95fe088e1 (usage): Say that UTMP_FILE is the default FILE
rather than hard-coding /etc/utmp.
1996-12-21 04:08:25 +00:00
Jim Meyering
e13281014a (usage): Tweak --usage text. 1996-12-21 03:59:26 +00:00
Jim Meyering
aac56cabe4 . 1996-12-21 03:43:47 +00:00
Jim Meyering
df5f33a5bf . 1996-12-21 03:32:03 +00:00
Jim Meyering
0799786a33 . 1996-12-21 03:21:34 +00:00
Jim Meyering
6621f0a9a9 . 1996-12-21 03:20:48 +00:00
Jim Meyering
d5b9b29ac6 . 1996-12-21 03:15:44 +00:00
Jim Meyering
022a19b21f . 1996-12-21 02:03:14 +00:00
Jim Meyering
12133d7f01 . 1996-12-21 01:59:01 +00:00
Jim Meyering
58dfd6b442 copied from automake-1.1l 1996-12-21 01:56:50 +00:00
Jim Meyering
5fc47138b1 broken out of ../acinclude.m4 1996-12-21 01:50:50 +00:00
Jim Meyering
4a2b289e7c Update from GNU libc. 1996-12-21 01:40:43 +00:00
Jim Meyering
bab072f3aa . 1996-12-21 01:29:41 +00:00
Jim Meyering
8679e372cd . 1996-12-20 06:13:37 +00:00
Jim Meyering
b0690ba414 . 1996-12-20 06:11:59 +00:00
Jim Meyering
ed354b6490 (MAINTAINERCLEANFILES): Use $(in1) and $(in2), not $(in). 1996-12-20 06:11:50 +00:00
Jim Meyering
81d1fa5cb6 New option: --list. Generate lists of files used/generated. 1996-12-20 06:09:45 +00:00
Jim Meyering
421e75544b . 1996-12-20 05:48:34 +00:00
Jim Meyering
7466f41075 . 1996-12-20 05:46:47 +00:00
Jim Meyering
1e7d4b9c70 Adapted for new mk-script.pl. 1996-12-20 05:46:27 +00:00
Jim Meyering
6a13b75511 . 1996-12-20 05:45:24 +00:00
Jim Meyering
ebefd435aa . 1996-12-20 05:41:43 +00:00
Jim Meyering
b3335ab809 remove $nl. 1996-12-20 05:35:26 +00:00
Jim Meyering
d293e5f03c Adapted for new mk-script.pl. 1996-12-20 05:35:01 +00:00
Jim Meyering
0a470f01de Rewrite to be more general -- so it can be used for join, cut, sort, tr,
and soon, pr test suites.
1996-12-20 05:33:17 +00:00
Jim Meyering
b181d31372 . 1996-12-20 03:40:34 +00:00
Jim Meyering
b3a49ee8d0 . 1996-12-19 13:53:16 +00:00
Jim Meyering
35b886ad7b . 1996-12-19 05:21:47 +00:00
Jim Meyering
cecde31171 (ORPHAN): By default, color orphans red on a black background. 1996-12-19 05:21:40 +00:00
Jim Meyering
ae6c43a3ab (usage): Remove --print-data-base.
Now only --print-database remains.  Although it wasn't documented,
--print-data-base was still accepted.  But it made `--p', `--print',
`--print-data', etc. ambiguous.
1996-12-19 05:20:06 +00:00
Jim Meyering
17432bd066 . 1996-12-19 05:16:03 +00:00
Jim Meyering
c835f92a61 (gobble_file): Stat symlinks also when printing with
color and set linkok to reflect existence of referent.
Patches from Joakim Rosqvist, James Antill, and Jesse Thilo.
1996-12-19 05:15:34 +00:00
Jim Meyering
89b765e32c . 1996-12-19 05:14:59 +00:00
Jim Meyering
3752e13942 . 1996-12-19 04:23:21 +00:00
Jim Meyering
858afc04d2 [HAVE_PATHS_H]: Include <paths.h>.
[_PATH_DEFPATH]: Use this to define DEFAULT_LOGIN_PATH.
[_PATH_DEFPATH_ROOT]: Use this to define DEFAULT_ROOT_LOGIN_PATH.
From Rik Faith.
1996-12-19 04:20:53 +00:00
Jim Meyering
5fecd9e4d5 . 1996-12-19 02:35:10 +00:00
Jim Meyering
ae5ee331f1 run cpp-indent 1996-12-18 16:56:46 +00:00
Jim Meyering
954c7bc4cc another new version ... 1996-12-18 16:54:48 +00:00
Jim Meyering
625dc74361 . 1996-12-18 13:57:32 +00:00
Jim Meyering
b26beb4996 . 1996-12-18 13:53:00 +00:00
Jim Meyering
0b3d661480 in progress... 1996-12-18 05:29:52 +00:00
Jim Meyering
33448d128a . 1996-12-18 03:30:59 +00:00
Jim Meyering
b3ef6f599d . 1996-12-18 03:30:30 +00:00
Jim Meyering
72f95044eb (ISDIGIT): Replace with smaller, faster edition
that yields nonzero only on ASCII digits.
(ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
used to have.  From Paul Eggert.
1996-12-18 03:30:20 +00:00
Jim Meyering
859f8587f8 add blank line. 1996-12-18 03:28:09 +00:00
Jim Meyering
24e15328df . 1996-12-18 03:23:08 +00:00
Jim Meyering
357c53621f (ISDIGIT): Replace with smaller, faster edition
that yields nonzero only on ASCII digits.
(ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
used to have.  From Paul Eggert.
1996-12-18 03:22:56 +00:00
Jim Meyering
fd688bcc5f . 1996-12-18 03:14:58 +00:00
Jim Meyering
e8c6c8175b . 1996-12-18 03:13:27 +00:00
Jim Meyering
561e4c139e (ROOT_CHOWN_AFFECTS_SYMLINKS): New macro.
(DO_CHOWN): Take an additional parameter.
(LINK_CHOWN): Remove macro.
(copy): When preserving owner and group of a symlink, use
chown only if ROOT_CHOWN_AFFECTS_SYMLINKS and EUID == 0.
Otherwise, the chown would affect the file referenced through the symlink.
1996-12-18 03:13:09 +00:00
Jim Meyering
507288d2c7 . 1996-12-18 01:25:50 +00:00
Jim Meyering
6c47524481 (.pl): Make generated file read-only so
I don't accidentally modify it instead of the one with the .pl suffix.
1996-12-18 01:25:45 +00:00
Jim Meyering
300c151b8b . 1996-12-18 01:22:32 +00:00
Jim Meyering
3c7e9fec08 Update from GNU libc. 1996-12-18 00:21:38 +00:00
Jim Meyering
7235fb47cc . 1996-12-17 23:07:15 +00:00
Jim Meyering
8ef2abf7e9 . 1996-12-17 22:44:57 +00:00
Jim Meyering
5e55e49972 . 1996-12-17 21:54:29 +00:00
Jim Meyering
48a255beb0 . 1996-12-17 05:05:45 +00:00
Jim Meyering
17a2ec94a8 . 1996-12-16 00:40:55 +00:00
Jim Meyering
e7f8503138 . 1996-12-16 00:39:25 +00:00
Jim Meyering
f789ddbdda . 1996-12-15 22:17:29 +00:00
Jim Meyering
1f1bd53b86 . 1996-12-15 20:36:59 +00:00
Jim Meyering
3a2afe3311 apply spec_to_list to expected file, too. 1996-12-15 20:35:32 +00:00
Jim Meyering
20b960db10 . 1996-12-15 20:29:09 +00:00
Jim Meyering
8fd3e8664b (spec_to_list): New function -- factored out... 1996-12-15 20:27:12 +00:00
Jim Meyering
1b25f1c2cd begin generalization -- now it works with two-file input-specs 1996-12-15 20:09:13 +00:00
Jim Meyering
8569e32ec8 . 1996-12-15 20:07:24 +00:00
Jim Meyering
1321f30e73 . 1996-12-14 20:58:17 +00:00
Jim Meyering
290ee99712 . 1996-12-14 05:24:48 +00:00
Jim Meyering
3008ad90f4 twiddle FSF address in comment. 1996-12-14 05:23:41 +00:00
Jim Meyering
8c5b30bc1e (get_format_width, get_format_prec): Avoid
unnecessary comparison of digit to '\0'.
1996-12-14 05:22:46 +00:00
Jim Meyering
f0fa287b4f (digits): Remove; subsumed by new ISDIGIT.
(inittables): Remove initialization of `digits'.
(fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
(fraccompare, numcompare): Avoid casts to unsigned char that are no
longer needed.
1996-12-14 05:22:17 +00:00
Jim Meyering
4ecb3b28f1 (is_char_class_member): Use ISDIGIT_LOCALE instead of
ISDIGIT to test for characters in CC_DIGIT class.
1996-12-14 05:21:51 +00:00
Jim Meyering
ea93e0b7ad . 1996-12-13 23:41:12 +00:00
Jim Meyering
7603401c86 . 1996-12-13 05:43:35 +00:00
Jim Meyering
90d97b9703 (usage): Clarify description of -u option.
From Karl Berry.
1996-12-13 05:43:26 +00:00
Jim Meyering
4091022393 . 1996-12-13 04:35:00 +00:00
Jim Meyering
338061e307 . 1996-12-13 03:43:44 +00:00
Jim Meyering
6a99b4cc40 . 1996-12-13 03:07:23 +00:00
Jim Meyering
86d6c36d09 (IN_CTYPE_DOMAIN): Rename from ISASCII.
(ISDIGIT): New definition from Paul Eggert.
This one evaluates its argument exactly once.
(yylex): Move increment out of ISALPHA argument.  Use a
comma-expression instead.
1996-12-13 03:05:00 +00:00
Jim Meyering
a7f5043de8 (usage): Update bug-reporting address. 1996-12-13 02:47:33 +00:00
Jim Meyering
5110583f3e . 1996-12-13 02:47:22 +00:00
Jim Meyering
813c8e8bb6 .. 1996-12-12 13:19:43 +00:00
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
378 changed files with 33206 additions and 4826 deletions

View File

@@ -134,7 +134,8 @@ 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 December
1996:
Arabic `ar', Chinese `zh', Czech `cs', Danish `da', Dutch `nl',
English `en', Esperanto `eo', Finnish `fi', French `fr', German
@@ -172,40 +173,42 @@ 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 December 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
Ready PO files cs de en es fi fr ja ko nl no pl pt sl sv
.-------------------------------------------.
bash | [] [] | 2
bison | [] [] | 2
bash | [] [] [] | 3
bison | [] [] [] | 3
clisp | [] [] [] | 3
cpio | [] [] [] | 3
diffutils | [] [] [] | 3
cpio | [] [] [] [] | 4
diffutils | [] [] [] [] | 4
enscript | [] [] [] [] [] | 5
fileutils | [] [] [] [] [] [] | 6
findutils | [] [] [] [] [] | 5
flex | [] | 1
gcal | [] | 1
gettext | [] [] [] [] [] [] [] [] [] | 10
glibc | [] [] [] | 3
grep | [] [] [] [] [] [] [] | 7
hello | [] [] [] [] [] [] [] [] | 8
fileutils | [] [] [] [] [] [] [] [] | 8
findutils | [] [] [] [] [] [] | 6
flex | [] [] | 2
gcal | [] [] [] | 3
gettext | [] [] [] [] [] [] [] [] [] [] | 11
grep | [] [] [] [] [] [] [] [] | 8
hello | [] [] [] [] [] [] [] [] [] [] | 10
id-utils | [] [] | 2
indent | | 0
libc | [] [] [] [] [] [] | 6
m4 | [] [] [] [] [] | 5
make | [] [] | 2
mkid | [] [] | 2
make | [] [] [] [] [] | 5
music | [] | 1
ptx | [] [] [] [] [] | 5
ptx | [] [] [] [] [] [] [] [] | 8
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
14 languages cs de en es fi fr ja ko nl no pl pt sl sv
27 packages 1 21 1 11 1 24 1 8 20 7 14 6 7 14 136
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 +221,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
this `ABOUT-NLS' file on most GNU archive sites.
If December 1996 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites.

21
THANKS Normal file
View File

@@ -0,0 +1,21 @@
This is just a start at listing e-mail addresses of contributors.
The rest of the addresses are still in the ChangeLog.
Arne Henrik Juul arnej@imf.unit.no
Bauke Jan Douma: bjdouma@xs4all.nl
Charles Karney: karney@pppl.gov
Eirik Fuller: eirik@netcom.com
Emile LeBlanc: leblanc@math.toronto.edu
Galen Hazelwood: galenh@micron.net
James Antill: jmanti%essex.ac.uk@seralph21.essex.ac.uk
Jesse Thilo: jgt2@eecs.lehigh.edu
Joakim Rosqvist: dvljrt@cs.umu.se
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
Ross Ridge: rridge@calum.csclub.uwaterloo.ca
Santiago Vila Doncel: sanvila@ctv.es
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
Tony Leneis: tony@plaza.ds.adp.com
Wayne Stewart: wstewa@atl.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 -f `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
@@ -1259,7 +1322,7 @@ less than @var{bytes} bytes of the line are left, then continue
normally. @var{bytes} has the same format as for the @samp{--bytes}
option.
@itemx --verbose=@var{bytes}
@itemx --verbose
@opindex --verbose
Write a diagnostic to standard error just before each output file is opened.

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 getgroups.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 \
getdate.h getline.h getopt.h group-member.h long-options.h \
makepath.h modechange.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 getgroups.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 \
getdate.h getline.h getopt.h group-member.h long-options.h \
makepath.h modechange.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 getgroups.c getline.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/getgroups.P \
.deps/getline.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

@@ -68,8 +68,17 @@ char *malloc ();
# define IN_CTYPE_DOMAIN(c) isascii(c)
#endif
#define ISDIGIT(c) (IN_CTYPE_DOMAIN ((unsigned char) (c)) \
&& isdigit ((unsigned char) (c)))
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
/* ISDIGIT differs from ISDIGIT_LOCALE, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
- It's guaranteed to evaluate its argument exactly once.
- It's typically faster.
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless
it's important to use the locale's definition of `digit' even when the
host does not conform to Posix. */
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
#if defined (HAVE_UNISTD_H)
#include <unistd.h>

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

46
lib/getdate.h Normal file
View File

@@ -0,0 +1,46 @@
/* Copyright (C) 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# ifndef PARAMS
# if defined (__GNUC__) || __STDC__
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif
# endif
#if defined (vms)
# include <types.h>
# include <time.h>
#else
# include <sys/types.h>
# ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
#endif /* defined (vms) */
time_t get_date PARAMS ((const char *p, const time_t *now));

File diff suppressed because it is too large Load Diff

59
lib/getgroups.c Normal file
View File

@@ -0,0 +1,59 @@
/* provide consistent interface to getgroups for systems that don't allow N==0
Copyright (C) 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* written by Jim Meyering */
#include <config.h>
#include <stdio.h>
#include <sys/types.h>
char *xmalloc ();
/* On at least Ultrix 4.3 and NextStep 3.2, getgroups (0, 0) always fails.
On other systems, it returns the number of supplemental groups for the
process is returned.
This function handles that special case and lets the system-
provided function handle all others. */
int
getgroups (n, group)
size_t n;
GETGROUPS_T *group;
{
int n_groups;
GETGROUPS_T *gbuf;
#undef getgroups
if (n != 0)
return getgroups (n, group);
n = 20;
gbuf = NULL;
while (1)
{
gbuf = (GETGROUPS_T *) xrealloc (gbuf, n * sizeof (GETGROUPS_T));
n_groups = getgroups (n, gbuf);
if (n_groups < n)
break;
n += 10;
}
free (gbuf);
return n_groups;
}

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_ */

File diff suppressed because it is too large Load Diff

View File

@@ -3,22 +3,26 @@
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
before changing it!
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1996
Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
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 file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
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.
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 General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library 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. */
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. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
@@ -48,18 +52,24 @@
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__)
#define GETOPT_INTERFACE_VERSION 2
#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
#include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE
#endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#ifdef __GNU_LIBRARY__
/* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
#include <stdlib.h>
#if defined (_LIBC) || defined (HAVE_UNISTD_H)
#include <unistd.h>
#endif
#endif /* GNU C library. */
#ifdef VMS
@@ -69,7 +79,7 @@
#endif
#endif
#ifdef WIN32
#if defined (WIN32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
@@ -116,14 +126,20 @@ char *optarg = NULL;
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns EOF, this is the index of the first of the
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
/* XXX 1003.2 says this must be 1 before any call. */
int optind = 0;
/* 1003.2 says this must be 1 before any call. */
int optind = 1;
/* Formerly, initialization of getopt depended on optind==0, which
causes problems with re-calling getopt as programs generally don't
know that. */
int __getopt_initialized = 0;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
@@ -172,7 +188,7 @@ int optopt = '?';
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return EOF with `optind' != ARGC. */
`--' can cause `getopt' to return -1 with `optind' != ARGC. */
static enum
{
@@ -182,7 +198,7 @@ static enum
/* Value of POSIXLY_CORRECT environment variable. */
static char *posixly_correct;
#ifdef __GNU_LIBRARY__
#ifdef __GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
@@ -233,12 +249,31 @@ extern int strlen (const char *);
static int first_nonopt;
static int last_nonopt;
#ifdef _LIBC
/* Bash 2.0 gives us an environment variable containing flags
indicating ARGV elements that should not be considered arguments. */
static const char *nonoption_flags;
static int nonoption_flags_len;
static int original_argc;
static char *const *original_argv;
/* Make sure the environment variable bash 2.0 puts in the environment
is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */
static void store_args (int argc, char *const *argv) __attribute__ ((unused));
static void
store_args (int argc, char *const *argv)
{
/* XXX This is no good solution. We should rather copy the args so
that we can compare them later. But we must not use malloc(3). */
original_argc = argc;
original_argv = argv;
}
text_set_element (__libc_subinit, store_args);
#endif
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
which contains all the non-options that have been skipped so far.
@@ -311,10 +346,12 @@ exchange (argv)
/* Initialize the internal data when the first call is made. */
#if defined (__STDC__) && __STDC__
static const char *_getopt_initialize (const char *);
static const char *_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
_getopt_initialize (optstring)
_getopt_initialize (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
@@ -344,7 +381,9 @@ _getopt_initialize (optstring)
else
ordering = PERMUTE;
if (posixly_correct == NULL)
#ifdef _LIBC
if (posixly_correct == NULL
&& argc == original_argc && argv == original_argv)
{
/* Bash 2.0 puts a special variable in the environment for each
command it runs, specifying which ARGV elements are the results of
@@ -358,6 +397,9 @@ _getopt_initialize (optstring)
else
nonoption_flags_len = strlen (nonoption_flags);
}
else
nonoption_flags_len = 0;
#endif
return optstring;
}
@@ -375,7 +417,7 @@ _getopt_initialize (optstring)
updating `optind' and `nextchar' so that the next call to `getopt' can
resume the scan with the following option character or ARGV-element.
If there are no more option characters, `getopt' returns `EOF'.
If there are no more option characters, `getopt' returns -1.
Then `optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
@@ -429,18 +471,24 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
{
optarg = NULL;
if (optind == 0)
if (!__getopt_initialized || optind == 0)
{
optstring = _getopt_initialize (optstring);
optstring = _getopt_initialize (argc, argv, optstring);
optind = 1; /* Don't scan ARGV[0], the program name. */
__getopt_initialized = 1;
}
/* Test whether ARGV[optind] points to a non-option argument.
Either it does not have option syntax, or there is an environment flag
from the shell indicating it is not an option. */
from the shell indicating it is not an option. The later information
is only used when the used in the GNU libc. */
#ifdef _LIBC
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|| (optind < nonoption_flags_len \
&& nonoption_flags[optind] == '1'))
#else
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
#endif
if (nextchar == NULL || *nextchar == '\0')
{
@@ -498,7 +546,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
that we previously skipped, so the caller will digest them. */
if (first_nonopt != last_nonopt)
optind = first_nonopt;
return EOF;
return -1;
}
/* If we have come to a non-option and did not permute it,
@@ -507,7 +555,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (NONOPTION_P)
{
if (ordering == REQUIRE_ORDER)
return EOF;
return -1;
optarg = argv[optind++];
return 1;
}
@@ -543,22 +591,19 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound;
int indfound = -1;
int option_index;
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
#ifdef lint /* Suppress `used before initialized' warning. */
indfound = 0;
#endif
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, nextchar, nameend - nextchar))
{
if (nameend - nextchar == strlen (p->name))
if ((unsigned int) (nameend - nextchar)
== (unsigned int) strlen (p->name))
{
/* Exact match found. */
pfound = p;
@@ -601,16 +646,16 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else
{
if (opterr)
if (argv[optind - 1][1] == '-')
/* --option */
fprintf (stderr,
_("%s: option `--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
else
/* +option or -option */
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
if (argv[optind - 1][1] == '-')
/* --option */
fprintf (stderr,
_("%s: option `--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
else
/* +option or -option */
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
nextchar += strlen (nextchar);
@@ -626,8 +671,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
{
if (opterr)
fprintf (stderr,
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
nextchar += strlen (nextchar);
optopt = pfound->val;
return optstring[0] == ':' ? ':' : '?';
@@ -694,6 +739,130 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
optopt = c;
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
if (temp[0] == 'W' && temp[1] == ';')
{
char *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound = 0;
int option_index;
/* This is an option that requires an argument. */
if (*nextchar != '\0')
{
optarg = nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
optind++;
}
else if (optind == argc)
{
if (opterr)
{
/* 1003.2 specifies the format of this message. */
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
argv[0], c);
}
optopt = c;
if (optstring[0] == ':')
c = ':';
else
c = '?';
return c;
}
else
/* We already incremented `optind' once;
increment it again when taking next ARGV-elt as argument. */
optarg = argv[optind++];
/* optarg is now the argument, see if it's in the
table of longopts. */
for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, nextchar, nameend - nextchar))
{
if ((unsigned int) (nameend - nextchar) == strlen (p->name))
{
/* Exact match found. */
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
/* First nonexact match found. */
pfound = p;
indfound = option_index;
}
else
/* Second or later nonexact match found. */
ambig = 1;
}
if (ambig && !exact)
{
if (opterr)
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
argv[0], argv[optind]);
nextchar += strlen (nextchar);
optind++;
return '?';
}
if (pfound != NULL)
{
option_index = indfound;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
optarg = nameend + 1;
else
{
if (opterr)
fprintf (stderr, _("\
%s: option `-W %s' doesn't allow an argument\n"),
argv[0], pfound->name);
nextchar += strlen (nextchar);
return '?';
}
}
else if (pfound->has_arg == 1)
{
if (optind < argc)
optarg = argv[optind++];
else
{
if (opterr)
fprintf (stderr,
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
nextchar += strlen (nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
nextchar += strlen (nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
nextchar = NULL;
return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
if (temp[2] == ':')
@@ -724,8 +893,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
{
/* 1003.2 specifies the format of this message. */
fprintf (stderr,
_("%s: option requires an argument -- %c\n"),
argv[0], c);
_("%s: option requires an argument -- %c\n"),
argv[0], c);
}
optopt = c;
if (optstring[0] == ':')
@@ -756,7 +925,7 @@ getopt (argc, argv, optstring)
0);
}
#endif /* _LIBC or not __GNU_LIBRARY__. */
#endif /* Not ELIDE_CODE. */
#ifdef TEST
@@ -776,7 +945,7 @@ main (argc, argv)
int this_option_optind = optind ? optind : 1;
c = getopt (argc, argv, "abc:d:0123456789");
if (c == EOF)
if (c == -1)
break;
switch (c)

View File

@@ -1,19 +1,23 @@
/* Declarations for getopt.
Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
Copyright (C) 1989,90,91,92,93,94,96,97 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 file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
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.
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 General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library 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. */
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. */
#ifndef _GETOPT_H
#define _GETOPT_H 1
@@ -36,7 +40,7 @@ extern char *optarg;
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns EOF, this is the index of the first of the
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next

View File

@@ -1,20 +1,23 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994
Free Software Foundation, Inc.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97 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 file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
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.
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 General Public License for more details.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library 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. */
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. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -40,15 +43,21 @@
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__)
#define GETOPT_INTERFACE_VERSION 2
#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
#include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE
#endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#include <stdlib.h>
#else
char *getenv ();
#endif
#ifndef NULL
@@ -83,7 +92,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
}
#endif /* _LIBC or not __GNU_LIBRARY__. */
#endif /* Not ELIDE_CODE. */
#ifdef TEST
@@ -114,7 +123,7 @@ main (argc, argv)
c = getopt_long (argc, argv, "abc:d:0123456789",
long_options, &option_index);
if (c == EOF)
if (c == -1)
break;
switch (c)

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,19 +36,18 @@ 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;
int saved_opterr;
int saved_optind;
saved_opterr = opterr;
saved_optind = optind;
/* Don't print an error message for unrecognized options. */
opterr = 0;
@@ -62,7 +61,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:
@@ -74,6 +73,7 @@ parse_long_options (argc, argv, command_name, version_string, usage)
/* Restore previous value. */
opterr = saved_opterr;
/* Restore optind in case it has advanced past a leading `--'. */
optind = saved_optind;
/* Reset this to zero so that getopt internals get initialized from
the probably-new parameters when/if getopt is called later. */
optind = 0;
}

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 "?";
@@ -204,7 +264,7 @@ read_filesystem_list (need_fs_type, all_fs)
struct tabmntent *mntlist, *p;
struct mntent *mnt;
struct mount_entry *me;
/* the third and fourth arguments could be used to filter mounts,
but Crays doesn't seem to have any mounts that we want to
remove. Specifically, automount create normal NFS mounts.

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.
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
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,14 +25,18 @@ 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 HAVE_TZNAME 1
# define HAVE_TZSET 1
# define MULTIBYTE_IS_FORMAT_SAFE 1
# define STDC_HEADERS 1
# include <ansidecl.h>
# include "../locale/localeinfo.h"
#endif
#include <ctype.h>
#include <sys/types.h> /* Some systems define `time_t' here. */
#ifdef TIME_WITH_SYS_TIME
@@ -44,6 +49,9 @@ Cambridge, MA 02139, USA. */
# include <time.h>
# 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
@@ -74,27 +82,31 @@ Cambridge, MA 02139, USA. */
# include <stdlib.h>
# include <string.h>
#else
# define memcpy(d, s, n) bcopy (s, d, n)
# define memcpy(d, s, n) bcopy ((s), (d), (n))
#endif
#ifndef __P
#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
#define __P(args) args
#else
#define __P(args) ()
#endif /* GCC. */
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
# define __P(args) args
# else
# define __P(args) ()
# endif /* GCC. */
#endif /* Not __P. */
#ifndef PTR
#ifdef __STDC__
#define PTR void *
#else
#define PTR char *
#endif
# ifdef __STDC__
# define PTR void *
# else
# define PTR char *
# endif
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
# define CHAR_BIT 8
#endif
#ifndef NULL
# define NULL 0
#endif
#define TYPE_SIGNED(t) ((t) -1 < 0)
@@ -112,7 +124,7 @@ Cambridge, MA 02139, USA. */
#ifndef __isleap
/* Nonzero if YEAR is a leap year (every 4 years,
except every 100th isn't, and every 400th is). */
#define __isleap(year) \
# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
#endif
@@ -120,11 +132,14 @@ Cambridge, MA 02139, USA. */
#ifdef _LIBC
# define gmtime_r __gmtime_r
# define localtime_r __localtime_r
extern int __tz_compute __P ((time_t timer, const struct tm *tm));
# define tzname __tzname
# define tzset __tzset
#else
# if ! HAVE_LOCALTIME_R
# if ! HAVE_TM_GMTOFF
/* Approximate gmtime_r as best we can in its absence. */
#define gmtime_r my_gmtime_r
# define gmtime_r my_gmtime_r
static struct tm *gmtime_r __P ((const time_t *, struct tm *));
static struct tm *
gmtime_r (t, tp)
@@ -140,7 +155,7 @@ gmtime_r (t, tp)
# endif /* ! HAVE_TM_GMTOFF */
/* Approximate localtime_r as best we can in its absence. */
#define localtime_r my_localtime_r
# define localtime_r my_localtime_r
static struct tm *localtime_r __P ((const time_t *, struct tm *));
static struct tm *
localtime_r (t, tp)
@@ -157,20 +172,95 @@ localtime_r (t, tp)
#endif /* ! defined (_LIBC) */
#define add(n, f) \
#if !defined (memset) && !defined (HAVE_MEMSET) && !defined (_LIBC)
/* Some systems lack the `memset' function and we don't want to
introduce additional dependencies. */
static const char spaces[16] = " ";
# define memset_space(P, Len) \
do { \
int _len = (Len); \
\
do \
{ \
int _this = _len > 16 ? 16 : _len; \
memcpy ((P), spaces, _this); \
(P) += _this; \
_len -= _this; \
} \
while (_len > 0); \
} while (0)
#else
# define memset_space(P, Len) memset ((P), ' ', (Len))
#endif
#define add(n, f) \
do \
{ \
i += (n); \
if (i >= maxsize) \
int _n = (n); \
int _delta = width - _n; \
int _incr = _n + (_delta > 0 ? _delta : 0); \
if (i + _incr >= maxsize) \
return 0; \
else \
if (p) \
{ \
f; \
p += (n); \
} \
if (p) \
{ \
if (_delta > 0) \
memset_space (p, _delta); \
f; \
p += _n; \
} \
i += _incr; \
} while (0)
#define cpy(n, s) add ((n), memcpy((PTR) p, (PTR) (s), (n)))
#define cpy(n, s) \
add ((n), \
if (to_lowcase) \
memcpy_lowcase (p, (s), _n); \
else if (to_uppcase) \
memcpy_uppcase (p, (s), _n); \
else \
memcpy ((PTR) p, (PTR) (s), _n))
#ifdef _LIBC
# define TOUPPER(Ch) toupper (Ch)
# define TOLOWER(Ch) tolower (Ch)
#else
# define TOUPPER(Ch) (islower (Ch) ? toupper (Ch) : (Ch))
# define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
#endif
/* We don't use `isdigit' here since the locale dependent
interpretation is not what we want here. We only need to accept
the arabic digits in the ASCII range. One day there is perhaps a
more reliable way to accept other sets of digits. */
#define ISDIGIT(Ch) ((unsigned int) (Ch) - '0' <= 9)
static char *memcpy_lowcase __P ((char *dest, const char *src, size_t len));
static char *
memcpy_lowcase (dest, src, len)
char *dest;
const char *src;
size_t len;
{
while (len-- > 0)
dest[len] = TOLOWER (src[len]);
return dest;
}
static char *memcpy_uppcase __P ((char *dest, const char *src, size_t len));
static char *
memcpy_uppcase (dest, src, len)
char *dest;
const char *src;
size_t len;
{
while (len-- > 0)
dest[len] = TOUPPER (src[len]);
return dest;
}
#if ! HAVE_TM_GMTOFF
/* Yield the difference between *A and *B,
@@ -181,14 +271,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))
@@ -236,6 +329,31 @@ static char const month_name[][10] =
};
#endif
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
Work around this bug by copying *tp before it might be munged. */
size_t _strftime_copytm __P ((char *, size_t, const char *,
const struct tm *));
size_t
strftime (s, maxsize, format, tp)
char *s;
size_t maxsize;
const char *format;
const struct tm *tp;
{
struct tm tmcopy;
tmcopy = *tp;
return _strftime_copytm (s, maxsize, format, &tmcopy);
}
# ifdef strftime
# undef strftime
# endif
# define strftime _strftime_copytm
#endif
/* Write information from TP into S according to the format
string FORMAT, writing no more that MAXSIZE characters
(including the terminating '\0') and returning number of
@@ -247,7 +365,7 @@ strftime (s, maxsize, format, tp)
char *s;
size_t maxsize;
const char *format;
register const struct tm *tp;
const struct tm *tp;
{
int hour12 = tp->tm_hour;
#ifdef _NL_CURRENT
@@ -257,12 +375,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];
@@ -277,15 +392,30 @@ strftime (s, maxsize, format, tp)
size_t month_len = strlen (f_month);
const char *zone;
size_t zonelen;
register size_t i = 0;
register char *p = s;
register const char *f;
size_t i = 0;
char *p = s;
const char *f;
zone = 0;
#if HAVE_TM_ZONE
zone = NULL;
#if !defined _LIBC && HAVE_TM_ZONE
/* XXX We have some problems here. First, the string pointed to by
tm_zone is dynamically allocated while loading the zone data. But
when another zone is loaded since the information in TP were
computed this would be a stale pointer.
The second problem is the POSIX test suite which assumes setting
the environment variable TZ to a new value before calling strftime()
will influence the result (the %Z format) even if the information in
TP is computed with a totally different time zone. --drepper@gnu */
zone = (const char *) tp->tm_zone;
#endif
#if HAVE_TZNAME
/* POSIX.1 8.1.1 requires that whenever strftime() is called, the
time zone names contained in the external variable `tzname' shall
be set as if the tzset() function had been called. */
# if HAVE_TZSET
tzset ();
# endif
if (!(zone && *zone) && tp->tm_isdst >= 0)
zone = tzname[tp->tm_isdst];
#endif
@@ -311,6 +441,9 @@ strftime (s, maxsize, format, tp)
char buf[1 + (sizeof (int) < sizeof (time_t)
? INT_STRLEN_BOUND (time_t)
: INT_STRLEN_BOUND (int))];
int width = -1;
int to_lowcase = 0;
int to_uppcase = 0;
#if DO_MULTIBYTE
@@ -385,20 +518,43 @@ strftime (s, maxsize, format, tp)
#endif /* ! DO_MULTIBYTE */
/* Check for flags that can modify a number format. */
++f;
switch (*f)
/* Check for flags that can modify a format. */
pad = 0;
while (1)
{
case '_':
case '-':
pad = *f++;
break;
switch (*++f)
{
/* This influences the number formats. */
case '_':
case '-':
case '0':
pad = *f;
continue;
default:
pad = 0;
/* This changes textual output. */
case '^':
to_uppcase = 1;
continue;
default:
break;
}
break;
}
/* As a GNU extension we allow to specify the field width. */
if (ISDIGIT (*f))
{
width = 0;
do
{
width *= 10;
width += *f - '0';
++f;
}
while (ISDIGIT (*f));
}
/* Check for modifiers. */
switch (*f)
{
@@ -420,9 +576,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,23 +615,40 @@ 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:
{
size_t len = strftime (p, maxsize - i, subfmt, tp);
char *old_start = p;
size_t len = strftime (NULL, maxsize - i, subfmt, tp);
if (len == 0 && *subfmt)
return 0;
add (len, ;);
add (len, strftime (p, maxsize - i, subfmt, tp));
if (to_uppcase)
while (old_start < p)
{
*old_start = TOUPPER (*old_start);
++old_start;
}
}
break;
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;
@@ -517,26 +687,21 @@ strftime (s, maxsize, format, tp)
jump to one of these two labels. */
do_number_spacepad:
/* Force `_' flag. */
pad = '_';
/* Force `_' flag unless overwritten by `0' flag. */
if (pad != '0')
pad = '_';
do_number:
/* 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)
@@ -634,6 +799,10 @@ strftime (s, maxsize, format, tp)
add (1, *p = '\n');
break;
case 'P':
to_lowcase = 1;
/* FALLTHROUGH */
case 'p':
cpy (ap_len, ampm);
break;
@@ -644,22 +813,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 +944,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 +961,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 +989,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 +1030,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 +1040,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>
@@ -91,19 +91,21 @@ __xstrtol (s, ptr, base, val, valid_suffixes)
return LONGINT_OVERFLOW;
if (*p == s)
return LONGINT_INVALID;
/* Let valid_suffixes == NULL mean `allow any suffix'. */
/* FIXME: update all callers except the one in tail.c changing
last parameter NULL to `""'. */
if (!valid_suffixes)
{
if (**p == '\0')
{
*val = tmp;
return LONGINT_OK;
}
else
return LONGINT_INVALID_SUFFIX_CHAR;
*val = tmp;
return LONGINT_OK;
}
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 +145,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 +174,5 @@ main (int argc, char** argv)
}
exit (0);
}
#endif /* TESTING_XSTRTO */

View File

@@ -1,66 +1,69 @@
#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
#ifndef _STRTOL_ERROR
enum strtol_error
{
LONGINT_OK, LONGINT_INVALID, LONGINT_INVALID_SUFFIX_CHAR, LONGINT_OVERFLOW
};
typedef enum strtol_error strtol_error;
#endif
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) \
#undef _STRTOL_ERROR
# 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,13 @@
#ifndef _xstrtoul_h_
# define _xstrtoul_h_ 1
#ifndef XSTRTOUL_H_
# define XSTRTOUL_H_ 1
# define STRING_TO_UNSIGNED 1
/* Undefine this symbol so we can include xstrtol.h a second time.
Otherwise, a program that wanted both xstrtol.h and xstrtoul.h
would never get the declaration corresponding to the header file
included after the first one. */
# undef XSTRTOL_H_
# 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

1
m4/.cvsignore Normal file
View File

@@ -0,0 +1 @@
Makefile

11
m4/Makefile.am Normal file
View File

@@ -0,0 +1,11 @@
## Process this file with automake to produce Makefile.in
# Generate this list with
# find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
# |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
EXTRA_DIST = README \
ccstdc.m4 dmalloc.m4 error.m4 getgroups.m4 getline.m4 getloadavg.m4 \
gettext.m4 header.m4 init.m4 install.m4 jm-mktime.m4 jm-winsz1.m4 \
jm-winsz2.m4 lcmessage.m4 lispdir.m4 maintainer.m4 memcmp.m4 mktime.m4 \
obstack.m4 progtest.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strftime.m4 \
strtod.m4 termios.m4 uptime.m4 winsz.m4

153
m4/Makefile.in Normal file
View File

@@ -0,0 +1,153 @@
# 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
# gives unlimited permission to copy, distribute and modify it.
# Generate this list with
# find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
# |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
INSTALL = @INSTALL@
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@
EXTRA_DIST = README \
ccstdc.m4 dmalloc.m4 error.m4 getgroups.m4 getline.m4 getloadavg.m4 \
gettext.m4 header.m4 init.m4 install.m4 jm-mktime.m4 jm-winsz1.m4 \
jm-winsz2.m4 lcmessage.m4 lispdir.m4 maintainer.m4 memcmp.m4 mktime.m4 \
obstack.m4 progtest.m4 protos.m4 ptrdiff.m4 regex.m4 sanity.m4 strftime.m4 \
strtod.m4 termios.m4 uptime.m4 winsz.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README Makefile.am Makefile.in README
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
$(TEXINFOS) $(MANS) $(EXTRA_DIST)
TAR = tar
default: all
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL)
cd $(top_srcdir) && automake --gnu m4/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = m4
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
info:
dvi:
check: all
$(MAKE)
installcheck:
install-exec:
$(NORMAL_INSTALL)
install-data:
$(NORMAL_INSTALL)
install: install-exec install-data all
@:
uninstall:
all: Makefile
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
installdirs:
mostlyclean-generic:
test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
rm -f Makefile $(DISTCLEANFILES)
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-generic
clean: clean-generic mostlyclean
distclean: distclean-generic clean
rm -f config.status
maintainer-clean: 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 tags distdir 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
# 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:

9
m4/README Normal file
View File

@@ -0,0 +1,9 @@
These files are used by a program called aclocal (part of the GNU automake
package). aclocal uses these files to create aclocal.m4 which is in turn
used by autoconf to create the configure script at the the top level in
this distribution.
Some of these files are copies of the ones in the automake-1.1l
distribution. Others are specific to this package.
Eventually, I expect that aclocal will evolve so that this directory
can contain only the .m4 files specific to this package.

61
m4/ccstdc.m4 Normal file
View File

@@ -0,0 +1,61 @@
## ----------------------------------------- ##
## ANSIfy the C compiler whenever possible. ##
## From Franc,ois Pinard ##
## ----------------------------------------- ##
# serial 1
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
# @ovindex CC
# If the C compiler in not in ANSI C mode by default, try to add an option
# to output variable @code{CC} to make it so. This macro tries various
# options that select ANSI C on some system or another. It considers the
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
# handles function prototypes correctly.
#
# If you use this macro, you should check after calling it whether the C
# compiler has been set to accept ANSI C; if not, the shell variable
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
# program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac
AC_DEFUN(AM_PROG_CC_STDC,
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
AC_CACHE_VAL(am_cv_prog_cc_stdc,
[am_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
AC_TRY_COMPILE(
[#if !defined(__STDC__) || __STDC__ != 1
choke me
#endif
/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/stat.h>
#endif
], [
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};],
[am_cv_prog_cc_stdc="$ac_arg"; break])
done
CC="$ac_save_CC"
])
AC_MSG_RESULT($am_cv_prog_cc_stdc)
case "x$am_cv_prog_cc_stdc" in
x|xno) ;;
*) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
])

21
m4/dmalloc.m4 Normal file
View File

@@ -0,0 +1,21 @@
## ----------------------------------- ##
## Check if --with-dmalloc was given. ##
## From Franc,ois Pinard ##
## ----------------------------------- ##
# serial 1
AC_DEFUN(AM_WITH_DMALLOC,
[AC_MSG_CHECKING(if malloc debugging is wanted)
AC_ARG_WITH(dmalloc,
[ --with-dmalloc use dmalloc, as in
ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
[if test "$withval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_DMALLOC)
LIBS="$LIBS -ldmalloc"
LDFLAGS="$LDFLAGS -g"
else
AC_MSG_RESULT(no)
fi], [AC_MSG_RESULT(no)])
])

13
m4/error.m4 Normal file
View File

@@ -0,0 +1,13 @@
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
dnl FIXME: Migrate into libit
AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
am_cv_lib_error_at_line=yes,
am_cv_lib_error_at_line=no)])
if test $am_cv_lib_error_at_line = no; then
LIBOBJS="$LIBOBJS error.o"
fi
AC_SUBST(LIBOBJS)dnl
])

49
m4/getgroups.m4 Normal file
View File

@@ -0,0 +1,49 @@
#serial 2
dnl From Jim Meyering.
dnl If you use this macro in a package, you should
dnl add the following two lines to acconfig.h:
dnl /* Define to rpl_getgroups if the replacement function should be used. */
dnl #undef getgroups
dnl
dnl Invoking code should check $GETGROUPS_LIB something like this:
dnl jm_FUNC_GETGROUPS
dnl test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
dnl
AC_DEFUN(jm_FUNC_GETGROUPS,
[AC_REQUIRE([AC_TYPE_GETGROUPS])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_CHECK_FUNCS(getgroups)
# If we don't yet have getgroups, see if it's in -lbsd.
# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
if test $ac_cv_func_getgroups = no; then
jm_cv_sys_getgroups_saved_lib="$LIBS"
AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd])
LIBS="$jm_cv_sys_getgroups_saved_lib"
fi
# Run the program to test the functionality of the system-supplied
# getgroups function only if there is such a function.
if test $ac_cv_func_getgroups = yes; then
AC_CACHE_CHECK([for working getgroups], jm_cv_func_working_getgroups,
[AC_TRY_RUN([
int
main ()
{
/* On Ultrix 4.3, getgroups (0, 0) always fails. */
exit (getgroups (0, 0) == -1 ? 1 : 0);
}
],
jm_cv_func_working_getgroups=yes,
jm_cv_func_working_getgroups=no,
dnl When crosscompiling, assume getgroups is broken.
jm_cv_func_working_getgroups=no)
])
if test $jm_cv_func_working_getgroups = no; then
LIBOBJS="$LIBOBJS getgroups.o"
AC_DEFINE_UNQUOTED(getgroups, rpl_getgroups)
fi
fi
])

45
m4/getline.m4 Normal file
View File

@@ -0,0 +1,45 @@
#serial 1
dnl See if there's a working, system-supplied version of the getline function.
dnl We can't just to AC_REPLACE_FUNCS(getline) because some systems
dnl have a function by that name in -linet that doesn't have anything
dnl to do with the function we need.
AC_DEFUN(AM_FUNC_GETLINE,
[dnl
am_getline_needs_run_time_check=no
am_cv_func_working_getline=yes
AC_CHECK_FUNC(getline,
dnl Found it in some library. Verify that it works.
am_getline_needs_run_time_check=yes,
am_cv_func_working_getline=no)
if test $am_getline_needs_run_time_check = yes; then
AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
[echo fooN |tr -d '\012'|tr N '\012' > conftestdata
AC_TRY_RUN([
# include <stdio.h>
# include <sys/types.h>
# if HAVE_STRING_H
# include <string.h>
# endif
int main ()
{ /* Based on a test program from Karl Heuer. */
char *line = NULL;
size_t siz = 0;
int len;
FILE *in = fopen ("./conftestdata", "r");
if (!in)
return 1;
len = getline (&line, &siz, in);
exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
}
], am_cv_func_working_getline=yes dnl The library version works.
, am_cv_func_working_getline=no dnl The library version does NOT work.
, am_cv_func_working_getline=no dnl We're cross compiling.
)])
fi
if test $am_cv_func_working_getline = no; then
LIBOBJS="$LIBOBJS getline.o"
AC_SUBST(LIBOBJS)dnl
fi
])

127
m4/getloadavg.m4 Normal file
View File

@@ -0,0 +1,127 @@
#serial 3
AC_DEFUN(AM_FUNC_GETLOADAVG,
[ac_have_func=no # yes means we've found a way to get the load average.
am_cv_saved_LIBS="$LIBS"
# On HPUX9, an unprivileged user can get load averages through this function.
AC_CHECK_FUNCS(pstat_getdynamic)
# Solaris has libkstat which does not require root.
AC_CHECK_LIB(kstat, kstat_open)
if test $ac_cv_lib_kstat_kstat_open = yes ; then ac_have_func=yes ; fi
# Some systems with -lutil have (and need) -lkvm as well, some do not.
# On Solaris, -lkvm requires nlist from -lelf, so check that first
# to get the right answer into the cache.
# For kstat on solaris, we need libelf to force the definition of SVR4 below.
AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
if test $ac_have_func = no; then
AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
# Check for the 4.4BSD definition of getloadavg.
AC_CHECK_LIB(util, getloadavg,
[LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
fi
if test $ac_have_func = no; then
# There is a commonly available library for RS/6000 AIX.
# Since it is not a standard part of AIX, it might be installed locally.
ac_save_LIBS="$LIBS"
LIBS="-L/usr/local/lib $LIBS"
AC_CHECK_LIB(getloadavg, getloadavg,
LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS")
fi
# Make sure it is really in the library, if we think we found it.
AC_REPLACE_FUNCS(getloadavg)
if test $ac_cv_func_getloadavg = yes; then
AC_DEFINE(HAVE_GETLOADAVG)
ac_have_func=yes
else
AC_DEFINE(C_GETLOADAVG)
# Figure out what our getloadavg.c needs.
ac_have_func=no
AC_CHECK_HEADER(sys/dg_sys_info.h,
[ac_have_func=yes; AC_DEFINE(DGUX)
AC_CHECK_LIB(dgc, dg_sys_info)])
# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
# Irix 4.0.5F has the header but not the library.
if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
ac_have_func=yes; AC_DEFINE(SVR4)
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(inq_stats/cpustats.h,
[ac_have_func=yes; AC_DEFINE(UMAX)
AC_DEFINE(UMAX4_3)])
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(sys/cpustats.h,
[ac_have_func=yes; AC_DEFINE(UMAX)])
fi
if test $ac_have_func = no; then
AC_CHECK_HEADERS(mach/mach.h)
fi
AC_CHECK_HEADER(nlist.h,
[AC_DEFINE(NLIST_STRUCT)
AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
[AC_TRY_COMPILE([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;],
ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
if test $ac_cv_struct_nlist_n_un = yes; then
AC_DEFINE(NLIST_NAME_UNION)
fi
])dnl
fi # Do not have getloadavg in system libraries.
# Some definitions of getloadavg require that the program be installed setgid.
dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory.
AC_CACHE_CHECK(whether getloadavg requires setgid,
ac_cv_func_getloadavg_setgid,
[AC_EGREP_CPP([Yowza Am I SETGID yet],
[#include "$srcdir/lib/getloadavg.c"
#ifdef LDAV_PRIVILEGED
Yowza Am I SETGID yet
#endif],
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
else
NEED_SETGID=false
fi
AC_SUBST(NEED_SETGID)dnl
if test $ac_cv_func_getloadavg_setgid = yes; then
AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
changequote(<<, >>)dnl
<<
# On Solaris, /dev/kmem is a symlink. Get info on the real file.
ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
# If we got an error (system does not support symlinks), try without -L.
test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
ac_cv_group_kmem=`echo $ac_ls_output \
| sed -ne 's/[ ][ ]*/ /g;
s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
/ /s/.* //;p;'`
>>
changequote([, ])dnl
)
KMEM_GROUP=$ac_cv_group_kmem
fi
AC_SUBST(KMEM_GROUP)dnl
if test x = "x$am_cv_saved_LIBS"; then
GETLOADAVG_LIBS="$LIBS"
else
GETLOADAVG_LIBS=`echo "$LIBS"|sed "s!$am_cv_saved_LIBS!!"`
fi
AC_SUBST(GETLOADAVG_LIBS)dnl
LIBS="$am_cv_saved_LIBS"
])

286
m4/gettext.m4 Normal file
View File

@@ -0,0 +1,286 @@
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
# serial 1
AC_DEFUN(AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
USE_INCLUDED_LIBINTL=no
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
[AC_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)])])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
if test "$CATOBJEXT" = "NONE"; then
AC_MSG_CHECKING([whether catgets can be used])
AC_ARG_WITH(catgets,
[ --with-catgets use catgets functions if available],
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
AC_MSG_RESULT($nls_cv_use_catgets)
if test "$nls_cv_use_catgets" = "yes"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_LIB(i, main)
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS)
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
if test "$GMSGFMT" = "no"; then
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS="../intl/libintl.a"
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi])
fi
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS="../intl/libintl.a"
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(AM_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h values.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY)
fi
AM_LC_MESSAGES
AM_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test $ac_aux_dir; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z $MKINSTALLDIRS; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])

12
m4/header.m4 Normal file
View File

@@ -0,0 +1,12 @@
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.
dnl This file resides in the same directory as the config header
dnl that is generated. We must strip everything past the first ":",
dnl and everything past the last "/".
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl
changequote([,]))])

20
m4/init.m4 Normal file
View File

@@ -0,0 +1,20 @@
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 1
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version)
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AM_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
VERSION=[$2]
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AM_SANITY_CHECK
AC_ARG_PROGRAM
AC_PROG_MAKE_SET])

13
m4/install.m4 Normal file
View File

@@ -0,0 +1,13 @@
## --------------------------------------------------------- ##
## Use AC_PROG_INSTALL, supplementing it with INSTALL_SCRIPT ##
## substitution. ##
## From Franc,ois Pinard ##
## --------------------------------------------------------- ##
# serial 1
AC_DEFUN(AM_PROG_INSTALL,
[AC_REQUIRE([AC_PROG_INSTALL])
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
AC_SUBST(INSTALL_SCRIPT)dnl
])

14
m4/jm-mktime.m4 Normal file
View File

@@ -0,0 +1,14 @@
#serial 1
dnl From Jim Meyering.
dnl If you use this macro in a package, you should
dnl add the following two lines to acconfig.h:
dnl /* Define to rpl_mktime if the replacement function should be used. */
dnl #undef mktime
dnl
AC_DEFUN(jm_FUNC_MKTIME,
[AC_REQUIRE([AM_FUNC_MKTIME])dnl
if test $am_cv_func_working_mktime = no; then
AC_DEFINE_UNQUOTED(mktime, rpl_mktime)
fi
])

19
m4/jm-winsz1.m4 Normal file
View File

@@ -0,0 +1,19 @@
dnl From Jim Meyering.
#serial 1
AC_DEFUN(jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
[AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
AC_CACHE_CHECK([whether use of TIOCGWINSZ requires termios.h],
jm_cv_sys_tiocgwinsz_needs_termios_h,
[jm_cv_sys_tiocgwinsz_needs_termios_h=no
if test $am_cv_sys_posix_termios = yes; then
AC_EGREP_CPP([yes],
[#include <sys/types.h>
# include <termios.h>
# ifdef TIOCGWINSZ
yes
# endif
], jm_cv_sys_tiocgwinsz_needs_termios_h=yes)
fi
])
])

22
m4/jm-winsz2.m4 Normal file
View File

@@ -0,0 +1,22 @@
#serial 2
AC_DEFUN(jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL,
[AC_REQUIRE([jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H])
AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
[jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no; then
AC_EGREP_CPP([yes],
[#include <sys/types.h>
# include <sys/ioctl.h>
# ifdef TIOCGWINSZ
yes
# endif
], jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
fi
])
if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
fi
])

14
m4/lcmessage.m4 Normal file
View File

@@ -0,0 +1,14 @@
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
fi])

38
m4/lispdir.m4 Normal file
View File

@@ -0,0 +1,38 @@
## ------------------------
## Emacs LISP file handling
## From Ulrich Drepper
## ------------------------
# serial 1
AC_DEFUN(AM_PATH_LISPDIR,
[# If set to t, that means we are running in a shell under Emacs.
# If you have an Emacs named "t", then use the full path.
test "$EMACS" = t && EMACS=
AC_PATH_PROG(EMACS, emacs xemacs, no)
if test $EMACS != "no"; then
AC_MSG_CHECKING([where .elc files should go])
dnl Set default value
lispdir="\$(datadir)/emacs/site-lisp"
if test "x$prefix" = "xNONE"; then
if test -d $ac_default_prefix/share/emacs/site-lisp; then
lispdir="\$(prefix)/share/emacs/site-lisp"
else
if test -d $ac_default_prefix/lib/emacs/site-lisp; then
lispdir="\$(prefix)/lib/emacs/site-lisp"
fi
fi
else
if test -d $prefix/share/emacs/site-lisp; then
lispdir="\$(prefix)/share/emacs/site-lisp"
else
if test -d $prefix/lib/emacs/site-lisp; then
lispdir="\$(prefix)/lib/emacs/site-lisp"
fi
fi
fi
AC_MSG_RESULT($lispdir)
ELCFILES="\$(ELCFILES)"
fi
AC_SUBST(lispdir)
AC_SUBST(ELCFILES)])

22
m4/maintainer.m4 Normal file
View File

@@ -0,0 +1,22 @@
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# serial 1
AC_DEFUN(AM_MAINTAINER_MODE,
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
if test $USE_MAINTAINER_MODE = yes; then
MAINT=
else
MAINT='#M#'
fi
AC_SUBST(MAINT)dnl
]
)

13
m4/memcmp.m4 Normal file
View File

@@ -0,0 +1,13 @@
#serial 1
dnl If you use this macro in a package, you should
dnl add the following two lines to acconfig.h:
dnl /* Define to rpl_memcmp if the replacement function should be used. */
dnl #undef memcmp
dnl
AC_DEFUN(jm_FUNC_MEMCMP,
[AC_REQUIRE([AC_FUNC_MEMCMP])dnl
if test $ac_cv_func_memcmp_clean = no; then
AC_DEFINE_UNQUOTED(memcmp, rpl_memcmp)
fi
])

75
m4/mktime.m4 Normal file
View File

@@ -0,0 +1,75 @@
#serial 2
dnl From Jim Meyering.
dnl FIXME: this should migrate into libit.
AC_DEFUN(AM_FUNC_MKTIME,
[AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/time.h)
AC_CACHE_CHECK([for working mktime], am_cv_func_working_mktime,
[AC_TRY_RUN(
changequote(<<, >>)dnl
<</* Test program from Paul Eggert (eggert@twinsun.com)
and Tony Leneis (tony@plaza.ds.adp.com). */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
static time_t time_t_max;
/* Values we'll use to set the TZ environment variable. */
static const char *const tz_strings[] = {
NULL, "GMT0", "JST-9", "EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
};
#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
static void
mktime_test (now)
time_t now;
{
if (mktime (localtime (&now)) != now)
exit (1);
now = time_t_max - now;
if (mktime (localtime (&now)) != now)
exit (1);
}
int
main ()
{
time_t t, delta;
int i;
for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
continue;
time_t_max--;
delta = time_t_max / 997; /* a suitable prime number */
for (i = 0; i < N_STRINGS; i++)
{
if (tz_strings[i])
putenv (tz_strings[i]);
for (t = 0; t <= time_t_max - delta; t += delta)
mktime_test (t);
mktime_test ((time_t) 60 * 60);
mktime_test ((time_t) 60 * 60 * 24);
}
exit (0);
}
>>,
changequote([, ])dnl
am_cv_func_working_mktime=yes, am_cv_func_working_mktime=no,
dnl When crosscompiling, assume mktime is missing or broken.
am_cv_func_working_mktime=no)
])
if test $am_cv_func_working_mktime = no; then
LIBOBJS="$LIBOBJS mktime.o"
fi
])

15
m4/obstack.m4 Normal file
View File

@@ -0,0 +1,15 @@
dnl From Jim Meyering.
dnl FIXME: migrate into libit.
AC_DEFUN(AM_FUNC_OBSTACK,
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
[AC_TRY_LINK([#include "obstack.h"],
[struct obstack *mem;obstack_free(mem,(char *) 0)],
am_cv_func_obstack=yes,
am_cv_func_obstack=no)])
if test $am_cv_func_obstack = yes; then
AC_DEFINE(HAVE_OBSTACK)
else
LIBOBJS="$LIBOBJS obstack.o"
fi
])

42
m4/progtest.m4 Normal file
View File

@@ -0,0 +1,42 @@
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
# serial 1
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])

25
m4/protos.m4 Normal file
View File

@@ -0,0 +1,25 @@
## ------------------------------- ##
## Check for function prototypes. ##
## From Franc,ois Pinard ##
## ------------------------------- ##
# serial 1
AC_DEFUN(AM_C_PROTOTYPES,
[AC_REQUIRE([AM_PROG_CC_STDC])
AC_BEFORE([$0], [AC_C_INLINE])
AC_MSG_CHECKING([for function prototypes])
if test "$am_cv_prog_cc_stdc" != no; then
AC_MSG_RESULT(yes)
AC_DEFINE(PROTOTYPES)
U= ANSI2KNR=
else
AC_MSG_RESULT(no)
U=_ ANSI2KNR=./ansi2knr
# Ensure some checks needed by ansi2knr itself.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h)
fi
AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl
])

12
m4/ptrdiff.m4 Normal file
View File

@@ -0,0 +1,12 @@
# From Ulrich Drepper.
# serial 1
AC_DEFUN(AM_TYPE_PTRDIFF_T,
[AC_CACHE_CHECK([for ptrdiff_t], am_cv_type_ptrdiff_t,
[AC_TRY_COMPILE([#include <stddef.h>], [ptrdiff_t p],
am_cv_type_ptrdiff_t=yes, am_cv_type_ptrdiff_t=no)])
if test $am_cv_type_ptrdiff_t = yes; then
AC_DEFINE(HAVE_PTRDIFF_T)
fi
])

37
m4/regex.m4 Normal file
View File

@@ -0,0 +1,37 @@
## --------------------------------- ##
## Check if --with-regex was given. ##
## --------------------------------- ##
# serial 1
# The idea is to distribute rx.[hc] and regex.[hc] together, for a while.
# The WITH_REGEX symbol (which should also be documented in acconfig.h)
# is used to decide which of regex.h or rx.h should be included in the
# application. If `./configure --with-regex' is given (the default), the
# package will use gawk's regex. If `./configure --without-regex', a
# check is made to see if rx is already installed, as with newer Linux'es.
# If not found, the package will use the rx from the distribution.
# If found, the package will use the system's rx which, on Linux at least,
# will result in a smaller executable file.
AC_DEFUN(AM_WITH_REGEX,
[AC_MSG_CHECKING(which of GNU rx or gawk's regex is wanted)
AC_ARG_WITH(regex,
[ --without-regex use GNU rx in lieu of gawk's regex for matching],
[test "$withval" = yes && am_with_regex=1],
[am_with_regex=1])
if test -n "$am_with_regex"; then
AC_MSG_RESULT(regex)
AC_DEFINE(WITH_REGEX)
AC_CACHE_CHECK([for GNU regex in libc], am_cv_gnu_regex,
AC_TRY_LINK([], [extern int re_max_failures; re_max_failures = 1],
am_cv_gnu_regex=yes, am_cv_gnu_regex=no))
if test $am_cv_gnu_regex = no; then
LIBOBJS="$LIBOBJS regex.o"
fi
else
AC_MSG_RESULT(rx)
AC_CHECK_FUNC(re_rx_search, , [LIBOBJS="$LIBOBJS rx.o"])
fi
AC_SUBST(LIBOBJS)dnl
])

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