Commit Graph

10 Commits

Author SHA1 Message Date
jdolecek affba8f2e9 Pull up various cosmetic (mostly whitespace) changes from OpenBSD.
This is primarily to ease syncing the two versions.
2001-02-19 20:50:17 +00:00
jdolecek f65ee1b182 merge(): use array of buffers instead of one big buffer for all records, and
enlarge them as necessary to read records from merged files; the buffers
	are allocated once per program run, so there shouldn't be any
	performance difference
This makes sort(1) pass also regression 40B and should make it
fully arbitrary long record capable.
XXX the buffer array could probably be freed on end of fmerge() to save memory
2001-01-19 10:50:31 +00:00
jdolecek f2deab8a4c when merging stuff from several files, make merge handle records correctly
for stable sort so that the records are not swapped arbitrarily - this makes
in-tree BSD sort(1) pass regression test 38

while here, do couple of cleanups, like s/16/MERGE_FNUM/ where appropriate,
making local stuff static and some intendation/code format changes
2001-01-13 10:33:30 +00:00
jdolecek 1c216f18ea general cleanup of file list passing:
* get rid of union f_handle, replace by passing explicit int parameter
  and (new) struct filelist
* add new typedefs gen_func_t and put_func_t and use where appropriate
2001-01-11 14:05:24 +00:00
jdolecek fe7f0860c0 order(): since getline()/getnext() behaviour wrt passed
end pointer has changed (full buffer is used instead of first DEFLLEN bytes)
the end pointer cannot be shared for crec and prec, we need to pass
different value in each case
2000-10-17 15:16:27 +00:00
jdolecek ed1fd80898 constify, rename MAXLLEN to DEFLLEN 2000-10-16 21:42:21 +00:00
jdolecek 681fb9cb36 don't use register declarations 2000-10-15 20:46:33 +00:00
bjh21 e5218d1719 Two classes of changes from the initial OpenBSD commit of this sort(1):
FILE * variables are called "fp" rather than "fd".
Better (safer) temporary-file handling.
2000-10-07 20:37:06 +00:00
bjh21 6029888a3a Hit sort(1) with a hammer till it compiles.
Also add RCSIDs.
2000-10-07 18:37:09 +00:00
bjh21 1d5d9b5b60 4.4BSD-Lite2 contrib/sort 2000-10-07 16:39:34 +00:00