X J D I C V1.1 INSTALLATION GUIDE XJDIC is an electronic Japanese-English dictionary program designed to operate in a windowed environment with Japanese font support, such as X11 with kterm/kinput. It is based on JDIC & JREADER which were developed to run under MS-DOS on IBM PCs or clones. See the document XJDIC.MAN for general information. The XJDIC distribution is in the file xjdic.tar.Z. This contains: xjdic.c xjdxgen.c xjdic11.man xjdic11.install radicals.tm vconj romkana.cnv .xjdicrc.skel In addition, you will need to obtain the Japanese/English and Kanji dictionary files (edict.Z and kanjidic.Z). These are distributed separately as they are continuously being updated. Unpack all the .Z files and compile the two programs. Both have been written using ANSI C conventions (prototypes, etc.) and should compile cleanly in most situations. You may wish to modify the definition of DEFAULT_DICDIR in xjdic.c, which enables you to set the default directory where xjdic will look for its files. If this is not set, it will use the current directory. There is some code to drive cbreak on and off which has a #ifdef or two. It defaults to the SVR4 variety, but it can also be set to compile with the pure BSD ioctls if you like (I have not tested them.) Install the executables in some place in the users' path. Place the edict, kanjidic, radicals.tm, vconj and romkana.cnv files in some suitable directory, and make sure that users have an environment variable "XJDIC" set to that directory. If desired, set up a .xjdicrc control file. (A skeleton file containing some possible filters is included.) This file must be in the "XJDIC" directory, the HOME directory, or the current (PWD) directory. If the user(s) want to have the facility to match against dictionary entries which do not yet have English translations, obtain the wsktok.Z file, unpack it and either add the contents of the wsktok.dat file to edict, or run another copy of xjdic in another window using wsktok.dat as its dictionary. Run the XJDXGEN utility to generate the ".xjdx" index files for the two dictionaries. XJDXGEN has a single command-line argument: the name of the dictionary file for which it is generating an index. It defaults to "edict". That is about it. If you have trouble with the compilation, feel free to fiddle with the code (sorry about the lack of comments), and send me details of what you had to do. Don't be too critical of the program: it shows a lot of scars from its port from the MS-DOS/Borland Graphics original, and I wrote while I was still teaching myself C. XJDXGEN XJDXGEN is a utility program that parses the dictionary file and produces a file .xjdx containing the index table (see below). If you make any changes to the dictionary, you must run XJDXGEN before operating XJDIC again. XJDXGEN stores the length of the dictionary file and the XJDIC version in the .xjdx file, and if XJDIC detects a mismatch, it will refuse to operate. This ensures that XJDXGEN is run every time the dictionary is modified. The index table generated by XJDXGEN contains a long integer entry marking the starting byte of each "word" in the dictionary, and is sorted in alpha/kana/JIS order of the "words" indexed. This enables a fast binary search to be done, and for the display to be in alphabetical/etc. order by keyword. The "words" indexed by XJDXGEN are defined as any sequence of one or more kana characters, any occurrence of a kanji character or any sequence of three or more ascii alphabetic or numeric characters. Common words like: "of", "to", "the", etc. and grammatical terms like: "adj", "vi", "vt", etc. are not indexed. Words encapsulated in braces ({...}) are not indexed either. Jim Breen Department of Robotics & Digital Technology Monash University Melbourne, Australia (jwb@capek.rdt.monash.edu.au) July 1992 - July 1993