Dec 132017
 
File sorting utiltiy that handles files larger than available memory, full C source code included.
File PDSRT321.ZIP from The Programmer’s Corner in
Category Word Processors
File sorting utiltiy that handles files larger than available memory, full C source code included.
File Name File Size Zip Size Zip Type
BLDTST.C 3116 1183 deflated
BLDTST.EXE 11674 7499 deflated
ISDEV.C 863 454 deflated
KEYSRT.C 4100 1302 deflated
MAKEFILE 836 398 deflated
MERGE.C 4118 1237 deflated
PDQSORT.C 7299 1963 deflated
PDSORT.C 13290 3719 deflated
PDSORT.DOC 18489 4581 deflated
PDSORT.EXE 24504 13284 deflated
QUEUE.C 1085 400 deflated
QUEUE.H 307 179 deflated
READ.ME 4740 1981 deflated
UZ.BAT 32 32 stored
ZIPLST 148 91 deflated

Download File PDSRT321.ZIP Here

Contents of the READ.ME file


PDSORT 3.2.1 (September 7, 1991) This version repairs a bug in the
key sort that caused the input file to be written out to the output
file unsorted!

PDSORT 3.2.0 (July 24, 1991) This version introduces a "key sort"
option for use with large files of long records with small keys in
a reduced memory environment. The current and prior versions of
PDSORT are limited to a single merge pass and, in reduced memory
environments such as occur when PDSORT is excuted out of a shell,
large files of long records produce too many runs to be merged in a
single pass. If the sort keys are short, a key sort can alleviate
the problem by producing far less runs. My thanks to Jerry Windham
for reporting the problem!

PDSORT 3.1.1 (July 23, 1991) This version corrects two small errors
in the memory allocations for the merge passes. It was also
recompiled (as a C program) under Borland C++ 2.0. The BLDTST
program was also modified to produce output records of a specified
length.

PDSORT 3.1.0 (April 15, 1991) This version removes an inadvertent
limit of 512 characters on the input record length.

PDSORT 3.0.0 (February 5, 1991) This version of PDSORT contains and
uses a fully public domain iterative implementation of the qsort()
routine that contains all of the improvements recommended by Robert
Sedgewick. The public domain qsort() is the file PDQSORT.C in the
ZIP. It will be released separately later since it is a general
replacement for the ANSI C standard qsort(). This version of PDSORT
also contains a small program, BLDTST, that can be used to build large
files of test data for PDSORT. The current version of BLDTST
constructs files consisting of records that are nine character strings
of numeric data.

PDSORT 2.3.0 (February 3, 1991) changed the qsort() routine from the
standard Turbo C runtime qsort() to an iterative implementation. The
recursive version used by Turbo C requires too much stack for large
arrays in "bad" order. Unfortunately, the qsort() routine in this
version is one for which I do not have source distribution rights!
PDSRTxxx.ZIP will not contain the source for the qsort() routine until
I can write my own iterative version again.

PDSORT 2.2.1 (February 2, 1991) corrected PDSORT to return an
ERRORLEVEL of zero on normal termination and different ERRORLEVELs,
from 1 to 12 depending upon the error for error termination. Changed
the memory allocation for the Sort Array to use farmalloc() and an
unsigned long.

PDSORT 2.2.0 (October 19, 1990) changed the operational
charactersitics of PDSORT at user request (thanks to Dan Fandrich for
the suggestions!). PDSORT now no longer requires a maximum record
length specification on the command line - if none is supplied, it
will use a default of 256 characters/line. If no command line
parameters are supplied, PDSORT will now sort standard input to
standard output using a record length of 256 characters/line and a
sort key of the entire record. If a maximum record length and/or sort
keys are to be specified, the '-' option must be specified BEFORE the
record length and keys for PDSORT to use standard input and standard
output. PDSORT also now has a "quiet" option, '-q', that will
suppress all messages other than error messages.

PDSORT 2.1.3 (July 17, 1990) fixed and error in the determination of
the intermediate disk if the output file was specified to reside in
the root of the "current" disk (i.e. pdsort in_file \out_file). Also
increased the stack size to enable handling of many in order records.

PDSORT 2.1.2 (June 20, 1990) removed the special quicksort routine -
the standarg qsort() routine supplied with Turbo C++ 1.0 is faster
than the special!

PDSORT 2.1.1 (June 17, 1990) fixed a small problem in the quicksort
routine that caused excessive sort times on a few files. This version
was also recompiled with Turbo C++ 1.0.

PDSORT 2.1.0 (June 5, 1990) is the second public release of PDSORT.
This release fixes a problem with the default key (the entire record)
that caused a Stack Overflow. It also uses a replacement for the
standard qsort() that is several times faster, particularly on files
that are in near order. The error checking has also been increased.
There are no functional enhancements in this version, however.

PDSORT 2.0.0 is the first public release of PDSORT, all of the
versions 1.x.x had errors far to major to allow release. PDSORT is
not the fastest of the sorts, QUIKSORT, the fastest that I have found
so far, is three times faster. PDSORT is, however, free and fully
public domain. The ZIP file contains all of the C source for the
program (Turbo C 2.0 compatible).

Don A. Williams



 December 13, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)