Compare commits

..

241 Commits

Author SHA1 Message Date
Jim Meyering
6efc19263f update from libc 2001-06-18 08:01:38 +00:00
Jim Meyering
6fcc39f7e0 *** empty log message *** 2001-06-17 04:12:05 +00:00
Jim Meyering
f5ad53838f *** empty log message *** 2001-06-17 04:11:21 +00:00
Jim Meyering
50a600c47f Include Makefile.cfg. 2001-06-17 04:11:12 +00:00
Jim Meyering
c784ec50bb New file with package-specific definitions. 2001-06-17 04:11:03 +00:00
Jim Meyering
2ddbd39163 Factor out definitions specific to fileutils,
sh-utils, and textutils, so that other packages can use the framework.
2001-06-17 04:10:49 +00:00
Jim Meyering
4b4de06dbc . 2001-06-16 14:50:37 +00:00
Jim Meyering
30398caa8f *** empty log message *** 2001-06-16 14:32:38 +00:00
Jim Meyering
75660e5da7 *** empty log message *** 2001-06-16 14:29:20 +00:00
Jim Meyering
da4170a71f . 2001-06-16 14:28:07 +00:00
Jim Meyering
01c0d9e91c *** empty log message *** 2001-06-16 13:23:33 +00:00
Jim Meyering
0c8eed4f57 (main): Recheck global print_with_color after calling
parse_ls_color, since that function may have reset it.
Based on a patch from Richard Dawe.
2001-06-16 13:22:43 +00:00
Jim Meyering
dea75949e0 (print_long_format): Don't truncate user names
or group names that are longer than 8 characters.
2001-06-16 13:17:40 +00:00
Jim Meyering
f6a97a1483 . 2001-06-16 11:12:01 +00:00
Jim Meyering
45d73bae97 *** empty log message *** 2001-06-16 11:11:57 +00:00
Jim Meyering
8d948d3ae7 Reflect renaming: s/omni-/core/. 2001-06-16 11:11:48 +00:00
Jim Meyering
8c9c61851e (info_TEXINFOS): Reflect renaming: s/omni-/core/. 2001-06-16 11:08:17 +00:00
Jim Meyering
cfda7b7224 *** empty log message *** 2001-06-16 11:07:44 +00:00
Jim Meyering
0dfd4b7782 renamed from omni-utils.texi 2001-06-16 11:06:49 +00:00
Jim Meyering
8d4c961d53 renamed to coreutils.texi 2001-06-16 11:06:48 +00:00
Jim Meyering
23d0e1c18e *** empty log message *** 2001-06-16 11:06:09 +00:00
Jim Meyering
f1bc30be6f (ls invocation): Mention the effect of locale. 2001-06-16 11:05:30 +00:00
Jim Meyering
6560a8c784 *** empty log message *** 2001-06-16 08:09:13 +00:00
Jim Meyering
a39efe1575 *** empty log message *** 2001-06-11 03:31:12 +00:00
Jim Meyering
98d2a14011 *** empty log message *** 2001-06-11 02:49:20 +00:00
Jim Meyering
88a10b132b Update from GNU libc. 2001-06-11 02:48:14 +00:00
Jim Meyering
1be4401ecb *** empty log message *** 2001-06-10 08:44:56 +00:00
Jim Meyering
d18b37d719 Add a test based on a report from Herbert Xu. 2001-06-10 08:44:49 +00:00
Jim Meyering
3384735e06 *** empty log message *** 2001-06-09 18:45:45 +00:00
Jim Meyering
62e0b734d6 . 2001-06-09 09:01:38 +00:00
Jim Meyering
c31e4314d8 *** empty log message *** 2001-06-09 09:00:29 +00:00
Jim Meyering
2beac10424 Add options to make `who' more POSIX compliant.
Accept new options: --all (-a), --boot (-b), --dead (-d),
--login, --process (-p), --runlevel (-r), --short (-s), --time (-t),
--users (-u).
The -u option now produces POSIX-specified results and is the same as
the long option `--users'.  --idle is no longer the same as -u.
(time_string, print_line, print_boottime, print_deadprocs, print_login,
print_initspawn, print_clockchange, print_runlevel): New functions.
(print_user): Renamed from print_entry and reworked.
(search_entries): Remove function.
(who_am_i): Likewise.
(usage): Describe new options.
(main): Handle new options.
Mostly from Michael Stone.
2001-06-09 09:00:24 +00:00
Jim Meyering
7c976d9485 *** empty log message *** 2001-06-05 08:08:09 +00:00
Jim Meyering
961f6fb0c9 *** empty log message *** 2001-05-27 15:03:43 +00:00
Jim Meyering
e41436072c . 2001-05-27 15:03:29 +00:00
Jim Meyering
d72341c0c8 (main): Add const' to declaration of local, result'. 2001-05-27 15:03:09 +00:00
Jim Meyering
31867cf5cb *** empty log message *** 2001-05-27 13:46:52 +00:00
Jim Meyering
5d896be5dc (UT_TYPE): Define. 2001-05-27 13:46:31 +00:00
Jim Meyering
0e94296ac1 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
Check for ut_type in struct utmp.
2001-05-27 13:45:39 +00:00
Jim Meyering
a99fb13160 . 2001-05-24 22:08:45 +00:00
Jim Meyering
8b4468d407 *** empty log message *** 2001-05-24 22:07:41 +00:00
Jim Meyering
c8f712ac70 Add definitions that let me factor the wget rule while still letting
me accommodate the fact that these files reside in several different
directories and come from different places.

(wget-files): Define.
(get-targets, *-local_dir, *-url_prefix): Likewise.
(target, url, local_file): Convenience variables.
($(get-targets)): The factored rule.
2001-05-24 22:07:35 +00:00
Jim Meyering
a3c3e5dc3b Update from master source. 2001-05-24 21:58:56 +00:00
Jim Meyering
bce3cdb26f *** empty log message *** 2001-05-24 21:58:45 +00:00
Jim Meyering
adb94428ac . 2001-05-24 21:55:49 +00:00
Jim Meyering
1b7ca0aeb7 fix typo 2001-05-24 21:31:08 +00:00
Jim Meyering
8025ccf64d *** empty log message *** 2001-05-24 21:30:27 +00:00
Jim Meyering
c52ca035b1 (move-if-change): Define.
(wget-update): Use it in place of mv.
2001-05-24 21:30:14 +00:00
Jim Meyering
7d6896c0d9 *** empty log message *** 2001-05-24 20:10:36 +00:00
Jim Meyering
0473003f8a (wget-update): Have wget write to a temporary file,
and replace the original only if wget succeeds.
Also get ansi2nkr.c.
2001-05-24 20:10:31 +00:00
Jim Meyering
756e2026fc *** empty log message *** 2001-05-24 20:06:25 +00:00
Jim Meyering
38a7b45e0e Use `#if D_TYPE_IN_DIRENT && defined DTTOIF' to
determine whether to enable the DT_INIT definition, not the less
portable `#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF'.
Reported by Eli Zaretskii.
2001-05-24 20:06:21 +00:00
Jim Meyering
2ccc189bd6 *** empty log message *** 2001-05-24 08:08:00 +00:00
Jim Meyering
774376d731 (ls invocation): Document more clearly what ls does when given no arguments. 2001-05-24 08:07:54 +00:00
Jim Meyering
418c24dd7e *** empty log message *** 2001-05-24 06:12:07 +00:00
Jim Meyering
908a517100 Include "quote.h".
(argmatch_invalid): Remove explicit `' quotes.  Instead, use the
quote function.  Reported by Gran Uddeborg.
2001-05-24 06:12:00 +00:00
Jim Meyering
97606853e8 *** empty log message *** 2001-05-24 06:08:53 +00:00
Jim Meyering
8636b9323e (main): Remove quotes around %s.
The argument is already quoted via the quote function.
2001-05-24 06:08:33 +00:00
Jim Meyering
574916aa9f *** empty log message *** 2001-05-22 06:56:48 +00:00
Jim Meyering
61e7341926 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
now that we use the package-supplied version unconditionally.
(jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
2001-05-22 06:56:43 +00:00
Jim Meyering
b0b1bd5ae2 . 2001-05-21 12:39:35 +00:00
Jim Meyering
d736fb1b2c . 2001-05-21 12:38:25 +00:00
Jim Meyering
4893d6c53b . 2001-05-21 12:37:24 +00:00
Jim Meyering
c025720350 *** empty log message *** 2001-05-21 12:35:40 +00:00
Jim Meyering
ee7bb8de6e *** empty log message *** 2001-05-21 12:35:14 +00:00
Jim Meyering
5bb5ceb5a2 ($(DVIS), $(INFO_DEPS)): Depend on $(EXTRA_DIST).
(DISABLED_constants.texi): New rule -- disabled for now.
2001-05-21 12:34:57 +00:00
Jim Meyering
3cbc678ef0 . 2001-05-21 10:53:11 +00:00
Jim Meyering
6f960a3224 *** empty log message *** 2001-05-21 10:52:36 +00:00
Jim Meyering
1053d6cc80 Change a couple backticks to single quotes to avoid shell syntax errors. 2001-05-21 10:52:02 +00:00
Jim Meyering
0352337f1e . 2001-05-21 07:35:22 +00:00
Jim Meyering
d87fc7bc94 *** empty log message *** 2001-05-21 07:05:42 +00:00
Jim Meyering
ca7fc5d683 Add new --time-style option.
Change --full-time to be equivalent to --time-style=full-iso.
2001-05-21 07:05:37 +00:00
Jim Meyering
e204540061 . 2001-05-21 06:59:27 +00:00
Jim Meyering
692f81b371 *** empty log message *** 2001-05-21 06:46:56 +00:00
Jim Meyering
8e1897a33b (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__. 2001-05-21 06:46:52 +00:00
Jim Meyering
2c3988dbca *** empty log message *** 2001-05-21 06:36:43 +00:00
Jim Meyering
760d4e6f3a (dir_name): Compute append_dot using path, not newpath
which is not yet declared.
2001-05-21 06:36:36 +00:00
Jim Meyering
52ba9d8815 *** empty log message *** 2001-05-21 05:49:47 +00:00
Jim Meyering
49d1716c11 (wget-update): depcomp and missing are now in automake's lib/ subdirectory. 2001-05-21 05:49:42 +00:00
Jim Meyering
02095a6616 . 2001-05-20 21:09:06 +00:00
Jim Meyering
1926146ed5 Include "hard-locale.h".
(nstrftime): New decl.
(enum time_style): New enum.
(time_style_args, time_style_types): New constants.
(full_time): Remove.
(long_time_format): Initialize to POSIX defaults.
(TIME_STYLE_OPTION): New constant.
(long_options, decode_switches, usage): Add --time-style support.
(long_time_expected_width): Use nstrftime, not strftime.
(print_long_format): Likewise.
Increase initial size to match new full-iso time style.
2001-05-20 20:44:33 +00:00
Jim Meyering
017ada27dd *** empty log message *** 2001-05-20 20:44:08 +00:00
Jim Meyering
f7b3fa35e6 Unset QUOTING_STYLE and TIME_STYLE. Set TZ.
Adjust to change in full-time format.
Fix typo in failure messages (-a and -m were interchanged).
2001-05-20 20:43:52 +00:00
Jim Meyering
c9277ec2a9 *** empty log message *** 2001-05-20 20:41:32 +00:00
Jim Meyering
8b7078eada (my_strftime):
Define to nstrftime if emacs, but only if my_strftime is not defined.
(extra_args, extra_args_spec, extra_args_spec_iso): Rename from
ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
Add one more extra argument: a nanoseconds value.
All uses changed.
(ns): New macro.
(my_strftime function): Add %N format.
(emacs_strftimeu): Renamed from emacs_strftime,
with extra ut argument.
2001-05-20 20:41:20 +00:00
Jim Meyering
a917db5ab2 (libfetish_a_SOURCES):
Add strftime.c, since we now compile it on all hosts.
2001-05-20 20:39:28 +00:00
Jim Meyering
8033ceb4ae *** empty log message *** 2001-05-20 20:38:29 +00:00
Jim Meyering
79bb16b328 (jm_FUNC_GNU_STRFTIME):
Don't bother to check library strftime, since
we'll be using our own my_strftime function anyway.
Define my_strftime instead of strftime.
2001-05-20 20:38:25 +00:00
Jim Meyering
ee5f88a66f *** empty log message *** 2001-05-20 18:46:20 +00:00
Jim Meyering
b85edfac45 (parse_obsolescent_option): Accept a b suffix. 2001-05-20 18:46:09 +00:00
Jim Meyering
67785d9d82 . 2001-05-20 18:18:17 +00:00
Jim Meyering
4b532bfa2f (EXTRA_DIST): Add constants.texi and doclicense.texi.
(info_TEXINFOS): s/fileutils/omni-utils/.
(check-texinfo): New rule.
(check): Depend on check-texinfo.
2001-05-20 08:21:05 +00:00
Jim Meyering
175fa8ef06 Make all references to POSIX use @sc{posix}. 2001-05-20 07:24:08 +00:00
Jim Meyering
5f64ac353e . 2001-05-20 07:12:33 +00:00
Jim Meyering
df80cbe561 (uniq invocation): Document the new optional
arguments to the --all-repeated option.
2001-05-20 06:57:37 +00:00
Jim Meyering
c04dab58ad *** empty log message *** 2001-05-20 06:56:32 +00:00
Jim Meyering
62c7564165 Rename new option values: s/all/precede/ and s/minimum/separate/. 2001-05-20 06:56:24 +00:00
Jim Meyering
f251729f7a *** empty log message *** 2001-05-20 06:55:06 +00:00
Jim Meyering
c08d959056 reflect option value renamings 2001-05-20 06:54:05 +00:00
Jim Meyering
1f0fb076ba . 2001-05-19 10:35:01 +00:00
Jim Meyering
352912e2b2 *** empty log message *** 2001-05-19 09:33:08 +00:00
Jim Meyering
43624d4052 (delimit_method_map): Remove trailing comma. 2001-05-19 08:45:13 +00:00
Jim Meyering
43614bef5f *** empty log message *** 2001-05-19 08:44:04 +00:00
Jim Meyering
cfb5f2d82a Test new, --all-repeated options. 2001-05-19 08:43:57 +00:00
Jim Meyering
85601384c9 *** empty log message *** 2001-05-19 07:58:17 +00:00
Jim Meyering
16b0a807af Support new modes for uniq's --all-repeated option.
The default behavior is unchanged.

Include argmatch.h.
(usage): Update.
(check_file): Implement it.
(main): Handle new, optional arguments.
Patch by Padraig Brady.
2001-05-19 07:55:43 +00:00
Jim Meyering
22732cd352 s/GNU text/GNU command line/ ... utilities. 2001-05-19 07:09:30 +00:00
Jim Meyering
12fb893bba s/was/were/ 2001-05-19 06:14:26 +00:00
Jim Meyering
025550c34d *** empty log message *** 2001-05-19 05:58:18 +00:00
Jim Meyering
04c04ad4e9 Change a few uses of timezone' to time zone'. 2001-05-19 05:57:50 +00:00
Jim Meyering
c397b531b7 (my-distcheck): Remove work-around kludge and
associated comment, now that automake has ben fixed.
2001-05-16 08:14:19 +00:00
Jim Meyering
7a9eebbc9c *** empty log message *** 2001-05-16 07:33:31 +00:00
Jim Meyering
cd470239ae Use proper quoting so brackets appear in the test program. 2001-05-16 07:33:22 +00:00
Jim Meyering
531822b168 . 2001-05-16 07:30:54 +00:00
Jim Meyering
f1c7411a97 *** empty log message *** 2001-05-15 15:46:59 +00:00
Jim Meyering
786d944b5e (parse_obsolescent_option): Use t_count_lines, not
count_lines, in error message.
2001-05-15 15:45:58 +00:00
Jim Meyering
8f0403a90f *** empty log message *** 2001-05-15 14:02:28 +00:00
Jim Meyering
bd510c7b11 Use proper quoting so brackets appear in the test program. 2001-05-15 14:02:19 +00:00
Jim Meyering
345f20440e *** empty log message *** 2001-05-15 10:11:19 +00:00
Jim Meyering
9e879e9c09 (struct fileinfo.linkmode): Now st_mode.
(print_color_indicator, print_name_with_quoting, print_type_indicator,
length_of_file_name_and_frills):
Use mode_t, not unsigned int, to store modes.
(dired_dump_obstack): Do not assume size fits in 'int'.
(get_link_name): readlink returns ssize_t, not int.
(make_link_path): Store buffer size as size_t, not int.
(print_long_format): Use unsigned long, not unsigned, to print
nlink_t, uid_t, gid_t, major_t, minor_t.
2001-05-15 10:11:15 +00:00
Jim Meyering
3b6ddee01e *** empty log message *** 2001-05-13 18:24:57 +00:00
Jim Meyering
c2fc3f28dd (major_t, minor_t): Define to unsigned int if undefined. 2001-05-13 18:24:44 +00:00
Jim Meyering
f7eab80b3c *** empty log message *** 2001-05-13 18:23:39 +00:00
Jim Meyering
a8219ddccd (main): Check for NODEV device only if NODEV is defined. 2001-05-13 18:23:05 +00:00
Jim Meyering
b8b5b82220 (NODEV): Remove, undoing previous change. 2001-05-13 18:22:54 +00:00
Jim Meyering
8cc6b069b6 *** empty log message *** 2001-05-13 15:29:21 +00:00
Jim Meyering
a5bd412ed0 (dir_name, dir_len): Define to different names
to avoid shadowing warnings due to new declarations from dirname.h.
2001-05-13 15:29:15 +00:00
Jim Meyering
dad1592217 *** empty log message *** 2001-05-13 15:23:54 +00:00
Jim Meyering
2f7d346fb1 Add new --dereference-command-line option.
-H now means this instead of meaning --si, as POSIX requires.
2001-05-13 15:23:20 +00:00
Jim Meyering
1650fcd3f7 *** empty log message *** 2001-05-13 15:22:28 +00:00
Jim Meyering
cf3a6f7638 (run_tests): Fail if any test name is longer than 12 bytes. 2001-05-13 15:22:23 +00:00
Jim Meyering
f4456619fa Shorten test names so the length of a resulting file name doesn't exceed 14. 2001-05-13 15:21:50 +00:00
Jim Meyering
b1cb63869d Rename slink-dir test to slink-dir-dF. Add new tests
slink-dir-F, slink-dir-dFH, slink-dir-dFL.
2001-05-13 15:14:20 +00:00
Jim Meyering
8bd003b434 (enum Dereference_symlink): New type.
(dereference): New var, replacing trace_links, which was removed.
(long_options, main, decode_switches, gobble_file, usage):
Implement the changes.
2001-05-13 15:14:00 +00:00
Jim Meyering
331635b016 *** empty log message *** 2001-05-13 10:21:25 +00:00
Jim Meyering
271a090daa (NODEV): New macro, if not already defined. 2001-05-13 10:21:08 +00:00
Jim Meyering
9426be56f5 (main): Check for overflow when converting out of uintmax_t.
Do not assume that major_t and minor_t are no wider than int.
Check for makedev failures.  Convert device numbers via uintmax_t, not
unsigned long, just in case.  Coalesce duplicate code in the block and
character device cases.
2001-05-13 10:20:36 +00:00
Jim Meyering
ed582f5612 . 2001-05-12 20:55:19 +00:00
Jim Meyering
e364b0d6b8 *** empty log message *** 2001-05-12 16:06:36 +00:00
Jim Meyering
2227cb6a07 Include "dirname.h".
(base_name): Remove decl; now in dirname.h.
2001-05-12 16:05:51 +00:00
Jim Meyering
04a872f0d3 Include "dirname.h".
(base_name, strip_trailing_slashes): Remove decls; now in dirname.h.
(main): Use base_len instead of strip_trailing_slashes to strip
trailing slashes.
2001-05-12 16:05:12 +00:00
Jim Meyering
992b068bd2 (strip_trailing_slashes): Remove decl; now in dirname.h.
(main): Use dir_len rather than dir_name_r.
2001-05-12 16:03:19 +00:00
Jim Meyering
d8535172f6 *** empty log message *** 2001-05-12 15:50:50 +00:00
Jim Meyering
b6678c419b (ISSLASH): Remove; now in dirname.h.
(strip_trailing_slashes): Return nonzero if
a slash was stripped.  Do not strip the last slash after a
file system prefix.
2001-05-12 15:50:27 +00:00
Jim Meyering
8989b5b65c (base_name): Remove; now in dirname.h.
(STREQ): Remove.
(same_name): Handle the case where the basename ends in trailing '/'.
2001-05-12 15:48:00 +00:00
Jim Meyering
dbe66b162b (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN): New macros.
(base_name, base_len, dir_len, strip_trailing_slashes): New decls.
2001-05-12 15:46:36 +00:00
Jim Meyering
f6e82b7dea (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
(path_concat): Use base_len to compute
base length, not strlen; this means we cannot rely on memcpy
to null-terminate.
2001-05-12 15:45:43 +00:00
Jim Meyering
1450c855b6 Use "", not <> to include non-system header files. 2001-05-12 15:41:11 +00:00
Jim Meyering
3c9e00c4fd Use "", not <> to include non-system header files. 2001-05-12 15:40:47 +00:00
Jim Meyering
e149a84b32 Use "", not <> to include dirname.h. 2001-05-12 15:39:45 +00:00
Jim Meyering
521f5344c8 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
Include <string.h> instead of <stdlib.h>.
Do not include <assert.h>; no longer needed.
Include xalloc.h.
(memrchr): Remove decl.
(dir_name_r): Remove.
(dir_len): Renamed from dirlen.  All callers changed.
Rewrite in terms of base_name, for simplicity and consistency.
(dir_name): Never return NULL.  All callers changed.
Do not include <stdlib.h> in test program; no longer needed.
return 0; is fine for test program.
2001-05-12 15:38:00 +00:00
Jim Meyering
4b8000742f (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
Do not include <stdio.h>, <assert.h>; no longer needed.
Include <string.h>, <dirname.h>.
(base_name): Allow file names ending in slashes, other than names
that are all slashes.  In this case, return the basename followed
by the slashes.  This is more general, and can be used in places
where the original base_name purposely had an assertion failure.
(base_len): New function.
2001-05-12 14:23:49 +00:00
Jim Meyering
9ce2d23774 (base_name): Remove; now in dirname.h.
Include <dirname.h> after size_t is defined.
(find_backup_file_name, max_backup_version): Use base_len instead of
rolling it ourselves.
Handle the case of "" and (on DOS) "C:" correctly.
2001-05-12 14:20:43 +00:00
Jim Meyering
d45e530c21 (ISSLASH, base_name): Remove; now in dirname.h.
Include <dirname.h> after size_t is defined.

(addext): Use base_len to trim redundant
trailing slashes instead of doing it ourselves.
But do not trim the last slash if it is not redundant.
2001-05-12 14:13:36 +00:00
Jim Meyering
1fecbd7863 Include dirname.h.
(strip_trailing_slashes): Remove decl; now in dirname.h.
2001-05-12 10:05:42 +00:00
Jim Meyering
bef1bc6137 Include dirname.h.
(strip_trailing_slashes): Remove decl; now in dirname.h.
2001-05-12 10:05:15 +00:00
Jim Meyering
daa8b2b1a3 . 2001-05-12 10:04:13 +00:00
Jim Meyering
37f9f5ed29 *** empty log message *** 2001-05-12 10:03:16 +00:00
Jim Meyering
b4c2f799ec (strip_trailing_slashes): Likewise.
(find_mount_point): No need to strip trailing
slashes before invoking new dir_name.
2001-05-12 10:03:07 +00:00
Jim Meyering
98e643ab3b (strip_trailing_slashes): Remove; now in dirname.h.
(make_path_private): Use dir_len instead of
dir_name, and avoid an extra mealloc call.
2001-05-12 10:00:52 +00:00
Jim Meyering
b2604c5d12 (copy_internal): Remove the code that tested for NULL
dir_name return value.  That can't happen.
2001-05-12 09:58:03 +00:00
Jim Meyering
b489ba12d8 Include "dirname.h".
(strip_trailing_slashes_2): Remove; now done by
strip_trailing_slashes.  All callers changed.
2001-05-12 09:54:19 +00:00
Jim Meyering
966d1cd6e6 (base_name): Remove decl; now in dirname.h. 2001-05-12 09:53:45 +00:00
Jim Meyering
99fa315bf8 Include dirname.h, to get base_name 2001-05-12 09:52:56 +00:00
Jim Meyering
7ed10357bc include dirname.h. 2001-05-12 09:51:59 +00:00
Jim Meyering
4a94a06aa6 (strip_trailing_slashes): Remove declaration; now in dirname.h. 2001-05-12 09:51:23 +00:00
Jim Meyering
c29cb48a98 Wording changes related to -o, -n, and -g. 2001-05-12 08:44:31 +00:00
Jim Meyering
2034cba6f7 (usage): Minor wording changes related to -o, -n, and -g.
From Paul Eggert.
2001-05-12 08:23:23 +00:00
Jim Meyering
8e3f835a46 *** empty log message *** 2001-05-12 08:10:33 +00:00
Jim Meyering
b338208678 *** empty log message *** 2001-05-12 08:04:52 +00:00
Jim Meyering
ba94ef5b1b (mode_changed, change_file_mode):
There's no need to invoke both lstat and stat here, so call just
one of the two functions.
2001-05-12 08:04:44 +00:00
Jim Meyering
1af93e3d71 . 2001-05-11 14:06:22 +00:00
Jim Meyering
5848516f26 (shred invocation): Warn about backups and mirrors. 2001-05-11 11:23:37 +00:00
Jim Meyering
a46bcc4636 (usage): Warn about backups and mirrors. 2001-05-11 11:23:24 +00:00
Jim Meyering
e8256c3c7c s/POSIX/posix/ 2001-05-11 10:38:56 +00:00
Jim Meyering
22f4434076 remove trailing spaces 2001-05-11 10:38:23 +00:00
Jim Meyering
500f90eab5 fix typo: missing `r}' in this line:
@itemx --temporary-directory=@var{tempdir}
2001-05-11 10:38:13 +00:00
Jim Meyering
902a2a5d7a shift off the leading `_' 2001-05-11 09:14:22 +00:00
Jim Meyering
677cb6c6a9 Factor out the root-only test into this ...
Source ../root-only instead.
2001-05-11 09:10:09 +00:00
Jim Meyering
c08bfa1060 *** empty log message *** 2001-05-11 08:19:41 +00:00
Jim Meyering
f49ad025e6 (shred invocation): Warn about backups. From Nelson Beebe. 2001-05-11 08:18:18 +00:00
Jim Meyering
e57fb62f7f add a space after a period
(true invocation): fix a typo
2001-05-11 07:53:44 +00:00
Jim Meyering
0246568205 s/restriction deletion flag
/restricted deletion flag/
2001-05-11 07:36:22 +00:00
Jim Meyering
71477a1aa8 . 2001-05-11 07:22:53 +00:00
Jim Meyering
45cb2385d5 *** empty log message *** 2001-05-10 14:28:42 +00:00
Jim Meyering
dd4aedd1d3 (main): Fix thinko: s/argv[optind]/optarg/. 2001-05-10 14:25:48 +00:00
Jim Meyering
1bb999e519 *** empty log message *** 2001-05-09 09:16:08 +00:00
Jim Meyering
78c7e1f60b (jm_MACROS): Do not check for fseeko; no longer used. 2001-05-09 09:16:03 +00:00
Jim Meyering
30aa344399 *** empty log message *** 2001-05-07 20:21:18 +00:00
Jim Meyering
90ce79ff92 tweak diagnostic 2001-05-05 17:32:40 +00:00
Jim Meyering
b5063eb63b (decode_switches): Complain if the envvar, QUOTING_STYLE,
is set to an invalid value.
Move some declarations of locals into scopes where they're used.
2001-05-05 17:31:45 +00:00
Jim Meyering
e67563e822 *** empty log message *** 2001-05-05 14:29:38 +00:00
Jim Meyering
56a458164e (print_owner): New global variable.
(usage): Update the description of -g.
(decode_switches): Honor the -g option (omit owner information),
now that POSIX specifies it.
(print_long_format): Don't print owner name if -g was specified.
Move declaration of `user_name' into the scope where it's used.
(print_group): Rename global from `inhibit_group'.  Update all
uses accordingly.

(decode_switches): Make -n work just like -l, except
with numeric IDs, per POSIX.  Before, to have any effect, -n had
to be used with -l.  Reported by Dale Scheetz.
(usage): Update the description of -n.
Separate the descriptions of -n and --numeric-uid-gid.
Split string in --help output that had exceeded my limit of 2048 bytes.
2001-05-05 14:29:02 +00:00
Jim Meyering
fb87a6052f *** empty log message *** 2001-05-05 12:54:46 +00:00
Jim Meyering
204c08e9fa (usage): Correct description of -3. 2001-05-05 12:54:37 +00:00
Jim Meyering
69d4a38c4e *** empty log message *** 2001-05-05 12:54:16 +00:00
Jim Meyering
246d5a99d3 Update from master repository. 2001-05-02 09:52:32 +00:00
Jim Meyering
49313f9a74 (tgz-size, xd-size): Compute sizes.
(announcement): Include sizes of .tar.gz and .xdelta files
in the announcement.
2001-05-02 08:09:14 +00:00
Jim Meyering
29e3c2e97f *** empty log message *** 2001-04-29 21:22:52 +00:00
Jim Meyering
e2003b82ff *** empty log message *** 2001-04-29 20:50:48 +00:00
Jim Meyering
047056d4fb *** empty log message *** 2001-04-29 20:49:11 +00:00
Jim Meyering
bbcf9c36cf *** empty log message *** 2001-04-29 11:33:44 +00:00
Jim Meyering
c8de6584bb --help:
downcase bulleted items
remove some periods
2001-04-29 11:22:48 +00:00
Jim Meyering
d463885c24 *** empty log message *** 2001-04-29 08:36:21 +00:00
Jim Meyering
e54944039a *** empty log message *** 2001-04-29 07:02:17 +00:00
Jim Meyering
6b647033ce (usage): Include in --help output the warning about
some of the filesystem types on which shred is not effective.
2001-04-29 07:01:41 +00:00
Jim Meyering
c8576c4f8c (usage): Mention shred. 2001-04-29 07:01:22 +00:00
Jim Meyering
56ee0fa636 Refer to shred.
Remove the example showing how to remove `-foo', since that is now
in the --help output (and hence automatically included).
2001-04-29 07:01:12 +00:00
Jim Meyering
b8926b07cc *** empty log message *** 2001-04-25 12:30:56 +00:00
Jim Meyering
41971a1eaa (my-distcheck): Add a comment. 2001-04-25 12:30:52 +00:00
Jim Meyering
6438d68006 *** empty log message *** 2001-04-25 08:27:16 +00:00
Jim Meyering
1efb4218a7 *** empty log message *** 2001-04-24 07:21:14 +00:00
Jim Meyering
0af0ad2493 *** empty log message *** 2001-04-24 07:16:45 +00:00
Jim Meyering
d2e9866f3c Include wheel-size.h.
(WHEEL_START): Adjust definition.
(wheel_tab[]): Remove body of definition.
Include generated file, wheel.h, instead.
2001-04-24 07:16:28 +00:00
Jim Meyering
23cc993dad . 2001-04-24 07:07:29 +00:00
Jim Meyering
bf0d2aac15 *** empty log message *** 2001-04-23 07:38:44 +00:00
Jim Meyering
cc3ea7c99f (dd_copy): When using sync with either block or unblock,
pad with spaces.
2001-04-23 07:38:33 +00:00
Jim Meyering
2afd912ce5 *** empty log message *** 2001-04-23 07:33:37 +00:00
Jim Meyering
a8737499b5 (block-sync-1): new test, for just-fixed bug 2001-04-23 07:31:17 +00:00
Jim Meyering
5d133efc26 *** empty log message *** 2001-04-22 21:37:36 +00:00
Jim Meyering
fae5972a38 fix typo in comment 2001-04-22 21:35:11 +00:00
Jim Meyering
b17fce4fa4 (decode_switches): Ensure that -1 has no effect when it follows -l. 2001-04-22 21:34:20 +00:00
Jim Meyering
c582df59bf *** empty log message *** 2001-04-22 16:52:23 +00:00
Jim Meyering
4451bd8a9f . 2001-04-22 16:50:47 +00:00
Jim Meyering
493d736f7d fix typo in --help output 2001-04-22 11:44:56 +00:00
Jim Meyering
782f4e9842 *** empty log message *** 2001-04-22 10:14:20 +00:00
Jim Meyering
8fb784af90 *** empty log message *** 2001-04-22 10:12:59 +00:00
Jim Meyering
fa9d5f6445 *** empty log message *** 2001-04-22 10:12:25 +00:00
Jim Meyering
e55708d43c . 2001-04-22 10:09:21 +00:00
Jim Meyering
b628469832 *** empty log message *** 2001-04-22 09:16:14 +00:00
Jim Meyering
e222fda574 (main): Fix off-by-one error introduced with last change. 2001-04-22 09:15:17 +00:00
Jim Meyering
2e1f0f43f0 check -R, too 2001-04-22 09:14:14 +00:00
Jim Meyering
d9a0e2c715 *** empty log message *** 2001-04-22 09:11:08 +00:00
Jim Meyering
7394867950 *** empty log message *** 2001-04-22 09:10:29 +00:00
Jim Meyering
f27f72bd6d *** empty log message *** 2001-04-22 09:08:53 +00:00
Jim Meyering
2fb7f1e3c1 (TESTS): Add no-arg. 2001-04-22 09:08:45 +00:00
Jim Meyering
b9a9796da6 *** empty log message *** 2001-04-22 08:31:40 +00:00
Jim Meyering
519b707b4e Fix bugs when computing length of large files.
Add overflow and write error checks.  Use uint_fast32_t, not
unsigned long, to do checksum calculation, as C99 says
uint_fast32_t should be no slower and might be faster.

