Jim Meyering
09d96ac539
(make_path): Reformat 3 if-stmts to test `if (newly_created_dir)' only once.
...
Suggestion from Andreas Schwab.
1998-01-10 10:28:37 +00:00
Jim Meyering
3edbca0e04
(make_path): Put only newly created directories on the LEADING_DIRS list.
1998-01-10 10:22:30 +00:00
Jim Meyering
0fdd1b9130
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.
1998-01-06 23:53:33 +00:00
Jim Meyering
e162abfc5b
(get_fs_usage): Add parens.
1998-01-05 17:38:38 +00:00
Jim Meyering
866773c72a
(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.
1998-01-05 17:33:54 +00:00
Jim Meyering
0e69432852
.
1998-01-04 22:46:40 +00:00
Jim Meyering
b246280c27
(parse_long_options): Check for write error to stdout before exiting.
1998-01-04 22:43:44 +00:00
Jim Meyering
60e021ee4e
(libfu_a_SOURCES): Add closeout.c.
...
(noinst_HEADERS): Add closeout.h.
1998-01-04 22:42:38 +00:00
Jim Meyering
109b9c5f94
.
1998-01-04 21:48:30 +00:00
Jim Meyering
126c1a40e5
.
1998-01-04 21:47:31 +00:00
Jim Meyering
2440fd8bac
.
1998-01-03 22:53:52 +00:00
Jim Meyering
d46bab3a59
Guard PARAMS-enabling definition with
...
`defined PROTOTYPES || (defined __STDC__ && __STDC__)' to be consistent.
1998-01-03 11:56:58 +00:00
Jim Meyering
541699c01c
Guard PARAMS-enabling definition with
...
`defined PROTOTYPES || (defined __STDC__ && __STDC__)' to avoid
problems with Irix4's cc. From Kaveh Ghazi.
1998-01-03 11:56:09 +00:00
Jim Meyering
53bc7b04cb
(make_path): Try to change ownership only if we've just created the
...
directory. Fix latent bug (s/&&/||/ in two places -- also, note that
it could not be exercised via install or mkdir) whereby chown would
not be invoked when only one of owner/group is not -1.
1998-01-02 23:15:39 +00:00
Jim Meyering
b66148ba39
Define and use PARAMS, not __EXCLUDE_P.
1997-12-31 11:01:35 +00:00
Jim Meyering
86d2f9eaa8
Use PARAMS, not __EXCLUDE_P.
1997-12-31 11:01:18 +00:00
Jim Meyering
f7d4fc0e38
(invalid_arg): Use a single fprintf and whole
...
format statements to ease translation.
Convert from K&R to ANSI function dcls.
1997-12-29 12:02:43 +00:00
Jim Meyering
ce9923ab87
Use ANSI syntax, not K&R.
1997-12-28 10:41:01 +00:00
Jim Meyering
b2e7f8b0af
(make_path) [!__STDC__]: Remove K&R-style definition.
1997-12-28 10:38:15 +00:00
Jim Meyering
08c3f260a1
define PARAMS
1997-12-28 09:48:26 +00:00
Jim Meyering
cde7e42dde
Add PARAMS.
1997-12-28 08:04:08 +00:00
Jim Meyering
bb48c492c6
(_GNU_SOURCE): Define only if not already defined.
1997-12-25 17:44:08 +00:00
Jim Meyering
d9f1fd86d9
Declare stpcpy only if not defined as macro.
1997-12-25 17:02:25 +00:00
Jim Meyering
9897ca0150
Declare stpcpy only if not defined as macro.
1997-12-25 16:49:08 +00:00
Jim Meyering
1a8e1f7bfd
Include <string.h> if available.
1997-12-25 16:48:51 +00:00
Jim Meyering
3d0e13a00d
.
1997-12-21 12:29:32 +00:00
Jim Meyering
a1003f154f
remove FIXME-describe comments
1997-12-21 11:57:17 +00:00
Jim Meyering
3ba71d6de1
add FIXME-describe comments
1997-12-21 11:56:34 +00:00
Jim Meyering
a3e0b4392c
(libfu_a_SOURCES): Add exclude.c.
...
(noinst_HEADERS): Add exclude.h.
1997-12-21 11:46:49 +00:00
Jim Meyering
cbd71d8eea
.
1997-12-21 11:43:34 +00:00
Jim Meyering
727298f3f5
Use PARAMS, not __P.
1997-12-21 11:22:51 +00:00
Jim Meyering
27d24b46ad
(rpl_chown): Rename from chown.
...
Undefine chown just after including config.h.
Include sys/stat.h.
Use correct ordering of uid and gid parameters both in function
definition and in call to chown.
With patches from Kaveh Ghazi.
1997-12-21 11:17:20 +00:00
Jim Meyering
ef938e62d0
s/HAVE_DECLARATION_/HAVE_DECL_/.
1997-12-14 15:15:07 +00:00
Jim Meyering
e68f7b2e4b
cast memcpy to char*
1997-12-14 15:12:29 +00:00
Jim Meyering
b5697888a0
.
1997-12-13 22:55:52 +00:00
Jim Meyering
5d1987b3da
.
1997-12-06 09:18:32 +00:00
Jim Meyering
d91c95fda0
(re_compile_fastmap): Remove dcl of unused num_regs.
1997-12-06 08:27:25 +00:00
Jim Meyering
66fbc2c8f6
(savedir): Revert last change. malloc always
...
works when called with zero, because we use the wrapper if the
system version is lacking.
1997-11-30 14:20:17 +00:00
Jim Meyering
e0da3d8d39
filter through cppi
1997-11-30 11:17:28 +00:00
Jim Meyering
3f7e011ab0
remove trailing blank
1997-11-30 11:16:14 +00:00
Jim Meyering
00c42a8936
(human_readable): Convert to ANSI-style definition.
...
[lint]: Define `power'.
1997-11-30 11:10:24 +00:00
Jim Meyering
5320bf5037
filter through cppi
1997-11-30 11:08:39 +00:00
Jim Meyering
79111711fe
.
1997-11-30 11:08:23 +00:00
Jim Meyering
dcd4c05dfa
(savedir): Check for size zero before invoking
...
malloc; this can occur if st_size arg overflows on conversion to
unsigned int. All callers now cast st_size arg to unsigned int.
1997-11-30 10:24:41 +00:00
Jim Meyering
07783bcdf0
(getuidbyname, getgidbyname): Names can now
...
be NULL in cache. This change merely fixes ifdeffed-out code.
1997-11-30 10:24:38 +00:00
Jim Meyering
240cb49efe
New file. The interface is inspired
...
by the human_readable function that was in du.c, but it's pretty
much rewritten from scratch.
1997-11-30 10:24:32 +00:00
Jim Meyering
412d0aba50
(struct fs_usage): New member fsu_blocksize.
...
Other members are now uintmax_t, not long.
1997-11-30 10:24:28 +00:00
Jim Meyering
25fabf3d2d
Do all calculations using uintmax_t.
...
Include <inttypes.h> if available.
(adjust_blocks, CONVERT_BLOCKS): Remove.
(get_fs_usage): Set new member fsu_blocksize, and do not convert
numbers to 512-byte block units; this avoids overflow here.
Cast lseek arg to off_t, not long.
1997-11-30 10:24:24 +00:00
Jim Meyering
f633782aa1
(st_blocks): long -> off_t.
...
Avoid arithmetic overflow when size is near max.
Depend on _POSIX_SOURCE and BSIZE, not _POSIX_VERSION, for
compatibility with system.h.
(BSIZE): Remove definition, since if BSIZE is not defined
we're never invoked.
1997-11-30 10:24:20 +00:00
Jim Meyering
ce43e130bb
(libfu_a_SOURCES): Add new file human.c.
...
(noinst_HEADERS): Add new file human.h.
1997-11-30 10:24:16 +00:00