Log of /coreutils/src/sort.c
Parent Directory
| Revision Log
Revision
1.361 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Aug 11 06:32:12 2007 UTC
(16 years, 8 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
CPPI-1_10,
CPPI-1_11,
CPPI-1_12,
CPPI-1_8,
CPPI-1_9,
DU-FTS,
HEAD,
ISDIGIT-bug-fix,
v6_9
Changes since
1.360: +4 -4 lines
Diff to
previous 1.360
Accommodate more xstrtol changes.
* src/df.c (long_options): Don't bother prepending "--" to long
options that OPT_STR might decode, as that hack is no longer needed.
(main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
* src/du.c (long_options, main): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (long_options, main): Likewise.
* src/pr.c (first_last_page, main): Likewise.
* src/sort.c (long_options, specify_sort_size): Likewise.
* src/pr.c (first_last_page): Accept option index and option char
instead of an assembled option string. All callers changed.
* src/sort.c (specify_sort_size): Likewise.
* src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
Remove.
Author: Paul Eggert <eggert@cs.ucla.edu>
Committer: Jim Meyering <jim@meyering.net>
Revision
1.360 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Aug 6 16:55:30 2007 UTC
(16 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.359: +6 -5 lines
Diff to
previous 1.359
Adapt to new human and xstrtol API.
* src/df.c (long_options): Prepend "--" to long options that
OPT_STR might decode.
* src/du.c (long_options): Likewise.
* src/od.c (long_options): Likewise.
* src/sort.c (long_options): Likewise.
* src/df.c (main): Adjust to new human and xstrtol API.
* src/du.c (main): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (main): Likewise.
* src/pr.c (first_last_page): Likewise. New argument OPTION.
All callers changed.
* src/sort.c (specify_sort_size): New arg OPTION. All callers
changed. Adjust to new xstrtol API.
* src/system.h (opt_str_storage): New static var.
(OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
Author: Paul Eggert <eggert@cs.ucla.edu>
Committer: Jim Meyering <jim@meyering.net>
Revision
1.355 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jun 23 08:42:10 2007 UTC
(16 years, 10 months ago)
by
meyering
Branch:
MAIN
Changes since
1.354: +1 -1 lines
Diff to
previous 1.354
Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
* src/base64.c (main): Likewise.
* src/install.c (setdefaultfilecon): Likewise.
* src/sort.c (main): Likewise.
* Makefile.maint (sc_prohibit_strcmp): New rule.
* .x-sc_prohibit_strcmp: New file, to list the few exceptions.
* Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
Author: Jim Meyering <jim@meyering.net>
Revision
1.354 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Mar 28 06:57:40 2007 UTC
(17 years ago)
by
meyering
Branch:
MAIN
Changes since
1.353: +1 -1 lines
Diff to
previous 1.353
Help translators include translation team's web or email address.
* src/system.h (emit_bug_reporting_address): New function.
* src/base64.c: Use it rather than a literal printf.
* src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
* src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
* src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
* src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
* src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
* src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
* src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
* src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
* src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
* src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
* src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
* src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
* src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
* src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
* src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
* src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
* src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
* src/who.c, src/whoami.c, src/yes.c: Likewise.
Author: Jim Meyering <jim@meyering.net>
Revision
1.353 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Feb 24 11:26:57 2007 UTC
(17 years, 1 month ago)
by
meyering
Branch:
MAIN
CVS Tags:
COREUTILS-6_8,
COREUTILS-6_9
Changes since
1.352: +3 -13 lines
Diff to
previous 1.352
* NEWS: sort no longer compresses temporaries by default.
* bootstrap.conf: Remove findprog.
* doc/coreutils.texi (sort invocation): The default is to not
compress. Don't treat "" specially.
* src/sort.c: Don't include findprog.h.
(create_temp): Compress only if the user specified --compress-program.
* tests/misc/sort-compress: Adjusts tests to match new behavior.
Author: Paul Eggert <eggert@cs.ucla.edu>
Committer: Jim Meyering <jim@meyering.net>
Revision
1.352 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Feb 19 21:11:36 2007 UTC
(17 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.351: +16 -17 lines
Diff to
previous 1.351
* NEWS: sort now uses a --compress-program option rather than
an environment variable.
* doc/coreutils.texi (sort invocation): Document this.
* src/sort.c (usage): Likewise.
(COMPRESS_PROGRAM_OPTION): New const.
(long_options, create_temp, main): Support new option.
* tests/misc/sort-compress: Test it.
Author: Paul Eggert <eggert@cs.ucla.edu>
Committer: Jim Meyering <jim@meyering.net>
Revision
1.350 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jan 24 09:36:53 2007 UTC
(17 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.349: +2 -0 lines
Diff to
previous 1.349
Pass "make distcheck" again.
* src/sort.c (usage): Split a diagnostic that had grown to be
longer than the C89 maximum of 509 bytes.
* .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
FIXME: this is just temporary, while we wait to remove the offending
access-calling code.
* Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
* Makefile.maint (sc_cast_of_argument_to_free): Use the
canonical, $$($(CVS_LIST_EXCEPT)).
* m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
Author: Jim Meyering <jim@meyering.net>
Revision
1.349 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jan 24 09:36:52 2007 UTC
(17 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.348: +54 -25 lines
Diff to
previous 1.348
* NEWS: New option sort -C, proposed by XCU ERN 127, which looks
like it will be approved. Also add --check=quiet, --check=silent
as long aliases, and --check=diagnose-first as an alias for -c.
* doc/coreutils.texi (sort invocation): Document this.
Also, mention that sort -c can take at most one file.
* src/sort.c: Implement this.
Include argmatch.h.
(usage): Document the change.
(CHECK_OPTION): New constant.
(long_options): --check now takes an optional argument, and is now
treated differently from 'c'.
(check_args, check_types): New constant arrays.
(check): New arg CHECKONLY, which suppresses diagnostic if -C.
(main): Parse the new options.
* tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
New tests for -C.
Author: Paul Eggert <eggert@cs.ucla.edu>
Committer: Jim Meyering <jim@meyering.net>
Revision
1.347 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jan 24 07:08:05 2007 UTC
(17 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.346: +473 -42 lines
Diff to
previous 1.346
* src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
In pipe_fork callers, use these named constants, not "2" and "8".
(proctab, nprocs): Declare to be "static".
(pipe_fork) [lint]: Initialize local, pid,
to avoid unwarranted may-be-used-uninitialized warning.
(create_temp): Use the active voice. Describe parameters, too.
2007-01-21 James Youngman <jay@gnu.org>
Centralize all the uses of sigprocmask(). Don't restore an invalid
saved mask.
* src/sort.c (enter_cs, leave_cs): New functions for protecting
code sequences against signal delivery.
* (exit_cleanup): Use enter_cs and leave_cs instead of
calling sigprocmask directly.
(create_temp_file, pipe_fork, zaptemp): Likewise
2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
Add compression of temp files to sort.
* NEWS: Mention this.
* bootstrap.conf: Import findprog.
* configure.ac: Add AC_FUNC_FORK.
* doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
variable.
* src/sort.c (compress_program): New global, holds the name of the
external compression program.
(struct sortfile): New type used by mergepfs and friends instead
of filenames to hold PIDs of compressor processes.
(proctab): New global, holds compressor PIDs on which to wait.
(enum procstate, struct procnode): New types used by proctab.
(proctab_hasher, proctab_comparator): New functions for proctab.
(nprocs): New global, number of forked but unreaped children.
(reap, reap_some): New function, wait for/cleanup forked processes.
(register_proc, update_proc, wait_proc): New functions for adding,
modifying and removing proctab entries.
(create_temp_file): Change parameter type to pointer to file
descriptor, and return type to pointer to struct tempnode.
(dup2_or_die): New function used in create_temp and open_temp.
(pipe_fork): New function, creates a pipe and child process.
(create_temp): Creates a temp file and possibly a compression
program to which we filter output.
(open_temp): Opens a compressed temp file and creates a
decompression process through which to filter the input.
(mergefps): Change FILES parameter type to struct sortfile array
and update access accordingly. Use open_temp and reap_some.
(avoid_trashing_input, merge): Change FILES parameter like
mergefps and call create_temp instead of create_temp_file.
(sort): Call create_temp instead of create_temp_file.
Use reap_some.
(avoid_trashing_input, merge, sort, main): Adapt to mergefps.
Author: Dan Hipschman <dsh@linux.ucla.edu>
Committer: Jim Meyering <jim@meyering.net>
Revision
1.344 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Dec 13 21:27:05 2006 UTC
(17 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.343: +4 -5 lines
Diff to
previous 1.343
Remove some arbitrary restrictions on size fields,
so that commands like "sort -k 18446744073709551616" no longer fail merely
because 18446744073709551616 doesn't fit in uintmax_t. The trick is that
these fields can all be treated as effectively infinity; their exact
values don't matter, since no internal buffer can be that long.
* src/join.c (string_to_join_field): Verify that SIZE_MAX <= ULONG_MAX
if the code assumes this. Silently truncate too-large values to SIZE_MAX,
as the remaining code will do the right thing in this case.
* src/sort.c (parse_field_count): Likewise.
* src/uniq.c (size_opt, main): Likewise.
* tests/join/Test.pm (bigfield): New test.
* tests/sort/Test.pm (bigfield): New test.
* tests/uniq/Test.pm (121): New test.
Signed-off-by: Jim Meyering <jim@meyering.net>
Revision
1.343 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Nov 13 18:15:56 2006 UTC
(17 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.342: +1 -2 lines
Diff to
previous 1.342
* src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
From Paul Eggert.
Revision
1.342 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Nov 13 17:17:13 2006 UTC
(17 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.341: +9 -6 lines
Diff to
previous 1.341
Plug another technically-unimportant leak in sort.
* src/sort.c (main): Don't allocate memory for each new key here.
(insertkey): Allocate memory for each key here, instead.
(key_init): Rename from new_key. Don't allocate.
Revision
1.341 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Nov 13 17:17:11 2006 UTC
(17 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.340: +3 -1 lines
Diff to
previous 1.340
* src/sort.c (main): Plug a tiny memory leak.
Move declaration of local "minus" down to be nearer point of use.
Revision
1.339 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Aug 8 22:20:12 2006 UTC
(17 years, 8 months ago)
by
eggert
Branch:
MAIN
CVS Tags:
COREUTILS-6_0,
COREUTILS-6_1,
COREUTILS-6_2,
COREUTILS-6_3
Changes since
1.338: +127 -50 lines
Diff to
previous 1.338
Use new random-number interface rather than rand-isaac.c.
Don't include rand-isaac.c; include randint.h and randread.h instead.
(RANDOM_SOURCE_OPTION): New enum.
(long_opts, usage, main): New option --random-source.
Include md5.h, randread.h, xmemxfrm.h.
(longopts, usage, main): Remove undocumented --seed option;
it's now replaced by --random-source.
(rand_state, get_hash): Remove.
(randread_source): New static var.
(random_state, cmp_hashes, compare_random): New functions; they guarantee
no collisions in the random hash function.
(keycompare): Use compare_random for -R; don't fall back on comparing
via memcoll, since compare_random does the right thing.
Revision
1.338 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 9 17:02:17 2006 UTC
(17 years, 9 months ago)
by
eggert
Branch:
MAIN
Changes since
1.337: +5 -5 lines
Diff to
previous 1.337
(inittables): Use toupper rather than
islower followed by toupper; it's simpler and typically
faster now that we assume at least C89 semantics. Similarly
for tolower.
Revision
1.337 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jun 28 23:51:13 2006 UTC
(17 years, 9 months ago)
by
eggert
Branch:
MAIN
Changes since
1.336: +29 -24 lines
Diff to
previous 1.336
* src/sort.c (main): Support obsolete usages like "sort +1 -2" even when
conforming to POSIX 1003.1-2001, since this is a pure extension to
POSIX.
Revision
1.335 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Dec 14 23:59:23 2005 UTC
(18 years, 4 months ago)
by
eggert
Branch:
MAIN
Changes since
1.334: +28 -18 lines
Diff to
previous 1.334
(incompatible_options): New function.
(check_ordering_compatibility, main): Use it.
(main): Check for -c and -o.
Don't bother with a usage message for
"sort -c a b", for consistency with other error diagnostics.
Revision
1.333 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Dec 12 22:09:27 2005 UTC
(18 years, 4 months ago)
by
eggert
Branch:
MAIN
Changes since
1.332: +58 -52 lines
Diff to
previous 1.332
Include rand-isaac.c rather than rand-isaac.h.
Don't include md5.h; it wasn't needed.
(struct keyfield): Rename random_hash to random, for consistency
with the other member names. All uses changed.
(usage): Tweak wording to mention STRING for --seed option.
(short_options): Rorder for consistency with other programs.
(rand_state): Now a struct, not a pointer to one. All uses changed.
(HASH_WORDS, HASH_SIZE): Remove.
(get_hash): Remove comments around resbuf size, since we can assume C89.
Use a "more-kosher" (but slower) approach of invoking isaac_refill.
(keycompare): Adjust to the new get_hash.
Add a FIXME.
(badfieldspec): Omit recently-introduced comment; it isn't needed.
(main): Don't set need_random simply because gkey has it set; that
doesn't necessarily mean we'll need random numbers.
Redo seeding to match new get_hash approach.
Revision
1.332 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Dec 10 10:04:12 2005 UTC
(18 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.331: +3 -2 lines
Diff to
previous 1.331
(get_hash): Change position of `*' in parameter type to conform with convention.
(main): Split a long line so it fits in 80 columns.
Revision
1.331 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Dec 10 09:44:00 2005 UTC
(18 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.330: +1 -1 lines
Diff to
previous 1.330
(keycompare): Remove stray SPACE before TAB that was
causing `make distcheck' to fail.
Revision
1.330 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Dec 10 08:09:42 2005 UTC
(18 years, 4 months ago)
by
eggert
Branch:
MAIN
Changes since
1.329: +96 -17 lines
Diff to
previous 1.329
(short_options, long_options, WORDS, keycompare, main):
(usage): Add options --random-sort and --seed to implement a random
shuffle.
Include md5.h and rand-isaac.h.
(get_hash): New function.
(rand_state): New var.
(HASH_WORDS, HASH_SIZE): New macros.
Revision
1.327 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Oct 6 16:40:13 2005 UTC
(18 years, 6 months ago)
by
eggert
Branch:
MAIN
Changes since
1.326: +1 -3 lines
Diff to
previous 1.326
(sortlines_temp): Undo previous change, since
today's change to m4/stdbool.m4 should catch it.
Revision
1.325 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Oct 5 18:53:55 2005 UTC
(18 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.324: +1 -1 lines
Diff to
previous 1.324
(sortlines_temp): Declare temporary as `int' rather
than `bool' to work around AIX 5.3 compiler bug in 64-bit mode.
Revision
1.323 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Aug 18 22:26:42 2005 UTC
(18 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.322: +2 -2 lines
Diff to
previous 1.322
(usage) [-b,-t]: Ensure that there are at least two
spaces between each option and the corresponding description -- this
lets help2man format entries properly. Reported by Edward Welbourne.
Revision
1.321 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Aug 12 07:16:25 2005 UTC
(18 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.320: +1 -1 lines
Diff to
previous 1.320
Cosmetic: use X2NREALLOC (only two arguments) rather than x2nrealloc (with three).
Revision
1.319 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 3 07:20:04 2005 UTC
(18 years, 9 months ago)
by
eggert
Branch:
MAIN
Changes since
1.318: +4 -4 lines
Diff to
previous 1.318
Include stdio--.h rather than stdio-safer.h.
Include stdlib--.h. Do not include unistd-safer.h.
(create_temp_file): Don't call fd_safer; no longer needed
now that we include *--.h files.
(xfopen): Don't call fopen_safer, for similar reasons.
Revision
1.315 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jun 16 21:33:43 2005 UTC
(18 years, 10 months ago)
by
meyering
Branch:
MAIN
Changes since
1.314: +6 -6 lines
Diff to
previous 1.314
Don't embed `this'-style quotes in format strings.
Rather than this: error (..., "...`%s'...", arg);
do this: error (..., "...%s...", quote (arg));
Revision
1.312 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri May 27 20:36:40 2005 UTC
(18 years, 10 months ago)
by
eggert
Branch:
MAIN
Changes since
1.311: +9 -200 lines
Diff to
previous 1.311
Refactor so that others can use large-integer
comparison functions.
Include "strnumcmp.h".
(NEGATION_SIGN, NUMERIC_ZERO, fraccompare):
Remove; moved to strnumcmp.
(decimal_point): Now int, to simplify converison overhead with
new API. All uses changed.
(thousands_sep): Now -1 if there isn't one, as per new API.
All uses changed.
(numcompare): Move contents to strnumcmp module, except for
skipping blanks.
Revision
1.308 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Apr 26 16:42:51 2005 UTC
(18 years, 11 months ago)
by
eggert
Branch:
MAIN
Changes since
1.307: +4 -7 lines
Diff to
previous 1.307
Remove posixver.h and its uses.
(short_options): New constant, which always supports -y arg.
(COMMON_SHORT_OPTIONS): Remove.
Revision
1.307 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Apr 11 20:10:52 2005 UTC
(19 years ago)
by
eggert
Branch:
MAIN
Changes since
1.306: +17 -12 lines
Diff to
previous 1.306
Include unistd-safer.h.
(create_temp_file): Use fd_safer.
(xfclose): Don't assume fileno (stdin) == STDIN_FILENO, etc.
Revision
1.306 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Apr 9 04:57:37 2005 UTC
(19 years ago)
by
eggert
Branch:
MAIN
Changes since
1.305: +13 -5 lines
Diff to
previous 1.305
(SA_NOCLDSTOP): Define to 0 if not defined.
All uses changed.
(siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
(main) [! SA_NOCLDSTOP]: Use it.
Revision
1.303 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Feb 14 18:04:22 2005 UTC
(19 years, 2 months ago)
by
eggert
Branch:
MAIN
Changes since
1.302: +26 -13 lines
Diff to
previous 1.302
(mergefps): Use binary search rather than linear one
when comparing new line to lines already in main memory.
Revision
1.302 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Dec 2 06:55:31 2004 UTC
(19 years, 4 months ago)
by
eggert
Branch:
MAIN
CVS Tags:
COREUTILS-5_3_0
Changes since
1.301: +42 -60 lines
Diff to
previous 1.301
(C_DECIMAL_POINT): Remove. Use changed to '.'.
Assume setlocale exists.
(thousands_sep): Renamed from th_sep.
(IS_THOUSANDS_SEP): Remove. All uses replaced by comparisons.
(NONZERO): Parenthesize use of arg.
(numcompare): Avoid duplicate loads. Use ISDIGIT as boolean, for
consistency. Avoid unnecessary negation by reversing
fraccompare args.
(main): Rewrite localeconv call to match seq.c.
Revision
1.300 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Nov 13 04:45:58 2004 UTC
(19 years, 5 months ago)
by
eggert
Branch:
MAIN
Changes since
1.299: +20 -16 lines
Diff to
previous 1.299
(zaptemp): Warn if a temporary file is not removed.
Prune unnecessary accesses to volatile locations, and take some
code out of the critical section that didn't need to be in it.
Revision
1.298 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Nov 13 00:50:56 2004 UTC
(19 years, 5 months ago)
by
eggert
Branch:
MAIN
Changes since
1.297: +70 -44 lines
Diff to
previous 1.297
Avoid O(N**2) behavior when there are many temporary files.
(temptail): New variable, so that we can easily append to list.
(create_temp_file): Create new files at end of list, so that
searching the list has O(N**NMERGE) behavior instead of O(N**2).
(zaptemp): Update temptail if needed.
(mergefps, merge): Accept new arg that counts temp files, and keep it
up to date as we create and remove temporaries. This is for
efficiency, so that we don't call zaptemp so often.
All callers changed.
(sort): Don't create array in reverse order, since the list of
temporaries is now in the correct order.
(zaptemp): Protect against race condition: if 'sort' is
interrupted in the middle of zaptemp, it might unlink the
temporary file twice, and the second time this happens the file
might already have been created by some other process.
(create_temp_file): Use offsetof for clarity.
(die): Move it up earlier, to clean up the code a bit.
Revision
1.296 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Nov 6 23:46:47 2004 UTC
(19 years, 5 months ago)
by
eggert
Branch:
MAIN
Changes since
1.295: +93 -45 lines
Diff to
previous 1.295
(first_same_file): Remove. Move most of the code to....
(avoid_trashing_input): New function.
(merge): Avoid some silly merges, e.g., copying a single file to
a temporary file when there are exactly 17 input files to merge.
Take a count of temporary files rather than a max_merge arg.
All uses changed.
Revision
1.295 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Nov 6 22:37:02 2004 UTC
(19 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.294: +6 -0 lines
Diff to
previous 1.294
(xfclose): Don't close stdout here (just flush it),
since close_stdout now closes stdout unconditionally.
Revision
1.294 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Nov 5 23:02:09 2004 UTC
(19 years, 5 months ago)
by
eggert
Branch:
MAIN
Changes since
1.293: +66 -57 lines
Diff to
previous 1.293
(inittables, sort_buffer_size, getmonth, mergefps,
first_same_file, merge, sort, main): Use size_t for indexes into arrays.
This fixes some unlikely havoc-wreaking bugs (e.g., more than INT_MAX
temporary files).
(getmonth, keycompare, compare): Rewrite to avoid need for alloca,
thus avoiding unchecked stack overflow in some cases. As a side
effect this improve the performance of "sort -M" by a factor of 4
on my benchmarks.
Revision
1.292 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Sep 7 05:09:24 2004 UTC
(19 years, 7 months ago)
by
eggert
Branch:
MAIN
Changes since
1.291: +17 -3 lines
Diff to
previous 1.291
(main): Emulate Solaris 8 and 9 "sort -y", so that
"sort -y abc" is like "sort abc" whereas "sort -y 100" is like
plain "sort".
Revision
1.291 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Aug 10 22:08:09 2004 UTC
(19 years, 8 months ago)
by
eggert
Branch:
MAIN
Changes since
1.290: +24 -20 lines
Diff to
previous 1.290
(die, xfopen, mergefps, first_same_file, merge):
A null file arg means standard output.
(main): "-o -" means to write to a file named "-",
not to standard output.
Revision
1.289 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jul 30 21:08:02 2004 UTC
(19 years, 8 months ago)
by
eggert
Branch:
MAIN
Changes since
1.288: +34 -32 lines
Diff to
previous 1.288
(UCHAR): Remove; all uses changed to to_uchar.
(IS_THOUSANDS_SEP): Use bool when appropriate.
(numcompare, main): Use char, not int, when the value is always a char.
(numcompare): Remove "register"; compilers are smart enough these days.
Revision
1.288 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Jun 21 15:03:35 2004 UTC
(19 years, 10 months ago)
by
meyering
Branch:
MAIN
Changes since
1.287: +6 -2 lines
Diff to
previous 1.287
(main): Standardize on the diagnostics given when someone gives
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
Revision
1.283 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Apr 26 15:31:13 2004 UTC
(19 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.282: +3 -26 lines
Diff to
previous 1.282
Fix POSIX-conformance bug: "sort -k 3,3.5b" is supposed to skip
leading blanks when computing the location of the field end;
it is not supposed to skip trailing blanks. Solaris 8 "sort"
does conform to POSIX. Also fix the documentation to clarify
this and related issues.
(limfield): Use skipeblanks, not skipsblanks, to
decode whether to skip leading blanks.
(trailing_blanks): Remove.
(fillbuf, getmonth, keycompare): Don't trim trailing blanks.
Revision
1.282 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Apr 20 15:08:57 2004 UTC
(20 years ago)
by
meyering
Branch:
MAIN
Changes since
1.281: +21 -36 lines
Diff to
previous 1.281
(main): Rewrite signal-catching code to make it
similar to other coreutils programs. When processing signals,
block all signals that we catch, but do not block signals that we
don't catch. Avoid problems with unsigned int warnings.
(sighandler) [defined SA_NOCLDSTOP]:
Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
Revision
1.281 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Feb 17 10:52:49 2004 UTC
(20 years, 2 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
COREUTILS-5_2_0,
COREUTILS-5_2_1
Changes since
1.280: +3 -3 lines
Diff to
previous 1.280
(usage) [-u]: Add punctuation so that the description in
the help2man-generated (line-joined) man page is more readable.
Reported by Tim Waugh.
[-T]: Add a semicolon, for the same reason.
Revision
1.280 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jan 22 20:55:26 2004 UTC
(20 years, 3 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
COREUTILS-5_1_2,
COREUTILS-5_1_3
Changes since
1.279: +15 -19 lines
Diff to
previous 1.279
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Use initialize_exit_failure rather than
setting exit_failure directly; this optimizes away redundant
assignments.
Don't include <assert.h>.
(SORT_OUT_OF_ORDER, SORT_FAILURE): Now enums, not macros.
(usage): Don't use 'assert'.
(main): Remove redundant assignment to exit_failure.
Revision
1.279 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jan 4 21:12:00 2004 UTC
(20 years, 3 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
COREUTILS-5_1_1
Changes since
1.278: +4 -10 lines
Diff to
previous 1.278
(add_temp_dir): Use x2nrealloc rather than xrealloc.
(fillbuf): Use x2nrealloc rather than xrealloc.
(sort): Use xnmalloc rather than xmalloc.
(main): Likewise.
Revision
1.277 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Nov 2 20:16:19 2003 UTC
(20 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.276: +3 -2 lines
Diff to
previous 1.276
(inittables): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.
The former is more maintainable and usually shorter.
(sort): Split a long line.
Revision
1.276 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Oct 18 10:05:47 2003 UTC
(20 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.275: +2 -2 lines
Diff to
previous 1.275
Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
Revision
1.275 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Oct 15 07:24:39 2003 UTC
(20 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.274: +1 -0 lines
Diff to
previous 1.274
(parse_field_count): Handle the case where overflow
and invalid suffix char are both reported.
Revision
1.273 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Sep 18 22:19:04 2003 UTC
(20 years, 7 months ago)
by
meyering
Branch:
MAIN
Changes since
1.272: +2 -2 lines
Diff to
previous 1.272
(WRITTEN_BY): Rename from AUTHORS.
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
Revision
1.271 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Sep 18 18:22:23 2003 UTC
(20 years, 7 months ago)
by
meyering
Branch:
MAIN
Changes since
1.270: +1 -1 lines
Diff to
previous 1.270
Update AUTHORS definition to be a comma-separated list of strings and/or update
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
Revision
1.270 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Sep 18 16:28:47 2003 UTC
(20 years, 7 months ago)
by
meyering
Branch:
MAIN
Changes since
1.269: +11 -11 lines
Diff to
previous 1.269
(numcompare): Rename local, logb, to log_b to avoid
shadowing the math function name. Also rename loga to log_a.
Revision
1.269 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Sep 5 20:53:08 2003 UTC
(20 years, 7 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
COREUTILS-5_0_91
Changes since
1.268: +25 -9 lines
Diff to
previous 1.268
Don't ignore -S if input is a pipe. Bug report by Michael McFarland in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00008.html>.
(sort_buffer_size): Omit SIZE_BOUND arg. Compute the
size_bound ourselves. if an input file is a pipe and the user
specified a size, use that size instead of trying to guess the
pipe size. This has the beneficial side effect of avoiding the
overhead of default_sort_size in that case. All callers changed.
(sort): Remove static var size; now done by sort_buffer_size.
Revision
1.268 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Sep 4 22:12:59 2003 UTC
(20 years, 7 months ago)
by
meyering
Branch:
MAIN
Changes since
1.267: +46 -20 lines
Diff to
previous 1.267
(usage): Say "blanks" instead of "whitespace",
Similar fixes for many comments.
(TAB_DEFAULT): New constant, so that we can support NUL as
the field separator.
(tab): Now int, not char. Initialize to TAB_DEFAULT.
(specify_sort_size): If multiple sizes are specified, use the largest.
(begfield, limfield): Support NUL tab char.
(set_ordering): Do not let -i override -d.
(main): Report an error if incompatible -o or -t options are given.
Report an error for "-t ''". Allow "-t '\0'" to specify a NUL tab.
Revision
1.267 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Aug 4 08:55:44 2003 UTC
(20 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.266: +3 -3 lines
Diff to
previous 1.266
(main): Use unsigned int instead of int for `nsigs'
and for the indices to iterate through nsigs.
Revision
1.266 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Aug 3 10:28:10 2003 UTC
(20 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.265: +127 -154 lines
Diff to
previous 1.265
Minor code cleanups, mostly to use more accurate
types and to remove unnecessary casts.
(min, max): Remove. All uses changed to MIN and MAX.
(hard_lc_collate, hard_LC_TIME, struct buffer.eof, struct
keyfield.skipsblanks, struct keyfield.skipeblanks, struct
keyfield.numeric, struct keyfield.general_numeric, struct
keyfield.month, struct keyfield.reverse, reverse, unique,
have_read_stdin): Now bool, not int. All uses changed.
(eolchar): Now char, not int.
(struct keyfield.ignore): Now bool const *, not int *.
(struct keyfield.translate): Now char const *, not char *.
(struct month.name): Likewise.
(blanks, nonprinting, nondictionary): Now bool[], not int[].
(cleanup, inittables, keycompare, check, mergefps, first_same_file,
check, sort, main): Use const * pointers when possible.
(month_cmp): Rewrite to avoid casts.
(inittables): Initialize tables unconditionally, to avoid branches.
(fillbuf): Return bool, not int. All uses changed.
(fillbuf, keycompare, new_key, main):
Use SIZE_MAX rather than (size_t) -1.
(trailing_blanks): Renamed from trim_trailing_blanks.
Return the number of blanks to trim. All uses changed.
(getmonth): Use trailing_blanks rather than open code.
(keycompare): Do not cast char * to unsigned char *; not needed.
CMP_WITH_IGNORE converts args to UCHAR, so no need to convert it
ourselves.
(compare, main): Use | rather than || to avoid jumps.
Replace "diff = NONZERO (alen)" with "diff = 1", since alen must
be nonzero there.
(check, first_same_file, sort, main):
Use bool instead of int local vars when possible.
(check): Merge the old 'checkfp' and 'check' into a single function,
that returns a boolean (true if the file was ordered).
All uses changed.
(main): Use int instead of unsigned for iterating through nsigs.
Rename local var "posix_pedantic" to "posixly_correct".
Revision
1.263 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 27 22:05:43 2003 UTC
(20 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.262: +1 -1 lines
Diff to
previous 1.262
(sortlines_temp): Declare local `swap' to be `int', not
`bool'. Otherwise, at least one buggy compiler (alpha gcc-2.95.4)
would cause lines[-1 - swap] (with swap = false) to evaluate to
lines[4294967295].
Revision
1.261 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 27 08:28:13 2003 UTC
(20 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.260: +5 -5 lines
Diff to
previous 1.260
(sort): Don't require two `struct line's per text line,
the new sort algorithm requires just 1.5.
Revision
1.260 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 27 08:26:49 2003 UTC
(20 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.259: +82 -26 lines
Diff to
previous 1.259
This change was inspired by a similar proposal by Stepan Kasal.
(mergelines, sortlines_temp): New functions.
(sortlines): Use them, to reduce the number of times that
we need to copy 'struct line' values. This improved CPU
performance by about 30% on one 18 MB test.
(sort): Don't invoke sortlines unless we have 2 or more lines.
Revision
1.258 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jul 19 08:17:01 2003 UTC
(20 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.257: +1 -1 lines
Diff to
previous 1.257
Include "exitfail.h".
(main): Set exit_failure rather than calling close_stdout_set_status.
Revision
1.257 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jul 18 08:53:05 2003 UTC
(20 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.256: +5 -1 lines
Diff to
previous 1.256
(main): Use close_stdout via atexit.
Now `sort --version' and `sort --help' fail, as they should
when their output is redirected to /dev/full.
Revision
1.256 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jul 18 07:23:38 2003 UTC
(20 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.255: +2 -2 lines
Diff to
previous 1.255
Include "exitfail.h".
(main): Set exit_failure, not xalloc_exit_failure and xmemcoll_exit_failure.
Revision
1.251 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri May 9 08:50:37 2003 UTC
(20 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.250: +1 -1 lines
Diff to
previous 1.250
(main): Don't overrun array bound if argc is 0.
That would happen when invoked via: execl ("/usr/bin/sort", NULL);
Revision
1.250 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Apr 11 10:51:56 2003 UTC
(21 years ago)
by
meyering
Branch:
MAIN
Changes since
1.249: +6 -6 lines
Diff to
previous 1.249
Remove anachronistic casts of xmalloc,
xrealloc, and xcalloc return values and of xrealloc's first argument.
Revision
1.247 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Nov 10 09:56:19 2002 UTC
(21 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.246: +2 -6 lines
Diff to
previous 1.246
(sighandler): Use raise, rather than kill+getpid.
(main): Declare `nsigs' to be unsigned, not int.
Revision
1.246 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Nov 5 20:34:00 2002 UTC
(21 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.245: +3 -3 lines
Diff to
previous 1.245
(checkfp): Use primitives from inttostr.h, not human.h,
to print large numbers simply.
Revision
1.244 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Sep 28 16:32:23 2002 UTC
(21 years, 6 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
COREUTILS-4_5_2
Changes since
1.243: +8 -6 lines
Diff to
previous 1.243
(begfield, limfield): Rearrange comparisons to avoid compiler warnings.
(fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
to avoid compiler warnings.
Revision
1.240 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Apr 30 09:29:45 2002 UTC
(21 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.239: +12 -24 lines
Diff to
previous 1.239
(keycompare, compare): Replace #ifdef ENABLE_NLS with if (HAVE_SETLOCALE).
(hard_LC_COLLATE): Define even if ! ENABLE_NLS.
(main): Always initialize hard_LC_COLLATE.
Put initialization next to other locale-related stuff.
Include <langinfo.h> even if ! ENABLE_NLS.
(decimal_point, th_sep): Depend on HAVE_SETLOCALE, not ENABLE_NLS.
(main): Likewise.
(MONTHTAB_CONST): Remove; all uses removed.
(struct_month_cmp, inittables): Do not depend on ENABLE_NLS.
(main): hard_LC_TIME locale does not depend on ENABLE_NLS.
Revision
1.239 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Feb 16 07:44:20 2002 UTC
(22 years, 2 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-2_0_21
Changes since
1.238: +10 -17 lines
Diff to
previous 1.238
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Revision
1.238 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Feb 2 09:37:12 2002 UTC
(22 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.237: +9 -5 lines
Diff to
previous 1.237
Add more support for POSIX 1003.1-2001, which requires removal for
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(main): Check for obsolete options.
(short_options): New constant.
Revision
1.237 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Jan 22 08:12:51 2002 UTC
(22 years, 3 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-2_0_20
Changes since
1.236: +8 -8 lines
Diff to
previous 1.236
Include xmemcoll.h, not memcoll.h.
Use xmemcoll instead of memcoll.
(die): Do not invoke cleanup; atexit does this now.
(main): Use atexit to invoke cleanup on exit.
Set xmemcoll_exit_failure to SORT_FAILURE.
Revision
1.236 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Jan 21 22:02:28 2002 UTC
(22 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.235: +1 -1 lines
Diff to
previous 1.235
(CMP_WITH_IGNORE): Don't assume that the difference
between two size_t values can be stored in an int; this doesn't
work, for example, on 64-bit Solaris.
Revision
1.233 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jan 16 22:56:33 2002 UTC
(22 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.232: +14 -15 lines
Diff to
previous 1.232
Add support for POSIX 1003.1-2001, which requires removal for
support of obsolete "+" option syntax in sort, tail, and uniq.
(usage, main): Implement this.
Revision
1.231 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Dec 20 16:53:50 2001 UTC
(22 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.230: +3 -3 lines
Diff to
previous 1.230
(usage, specify_sort_size): Accept 'K' (which is
now preferred, as it connotes 1024) as well as 'k'.
Revision
1.229 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Dec 1 17:21:57 2001 UTC
(22 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.228: +2 -4 lines
Diff to
previous 1.228
(usage): Use new macros, EMIT_HELP_DESCRIPTION and EMIT_VERSION_DESCRIPTION
instead of hard-coding --help and --version descriptions.
Revision
1.228 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Nov 23 19:58:23 2001 UTC
(22 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.227: +7 -1 lines
Diff to
previous 1.227
Factor out some common strings to make translation easier.
Split usage strings so that --help and --version descriptions are alone
in their own string.
Likewise for the one that says:
Mandatory arguments to long options are mandatory for short options too.
Revision
1.226 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Nov 11 15:24:53 2001 UTC
(22 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.225: +2 -2 lines
Diff to
previous 1.225
(struct_month_cmp): Guard definition with the same
cpp directive that guards the use.
Revision
1.224 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Nov 5 10:09:25 2001 UTC
(22 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.223: +1 -1 lines
Diff to
previous 1.223
(usage): Don't recommend setting LC_COLLATE=C.
That can cause problems (now documented in coreutils.texi).
Revision
1.223 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Nov 4 09:43:34 2001 UTC
(22 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.222: +1 -0 lines
Diff to
previous 1.222
(usage): Say that
``Mandatory arguments to long options are mandatory for short options too.\n\''
Revision
1.221 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Aug 13 10:33:28 2001 UTC
(22 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.220: +1 -1 lines
Diff to
previous 1.220
(AUTHORS): Mark string for translation, since it contains the English word `and'.
Revision
1.218 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Apr 13 20:33:32 2001 UTC
(23 years ago)
by
meyering
Branch:
MAIN
Changes since
1.217: +4 -1 lines
Diff to
previous 1.217
(main): Add a comment justifying the use of
`multi-character' rather than `multibyte' in a diagnostic.
Revision
1.217 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Apr 13 07:15:06 2001 UTC
(23 years ago)
by
meyering
Branch:
MAIN
Changes since
1.216: +13 -5 lines
Diff to
previous 1.216
(RLIMIT_AS): Do not define; just use conditional
code, since RLIMIT_RSS is similar (and is not standardized).
(default_sort_size): Don't allocate more than the RSS limit,
if this host has such a limit.
Revision
1.216 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Apr 2 09:02:23 2001 UTC
(23 years ago)
by
meyering
Branch:
MAIN
Changes since
1.215: +267 -264 lines
Diff to
previous 1.215
Include <getopt.h>.
(usage, main): Add support for long options, and check option
syntax as POSIX requires, though (as usual for GNU apps)
options can follow file names unless POSIXLY_CORRECT is set.
Many diagnostic revamped.
(long_options): New constant.
(badfieldspec): New arg MSGID. Mark as noreturn.
(parse_field_count): New arg MSGID; if null, just return null on error.
(new_key): Renamed from key_init. All callers changed. Now allocates
the new key.
Revision
1.213 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Mar 13 09:02:27 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.212: +22 -12 lines
Diff to
previous 1.212
Decrease buffer size when only merging or checking.
(sort_size): Now the user-specified sort size.
(MIN_MERGE_BUFFER_SIZE): New macro.
(MIN_SORT_SIZE): Use it.
(merge_buffer_size): New variable.
(fillbuf): Increase merge_buffer_size if a longer line is encountered.
(checkfp, mergefps): Do not allocate a buffer smaller than
merge_buffer_size.
(sort): Use the default_sort_size if sort_size is zero.
(main): Do not set sort_size to default_sort_size.
Revision
1.211 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Mar 13 08:34:38 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.210: +6 -9 lines
Diff to
previous 1.210
(merge): Move declarations of local variables into
the inner scope where they're used.
(sort): Likewise.
Revision
1.210 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Mar 13 08:28:09 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.209: +104 -133 lines
Diff to
previous 1.209
Do not include closeout.h.
(xfopen): Use stdout if *how != 'r'.
(mergefps): Remove FPS arg.
Open all input files, and close all files when done.
If OFP is null, open the output file (but after opening input files).
All callers changed.
(first_same_file): New function.
(sort, merge): Remove arg OFP; we now open the output file as needed.
All callers changed.
(merge): New arg MAX_MERGE. All callers changed.
(sort): For "sort F -o F", close the input before opening the output.
(main): Do not use close_stdout; 'sort' and 'merge' now close stdout.
(This also fixes a close-stdout-twice bug.)
Remove test for overlapping input and output files, as 'sort' no longer
needs to worry about overlap, and 'merge' checks for overlap itself.
Use first_same_file to inform 'merge' about how much to merge at
the top level, to avoid overlap.
Revision
1.209 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 3 19:31:37 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-2_0_12
Changes since
1.208: +23 -48 lines
Diff to
previous 1.208
(die): New function.
(create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
fillbuf, main): Use it to regularize error messages. The only change
in behavior is that write_bytes and the final close used to say "write
error" but now give just the output file name, which should be enough.
Revision
1.208 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 3 19:21:41 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.207: +13 -11 lines
Diff to
previous 1.207
(xfclose): Add FILE arg, and report the file name
on error. All callers changed.
Revision
1.207 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 3 19:19:06 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.206: +1 -1 lines
Diff to
previous 1.206
(main): When fclose (stdin) fails, do not mention
the output file in the error message; mention "-" instead.
Revision
1.206 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 3 19:12:23 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.205: +4 -18 lines
Diff to
previous 1.205
(xfopen): Set have_read_stdin to 1 only if file is "-".
Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
stdin, stdout, or stderr.
(xfclose): stdout is no longer a special case.
(main): Close output file, don't just flush it; there might be
an error on the close.
Revision
1.205 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 3 18:53:44 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.204: +14 -3 lines
Diff to
previous 1.204
(initbuf): If the desired size cannot be
allocated, repeatedly halve it until allocation succeeds.
Revision
1.203 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 3 18:23:29 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.202: +22 -23 lines
Diff to
previous 1.202
Tune allocation and comparison of nodes
representing temp files. This improved CPU performance of
'sort -S 1 *.[ch]' by 17% on my host.
(struct tempnode): name member now uses struct hack.
(temphead): Now a pointer, not a structure. All uses changed.
(create_temp_file): Allocate node using struct hack.
(zaptemp): Free node using struct hack. Use pointer comparison, not
string comparison.
Revision
1.201 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Mar 2 02:58:23 2001 UTC
(23 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.200: +72 -79 lines
Diff to
previous 1.200
'sort' race condition fixes.
Defend against a DoS attack where someone else creates a
temporary file with the same name as ours. Use mkstemp to do
this, supplying our own mkstemp if the system doesn't have one.
Also, fix a race condition during cleanup on hosts without
sigaction.
(NAME_MAX_IN_DIR): Remove.
(sigprocmask, sigset_t): New macros, defined only on older hosts.
(caught_signals): New var.
(xtmpfopen, tempname): Removed.
(create_temp_file): New function, combining the functions of the old
xtmpfopen and tempname. All callers changed.
Use mkstemp to create the file.
(sighandler): On hosts without sigaction, ignore signals while
cleaning up, instead of letting them interrupt cleanup.
(main): Initialize caught_signals. On hosts with sigaction, block all
caught signals while handling one. Remove duplicate code.
Revision
1.200 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Feb 22 15:11:08 2001 UTC
(23 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.199: +2 -3 lines
Diff to
previous 1.199
(keycompare): Move declarations of locals, lena and lenb,
into the inner scope where they are used.
Revision
1.198 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Feb 19 08:52:53 2001 UTC
(23 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.197: +2 -2 lines
Diff to
previous 1.197
Fix a race condition: freed storage accessed during a signal handler.
(struct tempnode.next): Now volatile.
(zaptemp): Free the file name after removing it from the temp list,
not before, because a signal can arrive between the two actions
and cleanup () traverses the list.
Revision
1.197 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Feb 19 08:50:12 2001 UTC
(23 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.196: +365 -315 lines
Diff to
previous 1.196
Check for input size, and do not overallocate memory.
Also check for memory quotas.
Revamp storage management so that line tables and character data are
taken from the same buffer. Line tables are now in reverse order,
since they grow down while the character data grow up.
(<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
(struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
is not defined.
(RLIMIT_AS): Define to RLIMIT_DATA if not defined.
(struct lines): Remove.
(struct buffer): New members nlines, line_bytes, eof.
Remove member newline_free; no longer needed, since the code no longer
runs out of line table space.
(SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
(sort_size): Renamed from sortalloc; now applies to the sum of the
character data and the line table, not just the character data.
(MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
(linelength): remove.
(specify_sort_size): Don't worry about the distinction between the
character data and the line table; that is now the caller's
responsibility.
(default_sort_size): Return the value, instead of being executed for
side effect. Return half of available memory, or 1/16 of total memory,
whichever is greater; except do not exceed 1/2 of quota.
(sort_buffer_size): New function.
(initbuf): New arg LINE_BYTES. Ensure that the line array is properly
aligned. Initialize the new set of struct buffer members.
(buffer_linelim): New function.
(fillbuf): Return int, not size_t, since the callers merely care
whether the result is nonzero. New arg FILE so that error messages
can report the file name. Keep track of eof. Initialize the line
table too, taking its memory from the input buffer's memory; this
subsumes the old findlines function and removes the need for worrying
about running out of line table entries.
(checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
management regime, in particular the fact that line tables are now
filled in by fillbuf and are in reverse order.
(checkfp): Now takes char *, not const char *, since subroutines
require that now. Rewrite to avoid lint and duplicate code.
If line length alloc calculation overflows,
simply allocate enough memory to hold the line.
(mergefps): New arg FILES, used for buffer size calculation and error
messages. Rewrite to avoid lint. Do not loop if savealloc*2
overflows.
(mergefps, merge): Zap temporary files eagerly rather than lazily;
this is needed because we now pass FILES to mergefps.
(sortlines): Args now point at end of arrays, not at beginnings.
(sort): Do not allocate temporary line array for sortlines;
instead, take the space from the same buffer.
(main): Adjust to sort_size and default_sort_size changes.
Revision
1.192 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Dec 19 09:16:28 2000 UTC
(23 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.191: +111 -16 lines
Diff to
previous 1.191
Include physmem.h.
(SORTALLOC, mergealloc, LINEALLOC): Remove.
(sortalloc): Default to zero at program startup.
(SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros.
(usage, main): Add support for new -S SIZE option.
(specify_sort_size, default_sort_size): New functions.
(initlines): Do not let alloc exceed limit.
(findlines): Likewise.
(checkfp, mergefps, sort): Use sortalloc to size everything
else, instead of relying on precomputed sizes.
Revision
1.187 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Nov 30 11:33:49 2000 UTC
(23 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.186: +152 -126 lines
Diff to
previous 1.186
Port GNU "sort" to hosts where sizes don't fit in "int",
e.g. 64-bit Solaris (sparc).
("human.h", "xstrtol.h"): Include.
(struct line): length member is now size_t, not int.
(struct lines): Likewise for used, alloc, limit members.
(struct buffer): Likewise for used, alloc, left, newline_free members.
(struct keyfield): Likewise for sword, schar, eword, echar members.
(sortalloc, mergealloc, linelength): Now size_t, not int.
(initbuf, fillbuf, initlines, begfield, limfield, findlines,
numcompare, getmonth, keycompare, compare, checkfp, mergefps,
sortlines, sort): Accept, return, and use size_t for sizes, not int.
(fillbuf, initlines, findlines, checkfp, sort): Check for overflow
when computing buffer sizes.
(begfield, limfield): Do not index past end of array.
(checkfp): Return a boolean, not a line number, as the line
number may not fit in int. All callers changed. Use
uintmax_t for line numbers, not int.
(sort): Don't allocate tmp until we need it (and know the right size).
(parse_field_count): New function.
(main): Use it to check for overflow in field counts.
"outfile" is now a pointer to const.
Revision
1.184 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Oct 21 13:03:40 2000 UTC
(23 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.183: +6 -1 lines
Diff to
previous 1.183
(main): Use EXIT_SUCCESS rather than 0.
Fail when checking (-c) with more than one file argument,
rather than simply ignoring the extra arguments.
Revision
1.181 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Aug 5 20:27:49 2000 UTC
(23 years, 8 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-2_0g
Changes since
1.180: +8 -2 lines
Diff to
previous 1.180
(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.
Revision
1.180 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jul 29 05:41:55 2000 UTC
(23 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.179: +52 -30 lines
Diff to
previous 1.179
(temp_dir): Remove.
(temp_dirs, temp_dir_count, temp_dir_alloc): New vars.
(process_id): New var.
(usage): Describe new use of -T.
(add_temp_dir): New function.
(tempname): Use new temp_dirs array.
Do not discard information from the process-id or sequence
number, unless we have short file names.
(sighandle): Use process_id instead of getpid.
(main): Initialize process_id.
Add support for the new use of -T.
Revision
1.178 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Mar 6 06:20:59 2000 UTC
(24 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.177: +10 -3 lines
Diff to
previous 1.177
(struct buffer.newline_free): New member.
(initbuf, findlines): Set it.
(fillbuf): Do not double the size of a full buffer to append a newline
unless the buffer is known to be newline free.
Revision
1.176 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Mar 3 08:18:48 2000 UTC
(24 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.175: +17 -3 lines
Diff to
previous 1.175
Big performance improvement when sorting many small files,
building on a suggestion by Charles Randall.
(fillbuf): Skip memmove if it would be a no-op,
as many memmove implementations are slow in that case.
Don't examine leftover bytes for eolchar, since they may be left
over from a previous file, and we want to read from this file.
(sort): At end of file, if there is more input and buffer room,
concatenate the next input file.
Revision
1.174 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jan 19 22:43:33 2000 UTC
(24 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.173: +160 -209 lines
Diff to
previous 1.173
Tweak sort performance.
(hard_LC_CTYPE): Remove.
(keylist): Renamed from keyhead. Now a pointer, not a
mostly-unused struct. All uses changed.
(findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps,
sort): Tune and use a more consistent style for reallocation.
(keycompare, main): Don't worry about LC_CTYPE;
it's buggy with multibyte chars anyway.
(compare): Invoke alloca (0) after each call to keycompare,
not just the ones that return nonzero. This avoids a memory
leak on architectures without builtin alloca that occurs
sometimes when a file contains all duplicate lines.
Revision
1.173 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Jan 18 07:36:53 2000 UTC
(24 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.172: +8 -8 lines
Diff to
previous 1.172
(sighandler, main):
Don't use SA_INTERRUPT to decide whether to call sigaction, as
POSIX.1 doesn't require SA_INTERRUPT and some systems
(e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
it's been part of POSIX.1 since day 1 (in 1988).
Revision
1.172 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jan 13 07:34:44 2000 UTC
(24 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.171: +3 -4 lines
Diff to
previous 1.171
(fillbuf): Avoid quadratic behavior with long lines.
Also, stop worrying about ancient memchr bug (misbehavior when
size is zero), since other code doesn't worry either.
Revision
1.171 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Nov 5 07:59:40 1999 UTC
(24 years, 5 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-2_0a,
TEXTUTILS-2_0b,
TEXTUTILS-2_0c
Changes since
1.170: +7 -6 lines
Diff to
previous 1.170
(SORTALLOC): New macro.
(sortalloc, mergealloc, LINEALLOC): Use it.
(sortalloc, mergealloc, linelength): Now const.
(sortalloc): Increase from 0.5 to 8 MB.
(mergealloc): Increase from 16 to 256 kB.
(LINEALLOC): Increase from 0.25 to 4 MB.
Revision
1.170 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Nov 4 23:11:34 1999 UTC
(24 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.169: +28 -43 lines
Diff to
previous 1.169
(begfield, limfield, findlines, keycompare, compare):
Do not consider newline to be part of a line when comparing lines
in `sort' and `comm'. POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.
Revision
1.167 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Aug 6 00:07:59 1999 UTC
(24 years, 8 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-2_0
Changes since
1.166: +23 -18 lines
Diff to
previous 1.166
Include file name in `write error' diagnostics.
(write_bytes): Add output_file parameter and use it. Update callers.
(mergefps): Likewise.
(merge): Likewise.
(sort): Likewise.
Reported by John Summerfield.
Revision
1.166 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 4 10:23:19 1999 UTC
(24 years, 9 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_22n,
TEXTUTILS-1_22o,
TEXTUTILS-1_22p,
TEXTUTILS-1_22q
Changes since
1.165: +25 -114 lines
Diff to
previous 1.165
Include hard-locale.h, memcoll.h.
(hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
replacing `need_locale'.
(memcoll): Move to lib/memcoll.c.
(keycompare): No need to alloc (0), since our caller now does it.
(compare): alloca (0) before returning.
(my_setlocale): Remove; hard_locale now dows this.
(main): Invoke setlocale, bindtextdomain, and textdomain before
invoking anything that might print an error.
Use hard_locale to determine which locales are hard.
Revision
1.164 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat May 22 02:47:45 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.163: +25 -11 lines
Diff to
previous 1.163
(strtod): Declare if STDC_HEADERS is not defined.
(general_numcompare): Use strtod, not xstrtod.
Do not consider partial conversions to be errors.
Put -infinity at the start, and +infinity at the end;
follow +infinity with NaNs (sorted by bit pattern),
and finally by conversion errors.
Revision
1.163 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri May 21 20:24:19 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.162: +77 -83 lines
Diff to
previous 1.162
Treat the trailing newline as part of the line, as required by POSIX.2.
(struct line, findlines, compare, checkfp, mergefps, sort):
A line now includes its trailing newline.
(findlines): Do not replace newline with NUL.
(memcoll, keycompare): Work even if the data to be compared are
adjacent strings; this is possible now that lines contain the
trailing newline.
(fillbuf): Always have an unused byte at the end of the buffer,
since memcoll and keycompare want to modify a byte after the last line.
(sortalloc, mergealloc): Increase by 1, for trailing byte.
Revision
1.162 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu May 20 16:29:38 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.161: +9 -2 lines
Diff to
previous 1.161
(keycompare): Ignore any length difference if the
localized comparison says the strings are equal.
Revision
1.161 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu May 20 16:09:12 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.160: +65 -59 lines
Diff to
previous 1.160
(memcoll, keycompare, compare): Handle NUL
characters properly when comparing with LC_COLLATE semantics.
(NLS_MEMCMP): Remove.
(memcoll): Renamed from strncoll.
Take separate lengths for each string.
This function is now invoked only when need_locale.
(keycompare): Don't copy strings when ignore and translate
are both NULL.
Revision
1.160 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu May 20 03:52:15 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.159: +6 -6 lines
Diff to
previous 1.159
(MONTHTAB_CONST): Renamed from NLS_CONST; the use
is also changed. Define to const also if !HAVE_NL_LANGINFO.
(usage): `,' -> `;' (English typo).
Revision
1.159 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun May 16 16:18:46 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_22l
Changes since
1.158: +36 -411 lines
Diff to
previous 1.158
Don't autodetect the locale of numbers and
months, as this conflicts with POSIX.2 and is tricky to boot.
(FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
NLS_ONE_CHARACTER_STRING): Remove macros no longer used.
(nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
longer used.
(struct nls_keyfield): Remove types no longer used.
(strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
nls_month_is_either_locale, nls_numeric_format): Remove functions no
longer used.
(monthtab): Now has the role that us_monthtab had, but it's const only
if ENABLE_NLS is not defined.
(C_DECIMAL_POINT): Renamed from FLOATING_POINT. All uses changed.
(MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS. All uses changed.
(struct_month_cmp): Renamed from nls_sort_month_comp. All uses changed.
Use strcmp, not strcoll, since the user doesn't care about collating
here.
(inittables): Read locale data into monthtab, rather than modifying a
separate month table and futzing with indirection. Do not worry about
colliding months, since we no longer autodetect month locale.
(fraccompare): Don't set no-longer-used variable nls_fraction_found.
(getmonth): Use strncmp to compare months, since user doesn't care
about collating here. Fix bug where code incorrectly assumed that
strlen (monthtab[lo].name) == strlen (monthtab[ix].name).
(keycompare, main): Don't autodetect month locale.
(compare): Don't use NLS_MEMCP in code that can't be executed if
need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
case.
(sort, insertkey, main): Don't autodetect numeric locale.
Revision
1.157 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed May 12 14:58:30 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.156: +2 -0 lines
Diff to
previous 1.156
(usage): Split the --help message into two pieces so that
neither is longer than 2048. For Irix4's cc. Reported by Kaveh Ghazi.
Revision
1.156 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun May 9 03:27:24 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_22k
Changes since
1.155: +110 -276 lines
Diff to
previous 1.155
(fraccompare, numcompare): Merge the NLS and
non-NLS versions into a single function.
(decimal_point): Now char, since we no longer convert to unsigned char.
(th_sep): Now int, since we use a value out of char range to denote
the absence of a thousands separator.
(IS_THOUSANDS_SEP): New macro.
(USE_NEW_FRAC_COMPARE): Remove.
(nls_set_fraction): Arg is now char, not unsigned char.
Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
(numcompare): Don't convert to unsigned char unless necessary.
(main): Turn off decimal points and thousand separators if they
are multibyte characters, as we don't support that yet.
Revision
1.155 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu May 6 21:51:06 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.154: +1 -1 lines
Diff to
previous 1.154
(numcompare): Handle comparison of two negative
numbers correctly in the ENABLE_NLS case.
Revision
1.152 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat May 1 00:12:26 1999 UTC
(24 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.151: +11 -7 lines
Diff to
previous 1.151
(usage): Document the differences between the
obsolescent, +POS1[-POS2] form, and the POSIX -k option.
Revision
1.149 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Apr 18 15:44:03 1999 UTC
(25 years ago)
by
meyering
Branch:
MAIN
Changes since
1.148: +4 -4 lines
Diff to
previous 1.148
(NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
#if HAVE_UNISTD_H.
Revision
1.142 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Mar 7 04:52:49 1999 UTC
(25 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.141: +1 -1 lines
Diff to
previous 1.141
(main): Use a `%s' format in error call,
in case the argument string contains a `%'.
Revision
1.138 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jan 1 22:51:58 1999 UTC
(25 years, 3 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_22g
Changes since
1.137: +22 -6 lines
Diff to
previous 1.137
(PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
file name characters in a given directory.
(tempname): Make sure the temp file name is unique even if long
file names aren't supported.
Revision
1.134 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jul 30 12:13:39 1998 UTC
(25 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.133: +1 -1 lines
Diff to
previous 1.133
* src/sort.c (usage): Add angle brackets to make `Report bugs...'
message consistent with all the rest.
Revision
1.133 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Jul 29 13:29:10 1998 UTC
(25 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.132: +9 -9 lines
Diff to
previous 1.132
(NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
clash with <langinfo.h>. All uses changed.
From Andreas Schwab.
Revision
1.132 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 26 02:54:01 1998 UTC
(25 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.131: +43 -17 lines
Diff to
previous 1.131
(main): Stat all non-`-' input file files (and fail if a
stat fails) when an output file is specified by `-o' but doesn't exist.
Revision
1.130 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Jun 29 02:11:24 1998 UTC
(25 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.129: +21 -21 lines
Diff to
previous 1.129
Change all uses of unlocked-wrapped functions to their upper case wrapper names.
Revision
1.129 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Apr 27 04:29:05 1998 UTC
(25 years, 11 months ago)
by
meyering
Branch:
MAIN
Changes since
1.128: +9 -3 lines
Diff to
previous 1.128
(keycompare): Don't return 0 from inside the keyspec-iterating loop.
With this change, test 22a passes. Reported by Zvi Har'El.
Revision
1.126 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Mar 11 11:53:29 1998 UTC
(26 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.125: +1 -1 lines
Diff to
previous 1.125
(xtmpfopen): Open temporary file exclusively, to
foil a common denial-of-service attack.
From Paul Eggert.
Revision
1.125 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jan 18 11:51:08 1998 UTC
(26 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.124: +15 -15 lines
Diff to
previous 1.124
(strncoll, strncoll_s2_readonly, look_for_fraction, numcompare):
Remove the `unsigned' from some `unsigned char*' parameter types.
Add casts via UCHAR where necessary to avoid problems with unwanted
sign extension. Based on a patch from Kaveh Ghazi to appease Irix4's
cc compiler.
e.g.,
> cc -DLOCALEDIR=\"/caip/u3/ghazi/foobar/share/locale\" -DHAVE_CONFIG_H
> -I.. -I../../src -I../../lib -I../intl -c ../../src/sort.c
> accom: Error: ../../src/sort.c, line 500: prototype parameter 1 type
> must have all of the actual arguments qualifiers (except the
> outermost) and pointed-to types must be compatible (ANSI
> 3.3.2.2,3.3.16.1)
> diff = strcoll (s1, s2);
> ----------------------------^
> accom: Error: ../../src/sort.c, line 500: Argument 1 Type Doesn't
> Match prototype description; prototype: pointer to const char is
> different from actual: pointer to unsigned char
> diff = strcoll (s1, s2);
> ----------------------------^
> accom: Error: ../../src/sort.c, line 500: prototype parameter 2 type
> must have all of the actual arguments qualifiers (except the
> outermost) and pointed-to types must be compatible (ANSI
> 3.3.2.2,3.3.16.1)
> diff = strcoll (s1, s2);
> ----------------------------^
> accom: Error: ../../src/sort.c, line 500: Argument 2 Type Doesn't
> Match prototype description; prototype: pointer to const char is
> different from actual: pointer to unsigned char
> diff = strcoll (s1, s2);
> ----------------------------^
Revision
1.124 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jan 16 23:29:24 1998 UTC
(26 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.123: +1 -1 lines
Diff to
previous 1.123
Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
for Irix-4.0.5. From Kaveh Ghazi.
Revision
1.123 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jan 16 23:23:04 1998 UTC
(26 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.122: +46 -42 lines
Diff to
previous 1.122
(mergefps): Add braces to avoid ambiguous `else' statement.
(nls_set_fraction): Likewise.
Revision
1.122 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jan 10 22:12:16 1998 UTC
(26 years, 3 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_22d
Changes since
1.121: +0 -8 lines
Diff to
previous 1.121
CHAR_BIT SCHAR_MAX UCHAR_MAX SHRT_MAX INT_MAX UINT_MAX LONG_MAX ULONG_MAX
Remove definitions of those symbols.
* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
since it now includes limit.h which defines RE_DUP_MAX.
* src/nl.c: Likewise.
* src/tac.c: Likewise.
Revision
1.121 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jan 8 22:56:45 1998 UTC
(26 years, 3 months ago)
by
meyering
Branch:
MAIN
Changes since
1.120: +7 -7 lines
Diff to
previous 1.120
(inittables): Add && HAVE_NL_LANGINFO to the #if-test
guarding the nls month-checking code.
(nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
`unsigned' from dcls of text and lim.
(main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.
Revision
1.116 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Nov 6 14:37:34 1997 UTC
(26 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.115: +28 -26 lines
Diff to
previous 1.115
(getmonth): Remove HAVE_ALLOCA #ifdefs.
We always have alloca.
(keycompare): Don't use variable size arrays (it's a gcc-extension).
Rewrite code that increments new lengths when not `ignoring'.
Revision
1.113 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Oct 25 04:43:10 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.112: +5 -42 lines
Diff to
previous 1.112
Include xalloc.h.
(xmalloc): Remove function.
(xrealloc): Remove function.
(main): Set xalloc_fail_func to cleanup.
Set xmalloc_exit_failure SORT_FAILURE.
Revision
1.108 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Oct 16 14:54:58 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.107: +79 -42 lines
Diff to
previous 1.107
(look_for_fraction): Patch from Orn Hansen.
(getmonth): Compare the two month names only to the length of the
string in the month table. Patch from Orn Hansen.
(NLS_STRNCMP): New macro.
(strncoll_s2_readonly): New function.
(inittables): Don't use temporary `comp' to hide type of comparator function.
(nls_sort_month_comp): Declare parameters to be void* to match
comparator function type required for qsort.
(getmonth): Use NLS_STRNCMP rather than #ifdef.
Use do-while, rather than while-loop.
Revision
1.103 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Oct 14 22:25:02 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.102: +5 -7 lines
Diff to
previous 1.102
(NLS_STRCMP): Define.
(getmonth): Remove ifdef and use NLS_STRCMP instead.
Use HAVE_ALLOCA, not _HAVE_ALLOCA.
Revision
1.102 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Oct 14 21:36:33 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.101: +63 -32 lines
Diff to
previous 1.101
(CHARS_IN_ABM): Remove definition
(inittables): Remove assumption that all abbreviated month names have
length 3.
(getmonth): Likewise.
(main): Add #if's for more efficient code when using the GNU C library.
From Ulrich Drepper.
Revision
1.96 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Oct 14 13:07:12 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.95: +34 -13 lines
Diff to
previous 1.95
Declare xstrdup.
(my_setlocale): New function.
(main): Guard against failure of strdup (use xstrdup) and setlocale.
Revision
1.95 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Oct 14 12:19:09 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.94: +68 -53 lines
Diff to
previous 1.94
[patch from Orn]
(look_for_fraction): Eliminate arbitrary limit on
number of `groups'. Declare as void, not int.
Patch from Ørn E. Hansen.
(main): When determining whether we're in the C or POSIX locale,
don't rely on the form of the string returned by setlocale.
Suggestion from Ulrich Drepper.
Revision
1.93 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Oct 13 03:52:35 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.92: +4 -17 lines
Diff to
previous 1.92
(NLS_MAP): Remove unused definitions.
Replace with uses of UCHAR.
(nls_locale_map): Remove dcl of unused file-scope array.
Revision
1.92 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Oct 13 03:48:58 1997 UTC
(26 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.91: +31 -29 lines
Diff to
previous 1.91
(NLS_MEMCMP): Define.
(keycompare): Use it instead of open-coded #ifdefs.
(compare): Likewise.
Revision
1.84 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jul 19 15:04:59 1997 UTC
(26 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.83: +36 -16 lines
Diff to
previous 1.83
(checkfp): Print the `disorder' message. Include both
the number and the contents of the first out-of-order line, in addition
to the file name. Change meaning of return value.
(check): Don't print disorder message here.
Adjust test of checkfp's return value.
Feature suggestion from Karl Heuer.
Revision
1.79 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Nov 25 03:07:52 1996 UTC
(27 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.78: +0 -4 lines
Diff to
previous 1.78
(set_ordering): Revert 1994-05-04 change to this function
so that blanks are not unconditionally ignored when computing start
and end positions for numeric keys. Reported by Markus Demleitner.
Revision
1.74 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Nov 2 03:47:04 1996 UTC
(27 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.73: +9 -3 lines
Diff to
previous 1.73
[!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
(checkfp): Fix off-by-one error that resulted in writing one byte
beyond the end of a malloc'd buffer. It caused `sort -c' to segfault
on Linux systems having a relatively recent libc. Before, running
the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
would provoke the memory overrun (though not necessarily the failure).
Add an assertion.
Revision
1.73 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Nov 1 00:08:58 1996 UTC
(27 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.72: +9 -10 lines
Diff to
previous 1.72
(key_init): New function.
(main): Use key_init in the two places where it was open-coded.
Revision
1.69 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri May 31 03:07:45 1996 UTC
(27 years, 10 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_16,
TEXTUTILS-1_17,
TEXTUTILS-1_18,
TEXTUTILS-1_18a,
TEXTUTILS-1_18b,
TEXTUTILS-1_18c,
TEXTUTILS-1_18d,
TEXTUTILS-1_18e,
TEXTUTILS-1_19,
TEXTUTILS-1_19b,
TEXTUTILS-1_19c
Changes since
1.68: +31 -0 lines
Diff to
previous 1.68
(limfield): #ifdef-out a block of code that makes
GNU sort incompatible with Unix sort when a key-end spec refers
to the N'th character in a field that has fewer than N characters.
The POSIX spec doesn't appear to specify behavior for this case.
From Karl Heuer.
Revision
1.65 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Mar 24 02:26:21 1996 UTC
(28 years, 1 month ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_14b
Changes since
1.64: +43 -22 lines
Diff to
previous 1.64
[SORT_FAILURE]: New macro.
Be careful to exit with 1 only when -c is used and the
input is not properly sorted. In all other cases, use
SORT_FAILURE as required by POSIX.
(main): Change some `error (1, ...' to use SORT_FAILURE.
Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
Replace all uses of `2' (as exit code) with SORT_FAILURE.
Revision
1.63 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 16 22:31:00 1996 UTC
(28 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.62: +1 -2 lines
Diff to
previous 1.62
Don't include version.h.
(main): Use PACKAGE_VERSION instead of version_string.
Revision
1.62 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Mar 11 22:07:21 1996 UTC
(28 years, 1 month ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_14a
Changes since
1.61: +8 -8 lines
Diff to
previous 1.61
(write_bytes): Renamed from xfwrite.
Remove SIZE parameter. It was always 1.
Update all callers.
Rename NELEM parameter to N_BYTES and change its type to size_t.
Revision
1.61 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Mar 9 20:19:27 1996 UTC
(28 years, 1 month ago)
by
meyering
Branch:
MAIN
Changes since
1.60: +3 -0 lines
Diff to
previous 1.60
(main): Initialize for internationalized message support: call setlocale,
bindtextdomain, and textdomain.
Revision
1.57 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Dec 5 17:53:39 1995 UTC
(28 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.56: +34 -9 lines
Diff to
previous 1.56
(numcompare): Properly handle all cases in which signs differ. From Karl Heuer.
Revision
1.55 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Nov 29 22:51:04 1995 UTC
(28 years, 4 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
TEXTUTILS-1_13F
Changes since
1.54: +38 -17 lines
Diff to
previous 1.54
(limfield): Remove field_start junk.
Don't try to trim trailing blanks here -- it's not possible
because we don't know where the field begins.
Properly distinguish between cases where TAB character is specified
and when the default is used.
(trim_trailing_blanks): New function.
(findlines): Call it.
(keycompare): Likewise.
Revision
1.54 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Nov 28 20:07:17 1995 UTC
(28 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.53: +48 -10 lines
Diff to
previous 1.53
(begfield): Replace unnecessary loop with if-else.
(limfield): Fix bug that made field specs like -k1.5 return a
pointer into LINE beyond the first field.
Rewrite to properly ignore trailing blanks.
Replace unnecessary loop with if-else.
(main): Don't decrement T2 corresponding to `x' in field specs like -ku.v,w.x.
Revision
1.53 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Nov 15 21:42:47 1995 UTC
(28 years, 5 months ago)
by
meyering
Branch:
MAIN
Changes since
1.52: +50 -8 lines
Diff to
previous 1.52
Add support for sorting numbers in scientific notation.
Include xstrtod.h.
(struct keyfield): Add field: general_numeric.
(usage): Describe -g option.
(general_numcompare): New function.
(keycompare): Use new comparison function when general_numeric
flag is set.
(set_ordering): Honor `g' flag.
(main): Initialize and use new field.
From Marcus Daniels <marcus@sysc.pdx.edu>.
Revision
1.50 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Oct 26 13:19:10 1995 UTC
(28 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.49: +23 -8 lines
Diff to
previous 1.49
(xtmpfopen): New function -- for opening temp files.
Use it instead of xfopen.
Revision
1.48 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Oct 16 14:45:09 1995 UTC
(28 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.47: +51 -47 lines
Diff to
previous 1.47
Move struct dcls to precede dcls of file-scope variables.
(monthtab, keyhead): Separate variable dcls from type dcls.
Revision
1.47 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Oct 16 14:38:11 1995 UTC
(28 years, 6 months ago)
by
meyering
Branch:
MAIN
Changes since
1.46: +81 -132 lines
Diff to
previous 1.46
(usage): Move function definition to precede uses and
remove remove forward dcl.
Protoize and add `const' attribute to dcls of lots of formals.
Revision
1.44 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Sep 14 13:31:52 1995 UTC
(28 years, 7 months ago)
by
meyering
Branch:
MAIN
Changes since
1.43: +13 -6 lines
Diff to
previous 1.43
(tempname): Replace `16' with a more readable expansion.
Make sure that SEQ never exceeds 99999.
Revision
1.43 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Sep 14 13:09:27 1995 UTC
(28 years, 7 months ago)
by
meyering
Branch:
MAIN
Changes since
1.42: +7 -7 lines
Diff to
previous 1.42
(sort): Rename local: ntemp -> n_temp_files, to avoid confusion
with another local, ntmp.
Revision
1.42 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Aug 8 04:58:46 1995 UTC
(28 years, 8 months ago)
by
meyering
Branch:
MAIN
Changes since
1.41: +4 -0 lines
Diff to
previous 1.41
(mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
compiler warning. From Ulrich Drepper.
Revision
1.40 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 30 05:02:37 1995 UTC
(28 years, 8 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
textutils-1_12_1
Changes since
1.39: +8 -1 lines
Diff to
previous 1.39
(check): Print `disorder on...' message on standard error, not stdout.
This is a minor concession to POSIX which says `no output shall be produced'.
(main): Fix -k so it works. -k 2,3 was being treated like -k 2.
Reported by Marcus Daniels <marcus@sysc.pdx.edu>.
Revision
1.37 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 9 16:42:31 1995 UTC
(28 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.36: +3 -3 lines
Diff to
previous 1.36
(main): When using obsolescent +pos -pos syntax, allow
omission of field spec only when character offset is specified.
Otherwise, -. +. would be accepted.
Revision
1.36 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Jul 9 02:25:11 1995 UTC
(28 years, 9 months ago)
by
meyering
Branch:
MAIN
Changes since
1.35: +3 -3 lines
Diff to
previous 1.35
(main): Allow field spec, M, to be omitted in +M.N or -M.N
position specification. Omitting M is equivalent to specifying `0'
for M. From Rick Sladkey (jrs@world.std.com).
Revision
1.35 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jun 24 21:10:15 1995 UTC
(28 years, 10 months ago)
by
meyering
Branch:
MAIN
Changes since
1.34: +3 -0 lines
Diff to
previous 1.34
Undefine min and/or max before defining to avoid redefinition warning
on systems.
Revision
1.25 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Jan 28 13:04:27 1995 UTC
(29 years, 2 months ago)
by
meyering
Branch:
MAIN
Changes since
1.24: +4 -4 lines
Diff to
previous 1.24
(checkfp, mergefps): Use memcpy instead of bcopy.
(fillbuf): Use memmove instead of bcopy.
Revision
1.22 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Dec 12 00:00:22 1994 UTC
(29 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.21: +7 -1 lines
Diff to
previous 1.21
sort.c (main): Fix interpretation of field offsets when specified
via -k option. They were being interpreted as zero-indexed.
POSIX says they are 1-based indices.
(keycompare): Don't ignore characters at the end of words
when otherwise they compare equal. Both from Rik Faith
<faith@cs.unc.edu>.
Revision
1.21 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Dec 2 16:54:56 1994 UTC
(29 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.20: +8 -5 lines
Diff to
previous 1.20
(checkfp): Initialize keybeg and keylim fields.
Before, this command
perl -e 'print join ("\n", (1..513)), "\n";'|sort -cs -n
failed on SunOS 4 systems. From Robert H. de Vries <robert@and.nl>.
Revision
1.20 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Dec 2 16:49:47 1994 UTC
(29 years, 4 months ago)
by
meyering
Branch:
MAIN
Changes since
1.19: +14 -6 lines
Diff to
previous 1.19
(xfclose): Report failed fflush. Otherwise, failed write to stdout
could be missed because of subsequent clearerr.
(main): Include filename in a couple error messages.
Add missing %s in an error format string.
Revision
1.2 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sun Nov 8 20:20:09 1992 UTC
(31 years, 5 months ago)
by
meyering
Branch:
MAIN
CVS Tags:
static-0
Changes since
1.1: +16 -16 lines
Diff to
previous 1.1
Declared lots of external functions and variables static.
Made several statically-initialized arrays `const'
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
select a symbolic revision name using the selection box, or choose
'Use Text Field' and enter a numeric revision.