home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / groff-1.09-src.lha / src / amiga / groff-1.09 / xditview / DviChar.h < prev    next >
C/C++ Source or Header  |  1994-02-14  |  1KB  |  38 lines

  1. /*
  2.  * DviChar.h
  3.  *
  4.  * descriptions for mapping dvi names to
  5.  * font indexes and back.  Dvi fonts are all
  6.  * 256 elements (actually only 256-32 are usable).
  7.  *
  8.  * The encoding names are taken from X -
  9.  * case insensitive, a dash separating the
  10.  * CharSetRegistry from the CharSetEncoding
  11.  */
  12.  
  13. # define DVI_MAX_SYNONYMS    10
  14. # define DVI_MAP_SIZE        256
  15. # define DVI_HASH_SIZE        256
  16.  
  17. typedef struct _dviCharNameHash {
  18.     struct _dviCharNameHash    *next;
  19.     char            *name;
  20.     int            position;
  21. } DviCharNameHash;
  22.  
  23. typedef struct _dviCharNameMap {
  24.     char        *encoding;
  25.     int            special;
  26.     char        *dvi_names[DVI_MAP_SIZE][DVI_MAX_SYNONYMS];
  27.     DviCharNameHash    *buckets[DVI_HASH_SIZE];
  28. } DviCharNameMap;
  29.  
  30. extern DviCharNameMap    *DviFindMap ( /* char *encoding */ );
  31. extern void        DviRegisterMap ( /* DviCharNameMap *map */ );
  32. #ifdef NOTDEF
  33. extern char        *DviCharName ( /* DviCharNameMap *map, int index, int synonym */ );
  34. #else
  35. #define DviCharName(map,index,synonym)    ((map)->dvi_names[index][synonym])
  36. #endif
  37. extern int        DviCharIndex ( /* DviCharNameMap *map, char *name */ );
  38.