Category : Recently Uploaded Files
Archive   : SNPD9503.ZIP
Filename : STRSORT.C

 
Output of file : STRSORT.C contained in archive : SNPD9503.ZIP
.I 2 6
** Written in ANSI C and optimized for size under Borland TC and BC++.
**
** Public domain by Raymond Gardner 12/05/91 🙂
** based on a public domain version by Thad Smith 12/05/91,
** based on a public domain version by
** Ray Gardner Denver, CO 12/88
.D 3 1
.I 6 20

void strsort(char **v, unsigned n)
{
register unsigned int gap;
unsigned int i, j;
register char **a;
char **b;

gap = 0;
do
{
gap <<= 1;
} while (++gap < n);

while ((i = (gap >>= 1)) != 0)
{
for ( ; (j = i) < n; i++)
{
a = v + j;
do
.D 7 14
.I 21 12
j -= gap;
b = a;
a -= gap;
if (strcmp(*a, *b) > 0)
{
register char *tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
else break; /* better have this break! */
} while (j >= gap);
.D 22 10


  3 Responses to “Category : Recently Uploaded Files
Archive   : SNPD9503.ZIP
Filename : STRSORT.C

  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/