This is thesaurus.c in view mode; [Download] [Up]
#include "text/webster.h" void main(argc, argv) int argc; char *argv[]; { ReferenceBook *book; Definition *d; int exact = 1; int i; if (argc == 1) { printf("commandline thesaurus USAGE: %s arg [arg...]\n", argv[0]); exit(1); } book = referenceOpen("Webster-Thesaurus"); if (book == 0) { printf("no thesaurus\n"); exit(1); } dictionaryFoldSenses = 80; /* fold output lines to 80 * chars */ i = 1; while (argc > i) { printf("getdef\n"); if (d = getDefinition(argv[i], book, exact)) { printf("Thesaurus for %s:\n", argv[i++]); putDefinition(d, 0); printf("\n"); freeDefinition(d); } else { printf("Thesaurus for %s:\n", argv[i++]); printf("Sorry, no entry...\n"); } } }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.