Include <stdio.h> and "system.h" even if CRCTAB is defined,
so that the code will compile if CRCTAB is defined.
Include "human.h" if CRCTAB is not defined.
(uint_fast32_t): Define if it appears that stdint.h didn't.
(BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long,
for checksums.
(fill_r, remainder, main): Use ANSI prototypes.
(fill_r, remainder, main): Omit duplicate code.
(main): Use uintmax_t, not unsigned long, for file lengths.
Use size_t, not long, for result of fread.
Check for overflow when computing file lengths.
Check for write error immediately after printing a line, so that
we don't write to stdout indefinitely after an error.
2001-04-22 08:31:24 +00:00
Jim Meyering
2d0f3f2e74 *** empty log message *** 2001-04-22 07:29:13 +00:00
Jim Meyering
f553273be8 (usage): Mention that sync makes dd pad with spaces (rather than NULs)
when used with block or unblock.
2001-04-22 07:28:58 +00:00
Jim Meyering
096c85ad5f *** empty log message *** 2001-04-22 07:28:11 +00:00
109 changed files with 15673 additions and 10336 deletions

View File

@@ -15,6 +15,7 @@ have-Makefile := $(shell test -f Makefile && echo yes)
ifeq ($(have-Makefile),yes)
include Makefile
include $(srcdir)/Makefile.cfg
include $(srcdir)/Makefile.maint
else

21
Makefile.cfg Normal file
View File

@@ -0,0 +1,21 @@
## Customize Makefile.maint.
move_if_change = move-if-change
# List the hosts to which test releases are copied.
# `a' and `b' are merely placeholders, and correspond to the
# `a_' and `b_' prefixes of the following variables.
hosts = a b
a_host = alpha.gnu.org
b_host = freefriends.org
alpha_subdir = gnu/fetish
a_url_dir = $(alpha_subdir)
b_url_dir = $(alpha_subdir)
# Files that `make wget-update' should update.
wget_files = \
$(srcdir)/config.guess \
$(srcdir)/config.sub \
$(srcdir)/doc/texinfo.tex \
$(srcdir)/src/ansi2knr.c

View File

@@ -11,7 +11,7 @@ maintainer-check:
$(MAKE) distcheck
$(MAKE) my-distcheck
prev_version_file = .prev-version
prev_version_file ?= .prev-version
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
PREV_VERSION := $(shell cat $(prev_version_file))
@@ -26,10 +26,12 @@ my_distdir = $(PACKAGE)-$(VERSION)
# Verify that all source files using _() are listed in po/POTFILES.in.
po-check:
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2
diff -u $@-1 $@-2
rm -f $@-1 $@-2
if test -f po/POTFILES.in; then \
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
grep -E -l '\b_\(' lib/*.c src/*.c | sort > $@-2; \
diff -u $@-1 $@-2 || exit 1; \
rm -f $@-1 $@-2; \
fi
# Do not save the original name or timestamp in the .tar.gz file.
GZIP_ENV = --no-name
@@ -56,21 +58,22 @@ null_AM_MAKEFLAGS = \
AUTOHEADER=false \
MAKEINFO=false
# Detect format-string/arg-list mismatches that would normally be obscured
# by the use of _(). The --disable-nls effectively defines away that macro,
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
# treated as a failure.
t=./=test
my-distcheck: writable-files po-check
-rm -rf $(t)
mkdir $(t)
GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
# Removing $(DEPDIR) like this is a gross kludge to work around a bug
# in automake. Remove that line once it's fixed.
cd $(t)/$(distdir) \
&& ./configure --disable-nls \
&& $(MAKE) CFLAGS='-Wformat -Werror' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \
&& $(MAKE) check \
&& $(MAKE) distclean \
&& rm -rf $(DEPDIR)
&& $(MAKE) distclean
cd $(t) && mv $(distdir) $(distdir).old \
&& $(AMTAR) -zxf ../$(distdir).tar.gz
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
@@ -79,21 +82,16 @@ my-distcheck: writable-files po-check
echo "$(distdir).tar.gz is ready for distribution"; \
echo "========================"
a_host = alpha.gnu.org
b_host = freefriends.org
alpha_subdir = gnu/fetish
a_url_dir = $(alpha_subdir)
b_url_dir = $(alpha_subdir)
# This must be the same name on both hosts.
# Make it a symlink that points to the right place.
real_dir = fetish-ftp
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
url_dir_list = $(foreach x,$(hosts),ftp://$($(x)_host)/$($(x)_url_dir))
md5 = $(shell md5sum < $(my_distdir).tar.gz|sed 's/ -//')
sha1 = $(shell sha1sum < $(my_distdir).tar.gz|sed 's/ -//')
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/M.*/MB/')
xd-size = $(shell du --human $(xd-delta)|sed 's/M.*/MB/')
rel-check:
tarz=/tmp/rel-check-tarz-$$$$; \
@@ -115,13 +113,13 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
echo FIXME: put comments here; \
echo; \
for url in $(url_dir_list); do \
echo " $$url/$(my_distdir).tar.gz"; \
echo " $$url/$(my_distdir).tar.gz ($(tgz-size))"; \
done; \
echo; \
echo And here are xdelta-style diffs; \
echo; \
for url in $(url_dir_list); do \
echo " $$url/$(xd-delta)"; \
echo " $$url/$(xd-delta) ($(xd-size))"; \
done; \
echo; \
echo "Here are the MD5 and SHA1 signatures for the .tar.gz file"; \
@@ -153,17 +151,43 @@ writable-files:
WGET = wget
ftp-gnu = ftp://ftp.gnu.org/gnu
# Use mv, if you don't have/want move-if-change.
move_if_change ?= move-if-change
# The following pseudo table associates a local directory and a URL
# with each of the files that belongs to some other package and is
# regularly updated from the specified URL.
wget_files ?= $(srcdir)/config.guess $(srcdir)/config.sub \
$(srcdir)/src/ansi2knr.c \
$(srcdir)/doc/texinfo.tex
get-targets = $(patsubst %, get-%, $(wget_files))
config.guess-url_prefix = $(ftp-gnu)/config/
config.sub-url_prefix = $(ftp-gnu)/config/
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
target = $(patsubst get-%, %, $@)
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
.PHONY: $(get-targets)
$(get-targets):
$(WGET) $(url) -O $(target).t \
&& $(move_if_change) $(target).t $(target)
automake_repo=:pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
.PHONY: wget-update
wget-update:
$(WGET) $(ftp-gnu)/texinfo/texinfo.tex -O $(srcdir)/doc/texinfo.tex
for f in config.guess config.sub; do \
$(WGET) $(ftp-gnu)/config/$$f -O $(srcdir)/$$f; \
done
for f in depcomp missing; do \
echo checking out $$f...; \
cvs -d $(automake_repo) co -p automake/$$f > t$$$$ \
&& mv t$$$$ $$f; \
wget-update: $(get-targets)
for f in depcomp missing; do \
test -f $$f || continue; \
echo checking out $$f...; \
cvs -d $(automake_repo) co -p automake/lib/$$f > $$f.t \
&& $(move_if_change) $$f.t $$f; \
done
define emit-rsync-commands
@@ -178,9 +202,11 @@ define emit-rsync-commands
endef
# Make sure that the copyright date in lib/version-etc.c is up to date.
check-copyright: lib/version-etc.c
@grep 'N_("Copyright (C) $(shell date +%Y) Free' $< > /dev/null \
|| { echo 'out of date copyright in $<; update it' 1>&2; exit 1; }
check-copyright:
@if test -f lib/version-etc.c; then \
grep 'N_("Copyright (C) $(shell date +%Y) Free' lib/version-etc.c > /dev/null \
|| { echo 'out of date copyright in $<; update it' 1>&2; exit 1; }; \
fi
alpha: writable-files po-check check-copyright
$(MAKE) cvs-dist

5
THANKS
View File

@@ -25,6 +25,7 @@ Andreas Stolcke stolcke@ICSI.Berkeley.EDU
Andres Soolo andres@soolo.matti.ee
Andrew Burgess aab@cichlid.com
Andrew Dalke dalke@bioreason.com
Andrew Pham andpha@us.ibm.com
Andrew Tridgell tridge@samba.org
Andries Brouwer Andries.Brouwer@cwi.nl
Andy Longton alongton@metamark.com
@@ -64,6 +65,7 @@ Chuck Hedrick hedrick@klinzhai.rutgers.edu
Clark Morgan cmorgan@aracnet.com
Colin Plumb colin@nyx.net
Collin Rogowski collin@rogowski.de
Dale Scheetz dwarf@polaris.net
Dan Hagerty hag@gnu.ai.it.edu
Dan Pascu dan@services.iiruc.ro
Daniel Bergstrom noa@melody.se
@@ -171,6 +173,7 @@ Karl-Michael Schneider schneide@phil.uni-passau.de
Karsten Thygesen karthy@kom.auc.dk
Kaveh R. Ghazi ghazi@caip.rutgers.edu
Keith Owens kaos@audio.apana.org.au
Keith Thompson kst@sdsc.edu
Ken Pizzini kenp@halcyon.com
Kjetil Torgrim Homme kjetilho@ifi.uio.no
Kristoffer Rose kris@diku.dk
@@ -276,7 +279,9 @@ Sander van Malssen svm@kozmix.ow.nl
Santiago Vila Doncel sanvila@unex.es
Savochkin Andrey Vladimirovich saw@msu.ru
Scott Lurndal slurn@griffin.engr.sgi.com
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr
Stephen Eglen eglen@pcg.wustl.edu
Stephen Gildea gildea@x.org
Stephen Smoogen ??????????
Steve McConnel steve@acadcomp.sil.org

View File

@@ -1,19 +1,19 @@
Makefile
fileutils.aux
fileutils.cm
fileutils.cp
fileutils.cps
fileutils.dvi
fileutils.fl
fileutils.fn
fileutils.info
fileutils.info*
fileutils.ky
fileutils.log
fileutils.op
fileutils.pg
fileutils.toc
fileutils.tp
fileutils.vr
coreutils.aux
coreutils.cm
coreutils.cp
coreutils.cps
coreutils.dvi
coreutils.fl
coreutils.fn
coreutils.info
coreutils.info*
coreutils.ky
coreutils.log
coreutils.op
coreutils.pg
coreutils.toc
coreutils.tp
coreutils.vr
stamp-vti
version.texi

26
doc/ChangeLog Normal file
View File

@@ -0,0 +1,26 @@
2001-06-16 Jim Meyering <meyering@lucent.com>
* Makefile.am (info_TEXINFOS): Reflect renaming: s/omni-/core/.
* coreutils.texi: Likewise.
* coreutils.texi: New, renamed from omni-utils.texi.
* omni-utils.texi: Removed, renamed to coreutils.texi.
* omni-utils.texi (ls invocation): Mention the effect of locale.
Reported by Keith Thompson.
2001-05-24 Jim Meyering <meyering@lucent.com>
* texinfo.tex: Update from master source.
* omni-utils.texi (ls invocation): Document more clearly what ls
does when given no arguments.
2001-05-21 Jim Meyering <meyering@lucent.com>
* textutils.texi: Remove file.
* Makefile.am ($(DVIS), $(INFO_DEPS)): Depend on $(EXTRA_DIST).
(DISABLED_constants.texi): New rule -- disabled for now.
This directory is now shared by fileutils, textutils, and sh-utils.

View File

@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
info_TEXINFOS = fileutils.texi
info_TEXINFOS = coreutils.texi
EXTRA_DIST = perm.texi getdate.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
@@ -12,3 +12,25 @@ EXTRA_DIST = perm.texi getdate.texi
# and those names all map to one 14-byte name (<package>.info-) on some crufty
# old systems.
MAKEINFO = makeinfo --no-split
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
# all been merged into one package.
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
LC_ALL=C \
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
$(top_srcdir)/src/tail.c > t-$@
mv t-$@ $@
# Uncomment this when fileutils, textutils, and sh-utils have
# all been merged into one package.
# MAINTAINERCLEANFILES = constants.texi
$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)
# List words/regexps here that should not appear in the texinfo documentation.
check-texinfo:
grep timezone $(srcdir)/*.texi && exit 1 || :
grep -w POSIX $(srcdir)/*.texi && exit 1 || :
check: check-texinfo

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -107,20 +101,19 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
info_TEXINFOS = coreutils.texi
info_TEXINFOS = fileutils.texi
EXTRA_DIST = perm.texi getdate.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
@@ -138,32 +131,27 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
TEXI2DVI = texi2dvi
INFO_DEPS = fileutils.info
DVIS = fileutils.dvi
TEXINFOS = fileutils.texi
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
version.texi
INFO_DEPS = coreutils.info
DVIS = coreutils.dvi
TEXINFOS = coreutils.texi
DIST_COMMON = ChangeLog Makefile.am Makefile.in mdate-sh stamp-vti \
texinfo.tex version.texi
all: all-am
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
.SUFFIXES: .dvi .info .ps .texi
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
$(srcdir)/version.texi: $(srcdir)/stamp-vti
$(srcdir)/version.texi: $(srcdir)/stamp-vti
@:
$(srcdir)/stamp-vti: fileutils.texi $(top_srcdir)/configure.in
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/fileutils.texi`; \
$(srcdir)/stamp-vti: coreutils.texi $(top_srcdir)/configure.in
@(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/coreutils.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
@@ -180,8 +168,8 @@ mostlyclean-vti:
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
fileutils.info: fileutils.texi $(srcdir)/version.texi
fileutils.dvi: fileutils.texi $(srcdir)/version.texi
coreutils.info: coreutils.texi $(srcdir)/version.texi
coreutils.dvi: coreutils.texi $(srcdir)/version.texi
.texi.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
@@ -196,14 +184,15 @@ fileutils.dvi: fileutils.texi $(srcdir)/version.texi
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
TEXI2DVI = texi2dvi
DVIPS = dvips
.dvi.ps:
$(DVIPS) $< -o $@
uninstall-info-am:
$(PRE_UNINSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
@if (install-info --version && \
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
@@ -230,9 +219,10 @@ dist-info: $(INFO_DEPS)
done
mostlyclean-aminfo:
-rm -f fileutils.aux fileutils.cp fileutils.cps fileutils.dvi fileutils.fn \
fileutils.ky fileutils.log fileutils.op fileutils.pg \
fileutils.ps fileutils.toc fileutils.tp fileutils.vr
-rm -f coreutils.aux coreutils.cp coreutils.cps coreutils.dvi coreutils.fl \
coreutils.fn coreutils.ky coreutils.log coreutils.op \
coreutils.pg coreutils.ps coreutils.toc coreutils.tp \
coreutils.vr
maintainer-clean-aminfo:
cd $(srcdir) && \
@@ -253,7 +243,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -282,23 +276,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -335,7 +326,8 @@ install-info-am: $(INFO_DEPS)
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
@if (install-info --version && \
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
@@ -370,6 +362,27 @@ uninstall-info: uninstall-info-am
uninstall uninstall-am uninstall-info-am
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
# all been merged into one package.
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
LC_ALL=C \
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
$(top_srcdir)/src/tail.c > t-$@
mv t-$@ $@
# Uncomment this when fileutils, textutils, and sh-utils have
# all been merged into one package.
# MAINTAINERCLEANFILES = constants.texi
$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)
# List words/regexps here that should not appear in the texinfo documentation.
check-texinfo:
grep timezone $(srcdir)/*.texi && exit 1 || :
grep -w POSIX $(srcdir)/*.texi && exit 1 || :
check: check-texinfo
# 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:

2
doc/constants.texi Normal file
View File

@@ -0,0 +1,2 @@
@set DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS 5
@set DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES 200

11308
doc/coreutils.texi Normal file

File diff suppressed because it is too large Load Diff

395
doc/doclicense.texi Normal file
View File

@@ -0,0 +1,395 @@
@c -*-texinfo-*-
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@center Version 1.1, March 2000
@ifnottex
@menu
* How to use this License for your documents::
@end menu
@end ifnottex
@display
Copyright (C) 2000 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
@iftex
@sp1
@end iftex
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
written document ``free'' in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
@iftex
@sp1
@end iftex
@item
APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License. The ``Document'', below, refers to any
such manual or work. Any member of the public is a licensee, and is
addressed as ``you''.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A ``Secondary Section'' is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
@iftex
@sp1
@end iftex
@item
VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
@iftex
@sp1
@end iftex
@item
COPYING IN QUANTITY
If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
@iftex
@sp1
@end iftex
@item
MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.@*
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has less than five).@*
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.@*
D. Preserve all the copyright notices of the Document.@*
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.@*
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.@*
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.@*
H. Include an unaltered copy of this License.@*
I. Preserve the section entitled ``History'', and its title, and add to
it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.@*
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.@*
K. In any section entitled ``Acknowledgements'' or ``Dedications'',
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.@*
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.@*
M. Delete any section entitled ``Endorsements''. Such a section
may not be included in the Modified Version.@*
N. Do not retitle any existing section as ``Endorsements''
or to conflict in title with any Invariant Section.@*
@iftex
@sp1
@end iftex
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
@iftex
@sp1
@end iftex
@item
COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections entitled ``History''
in the various original documents, forming one section entitled
``History''; likewise combine any sections entitled ``Acknowledgements'',
and any sections entitled ``Dedications''. You must delete all sections
entitled ``Endorsements.''
@iftex
@sp1
@end iftex
@item
COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
@iftex
@sp1
@end iftex
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation. Such a compilation is called an ``aggregate'', and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate.
Otherwise they must appear on covers around the whole aggregate.
@iftex
@sp1
@end iftex
@item
TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License provided that you also include the
original English version of this License. In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.
@iftex
@sp1
@end iftex
@item
TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
@iftex
@sp1
@end iftex
@item
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
@end enumerate
@node How to use this License for your documents
@unnumberedsec ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
@smallexample
@group
Copyright (C) @var{year} @var{your name}.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the Invariant Sections being @var{list their titles}, with the
Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
If you have no Invariant Sections, write ``with no Invariant Sections''
instead of saying which ones are invariant. If you have no
Front-Cover Texts, write ``no Front-Cover Texts'' instead of
``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

View File

@@ -74,7 +74,7 @@ save the program's text image on the swap device so it will load more
quickly when run (called the @dfn{sticky bit}). For directories on some
systems, prevent users from removing or renaming a file in a directory
unless they own the file or the directory; this is called the
@dfn{restriction deletion flag} for the directory.
@dfn{restricted deletion flag} for the directory.
@end enumerate
@node Symbolic Modes

File diff suppressed because it is too large Load Diff

View File

@@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2000-12-11.07}
\def\texinfoversion{2001-05-24.08}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
% Free Software Foundation, Inc.
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
% 2000, 01 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -170,6 +170,16 @@
}%
\fi
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
\removelastskip\penalty-50\smallskip\fi\fi}
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
\removelastskip\penalty-100\medskip\fi\fi}
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
% For @cropmarks command.
% Do @cropmarks to get crop marks.
%
@@ -730,9 +740,9 @@ where each line of input produces a line of output.}
\fi
%
\ifodd\pageno
\def\temp{\inleftmargin\lefttext}%
\def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
\else
\def\temp{\inrightmargin\righttext}%
\def\temp{\inleftmargin\lefttext}%
\fi
\temp
}
@@ -924,11 +934,15 @@ where each line of input produces a line of output.}
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
{#1.pdf}%
\ifnum\pdftexversion<13
#1.pdf%
\else
{#1.pdf}%
\fi
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
\def\pdfmkdest#1{\pdfdest name{#1} xyz}
\def\pdfmkpgn#1{#1@}
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
@@ -1026,6 +1040,7 @@ where each line of input produces a line of output.}
\def\pdfurl#1{%
\begingroup
\normalturnoffactive\def\@{@}%
\let\value=\expandablevalue
\leavevmode\Red
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
@@ -2904,16 +2919,17 @@ width0pt\relax} \fi
% Now the real index entry with the fonts.
\toks0 = {#2}%
%
% If third (subentry) arg is present, add it to the index
% string. And include a space.
% If the third (subentry) arg is present, add it to the index
% line to write.
\ifx\thirdarg\emptymacro \else
\toks0 = \expandafter{\the\toks0 \space #3}%
\toks0 = \expandafter{\the\toks0{#3}}%
\fi
%
% Set up the complete index entry, with both the sort key
% and the original text, including any font commands. We write
% three arguments to \entry to the .?? file, texindex reduces to
% two when writing the .??s sorted result.
% Set up the complete index entry, with both the sort key and
% the original text, including any font commands. We write
% three arguments to \entry to the .?? file (four in the
% subentry case), texindex reduces to two when writing the .??s
% sorted result.
\edef\temp{%
\write\csname#1indfile\endcsname{%
\realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
@@ -3135,11 +3151,18 @@ width0pt\relax} \fi
\def\primary #1{\line{#1\hfil}}
\newskip\secondaryindent \secondaryindent=0.5cm
\def\secondary #1#2{
{\parfillskip=0in \parskip=0in
\hangindent =1in \hangafter=1
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
\def\secondary#1#2{{%
\parfillskip=0in
\parskip=0in
\hangindent=1in
\hangafter=1
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
\ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else
#2
\fi
\par
}}
% Define two-column mode, which we use to typeset indexes.
@@ -4134,9 +4157,17 @@ width0pt\relax} \fi
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
% start of the next paragraph will insert \parskip
%
\def\aboveenvbreak{{\advance\envskipamount by \parskip
\endgraf \ifdim\lastskip<\envskipamount
\removelastskip \penalty-50 \vskip\envskipamount \fi}}
\def\aboveenvbreak{{%
\ifnum\lastpenalty < 10000
\advance\envskipamount by \parskip
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
\penalty-50
\vskip\envskipamount
\fi
\fi
}}
\let\afterenvbreak = \aboveenvbreak
@@ -5836,7 +5867,8 @@ width0pt\relax} \fi
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\nobreak\bigskip
@@ -5948,6 +5980,15 @@ should work if nowhere else does.}
\setemergencystretch
}
% Use `small' versions.
%
\def\smallenvironments{%
\let\smalldisplay = \smalldisplayx
\let\smallexample = \smalllispx
\let\smallformat = \smallformatx
\let\smalllisp = \smalllispx
}
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
@@ -5970,11 +6011,7 @@ should work if nowhere else does.}
\contentsrightmargin = 0pt
\deftypemargin = 0pt
\defbodyindent = .5cm
%
\let\smalldisplay = \smalldisplayx
\let\smallexample = \smalllispx
\let\smallformat = \smallformatx
\let\smalllisp = \smalllispx
\smallenvironments
}}
% Use @afourpaper to print on European A4 paper.
@@ -5988,6 +6025,26 @@ should work if nowhere else does.}
\hfuzz = 1pt
}}
% Use @afivepaper to print on European A5 paper.
% From romildo@urano.iceb.ufop.br, 2 July 2000.
% He also recommends making @example and @lisp be small.
\def\afivepaper{{\globaldefs = 1
\setleading{12.5pt}%
\parskip = 2pt plus 1pt minus 0.1pt
%
\internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
%
\lispnarrowing = 0.2in
\tolerance = 800
\hfuzz = 1.2pt
\contentsrightmargin = 0mm
\deftypemargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
%
\smallenvironments
}}
% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
\def\afourlatex{{\globaldefs = 1

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,102 @@
2001-06-11 Jim Meyering <meyering@lucent.com>
* regex.c: Update from GNU libc.
2001-05-27 Jim Meyering <meyering@lucent.com>
* readutmp.h (UT_TYPE): Define.
2001-05-24 Jim Meyering <meyering@lucent.com>
* argmatch.c: Include "quote.h".
(argmatch_invalid): Remove explicit `' quotes. Instead, use the
quote function. Reported by Göran Uddeborg.
2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
* dirname.c (dir_name): Compute append_dot using path, not newpath
which is not yet declared.
2001-05-11 Paul Eggert <eggert@twinsun.com>
* lib/Makefile.am (libfetish_a_SOURCES):
Add strftime.c, since we now compile it on all hosts.
* lib/strftime.c (my_strftime):
Define to nstrftime if emacs, but only if my_strftime is not defined.
(extra_args, extra_args_spec, extra_args_spec_iso): Rename from
ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
Add one more extra argument: a nanoseconds value.
All uses changed.
(ns): New macro.
(my_strftime function): Add %N format.
(emacs_strftimeu): Renamed from emacs_strftime,
with extra ut argument.
2001-05-11 Paul Eggert <eggert@twinsun.com>
dirname code cleanup. base_name now behaves more compatibly
with POSIX basename when given file names that have trailing
slashes, and similarly for dir_name. Add new primitives
base_len and dir_len. Put the directory-name-related decls
into dirname.h.
* addext.c (ISSLASH, base_name): Remove; now in dirname.h.
* backupfile.c (base_name): Likewise.
* basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
* dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
* makepath.c (strip_trailing_slashes): Likewise.
* path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
Likewise.
* rename.c (strip_trailing_slashes): Likewise.
* same.c (base_name): Likewise.
* stripslash.c (ISSLASH): Likewise.
* addext.c: Include <dirname.h> after size_t is defined.
* backupfile.c: Likewise.
* addext.c (addext): Use base_len to trim redundant
trailing slashes instead of doing it ourselves.
But do not trim the last slash if it is not redundant.
* backupfile.c (find_backup_file_name,
max_backup_version): Use base_len instead of rolling it ourselves.
Handle the case of "" and (on DOS) "C:" correctly.
* basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
Include <string.h>, <dirname.h>.
(base_name): Allow file names ending in slashes, other than names
that are all slashes. In this case, return the basename followed
by the slashes. This is more general, and can be used in places
where the original base_name purposely had an assertion failure.
(base_len): New function.
* dirname.c: Include <string.h> instead of <stdlib.h>.
Do not include <assert.h>; no longer needed.
Include xalloc.h.
(memrchr): Remove decl.
(dir_name_r): Remove.
(dir_len): Renamed from dirlen. All callers changed.
Rewrite in terms of base_name, for simplicity and consistency.
(dir_name): Never return NULL. All callers changed.
Do not include <stdlib.h> in test program; no longer needed.
return 0; is fine for test program.
* dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
New macros.
(base_name, base_len, dir_len, strip_trailing_slashes): New decls.
* path-concat.c (path_concat): Use base_len to compute
base length, not strlen; this means we cannot rely on memcpy
to null-terminate.
* same.c (STREQ): Remove.
(same_name): Handle the case where the basename ends in trailing '/'.
* stripslash.c (strip_trailing_slashes): Return nonzero if
a slash was stripped. Do not strip the last slash after a
file system prefix.
2001-04-08 Jim Meyering <meyering@lucent.com>
* getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
@@ -10,7 +109,7 @@
2001-03-19 Paul Eggert <eggert@twinsun.com>
* lib/version-etc.c (version_etc_copyright): Update to 2001.
* version-etc.c (version_etc_copyright): Update to 2001.
2001-03-16 Paul Eggert <eggert@twinsun.com>

View File

@@ -16,7 +16,8 @@ libfetish_a_SOURCES = \
makepath.c mbswidth.c md5.c memcasecmp.c memcoll.c modechange.c \
path-concat.c physmem.c \
quote.c quotearg.c readtokens.c safe-read.c same.c save-cwd.c \
savedir.c sha.c stripslash.c unicodeio.c userspec.c version-etc.c xgetcwd.c \
savedir.c sha.c strftime.c stripslash.c \
unicodeio.c userspec.c version-etc.c xgetcwd.c \
xgethostname.c xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c \
xstrtoumax.c yesno.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* addext.c -- add an extension to a file name
Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright 1990, 1997, 1998, 1999, 2001 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
@@ -29,8 +29,6 @@
# define HAVE_LONG_FILE_NAMES 0
#endif
#include <backupfile.h>
#if HAVE_LIMITS_H
# include <limits.h>
#endif
@@ -49,7 +47,8 @@
# include <unistd.h>
#endif
char *base_name PARAMS ((char const *));
#include "backupfile.h"
#include "dirname.h"
/* Append to FILENAME the extension EXT, unless the result would be too long,
in which case just append the character E. */
@@ -58,7 +57,7 @@ void
addext (char *filename, char const *ext, int e)
{
char *s = base_name (filename);
size_t slen = strlen (s), extlen = strlen (ext);
size_t slen = base_len (s), extlen = strlen (ext);
long slen_max = -1;
#if HAVE_PATHCONF && defined _PC_NAME_MAX
@@ -70,7 +69,8 @@ addext (char *filename, char const *ext, int e)
else
{
char c = *s;
*s = 0;
if (! ISSLASH (c))
*s = 0;
slen_max = pathconf (filename, _PC_NAME_MAX);
*s = c;
}

View File

@@ -1,5 +1,5 @@
/* argmatch.c -- find a match for a string in an array
Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1990, 1998, 1999, 2001 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
@@ -38,6 +38,7 @@
#include "error.h"
#include "quotearg.h"
#include "quote.h"
/* When reporting an invalid argument, show nonprinting characters
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
@@ -156,10 +157,11 @@ void
argmatch_invalid (const char *context, const char *value, int problem)
{
char const *format = (problem == -1
? _("invalid argument %s for `%s'")
: _("ambiguous argument %s for `%s'"));
? _("invalid argument %s for %s")
: _("ambiguous argument %s for %s"));
error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value),
quote (context));
}
/* List the valid arguments for argmatch.

View File

@@ -1,5 +1,6 @@
/* backupfile.c -- make Emacs style backup file names
Copyright (C) 1990-1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright 1990,91,92,93,94,95,96,97,98,99,2000, 2001 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
@@ -23,9 +24,6 @@
# include <config.h>
#endif
#include <argmatch.h>
#include <backupfile.h>
#include <stdio.h>
#include <sys/types.h>
#if HAVE_STRING_H
@@ -76,8 +74,6 @@ char *getenv ();
char *malloc ();
#endif
char *base_name PARAMS ((char const *));
#if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
# define HAVE_DIR 1
#else
@@ -111,6 +107,10 @@ char *base_name PARAMS ((char const *));
# define REAL_DIR_ENTRY(dp) 1
#endif
#include "argmatch.h"
#include "backupfile.h"
#include "dirname.h"
/* The extension added to file names to produce a simple (as opposed
to numbered) backup file name. */
const char *simple_backup_suffix = "~";
@@ -137,29 +137,31 @@ find_backup_file_name (const char *file, enum backup_type backup_type)
if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
backup_suffix_size_max = numbered_suffix_size_max;
s = malloc (file_len + backup_suffix_size_max + numbered_suffix_size_max);
s = malloc (file_len + 1
+ backup_suffix_size_max + numbered_suffix_size_max);
if (s)
{
strcpy (s, file);
#if HAVE_DIR
if (backup_type != simple)
{
int highest_backup;
size_t dir_len = base_name (s) - s;
size_t dirlen = dir_len (file);
strcpy (s + dir_len, ".");
highest_backup = max_backup_version (file + dir_len, s);
memcpy (s, file, dirlen);
if (dirlen == FILESYSTEM_PREFIX_LEN (file))
s[dirlen++] = '.';
s[dirlen] = '\0';
highest_backup = max_backup_version (base_name (file), s);
if (! (backup_type == numbered_existing && highest_backup == 0))
{
char *numbered_suffix = s + (file_len + backup_suffix_size_max);
sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
suffix = numbered_suffix;
}
strcpy (s, file);
}
#endif /* HAVE_DIR */
strcpy (s, file);
addext (s, suffix, '~');
}
return s;
@@ -186,7 +188,7 @@ max_backup_version (const char *file, const char *dir)
return 0;
highest_version = 0;
file_name_length = strlen (file);
file_name_length = base_len (file);
while ((dp = readdir (dirp)) != 0)
{

View File

@@ -19,53 +19,61 @@
# include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
#endif
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
char *base_name PARAMS ((char const *name));
#include "dirname.h"
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
In some environments the builtin `basename' modifies its argument.
If NAME is all slashes, be sure to return `/'. */
Return the address of the last file name component of NAME. If
NAME has no file name components because it is all slashes, return
NAME if it is empty, the address of its last slash otherwise. */
char *
base_name (char const *name)
{
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
int all_slashes = 1;
char const *base = name + FILESYSTEM_PREFIX_LEN (name);
char const *p;
for (p = name; *p; p++)
for (p = base; *p; p++)
{
if (ISSLASH (*p))
base = p + 1;
else
all_slashes = 0;
{
/* Treat multiple adjacent slashes like a single slash. */
do p++;
while (ISSLASH (*p));
/* If the file name ends in slash, use the trailing slash as
the basename if no non-slashes have been found. */
if (! *p)
{
if (ISSLASH (*base))
base = p - 1;
break;
}
/* *P is a non-slash preceded by a slash. */
base = p;
}
}
/* If NAME is all slashes, arrange to return `/'. */
if (*base == '\0' && ISSLASH (*name) && all_slashes)
--base;
/* Make sure the last byte is not a slash. */
assert (all_slashes || !ISSLASH (*(p - 1)));
return (char *) base;
}
/* Return the length of of the basename NAME. Typically NAME is the
value returned by base_name. Act like strlen (NAME), except omit
redundant trailing slashes. */
size_t
base_len (char const *name)
{
size_t len;
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
continue;
return len;
}

View File

@@ -1,5 +1,5 @@
/* dirname.c -- return all but the last element in a path
Copyright (C) 1990, 1998, 2000 Free Software Foundation, Inc.
Copyright 1990, 1998, 2000, 2001 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
@@ -19,126 +19,43 @@
# include <config.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
#else
char *malloc ();
#endif
#if defined STDC_HEADERS || defined HAVE_STRING_H
#if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
# ifndef strrchr
# define strrchr rindex
# endif
#endif
#include <assert.h>
#ifndef HAVE_DECL_MEMRCHR
"this configure-time declaration test was not run"
#endif
#if !HAVE_DECL_MEMRCHR
void *memrchr ();
#endif
#include "dirname.h"
#include "xalloc.h"
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
/* Return the length of `dirname (PATH)' and set *RESULT to point
to PATH or to `"."', as appropriate. Works properly even if
there are trailing slashes (by effectively ignoring them).
WARNING: This function doesn't work for cwd-relative names like
`a:foo' that are specified with a drive-letter prefix. That case
is handled in the caller. */
static size_t
dir_name_r (char const *path, char const **result)
/* Return the length of `dirname (PATH)', or zero if PATH is
in the working directory. Works properly even if
there are trailing slashes (by effectively ignoring them). */
size_t
dir_len (char const *path)
{
char const *slash;
size_t length; /* Length of result, not including NUL. */
size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
size_t length;
slash = strrchr (path, '/');
if (BACKSLASH_IS_PATH_SEPARATOR)
{
char const *b = strrchr (path, '\\');
if (b && slash < b)
slash = b;
}
/* Strip the basename and any redundant slashes before it. */
for (length = base_name (path) - path; prefix_length < length; length--)
if (! ISSLASH (path[length - 1]))
return length;
/* If the last byte of PATH is a slash, decrement SLASH until it's
pointing at the leftmost in a sequence of trailing slashes. */
if (slash && slash[1] == 0)
{
while (path < slash && ISSLASH (slash[-1]))
{
--slash;
}
if (path < slash)
{
size_t len = slash - path;
slash = memrchr (path, '/', len);
if (BACKSLASH_IS_PATH_SEPARATOR)
{
char const *b = memrchr (path, '\\', len);
if (b && slash < b)
slash = b;
}
}
}
if (slash == 0)
{
/* File is in the current directory. */
length = FILESYSTEM_PREFIX_LEN (path);
if (length == 0)
{
path = ".";
length = 1;
}
}
else
{
/* Remove any trailing slashes from the result. If we have a
canonicalized "d:/path", leave alone the root case "d:/". */
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
while (lim < slash && ISSLASH (*slash))
--slash;
length = slash - path + 1;
}
*result = path;
return length;
/* But don't strip the only slash from "/". */
return prefix_length + ISSLASH (path[prefix_length]);
}
/* Return the leading directories part of PATH,
allocated with malloc. If out of memory, return 0.
allocated with xmalloc.
Works properly even if there are trailing slashes
(by effectively ignoring them). */
char *
dir_name (char const *path)
{
char const *result;
size_t length = dir_name_r (path, &result);
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
char *newpath = (char *) malloc (length + append_dot + 1);
if (newpath == 0)
return 0;
strncpy (newpath, result, length);
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
size_t length = dir_len (path);
int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
char *newpath = xmalloc (length + append_dot + 1);
memcpy (newpath, path, length);
if (append_dot)
newpath[length++] = '.';
newpath[length] = 0;
@@ -149,7 +66,8 @@ dir_name (char const *path)
/*
Run the test like this (expect no output):
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
basename.c dirname.c xmalloc.c
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
BEGIN-DATA
@@ -165,7 +83,6 @@ END-DATA
# define MAX_BUFF_LEN 1024
# include <stdio.h>
# include <stdlib.h>
int
main ()
@@ -183,7 +100,6 @@ main ()
if (strcmp (result, expected_result))
printf ("%s: got %s, expected %s\n", path, result, expected_result);
}
exit (0);
return 0;
}
#endif

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1998 Free Software Foundation, Inc.
/* Copyright (C) 1998, 2001 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
@@ -25,7 +25,23 @@
# endif
# endif
char *
dir_name PARAMS ((const char *path));
# ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
# endif
# ifndef ISSLASH
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
# endif
# ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
# endif
char *base_name PARAMS ((char const *path));
char *dir_name PARAMS ((char const *path));
size_t base_len PARAMS ((char const *path));
size_t dir_len PARAMS ((char const *path));
int strip_trailing_slashes PARAMS ((char *path));
#endif /* not DIRNAME_H_ */

View File

@@ -115,11 +115,10 @@ extern int errno;
#endif
#include "save-cwd.h"
#include "dirname.h"
#include "error.h"
#include "quote.h"
void strip_trailing_slashes ();
#define CLEANUP_CWD \
do \
{ \
@@ -196,7 +195,6 @@ make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
}
/* Ensure that the directory ARGPATH exists.
Remove any trailing slashes from ARGPATH before calling this function.
Create any leading directories that don't already exist, with
permissions PARENT_MODE.

View File

@@ -1,5 +1,5 @@
/* obstack.c - subroutines used implicitly by object stack macros
Copyright (C) 1988-1994,96,97,98,99,2000 Free Software Foundation, Inc.
Copyright (C) 1988-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
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.
@@ -472,6 +472,7 @@ _obstack_memory_used (h)
# endif
static void
__attribute__ ((noreturn))
print_and_abort ()
{
fputs (_("memory exhausted"), stderr);

View File

@@ -55,18 +55,7 @@ char *malloc ();
char *strdup ();
#endif
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
#endif
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
#endif
#include "dirname.h"
#include "xalloc.h"
#include "path-concat.h"
@@ -88,8 +77,8 @@ path_concat (const char *dir, const char *base, char **base_in_result)
{
char *p;
char *p_concat;
size_t base_len;
size_t dir_len;
size_t baselen;
size_t dirlen;
if (!dir)
{
@@ -100,16 +89,16 @@ path_concat (const char *dir, const char *base, char **base_in_result)
}
/* DIR is not empty. */
base_len = strlen (base);
dir_len = strlen (dir);
baselen = base_len (base);
dirlen = strlen (dir);
p_concat = malloc (dir_len + base_len + 2);
p_concat = malloc (dirlen + baselen + 2);
if (!p_concat)
return 0;
p = mempcpy (p_concat, dir, dir_len);
p = mempcpy (p_concat, dir, dirlen);
if (dir_len > FILESYSTEM_PREFIX_LEN (dir))
if (FILESYSTEM_PREFIX_LEN (dir) < dirlen)
{
if (ISSLASH (*(p - 1)) && ISSLASH (*base))
--p;
@@ -120,7 +109,8 @@ path_concat (const char *dir, const char *base, char **base_in_result)
if (base_in_result)
*base_in_result = p;
memcpy (p, base, base_len + 1);
memcpy (p, base, baselen);
p[baselen] = '\0';
return p_concat;
}

View File

@@ -1,5 +1,5 @@
/* Declarations for GNU's read utmp module.
Copyright (C) 1992-2000 Free Software Foundation, Inc.
Copyright (C) 1992-2001 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
@@ -69,6 +69,9 @@
# undef UT_USER
# define UT_USER(Utmp) ((Utmp)->ut_name)
# endif
# if defined HAVE_STRUCT_UTMPX_UT_TYPE
# define UT_TYPE(Utmp) ((Utmp)->ut_type)
# endif
# else
@@ -79,6 +82,9 @@
# undef UT_USER
# define UT_USER(Utmp) Utmp->ut_name
# endif
# if defined HAVE_STRUCT_UTMP_UT_TYPE
# define UT_TYPE(Utmp) ((Utmp)->ut_type)
# endif
# endif

View File

@@ -5594,6 +5594,12 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
size2 = size1;
string1 = 0;
size1 = 0;
#ifdef MBS_SUPPORT
mbs_offset2 = mbs_offset1;
csize2 = csize1;
mbs_offset1 = NULL;
csize1 = 0;
#endif
}
end1 = string1 + size1;
end2 = string2 + size2;
@@ -5608,6 +5614,8 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
}
else
{
if (stop > csize1 + csize2)
stop = csize1 + csize2;
end_match_1 = end1;
mcnt = count_mbs_length(mbs_offset2, stop-csize1);
end_match_2 = string2 + mcnt;
@@ -7085,14 +7093,15 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
case wordbeg:
DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
&& (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
break;
goto fail;
case wordend:
DEBUG_PRINT1 ("EXECUTING wordend.\n");
if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
&& (!WORDCHAR_P (d) || AT_STRINGS_END (d)))
&& (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
break;
goto fail;

View File

@@ -30,7 +30,8 @@
# include <strings.h>
#endif
#include <xalloc.h>
#include "dirname.h"
#include "xalloc.h"
#ifndef HAVE_DECL_FREE
"this configure-time declaration test was not run"
@@ -39,8 +40,6 @@
void free ();
#endif
void strip_trailing_slashes ();
/* Rename the file SRC_PATH to DST_PATH, removing any trailing
slashes from SRC_PATH. Needed for SunOS 4.1.1_U1. */

View File

@@ -54,8 +54,6 @@ extern int errno;
# define _(Text) Text
#endif
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
#ifndef HAVE_DECL_FREE
"this configure-time declaration test was not run"
#endif
@@ -63,8 +61,6 @@ extern int errno;
void free ();
#endif
char *base_name PARAMS ((char const *));
#define SAME_INODE(Stat_buf_1, Stat_buf_2) \
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
&& (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
@@ -78,11 +74,11 @@ same_name (const char *source, const char *dest)
struct stat source_dir_stats;
struct stat dest_dir_stats;
char *source_dirname, *dest_dirname;
char *source_basename, *dest_basename;
size_t source_baselen, dest_baselen;
source_dirname = dir_name (source);
dest_dirname = dir_name (dest);
if (source_dirname == NULL || dest_dirname == NULL)
xalloc_die ();
if (stat (source_dirname, &source_dir_stats))
{
@@ -99,6 +95,13 @@ same_name (const char *source, const char *dest)
free (source_dirname);
free (dest_dirname);
return (SAME_INODE (source_dir_stats, dest_dir_stats)
&& STREQ (base_name (source), base_name (dest)));
if (! SAME_INODE (source_dir_stats, dest_dir_stats))
return 0;
source_basename = base_name (source);
dest_basename = base_name (dest);
source_baselen = base_len (source_basename);
dest_baselen = base_len (dest_basename);
return (source_baselen == dest_baselen
&& memcmp (source_basename, dest_basename, dest_baselen) == 0);
}

View File

@@ -421,40 +421,49 @@ static CHAR_T const month_name[][10] =
#endif
#ifdef emacs
# define my_strftime emacs_strftimeu
# define ut_argument , ut
# define ut_argument_spec int ut;
# define ut_argument_spec_iso , int ut
/* When compiling this file, GNU applications can #define my_strftime
to a symbol (typically nstrftime) to get an extended strftime with
extra arguments UT and NS. Emacs is a special case for now, but
this Emacs-specific code can be removed once Emacs's config.h
defines my_strftime. */
#if defined emacs && !defined my_strftime
# define my_strftime nstrftime
#endif
#ifdef my_strftime
# define extra_args , ut, ns
# define extra_args_spec int ut; int ns;
# define extra_args_spec_iso , int ut, int ns
#else
# ifdef COMPILE_WIDE
# define my_strftime wcsftime
# else
# define my_strftime strftime
# endif
# define ut_argument
# define ut_argument_spec
# define ut_argument_spec_iso
# define extra_args
# define extra_args_spec
# define extra_args_spec_iso
/* We don't have this information in general. */
# define ut 0
# define ns 0
#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 * ut_argument_spec_iso));
const struct tm * extra_args_spec_iso));
size_t
my_strftime (s, maxsize, format, tp ut_argument)
my_strftime (s, maxsize, format, tp extra_args)
CHAR_T *s;
size_t maxsize;
const CHAR_T *format;
const struct tm *tp;
ut_argument_spec
extra_args_spec
{
struct tm tmcopy;
tmcopy = *tp;
return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
return _strftime_copytm (s, maxsize, format, &tmcopy extra_args);
}
# undef my_strftime
# define my_strftime _strftime_copytm
@@ -468,12 +477,12 @@ static CHAR_T const month_name[][10] =
anywhere, so to determine how many characters would be
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
size_t
my_strftime (s, maxsize, format, tp ut_argument)
my_strftime (s, maxsize, format, tp extra_args)
CHAR_T *s;
size_t maxsize;
const CHAR_T *format;
const struct tm *tp;
ut_argument_spec
extra_args_spec
{
int hour12 = tp->tm_hour;
#ifdef _NL_CURRENT
@@ -810,9 +819,9 @@ my_strftime (s, maxsize, format, tp ut_argument)
{
CHAR_T *old_start = p;
size_t len = my_strftime (NULL, (size_t) -1, subfmt,
tp ut_argument);
tp extra_args);
add (len, my_strftime (p, maxsize - i, subfmt,
tp ut_argument));
tp extra_args));
if (to_uppcase)
while (old_start < p)
@@ -1044,6 +1053,21 @@ my_strftime (s, maxsize, format, tp ut_argument)
DO_NUMBER (2, tp->tm_mon + 1);
case L_('N'): /* GNU extension. */
if (modifier == L_('E'))
goto bad_format;
number_value = ns;
if (width != -1)
{
/* Take an explicit width less than 9 as a precision. */
int j;
for (j = width; j < 9; j++)
number_value /= 10;
}
DO_NUMBER (9, number_value);
case L_('n'): /* POSIX.2 extension. */
add (1, *p = L_('\n'));
break;
@@ -1368,15 +1392,15 @@ my_strftime (s, maxsize, format, tp ut_argument)
#ifdef emacs
/* For Emacs we have a separate interface which corresponds to the normal
strftime function and does not have the extra information whether the
TP arguments comes from a `gmtime' call or not. */
strftime function plus the ut argument, but without the ns argument. */
size_t
emacs_strftime (s, maxsize, format, tp)
emacs_strftimeu (s, maxsize, format, tp, ut)
char *s;
size_t maxsize;
const char *format;
const struct tm *tp;
int ut;
{
return my_strftime (s, maxsize, format, tp, 0);
return my_strftime (s, maxsize, format, tp, ut, 0);
}
#endif

View File

@@ -1,5 +1,5 @@
/* stripslash.c -- remove trailing slashes from a string
Copyright (C) 1990 Free Software Foundation, Inc.
/* stripslash.c -- remove redundant trailing slashes from a file name
Copyright (C) 1990, 2001 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
@@ -25,22 +25,21 @@
# include <strings.h>
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
#include "dirname.h"
/* Remove trailing slashes from PATH.
Return nonzero if a trailing slash was removed.
This is useful when using filename completion from a shell that
adds a "/" after directory names (such as tcsh and bash), because
the Unix rename and rmdir system calls return an "Invalid argument" error
when given a path that ends in "/" (except for the root directory). */
void
int
strip_trailing_slashes (char *path)
{
int last;
last = strlen (path) - 1;
while (0 < last && ISSLASH (path[last]))
path[last--] = '\0';
char *base = base_name (path);
char *base_lim = base + base_len (base);
int had_slash = *base_lim;
*base_lim = '\0';
return had_slash;
}

View File

@@ -1,3 +1,43 @@
2001-05-27 Jim Meyering <meyering@lucent.com>
* prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
Check for ut_type in struct utmp.
2001-05-22 Jim Meyering <meyering@lucent.com>
* strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
now that we use the package-supplied version unconditionally.
(jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
2001-05-21 Jim Meyering <meyering@lucent.com>
* regex.m4: Change a couple backticks to single quotes to avoid shell
syntax errors.
2001-05-19 Alexandre Duret-Lutz <duret_g@epita.fr>
* dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
2001-05-11 Paul Eggert <eggert@twinsun.com>
* m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
Don't bother to check library strftime, since
we'll be using our own my_strftime function anyway.
Define my_strftime instead of strftime.
2001-05-15 Jim Meyering <meyering@lucent.com>
* regex.m4: Use proper quoting so brackets appear in the test program.
Reported by, and with help from, Bruno Haible.
2001-05-13 Jim Meyering <meyering@lucent.com>
* jm-macros.m4 (major_t, minor_t): Define to unsigned int if undefined.
2000-11-26 Paul Eggert <eggert@twinsun.com>
* jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
2001-04-21 Jim Meyering <meyering@lucent.com>
* rmdir-errno.m4: Write to a new file, so that a restrictive umask

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
EXTRA_DIST = README Makefile.am.in \
afs.m4 \
assert.m4 \
@@ -197,19 +189,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = README ChangeLog Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits m4/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -221,7 +211,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -246,23 +240,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -271,11 +262,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -283,7 +274,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -297,13 +288,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
Makefile.am: Makefile.am.in
@@ -316,7 +311,6 @@ Makefile.am: Makefile.am.in
sed -n '/^##m4-files-end/,$$p' $< >> $@t
chmod a-w $@t
mv $@t $@
# 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,4 +1,4 @@
# serial 3
# serial 4
# Define some macros required for proper operation of code in lib/*.c
# on MSDOS/Windows systems.
@@ -7,19 +7,32 @@
AC_DEFUN(jm_AC_DOS,
[
# FIXME: this is incomplete. Add a compile-test that does something
# like this:
#if defined _WIN32 || defined __WIN32__ || defined __MSDOS__
AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
[
AC_TRY_COMPILE([],
[#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
neither MSDOS nor Windows
#endif],
[ac_cv_win_or_dos=yes],
[ac_cv_win_or_dos=no])
])
if test x"$ac_cv_win_or_dos" = xyes; then
ac_fs_accepts_drive_letter_prefix=1
ac_fs_backslash_is_file_name_separator=1
else
ac_fs_accepts_drive_letter_prefix=0
ac_fs_backslash_is_file_name_separator=0
fi
AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
[#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
# define FILESYSTEM_PREFIX_LEN(Filename) \
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
else
#else
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif])
ac_fs_accepts_drive_letter_prefix=0
AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
$ac_fs_accepts_drive_letter_prefix,
[Define on systems for which file names may have a so-called
@@ -33,7 +46,6 @@ else
# define ISSLASH(C) ((C) == '/')
#endif])
ac_fs_backslash_is_file_name_separator=0
AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
$ac_fs_backslash_is_file_name_separator,
[Define if the backslash character may also serve as a file name

View File

@@ -1,4 +1,4 @@
#serial 35 -*- autoconf -*-
#serial 37 -*- autoconf -*-
dnl Misc type-related macros for fileutils, sh-utils, textutils.
@@ -124,7 +124,6 @@ AC_DEFUN(jm_MACROS,
endpwent \
fchdir \
fdatasync \
fseeko \
ftime \
ftruncate \
getcwd \
@@ -294,6 +293,8 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
dnl This relies on the fact that autoconf 2.14a's implementation of
dnl AC_CHECK_TYPE checks includes unistd.h.
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(major_t, unsigned int)
AC_CHECK_TYPE(minor_t, unsigned int)
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])

View File

@@ -1,4 +1,4 @@
#serial 18
#serial 19
dnl These are the prerequisite macros for files in the lib/
dnl directories of the fileutils, sh-utils, and textutils packages.
@@ -109,6 +109,8 @@ $ac_includes_default
AC_CHECK_MEMBERS([struct utmp.ut_user],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmpx.ut_name],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmp.ut_name],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmpx.ut_type],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmp.ut_type],,,[$utmp_includes])
AC_LIBOBJ(readutmp)
fi
])

