home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 125.img / PRO-C4.ZIP / BENCH1.ZIP / HELP / HELP.H < prev    next >
C/C++ Source or Header  |  1990-05-28  |  5KB  |  160 lines

  1. /* ==( help/help.h )== */
  2. /* ----------------------------------------------- */
  3. /* Pro-C  Copyright (C) 1988 - 1990 Vestronix Inc. */
  4. /* Modification to this source is not supported    */
  5. /* by Vestronix Inc.                               */
  6. /*            All Rights Reserved                  */
  7. /* ----------------------------------------------- */
  8. /* Written   JPK  26-Sep-88                        */
  9. /* Modified  Geo  12-Dec-89  See comments below    */
  10. /* ----------------------------------------------- */
  11. /* %W%  (%H% %T%) */
  12.  
  13. /*
  14.  *  Modifications
  15.  *
  16.  *  12-Dec-89  Geo - V2 version with variable lines
  17.  *  25-Oct-89  Geo - 1.32 Merge
  18.  *
  19.  *
  20. */
  21.  
  22. # ifndef _H_HELP /* Guard against multiple includes */
  23. # define _H_HELP
  24.  
  25. # define NOT_FOUND       0
  26. # define CREATE_FAILED   1
  27. # define NO_MEMORY       2
  28.  
  29. # define HSTRSIZE        40
  30. # define MAX_GARBAGE     40
  31. # define MAXLINE        132
  32.  
  33. /* help header is set at 40 bytes; not all of it is used now but the extra  */
  34. /* is included for forward compatibility; no field may be moved !!!         */
  35. /* note: this is the internal header structure, it is converted to ascii    */
  36. /*       when written to file and from ascii when read from file            */
  37. struct help_hdr {
  38.     int     row;            /* upper left row for window creation         */
  39.     int     col;            /* upper left column for window creation      */
  40.     int     width;          /* width of window                            */
  41.     int     height;         /* height of window                           */
  42.     int     box_style;      /* type of box to put around window           */
  43.     int     box_attr;       /* attribute to use while drawing box         */
  44.     int     disp_attr;      /* display attribute                          */
  45.     int     wrap;           /* word wrap text so it fits in window        */
  46.     int     tabs;           /* step rate for cursor movements             */
  47.     /* 22 bytes of header used so far => leaves 20 bytes of junk left over*/
  48.     char    junk[20];       /* expansion room for later                   */
  49.     int     helpno;
  50. };
  51.  
  52. /* help index record structure                                              */
  53. struct help_ndx {
  54.     long    seekpos;
  55.     int     size;
  56. };
  57.  
  58. /* Current help record                                                      */
  59. struct help_cur {
  60.     int num;
  61.     struct help_ndx ndx;
  62. };
  63.  
  64. /* current help record subdivision                                          */
  65. struct help_part {
  66.     int pos;
  67.     char *next;
  68.     char *prev;
  69.     int len;
  70. };
  71.  
  72. /* global data used in help system                                          */
  73. # ifndef NOTINHERE
  74. extern int                  h_num;      /* index in index list for this help*/
  75. extern struct help_hdr      h_header;   /* current help records header      */
  76. extern struct help_ndx      h_ndx;      /* pointer to list of index records */
  77. extern struct help_ndx        h_tdx; 
  78. extern struct help_part     h_part;
  79. extern FILE *hfptr;
  80. extern int nfd;
  81. # endif
  82.  
  83.  
  84. # ifdef ANSI
  85. int build_help_ndxfile(int);
  86. int call_help(char *, int);
  87. int check_index(int);
  88. int create_node(int);
  89. int eat_garbage(char *);
  90. int filetohelp(char *);
  91. int helptofile(char *);
  92. int lock_index(int, int);
  93. int lock_index_file(int);
  94. int invoke_editor(void);
  95. int open_help_ndxfile(void);
  96. int openhelp(char *, int);
  97. int read_hdr(struct help_ndx *);
  98. int read_help(char *, int, struct help_ndx *);
  99. int read_help_index(int);
  100. int read_index(int);
  101. int read_total(void);
  102. int write_hdr(struct help_ndx *);
  103. int write_help(struct help_ndx *, char *);
  104. long file_time(char *);
  105. long fsize(int);
  106. void build_ndxfile(void);
  107. void change_setup(struct help_hdr *);
  108. void close_help_files(void);
  109. void close_help_ndxfile(void);
  110. void display(int, struct help_hdr *);
  111. void display_help(struct help_hdr *);
  112. void get_garbage_rec(struct help_ndx *);
  113. void move_w(struct help_hdr *);
  114. void popup_menu(struct help_hdr *);
  115. void put_garbage_rec(struct help_ndx *);
  116. void put_null_rec(void);
  117. void resize_w(struct help_hdr *);
  118. void setup_w(struct help_hdr *);
  119. void write_index(int);
  120. # else
  121. int build_help_ndxfile();
  122. int call_help();
  123. int check_index();
  124. int create_node();
  125. int eat_garbage();
  126. int filetohelp();
  127. int helptofile();
  128. int lock_index();
  129. int lock_index_file();
  130. int invoke_editor();
  131. int open_help_ndxfile();
  132. int openhelp();
  133. int read_hdr();
  134. int read_help();
  135. int read_help_index();
  136. int read_index();
  137. int read_total();
  138. int write_hdr();
  139. int write_help();
  140. long file_time();
  141. long fsize();
  142. void build_ndxfile();
  143. void change_setup();
  144. void close_help_files();
  145. void close_help_ndxfile();
  146. void display();
  147. void display_help();
  148. void get_garbage_rec();
  149. void move_w();
  150. void popup_menu();
  151. void put_garbage_rec();
  152. void put_null_rec();
  153. void resize_w();
  154. void setup_w();
  155. void write_index();
  156. # endif
  157.  
  158. # endif /* _H_HELP */
  159.  
  160.