home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
125.img
/
PRO-C4.ZIP
/
BENCH1.ZIP
/
HELP
/
HELP.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-28
|
5KB
|
160 lines
/* ==( 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
# ifdef ANSI
int build_help_ndxfile(int);
int call_help(char *, int);
int check_index(int);
int create_node(int);
int eat_garbage(char *);
int filetohelp(char *);
int helptofile(char *);
int lock_index(int, int);
int lock_index_file(int);
int invoke_editor(void);
int open_help_ndxfile(void);
int openhelp(char *, int);
int read_hdr(struct help_ndx *);
int read_help(char *, int, struct help_ndx *);
int read_help_index(int);
int read_index(int);
int read_total(void);
int write_hdr(struct help_ndx *);
int write_help(struct help_ndx *, char *);
long file_time(char *);
long fsize(int);
void build_ndxfile(void);
void change_setup(struct help_hdr *);
void close_help_files(void);
void close_help_ndxfile(void);
void display(int, struct help_hdr *);
void display_help(struct help_hdr *);
void get_garbage_rec(struct help_ndx *);
void move_w(struct help_hdr *);
void popup_menu(struct help_hdr *);
void put_garbage_rec(struct help_ndx *);
void put_null_rec(void);
void resize_w(struct help_hdr *);
void setup_w(struct help_hdr *);
void write_index(int);
# else
int build_help_ndxfile();
int call_help();
int check_index();
int create_node();
int eat_garbage();
int filetohelp();
int helptofile();
int lock_index();
int lock_index_file();
int invoke_editor();
int open_help_ndxfile();
int openhelp();
int read_hdr();
int read_help();
int read_help_index();
int read_index();
int read_total();
int write_hdr();
int write_help();
long file_time();
long fsize();
void build_ndxfile();
void change_setup();
void close_help_files();
void close_help_ndxfile();
void display();
void display_help();
void get_garbage_rec();
void move_w();
void popup_menu();
void put_garbage_rec();
void put_null_rec();
void resize_w();
void setup_w();
void write_index();
# endif
# endif /* _H_HELP */