View File

@@ -1,4 +1,4 @@
#serial 9
#serial 10
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
@@ -30,9 +30,10 @@ AC_DEFUN(jm_INCLUDED_REGEX,
const char *s;
struct re_registers regs;
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
/* Add this third left square bracket, [, to balance the
three right ones below. Otherwise autoconf-2.14 chokes. */
/* These two brackets, '[[' and the one in the comment below serve
to quote the brackets (unbalanced) in the following line. */
s = re_compile_pattern ("a[[:]:]]b\n", 9, &regex);
/* This bracket ']' helps quote the unbalanced expression above. */
/* This should fail with _Invalid character class name_ error. */
if (!s)
exit (1);
@@ -45,7 +46,7 @@ AC_DEFUN(jm_INCLUDED_REGEX,
/* The following example is derived from a problem report
against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
s = re_compile_pattern ("[anù]*n", 7, &regex);
s = re_compile_pattern ("[[anù]]*n", 7, &regex);
if (s)
exit (1);

View File

@@ -1,4 +1,4 @@
#serial 15
#serial 16
dnl This macro is intended to be used solely in this file.
dnl These are the prerequisite macros for GNU's strftime.c replacement.
@@ -23,8 +23,6 @@ AC_DEFUN(_jm_STRFTIME_PREREQS,
[#include <time.h>])
])
dnl Determine if the strftime function has all the features of the GNU one.
dnl
dnl From Jim Meyering.
dnl
AC_DEFUN(jm_FUNC_GNU_STRFTIME,
@@ -35,125 +33,11 @@ AC_DEFUN(jm_FUNC_GNU_STRFTIME,
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_CHECK_HEADERS(sys/time.h)
AC_CACHE_CHECK([for working GNU strftime], jm_cv_func_working_gnu_strftime,
[AC_TRY_RUN(
[ /* Ulrich Drepper provided parts of the test program. */
#if STDC_HEADERS
# include <stdlib.h>
#endif
#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 int
compare (const char *fmt, const struct tm *tm, const char *expected)
{
char buf[99];
strftime (buf, 99, fmt, tm);
if (strcmp (buf, expected))
{
#ifdef SHOW_FAILURES
printf ("fmt: \"%s\", expected \"%s\", got \"%s\"\n",
fmt, expected, buf);
#endif
return 1;
}
return 0;
}
int
main ()
{
int n_fail = 0;
struct tm *tm;
time_t t = 738367; /* Fri Jan 9 13:06:07 1970 */
tm = gmtime (&t);
/* Undefine this in case the configure-time putenv test has defined it
to something else. The use we make of this function here doesn't
require the added functionality of the replacement one. */
#undef putenv
/* This is necessary to make strftime give consistent zone strings and
e.g., seconds since the epoch (%s). */
putenv ("TZ=GMT0");
#undef CMP
#define CMP(Fmt, Expected) n_fail += compare ((Fmt), tm, (Expected))
CMP ("%-m", "1"); /* GNU */
CMP ("%A", "Friday");
CMP ("%^A", "FRIDAY"); /* The ^ is a GNU extension. */
CMP ("%B", "January");
CMP ("%^B", "JANUARY");
CMP ("%C", "19"); /* POSIX.2 */
CMP ("%D", "01/09/70"); /* POSIX.2 */
CMP ("%F", "1970-01-09");
CMP ("%G", "1970"); /* GNU */
CMP ("%H", "13");
CMP ("%I", "01");
CMP ("%M", "06");
CMP ("%M", "06");
CMP ("%R", "13:06"); /* POSIX.2 */
CMP ("%S", "07");
CMP ("%T", "13:06:07"); /* POSIX.2 */
CMP ("%U", "01");
CMP ("%V", "02");
CMP ("%W", "01");
CMP ("%X", "13:06:07");
CMP ("%Y", "1970");
CMP ("%Z", "GMT");
CMP ("%_m", " 1"); /* GNU */
CMP ("%a", "Fri");
CMP ("%^a", "FRI");
CMP ("%b", "Jan");
CMP ("%^b", "JAN");
CMP ("%c", "Fri Jan 9 13:06:07 1970");
CMP ("%^c", "FRI JAN 9 13:06:07 1970");
CMP ("%d", "09");
CMP ("%e", " 9"); /* POSIX.2 */
CMP ("%g", "70"); /* GNU */
CMP ("%h", "Jan"); /* POSIX.2 */
CMP ("%^h", "JAN");
CMP ("%j", "009");
CMP ("%k", "13"); /* GNU */
CMP ("%l", " 1"); /* GNU */
CMP ("%m", "01");
CMP ("%n", "\n"); /* POSIX.2 */
CMP ("%p", "PM");
CMP ("%r", "01:06:07 PM"); /* POSIX.2 */
CMP ("%s", "738367"); /* GNU */
CMP ("%t", "\t"); /* POSIX.2 */
CMP ("%u", "5"); /* POSIX.2 */
CMP ("%w", "5");
CMP ("%x", "01/09/70");
CMP ("%y", "70");
CMP ("%z", "+0000"); /* GNU */
exit (n_fail ? 1 : 0);
}],
jm_cv_func_working_gnu_strftime=yes,
jm_cv_func_working_gnu_strftime=no,
dnl When crosscompiling, assume strftime is missing or broken.
jm_cv_func_working_gnu_strftime=no)
])
if test $jm_cv_func_working_gnu_strftime = no; then
AC_LIBOBJ(strftime)
AC_DEFINE_UNQUOTED(strftime, gnu_strftime,
[Define to gnu_strftime if the replacement function should be used.])
fi
AC_DEFINE([my_strftime], [nstrftime],
[Define to the name of the strftime replacement function.])
])
AC_DEFUN(jm_FUNC_STRFTIME,
[
_jm_STRFTIME_PREREQS
AC_REPLACE_FUNCS(strftime)
])

