Category : Files from Magazines
Archive   : CUJ9204.ZIP
Filename : 1004017A

 
Output of file : 1004017A contained in archive : CUJ9204.ZIP
#include
#include

typedef enum {FLOAT, INTEGER} Code;
typedef struct {
char *s;
Code code;
} Entry;
Entry symtab[] = {
{"float", FLOAT},
{"integer", INTEGER}}

static int cmp(const void *ck, const void *ce)
{ /* compare key to table element */
return (strcmp((const char *)ck, ((Entry *)ce)->s));
}

Entry *lookup(char *key)
{ /* lookup key in table */
return (bsearch(key, symtab,
sizeof symtab / sizeof symtab[0],
sizeof symtab[0], &cmp));
}



  3 Responses to “Category : Files from Magazines
Archive   : CUJ9204.ZIP
Filename : 1004017A

  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/