home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d191 / ispell.lha / ISpell / src.zoo / ispell.h < prev    next >
C/C++ Source or Header  |  1989-02-22  |  7KB  |  229 lines

  1. /* -*- Mode: Text -*- */
  2.  
  3. #ifdef AMIGA 
  4. extern long _Heapsize;
  5. #ifndef BUILDHASH
  6. #define printf    printcon
  7. #undef putchar
  8. #undef getchar
  9. #define putchar putccon
  10. #define getchar getccon
  11. #endif
  12. #endif
  13.  
  14. struct dent {
  15.     struct dent *next;
  16.     char *word;
  17.  
  18.     unsigned short used : 1;
  19.  
  20. /* bit fields for all of the flags */
  21.     unsigned short v_flag : 1;
  22.         /*
  23.             "V" flag:
  24.                 ...E --> ...IVE  as in CREATE --> CREATIVE
  25.                 if # .ne. E, ...# --> ...#IVE  as in PREVENT --> PREVENTIVE
  26.         */
  27.     unsigned short n_flag : 1;
  28.         /*
  29.             "N" flag:
  30.                     ...E --> ...ION  as in CREATE --> CREATION
  31.                     ...Y --> ...ICATION  as in MULTIPLY --> MULTIPLICATION
  32.                     if # .ne. E or Y, ...# --> ...#EN  as in FALL --> FALLEN
  33.         */
  34.     unsigned short x_flag : 1;
  35.         /*
  36.             "X" flag:
  37.                     ...E --> ...IONS  as in CREATE --> CREATIONS
  38.                     ...Y --> ...ICATIONS  as in MULTIPLY --> MULTIPLICATIONS
  39.                     if # .ne. E or Y, ...# --> ...#ENS  as in WEAK --> WEAKENS
  40.         */
  41.     unsigned short h_flag : 1;
  42.         /*
  43.             "H" flag:
  44.                     ...Y --> ...IETH  as in TWENTY --> TWENTIETH
  45.                     if # .ne. Y, ...# --> ...#TH  as in HUNDRED --> HUNDREDTH
  46.         */
  47.     unsigned short y_flag : 1;
  48.         /*
  49.             "Y" FLAG:
  50.                     ... --> ...LY  as in QUICK --> QUICKLY
  51.         */
  52.     unsigned short g_flag : 1;
  53.         /*
  54.             "G" FLAG:
  55.                     ...E --> ...ING  as in FILE --> FILING
  56.                     if # .ne. E, ...# --> ...#ING  as in CROSS --> CROSSING
  57.         */
  58.     unsigned short j_flag : 1;
  59.         /*
  60.             "J" FLAG"
  61.                     ...E --> ...INGS  as in FILE --> FILINGS
  62.                     if # .ne. E, ...# --> ...#INGS  as in CROSS --> CROSSINGS
  63.         */
  64.     unsigned short d_flag : 1;
  65.         /*
  66.             "D" FLAG:
  67.                     ...E --> ...ED  as in CREATE --> CREATED
  68.                     if @ .ne. A, E, I, O, or U,
  69.                             ...@Y --> ...@IED  as in IMPLY --> IMPLIED
  70.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  71.                             ...@# --> ...@#ED  as in CROSS --> CROSSED
  72.                                             or CONVEY --> CONVEYED
  73.         */
  74.     unsigned short t_flag : 1;
  75.         /*
  76.             "T" FLAG:
  77.                     ...E --> ...EST  as in LATE --> LATEST
  78.                     if @ .ne. A, E, I, O, or U,
  79.                             ...@Y --> ...@IEST  as in DIRTY --> DIRTIEST
  80.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  81.                             ...@# --> ...@#EST  as in SMALL --> SMALLEST
  82.                                             or GRAY --> GRAYEST
  83.         */
  84.     unsigned short r_flag : 1;
  85.         /*
  86.             "R" FLAG:
  87.                     ...E --> ...ER  as in SKATE --> SKATER
  88.                     if @ .ne. A, E, I, O, or U,
  89.                             ...@Y --> ...@IER  as in MULTIPLY --> MULTIPLIER
  90.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  91.                             ...@# --> ...@#ER  as in BUILD --> BUILDER
  92.                                             or CONVEY --> CONVEYER
  93.         */
  94.     unsigned short z_flag : 1;
  95.         /*
  96.             "Z FLAG:
  97.                     ...E --> ...ERS  as in SKATE --> SKATERS
  98.                     if @ .ne. A, E, I, O, or U,
  99.                             ...@Y --> ...@IERS  as in MULTIPLY --> MULTIPLIERS
  100.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  101.                             ...@# --> ...@#ERS  as in BUILD --> BUILDERS
  102.                                             or SLAY --> SLAYERS
  103.         */
  104.     unsigned short s_flag : 1;
  105.         /*
  106.             "S" FLAG:
  107.                     if @ .ne. A, E, I, O, or U,
  108.                             ...@Y --> ...@IES  as in IMPLY --> IMPLIES
  109.                     if # .eq. S, X, Z, or H,
  110.                             ...# --> ...#ES  as in FIX --> FIXES
  111.                     if # .ne. S,X,Z,H, or Y, or (# = Y and @ = A, E, I, O, or U)
  112.                             ...# --> ...#S  as in BAT --> BATS
  113.                                             or CONVEY --> CONVEYS
  114.         */
  115.     unsigned short p_flag : 1;
  116.         /*
  117.             "P" FLAG:
  118.                     if @ .ne. A, E, I, O, or U,
  119.                             ...@Y --> ...@INESS  as in CLOUDY --> CLOUDINESS
  120.                     if # .ne. Y, or @ = A, E, I, O, or U,
  121.                             ...@# --> ...@#NESS  as in LATE --> LATENESS
  122.                                             or GRAY --> GRAYNESS
  123.         */
  124.     unsigned short m_flag : 1;
  125.         /*
  126.             "M" FLAG:
  127.                     ... --> ...'S  as in DOG --> DOG'S
  128.         */
  129.  
  130.     unsigned short keep : 1;
  131.  
  132. #ifdef CAPITALIZE
  133.     /*
  134.     ** if followcase is set, the actual word entry (dent->word)
  135.     ** is followed by one or more further strings giving exact
  136.     ** capitalizations.   The first byte after the uppercase word
  137.     ** gives the number of capitalizations.  Each capitalization
  138.     ** is preceded by the character "+" if it is to be kept, or
  139.     ** "-" if it is to be discarded from the personal dictionary.
  140.     ** For example, the entry "ITCORP\0\3+ITcorp\0+ITCorp\0+ItCorp\0"
  141.     ** gives various ways of writing my e-mail address.  If all-lowercase
  142.     ** is acceptable, an all-lower entry must appear.  Simple
  143.     ** capitalization, on the other hand, is signified by the "capitalize"
  144.     ** flag.
  145.     **
  146.     ** Suffixes always match the case of the final character of a word.
  147.     **
  148.     ** If "allcaps" is set, the other two flags must be clear.
  149.     */
  150.     unsigned short allcaps : 1;    /* Word must be all capitals */
  151.     unsigned short capitalize : 1;    /* Capitalize the word */
  152.     unsigned short followcase : 1;    /* Follow capitalization exactly */
  153.     /*
  154.     ** The following entries denote the flag values that are actually
  155.     ** to be kept for this dictionary entry.  They may differ if the
  156.     ** "a" command is used for a word that differs only in capitalization.
  157.     */
  158.     unsigned short k_allcaps : 1;
  159.     unsigned short k_capitalize : 1;
  160.     unsigned short k_followcase : 1;
  161. #endif
  162.  
  163. };
  164.  
  165. #define WORDLEN 30
  166.  
  167. struct hashheader {
  168.     int magic;
  169.     int stringsize;
  170.     int tblsize;
  171. };
  172.  
  173. /* hash table magic number */
  174. #define MAGIC 2
  175.  
  176.     
  177. /*
  178.  * termcap variables
  179.  */
  180. #ifdef MAIN
  181. # define EXTERN /* nothing */
  182. #else
  183. # define EXTERN extern
  184. #endif
  185.  
  186. EXTERN char *tgetstr();
  187. EXTERN char PC;    /* padding character */
  188. EXTERN char *BC;    /* backspace if not ^H */
  189. EXTERN char *UP;    /* Upline (cursor up) */
  190. EXTERN char *cd;    /* clear to end of display */
  191. EXTERN char *ce;    /* clear to end of line */
  192. EXTERN char *cl;    /* clear display */
  193. EXTERN char *cm;    /* cursor movement */
  194. EXTERN char *dc;    /* delete character */
  195. EXTERN char *dl;    /* delete line */
  196. EXTERN char *dm;    /* delete mode */
  197. EXTERN char *ed;    /* exit delete mode */
  198. EXTERN char *ei;    /* exit insert mode */
  199. EXTERN char *ho;    /* home */
  200. EXTERN char *ic;    /* insert character */
  201. EXTERN char *il;    /* insert line */
  202. EXTERN char *im;    /* insert mode */
  203. EXTERN char *ip;    /* insert padding */
  204. EXTERN char *nd;    /* non-destructive space */
  205. EXTERN char *vb;    /* visible bell */
  206. EXTERN char *so;    /* standout */
  207. EXTERN char *se;    /* standout end */
  208. EXTERN int bs;
  209. EXTERN int li, co;    /* lines, columns */
  210.  
  211. EXTERN char termcap[1024];
  212. EXTERN char termstr[1024];    /* for string values */
  213. EXTERN char *termptr;
  214.  
  215. EXTERN char rootword[BUFSIZ];
  216. EXTERN struct dent *lastdent;
  217.  
  218. EXTERN char *hashstrings;
  219. EXTERN struct hashheader hashheader;
  220.  
  221. extern int aflag;
  222. extern int lflag;
  223.  
  224. EXTERN int erasechar;
  225. EXTERN int killchar;
  226.  
  227. EXTERN char tempfile[200];
  228.  
  229.