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
44416660ae
update from FSF
1995-02-16 20:25:54 +00:00
Jim Meyering
695dd11003
(wc): Fix off-by-one error when counting lines.
1995-02-16 00:10:49 +00:00
Jim Meyering
e1453c467f
.
1995-02-11 14:15:09 +00:00
Jim Meyering
a40b092725
(SOURCES): Add memcmp.c, memcpy.c, and memset.c.
1995-02-11 14:11:36 +00:00
Jim Meyering
b4994dc3fe
.
1995-02-11 14:02:02 +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
f299c4e0f6
.
1995-02-11 13:36:02 +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
b968f43e95
.
1995-01-29 05:34:15 +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
8c3911c2b4
.
1995-01-28 14:07:41 +00:00
Jim Meyering
a6f7c6d0c7
.
1995-01-28 13:23: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
3794d3b8ad
.
1995-01-28 04:58:03 +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
1976546062
.
1995-01-27 19:32:16 +00:00
Jim Meyering
fedcb63136
(get_fs_usage, statfs): Use safe_read, and safe_stat rather than
...
bare read and stat.
1995-01-27 17:20:54 +00:00
Jim Meyering
7ccb88fbc5
Declare errno if it's not defined.
...
Rename SAFE_STAT to safe_stat.
1995-01-27 17:16:56 +00:00
Jim Meyering
0fd3803567
Declare errno if it's not defined.
1995-01-27 17:16:19 +00:00
Jim Meyering
b284f343cb
(DEFS): Remove -Dlint.
...
(DISTFILES): Add error.h.
1995-01-27 17:09:18 +00:00
Jim Meyering
5dabd0cdec
Rename SAFE_STAT to safe_stat.
1995-01-27 17:07:36 +00:00
Jim Meyering
fbf807583e
Rename SAFE_STAT to safe_stat.
1995-01-27 17:05:42 +00:00
Jim Meyering
e6e3d524da
Rename SAFE_STAT to safe_stat.
1995-01-27 17:05:11 +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
b4cde80810
.
1995-01-27 15:35:17 +00:00
Jim Meyering
85bb215ab8
(basename): Use strrchr, not rindex.
...
[!STDC_HEADERS && !HAVE_STRING_H]: Define strrchr to rindex.
1995-01-27 15:23:48 +00:00
Jim Meyering
b38a5a7a17
.
1995-01-27 15:01:25 +00:00
Jim Meyering
4ecaaf1fa7
.
1995-01-27 15:00:54 +00:00
Jim Meyering
428920f8fc
.
1995-01-27 14:41:51 +00:00
Jim Meyering
4e2a9fa5f2
.
1995-01-27 05:39:25 +00:00
Jim Meyering
1a41e74d32
.
1995-01-27 05:37:03 +00:00
Jim Meyering
66444bdafb
Remove/rewrite some comments.
1995-01-27 05:36:14 +00:00