Notes for websterd version 1.2 Steve Hayman sahayman@cs.indiana.edu 1991 05 13 This is version 1.2 of my NeXT webster daemon for NeXTOS 2.0. (The first version of this program was supposedly called version 2.0; sorry for the confusion, I'm starting to use RCS to log the changes and it's simpler to call this one 1.2. ) This daemon runs on a NeXT and allows remote (non-Next) machines on your network to look things up in the NeXT's dictionary, using either the "webster" or "xwebster" (for X11R4) client programs. Version 1.2 adds support for the thesaurus, which wasn't present in version 2.0.0 . Be sure to read the section of the Installation Notes (below) about what you have to do to get the thesaurus to work. The dictionary format changed drastically when NeXT went to 2.0, so my old version of websterd for NeXT 1.0 doesn't work at all. Unfortunately to compile this one, you need to ask NeXT to send you the "libtext" and "libbtree" libraries, since they aren't included with NeXT OS. Send a note to "ask_next@next.com", tell them you would like to get libbtree and libtext. If you can set things up so that they can ftp the libraries to you (they're pretty big) things will go nice and quickly, otherwise you have to send them floppies or an optical. I wish I could give you a copy of libbtree and libtext, but I checked with NeXT and they're not keen on that. Installation Notes: 1) Get the libbtree and libtext packages from NeXT as described above. These will come to you as two large compressed tar files. Uncompress and untar them. Now you need to put libbtext.a, libbtree.a and the include files somewhere where the Makefile can find them. Here's one possibility. Copy LIBTEXT/libtext.a to /usr/local/lib/libtext.a Copy LIBBTREE/libbtree.a to /usr/local/lib/libbtree.a mkdir /usr/local/include /usr/local/include/text /usr/local/include/btree copy LIBTEXT/include/*.h to /usr/local/include/text copy BTREE/usr/local/include/*.h to /usr/local/include/btree 2) Add this line to /etc/services webster 2627/tcp If, as is likely, you are running "netinfo" you will need to do something like "niload services . " 6) Fix the thesaurus. Run "make repair". Why is this necessary? Here's the deal. The NeXT libbtext.a library routines will crash your program if you try to use them to read the thesaurus. I've figured out why this is. Briefly, the thesaurus and dictionary files are implemented as BTree files named /NextLibrary/References/Webster-Dictionary/Dictionary.nxbf and /NextLibrary/References/Webster-Thesaurus/Thesaurus.nxbf. Any Btree file can contain one or more indices. The Dictionary file contains both a "headword" index and a "Full Text" index. The thesaurus contains only a "headword" index. (The difference is that a headword index records only the "primary" entry for any particular word; a Full Text index has an entry for each word every time it appears in the dictionary. So, in the dictionary headword index, there is only one entry for the word "bird" and if you look up "bird" using that index you'll only see the main definition for "bird". If instead you use the "Full Text" index, you'll see the definitions for aepyornis, aeire, air sac, albatross, ... and any other word whose definition includes the word "bird" somewhere in it.) Now, the problem is that the libtext routines cannot deal with a BTree file that contains only a Headword index. I don't know why this is, but the referenceOpen() routine will cause a core dump if you try to open the thesaurus, since it has only a Headword index. So, I have include a program with websterd called "addfulltextindex" which simply creates an empty index called "FullTextIndex" in a BTree file. If you run "make repair", this will do addfulltextindex /NextLibrary/References/Webster-Thesaurus/Thesaurus.nxbf This modifies the thesaurus BTree file slightly, so that it now has both a Headword index and FullText index (even though the latter index is empty.) Now the libtext routines will work. You have to run 'make repair' once before your websterd can access the thesaurus definitions. websterd checks to see if the thesaurus has a Full Text index, and if it doesn't, it produces a message saying "Hey, go bug your system administrator". Legal Note: I have been told informally by a few people at NeXT that using this dictionary to export webster data to a non-NeXT machine is "illegal". I find this hard to believe and have not been able to find anything in the software license agreement that forbids this. What good is a dictionary if you can't look up words in it? It seems to me that exporting the dictionary data to other non-NeXT machines *belonging to the same "department"* is a reasonable use of the dictionary. Please don't export this dictionary to people who wouldn't otherwise have access to your NeXT. That's not fair. Anyway, enjoy. I welcome any and all feedback. ..Steve sahayman@cs.indiana.edu