View File

@@ -13,24 +13,6 @@ the \fI\-f\fR or \fI\-\-force\fR option is not given,
.B rm
prompts the user for whether to remove the file. If the response
does not begin with `y' or `Y', the file is skipped.
.LP
GNU
.BR rm ,
like every program that uses the getopt function to parse its
arguments, lets you use the
.I \-\-
option to indicate that all following arguments are non-options. To
remove a file called `\-f' in the current directory, you could type
either
.RS
rm \-\- \-f
.RE
or
.RS
rm ./\-f
.RE
The Unix
.B rm
program's use of a single `\-' for this purpose predates the
development of the getopt standard syntax.
.SH OPTIONS
[SEE ALSO]
shred(1)

View File

@@ -1,3 +1,345 @@
2001-06-17 Jim Meyering <meyering@lucent.com>
* Makefile.maint: Factor out definitions specific to fileutils,
sh-utils, and textutils, so that other packages can use the framework.
Patch by Akim Demaille.
* Makefile.cfg: New file with package-specific definitions.
* GNUmakefile: Include Makefile.cfg.
* Makefile.am (EXTRA_DIST): Add Makefile.cfg.
2001-06-16 Jim Meyering <meyering@lucent.com>
* src/ls.c (main): Recheck global print_with_color after calling
parse_ls_color, since that function may have reset it.
Based on a patch from Richard Dawe.
2001-06-16 Jim Meyering <meyering@lucent.com>
* config.sub: Update from master repository.
* config.guess: Likewise.
2001-06-09 Jim Meyering <meyering@lucent.com>
* configure.in (ALL_LINGUAS): Add Turkish (tr).
2001-05-25 Jim Meyering <meyering@lucent.com>
* src/ls.c (print_long_format): Don't truncate user names
or group names that are longer than 8 characters.
Add definitions that let me factor the wget rule while still letting
me accommodate the fact that these files reside in several different
directories and come from different places.
* Makefile.maint (wget-files): Define.
(get-targets, *-local_dir, *-url_prefix): Likewise.
(target, url, local_file): Convenience variables.
($(get-targets)): The factored rule.
2001-05-24 Jim Meyering <meyering@lucent.com>
* src/ansi2knr.c: Update from master source.
* Makefile.maint (wget-update): Have wget write to a temporary file,
and replace the original only if wget succeeds.
Also get ansi2nkr.c.
(move-if-change): Define.
(wget-update): Use it in place of mv.
* src/ls.c: Use `#if D_TYPE_IN_DIRENT && defined DTTOIF' to
determine whether to enable the DT_INIT definition, not the less
portable `#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF'.
Reported by Eli Zaretskii.
* src/mkfifo.c (main): Remove quotes around %s.
The argument is already quoted via the quote function.
* src/mknod.c (main): Likewise.
Reported by Göran Uddeborg.
2001-05-21 Jim Meyering <meyering@lucent.com>
* Makefile.maint (wget-update): depcomp and missing are now in
automake's lib/ subdirectory.
2001-05-11 Paul Eggert <eggert@twinsun.com>
Add new --time-style option.
Change --full-time to be equivalent to --time-style=full-iso.
* NEWS, doc/omni-utils.texi: Describe this change.
* src/ls.c: Include "hard-locale.h".
(nstrftime): New decl.
(enum time_style): New enum.
(time_style_args, time_style_types): New constants.
(full_time): Remove.
(long_time_format): Initialize to POSIX defaults.
(TIME_STYLE_OPTION): New constant.
(long_options, decode_switches, usage): Add --time-style support.
(long_time_expected_width): Use nstrftime, not strftime.
(print_long_format): Likewise.
Increase initial size to match new full-iso time style.
* tests/ls/time-1: Unset QUOTING_STYLE and TIME_STYLE. Set TZ.
Adjust to change in full-time format.
Fix typo in failure messages (-a and -m were interchanged).
2001-05-20 Jim Meyering <meyering@lucent.com>
* doc/Makefile.am (EXTRA_DIST): Add constants.texi and doclicense.texi.
(info_TEXINFOS): s/fileutils/omni-utils/.
(check-texinfo): New rule.
(check): Depend on check-texinfo.
* doc/omni-utils.texi (uniq invocation): Document the new optional
arguments to the --all-repeated option.
Make all references to POSIX use @sc{posix}.
2001-05-19 Jim Meyering <meyering@lucent.com>
* doc/fileutils.texi: Remove.
* doc/omni-utils.texi: Change a few uses of `timezone' to `time zone'.
Reported by Stephen Eglen.
2001-05-16 Jim Meyering <meyering@lucent.com>
* Makefile.maint (my-distcheck): Remove work-around kludge and
associated comment, now that automake has ben fixed.
2001-05-12 Paul Eggert <eggert@twinsun.com>
Clean up some of the places where the code assumed that random
types like 'mode_t' fit into 'int', which POSIX doesn't guarantee.
* src/ls.c (struct fileinfo.linkmode): Now st_mode.
(print_color_indicator, print_name_with_quoting, print_type_indicator,
length_of_file_name_and_frills):
Use mode_t, not unsigned int, to store modes.
(dired_dump_obstack): Do not assume size fits in 'int'.
(get_link_name): readlink returns ssize_t, not int.
(make_link_path): Store buffer size as size_t, not int.
(print_long_format): Use unsigned long, not unsigned, to print
nlink_t, uid_t, gid_t, major_t, minor_t.
2001-05-13 Paul Eggert <eggert@sic.twinsun.com>
* src/mknod.c (main): Check for NODEV device only if NODEV is defined.
* src/system.h (NODEV): Remove, undoing previous change.
2001-05-13 Jim Meyering <meyering@lucent.com>
* src/remove.c (dir_name, dir_len): Define to different names
to avoid shadowing warnings due to new declarations from dirname.h.
* tests/Fetish.pm (run_tests): Fail if any test name is longer
than 12 bytes.
* tests/ls-2/tests: Shorten test names so the length of a
resulting file name doesn't exceed 14.
2001-05-12 Paul Eggert <eggert@twinsun.com>
* src/system.h (NODEV): New macro, if not already defined.
* src/mknod.c (main): Check for overflow when converting out
of uintmax_t. Do not assume that major_t and minor_t are no
wider than int. Check for makedev failures. Convert device
numbers via uintmax_t, not unsigned long, just in case.
Coalesce duplicate code in the block and character device
cases.
2001-05-11 Paul Eggert <eggert@twinsun.com>
Add new --dereference-command-line option.
-H now means this instead of meaning --si, as POSIX requires.
* NEWS, doc/omni-utils.texi: Document this.
* src/ls.c (enum Dereference_symlink): New type.
(dereference): New var, replacing trace_links, which was removed.
(long_options, main, decode_switches, gobble_file, usage):
Implement the changes.
* tests/ls-2/tests:
Rename slink-dir test to slink-dir-dF. Add new tests
slink-dir-F, slink-dir-dFH, slink-dir-dFL.
2001-05-11 Paul Eggert <eggert@twinsun.com>
dirname code cleanup. base_name now behaves more compatibly
with POSIX basename when given file names that have trailing
slashes, and similarly for dir_name. Add new primitives
base_len and dir_len. Put the directory-name-related decls
into dirname.h.
* src/chmod.c (strip_trailing_slashes): Remove; now in dirname.h.
* src/chown.c (strip_trailing_slashes): Likewise.
* src/cp.c (strip_trailing_slashes): Likewise.
* src/df.c (strip_trailing_slashes): Likewise.
* src/ln.c (strip_trailing_slashes): Likewise.
* src/mkdir.c (strip_trailing_slashes): Likewise.
* src/rm.c (strip_trailing_slashes): Likewise.
* src/rmdir.c (strip_trailing_slashes): Likewise.
* src/dircolors.c, src/ls.c, src/remove.c:
Include "dirname.h", to get base_name.
* src/cp.c (make_path_private): Use dir_len instead of
dir_name, and avoid an extra mealloc call.
* src/df.c (find_mount_point): No need to strip trailing
slashes before invoking new dir_name.
* src/mv.c: Include "dirname.h".
(strip_trailing_slashes_2): Remove; now done by
strip_trailing_slashes. All callers changed.
* src/sys2.h (base_name): Remove decl; now in dirname.h.
* src/copy.c (copy_internal): Remove the code that tested for NULL
dir_name return value. That can't happen.
2001-05-12 Jim Meyering <meyering@lucent.com>
* src/ls.c (usage): Wording changes related to -o, -n, and -g.
* doc/omni-utils.texi: Likewise.
From Paul Eggert.
2001-05-11 Paul Eggert <eggert@twinsun.com>
* src/chmod.c (mode_changed, change_file_mode):
There's no need to invoke both lstat and stat here, so call just
one of the two functions.
2001-05-11 Jim Meyering <meyering@lucent.com>
* doc/omni-utils.texi: New file. The union of fileutils.texi,
sh-utils.texi, and textutils.texi. Merged by Brian Youmans.
* src/shred.c (usage): Warn about backups and mirrors.
* doc/omni-utils.texi (shred invocation): Likewise.
From Nelson Beebe.
2001-05-09 Jim Meyering <meyering@lucent.com>
* src/ls.c (main): Don't set `format_needs_stat' for --recursive (-R),
because that would make `ls -RF dir' stat unnecessarily all of the
files in dir/ on some systems.
Similarly, don't set `format_needs_stat' for --dereference (-L),
because that would make `ls -RLF dir' stat unnecessarily all non-symlink
files in dir/ on some systems.
Instead, ...
(gobble_file): ... also stat a file if `trace_dirs' (-R) is set and its
type is unknown.
... also stat a file if `trace_links' (-L) is set and the file is a
symlink or its type is unknown.
(print_dir): Also recognize DT_REG and DT_LNK.
2001-05-07 Jim Meyering <meyering@lucent.com>
* src/chown.c (main): Fix thinko that made --from=... fail:
s/argv[optind]/optarg/. Reported by Andrew Pham.
* tests/chown: New directory.
* tests/chown/basic: New (root-only) test for the above.
* tests/cp/special-bits: Factor out the root-only test into this ...
* tests/root-only: ... new file.
* tests/Makefile.am (EXTRA_DIST): Add root-only.
(SUBDIRS): Add chown.
* tests/chown/Makefile.am: New file.
* configure.in (AC_OUTPUT): Add tests/chown/Makefile.
2001-05-05 Jim Meyering <meyering@lucent.com>
* src/ls.c (decode_switches): Complain if the envvar, QUOTING_STYLE,
is set to an invalid value.
Move some declarations of locals into scopes where they're used.
2001-05-02 Jim Meyering <meyering@lucent.com>
* doc/texinfo.tex: Update from master repository.
* config.sub: Likewise.
* config.guess: Likewise.
2001-05-01 Jim Meyering <meyering@lucent.com>
* Makefile.maint (tgz-size, xd-size): Compute sizes.
(announcement): Include sizes of .tar.gz and .xdelta files
in the announcement.
* src/ls.c (print_owner): New global variable.
(usage): Update the descriptions of -g.
(decode_switches): Honor the -g option (omit owner information),
now that POSIX specifies it.
(print_long_format): Don't print owner name if -g was specified.
Move declaration of `user_name' into the scope where it's used.
(print_group): Rename global from `inhibit_group'. Update all
uses accordingly.
* doc/fileutils.texi (What information is listed): Describe -g.
* TODO: Remove item for ls -g.
* src/ls.c (decode_switches): Make -n work just like -l, except
with numeric IDs, per POSIX. Before, to have any effect, -n had
to be used with -l. Reported by Dale Scheetz.
(usage): Update the description of -n.
Separate the descriptions of -n and --numeric-uid-gid.
Split string in --help output that had exceeded my limit of
2048 bytes.
2001-04-29 Jim Meyering <meyering@lucent.com>
* Version 4.1.
* configure: Regenerate using a further-patched copy of autoconf-2.49e
to work around a bug in its test for ranlib. This is the change to
autoconf's acgeneral.m4 that was made on 2001-04-24.
* README: Don't mention mvdir. It is no longer provided.
Don't mention HP/UX vs. du blocksize problem. It's long gone.
Remove note about how cp, mv, and ln couldn't make backups
of files with names of maximum length. Now they can do that.
Thank the people who have provided access to their systems
for portability testing.
Warn about and describe autoconf/automake version requirements.
Use a better URL for the GNU Coding Standards.
* man/rm.x: Refer to shred.
Remove the example showing how to remove `-foo', since that is now
in the --help output (and hence automatically included).
* src/rm.c (usage): Mention shred.
* src/shred.c (usage): Include in --help output the warning about
some of the filesystem types on which shred is not effective.
2001-04-25 Jim Meyering <meyering@lucent.com>
* Makefile.maint (my-distcheck): Add a comment.
2001-04-23 Jim Meyering <meyering@lucent.com>
* Version 4.0.45.
2001-04-22 Jim Meyering <meyering@lucent.com>
* src/ls.c (decode_switches): Ensure that -1 has no effect when it
follows -l, per POSIX. Reported by Ulrich Drepper.
* src/dd.c (usage): Mention that sync makes dd pad with spaces (rather
than NULs) when used with block or unblock.
(dd_copy): When using sync with either block or unblock,
pad with spaces. Reported by Dale Scheetz.
* tests/dd/skip-seek (block-sync-1): New test, for this. Based on
a report from Dale Scheetz.
* doc/fileutils.texi (dd invocation): Document it here, too.
* configure: Regenerate using a patched copy of autoconf-2.49e to
work around a bug in its test for a working memcmp function.
This is the change to autoconf's acfunctions.m4 that was made
on 2001-04-22.
* tests/ls/no-arg: New file.
* tests/ls/Makefile.am (TESTS): Add no-arg.
* src/ls.c (main): Fix off-by-one error introduced with last change.
2001-04-21 Jim Meyering <meyering@lucent.com>
* Version 4.0.44.

View File

