home *** CD-ROM | disk | FTP | other *** search
- /* ==( help/help.h )== */
- /* ----------------------------------------------- */
- /* Pro-C Copyright (C) 1988 - 1990 Vestronix Inc. */
- /* Modification to this source is not supported */
- /* by Vestronix Inc. */
- /* All Rights Reserved */
- /* ----------------------------------------------- */
- /* Written JPK 26-Sep-88 */
- /* Modified Geo 12-Dec-89 See comments below */
- /* ----------------------------------------------- */
- /* %W% (%H% %T%) */
-
- /*
- * Modifications
- *
- * 12-Dec-89 Geo - V2 version with variable lines
- * 25-Oct-89 Geo - 1.32 Merge
- *
- *
- */
-
- # ifndef _H_HELP /* Guard against multiple includes */
- # define _H_HELP
-
- # define NOT_FOUND 0
- # define CREATE_FAILED 1
- # define NO_MEMORY 2
-
- # define HSTRSIZE 40
- # define MAX_GARBAGE 40
- # define MAXLINE 132
-
- /* help header is set at 40 bytes; not all of it is used now but the extra */
- /* is included for forward compatibility; no field may be moved !!! */
- /* note: this is the internal header structure, it is converted to ascii */
- /* when written to file and from ascii when read from file */
- struct help_hdr {
- int row; /* upper left row for window creation */
- int col; /* upper left column for window creation */
- int width; /* width of window */
- int height; /* height of window */
- int box_style; /* type of box to put around window */
- int box_attr; /* attribute to use while drawing box */
- int disp_attr; /* display attribute */
- int wrap; /* word wrap text so it fits in window */
- int tabs; /* step rate for cursor movements */
- /* 22 bytes of header used so far => leaves 20 bytes of junk left over*/
- char junk[20]; /* expansion room for later */
- int helpno;
- };
-
- /* help index record structure */
- struct help_ndx {
- long seekpos;
- int size;
- };
-
- /* Current help record */
- struct help_cur {
- int num;
- struct help_ndx ndx;
- };
-
- /* current help record subdivision */
- struct help_part {
- int pos;
- char *next;
- char *prev;
- int len;
- };
-
- /* global data used in help system */
- # ifndef NOTINHERE
- extern int h_num; /* index in index list for this help*/
- extern struct help_hdr h_header; /* current help records header */
- extern struct help_ndx h_ndx; /* pointer to list of index records */
- extern struct help_ndx h_tdx;
- extern struct help_part h_part;
- extern FILE *hfptr;
- extern int nfd;
- # endif
-
- PROTO (int build_help_ndxfile, (int));
- PROTO (int call_help, (char *, int));
- PROTO (int check_index, (int));
- PROTO (int create_node, (int));
- PROTO (int eat_garbage, (char *));
- PROTO (int filetohelp, (char *));
- PROTO (int helptofile, (char *));
- PROTO (int lock_index, (int, int));
- PROTO (int lock_index_file, (int));
- PROTO (int invoke_editor, (void));
- PROTO (int open_help_ndxfile, (void));
- PROTO (int openhelp, (char *, int));
- PROTO (int read_hdr, (struct help_ndx *));
- PROTO (int read_help, (char *, int, struct help_ndx *));
- PROTO (int read_help_index, (int));
- PROTO (int read_index, (int));
- PROTO (int read_total, (void));
- PROTO (int write_hdr, (struct help_ndx *));
- PROTO (int write_help, (struct help_ndx *, char *));
- PROTO (long file_time, (char *));
- PROTO (long fsize, (int));
- PROTO (void build_ndxfile, (void));
- PROTO (void change_setup, (struct help_hdr *));
- PROTO (void close_help_files, (void));
- PROTO (void close_help_ndxfile, (void));
- PROTO (void display, (int, struct help_hdr *));
- PROTO (void display_help, (struct help_hdr *));
- PROTO (void get_garbage_rec, (struct help_ndx *));
- PROTO (void move_w, (struct help_hdr *));
- PROTO (void popup_menu, (struct help_hdr *));
- PROTO (void put_garbage_rec, (struct help_ndx *));
- PROTO (void put_null_rec, (void));
- PROTO (void resize_hw, (struct help_hdr *));
- PROTO (void setup_w, (struct help_hdr *));
- PROTO (void write_index, (int));
-
- # endif /* _H_HELP */
-
-