home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume21 / kdrill / part01 / defs.h next >
Encoding:
C/C++ Source or Header  |  1993-10-07  |  1.1 KB  |  44 lines

  1. /*
  2.  * defs.h for kdrill
  3.  *   Okay, I lied.. this file has struct definitions, as
  4.  *   well as the #defines
  5.  */
  6. extern int errno;
  7.  
  8. /* enum for "changemode()" */
  9. enum { GUESSMEANING, GUESSKANJI,TOGGLEKANA};
  10.  
  11.  
  12. struct translationstruct {
  13.  
  14.     char *english;    /* english translation string.
  15.              * null-terminated.
  16.              * Can theoretically be any length, but
  17.              * since it will all be on a single-line
  18.              * text widget, that would be silly
  19.              */
  20.  
  21.     int frequency;        /* frequency that kanji is used */
  22.     int grade_level;    /* akin to  school class level */
  23.     XChar2b *pronunciation;
  24.  
  25. };
  26.  
  27. /********************************************************************
  28.  
  29. SO here's the format for the translation/dictionary file I have decided
  30. on so far:
  31.  
  32. I changed specs. it will have to be in "kanjidic" format...
  33.  
  34. Two char high-bit-set identifier, followed by JIS number in hex.
  35. Followed by stroke information? [HAS TO BE TERMINATED BY 'Gx', where
  36.                   'x' is any number]
  37. Followed by pronunciation guide, in kana.
  38. Followed by various english translations, enclosed in {}
  39.  
  40. "kanjidic" often has multiple {} phrases. which leads to another nasty
  41. hack  in readstructs()
  42.  
  43. */
  44.