|
|
Microsoft OS/2 SDK 03-01-1988
/* include file for lqh.c */
#define INCL_BASE /* include all of the OS/2 base */
#include <os2.h> /* OS/2 includes */
#include "lqhdll.h" /* definitions for qhdll.dll */
#define atNORMAL 0x07 /* normal attribute */
#define atHILITE 0x70 /* highlighted attribute */
#define atITALIC 0x02 /* italics attribute */
#define atBOLD 0x0F /* bold attribute */
#define atWARNING 0x47 /* error box attribute */
#define atMENU 0x30 /* menu bar */
#define atLEAD 0x3f /* leading letter of menu */
#define atBOX 0x03 /* box color */
#define atSEARCHBOX 0x17 /* search box color */
#define MAXPRELOAD 150 /* maximum number of preloaded topics */
#define MAXLIST 20 /* maximum number of list categories */
#define MAXPASTE 5 /* maximum number of paste sections */
#define MAXREF 10 /* maximum number of references */
#define MAXNAMESIZE 25 /* maximum function name size */
#define MAXCATNAME 20 /* maximum category name size */
#define BOXLEFT 0 /* left column of box border */
#define BOXRIGHT 79 /* right column of box border */
#define BOXTOP 1 /* top column of box border */
#define THIN 1 /* box line type */
#define THICK 2 /* box line type */
typedef ULONG NC; /* context number for Help engine functins */
typedef struct _SELTABLE { /* table of current selectors */
NC ncContext; /* context number */
SEL sel; /* selector */
USHORT usTopLine; /* top line of display */
USHORT usHighLight; /* highlighted line */
} SELTABLE;
typedef struct _STRTABLE { /* table of char-attribute strings */
PCH addr; /* address of the string */
USHORT cb; /* length of the string */
} STRTABLE;
typedef struct _MENUTABLE {
BYTE scancode; /* scan code */
BYTE pos; /* position */
} MENUTABLE;
typedef struct _LIST { /* category structure */
NPSZ name[MAXCATNAME];
} LIST;
typedef struct _TOPICHDR {
BYTE appChar; /* app-specific character */
BYTE lineChar; /* what line to remove */
BYTE ftype; /* source file type */
USHORT lnCur; /* line number last accessed */
USHORT lnOff; /* offset into topic for that line */
} TOPICHDR;
extern VIOCURSORINFO viociCursor; /* cursor data */
extern KBDKEYINFO kbdciKeyInfo; /* structure for key data */
extern QHBOX qhbBox; /* contains box dimensions */
extern CHAR chMenu[];
extern CHAR achBlank[2];
extern MENUTABLE menuCatTable[];
extern CHAR chReference[]; /* used to store reference strings */
extern NPSZ npszRefTable[]; /* table of reference functions */
extern STRTABLE strTable[]; /* maintains address of each line */
extern USHORT usRefCount; /* number of reference functions */
extern LIST lstList[]; /* list category names */
extern USHORT usListPos; /* position in tables */
extern USHORT hmou; /* handle to the mouse */
extern MOUEVENTINFO mouevEvent; /* mouse event packet structure */
extern NOPTRRECT mourtRect;
extern BOOL fMouButton; /* TRUE if button clicked */
extern USHORT MouReadType; /* don't wait for mouse event */
extern BYTE bNormalAtt;
extern BYTE bHiAtt;
extern BYTE bBoldAtt;
extern BYTE bItalicAtt;
extern BYTE bMenuAtt;
extern BYTE bHiMenuAtt;
extern BYTE bLead;
extern BYTE bHiLead;
extern SEL selBoxSave; /* selector to memory for screen save */
SEL selStringTable; /* selector for char-attribute strings */
extern USHORT usBottomLine; /* current bottom line number */
extern USHORT usInterior; /* maximum number of displayed lines */
extern USHORT usTotalLines; /* total number of line */
extern USHORT usStructLine; /* starting line of structure section */
extern BOOL fListDisplay; /* TRUE if function list is displayed */
extern BOOL fBack; /* True if HelpNcBack() was called */
extern USHORT usSaveMenuPos; /* current Category menu position */
extern SELTABLE selTable[]; /* table of preloaded topics */
extern USHORT usCurrent; /* current index in selTable */
extern ULONG FAR hsemNewRef; /* RAM semaphore used by PreLoad() */
extern TID tidPreLoad; /* identifier for PreLoad thread */
extern BYTE bThreadStack[]; /* stack for PreLoad thread */
extern CHAR chMenuTable[]; /* table of menu keys */
extern SHORT sMenuTablePos;
extern SHORT sDirection; /* used by menus */
extern NC ncHelp; /* handle to help data file */
extern BYTE bAttr[];
extern CHAR chHelpName[]; /* path and name for qh.hlp */
extern CHAR chPasteName[]; /* path and name for paste.qh */
extern USHORT usOpenType; /* truncate/append */
extern VIOMODEINFO vmiMode; /* video mode */
VOID cdecl main(); /* qhmain */
BOOL ReadScreen(BOOL); /* qhmain */
VOID Display(); /* qhmain */
VOID FAR Abort(); /* qhmain */
VOID ScrollUp(); /* qhmain */
VOID ScrollDown(); /* qhmain */
VOID MouseRelease(); /* qhmain */
BOOL isalpha(CHAR); /* qhmain */
VOID Reference(); /* qhmenu */
VOID Options(); /* qhmenu */
VOID Search(); /* qhmenu */
VOID Input(); /* qhmenu */
VOID ListMenu(); /* qhmenu */
VOID AddBar(USHORT, USHORT); /* qhmenu */
VOID DeleteBar(USHORT, USHORT); /* qhmenu */
BOOL MenuLoop(QHBOX *, USHORT *, BOOL, USHORT); /* qhmenu */
BOOL HelpSearch(NPSZ, BOOL, NC); /* qhhelp */
VOID FAR PreLoadThread(); /* qhhelp */
BOOL Init(); /* qhinit */
/* Help engine prototypes */
VOID FAR PASCAL HelpClose(NC);
NC FAR PASCAL HelpOpen(PCH);
NC FAR PASCAL HelpNc(PCH, NC);
USHORT FAR PASCAL HelpNcCb(NC);
USHORT FAR PASCAL HelpLook(NC, PCH);
BYTE FAR PASCAL HelpSetChar(NC, BYTE);
BOOL FAR PASCAL HelpDecomp(PBYTE, PBYTE, NC);
NC FAR PASCAL HelpNcNext(NC);
NC FAR PASCAL HelpNcBack();
VOID FAR PASCAL HelpNcRecord(NC);
SHORT FAR PASCAL HelpGetCells(USHORT, INT, PCHAR, PCHAR, PBYTE);
SHORT FAR PASCAL HelpGetLine(USHORT, USHORT, PBYTE, PBYTE);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.