@@ -1,4 +1,39 @@
Changes in release 4.1.0:
[4.1.1]
* ls no longer truncates user names or group names that are longer
than 8 characters.
* ls's new --dereference-command-line option causes it to dereference
symbolic links on the command-line only.
* ls -H now means the same as ls --dereference-command-line, as per POSIX.
* ls -g now acts like ls -l, except it does not display owner, as per POSIX.
* ls -n now implies -l, as per POSIX.
* ls can now display dates and times in one of four time styles:
- The `full-iso' time style gives full ISO-style time stamps like
`2001-05-14 23:45:56.477817180 -0700'.
- The 'iso' time style gives ISO-style time stamps like '2001-05-14 '
and '05-14 23:45'.
- The 'locale' time style gives locale-dependent time stamps like
'touko 14 2001' and 'touko 14 23:45' (in a Finnish locale).
- The 'posix-iso' time style gives traditional POSIX-locale
time stamps like 'May 14 2001' and 'May 14 23:45' unless the user
specifies a non-POSIX locale, in which case it uses ISO-style dates.
This is the default.
You can specify a time style with an option like --time-style='iso'
or with an environment variable like TIME_STYLE='iso'. GNU Emacs 21
and later can parse ISO dates, but older Emacs versions cannot, so
if you are using an older version of Emacs outside the default POSIX
locale, you may need to set TIME_STYLE="locale".
* --full-time is now an alias for "-l --time-style=full-iso".
Changes in release 4.1:
[4.0.45]
* dd conv=sync,block now pads only with spaces
* ls's -1 option no longer cancels the effect of a preceding -l
* regenerate configure using a patched version of autoconf-2.49e to work
around a bug in its test for a working memcmp function
* ls: fix off-by-one error introduced with the previous change
[4.0.44]
* ls: When given two or more arguments but the only one that exists is a
directory, don't treat it as if it were the only argument. Before,
@@ -83,7 +118,7 @@ Changes in release 4.1.0:
* ls is much more efficient on systems (e.g., linux-2.4.*) that store file
type information in directory entries.
* shred now automatically determines the size of each block device argument
* ls's date/time format strings are now local dependent
* ls's date/time format strings are now locale dependent
* mkdir, mknod, mkfifo, and chmod work better in conjunction with ACLs
* `cp --parents dir1/ dir2' no longer gets a failed assertion
* shred now determines the size of block devices like /dev/fd0

View File

@@ -1,3 +1,56 @@
2001-06-09 Jim Meyering <meyering@lucent.com>
(PIDSTR_DECL_AND_INIT): Define.
2001-06-05 Jim Meyering <meyering@lucent.com>
* configure.in (ALL_LINGUAS): Add Turkish (tr).
2001-05-27 Jim Meyering <meyering@lucent.com>
* src/dirname.c (main): Add `const' to declaration of local, `result'.
2001-04-01 Jim Meyering <meyering@lucent.com>
Add options to make `who' more POSIX compliant.
* who.c: Accept new options: --all (-a), --boot (-b), --dead (-d),
--login, --process (-p), --runlevel (-r), --short (-s), --time (-t),
--users (-u).
The -u option now produces POSIX-specified results and is the same as
the long option `--users'. --idle is no longer the same as -u.
(time_string, print_line, print_boottime, print_deadprocs, print_login,
print_initspawn, print_clockchange, print_runlevel): New functions.
(print_user): Renamed from print_entry and reworked.
(search_entries): Remove function.
(who_am_i): Likewise.
(usage): Describe new options.
(main): Handle new options.
Mostly from Michael Stone.
FIXME (remove this, later): This probably doesn't compile on any
type of system except Linux, due to the unprotected uses of e.g.,
utmp_ent->ut_exit.e_termination.
2001-05-11 Paul Eggert <eggert@twinsun.com>
dirname code cleanup. base_name now behaves more compatibly
with POSIX basename when given file names that have trailing
slashes, and similarly for dir_name. Add new primitives
base_len and dir_len. Put the directory-name-related decls
into dirname.h.
* basename.c: Include "dirname.h".
(base_name, strip_trailing_slashes): Remove decls; now in dirname.h.
(main): Use base_len instead of strip_trailing_slashes to strip
trailing slashes.
* dirname.c (strip_trailing_slashes): Remove decl;
now in dirname.h.
(main): Use dir_len rather than dir_name_r.
* su.c: Include "dirname.h".
(base_name): Remove decl; now in dirname.h.
2001-04-20 Jim Meyering <meyering@lucent.com>
* doc/sh-utils.texi (false invocation): Describe how --help and
@@ -15,6 +68,19 @@
* doc/sh-utils.texi (date invocation): Correct the description of how
date works when given no format. Reported by Ole Laursen.
* src/factor.c: Include wheel-size.h.
(WHEEL_START): Adjust definition.
(wheel_tab[]): Remove body of definition.
Include generated file, wheel.h, instead.
* src/wheel-gen.pl: New file.
* src/Makefile.am (noinst_HEADERS): Add wheel.h wheel-size.h.
(EXTRA_DIST): Add wheel-gen.pl.
(PERL): Define.
(wheel-size.h, wheel.h): New rules.
(BUILT_SOURCES): Add wheel.h and wheel-size.h.
(MAINTAINERCLEANFILES): Define.
2001-03-09 Jim Meyering <meyering@lucent.com>
* Makefile.maint (my_distdir): Define new variable, and use this

View File

