home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / PROCWRKB.ZIP / BENCH1.ZIP / HELP / HELP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-23  |  4.4 KB  |  121 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. PROTO (int build_help_ndxfile, (int));
  84. PROTO (int call_help, (char *, int));
  85. PROTO (int check_index, (int));
  86. PROTO (int create_node, (int));
  87. PROTO (int eat_garbage, (char *));
  88. PROTO (int filetohelp, (char *));
  89. PROTO (int helptofile, (char *));
  90. PROTO (int lock_index, (int, int));
  91. PROTO (int lock_index_file, (int));
  92. PROTO (int invoke_editor, (void));
  93. PROTO (int open_help_ndxfile, (void));
  94. PROTO (int openhelp, (char *, int));
  95. PROTO (int read_hdr, (struct help_ndx *));
  96. PROTO (int read_help, (char *, int, struct help_ndx *));
  97. PROTO (int read_help_index, (int));
  98. PROTO (int read_index, (int));
  99. PROTO (int read_total, (void));
  100. PROTO (int write_hdr, (struct help_ndx *));
  101. PROTO (int write_help, (struct help_ndx *, char *));
  102. PROTO (long file_time, (char *));
  103. PROTO (long fsize, (int));
  104. PROTO (void build_ndxfile, (void));
  105. PROTO (void change_setup, (struct help_hdr *));
  106. PROTO (void close_help_files, (void));
  107. PROTO (void close_help_ndxfile, (void));
  108. PROTO (void display, (int, struct help_hdr *));
  109. PROTO (void display_help, (struct help_hdr *));
  110. PROTO (void get_garbage_rec, (struct help_ndx *));
  111. PROTO (void move_w, (struct help_hdr *));
  112. PROTO (void popup_menu, (struct help_hdr *));
  113. PROTO (void put_garbage_rec, (struct help_ndx *));
  114. PROTO (void put_null_rec, (void));
  115. PROTO (void resize_hw, (struct help_hdr *));
  116. PROTO (void setup_w, (struct help_hdr *));
  117. PROTO (void write_index, (int));
  118.  
  119. # endif /* _H_HELP */
  120.  
  121.