Commit Graph
2482 Commits
Author SHA1 Message Date
Jim Meyering 19d6aed760 Add support for multi-byte locales.
(iswprint, mbrtowc, wcwidth): Provide default definitions.
(total_bytes): New variable.
(print_bytes): New variable.
(longopts): Change abbreviation for --chars from 'c' to 'm'.
(usage): Update.
(write_counts): Add `bytes' argument.
(wc): New variables `bytes', `count_bytes', `count_chars',
`count_complicated'. The old code determines `bytes', not `chars'.
New case for MB_CUR_MAX > 1. A non-printable non-space character does
not increment the line position or start a word. Update `total_bytes'.
(main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm'
option. Pass `total_bytes' to write_counts.
2000-08-11 09:20:31 +00:00
Jim Meyering 5018ccfb7e (usage): Describe -d and -i in a locale-independent way. 2000-08-11 09:12:47 +00:00
Jim Meyering d0c8664700 (usage): Don't describe System V syntax, as it doesn't always work. 2000-08-11 09:12:05 +00:00
Jim Meyering 129ede91ad (movefile): Invoke xalloc_die instead of printing our own message. 2000-08-08 10:53:23 +00:00
Jim Meyering a9a5efd77b (remove_cwd_entries, rm): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:13:36 +00:00
Jim Meyering b99ee65d9f (main): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:12:24 +00:00
Jim Meyering b2557211cb (do_link): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:11:46 +00:00
Jim Meyering 6fa66b8414 (main): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:11:30 +00:00
Jim Meyering 13587cf0ec (xstrndup): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:11:12 +00:00
Jim Meyering 8b6882e5e9 (cut_fields): Invoke xalloc_die instead of printing our own message.
(cut_fields): Check for I/O error as well as end-of-file.
2000-08-08 07:09:31 +00:00
Jim Meyering 1899efe4f6 (copy_dir, copy_internal): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:08:17 +00:00
Jim Meyering 8180fd9209 (main): Invoke xalloc_die instead of printing our own message. 2000-08-08 07:07:55 +00:00
Jim Meyering d681dd7524 (quotearg_colon, xmalloc): "virtual memory exhausted" -> "memory exhausted" 2000-08-08 07:03:41 +00:00
Jim Meyering c64d3aaf18 (usage, main): For cp -P messages, mention the new behavior as well as the old. 2000-08-08 06:55:47 +00:00
Jim Meyering b6bacc5dcf Invoke xalloc_die instead of printing our own message. 2000-08-08 06:53:14 +00:00
Jim Meyering d8f02c5c3a (xputenv): Invoke xalloc_die instead of printing our own message. 2000-08-07 16:50:11 +00:00
Jim Meyering 0ae67ef6a8 (head): Call write_header here.
(head_file): ... not here.
2000-08-07 13:27:24 +00:00
Jim Meyering fd5da15041 (closeout_func): Remove variable.
(close_stdout_wrapper): Remove unused function.
(main): Remove assignment to closeout_func.
2000-08-07 13:23:44 +00:00
Jim Meyering 0981ef97c0 (fold_file): Remove ferror(stdout) check, already done in close_stdout. 2000-08-07 13:19:52 +00:00
Jim Meyering 0ef1ebe00e (enum) [PARENTS_OPTION]: New member.
(long_opts): Update "parents" and deprecated "path" entries to use
`PARENTS_OPTION', not `P'.
(usage): Update --help output.
(main): Warn that the meaning of `-P' will soon change.
2000-08-07 08:55:50 +00:00
Jim Meyering 43fde4395a (usage): Warn more succintly about the effects of
the locale on sort order.
2000-08-07 07:07:00 +00:00
Jim Meyering 3110281aad We know nbytes is 0, so remove it from bail-out test. 2000-08-06 15:08:29 +00:00
Jim Meyering 61b0870c41 (pipe_lines): Declare local `cp' to be const. 2000-08-06 09:03:29 +00:00
Jim Meyering 95b686e751 (pipe_lines): Add variable `nbytes' so we can free
`tmp' immediately after read loop.  Don't process an empty file.
This fixes a buffer-underrun error -- also thanks to bounded pointers.
2000-08-06 08:44:11 +00:00
Jim Meyering 773a575cd5 (main): Rename local t' to tmp_dir' to avoid shadowing
a previous local by that name.
(usage): Warn that GNU sort is now locale-aware, and suggest
people put LC_ALL=POSIX in their environment.
2000-08-05 20:27:49 +00:00
Jim Meyering b3197453ad (init_header): Fix buffer-overrun error.
Allocated buffer was sometimes too small.
Reported by Greg McGary (who found this bug using his
bounded-pointers-enabled gcc).
(init_header): Move declarations of several variables into the
inner scope where they are used.
2000-08-05 10:56:12 +00:00
Jim Meyering 77a40f148f (MAX): Remove definition (It's in sys2.h). 2000-08-05 08:34:25 +00:00
Jim Meyering 90d90ce434 (store_columns): Remove conjunct that would dereference
an out-of-bounds pointer.  Reported by Greg McGary (who found this
bug using his bounded-pointers-enabled gcc).
2000-08-04 10:13:30 +00:00
Jim Meyering cf04cc6ec2 (tee): Use SET_BINARY and SET_BINARY2.
From Prashant TR.
2000-08-01 07:10:57 +00:00
Jim Meyering 56d6e5a38a (cut_fields): Use virtual memory exhausted', not Memory exhausted'. 2000-07-31 06:48:43 +00:00
Jim Meyering 6fb996fcc5 [!HAVE_CONFIG_H]: Use virtual memory exhausted', not Memory exhausted'. 2000-07-31 06:46:21 +00:00
Jim Meyering e0be88dd59 (ISPRINT): Undef before defining to avoid warning. 2000-07-30 19:50:58 +00:00
Jim Meyering 0e1dfa9b8b (remove_file): Quote the file names that are displayed with --verbose. 2000-07-30 18:42:07 +00:00
Jim Meyering 7b79dfe695 (copy_internal): Quote the file names that are displayed
with --verbose and --backup.
2000-07-30 18:41:55 +00:00
Jim Meyering 614cf2b06b Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 17:08:05 +00:00
Jim Meyering c2c1f42b0b Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:34:48 +00:00
Jim Meyering 381ba4a26a Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:33:08 +00:00
Jim Meyering ff6161442d Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:30:43 +00:00
Jim Meyering 7373e3149d Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:29:15 +00:00
Jim Meyering 76bc5dc396 Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:28:25 +00:00
Jim Meyering fb61cfca00 Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:26:43 +00:00
Jim Meyering 395e6c592a include quote.h. 2000-07-30 16:21:57 +00:00
Jim Meyering 4d617153d5 Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:21:39 +00:00
Jim Meyering 222f736378 Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
2000-07-30 16:19:33 +00:00
Jim Meyering b53d6da640 Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
Add more precise diagnostics.
2000-07-30 16:16:16 +00:00
Jim Meyering d4365673c5 (remove_cwd_entries): Quote one more file name. 2000-07-30 16:03:37 +00:00
Jim Meyering 493d6182eb tweak diagnostic 2000-07-30 16:01:48 +00:00
Jim Meyering 74fe479350 (do_move): Fix typo. 2000-07-30 15:01:11 +00:00
Jim Meyering ce49687fac fix spelling error in comment: s/squirelled/squirreled/. 2000-07-29 14:55:51 +00:00
Jim Meyering 586254e713 Include <limits.h>, <stdlib.h>, <wchar.h>, <wctype.h>.
(quote_name): Use mbrtowc to step through the filename string while
replacing nonprintables with question marks. Return the screen width,
not the strlen length. Do no output if the out stream is NULL.
(length_of_file_name_and_frills): Use the quote_name return value.
2000-07-29 06:17:02 +00:00