@@ -1,11 +1,11 @@
Changes in release 2.1
[2.0.12]
* date -d 'last friday' print a date/time that was one hour off
* date -d 'last friday' would print a date/time that was one hour off
(e.g., 23:00 on *thursday* rather than 00:00 of the preceding friday)
when run such that the current time and the target date/time fall on
opposite sides of a daylight savings time transition.
This problem arises only with relative date strings like `last monday'.
It is not a problem with strings that include absolute dates.
This problem arose only with relative date strings like `last monday'.
It was not a problem with strings that include absolute dates.
[2.0.11]
* setting the date now works properly, even when using -u
* `date -f - < /dev/null' no longer dumps core

View File

@@ -1,3 +1,74 @@
2001-06-10 Jim Meyering <meyering@lucent.com>
* tests/sort/Test.pm: Add a test based on a report from Herbert Xu.
2001-05-20 Jim Meyering <meyering@lucent.com>
* src/uniq.c: Rename new option values: s/all/precede/ and
s/minimum/separate/.
* tests/uniq/Test.pm: Reflect the above renamings.
2001-05-12 Bruno Haible <haible@clisp.cons.org>
* src/tail.c (parse_obsolescent_option): Accept a b suffix.
2001-05-19 Jim Meyering <meyering@lucent.com>
msgmerge-0.10.37 complains about some `invalid multibyte sequences.'
* po/el.po: Remove the offending entries.
* po/ko.po: Likewise.
* po/zh.po: Likewise.
2001-05-19 Jim Meyering <meyering@lucent.com>
Support new modes for uniq's --all-repeated option.
The default behavior is unchanged.
* src/uniq.c: Include argmatch.h.
(usage): Update.
(check_file): Implement it.
(main): Handle new, optional arguments.
* tests/uniq/Test.pm: New tests for the above.
Patch by Padraig Brady.
2001-05-12 Bruno Haible <haible@clisp.cons.org>
* src/tail.c (parse_obsolescent_option): Use t_count_lines, not
count_lines, in error message.
2001-05-05 Jim Meyering <meyering@lucent.com>
* src/comm.c (usage): Correct description of -3.
Reported by Soeren Sonnenburg.
2001-04-22 Jim Meyering <meyering@lucent.com>
* Version 2.0.14.
* configure: Regenerate using a patched copy of autoconf-2.49e to
work around a bug in its test for a working memcmp function.
2001-03-28 Paul Eggert <eggert@twinsun.com>
* src/cksum.c: Fix bugs when computing length of large files.
Add overflow and write error checks. Use uint_fast32_t, not
unsigned long, to do checksum calculation, as C99 says
uint_fast32_t should be no slower and might be faster.
Include <stdio.h> and "system.h" even if CRCTAB is defined,
so that the code will compile if CRCTAB is defined.
Include "human.h" if CRCTAB is not defined.
(uint_fast32_t): Define if it appears that stdint.h didn't.
(BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long,
for checksums.
(fill_r, remainder, main): Use ANSI prototypes.
(fill_r, remainder, main): Omit duplicate code.
(main): Use uintmax_t, not unsigned long, for file lengths.
Use size_t, not long, for result of fread.
Check for overflow when computing file lengths.
Check for write error immediately after printing a line, so that
we don't write to stdout indefinitely after an error.
2001-04-14 Paul Eggert <eggert@twinsun.com>
* src/sort.c (default_sort_size): Leave a 1/16 margin for RSS.

View File

@@ -1,4 +1,16 @@
Changes in release 2.1
[2.0.15]
* uniq's --all-repeated option has new modes to delimit groups
of duplicate lines: --all-repeated={precede,separate,none(default)}
[2.0.14]
* sort now accepts long options like "--reverse" and "--".
* sort now checks option syntax as POSIX requires, except that (as usual
for GNU) options can follow file names unless POSIXLY_CORRECT is set.
For example, invalid positional combinations like "sort +1 -r -2" are
now rejected as per POSIX.
* The next POSIX standard will require that obsolescent 'sort'
positional options like +1 be treated as file names, not options.
Please use 'sort -k' instead.
[2.0.13]
* pr accepts new -D or --date option, to specify date format.
* The following changes are required by POSIX:

View File

@@ -1,6 +1,6 @@
/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */
/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
/*$Id: ansi2knr.c,v 1.14 1999/04/13 14:44:33 meyering Exp $*/
/*$Id: ansi2knr.c,v 1.15 2001/05/24 21:58:56 meyering Exp $*/
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
/*
@@ -37,21 +37,21 @@ program under the GPL.
* There are no error messages.
*
* ansi2knr recognizes function definitions by seeing a non-keyword
* identifier at the left margin, followed by a left parenthesis,
* with a right parenthesis as the last character on the line,
* and with a left brace as the first token on the following line
* (ignoring possible intervening comments), except that a line
* identifier at the left margin, followed by a left parenthesis, with a
* right parenthesis as the last character on the line, and with a left
* brace as the first token on the following line (ignoring possible
* intervening comments and/or preprocessor directives), except that a line
* consisting of only
* identifier1(identifier2)
* will not be considered a function definition unless identifier2 is
* the word "void", and a line consisting of
* identifier1(identifier2, <<arbitrary>>)
* will not be considered a function definition.
* ansi2knr will recognize a multi-line header provided
* that no intervening line ends with a left or right brace or a semicolon.
* These algorithms ignore whitespace and comments, except that
* the function name must be the first thing on the line.
* The following constructs will confuse it:
* ansi2knr will recognize a multi-line header provided that no intervening
* line ends with a left or right brace or a semicolon. These algorithms
* ignore whitespace, comments, and preprocessor directives, except that
* the function name must be the first thing on the line. The following
* constructs will confuse it:
* - Any other construct that starts at the left margin and
* follows the above syntax (such as a macro or function call).
* - Some macros that tinker with the syntax of function headers.
@@ -61,6 +61,27 @@ program under the GPL.
* The original and principal author of ansi2knr is L. Peter Deutsch
* <ghost@aladdin.com>. Other authors are noted in the change history
* that follows (in reverse chronological order):
lpd 2000-04-12 backs out Eggert's changes because of bugs:
- concatlits didn't declare the type of its bufend argument;
- concatlits didn't't recognize when it was inside a comment;
- scanstring could scan backward past the beginning of the string; when
- the check for \ + newline in scanstring was unnecessary.
2000-03-05 Paul Eggert <eggert@twinsun.com>
Add support for concatenated string literals.
* ansi2knr.c (concatlits): New decl.
(main): Invoke concatlits to concatenate string literals.
(scanstring): Handle backslash-newline correctly. Work with
character constants. Fix bug when scanning backwards through
backslash-quote. Check for unterminated strings.
(convert1): Parse character constants, too.
(appendline, concatlits): New functions.
* ansi2knr.1: Document this.
lpd 1999-08-17 added code to allow preprocessor directives
wherever comments are allowed
lpd 1999-04-12 added minor fixes from Pavel Roskin
<pavel_roskin@geocities.com> for clean compilation with
gcc -W -Wall
@@ -196,6 +217,8 @@ program under the GPL.
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
/* Forward references */
char *ppdirforward();
char *ppdirbackward();
char *skipspace();
char *scanstring();
int writeblanks();
@@ -298,7 +321,7 @@ f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
goto wl;
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
goto wl;
switch ( *skipspace(more, 1) )
switch ( *skipspace(ppdirforward(more), 1) )
{
case '{':
/* Definitely a function header. */
@@ -349,32 +372,70 @@ wl: fputs(buf, out);
return 0;
}
/* Skip over whitespace and comments, in either direction. */
/*
* Skip forward or backward over one or more preprocessor directives.
*/
char *
ppdirforward(p)
char *p;
{
for (; *p == '#'; ++p) {
for (; *p != '\r' && *p != '\n'; ++p)
if (*p == 0)
return p;
if (*p == '\r' && p[1] == '\n')
++p;
}
return p;
}
char *
ppdirbackward(p, limit)
char *p;
char *limit;
{
char *np = p;
for (;; p = --np) {
if (*np == '\n' && np[-1] == '\r')
--np;
for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
if (np[-1] == 0)
return np;
if (*np != '#')
return p;
}
}
/*
* Skip over whitespace, comments, and preprocessor directives,
* in either direction.
*/
char *
skipspace(p, dir)
register char *p;
register int dir; /* 1 for forward, -1 for backward */
{ for ( ; ; )
{ while ( is_space(*p) )
p += dir;
if ( !(*p == '/' && p[dir] == '*') )
break;
p += dir; p += dir;
while ( !(*p == '*' && p[dir] == '/') )
{ if ( *p == 0 )
return p; /* multi-line comment?? */
p += dir;
}
p += dir; p += dir;
}
return p;
char *p;
int dir; /* 1 for forward, -1 for backward */
{
for ( ; ; ) {
while ( is_space(*p) )
p += dir;
if ( !(*p == '/' && p[dir] == '*') )
break;
p += dir; p += dir;
while ( !(*p == '*' && p[dir] == '/') ) {
if ( *p == 0 )
return p; /* multi-line comment?? */
p += dir;
}
p += dir; p += dir;
}
return p;
}
/* Scan over a quoted string, in either direction. */
char *
scanstring(p, dir)
register char *p;
register int dir;
char *p;
int dir;
{
for (p += dir; ; p += dir)
if (*p == '"' && p[-dir] != '\\')
@@ -412,14 +473,14 @@ writeblanks(start, end)
int
test1(buf)
char *buf;
{ register char *p = buf;
{ char *p = buf;
char *bend;
char *endfn;
int contin;
if ( !isidfirstchar(*p) )
return 0; /* no name at left margin */
bend = skipspace(buf + strlen(buf) - 1, -1);
bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
switch ( *bend )
{
case ';': contin = 0 /*2*/; break;
@@ -498,7 +559,7 @@ convert1(buf, out, header, convert_varargs)
int header; /* Boolean */
int convert_varargs; /* Boolean */
{ char *endfn;
register char *p;
char *p;
/*
* The breaks table contains pointers to the beginning and end
* of each argument.

View File

@@ -1,5 +1,5 @@
/* basename -- strip directory and suffix from filenames
Copyright (C) 1990-1997, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1990-1997, 1999, 2000, 2001 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
@@ -31,6 +31,7 @@
#include "system.h"
#include "long-options.h"
#include "dirname.h"
#include "error.h"
#include "closeout.h"
@@ -39,9 +40,6 @@
#define AUTHORS "FIXME unknown"
char *base_name ();
void strip_trailing_slashes ();
/* The name this program was run with. */
char *program_name;
@@ -118,9 +116,8 @@ main (int argc, char **argv)
usage (1);
}
strip_trailing_slashes (argv[1]);
name = base_name (argv[1]);
name[base_len (name)] = '\0';
if (argc == 3)
remove_suffix (name, argv[2]);

View File

@@ -23,6 +23,7 @@
#include <sys/types.h>
#include "system.h"
#include "dirname.h"
#include "error.h"
#include "filemode.h"
#include "modechange.h"
@@ -53,8 +54,6 @@ enum Verbosity
V_off
};
void strip_trailing_slashes ();
static int change_dir_mode PARAMS ((const char *dir,
const struct mode_change *changes,
const struct stat *statp));
@@ -100,23 +99,13 @@ mode_changed (const char *file, mode_t old_mode)
{
struct stat new_stats;
if (lstat (file, &new_stats))
if (stat (file, &new_stats))
{
if (force_silent == 0)
error (0, errno, _("getting new attributes of %s"), quote (file));
return 0;
}
#ifdef S_ISLNK
if (S_ISLNK (new_stats.st_mode)
&& stat (file, &new_stats))
{
if (force_silent == 0)
error (0, errno, _("getting new attributes of %s"), quote (file));
return 0;
}
#endif
return old_mode != new_stats.st_mode;
}
@@ -165,25 +154,16 @@ change_file_mode (const char *file, const struct mode_change *changes,
int fail;
int saved_errno;
if (lstat (file, &file_stats))
if (deref_symlink ? stat (file, &file_stats) : lstat (file, &file_stats))
{
if (force_silent == 0)
error (0, errno, _("getting attributes of %s"), quote (file));
return 1;
}
#ifdef S_ISLNK
if (S_ISLNK (file_stats.st_mode))
{
if (! deref_symlink)
return 0;
else
if (stat (file, &file_stats))
{
if (force_silent == 0)
error (0, errno, _("getting attributes of %s"), quote (file));
return 1;
}
}
return 0;
#endif
newmode = mode_adjust (file_stats.st_mode, changes);

View File

@@ -34,6 +34,7 @@
#include <getopt.h>
#include "system.h"
#include "dirname.h"
#include "error.h"
#include "lchown.h"
#include "quote.h"
@@ -56,7 +57,6 @@ struct group *getgrgid ();
#endif
char *parse_user_spec ();
void strip_trailing_slashes ();
/* The name the program was run with. */
char *program_name;
@@ -173,11 +173,11 @@ main (int argc, char **argv)
case FROM_OPTION:
{
char *u_dummy, *g_dummy;
const char *e = parse_user_spec (argv[optind],
const char *e = parse_user_spec (optarg,
&old_uid, &old_gid,
&u_dummy, &g_dummy);
if (e)
error (1, 0, "%s: %s", quote (argv[optind]), e);
error (1, 0, "%s: %s", quote (optarg), e);
break;
}
case 'R':

View File

@@ -47,12 +47,17 @@
#define AUTHORS "Q. Frank Xia"
#include <stdio.h>
#include "system.h"
#if !defined UINT_FAST32_MAX && !defined uint_fast32_t
# define uint_fast32_t unsigned int
#endif
#ifdef CRCTAB
# include <stdio.h>
# define BIT(x) ( (unsigned long)1 << (x) )
# define SBIT BIT(31)
# define BIT(x) ((uint_fast32_t) 1 << (x))
# define SBIT BIT (31)
/* The generating polynomial is
@@ -61,47 +66,48 @@
The i bit in GEN is set if X^i is a summand of G(X) except X^32. */
# define GEN (BIT(26)|BIT(23)|BIT(22)|BIT(16)|BIT(12)|BIT(11)|BIT(10)\
|BIT(8) |BIT(7) |BIT(5) |BIT(4) |BIT(2) |BIT(1) |BIT(0));
# define GEN (BIT (26) | BIT (23) | BIT (22) | BIT (16) | BIT (12) \
| BIT (11) | BIT (10) | BIT (8) | BIT (7) | BIT (5) \
| BIT (4) | BIT (2) | BIT (1) | BIT (0))
static unsigned long r[8];
static uint_fast32_t r[8];
static void
fill_r ()
fill_r (void)
{
int i;
r[0] = GEN;
for (i = 1; i < 8; i++)
r[i] = (r[i - 1] & SBIT) ? (r[i - 1] << 1) ^ r[0] : r[i - 1] << 1;
r[i] = (r[i - 1] << 1) ^ ((r[i - 1] & SBIT) ? GEN : 0);
}
static unsigned long
remainder (m)
int m;
static uint_fast32_t
remainder (int m)
{
unsigned long rem = 0;
uint_fast32_t rem = 0;
int i;
for (i = 0; i < 8; i++)
if (BIT (i) & m)
rem = rem ^ r[i];
rem ^= r[i];
return rem & 0xFFFFFFFF; /* Make it run on 64-bit machine. */
}
int
main ()
main (void)
{
int i;
fill_r ();
printf ("unsigned long crctab[256] = {\n 0x0");
printf ("static uint_fast32_t crctab[256] =\n{\n 0x0");
for (i = 0; i < 51; i++)
{
printf (",\n 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X",
remainder (i * 5 + 1), remainder (i * 5 + 2), remainder (i * 5 + 3),
remainder (i * 5 + 4), remainder (i * 5 + 5));
remainder (i * 5 + 1), remainder (i * 5 + 2),
remainder (i * 5 + 3), remainder (i * 5 + 4),
remainder (i * 5 + 5));
}
printf ("\n};\n");
exit (EXIT_SUCCESS);
@@ -109,13 +115,12 @@ main ()
#else /* !CRCTAB */
# include <stdio.h>
# include <getopt.h>
# include <sys/types.h>
# include "system.h"
# include "closeout.h"
# include "long-options.h"
# include "error.h"
# include "human.h"
/* Number of bytes to read at once. */
# define BUFLEN (1 << 16)
@@ -128,7 +133,7 @@ static struct option const long_options[] =
{0, 0, 0, 0}
};
static unsigned long const crctab[256] =
static uint_fast32_t crctab[256] =
{
0x0,
0x04C11DB7, 0x09823B6E, 0x0D4326D9, 0x130476DC, 0x17C56B6B,
@@ -196,10 +201,12 @@ static int
cksum (const char *file, int print_name)
{
unsigned char buf[BUFLEN];
unsigned long crc = 0;
long length = 0;
long bytes_read;
uint_fast32_t crc = 0;
uintmax_t length = 0;
size_t bytes_read;
register FILE *fp;
char hbuf[LONGEST_HUMAN_READABLE + 1];
char *hp;
if (STREQ (file, "-"))
{
@@ -223,9 +230,11 @@ cksum (const char *file, int print_name)
{
unsigned char *cp = buf;
if (length + bytes_read < length)
error (EXIT_FAILURE, 0, _("%s: file too long"), file);
length += bytes_read;
while (bytes_read--)
crc = (crc << 8) ^ crctab[((crc >> 24) ^ *(cp++)) & 0xFF];
crc = (crc << 8) ^ crctab[((crc >> 24) ^ *cp++) & 0xFF];
}
if (ferror (fp))
@@ -242,19 +251,20 @@ cksum (const char *file, int print_name)
return -1;
}
bytes_read = length;
while (bytes_read > 0)
{
crc = (crc << 8) ^ crctab[((crc >> 24) ^ bytes_read) & 0xFF];
bytes_read >>= 8;
}
hp = human_readable (length, hbuf, 1, 1);
for (; length; length >>= 8)
crc = (crc << 8) ^ crctab[((crc >> 24) ^ length) & 0xFF];
crc = ~crc & 0xFFFFFFFF;
printf ("%lu %ld", crc, length);
if (print_name)
printf (" %s", file);
putchar ('\n');
printf ("%u %s %s\n", (unsigned) crc, hp, file);
else
printf ("%u %s\n", (unsigned) crc, hp);
if (ferror (stdout))
error (EXIT_FAILURE, errno, "-: %s", _("write error"));
return 0;
}
@@ -313,16 +323,12 @@ main (int argc, char **argv)
}
}
if (optind >= argc)
{
if (cksum ("-", 0) < 0)
errors = 1;
}
if (optind == argc)
errors |= cksum ("-", 0);
else
{
for (i = optind; i < argc; i++)
if (cksum (argv[i], 1) < 0)
errors = 1;
errors |= cksum (argv[i], 1);
}
if (have_read_stdin && fclose (stdin) == EOF)

View File

@@ -1,5 +1,5 @@
/* comm -- compare two sorted files line by line.
Copyright (C) 86, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 86, 90, 91, 1995-2001 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
@@ -81,7 +81,7 @@ Compare sorted files LEFT_FILE and RIGHT_FILE line by line.\n\
\n\
-1 suppress lines unique to left file\n\
-2 suppress lines unique to right file\n\
-3 suppress lines unique to both files\n\
-3 suppress lines that appear in both files\n\
--help display this help and exit\n\
--version output version information and exit\n\
"));

View File

@@ -937,8 +937,6 @@ copy_internal (const char *src_path, const char *dst_path,
int in_current_dir;
dst_parent = dir_name (dst_path);
if (dst_parent == NULL)
xalloc_die ();
in_current_dir = (STREQ (".", dst_parent)
/* If either stat call fails, it's ok not to report

View File

@@ -77,8 +77,6 @@ enum
UNLINK_DEST_BEFORE_OPENING
};
void strip_trailing_slashes ();
/* Initial number of entries in each hash table entry's table of inodes. */
#define INITIAL_HASH_MODULE 100
@@ -342,18 +340,18 @@ make_path_private (const char *const_dirpath, int src_offset, int mode,
struct stat stats;
char *dirpath; /* A copy of CONST_DIRPATH we can change. */
char *src; /* Source name in `dirpath'. */
char *tmp_dst_dirname; /* Leading path of `dirpath', malloc. */
char *dst_dirname; /* Leading path of `dirpath', alloca. */
char *dst_dirname; /* Leading path of `dirpath'. */
size_t dirlen; /* Length of leading path of `dirpath'. */
dirpath = (char *) alloca (strlen (const_dirpath) + 1);
strcpy (dirpath, const_dirpath);
src = dirpath + src_offset;
tmp_dst_dirname = dir_name (dirpath);
dst_dirname = (char *) alloca (strlen (tmp_dst_dirname) + 1);
strcpy (dst_dirname, tmp_dst_dirname);
free (tmp_dst_dirname);
dirlen = dir_len (dirpath);
dst_dirname = (char *) alloca (dirlen + 1);
memcpy (dst_dirname, dirpath, dirlen);
dst_dirname[dirlen] = '\0';
*attr_list = NULL;

View File

@@ -321,7 +321,8 @@ Each KEYWORD may be:\n\
ucase change lower case to upper case\n\
swab swap every pair of input bytes\n\
noerror continue after read errors\n\
sync pad every input block with NULs to ibs-size\n\
sync pad every input block with NULs to ibs-size; when used\n\
with block or unblock, pad with spaces rather than NULs\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
}
@@ -945,7 +946,7 @@ dd_copy (void)
{
/* FIXME: this loses for
% ./dd if=dd seek=1 |:
./dd: standard output: Bad file number
./dd: standard output: Bad file descriptor
0+0 records in
0+0 records out
*/
@@ -965,7 +966,9 @@ dd_copy (void)
whatever data we are able to read is followed by zeros.
This minimizes data loss. */
if ((conversions_mask & C_SYNC) && (conversions_mask & C_NOERROR))
memset ((char *) ibuf, 0, input_blocksize);
memset ((char *) ibuf,
(conversions_mask & (C_BLOCK | C_UNBLOCK)) ? ' ' : '\0',
input_blocksize);
nread = safe_read (STDIN_FILENO, ibuf, input_blocksize);
@@ -1004,7 +1007,8 @@ dd_copy (void)
{
if (!(conversions_mask & C_NOERROR))
/* If C_NOERROR, we zeroed the block before reading. */
memset ((char *) (ibuf + n_bytes_read), 0,
memset ((char *) (ibuf + n_bytes_read),
(conversions_mask & (C_BLOCK | C_UNBLOCK)) ? ' ' : '\0',
input_blocksize - n_bytes_read);
n_bytes_read = input_blocksize;
}

View File

@@ -48,7 +48,6 @@
#define AUTHORS \
"Torbjorn Granlund, David MacKenzie, Larry McVoy, and Paul Eggert"
void strip_trailing_slashes ();
char *xgetcwd ();
/* Name this program was run with. */
@@ -454,14 +453,8 @@ find_mount_point (const char *file, const struct stat *file_stat)
else
/* FILE is some other kind of file, we need to use its directory. */
{
int rv;
char *tmp = xstrdup (file);
char *dir;
strip_trailing_slashes (tmp);
dir = dir_name (tmp);
free (tmp);
rv = chdir (dir);
char *dir = dir_name (file);
int rv = chdir (dir);
free (dir);
if (rv < 0)

View File

@@ -27,6 +27,7 @@
#include "system.h"
#include "dircolors.h"
#include "dirname.h"
#include "error.h"
#include "getline.h"
#include "obstack.h"

View File

@@ -33,8 +33,6 @@
#define AUTHORS "David MacKenzie and Jim Meyering"
void strip_trailing_slashes ();
/* The name this program was run with. */
char *program_name;
@@ -66,7 +64,9 @@ output `.' (meaning the current directory).\n\
int
main (int argc, char **argv)
{
char *result;
static char const dot = '.';
char const *result;
size_t len;
program_name = argv[0];
setlocale (LC_ALL, "");
@@ -92,11 +92,17 @@ main (int argc, char **argv)
usage (1);
}
result = dir_name (argv[1]);
if (result == NULL)
xalloc_die ();
puts (result);
free (result);
result = argv[1];
len = dir_len (result);
if (! len)
{
result = &dot;
len = 1;
}
fwrite (result, 1, len, stdout);
putchar ('\n');
exit (0);
}

View File

@@ -51,33 +51,13 @@
for those primes and to jump onto the wheel. For more information, see
http://www.utm.edu/research/primes/glossary/WheelFactorization.html */
static const unsigned int wheel_tab[] = {
/* lead in: */ 1, 2, 2, 4, 2, /* and the periodic tail: */
4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4,
2, 4, 2, 4,14, 4, 6, 2,10, 2, 6, 6, 4, 2, 4, 6, 2,10, 2, 4,
2,12,10, 2, 4, 2, 4, 6, 2, 6, 4, 6, 6, 6, 2, 6, 4, 2, 6, 4,
6, 8, 4, 2, 4, 6, 8, 6,10, 2, 4, 6, 2, 6, 6, 4, 2, 4, 6, 2,
6, 4, 2, 6,10, 2,10, 2, 4, 2, 4, 6, 8, 4, 2, 4,12, 2, 6, 4,
2, 6, 4, 6,12, 2, 4, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6,10, 2,
4, 6, 2, 6, 4, 2, 4, 2,10, 2,10, 2, 4, 6, 6, 2, 6, 6, 4, 6,
6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 6, 4, 8, 6, 4, 6, 2, 4, 6,
8, 6, 4, 2,10, 2, 6, 4, 2, 4, 2,10, 2,10, 2, 4, 2, 4, 8, 6,
4, 2, 4, 6, 6, 2, 6, 4, 8, 4, 6, 8, 4, 2, 4, 2, 4, 8, 6, 4,
6, 6, 6, 2, 6, 6, 4, 2, 4, 6, 2, 6, 4, 2, 4, 2,10, 2,10, 2,
6, 4, 6, 2, 6, 4, 2, 4, 6, 6, 8, 4, 2, 6,10, 8, 4, 2, 4, 2,
4, 8,10, 6, 2, 4, 8, 6, 6, 4, 2, 4, 6, 2, 6, 4, 6, 2,10, 2,
10, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 6, 6, 4, 6, 8,
4, 2, 4, 2, 4, 8, 6, 4, 8, 4, 6, 2, 6, 6, 4, 2, 4, 6, 8, 4,
2, 4, 2,10, 2,10, 2, 4, 2, 4, 6, 2,10, 2, 4, 6, 8, 6, 4, 2,
6, 4, 6, 8, 4, 6, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6, 6, 4, 6,
6, 2, 6, 6, 4, 2,10, 2,10, 2, 4, 2, 4, 6, 2, 6, 4, 2,10, 6,
2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2,12, 6, 4, 6, 2, 4, 6, 2,
12, 4, 2, 4, 8, 6, 4, 2, 4, 2,10, 2,10, 6, 2, 4, 6, 2, 6, 4,
2, 4, 6, 6, 2, 6, 4, 2,10, 6, 8, 6, 4, 2, 4, 8, 6, 4, 6, 2,
4, 6, 2, 6, 6, 6, 4, 6, 2, 6, 4, 2, 4, 2,10,12, 2, 4, 2,10,
2, 6, 4, 2, 4, 6, 6, 2,10, 2, 6, 4,14, 4, 2, 4, 2, 4, 8, 6,
4, 6, 2, 4, 6, 2, 6, 6, 4, 2, 4, 6, 2, 6, 4, 2, 4,12, 2,12};
#define WHEEL_START (wheel_tab + 5)
#include "wheel-size.h" /* For the definition of WHEEL_SIZE. */
static const unsigned int wheel_tab[] =
{
#include "wheel.h"
};
#define WHEEL_START (wheel_tab + WHEEL_SIZE)
#define WHEEL_END (wheel_tab + (sizeof wheel_tab / sizeof wheel_tab[0]))
/* The name this program was run with. */

View File

@@ -29,6 +29,7 @@
#include "system.h"
#include "same.h"
#include "backupfile.h"
#include "dirname.h"
#include "error.h"
#include "quote.h"
@@ -86,7 +87,6 @@ int symlink ();
int isdir ();
int yesno ();
void strip_trailing_slashes ();
/* The name by which the program was run, for error messages. */
char *program_name;

405
src/ls.c
View File

@@ -107,7 +107,9 @@ int wcwidth ();
#include <fnmatch.h>
#include "argmatch.h"
#include "dirname.h"
#include "error.h"
#include "hard-locale.h"
#include "human.h"
#include "filemode.h"
#include "ls.h"
@@ -186,7 +188,7 @@ int rpl_lstat PARAMS((const char *, struct stat *));
# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf)
#endif
#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF
#if D_TYPE_IN_DIRENT && defined DTTOIF
# define HAVE_STRUCT_DIRENT_D_TYPE 1
# define DT_INIT(Val) = Val
#else
@@ -226,7 +228,7 @@ struct fileinfo
/* For symbolic link and long listing, st_mode of file linked to, otherwise
zero. */
unsigned int linkmode;
mode_t linkmode;
/* For symbolic link and color printing, 1 if linked-to file
exists, otherwise 0. */
@@ -263,6 +265,8 @@ struct bin_str
time_t time ();
#endif
size_t nstrftime PARAMS ((char *, size_t, char const *,
struct tm const *, int, int));
char *getgroup ();
char *getuser ();
@@ -301,7 +305,7 @@ static int decode_switches PARAMS ((int argc, char **argv));
static int file_interesting PARAMS ((const struct dirent *next));
static uintmax_t gobble_file PARAMS ((const char *name, enum filetype type,
int explicit_arg, const char *dirname));
static void print_color_indicator PARAMS ((const char *name, unsigned int mode,
static void print_color_indicator PARAMS ((const char *name, mode_t mode,
int linkok));
static void put_indicator PARAMS ((const struct bin_str *ind));
static int length_of_file_name_and_frills PARAMS ((const struct fileinfo *f));
@@ -319,11 +323,11 @@ static void print_file_name_and_frills PARAMS ((const struct fileinfo *f));
static void print_horizontal PARAMS ((void));
static void print_long_format PARAMS ((const struct fileinfo *f));
static void print_many_per_line PARAMS ((void));
static void print_name_with_quoting PARAMS ((const char *p, unsigned int mode,
static void print_name_with_quoting PARAMS ((const char *p, mode_t mode,
int linkok,
struct obstack *stack));
static void prep_non_filename_text PARAMS ((void));
static void print_type_indicator PARAMS ((unsigned int mode));
static void print_type_indicator PARAMS ((mode_t mode));
static void print_with_commas PARAMS ((void));
static void queue_directory PARAMS ((const char *name, const char *realname));
static void sort_files PARAMS ((void));
@@ -394,11 +398,12 @@ static int block_size_size;
horizontal for just names, many per line, sorted horizontally.
with_commas for just names, many per line, separated by commas.
-l, -1, -C, -x and -m control this parameter. */
-l (and other options that imply -l), -1, -C, -x and -m control
this parameter. */
enum format
{
long_format, /* -l */
long_format, /* -l and other options that imply -l */
one_per_line, /* -1 */
many_per_line, /* -C */
horizontal, /* -x */
@@ -407,6 +412,29 @@ enum format
static enum format format;
/* `full-iso' uses full ISO-style dates and times. `iso' uses shorter
ISO-style time stamps. `locale' uses locale-dependent time stamps.
`posix-iso' uses traditional POSIX-locale-style dates where
POSIX requires it, ISO-style dates otherwise. */
enum time_style
{
full_iso_time_style, /* --time-style=full-iso */
iso_time_style, /* --time-style=iso */
locale_time_style, /* --time-style=locale */
posix_iso_time_style /* --time-style=posix-iso (default) */
};
static char const *const time_style_args[] =
{
"full-iso", "iso", "locale", "posix-iso", 0
};
static enum time_style const time_style_types[] =
{
full_iso_time_style, iso_time_style,
locale_time_style, posix_iso_time_style, 0
};
/* Type of time to print or sort by. Controlled by -c and -u. */
enum time_type
@@ -418,10 +446,6 @@ enum time_type
static enum time_type time_type;
/* print the full time, otherwise the standard unix heuristics. */
static int full_time;
/* The file characteristic to sort by. Controlled by -t, -S, -U, -X, -v. */
enum sort_type
@@ -444,9 +468,13 @@ static enum sort_type sort_type;
static int sort_reverse;
/* Nonzero means to NOT display group information. -G */
/* Nonzero means to display owner information. -g turns this off. */
static int inhibit_group;
static int print_owner = 1;
/* Nonzero means to display group information. -G and -o turn this off. */
static int print_group = 1;
/* Nonzero means print the user and group id's as numbers rather
than as names. -n */
@@ -507,6 +535,14 @@ enum color_type
color_if_tty /* 2: --color=tty */
};
enum Dereference_symlink
{
DEREF_UNDEFINED = 1,
DEREF_NEVER,
DEREF_COMMAND_LINE_ARGUMENTS, /* -H */
DEREF_ALWAYS /* -L */
};
enum indicator_no
{
C_LEFT, C_RIGHT, C_END, C_NORM, C_FILE, C_DIR, C_LINK, C_FIFO, C_SOCK,
@@ -560,10 +596,10 @@ static int check_symlink_color;
static int print_inode;
/* Nonzero means when a symbolic link is found, display info on
the file linked to. -L */
/* What to do with symbolic links. Affected by -d, -F, -H, -l (and
other options that imply -l), and -L. */
static int trace_links;
static enum Dereference_symlink dereference;
/* Nonzero means when a directory is found, display info on its
contents. -R */
@@ -644,7 +680,8 @@ static int format_needs_type;
/* strftime formats for non-recent and recent files, respectively, in
-l output. */
static char const *long_time_format[2];
static char const *long_time_format[2] = { N_("%b %e %Y"),
N_("%b %e %H:%M") };
/* The exit status to use if we don't get any fatal errors. */
@@ -663,7 +700,8 @@ enum
SHOW_CONTROL_CHARS_OPTION,
SI_OPTION,
SORT_OPTION,
TIME_OPTION
TIME_OPTION,
TIME_STYLE_OPTION
};
static struct option const long_options[] =
@@ -687,6 +725,7 @@ static struct option const long_options[] =
{"classify", no_argument, 0, 'F'},
{"file-type", no_argument, 0, 'p'},
{"si", no_argument, 0, SI_OPTION},
{"dereference-command-line", no_argument, 0, 'H'},
{"ignore", required_argument, 0, 'I'},
{"indicator-style", required_argument, 0, INDICATOR_STYLE_OPTION},
{"dereference", no_argument, 0, 'L'},
@@ -699,6 +738,7 @@ static struct option const long_options[] =
{"sort", required_argument, 0, SORT_OPTION},
{"tabsize", required_argument, 0, 'T'},
{"time", required_argument, 0, TIME_OPTION},
{"time-style", required_argument, 0, TIME_STYLE_OPTION},
{"color", optional_argument, 0, COLOR_OPTION},
{"block-size", required_argument, 0, BLOCK_SIZE_OPTION},
{GETOPT_HELP_OPTION_DECL},
@@ -836,7 +876,7 @@ dired_dump_obstack (const char *prefix, struct obstack *os)
pos = (size_t *) obstack_finish (os);
fputs (prefix, stdout);
for (i = 0; i < n_pos; i++)
printf (" %d", (int) pos[i]);
printf (" %lu", (unsigned long) pos[i]);
fputs ("\n", stdout);
}
}
@@ -865,9 +905,13 @@ main (int argc, char **argv)
i = decode_switches (argc, argv);
if (print_with_color)
parse_ls_color ();
/* Test print_with_color again, because the call to parse_ls_color
may have just reset it -- e.g., if LS_COLORS is invalid. */
if (print_with_color)
{
parse_ls_color ();
prep_non_filename_text ();
/* Avoid following symbolic links when possible. */
if (color_indicator[C_ORPHAN].string != NULL
@@ -876,9 +920,17 @@ main (int argc, char **argv)
check_symlink_color = 1;
}
if (dereference == DEREF_UNDEFINED)
dereference = ((immediate_dirs
|| indicator_style == classify
|| format == long_format)
? DEREF_NEVER
: DEREF_COMMAND_LINE_ARGUMENTS);
format_needs_stat = sort_type == sort_time || sort_type == sort_size
|| format == long_format
|| trace_links || trace_dirs || print_block_size || print_inode;
|| dereference == DEREF_ALWAYS
|| trace_dirs || print_block_size || print_inode;
format_needs_type = (format_needs_stat == 0
&& (print_with_color || indicator_style != none));
@@ -895,7 +947,7 @@ main (int argc, char **argv)
clear_files ();
n_files = argc - i;
if (0 <= n_files)
if (0 < n_files)
dir_defaulted = 0;
for (; i < argc; i++)
@@ -965,10 +1017,8 @@ main (int argc, char **argv)
static int
decode_switches (int argc, char **argv)
{
register char const *p;
int c;
int i;
long int tmp_long;
char const *time_style_option = 0;
/* Record whether there is an option specifying sort type. */
int sort_type_specified = 0;
@@ -1011,42 +1061,55 @@ decode_switches (int argc, char **argv)
}
time_type = time_mtime;
full_time = 0;
sort_type = sort_name;
sort_reverse = 0;
numeric_ids = 0;
print_block_size = 0;
indicator_style = none;
print_inode = 0;
trace_links = 0;
dereference = DEREF_UNDEFINED;
trace_dirs = 0;
immediate_dirs = 0;
all_files = 0;
really_all_files = 0;
ignore_patterns = 0;
/* FIXME: Shouldn't we complain on wrong values? */
if ((p = getenv ("QUOTING_STYLE"))
&& 0 <= (i = ARGCASEMATCH (p, quoting_style_args, quoting_style_vals)))
set_quoting_style (NULL, quoting_style_vals[i]);
/* FIXME: put this in a function. */
{
char const *q_style = getenv ("QUOTING_STYLE");
if (q_style)
{
int i = ARGCASEMATCH (q_style, quoting_style_args, quoting_style_vals);
if (0 <= i)
set_quoting_style (NULL, quoting_style_vals[i]);
else
error (0, 0,
_("ignoring invalid value of environment variable QUOTING_STYLE: %s"),
quotearg (q_style));
}
}
human_block_size (getenv ("LS_BLOCK_SIZE"), 0, &output_block_size);
line_length = 80;
if ((p = getenv ("COLUMNS")) && *p)
{
if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
&& 0 < tmp_long && tmp_long <= INT_MAX)
{
line_length = (int) tmp_long;
}
else
{
error (0, 0,
{
char const *p = getenv ("COLUMNS");
if (p && *p)
{
long int tmp_long;
if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
&& 0 < tmp_long && tmp_long <= INT_MAX)
{
line_length = (int) tmp_long;
}
else
{
error (0, 0,
_("ignoring invalid width in environment variable COLUMNS: %s"),
quotearg (p));
}
}
quotearg (p));
}
}
}
#ifdef TIOCGWINSZ
{
@@ -1059,21 +1122,25 @@ decode_switches (int argc, char **argv)
/* Using the TABSIZE environment variable is not POSIX-approved.
Ignore it when POSIXLY_CORRECT is set. */
tabsize = 8;
if (!getenv ("POSIXLY_CORRECT") && (p = getenv ("TABSIZE")))
{
if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
&& 0 <= tmp_long && tmp_long <= INT_MAX)
{
tabsize = (int) tmp_long;
}
else
{
error (0, 0,
_("ignoring invalid tab size in environment variable TABSIZE: %s"),
quotearg (p));
}
}
{
char const *p;
tabsize = 8;
if (!getenv ("POSIXLY_CORRECT") && (p = getenv ("TABSIZE")))
{
long int tmp_long;
if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
&& 0 <= tmp_long && tmp_long <= INT_MAX)
{
tabsize = (int) tmp_long;
}
else
{
error (0, 0,
_("ignoring invalid tab size in environment variable TABSIZE: %s"),
quotearg (p));
}
}
}
while ((c = getopt_long (argc, argv,
"abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1",
@@ -1115,23 +1182,14 @@ decode_switches (int argc, char **argv)
break;
case 'g':
/* No effect. For BSD compatibility. */
format = long_format;
print_owner = 0;
break;
case 'h':
output_block_size = -1024;
break;
case 'H':
error (0, 0,
_("\
Warning: the meaning of `-H' will change in the future to conform to POSIX.\n\
Use `--si' for the old meaning."));
/* Fall through. */
case SI_OPTION:
output_block_size = -1000;
break;
case 'i':
print_inode = 1;
break;
@@ -1150,11 +1208,12 @@ Use `--si' for the old meaning."));
case 'n':
numeric_ids = 1;
format = long_format;
break;
case 'o': /* Just like -l, but don't display group info. */
format = long_format;
inhibit_group = 1;
print_group = 0;
break;
case 'p':
@@ -1188,12 +1247,15 @@ Use `--si' for the old meaning."));
break;
case 'w':
if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK
|| tmp_long <= 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0, _("invalid line width: %s"),
quotearg (optarg));
line_length = (int) tmp_long;
break;
{
long int tmp_long;
if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK
|| tmp_long <= 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0, _("invalid line width: %s"),
quotearg (optarg));
line_length = (int) tmp_long;
break;
}
case 'x':
format = horizontal;
@@ -1222,7 +1284,11 @@ Use `--si' for the old meaning."));
break;
case 'G': /* inhibit display of group info */
inhibit_group = 1;
print_group = 0;
break;
case 'H':
dereference = DEREF_COMMAND_LINE_ARGUMENTS;
break;
case 'I':
@@ -1230,7 +1296,7 @@ Use `--si' for the old meaning."));
break;
case 'L':
trace_links = 1;
dereference = DEREF_ALWAYS;
break;
case 'N':
@@ -1251,12 +1317,15 @@ Use `--si' for the old meaning."));
break;
case 'T':
if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK
|| tmp_long < 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0, _("invalid tab size: %s"),
quotearg (optarg));
tabsize = (int) tmp_long;
break;
{
long int tmp_long;
if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK
|| tmp_long < 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0, _("invalid tab size: %s"),
quotearg (optarg));
tabsize = (int) tmp_long;
break;
}
case 'U':
sort_type = sort_none;
@@ -1269,7 +1338,9 @@ Use `--si' for the old meaning."));
break;
case '1':
format = one_per_line;
/* -1 has no effect after -l. */
if (format != long_format)
format = one_per_line;
break;
case SORT_OPTION:
@@ -1287,29 +1358,32 @@ Use `--si' for the old meaning."));
case FULL_TIME_OPTION:
format = long_format;
full_time = 1;
time_style_option = "full-iso";
break;
case COLOR_OPTION:
if (optarg)
i = XARGMATCH ("--color", optarg, color_args, color_types);
else
/* Using --color with no argument is equivalent to using
--color=always. */
i = color_always;
{
int i;
if (optarg)
i = XARGMATCH ("--color", optarg, color_args, color_types);
else
/* Using --color with no argument is equivalent to using
--color=always. */
i = color_always;
print_with_color = (i == color_always
|| (i == color_if_tty
&& isatty (STDOUT_FILENO)));
print_with_color = (i == color_always
|| (i == color_if_tty
&& isatty (STDOUT_FILENO)));
if (print_with_color)
{
/* Don't use TAB characters in output. Some terminal
emulators can't handle the combination of tabs and
color codes on the same line. */
tabsize = 0;
}
break;
if (print_with_color)
{
/* Don't use TAB characters in output. Some terminal
emulators can't handle the combination of tabs and
color codes on the same line. */
tabsize = 0;
}
break;
}
case INDICATOR_STYLE_OPTION:
indicator_style = XARGMATCH ("--indicator-style", optarg,
@@ -1324,6 +1398,10 @@ Use `--si' for the old meaning."));
quoting_style_vals));
break;
case TIME_STYLE_OPTION:
time_style_option = optarg;
break;
case SHOW_CONTROL_CHARS_OPTION:
qmark_funny_chars = 0;
break;
@@ -1332,6 +1410,10 @@ Use `--si' for the old meaning."));
human_block_size (optarg, 1, &output_block_size);
break;
case SI_OPTION:
output_block_size = -1000;
break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -1345,8 +1427,11 @@ Use `--si' for the old meaning."));
if (get_quoting_style (filename_quoting_options) == escape_quoting_style)
set_char_quoting (filename_quoting_options, ' ', 1);
if (indicator_style != none)
for (p = "*=@|" + (int) indicator_style - 1; *p; p++)
set_char_quoting (filename_quoting_options, *p, 1);
{
char const *p;
for (p = "*=@|" + (int) indicator_style - 1; *p; p++)
set_char_quoting (filename_quoting_options, *p, 1);
}
dirname_quoting_options = clone_quoting_options (NULL);
set_char_quoting (dirname_quoting_options, ':', 1);
@@ -1367,13 +1452,37 @@ Use `--si' for the old meaning."));
if (format == long_format)
{
if (full_time)
long_time_format[0] = long_time_format[1] =
dcgettext (NULL, "%a %b %d %H:%M:%S %Y", LC_TIME);
else
if (! time_style_option)
time_style_option = getenv ("TIME_STYLE");
switch (time_style_option
? XARGMATCH ("time style", time_style_option,
time_style_args,
time_style_types)
: posix_iso_time_style)
{
long_time_format[0] = dcgettext (NULL, "%b %e %Y", LC_TIME);
long_time_format[1] = dcgettext (NULL, "%b %e %H:%M", LC_TIME);
case full_iso_time_style:
long_time_format[0] = long_time_format[1] =
"%Y-%m-%d %H:%M:%S.%N %z";
break;
case posix_iso_time_style:
if (! hard_locale (LC_TIME))
break;
/* Fall through. */
case iso_time_style:
long_time_format[0] = "%Y-%m-%d ";
long_time_format[1] = "%m-%d %H:%M";
break;
case locale_time_style:
if (hard_locale (LC_TIME))
{
unsigned int i;
for (i = 0; i < 2; i++)
long_time_format[i] =
dcgettext (NULL, long_time_format[i], LC_TIME);
}
}
}
@@ -1916,7 +2025,7 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
attach (path, dirname, name);
}
val = (trace_links
val = (DEREF_ALWAYS <= dereference + explicit_arg
? stat (path, &files[files_index].stat)
: lstat (path, &files[files_index].stat));
@@ -1935,7 +2044,7 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
#endif
if (S_ISLNK (files[files_index].stat.st_mode)
&& (explicit_arg || format == long_format || check_symlink_color))
&& (format == long_format || check_symlink_color))
{
char *linkpath;
struct stat linkstats;
@@ -1946,9 +2055,7 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
/* Avoid following symbolic links when possible, ie, when
they won't be traced and when no indicator is needed. */
if (linkpath
&& ((explicit_arg && format != long_format)
|| indicator_style != none
|| check_symlink_color)
&& (indicator_style != none || check_symlink_color)
&& stat (linkpath, &linkstats) == 0)
{
files[files_index].linkok = 1;
@@ -2028,7 +2135,7 @@ static void
get_link_name (const char *filename, struct fileinfo *f)
{
char *linkbuf;
register int linksize;
register ssize_t linksize;
linkbuf = (char *) alloca (PATH_MAX + 2);
/* Some automounters give incorrect st_size for mount points.
@@ -2055,7 +2162,7 @@ static char *
make_link_path (const char *path, const char *linkname)
{
char *linkbuf;
int bufsiz;
size_t bufsiz;
if (linkname == 0)
return 0;
@@ -2377,7 +2484,7 @@ long_time_expected_width (void)
for (;;)
{
*buf = '\1';
len = strftime (buf, bufsize, fmt, tm);
len = nstrftime (buf, bufsize, fmt, tm, 0, 0);
if (len || ! *buf)
break;
buf = alloca (bufsize *= 2);
@@ -2437,12 +2544,12 @@ print_long_format (const struct fileinfo *f)
/* 7 fields that may require LONGEST_HUMAN_READABLE bytes,
1 10-byte mode string,
1 24-byte time string (may be longer in some locales -- see below)
1 35-byte time string (may be longer in some locales -- see below)
or LONGEST_HUMAN_READABLE integer,
9 spaces, one following each of these fields, and
1 trailing NUL byte. */
char init_bigbuf[7 * LONGEST_HUMAN_READABLE + 10
+ (LONGEST_HUMAN_READABLE < 24 ? 24 : LONGEST_HUMAN_READABLE)
+ MAX (35, LONGEST_HUMAN_READABLE)
+ 9 + 1];
char *buf = init_bigbuf;
size_t bufsize = sizeof (init_bigbuf);
@@ -2451,7 +2558,6 @@ print_long_format (const struct fileinfo *f)
time_t when;
int when_ns IF_LINT (= 0);
struct tm *when_local;
char *user_name;
#if HAVE_ST_DM_MODE
/* Cray DMF: look at the file's migrated, not real, status */
@@ -2501,29 +2607,33 @@ print_long_format (const struct fileinfo *f)
/* The last byte of the mode string is the POSIX
"optional alternate access method flag". */
sprintf (p, "%s %3u ", modebuf, (unsigned int) f->stat.st_nlink);
sprintf (p, "%s %3lu ", modebuf, (unsigned long) f->stat.st_nlink);
p += strlen (p);
user_name = (numeric_ids ? NULL : getuser (f->stat.st_uid));
if (user_name)
sprintf (p, "%-8.8s ", user_name);
else
sprintf (p, "%-8u ", (unsigned int) f->stat.st_uid);
p += strlen (p);
if (print_owner)
{
char *user_name = (numeric_ids ? NULL : getuser (f->stat.st_uid));
if (user_name)
sprintf (p, "%-8s ", user_name);
else
sprintf (p, "%-8lu ", (unsigned long) f->stat.st_uid);
p += strlen (p);
}
if (!inhibit_group)
if (print_group)
{
char *group_name = (numeric_ids ? NULL : getgroup (f->stat.st_gid));
if (group_name)
sprintf (p, "%-8.8s ", group_name);
sprintf (p, "%-8s ", group_name);
else
sprintf (p, "%-8u ", (unsigned int) f->stat.st_gid);
sprintf (p, "%-8lu ", (unsigned long) f->stat.st_gid);
p += strlen (p);
}
if (S_ISCHR (f->stat.st_mode) || S_ISBLK (f->stat.st_mode))
sprintf (p, "%3u, %3u ", (unsigned) major (f->stat.st_rdev),
(unsigned) minor (f->stat.st_rdev));
sprintf (p, "%3lu, %3lu ",
(unsigned long) major (f->stat.st_rdev),
(unsigned long) minor (f->stat.st_rdev));
else
{
char hbuf[LONGEST_HUMAN_READABLE + 1];
@@ -2561,7 +2671,8 @@ print_long_format (const struct fileinfo *f)
{
char *newbuf;
*p = '\1';
s = strftime (p, buf + bufsize - p - 1, fmt, when_local);
s = nstrftime (p, buf + bufsize - p - 1, fmt,
when_local, 0, when_ns);
if (s || ! *p)
break;
newbuf = alloca (bufsize *= 2);
@@ -2776,7 +2887,7 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options)
}
static void
print_name_with_quoting (const char *p, unsigned int mode, int linkok,
print_name_with_quoting (const char *p, mode_t mode, int linkok,
struct obstack *stack)
{
if (print_with_color)
@@ -2833,7 +2944,7 @@ print_file_name_and_frills (const struct fileinfo *f)
}
static void
print_type_indicator (unsigned int mode)
print_type_indicator (mode_t mode)
{
int c;
@@ -2865,7 +2976,7 @@ print_type_indicator (unsigned int mode)
}
static void
print_color_indicator (const char *name, unsigned int mode, int linkok)
print_color_indicator (const char *name, mode_t mode, int linkok)
{
int type = C_FILE;
struct color_ext_type *ext; /* Color extension */
@@ -2950,7 +3061,7 @@ length_of_file_name_and_frills (const struct fileinfo *f)
if (indicator_style != none)
{
unsigned filetype = f->stat.st_mode;
mode_t filetype = f->stat.st_mode;
if (S_ISREG (filetype))
{
@@ -3270,10 +3381,10 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-F, --classify append indicator (one of */=@|) to entries\n\
--format=WORD across -x, commas -m, horizontal -x, long -l,\n\
single-column -1, verbose -l, vertical -C\n\
--full-time list both full date and full time\n"));
--full-time like -l --time-style=full-iso\n"));
printf (_("\
-g (ignored)\n\
-g -like -l, but do not list owner\n\
-G, --no-group inhibit display of group information\n\
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\n\
--si likewise, but use powers of 1000 not 1024\n\
@@ -3286,11 +3397,13 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
-k, --kilobytes like --block-size=1024\n\
-l use a long listing format\n\
-L, --dereference list entries pointed to by symbolic links\n\
-m fill width with a comma separated list of entries\n\
-n, --numeric-uid-gid list numeric UIDs and GIDs instead of names\n\
-m fill width with a comma separated list of entries\n"));
printf (_("\
-n, --numeric-uid-gid like -l, but list numeric UIDs and GIDs\n\
-N, --literal print raw entry names (don't treat e.g. control\n\
characters specially)\n\
-o use long listing format without group info\n\
-o like -l, but do not list group information\n\
-p, --file-type append indicator (one of /=@|) to entries\n\
-q, --hide-control-chars print ? instead of non graphic characters\n\
--show-control-chars show non graphic characters as-is (default\n\
@@ -3310,6 +3423,8 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
--time=WORD show time as WORD instead of modification time:\n\
atime, access, use, ctime or status; use\n\
specified time as sort key if --sort=time\n\
--time-style=WORD show times using style WORD:\n\
full-iso, iso, locale, posix-iso\n\
-t sort by modification time\n\
-T, --tabsize=COLS assume tab stops at each COLS instead of 8\n\
-u with -lt: sort by, and show, access time\n\

View File

@@ -34,8 +34,6 @@
#define AUTHORS "David MacKenzie"
void strip_trailing_slashes ();
/* The name this program was run with. */
char *program_name;

View File

@@ -1,5 +1,5 @@
/* mkfifo -- make fifo's (named pipes)
Copyright (C) 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 90, 91, 1995-2001 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
@@ -125,7 +125,7 @@ main (int argc, char **argv)
{
int fail = mkfifo (argv[optind], newmode);
if (fail)
error (0, errno, _("cannot create fifo `%s'"), quote (argv[optind]));
error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
/* If the containing directory happens to have a default ACL, chmod
ensures the file mode permission bits are still set as desired. */
@@ -134,7 +134,7 @@ main (int argc, char **argv)
{
fail = chmod (argv[optind], newmode);
if (fail)
error (0, errno, _("cannot set permissions of fifo `%s'"),
error (0, errno, _("cannot set permissions of fifo %s"),
quote (argv[optind]));
}

View File

@@ -1,5 +1,5 @@
/* mknod -- make special files
Copyright (C) 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 90, 91, 1995-2001 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
@@ -88,9 +88,7 @@ main (int argc, char **argv)
struct mode_change *change;
const char *specified_mode;
int optc;
int i_major, i_minor;
long int tmp_major, tmp_minor;
char *s;
mode_t node_type;
program_name = argv[0];
setlocale (LC_ALL, "");
@@ -151,57 +149,51 @@ main (int argc, char **argv)
#ifndef S_IFBLK
error (4, 0, _("block special files not supported"));
#else
if (argc - optind != 4)
{
error (0, 0, _("\
when creating block special files, major and minor device\n\
numbers must be specified"));
usage (1);
}
s = argv[optind + 2];
if (xstrtol (s, NULL, 0, &tmp_major, NULL) != LONGINT_OK)
error (1, 0, _("invalid major device number %s"), quote (s));
s = argv[optind + 3];
if (xstrtol (s, NULL, 0, &tmp_minor, NULL) != LONGINT_OK)
error (1, 0, _("invalid minor device number %s"), quote (s));
i_major = (int) tmp_major;
i_minor = (int) tmp_minor;
if (mknod (argv[optind], newmode | S_IFBLK, makedev (i_major, i_minor)))
error (1, errno, "%s", quote (argv[optind]));
node_type = S_IFBLK;
#endif
break;
goto block_or_character;
case 'c': /* `character' */
case 'u': /* `unbuffered' */
#ifndef S_IFCHR
error (4, 0, _("character special files not supported"));
#else
node_type = S_IFCHR;
#endif
goto block_or_character;
block_or_character:
if (argc - optind != 4)
{
error (0, 0, _("\
when creating character special files, major and minor device\n\
when creating special files, major and minor device\n\
numbers must be specified"));
usage (1);
}
s = argv[optind + 2];
if (xstrtol (s, NULL, 0, &tmp_major, NULL) != LONGINT_OK)
error (1, 0, _("invalid major device number %s"), quote (s));
{
char const *s_major = argv[optind + 2];
char const *s_minor = argv[optind + 3];
uintmax_t i_major, i_minor;
dev_t device;
s = argv[optind + 3];
if (xstrtol (s, NULL, 0, &tmp_minor, NULL) != LONGINT_OK)
error (1, 0, _("invalid minor device number %s"), quote (s));
if (xstrtoumax (s_major, NULL, 0, &i_major, NULL) != LONGINT_OK
|| i_major != (major_t) i_major)
error (1, 0, _("invalid major device number %s"), quote (s_major));
i_major = (int) tmp_major;
i_minor = (int) tmp_minor;
if (xstrtoumax (s_minor, NULL, 0, &i_minor, NULL) != LONGINT_OK
|| i_minor != (minor_t) i_minor)
error (1, 0, _("invalid minor device number %s"), quote (s_minor));
if (mknod (argv[optind], newmode | S_IFCHR, makedev (i_major, i_minor)))
error (1, errno, "%s", quote (argv[optind]));
device = makedev (i_major, i_minor);
#ifdef NODEV
if (device == NODEV)
error (1, 0, _("invalid device %s %s"), s_major, s_minor);
#endif
if (mknod (argv[optind], newmode | node_type, device) != 0)
error (1, errno, "%s", quote (argv[optind]));
}
break;
case 'p': /* `pipe' */
@@ -230,7 +222,7 @@ major and minor device numbers may not be specified for fifo files"));
if (specified_mode)
{
if (chmod (argv[optind], newmode))
error (0, errno, _("cannot set permissions of `%s'"),
error (0, errno, _("cannot set permissions of %s"),
quote (argv[optind]));
}

View File

@@ -31,6 +31,7 @@
#include "backupfile.h"
#include "copy.h"
#include "cp-hash.h"
#include "dirname.h"
#include "error.h"
#include "path-concat.h"
#include "quote.h"
@@ -144,18 +145,6 @@ is_real_dir (const char *path)
return lstat (path, &stats) == 0 && S_ISDIR (stats.st_mode);
}
static int
strip_trailing_slashes_2 (char *path)
{
char *end_p = path + strlen (path) - 1;
char *slash = end_p;
while (slash > path && *slash == '/')
*slash-- = '\0';
return slash < end_p;
}
/* Move SOURCE onto DEST. Handles cross-filesystem moves.
If SOURCE is a directory, DEST must not exist.
Return 0 if successful, non-zero if an error occurred. */
@@ -245,7 +234,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
/* Remove any trailing slashes. This is necessary if we
took the else branch of movefile. */
strip_trailing_slashes_2 (fs.filename);
strip_trailing_slashes (fs.filename);
status = rm (&fs, 1, &rm_options);
assert (VALID_STATUS (status));
@@ -271,7 +260,7 @@ static int
movefile (char *source, char *dest, int dest_is_dir,
const struct cp_options *x)
{
int dest_had_trailing_slash = strip_trailing_slashes_2 (dest);
int dest_had_trailing_slash = strip_trailing_slashes (dest);
int fail;
/* This code was introduced to handle the ambiguity in the semantics
@@ -282,7 +271,7 @@ movefile (char *source, char *dest, int dest_is_dir,
rename semantics are POSIX and susv2 compliant. */
if (remove_trailing_slashes)
strip_trailing_slashes_2 (source);
strip_trailing_slashes (source);
/* In addition to when DEST is a directory, if DEST has a trailing
slash and neither SOURCE nor DEST is a directory, presume the target
@@ -297,10 +286,7 @@ movefile (char *source, char *dest, int dest_is_dir,
char *src_basename;
char *new_dest;
/* Remove trailing slashes before taking base_name.
Otherwise, base_name ("a/") returns "". */
strip_trailing_slashes_2 (source);
strip_trailing_slashes (source);
src_basename = base_name (source);
new_dest = path_concat (dest, src_basename, NULL);
if (new_dest == NULL)

View File

@@ -34,12 +34,18 @@ typedef enum {false = 0, true = 1} bool;
#include "save-cwd.h"
#include "system.h"
#include "dirname.h"
#include "error.h"
#include "obstack.h"
#include "hash.h"
#include "quote.h"
#include "remove.h"
/* Avoid shadowing warnings because these are functions declared
in dirname.h as well as locals used below. */
#define dir_name rm_dir_name
#define dir_len rm_dir_len
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free

View File

@@ -1,5 +1,5 @@
/* `rm' file deletion utility for GNU.
Copyright (C) 88, 90, 91, 1994-2000 Free Software Foundation, Inc.
Copyright (C) 88, 90, 91, 1994-2001 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
@@ -50,6 +50,7 @@
#include <assert.h>
#include "system.h"
#include "dirname.h"
#include "error.h"
#include "remove.h"
#include "save-cwd.h"
@@ -60,8 +61,6 @@
#define AUTHORS \
"Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering"
void strip_trailing_slashes ();
/* Name this program was run with. */
char *program_name;
@@ -100,7 +99,12 @@ Remove (unlink) the FILE(s).\n\
To remove a file whose name starts with a `-', for example `-foo',\n\
use one of these commands:\n\
%s -- -foo\n\
\n\
%s ./-foo\n\
\n\
Note that if you use rm to remove a file, it is usually possible to recover\n\
the contents of that file. If you want more assurance that the contents are\n\
truly unrecoverable, consider using shred.\n\
"),
program_name, program_name);
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));

