Commit Graph
15418 Commits
Author SHA1 Message Date
Jim Meyering 46c548cab4 Skip test if the file system of `.' doesn't support
sparse files -- otherwise it'd create a file of size 8GB.
This happens on Darwin6.5 with a file system of type `hfs'.
2003-05-03 14:24:37 +00:00
Jim Meyering 1867521304 . 2003-05-03 07:13:25 +00:00
Jim Meyering 3b0e09ef8c *** empty log message *** 2003-05-02 21:43:00 +00:00
Jim Meyering 35cad8ae05 (canonicalize_file_name) [!HAVE_RESOLVEPATH]:
A memory-allocation error could result in heap corruption.  Fix it
by also updating `dest' when rpath may be changed by xrealloc.
2003-05-02 21:42:51 +00:00
Jim Meyering 478239f404 *** empty log message *** 2003-05-02 19:52:59 +00:00
Jim Meyering c4ff976e20 (usage): Don't mention obsolescent -WIDTH option.
Instead explain about `-' and standard input.
(main): Give a proper diagnostic for e.g., `fmt -c -72'.
2003-05-02 19:52:48 +00:00
Jim Meyering 1e97469e5a Give a proper diagnostic for e.g., `fmt -c -72'. 2003-05-02 19:52:34 +00:00
Jim Meyering 52c96899dc *** empty log message *** 2003-05-02 19:49:06 +00:00
Jim Meyering cfed14f3cc Include "quote.h".
Use quote() in diagnostics, rather than literal `' marks.
(main): Exit nonzero when unable to open an input file.
2003-05-02 19:37:23 +00:00
Jim Meyering d500b3f1e6 make sure we fail when unable to open an input file 2003-05-02 19:36:48 +00:00
Jim Meyering 63f2e7dba0 make sure -72x elicits an error 2003-05-02 19:20:18 +00:00
Jim Meyering 7747a57abc (main): Diagnose invalid suffix on obsolescent width specifications like `-72x'. 2003-05-02 19:15:19 +00:00
Jim Meyering 7f5d536dc3 . 2003-05-02 13:03:28 +00:00
Jim Meyering 3ee2423ea2 *** empty log message *** 2003-05-02 13:02:54 +00:00
Jim Meyering 171d577cd1 bump serial number 2003-05-02 13:02:48 +00:00
Jim Meyering c49747c6f8 (jm_MACROS): Require GL_FUNC_READDIR. 2003-05-02 13:02:40 +00:00
Jim Meyering a7c15d1cbd (GL_FUNC_READDIR): Revive dead file. Change name to
have GL_ (not jm_) prefix.  Adjust cache variables similarly.
Create 500 rather than just 300 files, to exercise bug on
Darwin6.5, too.
2003-05-02 13:01:28 +00:00
Jim Meyering 4ed5c260a3 Work around nasty readdir bug with Darwin6.5 and hfs file system.
(IF_READDIR_NEEDS_REWINDDIR): Define.
[! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just
returned NULL and there has been at least one successful unlink or
rmdir call since the opendir or previous rewinddir, then call
rewinddir and reiterate the loop.
2003-05-02 12:53:02 +00:00
Jim Meyering ee0dc0c2ce *** empty log message *** 2003-05-02 10:44:41 +00:00
Jim Meyering 4f6fe96afe Factor out common code.
(readdir_ignoring_dotdirs): New function.
(is_empty_dir): Use it here.
(remove_cwd_entries): Use it here.
2003-05-02 10:44:32 +00:00
Jim Meyering e25854fbd7 revive dead file 2003-05-02 07:13:10 +00:00
Jim Meyering 0ce4463dfa *** empty log message *** 2003-05-01 17:52:40 +00:00
Jim Meyering 2729b8b6fe *** empty log message *** 2003-05-01 17:51:52 +00:00
Jim Meyering 7a672ec046 *** empty log message *** 2003-05-01 17:49:47 +00:00
Jim Meyering 07b1707f8e Create 500 rather than just 300 files.
There's a bug in Darwin6.5's readdir that shows up only with
338 or more files.
Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp
has two components.
2003-05-01 17:49:41 +00:00
Jim Meyering a9477ed058 *** empty log message *** 2003-05-01 16:25:34 +00:00
Jim Meyering c8e2fca40c Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
(dump_remainder): Move two declarations `down' into the scope
where they are used.
(xlseek): Return the resulting offset.
(file_lines): Rename parameter, file_length, to end_pos.
(pipe_lines): Don't coerce safe_read return value to `int'.
Adapt tests accordingly.
(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
to `unsigned int'.
Change type of `total_bytes' from `int' to `size_t',
since the former wouldn't always be wide enough.
Don't coerce safe_read return value to `int',
and adapt tests accordingly.
Now that testing for a read error no longer involves
using `tmp', handle that case *after* freeing `tmp'.
(start_bytes): Clean up.
(tail_bytes): Now that `n_bytes' may be larger than
OFF_T_MAX, test for that condition and, if it's true, don't
use lseek optimizations.
(parse_options): Don't fail just because N_UNITS is larger than
the maximum size of a file -- tail may be applied to an input
stream (e.g., a pipe) with more data than that.
2003-05-01 16:25:13 +00:00
Jim Meyering 5bc75bf6a0 (file_lines): Rename parameter, file_length, to end_pos. 2003-05-01 13:22:19 +00:00
Jim Meyering 713c7903b9 *** empty log message *** 2003-05-01 13:19:37 +00:00
Jim Meyering 84ddd12f18 (syntax-check): Rename from alloc-check.
Also check for SPACE-TAB sequences.
Also check for malloc/calloc/realloc casts.
2003-05-01 13:19:28 +00:00
Jim Meyering 7968d80a80 *** empty log message *** 2003-05-01 11:49:17 +00:00
Jim Meyering 882edccbd6 (start_lines): Rewrite to use memchr. Clean up. 2003-05-01 11:49:12 +00:00
Jim Meyering 67fa85dc34 *** empty log message *** 2003-04-28 20:29:27 +00:00
Jim Meyering 5ac1c72305 Send two tokens, not just one, so we don't
make the now-more-picky tsort fail.
2003-04-28 20:29:22 +00:00
Jim Meyering 8cfd51fbe5 . 2003-04-28 19:41:01 +00:00
Jim Meyering 0553d6683a correct grammar in comment 2003-04-28 16:07:33 +00:00
Jim Meyering 412c38a757 *** empty log message *** 2003-04-26 06:44:50 +00:00
Jim Meyering 110e377d26 *** empty log message *** 2003-04-25 18:42:21 +00:00
Jim Meyering 241673725e (GL_FUNC_GETCWD_PATH_MAX): If PATH_MAX
is not defined, don't run the test, and don't use the wrapper.
Otherwise, on the Hurd, it would take a long time to create
and remove a hierarchy about 4000 levels deep.
Based on a patch from Robert Millan.
2003-04-25 18:42:16 +00:00
Jim Meyering b45a0ca42e *** empty log message *** 2003-04-25 18:20:02 +00:00
Jim Meyering fa4150ded7 . 2003-04-24 13:51:05 +00:00
Jim Meyering a68a1cdd7f *** empty log message *** 2003-04-24 13:50:32 +00:00
Jim Meyering 034fcf16e3 (tsort): Remove unnecessary test of have_read_stdin.
(main): Minor syntactic clean-up.
2003-04-24 13:50:27 +00:00
Jim Meyering a3c951764e (tsort): Fail if the input contains an odd number of tokens. 2003-04-24 13:48:54 +00:00
Jim Meyering eafe3a6878 (only-one): add another test 2003-04-24 13:36:03 +00:00
Jim Meyering 4c91ec1e02 add localedir.h 2003-04-24 09:09:23 +00:00
Jim Meyering 2abc1e61f2 *** empty log message *** 2003-04-23 22:24:55 +00:00
Jim Meyering 5b0f78ffc1 make sure tsort fails given an odd number of input tokens 2003-04-23 22:24:24 +00:00
Jim Meyering 52c0030080 update from master 2003-04-23 13:11:08 +00:00
Jim Meyering d548a76009 . 2003-04-23 08:39:10 +00:00