Category : Files from Magazines
Archive   : CUJ9301.ZIP
Filename : 1101090A
// catalog.cpp //
/////////////////
#include "isam.h"
#include
static struct cat {
char *name;
t_func func;
} Catalog[] = { { "descwrds", descwrds },
{ NULL, NULL } };
///////////////////////
// Catalog utilities //
///////////////////////
int catalog_number (char *name)
{
int i = 0;
while (Catalog[i].name) {
if (!strcmp(nospace(name), Catalog[i].name))
return i;
i++;
}
return -1;
}
t_func cataloged_func(int f)
{
return Catalog[f].func;
}
/////////////////////////
// Cataloged functions //
/////////////////////////
char * descwrds (char *r);
char *descwrds (char *r)
{ // Extracts up to 20 - 7 letter words from desc field.
// The description field starts at posn 37 and goes
// on for 120 characters.
static char keys[141];
int i = 37, j = 0, k = 0;
memset (keys, ' ', 140);
while ((i < 157) && (k < 20)){
while ((ispunct(r[i]) || isspace(r[i])) && i < 157)
i++;
while (!ispunct(r[i]) && !isspace(r[i]) && i < 157
&& j < 7)
keys[(7 * k) + j++] = r[i++];
while (!ispunct(r[i]) && !isspace(r[i]) && i < 157)
i++;
k++;
j = 0;
}
keys[7 * k] = '\0';
return keys;
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/