Category : C Source Code
Archive   : BFSORTS.ZIP
Filename : README.SRT

 
Output of file : README.SRT contained in archive : BFSORTS.ZIP
These files are a series of sort algorithms, coded in ANSI standard C, and
a program to execute them with. Each of the sort functions conforms to the
ANSI definition of qsort(), with one minor exception -- whereas qsort() is of
type void, these functions return an integer: S_OK to indicate success, or
S_NOMEM to indicate that there was insufficient memory to perform the sort.

The shell program has a number of options, but is inflexible in one way: it
deals with arrays of type 'double'. It allows you to choose the number of
doubles to be sorted at runtime, and allows you to choose how sorted they are
before execution, on a scale of -1 (reverse sorted) to 0 (random order) to +1
(sorted). This is useful in examining the dependence of a sort on any ordering
of its input data.

The shell also allows you to either display, or suppress the display, of the
array. As a debugging aid, it also verifies that the array, after being
sorted, is actually in order.

Finally, the shell measures the amount of time taken in performing the sort.
Time taken to generate the input and verify the sort are not taken into
account by this. The time is displayed in seconds.

Please send any comments or questions to me either on CompuServe (ID
71320,3635) through EasyPlex, BPROGB, or MACDEV. I also hang around on a
number of other forums, but I usually check the above daily.

Alternatively, comments may be left on my bulletin board. It's the
Enlightened, at (703) 370-9528, N/8/1, 2400 bps or less.

My intent in uploading these routines is to establish a standard set of
sorting routines that programmers can use. Feel free to use these routines in your own programs. Also, feel free to add your own routines to the set; if you
do so, please include your own name and where you can be reached in the .C
and .H files. I'd rather that you didn't distribute any modifications of my
source (you are welcome to distribute the originals, of course), except for
SORT.H and TESTSORT.C (to accommodate any new routines you include). If
you modify the above, please document what you did in the modified files.

Also, one more request. I've tried to keep this library to the ANSI
standard. Please do the same. This code was developed using Borland's Turbo
C 2.0, and verified to work with Turbo C++ as well. It should also work on
other ANSI-compatible systems, including THINK C on the Macintosh (which I'd
really like to get one of these days). Let's keep it that way -- no compiler-
dependent tricks.

Bruce Feist
12/26/90


  3 Responses to “Category : C Source Code
Archive   : BFSORTS.ZIP
Filename : README.SRT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/