platform/upstream/coreutils.git
26 years ago(quit): Declare to be inline to stifle compile warning.
Jim Meyering [Thu, 22 Jan 1998 08:58:12 +0000 (08:58 +0000)]
(quit): Declare to be inline to stifle compile warning.

26 years agoReorder functions to obviate forward dcls.
Jim Meyering [Thu, 22 Jan 1998 08:55:13 +0000 (08:55 +0000)]
Reorder functions to obviate forward dcls.

26 years ago(do_copy): Add unreachable `return 0' to stifle warning.
Jim Meyering [Thu, 22 Jan 1998 08:36:27 +0000 (08:36 +0000)]
(do_copy): Add unreachable `return 0' to stifle warning.

26 years ago.
Jim Meyering [Thu, 22 Jan 1998 08:33:34 +0000 (08:33 +0000)]
.

26 years ago(TESTS_ENVIRONMENT): Add TOUCH.
Jim Meyering [Thu, 22 Jan 1998 08:33:26 +0000 (08:33 +0000)]
(TESTS_ENVIRONMENT): Add TOUCH.

26 years agominor tweaks
Jim Meyering [Thu, 22 Jan 1998 08:33:02 +0000 (08:33 +0000)]
minor tweaks

26 years agoDon't use -f. Do adjust $RM if it's a relative path.
Jim Meyering [Thu, 22 Jan 1998 08:32:22 +0000 (08:32 +0000)]
Don't use -f.  Do adjust $RM if it's a relative path.

26 years agoUse GNU touch to work around problems with NFS caching and/or clock skew.
Jim Meyering [Thu, 22 Jan 1998 08:27:16 +0000 (08:27 +0000)]
Use GNU touch to work around problems with NFS caching and/or clock skew.

26 years ago(copy_internal): Use x->backup_type, not the global.
Jim Meyering [Thu, 22 Jan 1998 08:22:00 +0000 (08:22 +0000)]
(copy_internal): Use x->backup_type, not the global.
(valid_options): Use VALID_BACKUP_TYPE and VALID_SPARSE_MODE.

26 years ago[NDEBUG]: Comment out definition.
Jim Meyering [Thu, 22 Jan 1998 08:19:17 +0000 (08:19 +0000)]
[NDEBUG]: Comment out definition.
(do_copy): Use x->backup_type, not the global.

26 years ago(rm_option_init): New function.
Jim Meyering [Thu, 22 Jan 1998 08:16:09 +0000 (08:16 +0000)]
(rm_option_init): New function.
(cp_option_init): New function.
(copy_reg): Remove now-unused function.
(do_move): Set up for and use `copy.c (copy)' in place of copy_reg.
Set up for and use `remove.c (rm)' in place of unlink.