View File

@@ -28,6 +28,7 @@
#include <sys/types.h>
#include "system.h"
#include "dirname.h"
#include "error.h"
#include "quote.h"
@@ -44,8 +45,6 @@
# define ENOTEMPTY 0
#endif
void strip_trailing_slashes ();
/* The name this program was run with. */
char *program_name;

View File

@@ -482,6 +482,29 @@ Delete FILE(s) if --remove (-u) is specified. The default is not to remove\n\
the files because it is common to operate on device files like /dev/hda,\n\
and those files usually should not be removed. When operating on regular\n\
files, most people use the --remove option.\n\
\n\
CAUTION: Note that shred relies on a very important assumption:\n\
that the filesystem overwrites data in place. This is the traditional\n\
way to do things, but many modern filesystem designs do not satisfy this\n\
assumption. The following are examples of filesystems on which shred is\n\
not effective:\n\
\n\
* log-structured or journaled filesystems, such as those supplied with\n\
AIX and Solaris (and JFS, ReiserFS, XFS, etc.)\n\
\n\
* filesystems that write redundant data and carry on even if some writes\n\
fail, such as RAID-based filesystems\n\
\n\
* filesystems that make snapshots, such as Network Appliance's NFS server\n\
\n\
* filesystems that cache in temporary locations, such as NFS\n\
version 3 clients\n\
\n\
* compressed filesystems\n\
\n\
In addition, file system backups and remote mirrors may contain copies\n\
of the file that cannot be removed, and that will allow a shredded file\n\
to be recovered later.\n\
"), DEFAULT_PASSES);
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
}

View File

