Age | Commit message (Collapse) | Author |
|
|
|
(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.
|
|
(main): Use key_init in the two places where it was open-coded.
|
|
|
|
Otherwise, sign extension caused misordering when using e.g. -f.
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
<seebs@taniemarie.solon.com>.
|
|
(main): Use PACKAGE_VERSION instead of version_string.
|
|
Remove SIZE parameter. It was always 1.
Update all callers.
Rename NELEM parameter to N_BYTES and change its type to size_t.
|
|
bindtextdomain, and textdomain.
|
|
(usage): Describe it.
(main): Set eolchar to 0 for -z.
From Mark W. Eichin <eichin@cygnus.com>.
|
|
non-ascii characters (supposed to be ignored with -i) were treated
as significant. Reported by Carl Johnson <carlj@cjlinux.home.org>.
|
|
|
|
|
|
<r.alexander@auckland.ac.nz>.
|
|
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.
|
|
(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.
|
|
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>.
|
|
(xrealloc): Likewise.
|
|
|
|
Use it instead of xfopen.
|
|
proper permissions on temporary files. Reported by Erik Corry
(erik@kroete2.freinet.de).
|
|
(monthtab, keyhead): Separate variable dcls from type dcls.
|
|
remove remove forward dcl.
Protoize and add `const' attribute to dcls of lots of formals.
|
|
to determine whether `sigaction' functions are available.
Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>.
Fix suggested by Karl Berry.
|
|
Move a couple dcls from function scope into inner block.
|
|
Make sure that SEQ never exceeds 99999.
|
|
with another local, ntmp.
|
|
compiler warning. From Ulrich Drepper.
|
|
|
|
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>.
|
|
|
|
|
|
omission of field spec only when character offset is specified.
Otherwise, -. +. would be accepted.
|
|
position specification. Omitting M is equivalent to specifying `0'
for M. From Rick Sladkey (jrs@world.std.com).
|
|
on systems.
|
|
|
|
Otherwise, at least Ultrix-4.3's fflush would return EOF.
Reported by Jim Blandy (jimb@cyclic.com).
|
|
From Karl Berry.
|
|
|
|
|
|
[DEFAULT_TMPDIR]: Use this instead.
|
|
string representation is no longer than five digits.
From Hans Verkuil (hans@wyst.hobby.nl)
|
|
|
|
|