26 years agoRemove and minimally librarify guts for use in mv.c.
Jim Meyering [Thu, 22 Jan 1998 08:14:52 +0000 (08:14 +0000)]
Remove and minimally librarify guts for use in mv.c.
(main): Pass options (`&x') to rm.
Call remove_init and remove_fini instead of open-coding them.

26 years ago*** empty log message ***
Jim Meyering [Thu, 22 Jan 1998 08:14:17 +0000 (08:14 +0000)]
*** empty log message ***

26 years agoNew file. Contains guts of old rm.c.
Jim Meyering [Thu, 22 Jan 1998 08:13:57 +0000 (08:13 +0000)]
New file.  Contains guts of old rm.c.
(remove_init): New function.
(remove_fini): New function.

26 years agoDeclare new global, backup_type.
Jim Meyering [Thu, 22 Jan 1998 08:13:12 +0000 (08:13 +0000)]
Declare new global, backup_type.
(main): Initialize backup_type unconditionally.
(do_link): Call find_backup_file_name with new argument, backup_type.

26 years agoDeclare new global, backup_type.
Jim Meyering [Thu, 22 Jan 1998 08:12:24 +0000 (08:12 +0000)]
Declare new global, backup_type.
(main): Initialize backup_type unconditionally.
(copy_file): Call find_backup_file_name with new backup_type, argument.

26 years ago*** empty log message ***
Jim Meyering [Wed, 21 Jan 1998 16:37:09 +0000 (16:37 +0000)]
*** empty log message ***

26 years ago(VALID_SPARSE_MODE): Define.
Jim Meyering [Wed, 21 Jan 1998 16:16:00 +0000 (16:16 +0000)]
(VALID_SPARSE_MODE): Define.
[struct cp_options] (backup_type): New member.

26 years ago.
Jim Meyering [Wed, 21 Jan 1998 15:59:28 +0000 (15:59 +0000)]
.

26 years agoFix copyright
Jim Meyering [Wed, 21 Jan 1998 15:57:48 +0000 (15:57 +0000)]
Fix copyright

26 years agoUse ANSI function definitions.
Jim Meyering [Wed, 21 Jan 1998 15:57:18 +0000 (15:57 +0000)]
Use ANSI function definitions.
Remove global declaration of backup_type.
(simple_backup_suffix): Default to `~', not `.orig'.
Use PARAMS, not __BACKUPFILE_P.
(find_backup_file_name): Add parameter, backup_type.

26 years agoRemove extern declaration of backup_type.
Jim Meyering [Wed, 21 Jan 1998 15:55:12 +0000 (15:55 +0000)]
Remove extern declaration of backup_type.
Use PARAMS, not __BACKUPFILE_P.
(VALID_BACKUP_TYPE): Define.
(find_backup_file_name): Adjust prototype.

26 years agoUse ANSI function definitions.
Jim Meyering [Tue, 20 Jan 1998 11:34:38 +0000 (11:34 +0000)]
Use ANSI function definitions.

26 years ago[enum backup_type]: Set `none' to 1.
Jim Meyering [Tue, 20 Jan 1998 11:34:04 +0000 (11:34 +0000)]
[enum backup_type]: Set `none' to 1.

26 years agoadd `,' in comment
Jim Meyering [Mon, 19 Jan 1998 09:29:27 +0000 (09:29 +0000)]
add `,' in comment

26 years ago.
Jim Meyering [Sun, 18 Jan 1998 11:52:44 +0000 (11:52 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sun, 18 Jan 1998 11:52:38 +0000 (11:52 +0000)]
*** empty log message ***

26 years ago(strncoll, strncoll_s2_readonly, look_for_fraction, numcompare):
Jim Meyering [Sun, 18 Jan 1998 11:51:08 +0000 (11:51 +0000)]
(strncoll, strncoll_s2_readonly, look_for_fraction, numcompare):
Remove the `unsigned' from some `unsigned char*' parameter types.
Add casts via UCHAR where necessary to avoid problems with unwanted
sign extension.  Based on a patch from Kaveh Ghazi to appease Irix4's
cc compiler.
e.g.,
 > cc -DLOCALEDIR=\"/caip/u3/ghazi/foobar/share/locale\" -DHAVE_CONFIG_H
 >      -I.. -I../../src -I../../lib -I../intl -c ../../src/sort.c
 > accom: Error: ../../src/sort.c, line 500: prototype parameter 1 type
 >      must have all of the actual arguments qualifiers (except the
 >      outermost) and pointed-to types must be compatible (ANSI
 >      3.3.2.2,3.3.16.1)
 >              diff = strcoll (s1, s2);
 >        ----------------------------^
 > accom: Error: ../../src/sort.c, line 500: Argument 1 Type Doesn't
 >      Match prototype description; prototype: pointer to const char is
 >      different from actual: pointer to unsigned char
 >              diff = strcoll (s1, s2);
 >        ----------------------------^
 > accom: Error: ../../src/sort.c, line 500: prototype parameter 2 type
 >      must have all of the actual arguments qualifiers (except the
 >      outermost) and pointed-to types must be compatible (ANSI
 >      3.3.2.2,3.3.16.1)
 >              diff = strcoll (s1, s2);
 >        ----------------------------^
 > accom: Error: ../../src/sort.c, line 500: Argument 2 Type Doesn't
 >      Match prototype description; prototype: pointer to const char is
 >      different from actual: pointer to unsigned char
 >              diff = strcoll (s1, s2);
 >        ----------------------------^

26 years ago(next_file_name): Rewrite. This removes an artificial limit (albeit
Jim Meyering [Sun, 18 Jan 1998 11:18:08 +0000 (11:18 +0000)]
(next_file_name): Rewrite.  This removes an artificial limit (albeit
already high, at INT_MAX :-) on the number of files split could create.
Reported by Ralf W. Stephan.

26 years agoGuard inclusion of langinfo.h also with HAVE_LANGINFO_H,
Jim Meyering [Fri, 16 Jan 1998 23:29:24 +0000 (23:29 +0000)]
Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
for Irix-4.0.5.  From Kaveh Ghazi.

26 years ago(mergefps): Add braces to avoid ambiguous `else' statement.
Jim Meyering [Fri, 16 Jan 1998 23:23:04 +0000 (23:23 +0000)]
(mergefps): Add braces to avoid ambiguous `else' statement.
(nls_set_fraction): Likewise.

26 years ago.
Jim Meyering [Fri, 16 Jan 1998 11:18:05 +0000 (11:18 +0000)]
.

26 years ago.
Jim Meyering [Fri, 16 Jan 1998 11:17:02 +0000 (11:17 +0000)]
.

26 years agoMake PARAMS-defining conditionals consistent.
Jim Meyering [Fri, 16 Jan 1998 08:52:30 +0000 (08:52 +0000)]
Make PARAMS-defining conditionals consistent.

26 years agoMake PARAMS-defining conditionals consistent.
Jim Meyering [Fri, 16 Jan 1998 08:51:39 +0000 (08:51 +0000)]
Make PARAMS-defining conditionals consistent.

26 years ago(fail-0): Disable test. It depends on
Jim Meyering [Fri, 16 Jan 1998 08:04:19 +0000 (08:04 +0000)]
(fail-0): Disable test.  It depends on
sizeof(long) being 32 bits.  Reported by Kaveh Ghazi.

26 years ago(print_header): Fix inode format header to line it up
Jim Meyering [Wed, 14 Jan 1998 08:52:56 +0000 (08:52 +0000)]
(print_header): Fix inode format header to line it up
with the rest of the output.

26 years agoSet errno to ENOENT, not EINVAL. This is consistent
Jim Meyering [Tue, 13 Jan 1998 10:08:11 +0000 (10:08 +0000)]
Set errno to ENOENT, not EINVAL.  This is consistent
with most other implementations.

26 years ago*** empty log message ***
Jim Meyering [Tue, 13 Jan 1998 09:53:15 +0000 (09:53 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Mon, 12 Jan 1998 09:00:10 +0000 (09:00 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Mon, 12 Jan 1998 08:55:42 +0000 (08:55 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Mon, 12 Jan 1998 08:55:01 +0000 (08:55 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Mon, 12 Jan 1998 08:53:18 +0000 (08:53 +0000)]
*** empty log message ***

26 years agoInclude sys/param.h only #if HAVE_SYS_PARAM_H.
Jim Meyering [Mon, 12 Jan 1998 08:13:39 +0000 (08:13 +0000)]
Include sys/param.h only #if HAVE_SYS_PARAM_H.
Move function-spanning `#if ...BSIZE' stmt to follow inclusion of
sys/param.h since BSIZE is sometimes defined in sys/param.h.
Based on a patch from Philippe De Muyter.

26 years ago*** empty log message *** TEXTUTILS-1_22d
Jim Meyering [Sun, 11 Jan 1998 09:24:17 +0000 (09:24 +0000)]
*** empty log message ***

26 years ago. FILEUTILS-3_16k
Jim Meyering [Sun, 11 Jan 1998 09:14:29 +0000 (09:14 +0000)]
.

26 years ago.
Jim Meyering [Sun, 11 Jan 1998 09:14:02 +0000 (09:14 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sun, 11 Jan 1998 09:12:30 +0000 (09:12 +0000)]
*** empty log message ***

26 years ago.
Jim Meyering [Sun, 11 Jan 1998 08:02:39 +0000 (08:02 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 22:13:49 +0000 (22:13 +0000)]
*** empty log message ***

26 years agoCHAR_BIT SCHAR_MAX UCHAR_MAX SHRT_MAX INT_MAX UINT_MAX LONG_MAX ULONG_MAX
Jim Meyering [Sat, 10 Jan 1998 22:12:03 +0000 (22:12 +0000)]
CHAR_BIT SCHAR_MAX UCHAR_MAX SHRT_MAX INT_MAX UINT_MAX LONG_MAX ULONG_MAX
Remove definitions of those symbols.
* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
since it now includes limit.h which defines RE_DUP_MAX.
* src/nl.c: Likewise.
* src/tac.c: Likewise.

26 years ago.
Jim Meyering [Sat, 10 Jan 1998 20:53:56 +0000 (20:53 +0000)]
.

26 years agoinitialize fail to 0
Jim Meyering [Sat, 10 Jan 1998 16:25:46 +0000 (16:25 +0000)]
initialize fail to 0

26 years ago.
Jim Meyering [Sat, 10 Jan 1998 16:24:46 +0000 (16:24 +0000)]
.

26 years ago(EXTRA_DIST): Add const.m4.
Jim Meyering [Sat, 10 Jan 1998 16:24:26 +0000 (16:24 +0000)]
(EXTRA_DIST): Add const.m4.

26 years ago.
Jim Meyering [Sat, 10 Jan 1998 15:57:57 +0000 (15:57 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 15:09:46 +0000 (15:09 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 15:08:00 +0000 (15:08 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 15:04:32 +0000 (15:04 +0000)]
*** empty log message ***

26 years ago(usage): Describe -D.
Jim Meyering [Sat, 10 Jan 1998 15:03:58 +0000 (15:03 +0000)]
(usage): Describe -D.

26 years ago.
Jim Meyering [Sat, 10 Jan 1998 14:25:27 +0000 (14:25 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 14:23:08 +0000 (14:23 +0000)]
*** empty log message ***

26 years ago(batch_convert): Use memcpy when we don't need return value.
Jim Meyering [Sat, 10 Jan 1998 14:21:35 +0000 (14:21 +0000)]
(batch_convert): Use memcpy when we don't need return value.

26 years ago.
Jim Meyering [Sat, 10 Jan 1998 13:36:47 +0000 (13:36 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 13:36:09 +0000 (13:36 +0000)]
*** empty log message ***

26 years ago(usage): Correct descriptions of --sort, --time, and -t.
Jim Meyering [Sat, 10 Jan 1998 12:53:09 +0000 (12:53 +0000)]
(usage): Correct descriptions of --sort, --time, and -t.
Suggestions from Andreas Schwab.

26 years ago(decode_switches) [-u]: Fix bug whereby -u had no effect
Jim Meyering [Sat, 10 Jan 1998 12:07:50 +0000 (12:07 +0000)]
(decode_switches) [-u]: Fix bug whereby -u had no effect
without -l or -t.  Now, -u (like -c) implies --sort=time.
Suggestion from Andreas Schwab.

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 11:56:26 +0000 (11:56 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 11:54:39 +0000 (11:54 +0000)]
*** empty log message ***

26 years agouse sh-script test, not Test.pm framework
Jim Meyering [Sat, 10 Jan 1998 11:27:24 +0000 (11:27 +0000)]
use sh-script test, not Test.pm framework

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 11:24:51 +0000 (11:24 +0000)]
*** empty log message ***

26 years ago.
Jim Meyering [Sat, 10 Jan 1998 11:00:46 +0000 (11:00 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 10 Jan 1998 10:36:41 +0000 (10:36 +0000)]
*** empty log message ***

26 years ago(make_path): Reformat 3 if-stmts to test `if (newly_created_dir)' only once.
Jim Meyering [Sat, 10 Jan 1998 10:28:37 +0000 (10:28 +0000)]
(make_path): Reformat 3 if-stmts to test `if (newly_created_dir)' only once.
Suggestion from Andreas Schwab.

26 years ago(make_path): Put only newly created directories on the LEADING_DIRS list.
Jim Meyering [Sat, 10 Jan 1998 10:22:30 +0000 (10:22 +0000)]
(make_path): Put only newly created directories on the LEADING_DIRS list.

26 years ago*** empty log message ***
Jim Meyering [Thu, 8 Jan 1998 23:17:20 +0000 (23:17 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Thu, 8 Jan 1998 23:16:14 +0000 (23:16 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Thu, 8 Jan 1998 22:58:18 +0000 (22:58 +0000)]
*** empty log message ***

26 years ago(tac_stream): Don't perform arithmetic on now-void pointer
Jim Meyering [Thu, 8 Jan 1998 22:58:03 +0000 (22:58 +0000)]
(tac_stream): Don't perform arithmetic on now-void pointer
result of xrealloc (until recently it was char*).

26 years ago(inittables): Add && HAVE_NL_LANGINFO to the #if-test
Jim Meyering [Thu, 8 Jan 1998 22:56:45 +0000 (22:56 +0000)]
(inittables): Add && HAVE_NL_LANGINFO to the #if-test
guarding the nls month-checking code.
(nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
`unsigned' from dcls of text and lim.
(main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.

26 years ago*** empty log message ***
Jim Meyering [Wed, 7 Jan 1998 07:45:46 +0000 (07:45 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Tue, 6 Jan 1998 23:53:50 +0000 (23:53 +0000)]
*** empty log message ***

26 years agoAdd %expect directive.
Jim Meyering [Tue, 6 Jan 1998 23:53:33 +0000 (23:53 +0000)]
Add %expect directive.
Move inclusion of getdate.h and dependent extern declarations down
so getdate.h's prototype follows the sometimes-enabled definition
of `const' to nothing.  Otherwise, the prototype wouldn't match
the definition because of the defined-away `const'.
(get_date): ANSI-fy definition.
From Kaveh Ghazi.

26 years ago*** empty log message ***
Jim Meyering [Mon, 5 Jan 1998 17:43:31 +0000 (17:43 +0000)]
*** empty log message ***

26 years ago(df_readable): New function.
Jim Meyering [Mon, 5 Jan 1998 17:43:00 +0000 (17:43 +0000)]
(df_readable): New function.
(show_dev): If a value consists entirely of 1 bits, or is derived
from some other value that consists entirely of 1 bits, report "-".
Check inode and block counts more carefully for plausibility,
to avoid arithmetic overflow when computing percentages.

26 years ago(get_fs_usage): Add parens.
Jim Meyering [Mon, 5 Jan 1998 17:38:38 +0000 (17:38 +0000)]
(get_fs_usage): Add parens.

26 years ago(PROPAGATE_ALL_ONES): New macro.
Jim Meyering [Mon, 5 Jan 1998 17:33:54 +0000 (17:33 +0000)]
(PROPAGATE_ALL_ONES): New macro.
(get_fs_usage): If a value consists entirely of 1 bits,
propagate this info to the output by setting it to (uintmax_t) -1.

26 years agoreindent a little
Jim Meyering [Mon, 5 Jan 1998 10:11:08 +0000 (10:11 +0000)]
reindent a little

26 years agoreformat comment, dcl fail, dirname
Jim Meyering [Mon, 5 Jan 1998 10:09:24 +0000 (10:09 +0000)]
reformat comment, dcl fail, dirname

26 years agoremove SPECIAL_BITS #ifdefs
Jim Meyering [Mon, 5 Jan 1998 10:06:41 +0000 (10:06 +0000)]
remove SPECIAL_BITS #ifdefs

26 years agoAdd support for marty's -D option
Jim Meyering [Mon, 5 Jan 1998 10:06:07 +0000 (10:06 +0000)]
Add support for marty's -D option

26 years ago*** empty log message *** FILEUTILS-3_16j
Jim Meyering [Sun, 4 Jan 1998 23:28:28 +0000 (23:28 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Sun, 4 Jan 1998 23:27:12 +0000 (23:27 +0000)]
*** empty log message ***

26 years ago.
Jim Meyering [Sun, 4 Jan 1998 22:54:19 +0000 (22:54 +0000)]
.

26 years ago.
Jim Meyering [Sun, 4 Jan 1998 22:46:40 +0000 (22:46 +0000)]
.

26 years agocopyright
Jim Meyering [Sun, 4 Jan 1998 22:46:23 +0000 (22:46 +0000)]
copyright

26 years ago(main, usage): Check for write error to stdout before exiting.
Jim Meyering [Sun, 4 Jan 1998 22:45:28 +0000 (22:45 +0000)]
(main, usage): Check for write error to stdout before exiting.
Include "closeout.h".

26 years ago(parse_long_options): Check for write error to stdout before exiting.
Jim Meyering [Sun, 4 Jan 1998 22:43:44 +0000 (22:43 +0000)]
(parse_long_options): Check for write error to stdout before exiting.

26 years ago(libfu_a_SOURCES): Add closeout.c.
Jim Meyering [Sun, 4 Jan 1998 22:42:38 +0000 (22:42 +0000)]
(libfu_a_SOURCES): Add closeout.c.
(noinst_HEADERS): Add closeout.h.

26 years agoUse a single enumerated type, Verbosity, instead of
Jim Meyering [Sun, 4 Jan 1998 22:41:02 +0000 (22:41 +0000)]
Use a single enumerated type, Verbosity, instead of
the two booleans, verbose and changes_only.  This fixes a bug whereby
--change had the same effect as --verbose.
Plus Paul's close_stdout changes.