home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / CMTEX330 / SOURCE / ALIGN.H < prev    next >
C/C++ Source or Header  |  1992-02-19  |  1KB  |  73 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. struct align_stack_t {
  14.     struct align_stack_t *align_stack_field;
  15.     ptr    preamble_field;
  16.     ptr    cur_align_field;
  17.     ptr    cur_span_field;
  18.     ptr    cur_loop_field;
  19.     ptr    cur_tail_field;
  20.     ptr    cur_head_field;
  21.     int    align_state_field;
  22. };
  23. typedef struct align_stack_t align_stack_t;
  24.  
  25. #define ALIGN_STACK_NODE_SIZE    sizeof(align_stack_t)
  26.  
  27. global    align_stack_t *align_stack;
  28.  
  29. void    push_alignment();
  30. void    pop_alignment();
  31.  
  32. global    ptr    align_head;
  33.  
  34. #define preamble    link(align_head)
  35.  
  36. global    ptr    cur_align;
  37. global    ptr    cur_span;
  38. global    ptr    cur_loop;
  39. global    ptr    cur_head;
  40. global    ptr    cur_tail;
  41.  
  42. struct span_t {
  43.     int    span_count_field;
  44.     ptr    span_link_field;
  45.     scal    span_width_field;
  46.     int    fill_field;
  47. };
  48. typedef struct span_t span_t;
  49.  
  50. #define SPAN_NODE_SIZE        sizeof(span_t)
  51. #define span_count(P)        ((span_t *) (P))->span_count_field
  52. #define span_link(P)        ((span_t *) (P))->span_link_field
  53. #define span_width(P)        ((span_t *) (P))->span_width_field
  54.  
  55. global    ptr    end_span;
  56.  
  57. #define SPAN_CODE        256
  58. #define CR_CODE            257
  59. #define CR_CR_CODE        (CR_CODE + 1)
  60.  
  61. void    init_align();
  62. void    get_preamble_token();
  63. void    align_peek();
  64. void    init_row();
  65. void    init_span();
  66. void    init_col();
  67. bool    fin_col();
  68. void    fin_row();
  69. void    fin_align();
  70.  
  71. void    _align_init();
  72. void    _align_init_once();
  73.