Jim Meyering
aeebbd038c
(save_cwd) [!HAVE_FCHDIR]: Avoid a core dump via abort() which occurred
...
because cwd->desc was uninitialed.
(restore_cwd) [!HAVE_FCHDIR]: Remove unnecessary redefinition of fchdir.
Both from Bruno Haible.
1995-02-23 21:12:11 +00:00
Jim Meyering
875eafd489
(count_entry): Fix bug in polarity of safe-stat status test.
1995-02-21 05:19:03 +00:00
Jim Meyering
03daea30a6
(save_cwd, restore_cwd): New functions.
...
(main): Use them instead of in-line versions.
(count_entry): Use them here instead of relying on chdir ("..") --
but only when necessary. Before, with --dereference (-L),
traversing a symlink caused failure because chdir ("..") didn't
work as expected. Reported by Bruno Haible.
1995-02-21 05:01:08 +00:00
Jim Meyering
695dd11003
(wc): Fix off-by-one error when counting lines.
1995-02-16 00:10:49 +00:00
Jim Meyering
4ef39a33cb
(copy): Use memset, not bzero.
...
(copy_simple): Use memcpy, not bcopy.
1995-02-11 13:58:11 +00:00
Jim Meyering
b743f8afc3
Remove index/rindex and bcmp/bcopy/bzero references.
...
Separate errno declaration from STDC_HEADERS.
1995-02-11 13:53:39 +00:00
Jim Meyering
79c16924de
Fix example in comment.
1995-02-11 13:21:46 +00:00
Jim Meyering
a3d2e589ed
(wc): Eliminate fstat call -- using lseek is sufficient.
...
Detect/handle case in which CURR position > EOF.
1995-02-10 05:53:54 +00:00
Jim Meyering
15d9f70d1a
(wc): Handle separately the cases in which words need
...
not be counted. Suggested by Karl Heuer.
(wc): Use memchr.c instead.
1995-02-10 05:34:27 +00:00
Jim Meyering
d131ddcf1f
(wc): Add a separate loop for counting only lines or lines and bytes.
...
From Karl Heuer.
1995-02-09 17:15:17 +00:00
Jim Meyering
05d1bec3e5
(wc): Don't overcount the number of bytes when reading from
...
a regular file on stdin with file pointer not at BOF. From Karl Heuer.
1995-02-09 17:05:43 +00:00
Jim Meyering
5695b2f051
(parse_old_offset): Use strchr, not index.
1995-01-29 05:33:05 +00:00
Jim Meyering
faed18c267
(extract_regexp): Use strrchr, not rindex.
1995-01-29 05:32:10 +00:00
Jim Meyering
6be15c9af0
(substr): Don't allocate a byte for trailing NUL in result
...
since the result needn't be NUL-terminated. Don't NUL terminate it.
1995-01-28 13:22:53 +00:00
Jim Meyering
7fc638a948
(pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
1995-01-28 13:22:25 +00:00
Jim Meyering
3cd9e1dd23
(append_equiv_class): Use memcpy instead of bcopy.
...
(card_of_complement, set_initialize): Use memset, not bzero.
1995-01-28 13:15:35 +00:00
Jim Meyering
af7e99c091
(tac): Use memmove instead of bcopy.
...
(output): Use memcpy instead of bcopy.
1995-01-28 13:09:42 +00:00
Jim Meyering
9646d48630
(main): Use memset, not bzero.
...
(line_bytes_split): Use memmove instead of bcopy.
1995-01-28 13:06:29 +00:00
Jim Meyering
849868e342
(checkfp, mergefps): Use memcpy instead of bcopy.
...
(fillbuf): Use memmove instead of bcopy.
1995-01-28 13:04:27 +00:00
Jim Meyering
197bc3fd5a
(decode_format_string): Use memmove instead of bcopy.
...
[EQUAL_BLOCKS]: Use memcmp, not bcmp.
(dump): Use memset, not bzero.
1995-01-28 13:02:44 +00:00
Jim Meyering
392dd54529
(fold_file): Use memmove instead of bcopy.
1995-01-28 13:00:10 +00:00
Jim Meyering
42a6a38712
(isopen, isclose, isperiod): Use strchr, not index.
...
(flush_paragraph): Use memmove instead of bcopy.
1995-01-28 04:57:45 +00:00
Jim Meyering
45f162ad7a
(load_buffer): Use memcpy rather than bcopy.
1995-01-28 04:47:03 +00:00
Jim Meyering
9a915d886e
(cat): Use memmove rather than bcopy.
1995-01-28 04:45:19 +00:00
Jim Meyering
69f39255bc
Rename SAFE_STAT and SAFE_LSTAT to lower case names.
1995-01-27 17:03:21 +00:00
Jim Meyering
8b285f6be9
* fmt.c (copy_rest): Replace ||' with &&'. Before, a paragraph
...
not followed by a newline would be followed by data copied from
uninitialized storage. Repeat by `printf abc|fmt|od -ac'.
Reported by Franc,ois Pinard.
1995-01-25 04:32:15 +00:00
Jim Meyering
851162a0da
Rename macros with FP_ prefix. Use FLOAT_ instead.
...
AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
Be careful to use off_t instead of explicit `unsigned long'.
Otherwise, systems like 4.4BSD lose on calls to fseek that
expect off_t (which is long long on that system).
(parse_old_offset): Use xstrtoul
(main): Likewise.
1995-01-25 04:19:46 +00:00
Jim Meyering
41fc246374
Don't use legal' when you mean valid'.
1995-01-17 13:57:22 +00:00
Jim Meyering
cfaf788606
Fix typo: seperator -> separator.
1995-01-12 05:03:08 +00:00
Jim Meyering
98b530a36d
Remove FIXMEs.
...
(get_width_format): Use stub function if not all of the needed math
functions are available. From Ulrich.
(main): Give reason for failure.
1995-01-08 20:20:19 +00:00
Jim Meyering
4ad4a00de4
Add some FIXME comments.
1994-12-31 18:38:23 +00:00
Jim Meyering
81f671740e
Include "system.h".
...
Don't explicitly include headers that it includes.
Use error, not `fprintf (stderr'.
1994-12-31 18:32:47 +00:00
Jim Meyering
d6b36e21cb
Minor indentation change.
...
(usage): Change wording a little.
1994-12-31 18:17:34 +00:00
Jim Meyering
47d3dc6fc3
From Ulrich Drepper.
1994-12-31 18:04:40 +00:00
Jim Meyering
d4ba41692f
.
1994-12-31 17:56:47 +00:00
Jim Meyering
a872332ad9
.
1994-12-31 17:55:01 +00:00
Jim Meyering
e8bb8dff6a
.
1994-12-31 17:54:33 +00:00
Jim Meyering
e0c2f72ee5
.
1994-12-31 17:53:04 +00:00
Jim Meyering
60d3ac3f15
.
1994-12-31 17:51:57 +00:00
Jim Meyering
e50ceb339f
still checking
1994-12-31 17:46:31 +00:00
Jim Meyering
6a8f231a9c
checking whether cvs lock works
1994-12-31 17:43:19 +00:00
Jim Meyering
3de797b535
Indent.
...
Add deactivated assertions.
1994-12-31 17:33:56 +00:00
Jim Meyering
14842c9a59
Use readtoken.
1994-12-31 15:28:51 +00:00
Jim Meyering
59097c0922
Include "error.h" rather than simply declaring `void error ();'.
1994-12-27 13:36:22 +00:00
Jim Meyering
dcb4b37240
* dd.c (skip): Use safe_read instead of read.
...
(copy): Use full_write instead of write.
From Bruno Haible.
1994-12-27 13:12:52 +00:00
Jim Meyering
410e779e8d
* sync.c (main): Make error message accurate.
1994-12-27 13:08:05 +00:00
Jim Meyering
2ea2c7bf78
[member]: Use strchr instead of index.
1994-12-27 02:47:50 +00:00
Jim Meyering
c84154eb28
* test.c (term): Running `./test \( a -o b' got a seg fault.
...
From Klaus.Reichl@aut.alcatel.at .
1994-12-27 00:33:03 +00:00
Jim Meyering
7c141b258d
(main): Update xstrtol calls to be consistent with new decl.
1994-12-22 05:08:40 +00:00
Jim Meyering
a9f1783e20
* src/*.c: Include "error.h" instead of simply declaring
...
`void error ();'.
1994-12-20 05:26:44 +00:00