home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / CMTEX330 / SOURCE / HYPH.H < prev    next >
C/C++ Source or Header  |  1992-02-19  |  2KB  |  110 lines

  1.  
  2. /*
  3.  * %Y%:%M%:%I%:%Q%
  4.  *
  5.  * Copyright 1987,1988,1991 Pat J Monardo
  6.  *
  7.  * Redistribution of this file is permitted through
  8.  * the specifications in the file COPYING.
  9.  *
  10.  *
  11.  */
  12.  
  13. global    ptr    ha;
  14. global    ptr    hb;
  15. global    fnt    hf;
  16. global    int    hn;
  17. global    int    hc[];
  18. global    int    hu[];
  19.  
  20. global    int    l_hyf;
  21. global    int    r_hyf;
  22. global    int    cur_lang;
  23.  
  24. global    ptr    init_list;
  25. global    bool    init_lig;
  26. global    bool    init_lft;
  27.  
  28. struct trie_t {
  29.     short    s;
  30.     union {
  31.         short    s;
  32.         struct {
  33.             byte    b0;
  34.             byte    b1;
  35.         } bb;
  36.     } u_s;
  37. };
  38. typedef struct trie_t trie_t;
  39.  
  40. #define trie_op(T)        trie[T].u_s.bb.b0
  41. #define trie_char(T)        trie[T].u_s.bb.b1
  42. #define trie_back(T)        trie[T].u_s.s
  43. #define trie_link(T)        trie[T].s
  44.  
  45. global    trie_t    *trie;
  46.  
  47. global    int    *op_start;
  48. global    int    *hyf_distance;
  49. global    int    *hyf_num;
  50. global    int    *hyf_next;
  51.  
  52. global    int    hyph_count;
  53. global    str    *hyph_word;
  54. global    ptr    *hyph_list;
  55.  
  56. void    new_hyph_exceptions();
  57. void    enter_hyph_exception();
  58.  
  59. void    init_hyph();
  60. void    try_hyph();
  61. void    hyphenate();
  62.  
  63. global    int    hyf[];
  64. global    int    hyf_char;
  65.  
  66. global    int    hyphen_passed;
  67.  
  68. int    reconstitute();
  69.  
  70. global    int    trie_op_ptr;
  71. global    int    *trie_op_hash;
  72. global    int    *trie_op_val;
  73. global    int    *trie_op_lang;
  74. global    int    *trie_op_used;
  75.  
  76. int    new_trie_op();
  77.  
  78. #define trie_root    trie_l[0]
  79.  
  80. global    int    trie_ptr;
  81. global    int    trie_max;
  82. global    int    *trie_c;
  83. global    int    *trie_o;
  84. global    int    *trie_l;
  85. global    int    *trie_r;
  86. global    int    *trie_hash;
  87. global    int    *trie_min;
  88.  
  89. int    trie_compress();
  90. int    trie_node();
  91.  
  92. #define trie_ref    trie_hash
  93.  
  94. global    bool    *trie_taken;
  95.  
  96. void    first_fit();
  97. void    trie_pack();
  98. void    trie_fix();
  99.  
  100. void    new_patterns();
  101. void    init_trie();
  102.  
  103. void    init_pattern_memory();
  104. void    free_pattern_memory();
  105.  
  106. global    bool    trie_not_ready;
  107.  
  108. void    _hyph_init();
  109. void    _hyph_init_once();
  110.