/* vv_sys.h *********** Copyright 1991-1993 by Vermont Creative Software *********** Description Basic system header file included in most higher level header files. */ /* Do not allow to process the file more than once */ #ifndef VV_SYS #define VV_SYS /*----------------------------------------------------------------------------*/ /* Include the subsidiary header files */ /*----------------------------------------------------------------------------*/ /* Include the environment definitions */ #ifndef VV_ENV #include #endif /* Include stdio.h if not already included */ #ifndef EOF #include /*try not to #include stdio.h twice */ #endif /* Include operating system dependent header files */ /*----------------------------------------------------------------------------*/ /* This is done only so that the following symbols are not shrouded */ /*----------------------------------------------------------------------------*/ #ifndef KI_DISABLE_MOUSE #define KI_DISABLE_MOUSE 0 #endif #ifndef IDLE_INTERRUPT #define IDLE_INTERRUPT 0 #endif #ifndef NO_MEMCPY #define NO_MEMCPY 0 #endif #ifndef NO_MEMCMP #define NO_MEMCMP 0 #endif /*----------------------------------------------------------------------------*/ /* VCS predefined data types */ /*----------------------------------------------------------------------------*/ #define UCHAR unsigned char /*unsigned character */ #define UINT unsigned int /*unsigned integer */ #define USHORT unsigned short /*unsigned short integer */ #define ULONG unsigned long /*unsigned long integer */ /*----------------------------------------------------------------------------*/ /* Environment-specific VCS predefined data types. */ /*----------------------------------------------------------------------------*/ #ifdef __TURBOC__ #if defined(__HUGE__) #define FAR #define NEAR #else #define FAR far /*far modifier */ #define NEAR near /*near modifier */ #endif #else #define FAR _far /*far modifier */ #ifdef __HIGHC__ #define NEAR #else #define NEAR _near /*near modifier */ #endif #endif #define PTR void * /*generic pointer */ #ifdef __WATCOMC__ #define _MSC_VER 0 #endif #if _MSC_VER >= 600 /*MSC 6.0 */ #ifdef NO_DEBUG_CODE /*production library */ #define CDECL _cdecl #ifndef FASTCALL #define FASTCALL _cdecl #else /*FASTCALL defined on compile line */ #undef FASTCALL /*will probably be set to a 1 */ #define FASTCALL _fastcall /*define it to really be a fast call */ #endif /*end #ifndef FASTCALL */ #else /*else development library */ #define CDECL _cdecl #ifdef FASTCALL #undef FASTCALL #endif #define FASTCALL _cdecl #endif /*end NO_DEBUG_CODE */ #else /*else not _MSC_VER == 600 */ #ifndef CDECL /*may be defined in MSC 5.xx */ #define CDECL #endif #define FASTCALL #endif /*end _MSC_VER == 600 */ #ifdef __WATCOMC__ #define ISVR far #else #if defined __HIGHC__ || defined __386__ #define ISVR CDECL #else #define ISVR FAR CDECL #endif /* end __HIGHC__ || __386 */ #endif /* end __WATCOMC__ */ #ifdef LINT_ARGS #ifdef __HIGHC__ typedef FAR void (ISVR *ISVRP)(void); #else typedef void (ISVR *ISVRP)(void); #endif #else #ifdef __HIGHC__ typedef FAR void (ISVR *ISVRP)(); #else typedef void (ISVR *ISVRP)(); #endif #endif typedef struct isr_struct { ISVRP handler; } ISVRS; typedef int (FASTCALL * PFI)(); /*pointer to function returning int */ typedef void (FASTCALL * PFV)(); /*pointer to function with no return */ /*----------------------------------------------------------------------------*/ /* Modifiers for global data, external data, and function prototypes that */ /* may vary among operating environments. */ /*----------------------------------------------------------------------------*/ #define GLOBAL #define EXTERN extern #ifndef PROTOTYPE #define PROTOTYPE extern #endif /*----------------------------------------------------------------------------*/ /* If not already defined, then define NULLP and NULLFP */ /*----------------------------------------------------------------------------*/ #ifndef NULLP #define NULLP (PTR) 0 /*NULL pointer to data */ #endif #ifndef NULLFP #define NULLFP (PFI) 0 /*NULL pointer to function */ #endif #ifndef NULLPARM #define NULLPARM 0 #endif /*----------------------------------------------------------------------------*/ /* Maximum values */ /*----------------------------------------------------------------------------*/ #define SHORTMAX 32767 #if defined(_I386) || defined(_I486) || defined(__386__) #define INTMAX 2147483647L #define UINTMAX 0xFFFFFFFFL #define INTSTRMAX "2147483647" #define UINTSTRMAX "4294967295" #else #define INTMAX 32767 #define UINTMAX 0xFFFF #define INTSTRMAX "32767" #define UINTSTRMAX "65535" #endif #define LONGMAX 2147483647L #define USHORTMAX 0xFFFF #define ULONGMAX 0xFFFFFFFFL #define SHORTSTRMAX "32767" #define LONGSTRMAX "2147483647" #define USHORTSTRMAX "65535" #define ULONGSTRMAX "4294967295" #define EXPMAX 307 #define FLTEXPMAX 37 #define VPSTMAXLEN 133 /*buffer size for use with v_printf() */ /*----------------------------------------------------------------------------*/ /* Constants defined for convenience */ /*----------------------------------------------------------------------------*/ #define TAB '\t' /*C definition of ASCII tab */ #define NEWLINE '\n' /*C definition of ASCII newline */ #define BACKSPACE '\b' /*C definition of ASCII backspace */ #define SPACE ' ' /*white space character */ #define BELL '\a' /*C definition for allert - bell */ #define AS_NEEDED -1 /*unlimited scrolling allowed */ #define ALL_ROWS -1 /*scroll all rows */ #define LAST_ROW -1 #define LAST_COL -1 #define APPEND_ROW -1 /*for memory file insert and row rpl */ #define CENTER_WN -1 /*centers the window on the screen */ #define SHAD_WNSIZE -1 /*size the shadow by the window */ #define TRANSPARENT (UCHAR) 0 /*transparent shadow character */ /*----------------------------------------------------------------------------*/ /* Definitions for the table of initialization functions */ /*----------------------------------------------------------------------------*/ #define USERINIT 0 /*User */ #define SYSINIT 1 /*System */ #define DEBUGINIT 2 /*Debugging */ #define HELPINIT 3 /*Help */ #define CLISTINIT 4 /*Choice lists */ #define FORMINIT 5 /*Forms */ #define DESIGNINIT 6 /*Designer form library initialization*/ #define MOUSEINIT 7 /*Mouse Initialization */ /*----------------------------------------------------------------------------*/ /* Definitions for the table of initialization functions */ /*----------------------------------------------------------------------------*/ #define SYSEXIT 0 /*Freeing of memory of vv_init */ #define CLIPEXIT 1 #define DESEXIT 2 /*Clean-up of Designer Librarires */ #define MOUEXIT 3 /*Clean-up of Mouse */ /*----------------------------------------------------------------------------*/ /* Definitions for string placement */ /*----------------------------------------------------------------------------*/ #define LEFT_TEXT 0 /*left justfies text in window */ #define CENTER_TEXT -1 /*centers text in window */ #define RIGHT_TEXT -2 /*right justifies text in window */ /*----------------------------------------------------------------------------*/ /* Definitions for directions */ /* */ /* Warning: The values of the following symbols are essential for v_line() */ /* and shadows to function properly. */ /*----------------------------------------------------------------------------*/ #define RIGHT 0x0000 #define LEFT 0x0001 #define DOWN 0x0002 #define UP 0x0003 #define BOTTOM DOWN #define TOP UP #define VERTSHAD 1 #define HORIZSHAD 0 #define X_LINE 0x0004 #define SHAD_INUSE 0x0010 /*----------------------------------------------------------------------------*/ /* Definitions for use in specifying position of the window border text */ /*----------------------------------------------------------------------------*/ #define TOPLEFT 1 #define TOPCENTER 2 #define TOPRIGHT 3 #define BOTTOMLEFT 4 #define BOTTOMCENTER 5 #define BOTTOMRIGHT 6 #define BDR_FREE 0x00 /* An unused border text structure */ #define BDR_MASK 0x03 /* AND mask for border from location */ #define BDR_TITLE 0x04 /* Title flag - marks old-style title */ #define CORNER 0x08 /* Justify/allow text into bdr corner */ #define INCORNER 0x10 /* Justify/allow text into bdr corner */ #define BTJ_LOW 0x20 /* Justify text toward left or top */ #define CENTER 0x40 /* Justify text in center of border */ #define BTJ_HIGH 0x80 /* Justify text toward right or bottom*/ #define BDR_JMASK 0xF8 /* AND mask for justify from location */ #define BDR_ALL 0xFF /* ALL borders - used for freeing all */ /*----------------------------------------------------------------------------*/ /* Definitions for window explosion origins */ /*----------------------------------------------------------------------------*/ #define EXPBOT 1 #define EXPTOP 2 #define EXPCTRHORZ 3 #define EXPLFT 4 #define EXPBOTLFT 5 #define EXPTOPLFT 6 #define EXPLFTCTR 7 #define EXPRT 8 #define EXPBOTRT 9 #define EXPTOPRT 10 #define EXPRTCTR 11 #define EXPCTRVERT 12 #define EXPBOTCTR 13 #define EXPTOPCTR 14 #define EXPCTR 15 /*----------------------------------------------------------------------------*/ /* Window source/dest i/o function flags */ /*----------------------------------------------------------------------------*/ #define IOF_LINE 0x00000001L /* Call for each line */ #define IOF_RECT 0x00000002L /* Call for each rectangle */ #define IOF_LIST 0x00000004L /* Call for rectangle list */ /* 0x00000008L RESERVED */ #define IOF_SETINIT 0x00000010L /* Call before first i/o in a set */ #define IOF_SETEXIT 0x00000020L /* Call after last i/o in a set */ #define IOF_SETCALL 0x00000040L /* SETINIT on but not yet called */ /* 0x00000080L RESERVED */ #define IOF_INIT 0x00000100L /* Call before first i/o ever */ #define IOF_EXIT 0x00000200L /* Call after last i/o ever */ #define IOF_CALLED 0x00000400L /* Called for i/o ever */ /* 0x00000800L RESERVED */ /*----------------------------------------------------------------------------*/ /* Window Flag Masks */ /*----------------------------------------------------------------------------*/ #define WORDWRAP 0x00000001L /*word-wrap */ #define CLRENDROW 0x00000002L /*auto clear to end of row */ #define CSADVANCE 0x00000004L /*auto cs advance */ #define CSRPLACE 0x00000008L /*enable auto place of csr at cs */ #define DESWIN 0x00000010L /*designer window */ #define BUFFERED 0x00000020L /*window is buffered */ #define WNECHO 0x00000040L /*echo window to the destination */ #define FULL 0x00000080L /*window dimensions are full */ #define SET 0x00000100L /*window is set */ #define TRACKING 0x00000200L /*track buffered wn with cs */ #define VSECHO 0x00000400L /*enable video screen updating */ #define HEAP_WN 0x00000800L /*window has been allocated from heap */ #define SBARAUTO 0x00001000L /*auto update of scroll bars */ #define HSBAR 0x00002000L /*window has a horizontal scroll bar */ #define VSBAR 0x00004000L /*window has a vertical scroll bar */ #define ACTFUNCCALLED 0x00008000L /*activate function called */ #define GROWUP 0x00010000L /*upward growth allowed */ #define GROWDN 0x00020000L /*downward growth allowed */ #define GROWRT 0x00040000L /*rightward growth allowed */ #define GROWLFT 0x00080000L /*leftward growth allowed */ #define ORIGIN_RELATIVE 0x00100000L /*coords are relative to parent origin*/ #define MOU_MODAL 0x00200000L /*Window is modal - must complete */ #define MOU_RESIZE 0x00400000L /*Window is resizeable */ #define MOU_DRAG 0x00800000L /*Window is dragable */ #define AUTOUPDN 0x01000000L /*Window automatically set/unset */ #define MOU_ENABLE 0x02000000L /*Window is "mouseable" */ #define MOU_MODQUIT 0x04000000L /*Clicking outside window will quit it*/ #define SHAD_USED 0x08000000L /*Shadows are currently in use */ #define AUTOFREE 0x10000000L /*Window structure to be auto freed */ #define WNHIDDEN 0x20000000L /*window is hidden */ #define AUTOCLEAR 0x40000000L /*window is auto cleared when unset */ #define TOPWINDOW 0x80000000L /*No windows get linked higher than it*/ #define HVSBAR (HSBAR | VSBAR) /*either or both scroll bars */ #define GROWMASK (GROWUP | GROWDN | GROWRT | GROWLFT) #define GROWNORM 16 /* normalization shift factor */ #define ROLL 1 /* Roll window onto screen */ #define EXPLODE 2 /* Explode window onto screen */ /*----------------------------------------------------------------------------*/ /* Definitions for use with event tables */ /*----------------------------------------------------------------------------*/ #define ET_END 0x1001 #define ET_DEFAULT 0x1002 /*----------------------------------------------------------------------------*/ /* Definitions for the table of eventtable indexes */ /*----------------------------------------------------------------------------*/ #define SYSINX 0 /*System (user) */ #define VIEWINX 1 /*View */ #define HELPINX 2 /*Help */ #define DRAGINX 3 /*Drag */ #define CLINX 4 /*Choice lists */ #define FLDINX 5 /*Fields */ #define MNINX 6 /*Menus */ #define SRINX 7 /*Scrollable regions */ #define MEMOINX 8 /*Memo fields */ #define TTMEMOINX 9 /*Ticker tape memo field */ #define FMINX 10 /*Forms */ #define RADIOINX 11 /*Radio button field */ #define DSKIPINX 12 #define MSKIPINX 13 #define PUSHINX 14 /*Push button field */ #define LBOXINX 15 /*List box field */ /*----------------------------------------------------------------------------*/ /* Event table pointers */ /*----------------------------------------------------------------------------*/ #define SYSETP (_etptbl[SYSINX]) /*System (user) */ #define VIEWETP (_etptbl[VIEWINX]) /*View */ #define HELPETP (_etptbl[HELPINX]) /*Help */ #define DRAGETP (_etptbl[DRAGINX]) /*Drag */ #define CLETP (_etptbl[CLINX]) /*Choice lists */ #define FLDETP (_etptbl[FLDINX]) /*Data Fields */ #define MNETP (_etptbl[MNINX]) /*Menu Fields */ #define SRETP (_etptbl[SRINX]) /*Scrollable regions */ #define MEMOETP (_etptbl[MEMOINX]) /*Memo fields */ #define TTMEMOETP (_etptbl[TTMEMOINX]) /*Ticker tape memo fields */ #define FMETP (_etptbl[FMINX]) /*Forms */ #define RADIOETP (_etptbl[RADIOINX]) /*Radio buttons */ #define PUSHETP (_etptbl[PUSHINX]) /*Pushbuttons */ #define DSKIPETP (_etptbl[DSKIPINX]) #define MSKIPETP (_etptbl[MSKIPINX]) #define LBOXETP (_etptbl[LBOXINX]) /*List boxes */ /*----------------------------------------------------------------------------*/ /* VCS Defined Events */ /*----------------------------------------------------------------------------*/ #define AC_NULLEVENT 0 #define AC_DEFS 32000 #define AC_CONTINUE 32000 #define AC_EXIT 32001 #define AC_QUIT 32002 #define AC_NEXT 32003 #define AC_LEFT 32004 #define AC_RIGHT 32005 #define AC_UP 32006 #define AC_DOWN 32007 #define AC_ZOOM 32008 #define AC_FIXED 32009 #define AC_SAMEFORM 32010 #define AC_PREVFORM 32011 #define AC_NEXTFORM 32012 #define AC_SAMEITEM 32013 #define AC_PREVITEM 32014 #define AC_NEXTITEM 32015 #define AC_FIRSTITEM 32016 #define AC_LASTITEM 32017 #define AC_SAMEDIR 32018 #define AC_BEEP 32019 #define AC_ALTGOTO 32020 #define AC_LBUTTONDN 32101 #define AC_LBUTTONUP 32102 #define AC_LBUTTONDBLCLK 32103 #define AC_RBUTTONDN 32104 #define AC_RBUTTONUP 32105 #define AC_RBUTTONDBLCLK 32106 #define AC_CBUTTONDN 32107 #define AC_CBUTTONUP 32108 #define AC_CBUTTONDBLCLK 32109 #define AC_MOUMOVE 32110 #define AC_KEYPRESS 32111 #define AC_FLDENTER 32112 #define AC_FMSUSPEND 32113 #define AC_FLDDISPLAYMSG 32114 #define AC_FLDSCROLLINTOVIEW 32115 #define AC_ITEMGOTO 32116 #define AC_FLDREDISPLAY 32117 #define AC_FLDLEAVE 32118 #define AC_VALMSGDISPLAY 32119 #define AC_FMENTER 32120 #define AC_FMLEAVE 32121 #define AC_VERIFYQUIT 32122 #define AC_VERIFYEXIT 32123 #define AC_ACTIVATE 32124 #define AC_FMSCROLL 32125 #define AC_SRENTER 32126 #define AC_SRLEAVE 32127 #define AC_SRROWENTER 32128 #define AC_SRROWLEAVE 32129 #define AC_SRGOTO 32130 #define AC_SRSCROLLINTOVIEW 32131 #define AC_FLDCSRMOVE 32132 #define AC_FMREDISPLAY 32133 #define AC_NEXTRADIOBUTTON 32134 #define AC_PREVRADIOBUTTON 32135 #define AC_FIRSTRADIOBUTTON 32136 #define AC_LASTRADIOBUTTON 32137 #define AC_MOUOUTMODAL 32142 /*outside of a modal window */ #define AC_MOUOUTALLWN 32143 /*mouse not in any windows */ #define AC_WNSUSPEND 32144 /*switching from a window to a window */ #define AC_MOUOUTCLIST 32145 #define AC_WNACTIVATE 32146 #define AC_POSTNEXTITEM 32147 #define AC_SKIPFLD 32148 #define AC_LFTFLD 32149 #define AC_CLISTDONE 32150 #define AC_MOUPAGEDN 32151 #define AC_MOUPAGEUP 32152 #define AC_MOUPAGERT 32153 #define AC_MOUPAGELFT 32154 #define AC_RESIZENOTENABLE 32155 #define AC_DRAGNOTENABLE 32156 #define AC_FLDVALIDATE 32157 #define AC_POSTSSRNEXTPOS 32158 #define AC_STARTWNRESIZE 32159 #define AC_STARTWNDRAG 32160 #define AC_STARTMARK 32161 #define AC_ENDMARK 32162 #define AC_QUITMARK 32163 #define AC_COPYTOCLIP 32164 #define AC_BOOLTOGGLE 32165 #define AC_SPINBUTTON 32166 #define AC_MTOGGLE 32177 #define AC_MULTSPINUPD 32178 #define AC_WNHIDDEN 32179 #define AC_MULTSPINVAL 32180 #define AC_MOUMARK 32181 /*----------------------------------------------------------------------------*/ /* Window Management Masks for _wn_mange */ /*----------------------------------------------------------------------------*/ #define DRAG_MODE 0x0001 /*Presently in drag mode */ #define DRAG_VTHUMB 0x0002 #define DRAG_HTHUMB 0x0004 #define RESIZE_MODE 0x0008 /*Presently in resize mode */ #define RESIZE_COR1 0x0010 /*Upper left hand corner resize */ #define RESIZE_COR2 0x0020 /*Upper right hand corner resize */ #define RESIZE_COR3 0x0040 /*Lower left hand corner resize */ #define RESIZE_COR4 0x0080 /*Lower right hand corner resize */ #define WM_OKTOCOPY 0x0100 /* WN region already check for overlap*/ #define NO_TRIM_TO_WN 0x0200 /* Don't trim region to its window */ #define MARKREGION 0x0400 /*In mark text mode for VV Clipboard */ #define PASTEFROMCLIP 0x0800 /*Pasting text from VV Clipboard */ /*----------------------------------------------------------------------------*/ /* Scroll bar drawing flag masks */ /*----------------------------------------------------------------------------*/ #define NO_SBARCORNER 0x0001 /*corner character not drawn */ #define NO_VSBAR 0x0002 /*vertical scroll bar not drawn */ #define NO_HSBAR 0x0004 /*horizontal scroll bar not drawn */ /*----------------------------------------------------------------------------*/ /* Memory File Flag Masks */ /*----------------------------------------------------------------------------*/ #define INDEXING 0x0001 /*keyworded file indexing enabled */ /*----------------------------------------------------------------------------*/ /* Memory file keyword codes */ /*----------------------------------------------------------------------------*/ #define KWD_STATIC 'S' #define KWD_MANUAL 'M' #define KWD_AUTO 'A' /*----------------------------------------------------------------------------*/ /* Window Parts Definitions */ /*----------------------------------------------------------------------------*/ #define ENDROW -1 /*to the end of current row */ #define ENDCOL -2 /*to the end of column */ #define ENDWN -3 /*from current row to end of wn */ #define ROW -4 /*current row */ #define COL -5 /*current column */ #define WN -6 /*the whole window */ #define RECT -7 /*a rectangular region */ /*----------------------------------------------------------------------------*/ /* Move Type Definitions (Sources) */ /*----------------------------------------------------------------------------*/ #define VID 0 /*video screen */ #define VST 1 /*video string */ #define STATT 2 /*string with attribute */ #define CHATT 3 /*character with attribute */ #define ATT 4 /*attribute only */ #define ST 5 /*string without attribute */ #define CH 6 /*character without attribute */ #define VSTCH 7 /*video string without attribute */ #define SRCMASK 0x07 /* AND mask for _vcscpy() source only */ /*----------------------------------------------------------------------------*/ /* Special Move Types that don't get masked, added, or passed to_vcscpy() */ /*----------------------------------------------------------------------------*/ #define NO_TYPE -2 /*Invalid source movetype - no move */ #define BUFFER -1 /*special VST, _wn_cpy() changes to 1 */ /*----------------------------------------------------------------------------*/ /* Move Destinations */ /*----------------------------------------------------------------------------*/ #define TO_VID 0x0000 /*to the video screen */ #define TO_VST 0x0008 /*to the video string in memory */ #define TO_ST 0x0010 /*to the text string in memory */ /*----------------------------------------------------------------------------*/ /* Move Directions */ /*----------------------------------------------------------------------------*/ #define FROM_WN 0 /*from window to string */ #define TO_WN 1 /*to window from string */ #define TO_DEST 2 /*to window's dest from string */ /*----------------------------------------------------------------------------*/ /* Window Management defines */ /*----------------------------------------------------------------------------*/ #define STBYTES 1 /* bytes per character in a string */ #define VSTBYTES 2 /* bytes per character in video string*/ #define MAX_RECTANGLES 100 #define WN_MAXNEST 5 /*----------------------------------------------------------------------------*/ /* Definitions for redrawing the screen */ /*----------------------------------------------------------------------------*/ #define LOWERWN 1 #define ALLWN 2 #define WNCHILDREN 3 #define NOWRITE 4 #define JUSTWN 5 #define UNLINKWN 6 #define SIBLINGS 7 /*----------------------------------------------------------------------------*/ /* Cursor shapes */ /*----------------------------------------------------------------------------*/ #define BOT_LINE 0 /* a line at the bottom */ #define BLOCK 1 /* a full block */ #define BOT_BLOCK 2 /* a block in the bottom half of the */ /* character box */ #define TOP_BLOCK 3 /* a block in the top half of the */ /* character box */ /*----------------------------------------------------------------------------*/ /* Definitions for beeps */ /*----------------------------------------------------------------------------*/ #define BPERROR 0 /*indexes in _beeps[] */ #define BPNOACTION 1 #define BPAUTOMOVE 2 #define BPSHORT 3 /*predefined beep durations in 1/100's*/ #define BPMEDIUM 10 /*of a second */ #define BPLONG 30 #define BPBELL -1 #define BPLOW 100 /*predefined beep pitches in Hz */ #define BPMIDDLE 500 #define BPHIGH 1000 /*----------------------------------------------------------------------------*/ /* Image parts for window image printing */ /*----------------------------------------------------------------------------*/ #define PRINT_INSIDE 0 #define PRINT_FULL 1 /*----------------------------------------------------------------------------*/ /* Boolean values */ /*----------------------------------------------------------------------------*/ #define YES 1 #define NO 0 #define ON 1 #define OFF 0 #define TRUE 1 #define FALSE 0 /*----------------------------------------------------------------------------*/ /* Scroll bar options */ /*----------------------------------------------------------------------------*/ #define AUTOUPD (-1) #define MANUALUPD (-2) /*----------------------------------------------------------------------------*/ /* Predefined date formats for convenience */ /*----------------------------------------------------------------------------*/ #define US_DATE "MM/DD/YY" /*US format for date */ #define EURO_DATE "DD/MM/YY" /*EUROPEAN format for date */ /******************************************************************************/ /* User accessible global variables */ /******************************************************************************/ #define VV_ERR _vv_err /*Global error code */ #define VID_ECHO _vid_echo /*Video screen echo flag */ #define WN_WNP (&_wn_wn) /*Generic window template pointer */ #define FULL_WNP (&_fullwn) /*Full video screen window pointer */ #define MSG_WNP (&_msgwn) /*Message window pointer */ #define CLIST_WNP (&_clist_wn) /*choice list window */ #define HELP_WNP (_help_wnp) /*Help window pointer */ #define VID_SCRP (&_vid_scr) /*Video screen pointer */ #define LATT_SYS _latt /*System logical attribute array */ #define TRT_END _trt_end /*Translation table end marker */ #define SYSDATEFMT _datefmtp /*system default date format */ #define SYSTIMEFMT _timefmtp /*system default time format */ #define CENTURYBREAK _centurybreak /*year to use to calculate century for*/ /*two digit years. */ #define BEGTERMSTAT 0 /*Dummy beginning terminal state */ #define VVTERMSTAT 0 /*Dummy initialized terminal state */ /*----------------------------------------------------------------------------*/ /* Window borders */ /*----------------------------------------------------------------------------*/ #define BDR_NULLP (BORDERPTR) NULLP /*No border */ #define BDR_SLNP &_bdr_sln /*Single line border */ #define BDR_DLNP &_bdr_dln /*Double line border */ #define BDR_SPACEP &_bdr_space /*Space border */ #define BDR_DOTP &_bdr_dot /*Dot border */ #define BDR_STARP &_bdr_star /*Star border */ #define BDR_SOLIDP &_bdr_solid /*Solid block border */ /*----------------------------------------------------------------------------*/ /* Line definitions */ /*----------------------------------------------------------------------------*/ #define LINE_SLNP &_bdr_sln /*Single line */ #define LINE_DLNP &_bdr_dln /*Double line */ #define LINE_SPACEP &_bdr_space /*Space line */ #define LINE_DOTP &_bdr_dot /*Dot line */ #define LINE_STARP &_bdr_star /*Star line */ #define LINE_SOLIDP &_bdr_solid /*Solid block line */ /*----------------------------------------------------------------------------*/ /* Options not to check for during the system initialization */ /* Meaningful only under PCDOS, always defined for portability */ /*----------------------------------------------------------------------------*/ #define CGA_RETRACE 0x0200 /* Waiting for retrace on CGA */ #define KB_EXTEND 0x0400 /* BIOS extended keyboard support */ #define PS2 0x0800 /* PS/2 line of machines */ #define DOS_EXTEND 0x1000 /* DOS extender check */ #define LNCHARMIN 179 /*Minimum line character */ #define LNCHARMAX 218 /*Maximum line character */ #define LNCHARQ 40 /*Number of line characters defined */ /******************************************************************************/ /* PCDOS and OS2 specific definitions */ /******************************************************************************/ /*----------------------------------------------------------------------------*/ /* Block-graphics characters */ /*----------------------------------------------------------------------------*/ #define CH_LIGHTSHADE 178 /*lightest shading character */ #define CH_MEDSHADE 177 /*medium shading character */ #define CH_DARKSHADE 176 /*dark shading character */ #define CH_BLOCK 219 /*solid block character */ #define CH_BOTBLOCK 220 /*bottom halfblock */ #define CH_TOPBLOCK 223 /*top halfblock */ #define CH_LFTBLOCK 221 /*left halfblock */ #define CH_RTBLOCK 222 /*right halfblock */ /*----------------------------------------------------------------------------*/ /* Predefined video adapters */ /*----------------------------------------------------------------------------*/ #define MDA 0x0001 /*Monochrome Display Adapter */ #define CGA 0x0002 /*Color Graphics Adapter */ #define EGA 0x0004 /*Enhanced Ggaphics Adapter */ #define PGS 0x0008 /*Professional Graphics System */ #define VGA 0x0010 /*Video Graphics Array */ #define MCGA 0x0020 /*Monochrome Color Graphics Array */ /*----------------------------------------------------------------------------*/ /* Attribute values for the Monochrome Adapter */ /*----------------------------------------------------------------------------*/ #define NORMAL 0x07 /*attribute base state */ #define UNDERLINE 0x01 /* ditto */ #define REVERSE 0x70 /* ditto */ #define HIGH_INT 0x08 /*attribute added state */ #ifdef __TURBOC__ #define BLINK 128 /*attribute added state */ #else #define BLINK 0x80 /*attribute added state */ #endif /*----------------------------------------------------------------------------*/ /* Color attribute values for the Color Adapters */ /*----------------------------------------------------------------------------*/ #define BLACK 0x00 #define BLUE 0x01 #define GREEN 0x02 #define CYAN 0x03 #define RED 0x04 #define MAGENTA 0x05 #define BROWN 0x06 #define WHITE 0x07 #define LIGHT 0x08 #define YELLOW (LIGHT | BROWN) /*----------------------------------------------------------------------------*/ /* Predefined video modes */ /*----------------------------------------------------------------------------*/ #define BW40 0 /*40 columns monochrome */ #define CO40 1 /*40 columns color */ #define BW80 2 /*80 columns monochrome */ #define CO80 3 /*80 columns color */ #define MONO 7 /*Monochrome adapters */ /*----------------------------------------------------------------------------*/ /* Definitions to set the alternative number of screen rows */ /*----------------------------------------------------------------------------*/ #define VSROWQ (_vid_scr.row_q) #define ROWQ_25 25 /*----------------------------------------------------------------------------*/ /* Definitions used to time exploding windows to vertical retrace signal. */ /*----------------------------------------------------------------------------*/ #define MDA_PORT 0x03ba #define MDA_VPOLAR 0xff #define MDA_VRETRACE_BIT 0x80 #define CGA_PORT 0x03da #define CGA_VPOLAR 0x00 #define CGA_VRETRACE_BIT 0x08 /*----------------------------------------------------------------------------*/ /* Definitions for the interrupts used in the system */ /*----------------------------------------------------------------------------*/ #define DOS_INT ((USHORT) 0x0021) /*DOS interrupt INT 21H */ #define VI_INT ((USHORT) 0x0010) /*Video interrupt INT 10H */ #define KI_INT ((USHORT) 0x0016) /*Keyboard interrupt INT 16H */ #define MOU_INT ((USHORT) 0x0033) /*Mouse interrupt INT 33H */ #define SET_ISVR 0x2500 #define GET_ISVR 0x3500 /******************************************************************************/ /* End of PCDOS and OS2 specific definitions */ /******************************************************************************/ /******************************************************************************/ /* Logical attribute definitions */ /******************************************************************************/ /* Quantity of physical attribute alternatives per logical attribute */ #define PATTQ 2 /* Quantity of logical attributes */ #define VCSLATTQ 27 #define LATTQ 43 #define LATTVCSQ LSPINCH #define NOCHANGE 0x7f /*No change in attribute */ #define USE_BLK_GRAPH 0xfe /*Use BLK_GRAPH (vs latt array trans).*/ #define NULL_ATT 0xff /*No attribute specified */ #define LSYS 0 /*System shell screen attribute */ #define LNORMAL 1 /*Normal text */ #define LREVERSE 2 /*Reverse text */ #define LHIGHLITE 3 /*Highlighted text */ #define LURGENT 4 /*Attention ! (blink) */ #define LHELP 5 /*Help message */ #define LERROR 6 /*Error message */ #define LMESSAGE 7 /*Informational message */ #define LFLDINACT 8 /*Inactive Field */ #define LFLDACT 9 /*Active Field */ #define LFLDSKIP 10 /*Skip Field */ #define LMNINACT 11 /*Inactive Menu Item */ #define LMNACT 12 /*Active Menu Item */ #define LMNUNAVAIL 13 /*Unavailable Menu Item */ #define LFLDSELCH 14 /*Selection Character */ #define LCLINACT 15 /*Inactive choice */ #define LCLACT 16 /*Active choice */ #define LMARK 17 /*Mark */ #define LNODISPLAY 18 /*No display (noecho) */ #define LARROW 19 /*Scroll bar arrows */ #define LCORNER 20 /*Scroll bar corner */ #define LPAGERGN 21 /*Scroll bar page region */ #define LTHUMB 22 /*Scroll bar thumb */ #define LSHADOW 23 /*Window shadows */ #define LDEBUG 24 /*Debugging windows */ #define LDEBUGMSG 25 /*Debug message windows */ #define LSPINCH 26 /*Spin button character */ #define LAVR1 27 /*reserved logical attribute */ #define LAVR2 28 /*reserved logical attribute */ #define LAVR3 29 /*reserved logical attribute */ #define LAVR4 30 /*reserved logical attribute */ #define LAVR5 31 /*reserved logical attribute */ #define LAVR6 32 /*reserved logical attribute */ #define LAVR7 33 /*reserved logical attribute */ #define LAVR8 34 /*reserved logical attribute */ #define LAVR9 35 /*reserved logical attribute */ #define LAVR10 36 /*reserved logical attribute */ #define LAVR11 37 /*reserved logical attribute */ #define LAVR12 38 /*reserved logical attribute */ #define LAVR13 39 /*reserved logical attribute */ #define LAVR14 40 /*reserved logical attribute */ #define LAVR15 41 /*reserved logical attribute */ #define LAVR16 42 /*reserved logical attribute */ /******************************************************************************/ /* Error message definitions for the error handling system */ /******************************************************************************/ /* Designer librarian successful completion value */ #define VV_SUCCESS -1 /* Quantity of VCS defined error codes used to set VV_ERR */ #ifdef NO_DEBUG_CODE #define VCSERRQ 17 #else #define VCSERRQ 101 #endif /* Runtime errors */ #define MEMLACK 1 /*Insufficient memory */ #define ERROPEN 2 /*Error opening file */ #define ERRREAD 3 /*Error reading file */ #define ERRWRITE 4 /*Error writing file */ #define ERRCLOSE 5 /*Error closing file */ #define ERRPOS 6 /*attempt to reposition file pointer */ #define ERRPOPEN 7 /*Error opening pipe */ #define ERRPCLOSE 8 /*Error closing pipe */ #define FILETOOBIG 9 /*Too many lines in file */ #define KWDNOTFOUND 10 /*Keyword not found */ #define ERRNAME 11 /*File could not be renamed */ #define DL_LIBCOR 12 /*Library file or program is corrupted*/ #define FL_NLIB 13 /*File is not a library file */ #define FL_NUNLOCKED 14 /*File could not be unlocked */ #define DL_LOCKED 15 /*Designer library locked */ #define DL_READONLY 16 /*Attempt to open READONLY file for */ /*writing */ /* Development only error codes */ #define BADWNSTRUC 17 /*Corrupted WINDOW structure */ #define BADMFSTRUC 18 /*Corrupted MFILE structure */ #define BADSCRSTRUC 19 /*Corrupted SCR structure */ #define BADCLSTRUC 20 /*Corrupted CLIST structure */ #define BADFMSTRUC 21 /*Corrupted FORM structure */ #define BADMNSTRUC 22 /*Corrupted MENU structure */ #define BADITEMSTRUC 23 /*Corrupted item structure */ #define BADBGSTRUC 24 /*Corrupted background structure */ #define WNISUP 25 /*Window is already up */ #define WNNOTUP 26 /*Window is not up */ #define WNTOOBIG 27 /*Window too big for the buffer */ #define MFROWNEG 28 /*Memory file row is negative */ #define MFROWTOOBIG 29 /*Memory file row number is too large */ #define STRTOOLONG 30 /*String too long */ #define FULLTABLE 31 /*Function table full */ #define NOMFILEPTR 32 /*No MFILE pointer installed in window*/ #define NOETP 33 /*Event table pointer cannot be NULLP */ #define NOWNIMAGE 34 /*No window image saved */ #define NOSUCHFLD 35 /*Field does not exist */ #define NOSUCHITEM 36 /*No item with this number on form */ #define BADPTR 37 /*NULLP is not allowed */ #define BADPARM 38 /*Bad parameter value */ #define BADWNCOORD 39 /*Bad window coordinates */ #define BADLINECOORD 40 /*Bad line coordinates */ #define BADBOXCOORD 41 /*Bad box coordinates */ #define BADTEXTCOORD 42 /*Bad text coordinates */ #define BADFLDCOORD 43 /*Bad field coordinates */ #define BADPRPTCOORD 44 /*Bad prompt coordinates */ #define BADSRCOORD 45 /*Bad scrollable region coordinates */ #define BADMEMOCOORD 46 /*Bad memo coordinates */ #define BADMENUCOORD 47 /*Bad menu coordinates */ #define BADDATE 48 /*Invalid date string */ #define BADTIME 49 /*Invalid time string */ #define BADFORMAT 50 /*Invalid date/time format string */ #define BADCLITEM 51 /*No item with this number in list */ #define BADFMTYPE 52 /*Wrong type of form to add field to */ #define BADPIC 53 /*Bad picture */ #define BADROW 54 /*Bad row number */ #define BADCOL 55 /*Bad data column number */ #define FMISUP 56 /*Form is on screen */ #define FMNOTUP 57 /*Form is not on screen */ #define FMISREADY 58 /*Cannot add fields to ready forms */ #define FMEMPTY 59 /*No active items on the form */ #define NOTDFIELD 60 /*Data field expected */ #define NOTMEMOFLD 61 /*Memo field expected */ #define NOPICSYMFUNC 62 /*No picture symbol function */ #define BADFLDTYPE 63 /*Illegal operation for this fld type */ #define NOSCROLLBAR 64 /*This window has no scroll bars */ #define NORGSETFUNC 65 /*No range set function */ #define FLDDISABLED 66 /*Field type has not been enabled */ #define SROWNOTVIS 67 /*Scrollable row not visible */ #define DL_ACCERR 68 /*Invalid access code */ #define DL_LOCKERR 69 /*Lock_status parameter was not LOCK */ #define DR_KEYERR 70 /*Directory record key was a null */ #define FL_EOFILE 71 /*End of file has been reached */ #define FL_PRVLOCKED 72 /*File locked by a previous user */ #define FL_NFOUND 73 /*File not found */ #define DL_RCNTYPE 74 /*Record was not the requested type */ #define DR_PRVLOCKED 75 /*Dir record locked by previous user */ #define DR_CURLOCKED 76 /*Dir record locked by current user */ #define DR_NFOUND 77 /*Dir record not found */ #define DR_NLOCKED 78 /*Dir record not locked */ #define DL_EORECS 79 /*End of directory records has been */ #define DL_DATAERR 80 /*Data len greater than max allowed */ #define FL_BADPATH 81 /*Specified drive/path nonexistent */ #define FL_NPERM 82 /*User doesn't have req. permissions */ #define NOSUCHSR 83 /*Scrollable region does not exist */ #define NOSUCHFUNC 84 /*Function name not in function list */ #define FUNCNOTRES 85 /*Functions have not been resolved */ #define DATANOTRES 86 /*Data pointers have not been resolved*/ #define CLISTNOTRES 87 /*Choice lists have not been resolved */ #define FMISNOTREADY 88 /*Form is not ready */ #define LIBNOTFOUND 89 /*Library name not found */ #define FMNOTRES 90 /*Form not resolved */ #define FMNOTFOUND 91 /*Form not found in list */ #define BADFLDOPT 92 /*Bad Field options */ #define DL_RECFORMAT 93 /*Bad VMS record format */ #define INCOMPAT_FMT 94 /*Incompatible date/time format */ #define NO_BROWSE 95 /*Initialization for browsing not done*/ #define EVENT_OFLOW 96 /*Overflowed event queue */ #define INVLBOXDATA 97 #define CLIP_FULL 98 /*VV Clipboard is full. No more chars*/ #define INVCLIPCHAR 99 /*Invalid chars pasted into field. */ #define SUBSYSDISABLED 100 /*sub-system not enabled */ /******************************************************************************/ /* System informational message definitions */ /******************************************************************************/ /* Quantity of VCS informational messages */ #define VCSINFOQ 15 /*reserve 0 for no message */ #define INITMEMLACK 1 /*Insufficient memory to initialize */ #define HELPSTR 2 /*Default help string */ #define AM_STRING 3 /*AM string */ #define PM_STRING 4 /*PM string */ #define EXHELPMSG 5 /*Press or to exit help*/ #define SCRLHELPMSG 6 /*Use cursor pad keys to scroll */ #define EXITFORMMSG 7 /*Do you want to exit this form */ #define QUITFORMMSG 8 /*Do you want to quit this form */ #define EXCLISTMSG 9 /*Cursor keys to ... exit choice menu */ #define DATA_HELP 10 /*Data form default help string */ #define SCROLL_HELP 11 /*Scrollable subform help string */ #define MENU_HELP 12 /*Menu form help string */ #define NOVIRVB 13 /*No virtual video buffer */ #define ERR_OVVTC 13 /*Error opening VVTERMCAP file */ #define TERMNOTFOUND 14 /*No terminal description found */ #define TERMTOOLONG 15 /*Terminal description too long */ #define NOTERM 16 /*Unable to determine terminal type */ #define NODUMBTERM 17 /*VV cannot use a dumb terminal */ #define BADTERMDEF 18 /*Bad terminal description */ #define NOCHANNEL 19 /*Unable to open IO channel */ #define ERR_QIO 20 /*QIO system service error */ /******************************************************************************/ /* */ /* Data structure definitions */ /* */ /******************************************************************************/ /*----------------------------------------------------------------------------*/ /* Major structure tags */ /*----------------------------------------------------------------------------*/ #define MF_TAG (((UINT) 'F' << 8) + 'M') #define WN_TAG (((UINT) 'N' << 8) + 'W') #define SCR_TAG (((UINT) 'C' << 8) + 'S') #define VIEW_TAG (((UINT) 'W' << 8) + 'V') #define HELP_TAG (((UINT) 'P' << 8) + 'H') #define CL_TAG (((UINT) 'L' << 8) + 'C') typedef struct node_struct /*NODE STRUCTURE */ { struct node_struct *prev_ndp; /*previous node pointer */ struct node_struct *next_ndp; /*next node pointer */ PTR datap; /*data pointer */ } NODE, *NODEPTR; /* Note: */ /* A generic linked list node structure, which contains only previous and */ /* next node pointers and a generic pointer can be cast to any desired type */ /* to contain any data information. */ typedef struct border_struct /*BORDER AND LINE STRUCTURE */ { UCHAR up_ch; /*upper horizontal character */ UCHAR low_ch; /*lower horizontal character */ UCHAR lft_ch; /*left vertical character */ UCHAR rt_ch; /*right vertical character */ UCHAR uplft_ch; /*upper left corner character */ UCHAR uprt_ch; /*upper right corner character */ UCHAR lowrt_ch; /*lower right corner character */ UCHAR lowlft_ch; /*lower left corner character */ } BORDER, *BORDERPTR, *LINEPTR; /* Note: */ /* The memory file structure and the memory file line structure may be */ /* substantialy changed in the next release. We strongly recommend to avoid */ /* accessing the members of those structures directly. */ typedef struct mfline_struct /*MEMORY FILE LINE STRUCTURE */ { UCHAR *line_st; /*pointer to line string */ int line_len; /*length of a memory file line */ UCHAR att; /*attribute for text line */ UCHAR check; /*check used by multiple choice list */ } MFLINE, *MFLINEPTR; typedef struct mfkwd_struct /*MEMORY FILE KEYWORD LINE STRUCTURE */ { UCHAR *line_st; /*pointer to line string */ int line_len; /*length of a memory file line */ UCHAR att; /*attribute for text line */ UCHAR check; /*check used by multiple choice list */ int sln_q; /*section line quantity */ long file_offset; /*offset in the disk file */ } MFKWD, *MFKWDPTR; typedef struct mfile_struct /*MEMORY FILE STRUCTURE */ { UINT tag; /*sentinel */ UCHAR *fn; /*file specifier */ MFLINEPTR *farray; /*pointer to the array of MFLINEPTR's */ int fmaxline; /*maximum number of lines allowed */ int fmaxcol; /*maximum number of columns allowed */ int ln_q; /*lines in mfile, including EOF line */ int c_q; /*max columns (max line len inc. '\n')*/ int flag; /*memory file flags */ UCHAR *kwdp; /*keyword pointer */ int vln_beg; /*beginning line num of view section */ int vln_q; /*view section line quantity */ int vc_q; /*view section max line length */ UCHAR * buf; /*line buffer for keyworded files */ FILE * fp; /*file pointer for keyworded files */ } MFILE, *MFILEPTR; typedef struct scr_struct /*SCREEN STRUCTURE */ { UINT tag; /* Sentinel (tag) */ int type; /* Move type destination */ int row_q; /* Row quantity in screen */ int col_q; /* Column quantity in screen */ int usecount; /* Number of users of memory screen */ UCHAR clrch; /* Clear character */ UCHAR clratt; /* Clear attribute */ UCHAR FAR *vbufp; /* Pointer to the screen buffer */ ULONG ioflags; /* Flags for when to call io_fp */ int bufsize; /* Bytes in buffer */ #if _MSC_VER >= 700 /* if MSC 7.0 */ PFI io_fp; /* Func to call for screen I/O's */ #else #ifdef LINT_ARGS int (FASTCALL *io_fp)(PTR); /* Func to call for screen I/O's */ #else PFI io_fp; /* Func to call for screen I/O's */ #endif #endif } SCR, *SCRPTR; typedef struct sbar_struct /*SCROLL BAR STRUCTURE */ { int hmin; /*the horizontal range minimum */ int hmax; /*the horizontal range maximum */ int hval; /*the horizontal current value */ int vmin; /*the vertical range minimum */ int vmax; /*the vertical range maximum */ int vval; /*the vertical current value */ } SBAR, * SBARP; typedef struct shadow_struct /*SHADOW STRUCTURE */ { int offset; /*position relative to window */ int len; /*length of the shadow */ int width; /*width of the shadow */ UCHAR fillchar; /*shadow fill character */ UCHAR att; /*shadow attribute */ } VSHADOW, *VSHADOWPTR; typedef struct bdrtxt_struct /*Window border text structure */ { struct bdrtxt_struct *next_textp; /* Pointer to next border text */ UCHAR *stp; /* Pointer to text string itself. */ UCHAR location; /* Flags describing location in border*/ UCHAR att; /* Video attribute to use for text */ } BDRTXT, *BDRTXTPTR; typedef struct window_struct /*WINDOW STRUCTURE */ { UINT tag; /* Sentinel (tag) */ UCHAR *vvd_stbuff; /* VV Designer permanent string buffer*/ int id; /* Id number */ ULONG flags; /* Window flags */ struct window_struct *parent_wnp; /* Pointer to parent (base) window */ struct window_struct *next_sib; /* Next lower child of same parent */ struct window_struct *top_child; /* Top child of this window */ PTR ownerp; /* Parent of window (form, menu, etc) */ SCRPTR destp; /* Memory/video screen output goes to */ int vidpage; /* Graphics-card alpha mode page # */ int scrl_q; /* Maximum number of lines to scroll */ short rbf; /* Top row of FULL window */ short ref; /* Bottom row of FULL window */ short cbf; /* Leftmost column of FULL window */ short cef; /* Rightmost column of FULL window */ int rb; /* Top row of window INSIDE */ int re; /* Bottom row of window INSIDE */ int cb; /* Left hand column of window INSIDE */ int ce; /* Right hand column of window INSIDE */ int r; /* Virtual cursor row-position */ int c; /* Virtual cursor column-position */ UCHAR *lattarray; /* Pointer to logical attribute array */ UCHAR fill_char; /* Window fill character */ UCHAR att; /* Window video attribute */ UCHAR mg_char; /* Character to use for margins */ UCHAR mg_att; /* Attribute to use for margins */ int lft_mg; /* Left margin */ int rt_mg; /* Right margin */ int top_mg; /* Top margin */ int bot_mg; /* Bottom margin */ SBARP sbarp; /* Pointer to scroll bar structure */ BORDERPTR bdr_linep; /* Ptr to window border line structure*/ UCHAR dummy; UCHAR bdr_att; /* Border attribute */ short bdr_vstlen; /* Length of buffer for VST's */ UCHAR *bdr_vstp; /* Pointer to formated border VST's */ BDRTXT bdr_txt; /* First border text structure */ int row_org; /* Origin row coordinate */ int col_org; /* Origin column coordinate */ int horzscrlq; /* Horizontal scrolling quantity */ int vertscrlq; /* Vertical scrolling quantity */ SCRPTR bufp; /* Buffer screen pointer */ MFILEPTR mfp; /* Memory file pointer */ UCHAR *storp; /* Pointer to window image storage */ #if _MSC_VER >= 700 /*MSC 7.0 */ PFI procfp; /* Process function */ PFI io_fp; /* Window interior drawing function */ PFI upfp; /* Pointer to set function */ PFI dnfp; /* Pointer to unset function */ PFI susfp; /* Suspend window function pointer */ PFI actfp; /* Activate window function pointer */ #else #ifdef LINT_ARGS int (FASTCALL *procfp)(PTR); /* Process function */ int (FASTCALL *io_fp)(PTR); /* Window interior drawing function */ int (FASTCALL *upfp)(struct window_struct *); /*Pointer to set function */ int (FASTCALL *dnfp)(struct window_struct *); /*Pointer to unset function*/ int (FASTCALL *susfp)(PTR); int (FASTCALL *actfp)(PTR); #else PFI procfp; /* Process function */ PFI io_fp; /* Window interior drawing function */ PFI upfp; /* Pointer to set function */ PFI dnfp; /* Pointer to unset function */ PFI susfp; /* Suspend window function pointer */ PFI actfp; /* Activate window function pointer */ #endif #endif VSHADOW (*shadp)[2]; /* Pointer to array of shadows */ long userp; /* Four bytes for user's use */ long userp1; /* Reserved for users */ UCHAR *actfunc; UCHAR *susfunc; ULONG ioflags; /* Flags for when to call io_fp */ UCHAR *name; /* Pointer to name of the window */ struct window_struct *nd_wnp; /* Linked list of windows */ UCHAR *lib_name; /* Pointer to vvd library name */ } WINDOW, *WINDOWPTR; typedef struct event_struct /*EVENT RECORD STRUCTURE */ { ULONG lmsg; /*long message */ ULONG when; /*timestamp (in ticks) */ USHORT type; /*event type */ short x, y; /*mouse position */ USHORT wmsg; /*word message */ } EVENT, *EVENTPTR; #ifdef LINT_ARGS typedef int (FASTCALL * EVENTFP)(PTR, EVENTPTR); #else typedef int (FASTCALL * EVENTFP)(); #endif typedef struct et_struct /*EVENT TABLE STRUCTURE */ { USHORT code; /*keycode or eventcode value */ EVENTFP fp; /*pointer to function to execute */ } ET, *ETPTR; typedef struct beep_struct /*BEEP STRUCTURE */ { int duration; /*duration of beep (1/100's of sec) */ int pitch; /*pitch of beep (Hz) */ } BEEP, *BEEPPTR; typedef struct vidio_struct /*8086 REGISTER STRUCTURE */ { UINT ax, bx, cx, dx, si, di; USHORT es, ds; } VIDIO, *VIDIOPTR; typedef struct chext_struct /*Extended characters conv. table */ { UCHAR ch; UCHAR type; } CHEXT; typedef struct keyctrl_struct /*KEYFUNCTION CONTROL STRUCTURE */ { UINT tag; /*structure tag */ WINDOWPTR wnp; /*window pointer */ int nextact; /*next action code */ } KEYCTRL, *KEYCTRLPTR; typedef struct help_struct /*HELP STRUCTURE */ { UINT tag; /*structure tag */ WINDOWPTR wnp; /*window pointer */ int nextact; /*next action code */ UCHAR *kwdp; /*pointer to keyword string */ struct help_struct *nexthelp; /*pointer to next help structure */ } HELP, *HELPPTR; typedef struct clist_struct /*CHOICE LIST STRUCTURE */ { UINT tag; /*structure tag */ WINDOWPTR wnp; /*choice list window pointer */ int nextact; /*next action code */ UCHAR *kwdp; /*keyword associated with field */ int flags; /*choice list flags */ UCHAR *help; /*choice list help keyword or message */ UCHAR *fm_help; /*form help keyword or message */ int itemnum; /*starting line in the list file */ int len; /*length of highlight bar */ UCHAR act_att; /*attribute of highlight bar */ UCHAR dummy; /*word alignment dummy variable */ PTR parentp; /* Parent form of choice list */ } CLIST, *CLISTPTR; /******************************************************************************/ /* Structures for holding data about shadows, windows and other rectangles. */ /******************************************************************************/ typedef struct { short rb; short cb; short re; short ce; } RECTCOORDS; typedef struct rect_struct { RECTCOORDS area; /* coordinates of rectangle */ int movetype; /* movetype for _vcscpy() */ } RECTANGLE, *RECTPTR; /******************************************************************************/ /* Structures for fast variable passing between window management routines. */ /******************************************************************************/ typedef struct _wn_cpy_struct /* variables to share with copy_rect()*/ { WINDOWPTR wnp; /* shared copy of window pointer */ int cdir; /* shared copy of cdir */ int dtype; /* shared copy of dtype */ ULONG flags; /* shared copy of window flags */ UCHAR FAR *daddr; /* address in the data to copy */ UCHAR FAR *wn_addr; /* address in the window's buf | dest */ UINT row_org, col_org; /* origin of window on ms or mf buffer*/ UINT dchbytes, drowbytes; /* bytes per character and row of data*/ int destrb, destcb; /* Offsets from window 0,0 to dest 0,0*/ SCRPTR destp; /* Window's destination, if needed. */ UINT wn_rowbytes; /* bytes per row of window */ MFILEPTR mfp; /* Pointer to memory file if using one*/ int stmax; /* max to copy from string (strlen) */ int minrect; /* rectangles currently in rectlist */ UCHAR att; /* attribute to use in copy */ } WNCPYSTRUCT, *WNCPYSTRUCTPTR; typedef struct /* variables for rectangle splitting */ { RECTCOORDS area; /* area that all rectangles fit into */ int writing; /* flag to indicate if we are writing */ int minrect; int child_proof; int row_off, col_off; /* offsets from rect window to this wn*/ int dest_row_off, dest_col_off; /* cumulative offsets, rect wn to dest*/ } SPLITSTRUCT, *SPLITSTRUCTPTR; /*----------------------------------------------------------------------------*/ /* Operating system specific structures */ /*----------------------------------------------------------------------------*/ /*TERMINAL CHARACTERISTICS STRUCTURE */ typedef struct mark_region_info { int start_row; /*starting row of marked region */ int start_col; /*starting column of marked region */ int end_row; /*ending row of marked region */ int end_col; /*ending column of marked region */ int clipqty; /*number of characters in clipboard */ PFI ctrlc_fp; /*pointer to ctrl-c function */ PFI ctrlx_fp; /*pointer to ctrl-x function */ int orig_row; /*row_org when marking started */ int orig_col; /*col_org when marking started */ int mark_type; /*type of item being marked */ int wn_colq; /*#cols of window cut or copied from */ WINDOWPTR wnp; /*pointer to window marking is on */ } MARK_LOC, *MARK_LOCPTR; typedef int TERMSTAT, *TERMSTATPTR; /*dummy TERMSTAT definition for PCDOS */ /******************************************************************************/ /* */ /* Function-like macros */ /* */ /******************************************************************************/ /* maximum and minimum values */ #ifndef max #define max(a, b) ((a) >= (b) ? (a) : (b)) #endif #ifndef min #define min(a, b) ((a) <= (b) ? (a) : (b)) #endif /* absolute value */ #define _abs(n) ((n) > 0 ? (n) : -(n)) /* high and low byte of word */ #define _byte_high(a) (((a) >> 8) & 0x00FF) #define _byte_low(a) ((a) & 0x00FF) /* high and low word of longword */ #define _word_high(a) (((a) >> 16) & 0x0000FFFFL) #define _word_low(a) ((a) & 0x0000FFFFL) /* set video mode */ #define vid_setmode(vidmode) (_vid_setmode((vidmode), TRUE)) #ifndef NOTANSICOMP /* if compiler has quickcopy */ #define copystruct(x, y) ((x) = (y)) #else #define copystruct(x, y) (memcpy(&(x), &(y), sizeof((x)))) #endif /******************************************************************************/ /* */ /* VV Specfic function like macros */ /* */ /******************************************************************************/ /* standard beep */ #define bell_vv() (beep_vv(BPBELL, BPBELL)) #define csr_plwn(wnp) (csr_mvwn((wnp)->r, (wnp)->c, (wnp))) #define wn_msbuf(wnp) ((wnp)->bufp) /* mouse hide and show macros */ #define mou_hide() (_mou_hide()) #define mou_show() (_mou_show()) /* window management macros */ #define _freeze() (FULL_WNP->flags |= WNHIDDEN) #define _thaw() (FULL_WNP->flags &= ~WNHIDDEN, \ _wn_redraw(WNCHILDREN, FULL_WNP, FULL_WNP->rbf, FULL_WNP->cbf, \ FULL_WNP->ref, FULL_WNP->cef)) #define wn_print(part, w) wn_wr(_printname, _printmode, (part), (w)) /* macros for putting shadows up and down */ #define shad_up(wnp) (_shad_updn(UP, wnp)) #define shad_dn(wnp) (_shad_updn(DOWN, wnp)) #define sw_adjq(x, y, wnp) (wnp->horzscrlq = min(x, _wi_colq(wnp)),\ wnp->vertscrlq = min(y, _wi_rowq(wnp))) #define sw_parent(child, parent) ((child)->parent_wnp = (parent)) #define sw_name(n, p) ((p)->name = (UCHAR *) (n)) #define curwnp() (_curwnp) #define wn_ptrnam(p) ((p)->name) #define _wn_top(wnp) wn_top(ALLWN, (wnp)) #define wn_mv(rb, cb, wnp) wn_mod((rb), (cb), NULLPARM, NULLPARM, (wnp)) #define _wn_has_bdr(wnp) ((wnp)->bdr_linep) #define v_attq(att, q, wnp) \ v_chattrow((wnp)->r, (wnp)->c, (UCHAR)0, (att), (q), ATT, (wnp)) #define v_chq(ch, q, wnp) \ v_chattrow((wnp)->r, (wnp)->c, (ch), (wnp)->att, (q), CHATT, (wnp)) #define v_chattarea(rb, cb, re, ce, ch, att, mvtype, wnp) \ _wn_cpy((wnp), TO_WN, RECT, (mvtype), CH, \ (rb), (cb), (re), (ce), NULLPARM, (ch), (att), NULLP) #define wn_proc(wnp) _wn_proc((wnp)) #define mf_browse(wnp) _wn_proc((wnp)) #define v_st(stp, wnp) \ v_stattpl((wnp)->r, (wnp)->c, (stp), (wnp)->att, STATT, (wnp)) #define v_statt(stp, att, wnp) \ v_stattpl((wnp)->r, (wnp)->c, (stp), (att), STATT, (wnp)) #define v_stattnop(r, c, stp, att, q, type, wnp) \ (_v_stnop((r), (c), (stp), (att), (q), (type), (wnp)), \ wn_updrgn((r), (c), (r), (c) + (q) - 1, (wnp))) #define v_stcpy(stp, dir, wn_part, wnp) \ _v_cpy((stp), (dir), ST, (wn_part), (wnp)) #define v_stpl(r, c, stp, wnp) \ v_stattpl((r), (c), (stp), (wnp)->att, STATT, (wnp)) #define v_vstcpy(vstp, dir, wn_part, wnp) \ ((VSTBYTES/STBYTES) * _v_cpy((vstp), (dir), VST, (wn_part), (wnp))) #define _v_cpy(stp, cdir, dtype, part, wnp) \ _wn_cpy((wnp), (cdir), RIGHT, CHATT, (dtype), \ (wnp)->r, (wnp)->c, 0, 0, (part), SPACE, (wnp)->att, (stp)) #define _v_stcpy(r, c, stp, q, wnp) \ _wn_cpy((wnp), FROM_WN, RIGHT, CH, ST, \ (r), (c), 0, 0, (q), SPACE, SPACE, (stp)) /******************************************************************************/ /* Rectangle list management macros: */ /* _add_rectc adds a rectangle and copies in a list of coordinates. */ /* _add_rect adds a rectangle and copies in a complete rectangle structure. */ /******************************************************************************/ #define _add_rectc(rrb, rcb, rre, rce, mvt) \ (_rectlist[++_maxrect].area.rb = (rrb), \ _rectlist[_maxrect].area.cb = (rcb), \ _rectlist[_maxrect].area.re = (rre), \ _rectlist[_maxrect].area.ce = (rce), \ _rectlist[_maxrect].movetype = (mvt)) #define _add_rect(r) copystruct(_rectlist[++_maxrect], (r)) #define ms_free(scrp) if ((scrp) && (!(--((scrp)->usecount)))) \ mem_free((PTR) (scrp)) #define _vs_synch(f, rb, cb, re, ce) if (VID_ECHO && ((f) & VSECHO)) \ vs_updrgn(rb, cb, re, ce) /* build color physical attribute value from two colors */ #define catt_def(fg, bg) ((UCHAR)(((UCHAR) (bg) << 4) + (UCHAR) (fg))) /* test if cursor visible */ #define csr_isvisible() (_csrvis) /* macros used for debugging and error handling system */ #ifdef NO_DEBUG_CODE #define INIT_MODULE(p) #define EXIT_MODULE(p) if (_vv_err) (*_errfp)(p) #define EXIT_NOERRH(p) #else #define INIT_MODULE(p) (*_finitfp)(p) #define EXIT_MODULE(p) if (_vv_err) (*_errfp)(p); (*_fexitfp)(p) #define EXIT_NOERRH(p) (*_fexitfp)(p) #endif /* free an event table */ #define et_free(etblp) (mem_free((PTR) etblp)) /* assign the clear attribute to a memory screen */ #define ms_clratt(att, scrp) ((scrp)->clratt = (att)) /* number of columns of a memory screen */ #define ms_colq(scrp) ((scrp)->col_q) /* number of rows of a memory screen */ #define ms_rowq(scrp) ((scrp)->row_q) /* linked list macros */ #define nd_next(nodep) ((nodep)->next_ndp) #define nd_prev(nodep) ((nodep)->prev_ndp) #define nd_first(headp) ((headp)->next_ndp) #define nd_last(headp) ((headp)->prev_ndp) /* set the various beep durations and pitches */ #define se_beeps(i, d, p) (_beeps[(i)].duration = (d),\ _beeps[(i)].pitch = (p)) /* Set the system date format */ #define se_datefmt(p) (SYSDATEFMT = (UCHAR *) (p)) /* Set the 100 year break year */ #define se_centurybreak(year) (_centurybreak = (year)) /* set the index file extension string */ #define se_indext(p) (_indext = (UCHAR *) (p)) /* install user initialization function */ #define se_initfp(p) (_inittbl[USERINIT] = (p)) /* set memory file keyword character */ #define se_kwdch(c) (_kwdch = (UCHAR) (c)) /* set memory file keyword delimiter */ #define se_kwddelim(c) (_kwddelim = (UCHAR) (c)) /* set the printer configuration */ #define se_printer(nm, md) (_printname = (UCHAR *) (nm)), \ (_printmode = (UCHAR *) (md)) /* set VV response characters */ #define se_responsech(true, false) (_vv_yes = (true)), (_vv_no = (false)) /* set the number of spaces per tab for the string output functions */ #define se_tabq(a) (_vv_tabq = (a)) /* set the system time format */ #define se_timefmt(p) (SYSTIMEFMT = (UCHAR *) (p)) /* set string translation delimiters */ #define se_trdelim(beg, end) (_tr_beg = (UCHAR *) (beg)), \ (_tr_end = (UCHAR *) (end)) /* set scroll bar globals */ #define se_sbch(c, u, d, l, r, p, t) (_sbcorner = (c)), (_sbuparrow = (u)), \ (_sbdnarrow = (d)), (_sblftarrow = (l)), (_sbrtarrow = (r)), \ (_sbpagergn = (p)), (_sbthumb = (t)) #define se_sbcoversize(a) (_sbcoversize = (a)) /* set the animation step quantity */ #define se_wnsetstepq(i) (_wnsetstepq = (i)) /* turn ON/OFF terminal software handshaking flag */ #define se_xonflag(a) /* set a memory file option */ #define smf_opt(o, s, p) ((s) ? ((p)->flag |= (o)) :\ ((p)->flag &= ~(o))) /* macros for setting members of the window structure */ #define sw_att(attribute, wnp) ((wnp)->att = (attribute)) #define sw_fillchar(fc, wnp) ((wnp)->fill_char = (fc)) #define sw_latt(a, wnp) ((wnp)->lattarray = (a)) #define sw_scrlq(a, wnp) ((wnp)->scrl_q = (a)) #ifdef __TCPLUSPLUS__ #define sw_updnfp(u, d, wnp) ((wnp)->upfp = (int (*)(window_struct *)) (u), \ (wnp)->dnfp = (int (*)(window_struct *)) (d)) #else #ifdef __cplusplus #define sw_updnfp(u, d, wnp) ((wnp)->upfp = (int (*)(window_struct *)) (u), \ (wnp)->dnfp = (int (*)(window_struct *)) (d)) #else #define sw_updnfp(u, d, wnp) ((wnp)->upfp = (PFI) (u), \ (wnp)->dnfp = (PFI) (d)) #endif #endif /* Activate and suspend functions */ #define sw_actfp(f, p) ((p)->actfp = (PFI) (f)) #define sw_susfp(f, p) ((p)->susfp = (PFI) (f)) /* free a string translation table */ #define trt_free(trtp) (mem_free((PTR) trtp)) /* return video display adapter used */ #define vid_adapter() (_vda) /* call video interrupt */ #define vid_int(vrip, vrop) (_sys_int(VI_INT, (vrip), (vrop))) /* assign the clear attribute to the video screen */ #define vs_clratt(att) (_vid_scr.clratt = (att)) /* update the whole video screen */ #define vs_upd() (vs_updrgn(0, 0, LAST_ROW, LAST_COL)) /* maximum column number in window */ #define _wn_collimit(wnp) ((wnp)->flags & BUFFERED ? (wnp)->bufp->\ col_q - 1 : (wnp)->ce - (wnp)->cb) /* maximum row number in window */ #define _wn_rowlimit(wnp) ((wnp)->flags & BUFFERED ? (wnp)->bufp->\ row_q - 1 : (wnp)->re - (wnp)->rb) /* number of rows and columns of the video screen in the current mode */ #define vs_colq() (_vid_scr.col_q) #define vs_rowq() (_vid_scr.row_q) /******************************************************************************/ /* */ /* Common function like macros for Vermont Views and Quick Version */ /* */ /******************************************************************************/ /* move the virtual cursor */ #define cs_mv(row, col, wnp) ((wnp)->r = (row)), ((wnp)->c = (col)) /* set no initial checking for special hardware and software */ #define init_nochk(opt) (_vnochk |= (opt)) /* number of columns of a memory file */ #define mf_colq(mfp) ((mfp)->vc_q) /* number of rows of a memory file */ #define mf_rowq(mfp) ((mfp)->vln_q) #define mf_txtrow(stp, mfp) (mf_search((stp), 0, (mfp))) /* modify a windows options */ #define sw_opt(o, s, p) ((s) ? ((p)->flags |= (o)) :\ ((p)->flags &= ~(o))) /* number of columns in window */ #define _wi_colq(wnp) ((wnp)->ce - (wnp)->cb + 1) #define _wi_colqf(wnp) ((wnp)->cef - (wnp)->cbf + 1) /* number of rows in window */ #define _wi_rowq(wnp) ((wnp)->re - (wnp)->rb + 1) #define _wi_rowqf(wnp) ((wnp)->ref - (wnp)->rbf + 1) /* take the window off the screen */ #define wn_dn(wnp) (*(wnp)->dnfp)(wnp) /* test if window is set */ #define wn_isup(wnp) ((wnp)->flags & SET) /* put the window up on the screen */ #define wn_up(wnp) (*(wnp)->upfp)(wnp) /* update window */ #define wn_upd(wnp) (wn_updrgn(0, 0, LAST_COL, LAST_ROW, (wnp))) /* Accessing the user pointers */ #define userp_get(p) ((p)->userp) #define userp_set(u, p) ((p)->userp = (long) (u)) /* FAR pointer manipulation macros */ #define FP_OFFSET(fp) (*((UINT *)&(fp))) #ifdef _INTELC32_ extern USHORT _dataseg; /* contains INTEL data segment */ #define FP_SEGMENT(fp) _dataseg #define FP_MAKE(fp, off, seg) \ (*((ULONG *)&fp) = (((USHORT)(seg)<<4) + (UINT)(off))) #else #define FP_SEGMENT(fp) (*(USHORT *)((UINT *)&(fp) + 1)) #define FP_MAKE(fp, off, seg) \ ((*(((USHORT *)&fp) + sizeof(UINT)/sizeof(USHORT)) = (USHORT) (seg)),\ (*(UINT *)&fp = (UINT)(off))) #endif /* DOS Real Mode FAR pointer manipulation macros */ #define RFP_SEGMENT(rfp) (*((USHORT FAR*)&(rfp) + 1)) #define RFP_OFFSET(rfp) (*((USHORT FAR*)&(rfp))) #define RFP_MAKE(rfp, off, seg) \ ((*(((USHORT *)&rfp) + 1) = (USHORT) (seg)),\ (*(USHORT *)&rfp = (USHORT)(off))) #define RFP_LINEAR(rfp) ((ULONG)(RFP_OFFSET(rfp)+(RFP_SEGMENT(rfp)<<4))) /******************************************************************************/ /* */ /* Extern declaration for the system global variables */ /* */ /******************************************************************************/ EXTERN UCHAR * NEAR _vv_errmsg[]; EXTERN UCHAR * NEAR _vv_valmsg[]; EXTERN UCHAR * NEAR _vv_infomsg[]; EXTERN UCHAR * NEAR _vv_dbgmsg[]; EXTERN UCHAR NEAR _att_tbl[][PATTQ]; EXTERN int NEAR _attrowq, NEAR _attcolq; EXTERN BEEP NEAR _beeps[]; EXTERN UCHAR * NEAR _trt_end; EXTERN UCHAR * NEAR _tr_beg; EXTERN UCHAR * NEAR _tr_end; EXTERN UCHAR NEAR _latt[]; EXTERN CHEXT NEAR _chsettbl[]; EXTERN UCHAR * NEAR _months[]; EXTERN UCHAR NEAR _derrmsg[]; EXTERN UCHAR * NEAR _errstp; /*validation error string */ EXTERN UCHAR * NEAR _dbdumpp; EXTERN UCHAR * NEAR _datefmtp; EXTERN int NEAR _centurybreak; EXTERN UCHAR * NEAR _timefmtp; EXTERN UCHAR * NEAR _printname; EXTERN UCHAR * NEAR _printmode; EXTERN UCHAR * NEAR _fullbdr_vstp; EXTERN BORDER NEAR _bdr_space, NEAR _bdr_star, NEAR _bdr_dot, NEAR _bdr_dln, NEAR _bdr_sln, NEAR _bdr_solid; EXTERN WINDOW NEAR _clist_wn, NEAR _fullwn, NEAR _vcswn, NEAR _msgwn, NEAR _wn_wn, NEAR _helpwn; EXTERN WINDOWPTR NEAR _help_wnp, NEAR _wnhdndp; EXTERN WINDOWPTR NEAR _curwnp, NEAR _nextwnp; /*Current/next form to process*/ EXTERN SCR NEAR _vid_scr; EXTERN RECTANGLE NEAR _rectlist[MAX_RECTANGLES]; EXTERN int NEAR _maxrect; EXTERN ETPTR NEAR _etptbl[]; EXTERN unsigned NEAR _evq_oflow; EXTERN EVENTPTR NEAR _evq_head, NEAR _evq_tail, NEAR _evq_ins; EXTERN UCHAR NEAR _vv_yes, NEAR _vv_no, NEAR _kwdch, NEAR _kwddelim; EXTERN int NEAR _lattsw, NEAR _chsetext, NEAR _v_mode, NEAR _vid_echo; EXTERN int NEAR _vv_err, NEAR _vpstlen, NEAR _vv_tabq, NEAR _vv_init, NEAR _csrvis, NEAR _vpbytes; EXTERN int NEAR _wnsize, NEAR _scrsize, NEAR _mfsize, NEAR _hiderow, NEAR _hidecol, NEAR _sbarsize; EXTERN int NEAR _evq_size; EXTERN int NEAR _wn_mange; EXTERN UCHAR NEAR _sbuparrow, NEAR _sbdnarrow, NEAR _sblftarrow, NEAR _sbrtarrow, NEAR _sbcorner, NEAR _sbpagergn, NEAR _sbthumb; EXTERN int NEAR _sbcoversize; EXTERN UCHAR * NEAR _indext; EXTERN short NEAR _wnsetstepq; EXTERN ULONG NEAR _wnsteppause; EXTERN UCHAR NEAR _linecode[]; EXTERN int NEAR _vda, NEAR _vnochk; EXTERN UCHAR NEAR _v_retr; EXTERN UCHAR NEAR _kb_ext; EXTERN UCHAR FAR * NEAR _bios_seg; EXTERN USHORT NEAR _vid_segs[][2]; EXTERN UINT FAR * NEAR _breaksp; EXTERN USHORT NEAR _timer_scale; EXTERN USHORT NEAR _vert_retrace; /******************************************************************************/ /* */ /* Function prototypes and externals */ /* */ /******************************************************************************/ #ifdef LINT_ARGS /*start of LINTARGS */ #ifdef __cplusplus extern "C" { #endif /******************************************************************************/ /* */ /* VV specific functions */ /* */ /******************************************************************************/ PROTOTYPE void FASTCALL beep_vv(int, int); PROTOTYPE int FASTCALL ch_isalpha(UCHAR); PROTOTYPE int FASTCALL ch_isdigit(UCHAR); PROTOTYPE int FASTCALL ch_islower(UCHAR); PROTOTYPE int FASTCALL ch_isspace(UCHAR); PROTOTYPE int FASTCALL ch_istxt(UCHAR); PROTOTYPE int FASTCALL ch_isupper(UCHAR); PROTOTYPE UCHAR FASTCALL ch_tolower(UCHAR); PROTOTYPE UCHAR FASTCALL ch_toupper(UCHAR); PROTOTYPE void FASTCALL csr_mv(int, int); PROTOTYPE int FASTCALL csr_mvwn(int, int, WINDOWPTR); PROTOTYPE void FASTCALL csr_rd(int *, int *); PROTOTYPE void FASTCALL csr_type(int); PROTOTYPE int FASTCALL cs_adj(WINDOWPTR); PROTOTYPE ETPTR FASTCALL et_def(int, EVENTFP); PROTOTYPE int FASTCALL et_delfp(EVENTFP, ETPTR); PROTOTYPE EVENTFP FASTCALL et_getfp(USHORT, ETPTR); PROTOTYPE int FASTCALL et_proc(EVENTPTR, ETPTR, PTR); PROTOTYPE EVENTFP FASTCALL et_rplevnt(USHORT, EVENTFP, ETPTR); PROTOTYPE int FASTCALL evnt_get(EVENTPTR); PROTOTYPE int FASTCALL evnt_post(USHORT, USHORT, ULONG); PROTOTYPE void FASTCALL exit_err(UCHAR *, UCHAR *); PROTOTYPE int FASTCALL kcb_mark(KEYCTRLPTR, EVENTPTR); PROTOTYPE void FASTCALL latt_init(int, int, int, UCHAR *, UCHAR *); PROTOTYPE void FASTCALL latt_rpl(UCHAR, UCHAR, UCHAR, UCHAR, UCHAR *); PROTOTYPE UCHAR * FASTCALL mem_stblank(UINT); PROTOTYPE MFILEPTR FASTCALL mf_def(int, int); PROTOTYPE void FASTCALL mf_disp(WINDOWPTR); PROTOTYPE void FASTCALL mf_free(MFILEPTR); PROTOTYPE int FASTCALL mf_kwdload(UCHAR *, MFILEPTR); PROTOTYPE int FASTCALL mf_kwdunload(UCHAR *, MFILEPTR); PROTOTYPE int FASTCALL mf_print(MFILEPTR); PROTOTYPE int FASTCALL mf_rd(UCHAR *, MFILEPTR); PROTOTYPE int FASTCALL mf_rowlen(int, MFILEPTR); PROTOTYPE int FASTCALL mf_rsatt(UCHAR *, MFILEPTR); PROTOTYPE int FASTCALL mf_search(UCHAR *, int, MFILEPTR); PROTOTYPE void FASTCALL ms_clr(SCRPTR); PROTOTYPE SCRPTR FASTCALL ms_def(int, int, UCHAR); PROTOTYPE int FASTCALL ms_print(SCRPTR); PROTOTYPE int FASTCALL ms_rd(UCHAR *, SCRPTR); PROTOTYPE int FASTCALL ms_wr(UCHAR *, UCHAR *, SCRPTR); PROTOTYPE void FASTCALL nd_del(NODEPTR); PROTOTYPE NODEPTR FASTCALL nd_inithd(void); PROTOTYPE NODEPTR FASTCALL nd_ins(NODEPTR, UINT); PROTOTYPE NODEPTR FASTCALL nd_numptr(int, NODEPTR); PROTOTYPE int FASTCALL nd_ptrnum(NODEPTR, NODEPTR); PROTOTYPE void CDECL re_breakfp(void); PROTOTYPE void FASTCALL se_breakfp(ISVRP, UINT FAR *); PROTOTYPE int FASTCALL shad_def(UCHAR, UCHAR, UINT, int, int, int, WINDOWPTR); PROTOTYPE UCHAR * FASTCALL stp_begtxt(UCHAR *); PROTOTYPE UCHAR * FASTCALL stp_endtxt(UCHAR *); PROTOTYPE UCHAR * FASTCALL stp_find(UCHAR *, UCHAR *); PROTOTYPE void FASTCALL st_delch(UCHAR *, UINT); PROTOTYPE void FASTCALL st_delembwh(UCHAR *); PROTOTYPE void FASTCALL st_delendwh(UCHAR *); PROTOTYPE int FASTCALL st_extract(UCHAR *, UCHAR *, UINT, UINT); PROTOTYPE UINT FASTCALL st_frint(int, UCHAR *); PROTOTYPE UINT FASTCALL st_frlong(long, UCHAR *); PROTOTYPE UINT FASTCALL st_frshort(short, UCHAR *); PROTOTYPE void FASTCALL st_ins(UCHAR *, UCHAR *, UINT); PROTOTYPE void FASTCALL st_insch(UCHAR, UINT, UCHAR *, UINT); PROTOTYPE int FASTCALL st_isblank(UCHAR *); PROTOTYPE void FASTCALL st_lft(UCHAR *, UINT, UINT); PROTOTYPE void FASTCALL st_lftadj(UCHAR *); PROTOTYPE void FASTCALL st_padblank(UCHAR *, UINT); PROTOTYPE int FASTCALL st_rd(FILE *, UCHAR *, int, UCHAR, int); PROTOTYPE UINT FASTCALL st_rev(UCHAR *); PROTOTYPE void FASTCALL st_rt(UCHAR *, UINT, UINT); PROTOTYPE void FASTCALL st_rtadj(UCHAR *); PROTOTYPE void FASTCALL st_tolower(UCHAR *); PROTOTYPE short FASTCALL st_toshort(UCHAR *); PROTOTYPE void FASTCALL st_toupper(UCHAR *); PROTOTYPE int FASTCALL st_wr(FILE *, UCHAR *); PROTOTYPE void FASTCALL sw_bdr(BORDERPTR, UCHAR, WINDOWPTR); PROTOTYPE int FASTCALL sw_bdrtxt(UCHAR *, int, int, UCHAR, WINDOWPTR); PROTOTYPE void FASTCALL sw_dest(SCRPTR, WINDOWPTR); PROTOTYPE void FASTCALL sw_exporg(short, WINDOWPTR); PROTOTYPE void FASTCALL sw_mf(MFILEPTR, WINDOWPTR); PROTOTYPE void FASTCALL sw_mg(int, int, int, int, UCHAR, UCHAR, WINDOWPTR); PROTOTYPE void FASTCALL sw_msbuf(SCRPTR, WINDOWPTR); PROTOTYPE int FASTCALL sw_org(int, int, WINDOWPTR); PROTOTYPE int FASTCALL sw_sb(int, ULONG, WINDOWPTR); PROTOTYPE void FASTCALL sw_sbrange(int, int, ULONG, WINDOWPTR); PROTOTYPE void FASTCALL sw_sbval(int, ULONG, WINDOWPTR); PROTOTYPE int FASTCALL sw_shad(UCHAR, UCHAR, UINT, WINDOWPTR); PROTOTYPE int FASTCALL sw_title(UCHAR *, UCHAR, int, WINDOWPTR); PROTOTYPE void FASTCALL sw_vidpage(int, WINDOWPTR); PROTOTYPE UCHAR *(* FASTCALL trt_def(int))[][2]; PROTOTYPE UCHAR * FASTCALL trt_rplst(UCHAR *, UCHAR *, UCHAR *(*)[][2]); PROTOTYPE int FASTCALL tr_mf(MFILEPTR, UCHAR *(*)[][2]); PROTOTYPE int FASTCALL tr_st(UCHAR *, UCHAR *(*)[][2]); PROTOTYPE int FASTCALL ts_save(TERMSTATPTR); PROTOTYPE int FASTCALL ts_set(TERMSTATPTR); PROTOTYPE void FASTCALL vid_cgabdr(UCHAR); PROTOTYPE void FASTCALL vid_ega43(int); PROTOTYPE void FASTCALL vid_vga50(int); PROTOTYPE int FASTCALL vid_getmode(void); PROTOTYPE int FASTCALL v_chattrow(int, int, UCHAR, UCHAR, int, int, WINDOWPTR); PROTOTYPE int FASTCALL v_chattcol(int, int, UCHAR, UCHAR, int, int, WINDOWPTR); PROTOTYPE int FASTCALL v_ch(UCHAR, WINDOWPTR); PROTOTYPE UCHAR FASTCALL vo_att(WINDOWPTR); PROTOTYPE UCHAR FASTCALL vo_ch(WINDOWPTR); PROTOTYPE void FASTCALL vs_refresh(void); PROTOTYPE void FASTCALL vs_updrgn(int, int, int, int); PROTOTYPE int FASTCALL v_bdr(WINDOWPTR); PROTOTYPE void FASTCALL v_mg(WINDOWPTR); PROTOTYPE UCHAR * FASTCALL v_stattpl(int, int, UCHAR *, UCHAR, int, WINDOWPTR); PROTOTYPE void FASTCALL vv_abort(void); PROTOTYPE UCHAR * FASTCALL vv_errmsg(UINT); PROTOTYPE void FASTCALL vv_exit(void); PROTOTYPE UCHAR * FASTCALL vv_infomsg(UINT); PROTOTYPE void FASTCALL vv_init(void); PROTOTYPE void FASTCALL wi_rpl(WINDOWPTR); PROTOTYPE int FASTCALL wi_sav(WINDOWPTR); PROTOTYPE void FASTCALL wi_unsav(WINDOWPTR); PROTOTYPE int FASTCALL wn_adj(WINDOWPTR); PROTOTYPE int FASTCALL wn_browse(WINDOWPTR); PROTOTYPE WINDOWPTR FASTCALL wn_def(int, int, int, int, UCHAR, BORDERPTR); PROTOTYPE int FASTCALL wn_expset(WINDOWPTR); PROTOTYPE void FASTCALL wn_expunset(WINDOWPTR); PROTOTYPE int FASTCALL wn_mod(int, int, int, int, WINDOWPTR); PROTOTYPE WINDOWPTR FASTCALL wn_mfdef(int, int, int, int, UCHAR, BORDERPTR, MFILEPTR); PROTOTYPE int FASTCALL wn_msmod(WINDOWPTR); PROTOTYPE WINDOWPTR FASTCALL wn_namptr(UCHAR *); PROTOTYPE WINDOWPTR FASTCALL wn_nbdef(int, int, int, int, UCHAR, BORDERPTR); PROTOTYPE int FASTCALL wn_rollset(WINDOWPTR); PROTOTYPE void FASTCALL wn_rollunset(WINDOWPTR); PROTOTYPE int FASTCALL wn_sbdraw(WINDOWPTR); PROTOTYPE void FASTCALL wn_sbrange(int *, int *, ULONG, WINDOWPTR); PROTOTYPE int FASTCALL wn_sbthumb(ULONG, WINDOWPTR); PROTOTYPE void FASTCALL wn_sbupd(int, int, ULONG, WINDOWPTR); PROTOTYPE int FASTCALL wn_sbval(ULONG, WINDOWPTR); PROTOTYPE int FASTCALL wn_set(WINDOWPTR); PROTOTYPE int FASTCALL wn_top(int, WINDOWPTR); PROTOTYPE void FASTCALL wn_unset(WINDOWPTR); PROTOTYPE WINDOWPTR FASTCALL wn_vdef(int, int, int, int, UCHAR, BORDERPTR, int, int); PROTOTYPE void FASTCALL _csr_plhide(WINDOWPTR); PROTOTYPE int FASTCALL _dir_change(UCHAR *); PROTOTYPE int FASTCALL _dir_make(UCHAR *); PROTOTYPE int FASTCALL _dir_remove(UCHAR *); PROTOTYPE short FASTCALL _drv_set(UINT); PROTOTYPE int FASTCALL _d_fmtval(UCHAR *, UCHAR **); PROTOTYPE int FASTCALL _err_disp(KEYCTRLPTR, EVENTPTR); PROTOTYPE int FASTCALL _t_fmtval(UCHAR *); PROTOTYPE void FASTCALL _fext_strip(UCHAR *); PROTOTYPE void FASTCALL _vid_setmode(int, int); /******************************************************************************/ /* */ /* VV Functions */ /* */ /******************************************************************************/ PROTOTYPE void FASTCALL csr_hide(void); PROTOTYPE void FASTCALL csr_show(void); PROTOTYPE long FASTCALL date_diff(UCHAR *, UCHAR *, UCHAR *); PROTOTYPE int FASTCALL date_frjul(UCHAR *, long, UCHAR *); PROTOTYPE int FASTCALL date_frnums(UCHAR *, int, int, int, UCHAR *); PROTOTYPE int FASTCALL date_get(UCHAR *, UCHAR *); PROTOTYPE int FASTCALL date_isleapyr(int); PROTOTYPE int FASTCALL date_tonums(UCHAR *, int *, int *, int *, UCHAR *); PROTOTYPE long FASTCALL date_tojul(UCHAR *, UCHAR *); PROTOTYPE void FASTCALL mem_free(PTR); PROTOTYPE PTR FASTCALL mem_get(UINT); PROTOTYPE int FASTCALL mf_clr(MFILEPTR); PROTOTYPE int FASTCALL mf_kwdset(UCHAR *, MFILEPTR); PROTOTYPE void FASTCALL mf_rowdel(int, MFILEPTR); PROTOTYPE void FASTCALL mf_rowtxt(UCHAR *, int, MFILEPTR); PROTOTYPE void FASTCALL _mf_rowntxt(UCHAR *, int, MFILEPTR, int); PROTOTYPE int FASTCALL mf_rowins(UCHAR *, int, MFILEPTR); PROTOTYPE UCHAR * FASTCALL mf_rowp(int, MFILEPTR); PROTOTYPE int FASTCALL mf_rowrpl(UCHAR *, int, MFILEPTR); PROTOTYPE int FASTCALL mf_size(UCHAR *, int *, int *); PROTOTYPE int FASTCALL mf_sort(UCHAR *, MFILEPTR); PROTOTYPE int FASTCALL mf_wr(UCHAR *, UCHAR *, MFILEPTR); PROTOTYPE void CDECL _mou_hide(void); PROTOTYPE void CDECL _mou_show(void); PROTOTYPE void FASTCALL se_abortfp(ISVRP); PROTOTYPE int FASTCALL time_delay(long); PROTOTYPE long FASTCALL time_diff(UCHAR *, UCHAR *, UCHAR *); PROTOTYPE int FASTCALL time_frnums(UCHAR *, int, int, int, UCHAR *); PROTOTYPE int FASTCALL time_frsec(UCHAR *, long, UCHAR *); PROTOTYPE int FASTCALL time_get(UCHAR *, UCHAR *); PROTOTYPE int FASTCALL time_tonums(UCHAR *, int *, int *, int *, UCHAR *); PROTOTYPE long FASTCALL time_tosec(UCHAR *, UCHAR *); PROTOTYPE void FASTCALL vid_hibg(int); PROTOTYPE void FASTCALL vs_clr(void); PROTOTYPE void FASTCALL v_box(int, int, int, int, UCHAR, BORDERPTR, WINDOWPTR); PROTOTYPE void FASTCALL v_line(int, int, int, int, UCHAR, LINEPTR, WINDOWPTR); #ifdef V_PRINTF PROTOTYPE int CDECL v_printf(WINDOWPTR, UCHAR *, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT, UINT); #else PROTOTYPE int CDECL v_printf(WINDOWPTR, UCHAR *, ...); #endif PROTOTYPE int FASTCALL vv_spawn(UCHAR *); PROTOTYPE void FASTCALL wn_clr(WINDOWPTR); PROTOTYPE void FASTCALL wn_free(WINDOWPTR); PROTOTYPE int FASTCALL wn_updrgn(int, int, int, int, WINDOWPTR); PROTOTYPE int FASTCALL wn_wr(UCHAR *, UCHAR *, int, WINDOWPTR); PROTOTYPE void FASTCALL _date_century(int *); PROTOTYPE void FASTCALL _db_dummy(UCHAR *); PROTOTYPE int FASTCALL _dt_frnums(int, UCHAR **, UCHAR **); PROTOTYPE int FASTCALL _dt_tonums(UCHAR **, UCHAR **); PROTOTYPE int FASTCALL _d_tonums(UCHAR *, int *, int *, int *, UCHAR *); PROTOTYPE int CDECL _evnt_get(EVENTPTR); PROTOTYPE void FASTCALL _evnt_keyloop(EVENTPTR); PROTOTYPE int CDECL _evnt_post(USHORT, ULONG, USHORT, short, short); PROTOTYPE int FASTCALL _evnt_send(PTR, USHORT, USHORT, ULONG); PROTOTYPE void FASTCALL _exit_sys(void); PROTOTYPE void FASTCALL _exit_clip(void); PROTOTYPE void FASTCALL _init_sys(void); PROTOTYPE int FASTCALL _liberr(int); PROTOTYPE int CDECL _mf_rowcmp(MFLINEPTR *, MFLINEPTR *); PROTOTYPE MFLINEPTR FASTCALL _mf_rowdef(UCHAR *); PROTOTYPE int FASTCALL _mf_scrl(int, int, int, MFILEPTR); PROTOTYPE void FASTCALL _ms_scrl(int, int, WINDOWPTR); PROTOTYPE WINDOWPTR FASTCALL _nextfocus(WINDOWPTR); PROTOTYPE int FASTCALL _shad_updn(int, WINDOWPTR); PROTOTYPE void FASTCALL _sw_inside(WINDOWPTR); PROTOTYPE void FASTCALL _sw_sbauto(ULONG, WINDOWPTR); PROTOTYPE int FASTCALL _t_tonums(UCHAR *, int *, int *, int *, UCHAR *); PROTOTYPE void CDECL _vcscpy(UCHAR FAR *, UCHAR FAR *, UINT, int, UCHAR); PROTOTYPE int FASTCALL _vf_date(int, int, int); PROTOTYPE int FASTCALL _vf_time(int, int); PROTOTYPE void FASTCALL _v_stnop(int, int, UCHAR *, UCHAR, int, int, WINDOWPTR); PROTOTYPE UCHAR * FASTCALL _v_strow(UCHAR *, UCHAR, int, int, WINDOWPTR); PROTOTYPE int FASTCALL _wn_activate(KEYCTRLPTR, EVENTPTR); PROTOTYPE void FASTCALL _wn_childsplit(WINDOWPTR, int, int); PROTOTYPE int FASTCALL _wn_cpy(WINDOWPTR, int, int, int, int, int, int, int, int, int, UCHAR, UCHAR, UCHAR *); PROTOTYPE int FASTCALL _wn_cpyrects(WNCPYSTRUCTPTR); PROTOTYPE int FASTCALL _wn_csr(WINDOWPTR); PROTOTYPE void FASTCALL _wn_dup(WINDOWPTR, WINDOWPTR); PROTOTYPE int FASTCALL _wn_dupstruc(WINDOWPTR, WINDOWPTR); PROTOTYPE void FASTCALL _wn_hide_show(WINDOWPTR); PROTOTYPE int FASTCALL _wn_init(int, int, int, int, UCHAR, BORDERPTR, WINDOWPTR); PROTOTYPE int FASTCALL _wn_proc(WINDOWPTR); PROTOTYPE int FASTCALL _wn_keyproc(PTR); PROTOTYPE void FASTCALL _wn_lnk_unlnk(int, WINDOWPTR); PROTOTYPE int FASTCALL _wn_mfproc(PTR); PROTOTYPE int FASTCALL _wn_msproc(PTR); PROTOTYPE void FASTCALL _wn_rect(WINDOWPTR, int, int); PROTOTYPE void FASTCALL _wn_redraw(int, WINDOWPTR, int, int, int, int); PROTOTYPE void FASTCALL _wn_refresh(WINDOWPTR, int, int, int, int); PROTOTYPE void FASTCALL _wn_rgn_copy(UCHAR *, UCHAR *, int, int, int, int); PROTOTYPE int FASTCALL _wn_rgnfit(int, int, int, int, WINDOWPTR); PROTOTYPE void FASTCALL _wn_sbauto(WINDOWPTR); PROTOTYPE int FASTCALL _wn_sdef(int, int, int, int, UCHAR, BORDERPTR, WINDOWPTR); PROTOTYPE short FASTCALL _wn_setup(WINDOWPTR); PROTOTYPE int FASTCALL _wn_splitrects(SPLITSTRUCTPTR, WINDOWPTR); PROTOTYPE int FASTCALL _wn_sure(int, int, WINDOWPTR); PROTOTYPE int FASTCALL _wn_suspend(KEYCTRLPTR, EVENTPTR); PROTOTYPE int FASTCALL _wn_wnproc(WINDOWPTR); PROTOTYPE void FASTCALL _wn_writerect(WINDOWPTR, RECTANGLE *); #ifdef __cplusplus } #endif EXTERN ISVRP NEAR _abortfp; EXTERN void (FASTCALL * NEAR _finitfp)(UCHAR *); EXTERN void (FASTCALL * NEAR _fexitfp)(UCHAR *); #if _MSC_VER >= 700 /*If MSC 7.0 */ EXTERN void (FASTCALL * NEAR _errfp)(); EXTERN PFV NEAR _inittbl[]; EXTERN PFV NEAR _exittbl[]; #else /*not MSC 7.0 */ EXTERN void (FASTCALL * NEAR _errfp)(UCHAR *); EXTERN void (FASTCALL * NEAR _inittbl[])(void); EXTERN void (FASTCALL * NEAR _exittbl[])(void); #endif /*end of MSC 7.0 */ EXTERN ISVRP NEAR _breakfp; EXTERN ISVRS NEAR _oldbreakfp; /*----------------------------------------------------------------------------*/ /* PCDOS specific functions */ /*----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" { #endif PROTOTYPE void ISVR _abortsr(void); PROTOTYPE void ISVR _breaksr(void); PROTOTYPE unsigned long CDECL _biostickq(void); PROTOTYPE int FASTCALL _chk_ega(void); PROTOTYPE int FASTCALL _chk_ps2(void); PROTOTYPE int FASTCALL _chk_xkb(void); PROTOTYPE UCHAR CDECL _inb(USHORT); PROTOTYPE void FASTCALL _init_timer(void); PROTOTYPE void FASTCALL _init_vert(void); PROTOTYPE UINT CDECL _inw(USHORT); PROTOTYPE ISVRS CDECL _isr_rpl(ISVRS, USHORT); PROTOTYPE void CDECL _outb(USHORT, UCHAR); PROTOTYPE void CDECL _outw(USHORT, UINT); PROTOTYPE int CDECL _sys_int(USHORT, VIDIOPTR, VIDIOPTR); PROTOTYPE void FASTCALL _time_delay(USHORT); PROTOTYPE USHORT CDECL _timertickq(void); #ifdef __cplusplus } #endif #else /*OTHER 1/2 of LINTARGS */ /******************************************************************************/ /* */ /* VV specific functions */ /* */ /******************************************************************************/ extern void FASTCALL beep_vv(); extern int FASTCALL ch_isalpha(); extern int FASTCALL ch_isdigit(); extern int FASTCALL ch_islower(); extern int FASTCALL ch_isspace(); extern int FASTCALL ch_istxt(); extern int FASTCALL ch_isupper(); extern UCHAR FASTCALL ch_tolower(); extern UCHAR FASTCALL ch_toupper(); extern void FASTCALL csr_mv(); extern int FASTCALL csr_mvwn(); extern void FASTCALL csr_rd(); extern void FASTCALL csr_type(); extern int FASTCALL cs_adj(); extern ETPTR FASTCALL et_def(); extern int FASTCALL et_delfp(); extern EVENTFP FASTCALL et_getfp(); extern int FASTCALL et_proc(); extern EVENTFP FASTCALL et_rplevnt(); extern int FASTCALL evnt_get(); extern int FASTCALL evnt_post(); extern void FASTCALL exit_err(); extern int FASTCALL kcb_mark(); extern void FASTCALL latt_init(); extern void FASTCALL latt_rpl(); extern UCHAR * FASTCALL mem_stblank(); extern MFILEPTR FASTCALL mf_def(); extern void FASTCALL mf_disp(); extern void FASTCALL mf_free(); extern int FASTCALL mf_kwdload(); extern int FASTCALL mf_kwdunload(); extern int FASTCALL mf_print(); extern int FASTCALL mf_rd(); extern int FASTCALL mf_rowlen(); extern int FASTCALL mf_rsatt(); extern int FASTCALL mf_search(); extern void FASTCALL ms_clr(); extern SCRPTR FASTCALL ms_def(); extern int FASTCALL ms_print(); extern int FASTCALL ms_rd(); extern int FASTCALL ms_wr(); extern void FASTCALL nd_del(); extern NODEPTR FASTCALL nd_inithd(); extern NODEPTR FASTCALL nd_ins(); extern NODEPTR FASTCALL nd_numptr(); extern int FASTCALL nd_ptrnum(); extern void CDECL re_breakfp(); extern void FASTCALL se_breakfp(); extern int FASTCALL shad_def(); extern UCHAR * FASTCALL stp_begtxt(); extern UCHAR * FASTCALL stp_endtxt(); extern UCHAR * FASTCALL stp_find(); extern void FASTCALL st_delch(); extern void FASTCALL st_delembwh(); extern void FASTCALL st_delendwh(); extern int FASTCALL st_extract(); extern UINT FASTCALL st_frint(); extern UINT FASTCALL st_frlong(); extern UINT FASTCALL st_frshort(); extern void FASTCALL st_ins(); extern void FASTCALL st_insch(); extern int FASTCALL st_isblank(); extern void FASTCALL st_lft(); extern void FASTCALL st_lftadj(); extern void FASTCALL st_padblank(); extern int FASTCALL st_rd(); extern UINT FASTCALL st_rev(); extern void FASTCALL st_rt(); extern void FASTCALL st_rtadj(); extern void FASTCALL st_tolower(); extern short FASTCALL st_toshort(); extern void FASTCALL st_toupper(); extern int FASTCALL st_wr(); extern void FASTCALL sw_bdr(); extern int FASTCALL sw_bdrtxt(); extern void FASTCALL sw_dest(); extern void FASTCALL sw_exporg(); extern void FASTCALL sw_mf(); extern void FASTCALL sw_mg(); extern void FASTCALL sw_msbuf(); extern int FASTCALL sw_org(); extern int FASTCALL sw_sb(); extern void FASTCALL sw_sbrange(); extern void FASTCALL sw_sbval(); extern int FASTCALL sw_shad(); extern int FASTCALL sw_title(); extern void FASTCALL sw_vidpage(); extern UCHAR *(* FASTCALL trt_def())[][2]; extern UCHAR * FASTCALL trt_rplst(); extern int FASTCALL tr_mf(); extern int FASTCALL tr_st(); extern int FASTCALL ts_save(); extern int FASTCALL ts_set(); extern void FASTCALL vid_cgabdr(); extern void FASTCALL vid_ega43(); extern void FASTCALL vid_vga50(); extern int FASTCALL vid_getmode(); extern int FASTCALL v_chattrow(); extern int FASTCALL v_chattcol(); extern int FASTCALL v_ch(); extern UCHAR FASTCALL vo_att(); extern UCHAR FASTCALL vo_ch(); extern void FASTCALL vs_refresh(); extern void FASTCALL vs_updrgn(); extern int FASTCALL v_bdr(); extern void FASTCALL v_mg(); extern UCHAR * FASTCALL v_stattpl(); extern void FASTCALL vv_abort(); extern UCHAR * FASTCALL vv_errmsg(); extern void FASTCALL vv_exit(); extern UCHAR * FASTCALL vv_infomsg(); extern void FASTCALL vv_init(); extern void FASTCALL wi_rpl(); extern int FASTCALL wi_sav(); extern void FASTCALL wi_unsav(); extern int FASTCALL wn_adj(); extern int FASTCALL wn_browse(); extern WINDOWPTR FASTCALL wn_def(); extern int FASTCALL wn_expset(); extern void FASTCALL wn_expunset(); extern int FASTCALL wn_mod(); extern WINDOWPTR FASTCALL wn_mfdef(); extern int FASTCALL wn_msmod(); extern WINDOWPTR FASTCALL wn_namptr(); extern WINDOWPTR FASTCALL wn_nbdef(); extern int FASTCALL wn_rollset(); extern void FASTCALL wn_rollunset(); extern int FASTCALL wn_sbdraw(); extern void FASTCALL wn_sbrange(); extern int FASTCALL wn_sbthumb(); extern void FASTCALL wn_sbupd(); extern int FASTCALL wn_sbval(); extern int FASTCALL wn_set(); extern int FASTCALL wn_top(); extern void FASTCALL wn_unset(); extern WINDOWPTR FASTCALL wn_vdef(); extern void FASTCALL _csr_plhide(); extern int FASTCALL _dir_change(); extern int FASTCALL _dir_make(); extern int FASTCALL _dir_remove(); extern short FASTCALL _drv_set(); extern int FASTCALL _d_fmtval(); extern int FASTCALL _err_disp(); extern int FASTCALL _t_fmtval(); extern void FASTCALL _fext_strip(); extern void FASTCALL _vid_setmode(); /******************************************************************************/ /* */ /* VV Functions */ /* */ /******************************************************************************/ extern void FASTCALL csr_hide(); extern void FASTCALL csr_show(); extern long FASTCALL date_diff(); extern int FASTCALL date_frjul(); extern int FASTCALL date_frnums(); extern int FASTCALL date_get(); extern int FASTCALL date_isleapyr(); extern int FASTCALL date_tonums(); extern long FASTCALL date_tojul(); extern void FASTCALL mem_free(); extern PTR FASTCALL mem_get(); extern int FASTCALL mf_clr(); extern int FASTCALL mf_kwdset(); extern void FASTCALL mf_rowdel(); extern void FASTCALL mf_rowtxt(); extern void FASTCALL mf_rowntxt(); extern int FASTCALL mf_rowins(); extern UCHAR * FASTCALL mf_rowp(); extern int FASTCALL mf_rowrpl(); extern int FASTCALL mf_size(); extern int FASTCALL mf_sort(); extern int FASTCALL mf_wr(); extern void FASTCALL _mf_rowntxt(); extern void CDECL _mou_hide(); extern void CDECL _mou_show(); extern void FASTCALL se_abortfp(); extern int FASTCALL time_delay(); extern long FASTCALL time_diff(); extern int FASTCALL time_frnums(); extern int FASTCALL time_frsec(); extern int FASTCALL time_get(); extern int FASTCALL time_tonums(); extern long FASTCALL time_tosec(); extern void FASTCALL vid_hibg(); extern void FASTCALL vs_clr(); extern void FASTCALL v_box(); extern void FASTCALL v_line(); extern int CDECL v_printf(); extern int FASTCALL vv_spawn(); extern void FASTCALL wn_clr(); extern void FASTCALL wn_free(); extern int FASTCALL wn_updrgn(); extern int FASTCALL wn_wr(); extern void FASTCALL _date_century(); extern void FASTCALL _db_dummy(); extern int FASTCALL _dt_frnums(); extern int FASTCALL _dt_tonums(); extern int FASTCALL _d_tonums(); extern int CDECL _evnt_get(); extern void FASTCALL _evnt_keyloop(); extern int CDECL _evnt_post(); extern int FASTCALL _evnt_send(); extern void FASTCALL _exit_sys(); extern void FASTCALL _exit_clip(); extern void FASTCALL _init_sys(); extern int FASTCALL _liberr(); extern int CDECL _mf_rowcmp(); extern MFLINEPTR FASTCALL _mf_rowdef(); extern int FASTCALL _mf_scrl(); extern void FASTCALL _ms_scrl(); extern WINDOWPTR FASTCALL nextfocus(); extern void FASTCALL _sw_inside(); extern int FASTCALL _shad_updn(); extern void FASTCALL _sw_sbauto(); extern int FASTCALL _t_tonums(); extern void CDECL _vcscpy(); extern int FASTCALL _vf_date(); extern int FASTCALL _vf_time(); extern void FASTCALL _v_stnop(); extern UCHAR * FASTCALL _v_strow(); extern int FASTCALL _wn_activate(); extern void FASTCALL _wn_childsplit(); extern int FASTCALL _wn_cpy(); extern int FASTCALL _wn_cpyrects(); extern int FASTCALL _wn_csr(); extern void FASTCALL _wn_dup(); extern int FASTCALL _wn_dupstruc(); extern void FASTCALL _wn_hideshow(); extern int FASTCALL _wn_init(); extern int FASTCALL _wn_proc(); extern int FASTCALL _wn_keyproc(); extern void FASTCALL _wn_lnk_unlnk(); extern int FASTCALL _wn_mfproc(); extern int FASTCALL _wn_msproc(); extern void FASTCALL _wn_rect(); extern void FASTCALL _wn_redraw(); extern void FASTCALL _wn_refresh(); extern void FASTCALL _wn_rgn_copy(); extern int FASTCALL _wn_rgnfit(); extern void FASTCALL _wn_sbauto(); extern int FASTCALL _wn_sdef(); extern short FASTCALL _wn_setup(); extern int FASTCALL _wn_splitrects(); extern int FASTCALL _wn_suspend(); extern int FASTCALL _wn_sure(); extern int FASTCALL _wn_wnproc(); extern void FASTCALL _wn_writerect(); /*Pointer variables */ EXTERN void (* NEAR _errfp)(); EXTERN ISVRP NEAR _abortfp; EXTERN void (* NEAR _finitfp)(); EXTERN void (* NEAR _fexitfp)(); EXTERN void (* NEAR _inittbl[])(); EXTERN void (* NEAR _exittbl[])(); EXTERN ISVRP _breakfp; EXTERN ISVRS _oldbreakfp; /*----------------------------------------------------------------------------*/ /* PCDOS specific functions */ /*----------------------------------------------------------------------------*/ extern void _abortsr(); extern void _breaksr(); extern unsigned long CDECL _biostickq(); extern int FASTCALL _chk_ega(); extern int FASTCALL _chk_ps2(); extern int FASTCALL _chk_xkb(); extern UCHAR CDECL _inb(); extern void FASTCALL _init_timer(); extern void FASTCALL _init_vert(); extern UINT CDECL _inw(); extern ISVRS CDECL _isr_rpl(); extern void CDECL _outb(); extern void CDECL _outw(); extern int CDECL _sys_int(); extern void FASTCALL _time_delay(); extern USHORT CDECL _timertickq(); #endif /*end of LINTARGS */ #ifdef __WATCOMC__ /*----------------------------------------------------------------------------*/ /* Watcom C pragmas */ /* These make the compiler to generate code to pass arguments on the stack */ /* using Microsoft C calling conventions. */ /*----------------------------------------------------------------------------*/ #ifdef __386__ #pragma aux MS_C "_*" \ parm caller [] \ value struct float struct routine [eax] \ modify [eax ebx ecx edx esi edi]; #else #pragma aux MS_C "_*" \ parm caller [] \ value struct float struct routine [ax] \ modify [ax bx cx dx es si di]; #endif #pragma aux (MS_C) _mou_hide; #pragma aux (MS_C) _mou_show; #pragma aux (MS_C) re_breakfp; #pragma aux (MS_C) v_printf; #pragma aux (MS_C) _vcscpy; #pragma aux (MS_C) _biostickq; #pragma aux (MS_C) _evnt_get; #pragma aux (MS_C) _evnt_post; #pragma aux (MS_C) _inb; #pragma aux (MS_C) _inw; #pragma aux (MS_C) _outb; #pragma aux (MS_C) _outw; #pragma aux (MS_C) _sys_int; #pragma aux (MS_C) _timertickq; #pragma aux (MS_C) _abortfp; #pragma aux (MS_C) _breakfp; #pragma aux (MS_C) _oldbreakfp; #pragma aux (MS_C) _abortsr; #pragma aux (MS_C) _breaksr; #endif #ifdef __HIGHC__ #pragma Alias(_abortsr, "__abortsr"); #pragma Alias(_bios_seg, "__bios_seg"); #pragma Alias(_biostickq, "__biostickq"); #pragma Alias(_breakfp, "__breakfp"); #pragma Alias(_breaksp, "__breaksp"); #pragma Alias(_breaksr, "__breaksr"); #pragma Alias(_evnt_get, "__evnt_get"); #pragma Alias(_evnt_post, "__evnt_post"); #pragma Alias(_evq_head, "__evq_head"); #pragma Alias(_evq_ins, "__evq_ins"); #pragma Alias(_evq_oflow, "__evq_oflow"); #pragma Alias(_evq_tail, "__evq_tail"); #pragma Alias(_inb, "__inb"); #pragma Alias(_inw, "__inw"); #pragma Alias(_outb, "__outb"); #pragma Alias(_outw, "__outw"); #pragma Alias(_mou_hide, "__mou_hide"); #pragma Alias(_mou_show, "__mou_show"); #pragma Alias(_sys_int, "__sys_int"); #pragma Alias(_timertickq, "__timertickq"); #pragma Alias(_timer_scale, "__timer_scale"); #pragma Alias(_vcscpy, "__vcscpy"); #pragma Alias(_vid_segs, "__vid_segs"); #pragma Alias(_v_retr, "__v_retr"); #endif #endif