@@ -1,5 +1,5 @@
/* su for GNU. Run a shell with substitute user and group IDs.
Copyright (C) 1992-2000 Free Software Foundation, Inc.
Copyright (C) 1992-2000, 2001 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
@@ -83,6 +83,7 @@
#include "system.h"
#include "closeout.h"
#include "dirname.h"
#undef getusershell
@@ -147,8 +148,6 @@ char *getusershell ();
void endusershell ();
void setusershell ();
char *base_name ();
extern char **environ;
static void run_shell (const char *, const char *, char **)

View File

@@ -436,8 +436,6 @@ uid_t getuid ();
setvbuf (Stream, Buffer, Type, Size)
#endif
char *base_name PARAMS ((char const *));
/* Factor out some of the common --help and --version processing code. */
/* These enum values cannot possibly conflict with the option values

View File

@@ -1253,7 +1253,7 @@ parse_obsolescent_option (int argc, const char *const *argv,
n_string_end = p;
t_count_lines = 1;
if (*p == 'c')
if (*p == 'c' || *p == 'b')
{
t_count_lines = 0;
++p;
@@ -1296,7 +1296,9 @@ parse_obsolescent_option (int argc, const char *const *argv,
strtol_error s_err;
unsigned long int tmp_ulong;
char *end;
s_err = xstrtoul (n_string, &end, 10, &tmp_ulong, NULL);
s_err = xstrtoul (n_string, &end, 10, &tmp_ulong,
*n_string_end == 'b' ? "b" : NULL);
if (s_err == LONGINT_OK && tmp_ulong <= OFF_T_MAX)
*n_units = (off_t) tmp_ulong;
else
@@ -1310,7 +1312,7 @@ parse_obsolescent_option (int argc, const char *const *argv,
error (0, 0,
_("%s: %s is so large that it is not representable"),
n_string_tmp, (count_lines
n_string_tmp, (t_count_lines
? _("number of lines")
: _("number of bytes")));
free (n_string_tmp);

View File

@@ -25,6 +25,7 @@
#include "system.h"
#include "closeout.h"
#include "argmatch.h"
#include "linebuffer.h"
#include "error.h"
#include "xstrtol.h"
@@ -81,11 +82,36 @@ static enum output_mode mode;
/* If nonzero, ignore case when comparing. */
static int ignore_case;
enum delimit_method
{
/* No delimiters output. --all-repeated[=none] */
DM_NONE,
/* Delimiter precedes all groups. --all-repeated=precede */
DM_PRECEDE,
/* Delimit all groups. --all-repeated=separate */
DM_SEPARATE
};
static char const *const delimit_method_string[] =
{
"none", "precede", "separate", 0
};
static enum delimit_method const delimit_method_map[] =
{
DM_NONE, DM_PRECEDE, DM_SEPARATE
};
/* Select whether/how to delimit groups of duplicate lines. */
static enum delimit_method delimit_groups;
static struct option const longopts[] =
{
{"count", no_argument, NULL, 'c'},
{"repeated", no_argument, NULL, 'd'},
{"all-repeated", no_argument, NULL, 'D'},
{"all-repeated", optional_argument, NULL, 'D'},
{"ignore-case", no_argument, NULL, 'i'},
{"unique", no_argument, NULL, 'u'},
{"skip-fields", required_argument, NULL, 'f'},
@@ -114,7 +140,9 @@ standard input), writing to OUTPUT (or standard output).\n\
\n\
-c, --count prefix lines by the number of occurrences\n\
-d, --repeated only print duplicate lines\n\
-D, --all-repeated print all duplicate lines\n\
-D, --all-repeated[=delimit-method] print all duplicate lines\n\
delimit-method={all,minimum,none(default)}\n\
Delimiting is done with blank lines.\n\
-f, --skip-fields=N avoid comparing the first N fields\n\
-i, --ignore-case ignore differences in case when comparing\n\
-s, --skip-chars=N avoid comparing the first N characters\n\
@@ -276,6 +304,7 @@ check_file (const char *infile, const char *outfile)
char *prevfield;
size_t prevlen;
int match_count = 0;
int first_delimiter = 1;
if (readline (prevline, istream) == 0)
goto closefiles;
@@ -296,6 +325,22 @@ check_file (const char *infile, const char *outfile)
if (match)
++match_count;
if (mode == output_all_repeated && delimit_groups != DM_NONE)
{
if (!match)
{
if (match_count) /* a previous match */
first_delimiter = 0; /* Only used when DM_SEPARATE */
}
else if (match_count == 1)
{
if ((delimit_groups == DM_PRECEDE)
|| (delimit_groups == DM_SEPARATE
&& !first_delimiter))
putc ('\n', ostream);
}
}
if (!match || mode == output_all_repeated)
{
writeline (prevline, ostream, match_count);
@@ -341,6 +386,7 @@ main (int argc, char **argv)
check_chars = 0;
mode = output_all;
countmode = count_none;
delimit_groups = DM_NONE;
while ((optc = getopt_long (argc, argv, "0123456789cdDf:is:uw:", longopts,
NULL)) != -1)
@@ -373,6 +419,12 @@ main (int argc, char **argv)
case 'D':
mode = output_all_repeated;
if (optarg == NULL)
delimit_groups = DM_NONE;
else
delimit_groups = XARGMATCH ("--all-repeated", optarg,
delimit_method_string,
delimit_method_map);
break;
case 'f': /* Like '-#'. */

582
src/who.c
View File

@@ -1,5 +1,5 @@
/* GNU's who.
Copyright (C) 1992-2000 Free Software Foundation, Inc.
Copyright (C) 1992-2001 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,10 +15,10 @@
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 jla; revised by djm */
/* Written by jla; revised by djm; revised again by mstone */
/* Output format:
name [state] line time [idle] host
name [state] line time [activity] [pid] [comment] [exit]
state: -T
name, line, time: not -q
idle: -u
@@ -38,7 +38,7 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "who"
#define AUTHORS "Joseph Arceneaux and David MacKenzie"
#define AUTHORS "Joseph Arceneaux, David MacKenzie, and Michael Stone"
#ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN 64
@@ -48,6 +48,32 @@
# define S_IWGRP 020
#endif
#ifndef USER_PROCESS
# define USER_PROCESS INT_MAX
#endif
#ifndef RUN_LVL
# define RUN_LVL INT_MAX
#endif
#ifndef INIT_PROCESS
# define INIT_PROCESS INT_MAX
#endif
#ifndef LOGIN_PROCESS
# define LOGIN_PROCESS INT_MAX
#endif
#ifndef DEAD_PROCESS
# define DEAD_PROCESS INT_MAX
#endif
#ifndef NEW_TIME
# define NEW_TIME INT_MAX
#endif
#define IDLESTR_LEN 6
int gethostname ();
char *ttyname ();
char *canon_host ();
@@ -63,6 +89,9 @@ static int do_lookup;
Ignored for `who am i'. */
static int short_list;
/* If nonzero, display only name, line, and time fields */
static int short_output;
/* If nonzero, display the hours:minutes since each user has touched
the keyboard, or "." if within the last minute, or "old" if
not within the last day. */
@@ -75,14 +104,56 @@ static int include_heading;
or a `?' if their tty cannot be statted. */
static int include_mesg;
static struct option const longopts[] =
/* If nonzero, display process termination & exit status */
static int include_exit;
/* If nonzero, display the last boot time */
static int need_boottime;
/* If nonzero, display dead processes */
static int need_deadprocs;
/* If nonzero, display processes waiting for user login */
static int need_login;
/* If nonzero, display processes started by init */
static int need_initspawn;
/* If nonzero, display the last clock change */
static int need_clockchange;
/* If nonzero, display the current runlevel */
static int need_runlevel;
/* If nonzero, display user processes */
static int need_users;
/* If nonzero, display info only for the controlling tty */
static int my_line_only;
/* for long options with no corresponding short option, use enum */
enum
{
LOOKUP_OPTION = CHAR_MAX + 1,
LOGIN_OPTION
};
static struct option const longopts[] = {
{"all", no_argument, NULL, 'a'},
{"boot", no_argument, NULL, 'b'},
{"count", no_argument, NULL, 'q'},
{"idle", no_argument, NULL, 'u'},
{"dead", no_argument, NULL, 'd'},
{"heading", no_argument, NULL, 'H'},
{"lookup", no_argument, NULL, 'l'},
{"idle", no_argument, NULL, 'i'},
{"login", no_argument, NULL, LOGIN_OPTION},
{"lookup", no_argument, NULL, LOOKUP_OPTION},
{"message", no_argument, NULL, 'T'},
{"mesg", no_argument, NULL, 'T'},
{"process", no_argument, NULL, 'p'},
{"runlevel", no_argument, NULL, 'r'},
{"short", no_argument, NULL, 's'},
{"time", no_argument, NULL, 't'},
{"users", no_argument, NULL, 'u'},
{"writable", no_argument, NULL, 'T'},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
@@ -90,13 +161,13 @@ static struct option const longopts[] =
};
/* Return a string representing the time between WHEN and the time
that this function is first run. */
that this function is first run.
FIXME: locale? */
static const char *
idle_string (time_t when)
{
static time_t now = 0;
static char idle_hhmm[10];
static char idle_hhmm[IDLESTR_LEN];
time_t seconds_idle;
if (now == 0)
@@ -105,7 +176,7 @@ idle_string (time_t when)
seconds_idle = now - when;
if (seconds_idle < 60) /* One minute. */
return " . ";
if (seconds_idle < (24 * 60 * 60)) /* One day. */
if (seconds_idle < (24 * 60 * 60)) /* One day. */
{
sprintf (idle_hhmm, "%02d:%02d",
(int) (seconds_idle / (60 * 60)),
@@ -115,20 +186,75 @@ idle_string (time_t when)
return _(" old ");
}
/* Display a line of information about UTMP_ENT. */
/* Return a standard time string, "mon dd hh:mm"
FIXME: handle localization */
static const char *
time_string (const STRUCT_UTMP *utmp_ent)
{
/* Don't take the address of UT_TIME_MEMBER directly.
Ulrich Drepper wrote:
``... GNU libc (and perhaps other libcs as well) have extended
utmp file formats which do not use a simple time_t ut_time field.
In glibc, ut_time is a macro which selects for backward compatibility
the tv_sec member of a struct timeval value.'' */
time_t tm = UT_TIME_MEMBER (utmp_ent);
char *ptr = ctime (&tm) + 4;
ptr[12] = '\0';
return ptr;
}
/* Print formatted output line. Uses mostly arbitrary field sizes, probably
will need tweaking if any of the localization stuff is done, or for 64 bit
pids, etc. */
static void
print_entry (const STRUCT_UTMP *utmp_ent)
print_line (const char *user, const char state, const char *line,
const char *time_str, const char *idle, const char *pid,
const char *comment, const char *exitstr)
{
printf ("%-8s", user ? user : " .");
if (include_mesg)
printf (" %c", state);
printf (" %-12s", line);
printf (" %-12s", time_str);
if (include_idle && !short_output)
printf (" %-6s", idle);
if (!short_output)
printf (" %10s", pid);
/* FIXME: it's not really clear whether the following should be in short_output.
a strict reading of SUSv2 would suggest not, but I haven't seen any
implementations that actually work that way... */
printf (" %-8s", comment);
if (include_exit && exitstr && *exitstr)
printf (" %-12s", exitstr);
putchar ('\n');
}
#if HAVE_STRUCT_XTMP_UT_PID
# define PIDSTR_DECL_AND_INIT(Var) \
char Var[INT_STRLEN_BOUND (utmp_ent->ut_pid) + 1]; \
sprintf (Var, "%d", utmp_ent->ut_pid)
#else
# define PIDSTR_DECL_AND_INIT(Var) \
const char *Var = ""
#endif
/* Send properly parsed USER_PROCESS info to print_line */
static void
print_user (const STRUCT_UTMP *utmp_ent)
{
struct stat stats;
time_t last_change;
char mesg;
char idlestr[IDLESTR_LEN];
static char *hoststr;
static int hostlen;
#define DEV_DIR_WITH_TRAILING_SLASH "/dev/"
#define DEV_DIR_LEN (sizeof (DEV_DIR_WITH_TRAILING_SLASH) - 1)
char line[sizeof (utmp_ent->ut_line) + DEV_DIR_LEN + 1];
time_t tm;
PIDSTR_DECL_AND_INIT (pidstr);
/* Copy ut_line into LINE, prepending `/dev/' if ut_line is not
already an absolute pathname. Some system may put the full,
@@ -141,7 +267,8 @@ print_entry (const STRUCT_UTMP *utmp_ent)
else
{
strcpy (line, DEV_DIR_WITH_TRAILING_SLASH);
strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));
strncpy (line + DEV_DIR_LEN, utmp_ent->ut_line,
sizeof (utmp_ent->ut_line));
line[DEV_DIR_LEN + sizeof (utmp_ent->ut_line)] = '\0';
}
@@ -156,27 +283,11 @@ print_entry (const STRUCT_UTMP *utmp_ent)
last_change = 0;
}
printf ("%-8.*s", (int) sizeof (UT_USER (utmp_ent)), UT_USER (utmp_ent));
if (include_mesg)
printf (" %c ", mesg);
printf (" %-8.*s", (int) sizeof (utmp_ent->ut_line), utmp_ent->ut_line);
if (last_change)
sprintf (idlestr, "%.6s", idle_string (last_change));
else
sprintf (idlestr, " ?");
/* Don't take the address of UT_TIME_MEMBER directly.
Ulrich Drepper wrote:
``... GNU libc (and perhaps other libcs as well) have extended
utmp file formats which do not use a simple time_t ut_time field.
In glibc, ut_time is a macro which selects for backward compatibility
the tv_sec member of a struct timeval value.'' */
tm = UT_TIME_MEMBER (utmp_ent);
printf (" %-12.12s", ctime (&tm) + 4);
if (include_idle)
{
if (last_change)
printf (" %s", idle_string (last_change));
else
printf (" . ");
}
#if HAVE_UT_HOST
if (utmp_ent->ut_host[0])
{
@@ -202,31 +313,149 @@ print_entry (const STRUCT_UTMP *utmp_ent)
host = ut_host;
if (display)
printf (" (%s:%s)", host, display);
{
if (hostlen < strlen (host) + strlen (display) + 4)
{
hostlen = strlen (host) + strlen (display) + 4;
hoststr = (char *) realloc (hoststr, hostlen);
}
sprintf (hoststr, "(%s:%s)", host, display);
}
else
printf (" (%s)", host);
{
if (hostlen < strlen (host) + 3)
{
hostlen = strlen (host) + 3;
hoststr = (char *) realloc (hoststr, hostlen);
}
sprintf (hoststr, "(%s)", host);
}
}
else
{
if (hostlen < 1)
{
hostlen = 1;
hoststr = (char *) realloc (hoststr, hostlen);
}
stpcpy (hoststr, "");
}
#endif
putchar ('\n');
print_line (UT_USER (utmp_ent), mesg, utmp_ent->ut_line,
time_string (utmp_ent), idlestr, pidstr,
hoststr ? hoststr : "", "");
}
static void
print_boottime (const STRUCT_UTMP *utmp_ent)
{
print_line ("", ' ', "system boot", time_string (utmp_ent), "", "", "", "");
}
static void
print_deadprocs (const STRUCT_UTMP *utmp_ent)
{
static char *comment, *exitstr;
PIDSTR_DECL_AND_INIT (pidstr);
if (!comment)
comment =
(char *) malloc (sizeof (_("id=")) + sizeof (utmp_ent->ut_id) + 1);
sprintf (comment, "%s%.*s", _("id="), sizeof utmp_ent->ut_id,
utmp_ent->ut_id);
if (!exitstr)
exitstr = (char *) malloc (sizeof (_("term="))
+ INT_STRLEN_BOUND (utmp_ent->ut_exit.e_termination) + 1
+ sizeof (_("exit="))
+ INT_STRLEN_BOUND (utmp_ent->ut_exit.e_exit)
+ 1);
sprintf (exitstr, "%s%d %s%d", _("term="), utmp_ent->ut_exit.e_termination,
_("exit="), utmp_ent->ut_exit.e_exit);
/* FIXME: add idle time? */
print_line ("", ' ', utmp_ent->ut_line,
time_string (utmp_ent), "", pidstr, comment, exitstr);
}
static void
print_login (const STRUCT_UTMP *utmp_ent)
{
static char *comment;
PIDSTR_DECL_AND_INIT (pidstr);
if (!comment)
comment =
(char *) malloc (sizeof (_("id=")) + sizeof (utmp_ent->ut_id) + 1);
sprintf (comment, "%s%s", _("id="), utmp_ent->ut_id);
/* FIXME: add idle time? */
print_line ("LOGIN", ' ', utmp_ent->ut_line,
time_string (utmp_ent), "", pidstr, comment, "");
}
static void
print_initspawn (const STRUCT_UTMP *utmp_ent)
{
static char *comment;
PIDSTR_DECL_AND_INIT (pidstr);
if (!comment)
comment =
(char *) malloc (sizeof (_("id=")) + sizeof (utmp_ent->ut_id) + 1);
sprintf (comment, "%s%s", _("id="), utmp_ent->ut_id);
print_line ("", ' ', utmp_ent->ut_line,
time_string (utmp_ent), "", pidstr, comment, "");
}
static void
print_clockchange (const STRUCT_UTMP *utmp_ent)
{
/* FIXME: handle NEW_TIME & OLD_TIME both */
print_line ("", ' ', _("clock change"),
time_string (utmp_ent), "", "", "", "");
}
static void
print_runlevel (const STRUCT_UTMP *utmp_ent)
{
static char *runlevline, *comment;
/* FIXME: The following is correct for linux, may need help
on other platforms */
#if 1 || HAVE_STRUCT_XTMP_UT_PID
int last = utmp_ent->ut_pid / 256;
int curr = utmp_ent->ut_pid % 256;
#endif
if (!runlevline)
runlevline = (char *) malloc (sizeof (_("run-level")) + 3);
sprintf (runlevline, "%s %c", _("run-level"), curr);
if (!comment)
comment = (char *) malloc (sizeof (_("last=")) + 2);
sprintf (comment, "%s%c", _("last="), (last == 'N') ? 'S' : last);
print_line ("", ' ', runlevline, time_string (utmp_ent),
"", "", comment, "");
return;
}
/* Print the username of each valid entry and the number of valid entries
in UTMP_BUF, which should have N elements. */
static void
list_entries_who (int n, const STRUCT_UTMP *utmp_buf)
{
int entries;
int entries = 0;
entries = 0;
while (n--)
{
if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif
)
if (UT_USER (utmp_buf)[0] && UT_TYPE (utmp_buf) == USER_PROCESS)
{
char *trimmed_name;
@@ -244,38 +473,59 @@ list_entries_who (int n, const STRUCT_UTMP *utmp_buf)
static void
print_heading (void)
{
printf ("%-8s ", _("USER"));
if (include_mesg)
printf (_("MESG "));
printf ("%-8s ", _("LINE"));
printf (_("LOGIN-TIME "));
if (include_idle)
printf (_("IDLE "));
printf (_("FROM\n"));
print_line (_("NAME"), ' ', _("LINE"), _("TIME"), _("IDLE"), _("PID"),
_("COMMENT"), _("EXIT"));
}
/* Display UTMP_BUF, which should have N entries. */
static void
scan_entries (int n, const STRUCT_UTMP *utmp_buf)
{
char *ttyname_b IF_LINT ( = NULL);
if (include_heading)
print_heading ();
if (my_line_only)
{
ttyname_b = ttyname (0);
if (!ttyname_b)
return;
if (strncmp (ttyname_b, DEV_DIR_WITH_TRAILING_SLASH, DEV_DIR_LEN) == 0)
ttyname_b += DEV_DIR_LEN; /* Discard /dev/ prefix. */
}
while (n--)
{
if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif
)
print_entry (utmp_buf);
if (!my_line_only ||
strncmp (ttyname_b, utmp_buf->ut_line,
sizeof (utmp_buf->ut_line)) == 0)
{
if (need_users && UT_USER (utmp_buf)[0]
&& UT_TYPE (utmp_buf) == USER_PROCESS)
print_user (utmp_buf);
else if (need_runlevel && UT_TYPE (utmp_buf) == RUN_LVL)
print_runlevel (utmp_buf);
else if (need_boottime && UT_TYPE (utmp_buf) == BOOT_TIME)
print_boottime (utmp_buf);
/* I've never seen one of these, so I don't know what it should
look like :^)
FIXME: handle OLD_TIME also, perhaps show the delta? */
else if (need_clockchange && UT_TYPE (utmp_buf) == NEW_TIME)
print_clockchange (utmp_buf);
else if (need_initspawn && UT_TYPE (utmp_buf) == INIT_PROCESS)
print_initspawn (utmp_buf);
else if (need_login && UT_TYPE (utmp_buf) == LOGIN_PROCESS)
print_login (utmp_buf);
else if (need_deadprocs && UT_TYPE (utmp_buf) == DEAD_PROCESS)
print_deadprocs (utmp_buf);
}
utmp_buf++;
}
}
/* Display a list of who is on the system, according to utmp file FILENAME. */
/* Display a list of who is on the system, according to utmp file filename. */
static void
who (const char *filename)
{
@@ -292,67 +542,6 @@ who (const char *filename)
scan_entries (n_users, utmp_buf);
}
/* Search UTMP_CONTENTS, which should have N entries, for
an entry with a `ut_line' field identical to LINE.
Return the first matching entry found, or NULL if there
is no matching entry. */
static const STRUCT_UTMP *
search_entries (int n, const STRUCT_UTMP *utmp_buf, const char *line)
{
while (n--)
{
if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif
&& !strncmp (line, utmp_buf->ut_line, sizeof (utmp_buf->ut_line)))
return utmp_buf;
utmp_buf++;
}
return NULL;
}
/* Display the entry in utmp file FILENAME for this tty on standard input,
or nothing if there is no entry for it. */
static void
who_am_i (const char *filename)
{
const STRUCT_UTMP *utmp_entry;
STRUCT_UTMP *utmp_buf;
char hostname[MAXHOSTNAMELEN + 1];
char *tty;
int fail;
int n_users;
if (gethostname (hostname, MAXHOSTNAMELEN + 1))
*hostname = 0;
if (include_heading)
{
printf ("%*s ", (int) strlen (hostname), " ");
print_heading ();
}
tty = ttyname (0);
if (tty == NULL)
return;
tty += 5; /* Remove "/dev/". */
fail = read_utmp (filename, &n_users, &utmp_buf);
if (fail)
error (1, errno, "%s", filename);
utmp_entry = search_entries (n_users, utmp_buf, tty);
if (utmp_entry == NULL)
return;
printf ("%s!", hostname);
print_entry (utmp_entry);
}
void
usage (int status)
{
@@ -364,13 +553,24 @@ usage (int status)
printf (_("Usage: %s [OPTION]... [ FILE | ARG1 ARG2 ]\n"), program_name);
printf (_("\
\n\
-a, --all same as -b -d --login -p -r -t -T -u\n\
-b, --boot time of last system boot\n\
-d, --dead print dead processes\n\
-H, --heading print line of column headings\n\
-i, -u, --idle add user idle time as HOURS:MINUTES, . or old\n\
-i, --idle add idle time as HOURS:MINUTES, . or old\n\
(deprecated, use -u)\n\
--login print system login processes\n\
(equivalent to SUS -l)\n\
-l, --lookup attempt to canonicalize hostnames via DNS\n\
(-l is deprecated, use --lookup)\n\
-m only hostname and user associated with stdin\n\
-p, --process print active processes spawned by init\n\
-q, --count all login names and number of users logged on\n\
-s (ignored)\n\
-r, --runlevel print current runlevel\n\
-s, --short print only name, line, and time (default)\n\
-t, --time print last system clock change\n\
-T, -w, --mesg add user's message status as +, - or ?\n\
-u, --users lists users logged in\n\
--message same as -T\n\
--writable same as -T\n\
--help display this help and exit\n\
@@ -388,7 +588,7 @@ int
main (int argc, char **argv)
{
int optc, longind;
int my_line_only = 0;
int assumptions = 1;
program_name = argv[0];
setlocale (LC_ALL, "");
@@ -397,70 +597,136 @@ main (int argc, char **argv)
atexit (close_stdout);
while ((optc = getopt_long (argc, argv, "ilmqsuwHT", longopts, &longind))
!= -1)
while ((optc = getopt_long (argc, argv, "abdilmpqrstuwHT", longopts,
&longind)) != -1)
{
switch (optc)
{
case 0:
break;
case 'm':
my_line_only = 1;
break;
case 'l':
do_lookup = 1;
break;
case 'q':
short_list = 1;
break;
case 's':
break;
case 'i':
case 'u':
case 'a':
need_boottime = 1;
need_deadprocs = 1;
need_login = 1;
need_initspawn = 1;
need_runlevel = 1;
need_clockchange = 1;
need_users = 1;
include_mesg = 1;
include_idle = 1;
include_exit = 1;
assumptions = 0;
break;
case 'b':
need_boottime = 1;
assumptions = 0;
break;
case 'd':
need_deadprocs = 1;
include_idle = 1;
include_exit = 1;
assumptions = 0;
break;
case 'H':
include_heading = 1;
break;
case 'w':
/* FIXME: This should be -l in a future version */
case LOGIN_OPTION:
need_login = 1;
include_idle = 1;
assumptions = 0;
break;
case 'm':
my_line_only = 1;
break;
case 'p':
need_initspawn = 1;
assumptions = 0;
break;
case 'q':
short_list = 1;
break;
case 'r':
need_runlevel = 1;
include_idle = 1;
assumptions = 0;
break;
case 's':
short_output = 1;
break;
case 't':
need_clockchange = 1;
assumptions = 0;
break;
case 'T':
case 'w':
include_mesg = 1;
break;
case_GETOPT_HELP_CHAR;
case 'i':
error (0, 0,
_("Warning: -i will be removed in a future release; \
use -u instead"));
/* Fall through. */
case 'u':
need_users = 1;
include_idle = 1;
assumptions = 0;
break;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
case 'l':
error (0, 0,
_("Warning: the meaning of '-l' will change in a future\
release to conform to POSIX"));
case LOOKUP_OPTION:
do_lookup = 1;
break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (1);
}
}
if (assumptions)
{
need_users = 1;
short_output = 1;
}
if (include_exit)
{
short_output = 0;
}
switch (argc - optind)
{
case 0: /* who */
if (my_line_only)
who_am_i (UTMP_FILE);
else
who (UTMP_FILE);
who (UTMP_FILE);
break;
case 1: /* who <utmp file> */
if (my_line_only)
who_am_i (argv[optind]);
else
who (argv[optind]);
who (argv[optind]);
break;
case 2: /* who <blurf> <glop> */
who_am_i (UTMP_FILE);
my_line_only = 1;
who (UTMP_FILE);
break;
default: /* lose */

View File

@@ -12,7 +12,7 @@ use FileHandle;
use File::Compare qw(compare);
@ISA = qw(Exporter);
($VERSION = '$Revision: 1.10 $ ') =~ tr/[0-9].//cd;
($VERSION = '$Revision: 1.11 $ ') =~ tr/[0-9].//cd;
@EXPORT = qw (run_tests);
my $debug = $ENV{DEBUG};
@@ -189,7 +189,7 @@ sub run_tests ($$$$$)
# FIXME
# Verify that test names are distinct.
my $found_duplicate = 0;
my $bad_test_name = 0;
my %seen;
my $t;
foreach $t (@$t_spec)
@@ -198,11 +198,20 @@ sub run_tests ($$$$$)
if ($seen{$test_name})
{
warn "$program_name: $test_name: duplicate test name\n";
$found_duplicate = 1;
$bad_test_name = 1;
}
$seen{$test_name} = 1;
# The test name may be no longer than 12 bytes,
# so that we can add a two-byte suffix without exceeding
# the maximum of 14 imposed on some old file systems.
if (14 < (length $test_name) + 2)
{
warn "$program_name: $test_name: test name is too long (> 12)\n";
$bad_test_name = 1;
}
}
return 1 if $found_duplicate;
return 1 if $bad_test_name;
# FIXME check exit status
system ($prog, '--version') if $verbose;

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -47,22 +47,16 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -83,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -94,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -109,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = basic
@@ -131,22 +122,25 @@ TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH \
PROG=basename
EXEEXT =
OBJEXT = o
subdir = tests/basename
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/basename/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/basename/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +207,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -223,68 +221,81 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
all-am: Makefile
install-data-am:
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
installdirs:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic uninstall uninstall-am
distclean: distclean-am
clean-am: clean-generic mostlyclean-am
distclean-am: clean-am distclean-generic
maintainer-clean: maintainer-clean-am
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean: clean-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = basic deref recurse
@@ -134,19 +126,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/chgrp/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +203,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -239,23 +233,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -264,11 +255,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -276,7 +267,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -290,14 +281,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = equal-x c-option setgid
@@ -134,19 +126,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/chmod/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +203,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -239,23 +233,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -264,11 +255,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -276,7 +267,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -290,14 +281,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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.

7
tests/chown/Makefile.am Normal file
View File

@@ -0,0 +1,7 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = basic
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH

298
tests/chown/Makefile.in Normal file
View File

@@ -0,0 +1,298 @@
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
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 = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
NEED_SETGID = @NEED_SETGID@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = basic
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH
EXEEXT =
OBJEXT = o
subdir = tests/chown
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/chown/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
list='$(TESTS)'; \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
;; \
*) \
echo "PASS: $$tst"; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
*) \
failed=`expr $$failed + 1`; \
echo "FAIL: $$tst"; \
;; \
esac; \
fi; \
done; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all tests failed"; \
else \
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
fi; \
fi; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
fi
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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:

39
tests/chown/basic Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
# make sure chown --from=... works
if test "$VERBOSE" = yes; then
set -x
chgrp --version
fi
. $srcdir/../envvar-check
. $srcdir/../lang-default
. $srcdir/../root-only
pwd=`pwd`
tmp=basic.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
touch f || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
(exit 1); exit
fi
fail=0
chown 0:1 f
# Make sure the owner and group are 0 and 1 respectively.
set _ `ls -n f`; shift; test "$3:$4" = 0:1 || fail=1
chown --from=0:1 2:3 f || fail=1
# And now they should be 2 and 3 respectively.
set _ `ls -n f`; shift; test "$3:$4" = 2:3 || fail=1
(exit $fail); exit

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
@@ -140,19 +132,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/cp/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -219,7 +209,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -245,23 +239,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -270,11 +261,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -282,7 +273,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -296,14 +287,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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

@@ -10,6 +10,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
. $srcdir/../root-only
pwd=`pwd`
tmp=spec-bits.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
@@ -19,25 +21,6 @@ framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
touch file || framework_failure=1
chmod u-w file || framework_failure=1
(echo foo >> file) >/dev/null 2>&1 || {
echo '********************************************'
echo "$0: NOTICE: This test must be run as root."
echo "You can do the following as \`root' to run just this test:"
echo ""
echo "cd $pwd && $MAKE check TESTS=special-bits"
echo ""
echo "Here's a minimalist version. It outputs nothing when the test"
echo "succeeds, and \`FAIL' if it fails."
echo ""
echo "cd $pwd \\"
echo " && env PATH=../../src:\$PATH MAKE=$MAKE ./special-bits || echo FAIL"
echo ""
echo '********************************************'
exit 77
}
touch a b || framework_failure=1
chmod u+sx,go= a || framework_failure=1
chmod u=rwx,g=sx,o= b || framework_failure=1

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -47,22 +47,16 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -83,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -94,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -102,23 +94,23 @@ NEED_SETGID = @NEED_SETGID@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
PERL = @PERL@
x = date
explicit =
@@ -150,8 +142,6 @@ relative-2.O relative-2.E
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
noinst_SCRIPTS = $x-tests
PERL = @PERL@
editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,@srcdir@,g'
TESTS = $x-tests
@@ -160,24 +150,27 @@ mk_script = $(srcdir)/../mk-script
MAINTAINERCLEANFILES = $x-tests $(maint_gen)
CLEANFILES = $(run_gen)
EXEEXT =
OBJEXT = o
subdir = tests/date
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SCRIPTS = $(noinst_SCRIPTS)
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
CONFIG_CLEAN_FILES =
SCRIPTS = $(noinst_SCRIPTS)
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/date/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/date/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -244,7 +237,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -254,69 +251,83 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
all-am: Makefile $(SCRIPTS)
install-data-am:
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile $(SCRIPTS)
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
installdirs:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic uninstall uninstall-am
distclean: distclean-am
clean-am: clean-generic mostlyclean-am
distclean-am: clean-am distclean-generic
maintainer-clean: maintainer-clean-am
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean: clean-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
$(srcdir)/$x-tests: $(mk_script) Test.pm
$(PERL) -I$(srcdir) -w -- $(mk_script) ../../src/$x > $@.n
@@ -333,7 +344,6 @@ Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
$(PERL) -I$(srcdir) -w -- $(mk_script) --list >> $@t
sed -n '/^##test-files-end/,$$p' $< >> $@t
mv $@t $@
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
@@ -138,19 +130,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/dd/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -217,7 +207,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -243,23 +237,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -268,11 +259,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -280,7 +271,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -294,14 +285,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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

@@ -27,7 +27,7 @@ my $script_name = $ENV{SCRIPT_NAME};
my @Tests =
(
[
'1', qw (bs=1 skip=1 seek=2 conv=notrunc count=3 of=@AUX@ < ),
'skip-seek-1', qw (bs=1 skip=1 seek=2 conv=notrunc count=3 of=@AUX@ < ),
{IN=> '0123456789abcdef'},
{AUX=> 'zyxwvutsrqponmlkji'},
{OUT=> ''},
@@ -35,7 +35,7 @@ my @Tests =
{CMP=> ['zy123utsrqponmlkji', {'@AUX@'=> undef}]},
],
[
'3', qw (bs=5 skip=1 seek=1 conv=notrunc count=1 of=@AUX@ < ),
'skip-seek-2', qw (bs=5 skip=1 seek=1 conv=notrunc count=1 of=@AUX@ < ),
{IN=> '0123456789abcdef'},
{AUX=> 'zyxwvutsrqponmlkji'},
{OUT=> ''},
@@ -43,13 +43,21 @@ my @Tests =
{CMP=> ['zyxwv56789ponmlkji', {'@AUX@'=> undef}]},
],
[
'4', qw (bs=5 skip=1 seek=1 count=1 of=@AUX@ < ),
'skip-seek-3', qw (bs=5 skip=1 seek=1 count=1 of=@AUX@ < ),
{IN=> '0123456789abcdef'},
{AUX=> 'zyxwvutsrqponmlkji'},
{OUT=> ''},
{ERR=> "1+0 records in\n1+0 records out\n"},
{CMP=> ['zyxwv56789', {'@AUX@'=> undef}]},
],
[
# Before fileutils-4.0.45, the last 10 bytes of output
# were these "\0\0\0\0\0\0\0\0 ".
'block-sync-1', qw(ibs=10 cbs=10), 'conv=block,sync', '<',
{IN=> "01234567\nabcdefghijkl\n"},
{OUT=> "01234567 abcdefghij "},
{ERR=> "2+1 records in\n0+1 records out\n1 truncated record\n"},
],
);
my $save_temps = $ENV{DEBUG};

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
@@ -138,19 +130,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/dircolors/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -217,7 +207,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -243,23 +237,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -268,11 +259,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -280,7 +271,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -294,14 +285,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = two-args
@@ -134,19 +126,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/du/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +203,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -239,23 +233,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -264,11 +255,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -276,7 +267,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -290,14 +281,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -47,22 +47,16 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -83,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -94,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -109,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.3b gnits
TESTS = basic
@@ -131,22 +122,25 @@ TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH \
PROG=factor
EXEEXT =
OBJEXT = o
subdir = tests/factor
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/factor/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/factor/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +207,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -223,68 +221,81 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
all-am: Makefile
install-data-am:
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
installdirs:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic uninstall uninstall-am
distclean: distclean-am
clean-am: clean-generic mostlyclean-am
distclean-am: clean-am distclean-generic
maintainer-clean: maintainer-clean-am
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean: clean-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = basic-1 create-leading
@@ -134,19 +126,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/install/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +203,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -239,23 +233,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -264,11 +255,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -276,7 +267,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -290,14 +281,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.2 gnits
TESTS = sf-1 misc backup-1
@@ -134,19 +126,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/ln/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -213,7 +203,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -239,23 +233,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -264,11 +255,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -276,7 +267,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -290,14 +281,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
@@ -138,19 +130,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/ls-2/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -217,7 +207,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -243,23 +237,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -268,11 +259,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -280,7 +271,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -294,14 +285,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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

@@ -58,11 +58,10 @@ my @Tests =
['R-dot', '--ignore="[a-ce-zA-Z]*" -R .', {OUT => ".:\nd\n\n\./d:\n"},
$mkdir, $rmdir],
# FIXME: change the trailing `/' to be a `@'.
['slink-dir', '-Fd d', {OUT => "d/\n"}, $slink_d, $unlink_d],
# FIXME: uncomment the following once ls has been fixed
# ['slink-dir2', '-F d', {OUT => "d\@/\n"}, $slink_d, $unlink_d],
['slink-dir-F', '-F d', {OUT => "d@\n"}, $slink_d, $unlink_d],
['slink-dir-dF', '-dF d', {OUT => "d@\n"}, $slink_d, $unlink_d],
['slinkdir-dFH', '-dFH d', {OUT => "d/\n"}, $slink_d, $unlink_d],
['slinkdir-dFL', '-dFL d', {OUT => "d/\n"}, $slink_d, $unlink_d],
# From Stéphane Chazelas.
['no-a-isdir-b', 'no-dir d',

View File

@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = 1.2 gnits
TESTS = rt-1 time-1 symlink-slash follow-slink
TESTS = rt-1 time-1 symlink-slash follow-slink no-arg
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,20 +101,19 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.2 gnits
TESTS = rt-1 time-1 symlink-slash follow-slink
TESTS = rt-1 time-1 symlink-slash follow-slink no-arg
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
@@ -137,19 +129,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/ls/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -216,7 +206,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -242,23 +236,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -267,11 +258,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -279,7 +270,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -293,14 +284,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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.

59
tests/ls/no-arg Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/sh
# make sure ls and `ls -R' do the right thing when invoked with no arguments.
if test "$VERBOSE" = yes; then
set -x
ls --version
fi
pwd=`pwd`
tmp=no-args.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
mkdir -p dir/subdir || framework_failure=1
touch dir/subdir/file2 || framework_failure=1
ln -s f symlink || framework_failure=1
cat > exp <<\EOF || framework_failure=1
dir
exp
out
symlink
EOF
if test $framework_failure = 1; then
echo 'failure in testing framework'
(exit 1); exit
fi
fail=0
ls > out || fail=1
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
cat > exp <<\EOF
.:
dir
exp
out
symlink
./dir:
subdir
./dir/subdir:
file2
EOF
ls -R > out || fail=1
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
(exit $fail); exit

View File

@@ -6,10 +6,14 @@ if test "$VERBOSE" = yes; then
ls --version
fi
# Date output in ls -l is locale-sensitive, so this test fails if the
# current locale produces a date that doesn't match the embedded value
# here (Jan 15 23:00:00 1998), which is in the C (POSIX) locale.
. $srcdir/../lang-default
# Avoid any possible glitches due to daylight-saving changes near the
# time stamps used during the test.
TZ=UTC0
export TZ
# Avoid glitches due to the environment specifying `ls' styles.
unset QUOTING_STYLE
unset TIME_STYLE
tmp=t-ls.$$
@@ -51,15 +55,15 @@ ln c d || framework_failure=1
# Before we go any further, verify that touch's -m option works.
set -- `ls --full -l a`
case "$*" in
*'Jan 15 23:00:00 1998 a') ;;
*" $t3:00.000000000 +0000 a") ;;
*)
# This might be what's making HPUX 11 systems fail this test.
cat >&2 << \EOF
A basic test of touch -a has just failed, so the subsequent
cat >&2 << EOF
A basic test of touch -m has just failed, so the subsequent
tests in this file will not be run.
In the output below, the date of last modification for `a' should
have been Jan 15 23:00:00 1998.
In the output below, the date of last modification for \`a' should
have been $t3.
EOF
#`
ls --full -l a
@@ -70,15 +74,15 @@ esac
# Now test touch's -a option.
set -- `ls --full -lu a`
case "$*" in
*'Jan 14 11:00:00 1998 a') ;;
*" $u1:00.000000000 +0000 a") ;;
*)
# This might be what's making HPUX 11 systems fail this test.
cat >&2 << \EOF
A basic test of touch -m has just failed, so the subsequent
cat >&2 << EOF
A basic test of touch -a has just failed, so the subsequent
tests in this file will not be run.
In the output below, the date of last access for `a' should
have been Jan 14 11:00:00 1998.
In the output below, the date of last access for \`a' should
have been $u1.
EOF
ls --full -lu a
framework_failure=1

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = p-1 p-2 special-1 perm parents t-slash
@@ -135,19 +127,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/mkdir/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -214,7 +204,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -240,23 +234,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -265,11 +256,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -277,7 +268,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -291,14 +282,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4e from Makefile.am.
# Makefile.in generated automatically by automake 1.4g from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -11,6 +11,8 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -31,11 +33,9 @@ infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
@@ -49,19 +49,14 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
@SET_MAKE@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AWK = @AWK@
CATALOGS = @CATALOGS@
@@ -82,7 +77,6 @@ GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
@@ -93,7 +87,6 @@ LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -108,17 +101,16 @@ POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
_am_include = @_am_include@
_am_quote = @_am_quote@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = i-2 mv-special-1 into-self into-self-2 into-self-3 into-self-4 \
@@ -141,19 +133,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits tests/mv/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
@@ -220,7 +210,11 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
@@ -246,23 +240,20 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -271,11 +262,11 @@ distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi:
dvi: dvi-am
dvi-am:
info:
info: info-am
info-am:
@@ -283,7 +274,7 @@ install-data-am:
install-exec-am:
install-info:
install-info: install-info-am
install-man:
@@ -297,14 +288,17 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# 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.

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