home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / CMTEX330 / SOURCE / PAGE.H < prev    next >
C/C++ Source or Header  |  1992-02-19  |  2KB  |  104 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. void    build_page();
  14. void    insert_page();
  15. ptr    vert_break();
  16. ptr    vsplit();
  17. ptr    prune_page_top();
  18.  
  19. global    ptr    contrib_head;
  20.  
  21. #define contrib_tail     nest[0].tail_field
  22.  
  23. global    ptr    page_tail;
  24. global    ptr    page_head;
  25. global    ptr    page_ins_head;
  26. global    int    page_contents;
  27.  
  28. #define INSERTS_ONLY    1
  29. #define BOX_THERE    2
  30.  
  31. #define active_height    active_width
  32. #define cur_height    active_height[1]
  33.  
  34.  
  35. global    scal    best_height_plus_depth;
  36.  
  37. #define DEPLORABLE    100000
  38.  
  39. global    ptr    best_page_break;
  40. global    scal    best_size;
  41. global    scal    page_max_depth;
  42. global    int    least_page_cost;
  43.  
  44. struct page_ins_t {
  45.     mcell    node_field;
  46.     ptr    broken_ptr_field;
  47.     ptr    broken_ins_field;
  48.     ptr    last_ins_ptr_field;
  49.     ptr    best_ins_ptr_field;
  50.     scal    page_ins_height_field;
  51. };
  52. typedef struct page_ins_t page_ins_t;
  53.  
  54. #define PAGE_INS_NODE_SIZE    sizeof(page_ins_t)
  55. #define INSERTING        0
  56. #define SPLIT_UP        1
  57. #define broken_ptr(P)        ((page_ins_t *) (P))->broken_ptr_field
  58. #define broken_ins(P)        ((page_ins_t *) (P))->broken_ins_field
  59. #define last_ins_ptr(P)        ((page_ins_t *) (P))->last_ins_ptr_field
  60. #define best_ins_ptr(P)        ((page_ins_t *) (P))->best_ins_ptr_field
  61. #define page_ins_height(P)    ((page_ins_t *) (P))->page_ins_height_field
  62.  
  63. global    scal    page_so_far[];
  64.  
  65. #define page_goal    page_so_far[0]
  66. #define page_total    page_so_far[1]
  67. #define page_shrink    page_so_far[6]
  68. #define page_depth    page_so_far[7]
  69.  
  70. global    ptr    last_glue;
  71. global    int    last_penalty;
  72. global    scal    last_kern;
  73. global    int    insert_penalties;
  74.  
  75. void    print_totals();
  76.  
  77. #define start_new_page() \
  78.     {page_contents = EMPTY; \
  79.     page_tail = page_head; \
  80.     link(page_head) = null; \
  81.     last_glue = null; \
  82.     last_penalty = 0; \
  83.     last_kern = 0; \
  84.     page_depth = 0; \
  85.     page_max_depth = 0;}
  86.  
  87. void    freeze_page_specs();
  88.  
  89. global    bool    output_active;
  90.  
  91. int    page_badness();
  92. int    vert_badness();
  93. void    ensure_vbox();
  94. void    box_error();
  95. void    show_page_stats();
  96. void    show_split();
  97. void    show_cur_page();
  98.  
  99. void    fire_up();
  100. bool    insert_box();
  101.  
  102. void    _page_init();
  103. void    _page_init_once();
  104.