NOTE: The following five files have been combined in this file: vv_des.h vv_main.h vv_form.h sfm_datap.c _lobjget.c Look for the CUT HERE comments to separate the files for use. Using the new header files rebuild the two c modules and replace them in your VV libraries to deal with compiling environments that want doubles to fall on eight bit boundaries. /* vv_des.h ************* Copyright 1989 by Vermont Creative Software ************** Description The header file enabling designer forms for a VV application */ /* Do not allow to process the file more than once */ #ifndef VV_DES #define VV_DES /******************************************************************************/ /* */ /* Include the subsidiary header files */ /* */ /******************************************************************************/ #ifndef VV_FORM #include #endif /******************************************************************************/ /* */ /* Preprocessor symbol definitions */ /* */ /******************************************************************************/ /* Sub menu flags for reading in all menus below a menu */ #define SUBMENUS 1 /*Read in all sub-menus below menu */ #define NOSUBMENUS 2 /*Read in only the desired menu */ /* Type of buffer to save string in */ #define PERM_STR 1 /*Permenant string to store */ #define TEMP_STR 2 /*Temporary string to store */ #define KEYWD_STR 3 /*Keyword to store */ /* Byte order indicators for _lrecrd() and _lrecwr() */ #define VVBOTHSWAP 0 #define VVBYTESWAP 1 #define VVWORDSWAP 2 #define VVNOSWAP 3 #define LENLIBNAME 255 #define LENFMFUNC 15 /*Length of functions */ #define LENLOGATTST 11 /*max length of logical att string */ #define ATTCLMSCOLQ LENLOGATTST + 5 /*no. cols in color choice list */ /*memory screen */ /*----------------------------------------------------------------------------*/ /* Definitions for the Logical Attribute Array used by VVD's users. */ /* This array parallels the default VV array for the first 28 positions */ /* (LDOS - LWHITE). The next QUSERATT positions are available for user */ /* defined logical attributes. We stick LOBJECTA and LREGION at the end of */ /* the array because they are VVD specific and are *never* saved in a form */ /* library. Also, having them at the end makes the code for editing the */ /* logical attribute table *much* simpler. */ /*----------------------------------------------------------------------------*/ #define QUSRLATT 74 /*number of user defined attributes */ #define QSYSLATT 26 /*number of system attributes */ #define L_FIRSTUSRLATT QSYSLATT /*first user defined logical attribute*/ #define LOBJECTA (L_FIRSTUSRLATT + QUSRLATT) #define LREGION (L_FIRSTUSRLATT + QUSRLATT + 1) #define QVVDLATT (QSYSLATT + QUSRLATT + 2) /*total number of */ /*attributes that can be */ /*used on a form - */ /*includes LOBJECTA and */ /*LREGION */ #define LIBFILE DLIB #define LIBFILEP DLIBPTR /******************************************************************************/ /* */ /* Data structure definitions */ /* */ /******************************************************************************/ typedef struct /*VV FUNCTION LIST STRUCTURE */ { UCHAR *func_name; /*function name string in VVD form */ PFI ptr_func; /*pointer to function to call */ } FUNCLIS, *FUNCLISPTR; typedef struct /*VVD SUBFORM RESOLVING INFORMATION */ { UCHAR *fmname; /*Pointer to name of sub-form */ PTR dstructp; /*Pointer to underlying data struct */ FUNCLISPTR funclistp; /*Pointer to function list */ MFILEPTR clist_mfp; /*Pointer to choice list memory file */ } DFMINFO, *DFMINFOPTR; typedef struct /*LOGICAL ATTRIBUTE STRUCTURE */ { UCHAR mono_patt[QVVDLATT]; UCHAR color_patt[QVVDLATT]; UCHAR attname[QUSRLATT][LENLOGATTST + 1]; } LOGATT, *LOGATTP; typedef struct _ilib_struct { struct _ilib_struct *prev_ndp; /*pointer to previous DLIB in list */ struct _ilib_struct *next_ndp; /*pointer to next DLIB in list */ short type; /*used to indicate head of list */ UCHAR *name; /*name of library */ FILE *fp; /*stream FILE pointer */ UINT flags; /*library flags */ short count; /*number of forms using this library */ LOGATTP attdefp; /*pointer to logical attribute */ /*definition structure */ long next_dirrec; /*for use ONLY by _ldirrdfirst() and */ /*_ldirrdnext() routines */ } DLIB, *DLIBPTR; typedef struct _ilib_att { short count; /*number of forms using this library */ UCHAR latt[QVVDLATT]; /*logical attribute array */ UCHAR name[LENLIBNAME+1]; /*name of library */ DLIBPTR libp; /*pointer to DLIB struct for this lib */ } LIBATT, *LIBATTPTR; struct struct1 /*Test structure - chars only */ { char charx; char chary[2]; }; struct struct2 /*Test structure - shorts and smaller */ { char charx; short shortx; }; struct struct4 /*Test structure - larger than shorts */ { char charx; long longx; }; struct struct5 { char charx; double doublex; }; typedef struct /*Structure for alignment offsets */ { char charc; char testc; long dummy1; char chara; char testa[2]; long dummy2; char chars; short tests; long dummy3; char chari; int testi; long dummy4; char charl; long testl; float dummy5; char charf; float testf; double dummy6; char chard; double testd; long dummy7; char char1; struct struct1 test1; long dummy8; char char2; struct struct2 test2; long dummy9; char char4; struct struct4 test4; double dumm10; char char5; struct struct5 test5; } ALIGN, *ALIGNPTR; /******************************************************************************/ /* */ /* Function-like macros */ /* */ /******************************************************************************/ /* Accessing current field and form */ #define fm_nextfmname(p) ((p)->next_fmstr) #define fm_prevfmname(p) ((p)->prev_fmstr) /* Setting global variable that controls whether libraries are locked */ #define se_dllocking(p) ( _dllocking = (p)) /******************************************************************************/ /* */ /* Function prototypes and externals */ /* */ /******************************************************************************/ EXTERN int _maxrgconv; /*Maximum size for range conv. buffer */ EXTERN int _lswap; /*Indicates whether to swap bytes when*/ /*reading shorts or longs from library*/ EXTERN UCHAR _align_offset[]; /*Data structure alignment offset */ EXTERN UCHAR *_temp_strp; /*Temporary string buffer pointer */ EXTERN UCHAR *_perm_strp; /*Permanent string buffer pointer */ EXTERN NODEPTR _liblathdndp; /*Header of linked list of logical att*/ EXTERN UCHAR *_deflibname; /*Lib log. attr. for default windows */ EXTERN int _dllocking; /*Controls library locking */ #ifdef LINT_ARGS PROTOTYPE int FASTCALL dl_close(DLIBPTR); PROTOTYPE DFORMPTR FASTCALL dl_fmget(UCHAR *, PTR, FUNCLISPTR, MFILEPTR, DLIBPTR); PROTOTYPE MFORMPTR FASTCALL dl_mnget(UCHAR *, int, FUNCLISPTR, DFMINFOPTR, DLIBPTR); PROTOTYPE DLIBPTR FASTCALL dl_open(UCHAR *); PROTOTYPE int FASTCALL sdl_lock(int, DLIBPTR); PROTOTYPE void FASTCALL se_wnlatt(UCHAR *); PROTOTYPE void FASTCALL sfm_datap(PTR, DFORMPTR); PROTOTYPE void FASTCALL sfm_funclist(FUNCLISPTR, FORMPTR); PROTOTYPE void FASTCALL sfm_latt(UCHAR *, FORMPTR); PROTOTYPE void FASTCALL sfm_mfclist(MFILEPTR, DFORMPTR); PROTOTYPE void FASTCALL sf_datap(UCHAR *, PTR, DFORMPTR); PROTOTYPE int FASTCALL sf_mfclist(UCHAR *, MFILEPTR, DFORMPTR); PROTOTYPE void FASTCALL smnf_subfmp(UCHAR *, FORMPTR, MFORMPTR); PROTOTYPE void FASTCALL ssr_datap(UCHAR *, PTR, DFORMPTR); PROTOTYPE DFORMPTR FASTCALL _findfm(UCHAR *, DFMINFOPTR, DLIBPTR); PROTOTYPE int FASTCALL _funcnum(UCHAR *, FUNCLISPTR); PROTOTYPE void FASTCALL _init_align(void); PROTOTYPE void FASTCALL _init_des(void); PROTOTYPE void FASTCALL _itemlatt(FORMPTR); PROTOTYPE FORMPTR FASTCALL _lfmget(UCHAR *, int, DLIBPTR); PROTOTYPE int FASTCALL _lobjget(FORMPTR, DLIBPTR, int *, int *); PROTOTYPE short FASTCALL _lswapshort(short); PROTOTYPE long FASTCALL _lswaplong(long); PROTOTYPE UCHAR * FASTCALL _save_str(int, UCHAR *); PROTOTYPE void FASTCALL _srdatap(SRPTR); #else extern int FASTCALL dl_close(); extern DFORMPTR FASTCALL dl_fmget(); extern MFORMPTR FASTCALL dl_mnget(); extern DLIBPTR FASTCALL dl_open(); extern int FASTCALL sdl_lock(); extern void FASTCALL se_wnlatt(); extern void FASTCALL sfm_datap(); extern void FASTCALL sfm_funclist(); extern void FASTCALL sfm_latt(); extern void FASTCALL sfm_mfclist(); extern void FASTCALL sf_datap(); extern int FASTCALL sf_mfclist(); extern void FASTCALL smnf_subfmp(); extern void FASTCALL ssr_datap(); extern DFORMPTR FASTCALL _findfm(); extern int FASTCALL _funcnum(); extern void FASTCALL _init_align(); extern void FASTCALL _init_des(); extern void FASTCALL _itemlatt(); extern FORMPTR FASTCALL _lfmget(); extern int FASTCALL _lobjget(); extern short FASTCALL _lswapshort(); extern long FASTCALL _lswaplong(); extern UCHAR * FASTCALL _save_str(); extern void FASTCALL _srdatap(); #endif #endif **************** CUT HERE ******************* /* vv_main.h ************* Copyright 1988 by Vermont Creative Software ************** Description The header file with global declarations to be included in the main module. */ /* Do not allow to process the file more than once */ #ifndef VV_MAIN #define VV_MAIN /* Include the system header file */ #ifndef VV_SYS #include #endif /* Include the error reporting system if appropriate */ #ifndef NO_DEBUG_CODE #ifndef VV_ERRF #include #endif #endif /* Check if librarian file included so tables are alright */ #ifdef VV_DES #ifndef VV_LIB #include #endif #endif /******************************************************************************/ /* */ /* Video Attributes Definitions */ /* */ /******************************************************************************/ #ifdef VV_PATT /*if physical attributes in use */ GLOBAL int _lattsw = OFF; GLOBAL UCHAR _latt[1]; GLOBAL UCHAR _att_tbl[1][PATTQ]; GLOBAL int _attrowq = 1; GLOBAL int _attcolq = 1; #else /*logical attributes in use */ GLOBAL int _lattsw = ON; /*"logical attributes in use" flag */ GLOBAL UCHAR _latt[LATTQ]; /*array of logical attributes */ GLOBAL UCHAR _att_tbl[LATTQ][PATTQ] = { #if SCO_UNIX {NORMAL, COLOR9, /*LSYS */ MMNORMAL, catt_def(MMWHITE, MMBLACK)}, {NORMAL, COLOR10, /*LNORMAL */ MMNORMAL, catt_def(MMWHITE, MMBLUE)}, {REVERSE, COLOR11, /*LREVERSE */ MMREVERSE, catt_def(MMBLUE, MMWHITE)}, {HIGH_INT, COLOR12, /*LHIGHLITE*/ MMNORMAL | MMHIGH_INT, catt_def(MMWHITE | MMLIGHT, MMBLUE)}, {BLINK, COLOR13, /*LURGENT */ MMNORMAL | MMHIGH_INT | MMBLINK, catt_def(MMRED | MMBLINK, MMBLACK)}, {HIGH_INT, COLOR11, /*LHELP */ MMNORMAL | MMHIGH_INT, catt_def(MMBLUE, MMWHITE)}, {REVERSE, COLOR14, /*LERROR */ MMREVERSE, catt_def(MMRED, MMBLACK)}, {HIGH_INT, COLOR12, /*LMESSAGE */ MMNORMAL | MMHIGH_INT, catt_def(MMWHITE | MMLIGHT, MMBLUE)}, {HIGH_INT, COLOR15, /*LFLDINACT*/ MMNORMAL | MMHIGH_INT, catt_def(MMCYAN, MMBLUE)}, {REVERSE, COLOR16, /*LFLDACT */ MMREVERSE, catt_def(MMBLACK, MMCYAN)}, {NORMAL, COLOR15, /*LFLDSKIP */ MMNORMAL, catt_def(MMBLACK, MMWHITE)}, {HIGH_INT, COLOR15, /*LMNINACT */ MMNORMAL | MMHIGH_INT, catt_def(MMCYAN, MMBLUE)}, {REVERSE, COLOR16, /*LMNACT */ MMREVERSE, catt_def(MMBLACK, MMCYAN)}, {NORMAL, COLOR15, /*LMNUNAVAIL*/ MMNORMAL, catt_def(MMBLACK, MMWHITE)}, {REVERSE, COLOR16, /*LMSELCH */ MMREVERSE, catt_def(MMBLACK, MMCYAN)}, {HIGH_INT, COLOR12, /*LCLINACT */ MMNORMAL | MMHIGH_INT, catt_def(MMBLACK, MMGREEN)}, {REVERSE, COLOR11, /*LCLACT */ MMREVERSE, catt_def(MMGREEN, MMBLACK)}, {REVERSE, COLOR11, /*LMARK */ MMREVERSE, catt_def(MMBLUE, MMWHITE)}, {INVISIBLE, INVISIBLE, /*LNODISPLA*/ 0, catt_def(MMBLUE, MMBLUE)}, {REVERSE, COLOR9, /*LARROW */ MMREVERSE, catt_def(MMWHITE, MMBLACK)}, {NORMAL, COLOR10, /*LCORNER */ MMNORMAL, catt_def(MMWHITE, MMBLUE)}, {REVERSE, COLOR9, /*LPAGERGN */ MMNORMAL, catt_def(MMWHITE, MMBLACK)}, {NORMAL, COLOR15, /*LTHUMB */ MMREVERSE, catt_def(MMBLACK, MMWHITE)}, {NORMAL, COLOR9, /*LSHADOW */ MMNORMAL, catt_def(MMWHITE, MMBLACK)}, {REVERSE, COLOR5, /*LDEBUG */ MMREVERSE, catt_def(MMLIGHT | MMWHITE, MMRED)}, {HIGH_INT, COLOR1, /*LDEBUGMSG*/ MMNORMAL | MMHIGH_INT, catt_def(MMRED, MMWHITE)}, {REVERSE, COLOR1, /*LBLACK */ MMREVERSE, catt_def(MMBLACK, MMBLUE)}, {REVERSE, COLOR2, /*LBLUE */ MMREVERSE, catt_def(MMBLUE, MMWHITE)}, {NORMAL, COLOR3, /*LGREEN */ MMNORMAL, catt_def(MMGREEN, MMBLUE)}, {NORMAL, COLOR4, /*LCYAN */ MMNORMAL, catt_def(MMCYAN, MMBLUE)}, {REVERSE, COLOR5, /*LRED */ MMREVERSE, catt_def(MMRED, MMBLUE)}, {REVERSE, COLOR6, /*LMAGENTA */ MMREVERSE, catt_def(MMMAGENTA, MMBLUE)}, {NORMAL, COLOR7, /*LBROWN */ MMNORMAL, catt_def(MMBROWN, MMBLUE)}, {NORMAL, COLOR8, /*LWHITE */ MMNORMAL, catt_def(MMWHITE, MMBLUE)}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} #else {NORMAL, COLOR9}, /*LSYS */ {NORMAL, COLOR10}, /*LNORMAL */ {REVERSE, COLOR11}, /*LREVERSE */ {HIGH_INT, COLOR12}, /*LHIGHLITE*/ {BLINK, COLOR13}, /*LURGENT */ {HIGH_INT, COLOR11}, /*LHELP */ {REVERSE, COLOR14}, /*LERROR */ {HIGH_INT, COLOR12}, /*LMESSAGE */ {HIGH_INT, COLOR15}, /*LFLDINACT*/ {REVERSE, COLOR16}, /*LFLDACT */ {NORMAL, COLOR15}, /*LFLDSKIP */ {HIGH_INT, COLOR15}, /*LMNINACT */ {REVERSE, COLOR16}, /*LMNACT */ {NORMAL, COLOR15}, /*LMNUNAVAIL*/ {REVERSE, COLOR16}, /*LMNSELCH */ {HIGH_INT, COLOR12}, /*LCLINACT */ {REVERSE, COLOR11}, /*LCLACT */ {REVERSE, COLOR11}, /*LMARK */ {INVISIBLE, INVISIBLE}, /*LNODISPLA*/ {REVERSE, COLOR9}, /*LARROW */ {NORMAL, COLOR10}, /*LCORNER */ {REVERSE, COLOR9}, /*LPAGERGN */ {NORMAL, COLOR15}, /*LTHUMB */ {NORMAL, COLOR9}, /*LSHADOW */ {REVERSE, COLOR5}, /*LDEBUG */ {HIGH_INT, COLOR1}, /*LDEBUGMSG*/ {REVERSE, COLOR1}, /*LBLACK */ {REVERSE, COLOR2}, /*LBLUE */ {NORMAL, COLOR3}, /*LGREEN */ {NORMAL, COLOR4}, /*LCYAN */ {REVERSE, COLOR5}, /*LRED */ {REVERSE, COLOR6}, /*LMAGENTA */ {NORMAL, COLOR7}, /*LBROWN */ {NORMAL, COLOR8}, /*LWHITE */ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} #endif }; GLOBAL int _attrowq = LATTQ; /*number of rows in attribute table */ GLOBAL int _attcolq = PATTQ; /*number of columns in attribute table*/ #endif /*end of the video attributes */ /******************************************************************************/ /* */ /* Key Tables */ /* */ /******************************************************************************/ #ifdef VV_KEY GLOBAL KT _syskt[] = /*System (User) Key Table */ { {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_WNKT GLOBAL KT _viewkt[] = /*View System Key Table */ { {KEY_LEFT, (KEYFP)kv_lft}, /*cursor left */ {KEY_RIGHT, (KEYFP)kv_rt}, /*cursor right */ {KEY_UP, (KEYFP)kv_up}, /*cursor up */ {KEY_DN, (KEYFP)kv_dn}, /*cursor down */ {KEY_PGUP, (KEYFP)kv_pgup}, /*cursor page up */ {KEY_PGDN, (KEYFP)kv_pgdn}, /*cursor page down */ {KEY_HOME, (KEYFP)kv_home}, /*cursor home */ {KEY_END, (KEYFP)kv_end}, /*cursor end */ {KEY_F10, (KEYFP)k_exit}, /*exit */ {KEY_ESC, (KEYFP)k_quit}, /*quit */ {KT_DEFAULT, (KEYFP)k_beep}, /*beep otherwise */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_HELP GLOBAL KT _helpkt[] = /*Help System Key Table */ { {KEY_LEFT, (KEYFP)kv_lft}, /*cursor left */ {KEY_RIGHT, (KEYFP)kv_rt}, /*cursor right */ {KEY_UP, (KEYFP)kv_up}, /*cursor up */ {KEY_DN, (KEYFP)kv_dn}, /*cursor down */ {KEY_PGUP, (KEYFP)kv_pgup}, /*cursor page up */ {KEY_PGDN, (KEYFP)kv_pgdn}, /*cursor page down */ {KEY_HOME, (KEYFP)kv_home}, /*cursor home */ {KEY_END, (KEYFP)kv_end}, /*cursor end */ {KEY_ESC, (KEYFP)k_exit}, /*exit help level */ {KEY_ENTER, (KEYFP)k_exit}, /*exit help level */ {KEY_F1, (KEYFP)kh_help}, /*next help level */ {KEY_AF1, (KEYFP)kh_zoom}, /*zoom help window */ {KT_DEFAULT, (KEYFP)k_beep}, /*beep otherwise */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_WNKT GLOBAL KT _dragkt[] = /*Draw & Drag Key Table */ { {KEY_LEFT, (KEYFP)k_lft}, /*left */ {KEY_RIGHT, (KEYFP)k_rt}, /*right */ {KEY_UP, (KEYFP)k_up}, /*up */ {KEY_DN, (KEYFP)k_dn}, /*down */ {KEY_F10, (KEYFP)k_exit}, /*exit */ {KEY_ESC, (KEYFP)k_quit}, /*quit */ {KT_DEFAULT, (KEYFP)k_beep}, /*beep otherwise */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_CLIST GLOBAL KT _clistkt[] = /*Choice Lists Key Table */ { #ifdef VV_HELP {KEY_F1, (KEYFP)kc_help}, /*help */ #endif {KEY_UP, (KEYFP)kv_up}, /*item up */ {KEY_DN, (KEYFP)kv_dn}, /*item down */ {KEY_PGUP, (KEYFP)kv_pgup}, /*page up */ {KEY_PGDN, (KEYFP)kv_pgdn}, /*page down */ {KEY_HOME, (KEYFP)kv_home}, /*home */ {KEY_END, (KEYFP)kv_end}, /*end */ {KEY_ENTER, (KEYFP)k_exit}, /*select */ {KEY_ESC, (KEYFP)k_quit}, /*quit */ {KT_DEFAULT, (KEYFP)kc_chproc}, /*first character selection */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_FIELD GLOBAL KT _formkt[] = /*Form Editor Key Definition Table */ { #ifdef VV_HELP {KEY_F1, (KEYFP)kd_help}, /*help key */ #endif #ifdef VV_CLIST {KEY_F2, (KEYFP)kd_clist}, /*choice list key */ #endif {KEY_SF3, (KEYFP)kd_undofld}, /*restore field to original value */ {KEY_F6, (KEYFP)kd_clrfld}, /*clear field */ {KEY_SF6, (KEYFP)kd_clreofld}, /*clear to end of field */ {KEY_F7, (KEYFP)kd_previtem}, /*previous item key */ {KEY_SF7, (KEYFP)kd_prevfm}, /*previous form key */ {KEY_F8, (KEYFP)kd_nextitem}, /*next item key */ {KEY_SF8, (KEYFP)kd_nextfm}, /*next form key */ {KEY_F10, (KEYFP)k_exit}, /*exit data form key */ {KEY_HOME, (KEYFP)kd_begfld}, /*begin field */ {KEY_CHOME, (KEYFP)kd_firstitem}, /*go to first form item */ {KEY_END, (KEYFP)kd_endfld}, /*end field */ {KEY_CEND, (KEYFP)kd_lastitem}, /*go to last form item */ {KEY_LEFT, (KEYFP)kd_lftcsr}, /*left arrow key */ {KEY_RIGHT, (KEYFP)kd_rtcsr}, /*right arrow key */ {KEY_UP, (KEYFP)kd_upitem}, /*up arrow key */ {KEY_DN, (KEYFP)kd_dnitem}, /*down arrow key */ {KEY_ESC, (KEYFP)k_quit}, /*quit data form key */ {KEY_ENTER, (KEYFP)kd_nextitem}, /*next field key */ {KEY_INS, (KEYFP)kd_instoggle}, /*insert mode key */ {KEY_DEL, (KEYFP)kd_chdel}, /*delete key */ {KEY_BACK, (KEYFP)kd_backsp}, /*backspace key */ #ifdef VV_BOOL {KEY_SPACE, (KEYFP)kd_booltoggle}, /*boolean toggle key */ #endif {KEY_TAB, (KEYFP)kd_nextitem}, /*next item key */ {KEY_STAB, (KEYFP)kd_previtem}, /*previous item key */ {KT_DEFAULT, (KEYFP)kd_chproc}, /*print keystroke in field */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_MENU GLOBAL KT _menukt[] = /*Menu System Key Definition Table */ { #ifdef VV_HELP {KEY_F1, (KEYFP)kd_help}, /*help key */ #endif {KEY_CHOME, (KEYFP)kd_firstitem}, /*go to first menu item */ {KEY_CEND, (KEYFP)kd_lastitem}, /*go to last menu item */ {KEY_LEFT, (KEYFP)km_lft}, /*left arrow key */ {KEY_RIGHT, (KEYFP)km_rt}, /*right arrow key */ {KEY_UP, (KEYFP)kd_upitem}, /*up arrow key */ {KEY_DN, (KEYFP)kd_dnitem}, /*down arrow key */ {KEY_ESC, (KEYFP)km_esc}, /*escape key */ {KEY_ENTER, (KEYFP)km_select}, /*enter key */ {KT_DEFAULT, (KEYFP)km_chproc}, /*possible first character for item */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_SR GLOBAL KT _srkt[] = /*Scrollable Region Key Table */ { #ifdef VV_HELP {KEY_F1, (KEYFP)kd_help}, /*help key */ #endif #ifdef VV_CLIST {KEY_F2, (KEYFP)kd_clist}, /*choice list key */ #endif {KEY_SF3, (KEYFP)kd_undofld}, /*restore field to original value */ {KEY_F6, (KEYFP)kd_clrfld}, /*clear field */ {KEY_SF6, (KEYFP)kd_clreofld}, /*clear to end of field */ {KEY_F7, (KEYFP)kd_previtem}, /*previous item key */ {KEY_SF7, (KEYFP)kd_prevfm}, /*previous form key */ {KEY_F8, (KEYFP)kd_nextitem}, /*next item key */ {KEY_SF8, (KEYFP)kd_nextfm}, /*next form key */ {KEY_F10, (KEYFP)k_exit}, /*exit data form key */ {KEY_HOME, (KEYFP)ks_home}, /*scrollable region home */ {KEY_CHOME, (KEYFP)kd_firstitem}, /*go to first form item */ {KEY_END, (KEYFP)ks_end}, /*scrollable region end */ {KEY_CEND, (KEYFP)kd_lastitem}, /*go to last form item */ {KEY_PGUP, (KEYFP)ks_pgup}, /*page up */ {KEY_PGDN, (KEYFP)ks_pgdn}, /*page down */ {KEY_LEFT, (KEYFP)kd_lftcsr}, /*left arrow key */ {KEY_RIGHT, (KEYFP)kd_rtcsr}, /*right arrow key */ {KEY_UP, (KEYFP)ks_up}, /*up arrow key */ {KEY_DN, (KEYFP)ks_dn}, /*down arrow key */ {KEY_ESC, (KEYFP)k_quit}, /*quit data form key */ {KEY_ENTER, (KEYFP)kd_next}, /*next field key */ {KEY_INS, (KEYFP)kd_instoggle}, /*insert mode key */ {KEY_DEL, (KEYFP)kd_chdel}, /*delete key */ {KEY_BACK, (KEYFP)kd_backsp}, /*backspace key */ #ifdef VV_BOOL {KEY_SPACE, (KEYFP)kd_booltoggle}, /*boolean toggle key */ #endif {KEY_TAB, (KEYFP)kd_next}, /*next scrollable field key */ {KEY_STAB, (KEYFP)kd_prev}, /*previous scrollable field key */ {KT_DEFAULT, (KEYFP)kd_chproc}, /*print keystroke in field */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_MEMO GLOBAL KT _memokt[] = /*Memo Editor Key Definition Table */ { #ifdef VV_HELP {KEY_F1, (KEYFP)kd_help}, /*help key */ #endif {KEY_SF3, (KEYFP)ke_undofld}, /*restore field to original value */ {KEY_F4, (KEYFP)ke_reflow}, /*paragraph reflow */ {KEY_SF4, (KEYFP)ke_rowjoin}, /*row join */ {KEY_F5, (KEYFP)ke_rowins}, /*insert a row */ {KEY_F6, (KEYFP)ke_rowdel}, /*delete a row */ {KEY_SF6, (KEYFP)ke_deleorow}, /*delete to end of row */ {KEY_CF6, (KEYFP)ke_worddel}, /*delete to end of word */ {KEY_F7, (KEYFP)kd_previtem}, /*previous item key */ {KEY_SF7, (KEYFP)kd_prevfm}, /*previous form key */ {KEY_F8, (KEYFP)kd_nextitem}, /*next item key */ {KEY_SF8, (KEYFP)kd_nextfm}, /*next form key */ {KEY_F10, (KEYFP)k_exit}, /*exit data form key */ {KEY_HOME, (KEYFP)ke_rowbeg}, /*beginning of line, window and data */ {KEY_CHOME, (KEYFP)kd_firstitem}, /*go to first form item */ {KEY_END, (KEYFP)ke_txtend}, /*go to end of text */ {KEY_CEND, (KEYFP)kd_lastitem}, /*go to last form item */ {KEY_PGUP, (KEYFP)ke_pgup}, /*page up */ {KEY_CPGUP, (KEYFP)ke_memobeg}, /*go to beginning of memo */ {KEY_PGDN, (KEYFP)ke_pgdn}, /*page down */ {KEY_CPGDN, (KEYFP)ke_memoend}, /*go to end of memo */ {KEY_LEFT, (KEYFP)ke_lft}, /*move the cursor to the left */ {KEY_CLEFT, (KEYFP)ke_wordprev}, /*go to previous word */ {KEY_RIGHT, (KEYFP)ke_rt}, /*move the cursor to the right */ {KEY_CRIGHT, (KEYFP)ke_wordnext}, /*go to next word */ {KEY_UP, (KEYFP)ke_up}, /*move up one row */ {KEY_DN, (KEYFP)ke_dn}, /*move down one row */ {KEY_ESC, (KEYFP)k_quit}, /*abort data form key */ {KEY_ENTER, (KEYFP)ke_rowsplit}, /*split line key */ {KEY_INS, (KEYFP)kd_instoggle}, /*insert mode key */ {KEY_DEL, (KEYFP)ke_chdel}, /*delete key */ {KEY_BACK, (KEYFP)ke_backsp}, /*backspace key */ {KEY_TAB, (KEYFP)kd_nextitem}, /*next item key */ {KEY_STAB, (KEYFP)kd_previtem}, /*previous item key */ {KT_DEFAULT, (KEYFP)ke_chproc}, /*print keystroke in field */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; GLOBAL KT _ttmemokt[] = /*Ticker Tape Memo Field Key Table */ { #ifdef VV_HELP {KEY_F1, (KEYFP)kd_help}, /*help key */ #endif {KEY_SF3, (KEYFP)ke_undofld}, /*restore field to original value */ {KEY_F6, (KEYFP)ke_rowdel}, /*delete row */ {KEY_SF6, (KEYFP)ke_deleorow}, /*delete to end of row */ {KEY_CF6, (KEYFP)ke_worddel}, /*delete to end of word */ {KEY_F7, (KEYFP)kd_previtem}, /*previous item key */ {KEY_SF7, (KEYFP)kd_prevfm}, /*previous form key */ {KEY_F8, (KEYFP)kd_nextitem}, /*next item key */ {KEY_SF8, (KEYFP)kd_nextfm}, /*next form key */ {KEY_F10, (KEYFP)k_exit}, /*exit data form key */ {KEY_HOME, (KEYFP)ke_rowbeg}, /*beginning of line */ {KEY_CHOME, (KEYFP)kd_firstitem}, /*go to first form item */ {KEY_END, (KEYFP)ke_txtend}, /*go to end of text */ {KEY_CEND, (KEYFP)kd_lastitem}, /*go to last form item */ {KEY_LEFT, (KEYFP)ke_lft}, /*move the cursor to the left */ {KEY_CLEFT, (KEYFP)ke_wordprev}, /*go to previous word */ {KEY_RIGHT, (KEYFP)ke_rt}, /*move the cursor to the right */ {KEY_CRIGHT, (KEYFP)ke_wordnext}, /*go to next word */ {KEY_UP, (KEYFP)kd_upitem}, /*up arrow key */ {KEY_DN, (KEYFP)kd_dnitem}, /*down arrow key */ {KEY_ESC, (KEYFP)k_quit}, /*abort data form key */ {KEY_ENTER, (KEYFP)kd_nextitem}, /*move to next item */ {KEY_INS, (KEYFP)kd_instoggle}, /*insert mode key */ {KEY_DEL, (KEYFP)ke_chdel}, /*delete key */ {KEY_BACK, (KEYFP)ke_backsp}, /*backspace key */ {KEY_TAB, (KEYFP)kd_nextitem}, /*move to next item */ {KEY_STAB, (KEYFP)kd_previtem}, /*move to previous item */ {KT_DEFAULT, (KEYFP)ke_chproc}, /*print keystroke in field */ {0, (KEYFP)NULLFP}, {0, (KEYFP)NULLFP}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_DEBUG GLOBAL KT _dbkt[] = /*Debugging System Key Table */ { {KEY_LEFT, (KEYFP)kv_lft}, {KEY_RIGHT, (KEYFP)kv_rt}, {KEY_UP, (KEYFP)kv_up}, {KEY_DN, (KEYFP)kv_dn}, {KEY_PGUP, (KEYFP)kv_pgup}, {KEY_PGDN, (KEYFP)kv_pgdn}, {KEY_HOME, (KEYFP)kv_home}, {KEY_END, (KEYFP)kv_end}, {KEY_ESC, (KEYFP)k_exit}, {KT_DEFAULT, (KEYFP)k_beep}, {KT_END, (KEYFP)NULLFP} /*end of table marker */ }; #endif #ifdef VV_KEY GLOBAL KTPTR _ktptbl[] = /*Table of Key Tables */ { _syskt, /*system key table */ #ifdef VV_WNKT _viewkt, /*view system key table */ #else (KTPTR)NULLP, #endif #ifdef VV_HELP _helpkt, /*help system key table */ #else (KTPTR)NULLP, #endif #ifdef VV_WNKT _dragkt, /*drag key table */ #else (KTPTR)NULLP, #endif #ifdef VV_CLIST _clistkt, /*choice list key table */ #else (KTPTR)NULLP, #endif #ifdef VV_FIELD _formkt, /*form editor key table */ #else (KTPTR)NULLP, #endif #ifdef VV_MENU _menukt, /*menu system key table */ #else (KTPTR)NULLP, #endif #ifdef VV_SR _srkt, /*scrollable region editor key table */ #else (KTPTR)NULLP, #endif #ifdef VV_MEMO _memokt, /*memo editor key table */ _ttmemokt /*ticker tape memo key table */ #else (KTPTR)NULLP, (KTPTR)NULLP #endif }; #endif /******************************************************************************/ /* */ /* Field type specific information table */ /* */ /******************************************************************************/ #ifdef VV_FORM #ifndef NO_DEBUG_CODE #define PICVALFP pic_val #else #define PICVALFP NULLFP #endif GLOBAL FLDTYPE _fldinfo[] = { #ifdef VV_BOOL /*BOOLEAN field */ { FIELDTAG, dc_tobool, dc_frbool, vf_bool, PICVALFP, OFF_CHAR, sizeof(UCHAR), 0, 0, 0L, (UCHAR *) "XA!Z", NULLFP, ALLOW_PROT_CH }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_CHAR, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_CHAR /*CHARACTER field */ { FIELDTAG, dc_toch, dc_frch, vf_ch, PICVALFP, OFF_CHAR, sizeof(UCHAR), 0, sizeof(RGCH), 0L, (UCHAR *) "XA9#!@ZU", rgset, ALLOW_PROT_CH | ALLOW_DECIMAL }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_CHAR, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_STR /*STRING field */ { FIELDTAG, dc_tost, dc_frst, vf_st, PICVALFP, OFF_STRING, 0, 0, sizeof(RGST), 0L, (UCHAR *) "XA9#!@ZU", rgset_st, ALLOW_PROT_CH | ALLOW_DECIMAL | ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_DATE /*DATE field */ { FIELDTAG, dc_todate, dc_frdate, vf_date, PICVALFP, OFF_STRING, 0, 0, sizeof(RGLONG), TRAILBLANKS, (UCHAR *) "9UA!X", rgset_date, ALLOW_PROT_CH | ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_TIME /*TIME field */ { FIELDTAG, dc_totime, dc_frtime, vf_time, PICVALFP, OFF_STRING, 0, 0, sizeof(RGLONG), TRAILBLANKS, (UCHAR *) "9UA!X", rgset_time, ALLOW_PROT_CH | ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_SHORT /*SHORT INTEGER field */ { FIELDTAG, dc_toshort, dc_frshort, vf_short, PICVALFP, OFF_SHORT, sizeof(short), 6,sizeof(RGSHORT), CLEARONKEY | RTADJUST, (UCHAR *) "9U", rgset, ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_SHORT, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_INT /*INTEGER field */ { FIELDTAG, dc_toint, dc_frint, vf_int, PICVALFP, OFF_INT, sizeof(int), 11, sizeof(RGINT), CLEARONKEY | RTADJUST, (UCHAR *) "9U", rgset, ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_INT, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_LONG /*LONG INTEGER field */ { FIELDTAG, dc_tolong, dc_frlong, vf_long, PICVALFP, OFF_LONG, sizeof(long), 11, sizeof(RGLONG), CLEARONKEY | RTADJUST, (UCHAR *) "9U", rgset, ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_LONG, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_DEC /*DECIMAL field */ { FIELDTAG, dc_todec, dc_frdec, vf_dec, PICVALFP, OFF_LONG, sizeof(long), 24, sizeof(RGLONG), CLEARONKEY | RTADJUST, (UCHAR *) "9#@U", rgset, ALLOW_DECIMAL | ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_LONG, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_FLOAT /*FLOATING POINT field */ { FIELDTAG, dc_tofloat, dc_frfloat, vf_float, PICVALFP, OFF_DOUBLE, sizeof(double), 32, sizeof(RGFLOAT), CLEARONKEY | RTADJUST, (UCHAR *) "9#@U", rgset, ALLOW_DECIMAL | ALLOW_E | ALLOW_MULT_PICSYM }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_DOUBLE, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_MEMO /*MEMO field */ { FIELDTAG, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif #ifdef VV_MENU /*MENU field */ { FIELDTAG, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #else { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, #endif { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 }, { 0, NULLFP, NULLFP, NULLFP, NULLFP, OFF_STRING, 0, 0, 0, 0L, (UCHAR *)NULLP, NULLFP, 0 } }; /******************************************************************************/ /* */ /* Field picture symbol (character validation) table */ /* */ /******************************************************************************/ /* The order of this array must conform to the picture symbol type #defines */ GLOBAL DPICDEF _dpictbl[] = { {'X', vc_ascii}, /*any ascii character */ {'A', vc_alpha}, /*any alpha character */ {'9', vc_digit}, /*any digit 0-9, +, - */ {'#', vc_num}, /*any number 0-9, +, -, ., E */ {'!', vc_toupper}, /*convert any ascii to uppercase */ {'@', vc_num}, /*soft decimal point */ {'Z', vc_anych}, /*any character that can be generated */ {'U', vc_unsigned}, /*any digit 0-9 (no sign allowed) */ { 0 , NULLFP}, { 0 , NULLFP}, {KT_END, NULLFP} /*end of table marker */ }; #endif /******************************************************************************/ /* */ /* Extended Character Set Support */ /* */ /******************************************************************************/ #ifdef VV_EXTCH GLOBAL int _chsetext = ON; /*turn on extended character set */ GLOBAL CHEXT _chsettbl[] = /*case conversion table for codes: */ { {135, CH_ALPHA | CH_UPPER}, /*128 */ {154, CH_ALPHA | CH_LOWER}, /*129 */ {144, CH_ALPHA | CH_LOWER}, /*130 */ {'A', CH_ALPHA | CH_LOWER}, /*131 */ {142, CH_ALPHA | CH_LOWER}, /*132 */ {'A', CH_ALPHA | CH_LOWER}, /*133 */ {143, CH_ALPHA | CH_LOWER}, /*134 */ {128, CH_ALPHA | CH_LOWER}, /*135 */ {'E', CH_ALPHA | CH_LOWER}, /*136 */ {'E', CH_ALPHA | CH_LOWER}, /*137 */ {'E', CH_ALPHA | CH_LOWER}, /*138 */ {'I', CH_ALPHA | CH_LOWER}, /*139 */ {'I', CH_ALPHA | CH_LOWER}, /*140 */ {'I', CH_ALPHA | CH_LOWER}, /*141 */ {132, CH_ALPHA | CH_UPPER}, /*142 */ {134, CH_ALPHA | CH_UPPER}, /*143 */ {130, CH_ALPHA | CH_UPPER}, /*144 */ {146, CH_ALPHA | CH_LOWER}, /*145 */ {145, CH_ALPHA | CH_UPPER}, /*146 */ {'O', CH_ALPHA | CH_LOWER}, /*147 */ {153, CH_ALPHA | CH_LOWER}, /*148 */ {'O', CH_ALPHA | CH_LOWER}, /*149 */ {'U', CH_ALPHA | CH_LOWER}, /*150 */ {'U', CH_ALPHA | CH_LOWER}, /*151 */ {'Y', CH_ALPHA | CH_LOWER}, /*152 */ {148, CH_ALPHA | CH_UPPER}, /*153 */ {129, CH_ALPHA | CH_UPPER}, /*154 */ {155, 0}, /*155 */ {156, 0}, /*156 */ {157, 0}, /*157 */ {158, 0}, /*158 */ {159, 0}, /*159 */ {'A', CH_ALPHA | CH_LOWER}, /*160 */ {'I', CH_ALPHA | CH_LOWER}, /*161 */ {'O', CH_ALPHA | CH_LOWER}, /*162 */ {'U', CH_ALPHA | CH_LOWER}, /*163 */ {165, CH_ALPHA | CH_LOWER}, /*164 */ {164, CH_ALPHA | CH_UPPER}, /*165 */ {'A', CH_ALPHA | CH_LOWER}, /*166 */ {'O', CH_ALPHA | CH_LOWER}, /*167 */ {168, 0}, /*168 */ {169, 0}, /*169 */ {170, 0}, /*170 */ {171, 0}, /*171 */ {172, 0}, /*172 */ {173, 0}, /*173 */ {174, 0}, /*174 */ {175, 0}, /*175 */ {176, CH_GRAPHIC}, /*176 */ {177, CH_GRAPHIC}, /*177 */ {178, CH_GRAPHIC}, /*178 */ {179, CH_GRAPHIC}, /*179 */ {180, CH_GRAPHIC}, /*180 */ {181, CH_GRAPHIC}, /*181 */ {182, CH_GRAPHIC}, /*182 */ {183, CH_GRAPHIC}, /*183 */ {184, CH_GRAPHIC}, /*184 */ {185, CH_GRAPHIC}, /*185 */ {186, CH_GRAPHIC}, /*186 */ {187, CH_GRAPHIC}, /*187 */ {188, CH_GRAPHIC}, /*188 */ {189, CH_GRAPHIC}, /*189 */ {190, CH_GRAPHIC}, /*190 */ {191, CH_GRAPHIC}, /*191 */ {192, CH_GRAPHIC}, /*192 */ {193, CH_GRAPHIC}, /*193 */ {194, CH_GRAPHIC}, /*194 */ {195, CH_GRAPHIC}, /*195 */ {196, CH_GRAPHIC}, /*196 */ {197, CH_GRAPHIC}, /*197 */ {198, CH_GRAPHIC}, /*198 */ {199, CH_GRAPHIC}, /*199 */ {200, CH_GRAPHIC}, /*200 */ {201, CH_GRAPHIC}, /*201 */ {202, CH_GRAPHIC}, /*202 */ {203, CH_GRAPHIC}, /*203 */ {204, CH_GRAPHIC}, /*204 */ {205, CH_GRAPHIC}, /*205 */ {206, CH_GRAPHIC}, /*206 */ {207, CH_GRAPHIC}, /*207 */ {208, CH_GRAPHIC}, /*208 */ {209, CH_GRAPHIC}, /*209 */ {210, CH_GRAPHIC}, /*210 */ {211, CH_GRAPHIC}, /*211 */ {212, CH_GRAPHIC}, /*212 */ {213, CH_GRAPHIC}, /*213 */ {214, CH_GRAPHIC}, /*214 */ {215, CH_GRAPHIC}, /*215 */ {216, CH_GRAPHIC}, /*216 */ {217, CH_GRAPHIC}, /*217 */ {218, CH_GRAPHIC}, /*218 */ {219, CH_GRAPHIC}, /*219 */ {220, CH_GRAPHIC}, /*220 */ {221, CH_GRAPHIC}, /*221 */ {222, CH_GRAPHIC}, /*222 */ {223, CH_GRAPHIC}, /*223 */ {224, CH_ALPHA | CH_LOWER | CH_UPPER}, /*224 */ {225, CH_ALPHA | CH_LOWER | CH_UPPER}, /*225 */ {226, CH_ALPHA | CH_LOWER | CH_UPPER}, /*226 */ {227, CH_ALPHA | CH_LOWER | CH_UPPER}, /*227 */ {228, CH_ALPHA | CH_LOWER | CH_UPPER}, /*228 */ {229, CH_ALPHA | CH_LOWER | CH_UPPER}, /*229 */ {230, CH_ALPHA | CH_LOWER | CH_UPPER}, /*230 */ {231, CH_ALPHA | CH_LOWER | CH_UPPER}, /*231 */ {232, CH_ALPHA | CH_LOWER | CH_UPPER}, /*232 */ {233, CH_ALPHA | CH_LOWER | CH_UPPER}, /*233 */ {234, CH_ALPHA | CH_LOWER | CH_UPPER}, /*234 */ {235, CH_ALPHA | CH_LOWER | CH_UPPER}, /*235 */ {236, CH_ALPHA | CH_LOWER | CH_UPPER}, /*236 */ {237, CH_ALPHA | CH_LOWER | CH_UPPER}, /*237 */ {238, 0}, /*238 */ {239, 0}, /*239 */ {240, 0}, /*240 */ {241, 0}, /*241 */ {242, 0}, /*242 */ {243, 0}, /*243 */ {244, 0}, /*244 */ {245, 0}, /*245 */ {246, 0}, /*246 */ {247, 0}, /*247 */ {248, 0}, /*248 */ {249, 0}, /*249 */ {250, 0}, /*250 */ {251, 0}, /*251 */ {252, 0}, /*252 */ {253, 0}, /*253 */ {254, 0}, /*254 */ {255, 0} /*255 */ }; #else GLOBAL int _chsetext = OFF; /*turn off extended character set */ GLOBAL CHEXT _chsettbl[1]; #endif /*end of extended characters support */ /******************************************************************************/ /* */ /* Month names */ /* */ /******************************************************************************/ GLOBAL UCHAR *_months[12] = { (UCHAR *) "January", (UCHAR *) "February", (UCHAR *) "March", (UCHAR *) "April", (UCHAR *) "May", (UCHAR *) "June", (UCHAR *) "July", (UCHAR *) "August", (UCHAR *) "September", (UCHAR *) "October", (UCHAR *) "November", (UCHAR *) "December" }; /******************************************************************************/ /* */ /* Globals associated with the form processing */ /* */ /******************************************************************************/ #ifdef VV_FORM GLOBAL int _val_err; /*field editor validation error */ GLOBAL int _val_last; /*last validation error */ GLOBAL UCHAR _dvalmsg[12]; /*default validation message */ /*supplemental boolean validation msg */ GLOBAL UCHAR * _boolerr = (UCHAR *) " / "; GLOBAL UCHAR * _errstp; /*validation error string */ GLOBAL int _mnselectkey = KEY_ENTER; /*set the menu selection key */ GLOBAL int _clistkey = KEY_F2; /*set the choice list key */ GLOBAL WINDOW _fm_wn; /*default form window */ GLOBAL WINDOW _mn_wn; /*default menu window */ GLOBAL WINDOW _err_wn; /*default error window */ GLOBAL int _bgtxtsize = sizeof(BG_TXT); /*size of the background text struc */ GLOBAL int _bgboxsize = sizeof(BG_BOX); /*size of the background box struc */ GLOBAL int _bgfillsize = sizeof(BG_FILL); /*size of the background fill struc*/ GLOBAL int _bglinesize = sizeof(BG_LINE); /*size of the background line struc*/ GLOBAL int _formsize = sizeof(DFORM); /*size of the form structure */ GLOBAL int _mnsize = sizeof(MFORM); /*size of the menu structure */ GLOBAL int _srsize = sizeof(SR); /*size of the scrollable region struct*/ GLOBAL int _dfldsize = sizeof(DFIELD); /*size of the data field structure */ GLOBAL int _mfldsize = sizeof(MFIELD); /*size of the menu field structure */ GLOBAL int _memosize = sizeof(MEMO); /*size of the memo structure */ /*Default Data Entry Form Options */ GLOBAL long _fmopt = VERIFYQUIT | AUTOEXIT | AUTOMOVE; /*Default Menu Options */ GLOBAL long _mnopt = MNCHSELECT | MNTOPESCAPE | MNREDISPLAY | MNMSGAUTOPLACE | FMWRAP; GLOBAL NODEPTR _pichdndp; /*pointer to header node in linked */ /*list of picture strings */ GLOBAL FORMPTR _fmhdndp; /*pointer to header node in linked */ /*list of forms */ GLOBAL UCHAR _dpholdr = '.'; /*decimal place holder */ GLOBAL UCHAR _thsep = ','; /*thousands separator */ GLOBAL UCHAR _noechoch = '\0'; /*character to echo for NOECHO fields */ /*nothing to echo by default */ GLOBAL UCHAR _bool_no = 'n'; /*character used for negative boolean */ GLOBAL UCHAR _bool_yes = 'y'; /*character used for positive boolean */ GLOBAL UCHAR _d_padch = '0'; /*character used for padding dates */ GLOBAL UCHAR _t_padch = '0'; /*character used for padding times */ GLOBAL UCHAR _checkmark = '>'; /*default checkmark character */ #ifdef LINT_ARGS #ifdef VV_MENU GLOBAL int (FASTCALL * _mn_updfp)(DFORMPTR) = (PFI)mn_upd; #else GLOBAL int (FASTCALL * _mn_updfp)(DFORMPTR) = (PFI)NULLFP; #endif #ifdef VV_MEMO GLOBAL int (FASTCALL * _memo_updfp)(WINDOWPTR) = (PFI)mf_disp; #else GLOBAL int (FASTCALL * _memo_updfp)(WINDOWPTR) = (PFI)NULLFP; #endif #else #ifdef VV_MENU GLOBAL int (FASTCALL * _mn_updfp)() = (PFI)mn_upd; #else GLOBAL int (FASTCALL * _mn_updfp)() = (PFI)NULLFP; #endif #ifdef VV_MEMO GLOBAL int (FASTCALL * _memo_updfp)() = (PFI)mf_disp; #else GLOBAL int (FASTCALL * _memo_updfp)() = (PFI)NULLFP; #endif #endif #endif /*End form processing globals */ /******************************************************************************/ /* */ /* Designer Library Forms Support */ /* */ /******************************************************************************/ /*----------------------------------------------------------------------------*/ /* These externals are needed in all applications -- referenced in exit_vv() */ /* and other low level functions */ /*----------------------------------------------------------------------------*/ GLOBAL NODEPTR _liblathdndp; /*linked list of library logical att */ GLOBAL int _dllocking = TRUE; /*Enable/disable library locking */ /*extension used to create directories*/ /*for file-level locking */ GLOBAL UCHAR *_lock_ext = (UCHAR *) ".vv$"; /*----------------------------------------------------------------------------*/ /* Remaining Designer variables are conditional */ /*----------------------------------------------------------------------------*/ #ifdef VV_DES #define idx(item) ((char *) &((ALIGNPTR)ptr)->item - ptr) #define idxa(item) ((char *) ((ALIGNPTR)ptr)->item - ptr) /*----------------------------------------------------------------------------*/ /* Determine the offsets for each possible data structure element type */ /*----------------------------------------------------------------------------*/ void FASTCALL _init_align() { ALIGN xtest; char *ptr = (char *)&xtest; _align_offset[OFF_CHAR] = (char)(idx(testc)-idx(charc)); _align_offset[OFF_STRING] = (char)(idxa(testa)-idx(chara)); _align_offset[OFF_SHORT] = (char)(idx(tests)-idx(chars)); _align_offset[OFF_INT] = (char)(idx(testi)-idx(chari)); _align_offset[OFF_LONG] = (char)(idx(testl)-idx(charl)); _align_offset[OFF_FLOAT] = (char)(idx(testf)-idx(charf)); _align_offset[OFF_DOUBLE] = (char)(idx(testd)-idx(chard)); _align_offset[OFF_SMSTRC] = (char)(idx(test2)-idx(char2)); _align_offset[OFF_LGSTRC] = (char)(idx(test4)-idx(char4)); _align_offset[OFF_MNSTRC] = (char)(idx(test1)-idx(char1)); _align_offset[OFF_HGSTRC] = (char)(idx(test5)-idx(char5)); return; } GLOBAL int _maxrgconv = 0; /*Maximum size for range conv. buffer */ GLOBAL int _lswap = VVNOSWAP; /*Indicates whether to swap bytes when*/ /*reading shorts or longs from library*/ GLOBAL UCHAR _align_offset[QALIGN]; /*Data structure alignment offset */ GLOBAL UCHAR *_temp_strp; /*Temporary string buffer pointer */ GLOBAL UCHAR *_perm_strp; /*Permanent string buffer pointer */ /*Lib log attr. for default windows */ GLOBAL UCHAR *_deflibname = (UCHAR *) NULLP; GLOBAL BORDERPTR _borders[] = { BDR_NULLP, BDR_SLNP, BDR_DLNP, BDR_SOLIDP, BDR_SPACEP, BDR_DOTP, BDR_STARP }; /*----------------------------------------------------------------------------*/ /* Globals used by designer library */ /*----------------------------------------------------------------------------*/ GLOBAL short _dirblankct = 20; /*number of blank directory records to add */ /*when creating or packing a library */ GLOBAL short _locktryct = 5; /*number of times we will try to lock a file */ /*before returning */ GLOBAL long _lockdelay = 100; /*hundredths of seconds to delay before trying*/ /*again to lock a file */ /*----------------------------------------------------------------------------*/ /* Tables to use when reading/writing library records */ /*----------------------------------------------------------------------------*/ GLOBAL LT_HDR _lt_hdr = /*global table for library header */ { /*record */ LRT_HDR, /*record type */ LRC_HDR, /*number of entries in table */ {{LD_SHORT, 2, 0}, /*library type */ {LD_UCHAR, 1, 2}, /*library version */ {LD_UCHAR, 1, 3}, /*library sub version */ {LD_SHORT, 2, 4}, /*active record count */ {LD_SHORT, 2, 6}, /*total record count */ {LD_LONG, 4, 8}, /*offset to logical attribute records */ {LD_SHORT, 2, 12}, /*library flags */ {LD_UCHARRAY, 50, 14}} /*reserved bytes for password */ }; GLOBAL LT_LATT _lt_latt = /*global table for logical attribute */ { /*record */ LRT_LATT, /*record type */ LRC_LATT, /*number of entries in table */ {{LD_UCHARRAY, 102, 0}, /*Array of monochrome attributes */ {LD_UCHARRAY, 102, 102}} /*array of color physical attributes */ }; GLOBAL LT_LANAMES _lt_lanames = /*global table for logical attribute */ { /*names */ LRT_LANAMES, LRC_LANAMES, {{LD_UCHARRAY, 12, 0}, /*Name of User Logical Attribute 0 */ {LD_UCHARRAY, 12, 12}, /*Name of User Logical Attribute 1 */ {LD_UCHARRAY, 12, 24}, /*Name of User Logical Attribute 2 */ {LD_UCHARRAY, 12, 36}, /*Name of User Logical Attribute 3 */ {LD_UCHARRAY, 12, 48}, /*Name of User Logical Attribute 4 */ {LD_UCHARRAY, 12, 60}, /*Name of User Logical Attribute 5 */ {LD_UCHARRAY, 12, 72}, /*Name of User Logical Attribute 6 */ {LD_UCHARRAY, 12, 84}, /*Name of User Logical Attribute 7 */ {LD_UCHARRAY, 12, 96}, /*Name of User Logical Attribute 8 */ {LD_UCHARRAY, 12, 108}, /*Name of User Logical Attribute 9 */ {LD_UCHARRAY, 12, 120}, /*Name of User Logical Attribute 10 */ {LD_UCHARRAY, 12, 132}, /*Name of User Logical Attribute 11 */ {LD_UCHARRAY, 12, 144}, /*Name of User Logical Attribute 12 */ {LD_UCHARRAY, 12, 156}, /*Name of User Logical Attribute 13 */ {LD_UCHARRAY, 12, 168}, /*Name of User Logical Attribute 14 */ {LD_UCHARRAY, 12, 180}, /*Name of User Logical Attribute 15 */ {LD_UCHARRAY, 12, 192}, /*Name of User Logical Attribute 16 */ {LD_UCHARRAY, 12, 204}, /*Name of User Logical Attribute 17 */ {LD_UCHARRAY, 12, 216}, /*Name of User Logical Attribute 18 */ {LD_UCHARRAY, 12, 228}, /*Name of User Logical Attribute 19 */ {LD_UCHARRAY, 12, 240}, /*Name of User Logical Attribute 20 */ {LD_UCHARRAY, 12, 252}, /*Name of User Logical Attribute 21 */ {LD_UCHARRAY, 12, 264}, /*Name of User Logical Attribute 22 */ {LD_UCHARRAY, 12, 276}, /*Name of User Logical Attribute 23 */ {LD_UCHARRAY, 12, 288}, /*Name of User Logical Attribute 24 */ {LD_UCHARRAY, 12, 300}, /*Name of User Logical Attribute 25 */ {LD_UCHARRAY, 12, 312}, /*Name of User Logical Attribute 26 */ {LD_UCHARRAY, 12, 324}, /*Name of User Logical Attribute 27 */ {LD_UCHARRAY, 12, 336}, /*Name of User Logical Attribute 28 */ {LD_UCHARRAY, 12, 348}, /*Name of User Logical Attribute 29 */ {LD_UCHARRAY, 12, 360}, /*Name of User Logical Attribute 30 */ {LD_UCHARRAY, 12, 372}, /*Name of User Logical Attribute 31 */ {LD_UCHARRAY, 12, 384}, /*Name of User Logical Attribute 32 */ {LD_UCHARRAY, 12, 396}, /*Name of User Logical Attribute 33 */ {LD_UCHARRAY, 12, 408}, /*Name of User Logical Attribute 34 */ {LD_UCHARRAY, 12, 420}, /*Name of User Logical Attribute 35 */ {LD_UCHARRAY, 12, 432}, /*Name of User Logical Attribute 36 */ {LD_UCHARRAY, 12, 444}, /*Name of User Logical Attribute 37 */ {LD_UCHARRAY, 12, 456}, /*Name of User Logical Attribute 38 */ {LD_UCHARRAY, 12, 468}, /*Name of User Logical Attribute 39 */ {LD_UCHARRAY, 12, 480}, /*Name of User Logical Attribute 40 */ {LD_UCHARRAY, 12, 492}, /*Name of User Logical Attribute 41 */ {LD_UCHARRAY, 12, 504}, /*Name of User Logical Attribute 42 */ {LD_UCHARRAY, 12, 516}, /*Name of User Logical Attribute 43 */ {LD_UCHARRAY, 12, 528}, /*Name of User Logical Attribute 44 */ {LD_UCHARRAY, 12, 540}, /*Name of User Logical Attribute 45 */ {LD_UCHARRAY, 12, 552}, /*Name of User Logical Attribute 46 */ {LD_UCHARRAY, 12, 564}, /*Name of User Logical Attribute 47 */ {LD_UCHARRAY, 12, 576}, /*Name of User Logical Attribute 48 */ {LD_UCHARRAY, 12, 588}, /*Name of User Logical Attribute 49 */ {LD_UCHARRAY, 12, 600}, /*Name of User Logical Attribute 50 */ {LD_UCHARRAY, 12, 612}, /*Name of User Logical Attribute 51 */ {LD_UCHARRAY, 12, 624}, /*Name of User Logical Attribute 52 */ {LD_UCHARRAY, 12, 636}, /*Name of User Logical Attribute 53 */ {LD_UCHARRAY, 12, 648}, /*Name of User Logical Attribute 54 */ {LD_UCHARRAY, 12, 660}, /*Name of User Logical Attribute 55 */ {LD_UCHARRAY, 12, 672}, /*Name of User Logical Attribute 56 */ {LD_UCHARRAY, 12, 684}, /*Name of User Logical Attribute 57 */ {LD_UCHARRAY, 12, 696}, /*Name of User Logical Attribute 58 */ {LD_UCHARRAY, 12, 708}, /*Name of User Logical Attribute 59 */ {LD_UCHARRAY, 12, 720}, /*Name of User Logical Attribute 60 */ {LD_UCHARRAY, 12, 732}, /*Name of User Logical Attribute 61 */ {LD_UCHARRAY, 12, 744}, /*Name of User Logical Attribute 62 */ {LD_UCHARRAY, 12, 756}, /*Name of User Logical Attribute 63 */ {LD_UCHARRAY, 12, 768}, /*Name of User Logical Attribute 64 */ {LD_UCHARRAY, 12, 780}, /*Name of User Logical Attribute 65 */ {LD_UCHARRAY, 12, 792}, /*Name of User Logical Attribute 66 */ {LD_UCHARRAY, 12, 804}, /*Name of User Logical Attribute 67 */ {LD_UCHARRAY, 12, 816}, /*Name of User Logical Attribute 68 */ {LD_UCHARRAY, 12, 828}, /*Name of User Logical Attribute 69 */ {LD_UCHARRAY, 12, 840}, /*Name of User Logical Attribute 70 */ {LD_UCHARRAY, 12, 852}, /*Name of User Logical Attribute 71 */ {LD_UCHARRAY, 12, 864}, /*Name of User Logical Attribute 72 */ {LD_UCHARRAY, 12, 876}} /*Name of User Logical Attribute 73 */ }; GLOBAL LT_DIR _lt_dir = /*global table for directory record */ { LRT_DIR, /*record type */ LRC_DIR, /*number of entries in table */ {{LD_LONG, 4, 0}, /*starting offset of data */ {LD_LONG, 4, 4}, /*length of data */ {LD_SHORT, 2, 8}, /*Type of directory record */ {LD_SHORT, 2, 10}, /*length of directory record key */ {LD_UCHARRAY, 16, 12}, /*directory record key */ {LD_USHORT, 2, 28}, /*library flags */ {LD_UCHARRAY, 4, 30}} /*user ID */ }; GLOBAL LT_TEST _lt_test = { LRT_TEST, LRC_TEST, {LD_LSTRING, 80, 0} }; GLOBAL LT_OBJ _lt_obj = { LRT_OBJ, LRC_OBJ, {{LD_SHORT, 2, 8}, /*object type */ {LD_SHORT, 2, 10}, /*object row begin */ {LD_SHORT, 2, 12}, /*object column begin */ {LD_SHORT, 2, 14}, /*object row end */ {LD_SHORT, 2, 16}, /*object column end */ {LD_SHORT, 2, 18}, /*sub_count */ {LD_USHORT, 2, 20}, /*object flags */ {LD_UCHAR, 1, 22}, /*attribute byte */ {LD_UCHAR, 1, 23}, /*border type */ {LD_SHORT, 2, 24}, /*object ID */ {LD_SHORT, 2, 26}, /*parent ID */ {LD_SHORT, 2, 28}} /*text/field ID */ }; GLOBAL LT_TEXT _lt_text = { LRT_TEXT, LRC_TEXT, {LD_LSTRING, 254, 0} }; GLOBAL LT_SR _lt_sr = { LRT_SR, LRC_SR, {{LD_SHORT, 2, 0}, /*datarowq */ {LD_SHORT, 2, 2}, /*item count */ {LD_SHORT, 2, 4}, /*vis_rb */ {LD_SHORT, 2, 6}, /*vis_cb */ {LD_SHORT, 2, 8}, /*vis_rowq */ {LD_SHORT, 2, 10}, /*vis_colq */ {LD_UCHAR, 1, 12}, /*fill_att */ {LD_UCHAR, 1, 13}, /*flags */ {LD_SHORT, 2, 14}, /*rec_size */ {LD_LSTRING, 16, 16}, /*rec_name */ {LD_LSTRING, 16, 32}, /*scrlfunc */ {LD_LSTRING, 82, 48}, /*help string or keyword */ {LD_SHORT, 2, 130}, /*sequence ID */ {LD_LSTRING, 16, 132}, /*begin SR function */ {LD_LSTRING, 16, 148}, /*end SR function */ {LD_LSTRING, 16, 164}, /*begin row function */ {LD_LSTRING, 16, 180}} /*end row function */ }; GLOBAL LT_FMBEG _lt_fmbeg = { LRT_FMBEG, LRC_FMBEG, {{LD_UCHARRAY, 10, 0}, {LD_UCHARRAY, 16, 10}} }; GLOBAL LT_FMEND _lt_fmend = { LRT_FMEND, LRC_FMEND, {{LD_UCHARRAY, 7, 0}} }; GLOBAL LT_FM _lt_fm = { LRT_FM, LRC_FM, {{LD_SHORT, 2, 8}, /*type */ {LD_SHORT, 2, 10}, /*objcount */ {LD_SHORT, 2, 12}, /*itemcount */ {LD_SHORT, 2, 14}, /*mncheckmark */ {LD_SHORT, 2, 16}, /*mnretlevel */ {LD_SHORT, 2, 18}, /*maxfldseq */ {LD_SHORT, 2, 20}, /*maxfldid */ {LD_SHORT, 2, 22}, /*permstbufsize */ {LD_SHORT, 2, 24}, /*tempstbufsize */ {LD_SHORT, 2, 26}, /*hfldscrlq */ {LD_SHORT, 2, 28}, /*vfldscrlq */ {LD_UCHAR, 1, 30}, /*security */ {LD_UCHAR, 1, 31}, /*border type */ {LD_LONG, 4, 32}, /*crdate */ {LD_LONG, 4, 36}, /*crtime */ {LD_LONG, 4, 40}, /*lmoddate */ {LD_LONG, 4, 44}, /*lmodtime */ {LD_LONG, 4, 48}, /*vv_flags */ {LD_LONG, 4, 52}, /*flags */ {LD_LSTRING, 16, 56}, /*name */ {LD_LSTRING, 82, 72}, /*fmhelp */ {LD_LSTRING, 78, 154}, /*fmtitle */ {LD_LSTRING, 16, 232}, /*scrlfunc */ {LD_LSTRING, 16, 248}, /*begfunc */ {LD_LSTRING, 16, 264}, /*endfunc */ {LD_LSTRING, 16, 280}, /*valfunc */ {LD_LSTRING, 16, 296}, /*next_form */ {LD_LSTRING, 16, 312}, /*prev_form */ {LD_UCHAR, 1, 328}} /*bgobjatt */ }; GLOBAL LT_FMWN _lt_fmwn = { LRT_FMWN, LRC_FMWN, {{LD_SHORT, 2, 0}, /*window rb */ {LD_SHORT, 2, 2}, /*window cb */ {LD_SHORT, 2, 4}, /*window re */ {LD_SHORT, 2, 6}, /*window ce */ {LD_SHORT, 2, 8}, /*title location */ {LD_UCHAR, 1, 10}, /*window attribute */ {LD_UCHAR, 1, 12}, /*border att */ {LD_UCHAR, 1, 11}, /*border type */ {LD_UCHAR, 1, 13}, /*title att */ {LD_SHORT, 2, 14}, /*row quantity for buffered window */ {LD_SHORT, 2, 16}, /*col quantity for buffered window */ {LD_SHORT, 2, 18}} /*form type */ }; GLOBAL LT_FMMSGWN _lt_fmmsgwn = { LRT_FMMSGWN, LRC_FMMSGWN, {{LD_SHORT, 2, 0}, /*window rb */ {LD_SHORT, 2, 2}, /*window cb */ {LD_SHORT, 2, 4}, /*window rowq */ {LD_SHORT, 2, 6}, /*window colq */ {LD_SHORT, 2, 8}, /*title location */ {LD_UCHAR, 1, 10}, /*window attribute */ {LD_UCHAR, 1, 11}, /*border type */ {LD_UCHAR, 1, 12}, /*border att */ {LD_UCHAR, 1, 13}, /*title att */ {LD_LSTRING, 78, 14}} /*title */ }; GLOBAL LT_FMDOC _lt_fmdoc = { LRT_FMDOC, LRC_FMDOC, {{LD_LSTRING, 24, 0}, /*project name */ {LD_LSTRING, 16, 24}, /*form ID */ {LD_LSTRING, 24, 40}, /*programmer name */ {LD_LSTRING, 16, 64}, /*revision level */ {LD_SHORT, 2, 80}} /*length of form notes */ }; GLOBAL LT_FMNOTES _lt_fmnotes = { LRT_FMNOTES, LRC_FMNOTES, {{LD_LSTRING, 301, 0}} }; GLOBAL LT_CLIST _lt_clist = { LRT_CLIST, LRC_CLIST, {{LD_SHORT, 2, 0}, /*clist window row begin */ {LD_SHORT, 2, 2}, /*clist window col begin */ {LD_SHORT, 2, 4}, /*clist window rowq */ {LD_SHORT, 2, 6}, /*clist window colq */ {LD_SHORT, 2, 8}, /*curitem */ {LD_SHORT, 2, 10}, /*title location */ {LD_SHORT, 2, 12}, /*VV flags */ {LD_UCHAR, 1, 14}, /*act_att */ {LD_UCHAR, 1, 15}, /*inact_att */ {LD_UCHAR, 1, 16}, /*border type */ {LD_UCHAR, 1, 17}, /*border attribute */ {LD_UCHAR, 1, 18}, /*title attribute */ {LD_UCHAR, 1, 19}, /*flags */ {LD_LSTRING, 78, 20}, /*choice list title */ {LD_LSTRING, 82, 98}, /*choice list keyword */ {LD_LSTRING, 82, 180}} /*choice list help */ }; GLOBAL LT_FLDRANGE _lt_fldrange = { LRT_FLDRANGE, LRC_FLDRANGE, {{LD_LSTRING, 82, 0}, /*min */ {LD_LSTRING, 82, 82}} /*max */ }; GLOBAL LT_TOGGLE _lt_toggle = { LRT_TOGGLE, LRC_TOGGLE, {{LD_SHORT, 2, 0}, /*number of leading underscores */ {LD_SHORT, 2, 2}, /*number of trailing underscores */ {LD_UCHAR, 1, 4}, /*yes string attribute */ {LD_UCHAR, 1, 5}, /*no string attribute */ {LD_LSTRING, 82, 6}, /*yes string */ {LD_LSTRING, 82, 88}} /*no string */ }; GLOBAL LT_FLD _lt_fld = { LRT_FLD, LRC_FLD, {{LD_SHORT, 2, 0}, /*field type */ {LD_SHORT, 2, 2}, /*sequence id */ {LD_SHORT, 2, 4}, /*field id number */ {LD_SHORT, 2, 6}, /*memo_rowq */ {LD_SHORT, 2, 8}, /*memo_colq */ {LD_SHORT, 2, 10}, /*picskiplen */ {LD_LONG, 4, 12}, /*VV field flags */ {LD_LONG, 4, 16}, /*VVD flags */ {LD_UCHAR, 1, 20}, /*active att */ {LD_UCHAR, 1, 21}, /*inactive att */ {LD_UCHAR, 1, 22}, /*skip att */ {LD_UCHAR, 1, 23}, /*selchar att */ {LD_UCHAR, 1, 24}, /*selchar position */ {LD_UCHAR, 1, 25}, /*dummy */ {LD_UCHAR, 1, 26}, /*bool_yes */ {LD_UCHAR, 1, 27}, /*bool_no */ {LD_LSTRING, 16, 28}, /*field name */ {LD_LSTRING, 82, 44}, /*field message */ {LD_LSTRING, 82, 126}, /*field help string */ {LD_LSTRING, 16, 208}, /*begin field func */ {LD_LSTRING, 16, 224}, /*end field func */ {LD_LSTRING, 16, 240}, /*val field func */ {LD_LSTRING, 16, 256}, /*action func */ {LD_LSTRING, 16, 272}, /*sub_form name */ {LD_LSTRING, 22, 288}, /*date/time format string */ {LD_LSTRING, 16, 310}} /*variable name */ }; GLOBAL LT_FLDPIC _lt_fldpic = { LRT_FLDPIC, LRC_FLDPIC, {{LD_LSTRING, 256, 0}} /*field picture */ }; GLOBAL LT_FLDNOTES _lt_fldnotes = { LRT_FLDNOTES, LRC_FLDNOTES, {{LD_LSTRING, 301, 0}} /*field notes */ }; GLOBAL LT_TABLEPTR _tblarray[] = { (LT_TABLEPTR) NULLP, (LT_TABLEPTR)&_lt_hdr, (LT_TABLEPTR)&_lt_latt, (LT_TABLEPTR)&_lt_dir, (LT_TABLEPTR)&_lt_fm, (LT_TABLEPTR)&_lt_fmwn, (LT_TABLEPTR)&_lt_fmmsgwn, (LT_TABLEPTR)&_lt_fmdoc, (LT_TABLEPTR)&_lt_sr, (LT_TABLEPTR)&_lt_obj, (LT_TABLEPTR)&_lt_text, (LT_TABLEPTR)&_lt_fld, (LT_TABLEPTR)&_lt_fldpic, (LT_TABLEPTR)&_lt_fldnotes, (LT_TABLEPTR)&_lt_toggle, (LT_TABLEPTR)&_lt_fldrange, (LT_TABLEPTR)&_lt_clist, (LT_TABLEPTR)&_lt_fmnotes, (LT_TABLEPTR)&_lt_test, (LT_TABLEPTR)&_lt_lanames, (LT_TABLEPTR)&_lt_fmend, (LT_TABLEPTR)&_lt_fmbeg }; #endif /******************************************************************************/ /* */ /* Globals associated with the choice list processing */ /* */ /******************************************************************************/ GLOBAL int _clsize = sizeof(CLIST); /*size of the choice list structure */ /******************************************************************************/ /* */ /* Globals associated with the help system */ /* */ /******************************************************************************/ #ifdef VV_HELP GLOBAL int _help_rb; /* Secondary help window coordinates */ GLOBAL int _help_cb; GLOBAL int _help_re; GLOBAL int _help_ce; GLOBAL UCHAR *_dhelpmsg; /*default help message */ #endif /******************************************************************************/ /* */ /* Globals associated with the keyboard input system */ /* */ /******************************************************************************/ #ifdef VV_KEY GLOBAL int _ki_last; /* last keystroke entered */ GLOBAL int _ki_max = SAMEKEYMAX; /* max number of keys read by ki_same */ #ifdef LINT_ARGS GLOBAL int (FASTCALL *_keyloopfp)(int); /* pointer to key loop function */ GLOBAL int (FASTCALL *_keyfilterfp)(int);/* pointer to key filter function */ #else GLOBAL int (FASTCALL *_keyloopfp)(); /* pointer to key loop function */ GLOBAL int (FASTCALL *_keyfilterfp)(); /* pointer to key filter function */ #endif #endif /******************************************************************************/ /* */ /* Border Structures */ /* */ /******************************************************************************/ GLOBAL BORDER _bdr_space = {32, 32, 32, 32, 32, 32, 32, 32}; GLOBAL BORDER _bdr_star = {'*', '*', '*', '*', '*', '*', '*', '*'}; GLOBAL BORDER _bdr_dot = {'.', '.', ':', ':', '.', '.', '.', '.'}; /*----------------------------------------------------------------------------*/ /* The proper characters for the following borders will be inserted into the */ /* structures during initialization if specified in VVTERMCAP. */ /*----------------------------------------------------------------------------*/ GLOBAL BORDER _bdr_dln = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}; GLOBAL BORDER _bdr_sln = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}; GLOBAL BORDER _bdr_solid = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}; /******************************************************************************/ /* */ /* Beep Array */ /* */ /******************************************************************************/ GLOBAL BEEP _beeps[] = { {BPLONG, BPMIDDLE}, /* BPERROR */ {BPMEDIUM, BPLOW}, /* BPNOACTION */ {OFF, OFF} /* BPAUTOMOVE */ }; /******************************************************************************/ /* */ /* Globals necessary for the basic system */ /* */ /******************************************************************************/ GLOBAL UCHAR _vv_yes = 'y'; /*valid positive response */ GLOBAL UCHAR _vv_no = 'n'; /*valid negative response */ /*default date format */ GLOBAL UCHAR *_datefmtp = (UCHAR *) "MM/DD/YY"; /*default time format */ GLOBAL UCHAR *_timefmtp = (UCHAR *) "HH:MM:SS"; /* end of string table marker */ GLOBAL UCHAR *_trt_end = (UCHAR *) "TRT_END"; /* delimiter for start of translation */ GLOBAL UCHAR *_tr_beg = (UCHAR *) "<<"; /* delimiter for end of translation */ GLOBAL UCHAR *_tr_end = (UCHAR *) ">>"; GLOBAL UCHAR *_dbdumpp; /* pointer to corrupted structure */ GLOBAL WINDOW _clist_wn; /*default choice list window */ GLOBAL WINDOW _fullwn; /*predefined full screen user window */ GLOBAL WINDOW _msgwn; /*default message window */ GLOBAL WINDOW _vcswn; /*VCS internal window */ GLOBAL WINDOW _wn_wn; /*default generic window */ GLOBAL WINDOW _helpwn; /*default help window */ GLOBAL WINDOWPTR _help_wnp = &_helpwn; /*global help window pointer */ /*index file extension */ GLOBAL UCHAR * _indext = (UCHAR *) ".inx"; GLOBAL UCHAR _kwdch = '*'; /*keyword character for memory files */ GLOBAL UCHAR _kwddelim = ','; /*keyword delimiter for memory files */ GLOBAL int _v_mode = -1; /* current video mode */ GLOBAL int _vid_echo; /* enable updating under MSWindows or */ /* TERMINAL. For PCDOS systems, this */ /* will be set to one if TopView or */ /* MS Windows system is present. */ GLOBAL int _vv_err; /* error code variable */ GLOBAL UCHAR _derrmsg[12]; /* default error message */ GLOBAL int _vv_init = FALSE; /* initialization flag */ GLOBAL int _vpstlen = VPSTMAXLEN; /* maximum length of buffer associated*/ /* with v_printf() */ GLOBAL int _vv_tabq = 8; /* Tab stops set every 8 columns */ /* Used for window tab expansion */ GLOBAL int _csrvis; /* cursor visibility flag */ GLOBAL int _vpbytes; /* number of bytes in vrb page */ GLOBAL int _mfsize = sizeof(MFILE); /* memory file structure size */ GLOBAL int _wnsize = sizeof(WINDOW); /* window structure size */ GLOBAL int _scrsize = sizeof(SCR); /* screen structure size */ GLOBAL int _hiderow = -1; /* hidden cursor coordinates storage */ GLOBAL int _hidecol = -1; /* must be initialized to -1 */ GLOBAL int _sbarsize = sizeof(SBAR); /*size of the scroll bar structure */ GLOBAL int _sbcoversize = 4; /*size of the scroll bar cover region */ GLOBAL short _wnsetstepq = 8; /* explosion speed */ GLOBAL ULONG _wnsteppause = 2L; /* pause time */ GLOBAL USHORT _timer_scale = 0; /* fine timing not available */ GLOBAL USHORT _vert_retrace = FALSE; /* vertical retrace not available */ GLOBAL SCR _vid_scr; /*video screen structure */ /*initialized based on VVTERMCAP */ #ifdef LINT_ARGS GLOBAL ISVRP _abortfp; /* pointer to abort function */ GLOBAL void (FASTCALL * _errfp)(UCHAR *) = _db_dummy; /* pointer to user's error function */ #ifndef NO_DEBUG_CODE GLOBAL void (FASTCALL * _finitfp)(UCHAR *) = _db_dummy; /* begin of module function */ GLOBAL void (FASTCALL * _fexitfp)(UCHAR *) = _db_dummy; /* end of module function */ #endif #else GLOBAL ISVRP _abortfp; GLOBAL void (FASTCALL * _errfp)() = _db_dummy; #ifndef NO_DEBUG_CODE GLOBAL void (FASTCALL * _finitfp)() = _db_dummy; GLOBAL void (FASTCALL * _fexitfp)() = _db_dummy; #endif #endif /*----------------------------------------------------------------------------*/ /* Array of initialization functions */ /*----------------------------------------------------------------------------*/ #ifdef LINT_ARGS GLOBAL void (FASTCALL * _inittbl[])(void) = #else GLOBAL void (FASTCALL * _inittbl[])() = #endif { (PFV)NULLFP, /*No default user initialization */ _init_sys, /*Basic system */ #ifdef VV_DEBUG _init_db, /*Debugging system */ #else (PFV)NULLFP, #endif #ifdef VV_HELP _init_help, /*Help system */ #else (PFV)NULLFP, #endif #ifdef VV_CLIST _init_cl, /*Choice list system */ #else (PFV)NULLFP, #endif #ifdef VV_FORM _init_fm, /*Form processing system */ #else (PFV)NULLFP, #endif #ifdef VV_DES _init_des /*Vermont Views Designer */ #else (PFV)NULLFP #endif }; /*----------------------------------------------------------------------------*/ /* Global variables for PCDOS and OS2 Systems */ /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ /* Global variables for TERMINAL systems */ /*----------------------------------------------------------------------------*/ GLOBAL UCHAR *_scr_buf; /* actual screen buffer */ GLOBAL UCHAR *_tdbuf; /* terminal description buffer */ GLOBAL UCHAR _cm_st[15]; /* cursor motion command string */ GLOBAL int _min_cm; /* minimum cursor motion string length*/ GLOBAL int _xon; /* = 1 if XON/XOFF is in effect */ GLOBAL int _tspeed = 9600; /* terminal communications speed (bps)*/ GLOBAL int _cbits = 8; /* data bits per character (7 or 8) */ GLOBAL int _pbits = 0; /* parity bits per character (0 or 1) */ GLOBAL int _sbits = 1; /* stop bits per character */ GLOBAL int _pb_buf; /*pushback buf for keyboard routines */ GLOBAL int _csr_row = -1; /*row where physical cursor is located*/ GLOBAL int _csr_col = -1; /*col where physical cursor is located*/ GLOBAL int _frz_csr; /*freeze cursor after performing a */ /*screen update */ GLOBAL int _force; /*force screen update when set */ GLOBAL UCHAR _sbuparrow = 0x20; /*scroll bar up arrow character */ GLOBAL UCHAR _sbdnarrow = 0x20; /*scroll bar down arrow */ GLOBAL UCHAR _sblftarrow = 0x20; /*scroll bar left arrow */ GLOBAL UCHAR _sbrtarrow = 0x20; /*scroll bar right arrow */ GLOBAL UCHAR _sbcorner = 0; /*scroll bar corner character */ /*(0 = use the border character) */ GLOBAL UCHAR _sbpagergn = 0x20; /*scroll bar page region character */ GLOBAL UCHAR _sbthumb = 0x20; /*scroll bar thumb */ GLOBAL int _kb_flags = -1; /*initial state of keyboard flags */ /*printer name */ GLOBAL UCHAR *_printname = (UCHAR *) "lpr"; /*printer mode */ GLOBAL UCHAR *_printmode = (UCHAR *) "p"; #if SCO_UNIX GLOBAL UCHAR FAR *_mmvbuf; /*pointer to physical video memory */ GLOBAL UCHAR *_mmatt; /*pointer to physical attribute array */ /*to use for memory mapped displayes */ #endif GLOBAL int _wnmemmap = -1; /*is terminal memory mapped */ /*initialized to -1 so that status */ /*will be determined at runtime. if */ /*set to 0, will never check for */ /*memory mapped display */ GLOBAL void (FASTCALL * _vupdfp)(); /*point to low level video update */ /*function */ /*----------------------------------------------------------------------------*/ /* Global variables specific to TERMINAL systems */ /* Correct values for _clr2att, _tscrl, _tpad_ch, _gglitch, _rglitch, */ /* _uglitch, _bglitch, _hglitch, va_cmd[][], csr_cmd[], (KEYFP)kbd_cmd[], and */ /* scrn_cmd[] will be set by init_wfc(), based upon the WFCTERMCAP entry. */ /*----------------------------------------------------------------------------*/ GLOBAL UCHAR _cur_att = NORMAL; /*current video attribute */ GLOBAL int _clr2att = 0; /*terminal clears with current att */ GLOBAL int _tscrl; /*terminal generates a hardware */ /*scroll on write to last row,last col*/ GLOBAL int _tsnow; /*terminal generates snow if memmapped*/ GLOBAL UCHAR _tpad_ch = 0; /*pad character for terminal delays */ GLOBAL int _gglitch = 0; /*number of blanks taken by GS, GE */ GLOBAL int _rglitch = 0; /*number of blanks taken by so, se */ GLOBAL int _uglitch = 0; /*number of blanks taken by us, ue */ GLOBAL int _bglitch = 0; /*number of blanks taken by BB, BR */ GLOBAL int _hglitch = 0; /*number of blanks taken by HS, HR */ GLOBAL UCHAR *_va_cmd[QVA_CMDS][2]; /*video attribute commands */ GLOBAL UCHAR *_csr_cmd[QCSR_CMDS]; /*cursor commands */ GLOBAL UCHAR *_kbd_cmd[QKBD_CMDS]; /*keyboard commands */ GLOBAL UCHAR *_scr_cmd[QSCR_CMDS]; /*screen commands */ GLOBAL UCHAR *_sterm; /*similar terminal entry to include */ GLOBAL UCHAR *_tinit_st; /*terminal initialization string */ /*number of video attribute commands */ GLOBAL UCHAR _qvacmds = (UCHAR) ((sizeof(_va_cmd) / sizeof(UCHAR *)) / 2); GLOBAL TERMSTAT _tty, _vvtty; /*----------------------------------------------------------------------------*/ /* Keystroke definitions */ /* If you also want to use the optional definitions, then uncomment them and */ /* make the appropriate entries in the VVTERMCAP file. You may add */ /* definitions at the end if you like. */ /* */ /* The actual keystroke string, length of keystroke string, and keycap label */ /* will be defined when the VVTERMCAP file is read. */ /*----------------------------------------------------------------------------*/ GLOBAL int _maxkeylen = 0; /*longest keystroke string length */ #ifdef VV_KEY GLOBAL KEYDEF _key_tbl[] = { /*cursor up - required*/ {(UCHAR *) "ku", (UCHAR *) NULLP, 0, KEY_UP, (UCHAR *) NULLP, 0}, /*cursor down - required*/ {(UCHAR *) "kd", (UCHAR *) NULLP, 0, KEY_DN, (UCHAR *) NULLP, 0}, /*cursor right - required*/ {(UCHAR *) "kr", (UCHAR *) NULLP, 0, KEY_RIGHT, (UCHAR *) NULLP, 0}, /*cursor left - required*/ {(UCHAR *) "kl", (UCHAR *) NULLP, 0, KEY_LEFT, (UCHAR *) NULLP, 0}, /*cursor home - required*/ {(UCHAR *) "kh", (UCHAR *) NULLP, 0, KEY_HOME, (UCHAR *) NULLP, 0}, /*cursor end - required*/ {(UCHAR *) "EN", (UCHAR *) NULLP, 0, KEY_END, (UCHAR *) NULLP, 0}, /*page up - required*/ {(UCHAR *) "PU", (UCHAR *) NULLP, 0, KEY_PGUP, (UCHAR *) NULLP, 0}, /*page down - required*/ {(UCHAR *) "PD", (UCHAR *) NULLP, 0, KEY_PGDN, (UCHAR *) NULLP, 0}, /*page right - optional*/ {(UCHAR *) "PR", (UCHAR *) NULLP, 0, KEY_CRIGHT, (UCHAR *) NULLP, 0}, /*page left - optional*/ {(UCHAR *) "PL", (UCHAR *) NULLP, 0, KEY_CLEFT, (UCHAR *) NULLP, 0}, /*insert/overstrike toggle - opt*/ {(UCHAR *) "ki", (UCHAR *) NULLP, 0, KEY_INS, (UCHAR *) NULLP, 0}, /*destructive char delete - opt*/ {(UCHAR *) "DL", (UCHAR *) NULLP, 0, KEY_DEL, (UCHAR *) NULLP, 0}, /*backspace (if not ASCII 8)- opt*/ {(UCHAR *) "bc", (UCHAR *) NULLP, 0, KEY_BACK, (UCHAR *) NULLP, 0}, /*escape (if not ASCII 27) - opt*/ {(UCHAR *) "ESC", (UCHAR *) NULLP, 0, KEY_ESC, (UCHAR *) NULLP, 0}, /*backtab - optional*/ {(UCHAR *) "bt", (UCHAR *) NULLP, 0, KEY_STAB, (UCHAR *) NULLP, 0}, /*scrollable page down - optional*/ {(UCHAR *) "SPD", (UCHAR *) NULLP, 0, KEY_CPGDN, (UCHAR *) NULLP, 0}, /*scrollable page up - optional*/ {(UCHAR *) "SPU", (UCHAR *) NULLP, 0, KEY_CPGUP, (UCHAR *) NULLP, 0}, /*scrollable exit down - optional*/ {(UCHAR *) "SXD", (UCHAR *) NULLP, 0, KEY_CEND, (UCHAR *) NULLP, 0}, /*scrollable exit up - optional*/ {(UCHAR *) "SXU", (UCHAR *) NULLP, 0, KEY_CHOME, (UCHAR *) NULLP, 0}, /*zoom key - optional*/ {(UCHAR *) "ZM", (UCHAR *) NULLP, 0, KEY_AF1, (UCHAR *) NULLP, 0}, /*F1 - optional*/ {(UCHAR *) "k0", (UCHAR *) NULLP, 0, KEY_F1, (UCHAR *) NULLP, 0}, /*F2 - optional*/ {(UCHAR *) "k1", (UCHAR *) NULLP, 0, KEY_F2, (UCHAR *) NULLP, 0}, /*Ctrl-F2 - optional*/ {(UCHAR *) "Ck1", (UCHAR *) NULLP, 0, KEY_CF2, (UCHAR *) NULLP, 0}, /*Alt-F2 - optional*/ {(UCHAR *) "Ak1", (UCHAR *) NULLP, 0, KEY_AF2, (UCHAR *) NULLP, 0}, /*F3 - optional*/ {(UCHAR *) "k2", (UCHAR *) NULLP, 0, KEY_F3, (UCHAR *) NULLP, 0}, /*Shift F3 - optional*/ {(UCHAR *) "Sk2", (UCHAR *) NULLP, 0, KEY_SF3, (UCHAR *) NULLP, 0}, /*F4 - optional*/ {(UCHAR *) "k3", (UCHAR *) NULLP, 0, KEY_F4, (UCHAR *) NULLP, 0}, /*Shift F4 - optional*/ {(UCHAR *) "Sk3", (UCHAR *) NULLP, 0, KEY_SF4, (UCHAR *) NULLP, 0}, /*Ctrl-F4 - optional*/ {(UCHAR *) "Ck3", (UCHAR *) NULLP, 0, KEY_CF4, (UCHAR *) NULLP, 0}, /*F5 - optional*/ {(UCHAR *) "k4", (UCHAR *) NULLP, 0, KEY_F5, (UCHAR *) NULLP, 0}, /*Ctrl-F5 - optional*/ {(UCHAR *) "Ck4", (UCHAR *) NULLP, 0, KEY_CF5, (UCHAR *) NULLP, 0}, /*Alt-F5 - optional*/ {(UCHAR *) "Ak4", (UCHAR *) NULLP, 0, KEY_AF5, (UCHAR *) NULLP, 0}, /*F6 - optional*/ {(UCHAR *) "k5", (UCHAR *) NULLP, 0, KEY_F6, (UCHAR *) NULLP, 0}, /*Shift F6 - optional*/ {(UCHAR *) "Sk5", (UCHAR *) NULLP, 0, KEY_SF6, (UCHAR *) NULLP, 0}, /*Control F6 - optional*/ {(UCHAR *) "Ck5", (UCHAR *) NULLP, 0, KEY_CF6, (UCHAR *) NULLP, 0}, /*F7 - optional*/ {(UCHAR *) "k6", (UCHAR *) NULLP, 0, KEY_F7, (UCHAR *) NULLP, 0}, /*Shift F7 - optional*/ {(UCHAR *) "Sk6", (UCHAR *) NULLP, 0, KEY_SF7, (UCHAR *) NULLP, 0}, /*F8 - optional*/ {(UCHAR *) "k7", (UCHAR *) NULLP, 0, KEY_F8, (UCHAR *) NULLP, 0}, /*Shift F8 - optional*/ {(UCHAR *) "Sk7", (UCHAR *) NULLP, 0, KEY_SF8, (UCHAR *) NULLP, 0}, /*F9 - optional*/ {(UCHAR *) "k8", (UCHAR *) NULLP, 0, KEY_F9, (UCHAR *) NULLP, 0}, /*Ctrl-F9 - optional*/ {(UCHAR *) "Ck8", (UCHAR *) NULLP, 0, KEY_CF9, (UCHAR *) NULLP, 0}, /*F10 - optional*/ {(UCHAR *) "k9", (UCHAR *) NULLP, 0, KEY_F10, (UCHAR *) NULLP, 0}, /*Ctrl-F10 - optional*/ {(UCHAR *) "Ck9", (UCHAR *) NULLP, 0, KEY_CF10, (UCHAR *) NULLP, 0}, /*F11 - optional*/ {(UCHAR *) "k10", (UCHAR *) NULLP, 0, KEY_F11, (UCHAR *) NULLP, 0}, /*F12 - optional*/ {(UCHAR *) "k11", (UCHAR *) NULLP, 0, KEY_F12, (UCHAR *) NULLP, 0}, /*F13 - optional*/ {(UCHAR *) "k12", (UCHAR *) NULLP, 0, KEY_F13, (UCHAR *) NULLP, 0}, /*F14 - optional*/ {(UCHAR *) "k13", (UCHAR *) NULLP, 0, KEY_F14, (UCHAR *) NULLP, 0}, /*F15 - optional*/ {(UCHAR *) "k14", (UCHAR *) NULLP, 0, KEY_F15, (UCHAR *) NULLP, 0}, /*F16 - optional*/ {(UCHAR *) "k15", (UCHAR *) NULLP, 0, KEY_F16, (UCHAR *) NULLP, 0}, /*F17 - optional*/ {(UCHAR *) "k16", (UCHAR *) NULLP, 0, KEY_F17, (UCHAR *) NULLP, 0}, /*F18 - optional*/ {(UCHAR *) "k17", (UCHAR *) NULLP, 0, KEY_F18, (UCHAR *) NULLP, 0}, /*F19 - optional*/ {(UCHAR *) "k18", (UCHAR *) NULLP, 0, KEY_F19, (UCHAR *) NULLP, 0}, /*F20 - optional*/ {(UCHAR *) "k19", (UCHAR *) NULLP, 0, KEY_F20, (UCHAR *) NULLP, 0}, /*F21 - optional*/ {(UCHAR *) "k20", (UCHAR *) NULLP, 0, KEY_F21, (UCHAR *) NULLP, 0}, /*F22 - optional*/ {(UCHAR *) "k21", (UCHAR *) NULLP, 0, KEY_F22, (UCHAR *) NULLP, 0}, /*F23 - optional*/ {(UCHAR *) "k22", (UCHAR *) NULLP, 0, KEY_F23, (UCHAR *) NULLP, 0}, /*F24 - optional*/ {(UCHAR *) "k23", (UCHAR *) NULLP, 0, KEY_F24, (UCHAR *) NULLP, 0}, /*F25 - optional*/ {(UCHAR *) "k24", (UCHAR *) NULLP, 0, KEY_F25, (UCHAR *) NULLP, 0}, /*F26 - optional*/ {(UCHAR *) "k25", (UCHAR *) NULLP, 0, KEY_F26, (UCHAR *) NULLP, 0}, /*F27 - optional*/ {(UCHAR *) "k26", (UCHAR *) NULLP, 0, KEY_F27, (UCHAR *) NULLP, 0}, /*F28 - optional*/ {(UCHAR *) "k27", (UCHAR *) NULLP, 0, KEY_F28, (UCHAR *) NULLP, 0}, /*F29 - optional*/ {(UCHAR *) "k28", (UCHAR *) NULLP, 0, KEY_F29, (UCHAR *) NULLP, 0}, /*F30 - optional*/ {(UCHAR *) "k29", (UCHAR *) NULLP, 0, KEY_F30, (UCHAR *) NULLP, 0}, /*F31 - optional*/ {(UCHAR *) "k30", (UCHAR *) NULLP, 0, KEY_F31, (UCHAR *) NULLP, 0}, /*F32 - optional*/ {(UCHAR *) "k31", (UCHAR *) NULLP, 0, KEY_F32, (UCHAR *) NULLP, 0}, /*F33 - optional*/ {(UCHAR *) "k32", (UCHAR *) NULLP, 0, KEY_F33, (UCHAR *) NULLP, 0}, /*F34 - optional*/ {(UCHAR *) "k33", (UCHAR *) NULLP, 0, KEY_F34, (UCHAR *) NULLP, 0}, /*F35 - optional*/ {(UCHAR *) "k34", (UCHAR *) NULLP, 0, KEY_F35, (UCHAR *) NULLP, 0}, /*F36 - optional*/ {(UCHAR *) "k35", (UCHAR *) NULLP, 0, KEY_F36, (UCHAR *) NULLP, 0}, /*F37 - optional*/ {(UCHAR *) "k36", (UCHAR *) NULLP, 0, KEY_F37, (UCHAR *) NULLP, 0}, /*F38 - optional*/ {(UCHAR *) "k37", (UCHAR *) NULLP, 0, KEY_F38, (UCHAR *) NULLP, 0}, /*F39 - optional*/ {(UCHAR *) "k38", (UCHAR *) NULLP, 0, KEY_F39, (UCHAR *) NULLP, 0}, /*F40 - optional*/ {(UCHAR *) "k39", (UCHAR *) NULLP, 0, KEY_F40, (UCHAR *) NULLP, 0}, /*Ctrl-B - optional*/ {(UCHAR *) "Ckb", (UCHAR *) NULLP, 0, KEY_CB, (UCHAR *) NULLP, 0}, /*Ctrl-C - optional*/ {(UCHAR *) "Ckc", (UCHAR *) NULLP, 0, KEY_CC, (UCHAR *) NULLP, 0}, /*Ctrl-D - optional*/ {(UCHAR *) "Ckd", (UCHAR *) NULLP, 0, KEY_CD, (UCHAR *) NULLP, 0}, /*Ctrl-E - optional*/ {(UCHAR *) "Cke", (UCHAR *) NULLP, 0, KEY_CE, (UCHAR *) NULLP, 0}, /*Ctrl-F - optional*/ {(UCHAR *) "Ckf", (UCHAR *) NULLP, 0, KEY_CF, (UCHAR *) NULLP, 0}, /*Ctrl-L - optional*/ {(UCHAR *) "Ckl", (UCHAR *) NULLP, 0, KEY_CL, (UCHAR *) NULLP, 0}, /*Ctrl-M - optional*/ {(UCHAR *) "Ckm", (UCHAR *) NULLP, 0, KEY_CM, (UCHAR *) NULLP, 0}, /*Ctrl-O - optional*/ {(UCHAR *) "Cko", (UCHAR *) NULLP, 0, KEY_CO, (UCHAR *) NULLP, 0}, /*Ctrl-P - optional*/ {(UCHAR *) "Ckp", (UCHAR *) NULLP, 0, KEY_CP, (UCHAR *) NULLP, 0}, /*Ctrl-R - optional*/ {(UCHAR *) "Ckr", (UCHAR *) NULLP, 0, KEY_CR, (UCHAR *) NULLP, 0}, /*Ctrl-S - optional*/ {(UCHAR *) "Cks", (UCHAR *) NULLP, 0, KEY_CS, (UCHAR *) NULLP, 0}, /*Ctrl-T - optional*/ {(UCHAR *) "Ckt", (UCHAR *) NULLP, 0, KEY_CT, (UCHAR *) NULLP, 0}, /*Ctrl-V - optional*/ {(UCHAR *) "Ckv", (UCHAR *) NULLP, 0, KEY_CV, (UCHAR *) NULLP, 0}, /*Ctrl-W - optional*/ {(UCHAR *) "Ckw", (UCHAR *) NULLP, 0, KEY_CW, (UCHAR *) NULLP, 0}, /*Ctrl-X - optional*/ {(UCHAR *) "Ckx", (UCHAR *) NULLP, 0, KEY_CX, (UCHAR *) NULLP, 0}, /*Ctrl-Z - optional*/ {(UCHAR *) "Ckz", (UCHAR *) NULLP, 0, KEY_CZ, (UCHAR *) NULLP, 0}, /*Alt-A - optional*/ {(UCHAR *) "Aka", (UCHAR *) NULLP, 0, KEY_AA, (UCHAR *) NULLP, 0}, /*Alt-C - optional*/ {(UCHAR *) "Akc", (UCHAR *) NULLP, 0, KEY_AC, (UCHAR *) NULLP, 0}, /*Alt-D - optional*/ {(UCHAR *) "Akd", (UCHAR *) NULLP, 0, KEY_AD, (UCHAR *) NULLP, 0}, /*Alt-F - optional*/ {(UCHAR *) "Akf", (UCHAR *) NULLP, 0, KEY_AF, (UCHAR *) NULLP, 0}, /*Alt-I - optional*/ {(UCHAR *) "Aki", (UCHAR *) NULLP, 0, KEY_AI, (UCHAR *) NULLP, 0}, /*Alt-L - optional*/ {(UCHAR *) "Akl", (UCHAR *) NULLP, 0, KEY_AL, (UCHAR *) NULLP, 0}, /*Alt-M - optional*/ {(UCHAR *) "Akm", (UCHAR *) NULLP, 0, KEY_AM, (UCHAR *) NULLP, 0}, /*Alt-O - optional*/ {(UCHAR *) "Ako", (UCHAR *) NULLP, 0, KEY_AO, (UCHAR *) NULLP, 0}, /*Alt-S - optional*/ {(UCHAR *) "Aks", (UCHAR *) NULLP, 0, KEY_AS, (UCHAR *) NULLP, 0}, /*Alt-U - optional*/ {(UCHAR *) "Aku", (UCHAR *) NULLP, 0, KEY_AU, (UCHAR *) NULLP, 0}, }; GLOBAL int _qkeydefs = sizeof(_key_tbl) / sizeof(KEYDEF); #else /*VV_KEY */ GLOBAL KEYDEF _key_tbl[1]; GLOBAL int _qkeydefs = 0; /*Keyboard input not enabled */ #endif /*VV_KEY */ GLOBAL TD_FLD _td_tbl[] = { {(UCHAR *) "ct", (PTR) &_v_mode, TDF_BOOL, 0}, {(UCHAR *) "CA", (PTR) &_clr2att, TDF_BOOL, 0}, {(UCHAR *) "snow", (PTR) &_tsnow, TDF_BOOL, 0}, {(UCHAR *) "xi", (PTR) &_tscrl, TDF_BOOL, 0}, {(UCHAR *) "G1", (PTR) &_bdr_sln.uprt_ch, TDF_CHAR, 0}, {(UCHAR *) "GD1", (PTR) &_bdr_dln.uprt_ch, TDF_CHAR, 0}, {(UCHAR *) "G2", (PTR) &_bdr_sln.uplft_ch, TDF_CHAR, 0}, {(UCHAR *) "GD2", (PTR) &_bdr_dln.uplft_ch, TDF_CHAR, 0}, {(UCHAR *) "G3", (PTR) &_bdr_sln.lowlft_ch, TDF_CHAR, 0}, {(UCHAR *) "GD3", (PTR) &_bdr_dln.lowlft_ch, TDF_CHAR, 0}, {(UCHAR *) "G4", (PTR) &_bdr_sln.lowrt_ch, TDF_CHAR, 0}, {(UCHAR *) "GD4", (PTR) &_bdr_dln.lowrt_ch, TDF_CHAR, 0}, {(UCHAR *) "GH", (PTR) &_bdr_sln.up_ch, TDF_CHAR, 0}, {(UCHAR *) "GDH", (PTR) &_bdr_dln.up_ch, TDF_CHAR, 0}, {(UCHAR *) "GV", (PTR) &_bdr_sln.lft_ch, TDF_CHAR, 0}, {(UCHAR *) "GDV", (PTR) &_bdr_dln.lft_ch, TDF_CHAR, 0}, {(UCHAR *) "pc", (PTR) &_tpad_ch, TDF_CHAR, 0}, {(UCHAR *) "co", (PTR) &(_vid_scr.col_q), TDF_INT, 0}, {(UCHAR *) "li", (PTR) &(_vid_scr.row_q), TDF_INT, 0}, {(UCHAR *) "sg", (PTR) &_rglitch, TDF_INT, 0}, {(UCHAR *) "ug", (PTR) &_uglitch, TDF_INT, 0}, {(UCHAR *) "GG", (PTR) &_gglitch, TDF_INT, 0}, {(UCHAR *) "BG", (PTR) &_bglitch, TDF_INT, 0}, {(UCHAR *) "HG", (PTR) &_hglitch, TDF_INT, 0}, {(UCHAR *) "cm", (PTR) &_csr_cmd[CSR_POS], TDF_STR , 0}, {(UCHAR *) "so", (PTR) &_va_cmd[VA_REVERSE][VA_ON], TDF_STR, 0}, {(UCHAR *) "se", (PTR) &_va_cmd[VA_REVERSE][VA_OFF], TDF_STR, 0}, {(UCHAR *) "HS", (PTR) &_va_cmd[VA_HIGH_INT][VA_ON], TDF_STR, 0}, {(UCHAR *) "HR", (PTR) &_va_cmd[VA_HIGH_INT][VA_OFF], TDF_STR, 0}, {(UCHAR *) "us", (PTR) &_va_cmd[VA_UNDERLINE][VA_ON], TDF_STR, 0}, {(UCHAR *) "ue", (PTR) &_va_cmd[VA_UNDERLINE][VA_OFF], TDF_STR, 0}, {(UCHAR *) "BB", (PTR) &_va_cmd[VA_BLINK][VA_ON], TDF_STR, 0}, {(UCHAR *) "BR", (PTR) &_va_cmd[VA_BLINK][VA_OFF], TDF_STR, 0}, {(UCHAR *) "GS", (PTR) &_va_cmd[VA_BLK_GRPH][VA_ON], TDF_STR, 0}, {(UCHAR *) "GE", (PTR) &_va_cmd[VA_BLK_GRPH][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl0", (PTR) &_va_cmd[VA_COLOR1][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl0", (PTR) &_va_cmd[VA_COLOR1][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl1", (PTR) &_va_cmd[VA_COLOR2][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl1", (PTR) &_va_cmd[VA_COLOR2][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl2", (PTR) &_va_cmd[VA_COLOR3][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl2", (PTR) &_va_cmd[VA_COLOR3][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl3", (PTR) &_va_cmd[VA_COLOR4][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl3", (PTR) &_va_cmd[VA_COLOR4][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl4", (PTR) &_va_cmd[VA_COLOR5][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl4", (PTR) &_va_cmd[VA_COLOR5][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl5", (PTR) &_va_cmd[VA_COLOR6][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl5", (PTR) &_va_cmd[VA_COLOR6][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl6", (PTR) &_va_cmd[VA_COLOR7][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl6", (PTR) &_va_cmd[VA_COLOR7][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl7", (PTR) &_va_cmd[VA_COLOR8][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl7", (PTR) &_va_cmd[VA_COLOR8][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl8", (PTR) &_va_cmd[VA_COLOR9][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl8", (PTR) &_va_cmd[VA_COLOR9][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl9", (PTR) &_va_cmd[VA_COLOR10][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl9", (PTR) &_va_cmd[VA_COLOR10][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl10", (PTR) &_va_cmd[VA_COLOR11][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl10", (PTR) &_va_cmd[VA_COLOR11][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl11", (PTR) &_va_cmd[VA_COLOR12][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl11", (PTR) &_va_cmd[VA_COLOR12][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl12", (PTR) &_va_cmd[VA_COLOR13][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl12", (PTR) &_va_cmd[VA_COLOR13][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl13", (PTR) &_va_cmd[VA_COLOR14][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl13", (PTR) &_va_cmd[VA_COLOR14][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl14", (PTR) &_va_cmd[VA_COLOR15][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl14", (PTR) &_va_cmd[VA_COLOR15][VA_OFF], TDF_STR, 0}, {(UCHAR *) "scl15", (PTR) &_va_cmd[VA_COLOR16][VA_ON], TDF_STR, 0}, {(UCHAR *) "rcl15", (PTR) &_va_cmd[VA_COLOR16][VA_OFF], TDF_STR, 0}, {(UCHAR *) "nd", (PTR) &_csr_cmd[CSR_RIGHT], TDF_STR, 0}, {(UCHAR *) "do", (PTR) &_csr_cmd[CSR_DOWN], TDF_STR, 0}, {(UCHAR *) "cl", (PTR) &_scr_cmd[SCR_CLEAR], TDF_STR, 0}, {(UCHAR *) "CO", (PTR) &_csr_cmd[CSR_ON], TDF_STR, 0}, {(UCHAR *) "CF", (PTR) &_csr_cmd[CSR_OFF], TDF_STR, 0}, {(UCHAR *) "CB", (PTR) &_csr_cmd[CSR_BLOCK], TDF_STR, 0}, {(UCHAR *) "CL", (PTR) &_csr_cmd[CSR_LINE], TDF_STR, 0}, {(UCHAR *) "BE", (PTR) &_kbd_cmd[KBD_BELL], TDF_STR, 0}, {(UCHAR *) "ks", (PTR) &_kbd_cmd[KBD_SETPAD], TDF_STR, 0}, {(UCHAR *) "ke", (PTR) &_kbd_cmd[KBD_RESETPAD], TDF_STR, 0}, {(UCHAR *) "is", (PTR) &_tinit_st, TDF_STR, 0}, {(UCHAR *) "tc", (PTR) &_sterm, TDF_STR, 0} }; GLOBAL int _qtd_flds = sizeof(_td_tbl) / sizeof(TD_FLD); /******************************************************************************/ /* */ /* Globals necessary for the debugging system */ /* */ /******************************************************************************/ #ifdef VV_DEBUG GLOBAL UCHAR *_dblog[DBLOGSIZE]; /* call log - a circular list */ GLOBAL int _dblogq = DBLOGSIZE; /* size of call log list */ GLOBAL UCHAR *_dbstk; /* pointer to call stack */ GLOBAL int _dbstkq = DBSTKSIZE; /* maximum size of call stack */ GLOBAL UCHAR *_dbstkp; /* current position in call stack */ GLOBAL UCHAR *_dbstklim; /* last position in call stack */ GLOBAL MFLINEPTR *_dblogp; /* pointer to log memory file */ GLOBAL int _dblogbeg = 0; /* beginning index of call log list */ GLOBAL int _dblogcur = -1; /* current entry in call log list */ GLOBAL UINT _dblogsum = 0; /* checksum for call log */ GLOBAL UINT _dbstksum = 0; /* checksum for call stack */ GLOBAL UCHAR _db_yes = 'y'; /* valid debugging positive response */ GLOBAL UCHAR _db_no = 'n'; /* valid debugging negative response */ #else #ifdef VV_ERRF /* these globals used by SYS_ERRF() */ GLOBAL UCHAR _db_yes = 'y'; /* valid debugging positive response */ GLOBAL UCHAR _db_no = 'n'; /* valid debugging negative response */ #endif /* VV_ERRF */ #endif /* VV_DEBUG */ #endif **************** CUT HERE ******************* /* vv_form.h ************* Copyright 1988 by Vermont Creative Software ************** Description The header file enabling the basic form processing system. */ /* Do not allow to process the file more than once */ #ifndef VV_FORM #define VV_FORM /* If this file #included directly, enable the data processing system */ #ifndef VV_MENU #ifndef VV_MEMO #ifndef VV_FIELD #define VV_FIELD #endif #endif #endif /******************************************************************************/ /* Include the subsidiary header files */ /******************************************************************************/ /* Include the keyboard input system */ #ifndef VV_KEY #include #endif /******************************************************************************/ /* */ /* Preprocessor symbol definitions */ /* */ /******************************************************************************/ /******************************************************************************/ /* Constants defined for convenience */ /******************************************************************************/ /*----------------------------------------------------------------------------*/ /* Definitions for specific form types */ /*----------------------------------------------------------------------------*/ #define DFORM FORM #define DFORMPTR FORMPTR #define MFORM FORM #define MFORMPTR FORMPTR /*----------------------------------------------------------------------------*/ /* Definitions for controlling placement of fields with fld_tdef() */ /*----------------------------------------------------------------------------*/ #define FADJACENT -1 #define FBELOW -2 #define FABOVE -3 /*----------------------------------------------------------------------------*/ /* Definitions for window scrolling in virtual forms */ /*----------------------------------------------------------------------------*/ #define MINIMUM 32000 /*move the minimum to show the field */ #define RTJUST 32001 /*right justify the new field */ #define LFTJUST 32002 /*left justify the new field */ #define CENTERFLD 32003 /*center the new field */ #define PAGE 32004 /*move one page up or one page down */ #define DONTSCROLL 32005 /*internal #define... no scrolling */ /*----------------------------------------------------------------------------*/ /* All system defined field types. The appropriate field specific header */ /* files must be used to enable them. */ /*----------------------------------------------------------------------------*/ #define VCSFLDTYPEQ 12 /*number of VCS predefined field types*/ #define USRFLDTYPEQ 0 /*number of user defined field types */ #define F_BOOL 0 /*boolean field type */ #define F_CHAR 1 /*character field type */ #define F_STRING 2 /*string field type */ #define F_DATE 3 /*date field type */ #define F_TIME 4 /*time field type */ #define F_SHORT 5 /*short integer field type */ #define F_INT 6 /*integer field type */ #define F_LONG 7 /*long integer field type */ #define F_DECIMAL 8 /*decimal field type */ #define F_FLOAT 9 /*floating point field type */ #define F_MEMO 10 /*memo field */ #define F_MENU 11 /*menu field */ /*----------------------------------------------------------------------------*/ /* Definitions for offsets in the data structure array */ /*----------------------------------------------------------------------------*/ #define QALIGN 11 /*Number of items in array */ #define OFF_CHAR 0 /*offset in alignment array for chars */ #define OFF_STRING 1 /*offset in alignment array for string*/ #define OFF_SHORT 2 /*offset in alignment array for shorts*/ #define OFF_INT 3 /*offset in alignment array for ints */ #define OFF_LONG 4 /*offset in alignment array for longs */ #define OFF_FLOAT 5 /*offset in alignment array for floats*/ #define OFF_DOUBLE 6 /*offset in alignment array for dbls */ #define OFF_SMSTRC 7 /*offset in alignment -small structure*/ #define OFF_LGSTRC 8 /*offset in alignment -large structure*/ #define OFF_MNSTRC 9 /*offset in alignment -mini structure */ #define OFF_HGSTRC 10 /*offset in alignment -huge structure */ /*----------------------------------------------------------------------------*/ /* Definitions for accessing picture symbol table */ /*----------------------------------------------------------------------------*/ #define ANYASCII 0 /*any ascii character */ #define ANYALPHA 1 /*any alpha character */ #define DIGIT 2 /*digits 0-9, -, + */ #define NUMBER 3 /*digits 0-9, -, +, ., E */ #define ASCIITOUP 4 /*any ascii to uppercase */ #define SOFT_DEC 5 /*soft decimal point for left decimal */ #define ANYCHAR 6 /*any character that can be generated */ #define UN_SIGNED 7 /*digits 0-9 */ /*----------------------------------------------------------------------------*/ /* Definitions for accessing field information flags */ /*----------------------------------------------------------------------------*/ #define ALLOW_PROT_CH 0x0001 /*protected characters are permitted */ #define ALLOW_DECIMAL 0x0002 /*decimal point (soft or hard) is ok */ #define ALLOW_E 0x0004 /*the exponential symbol (E) is ok */ #define ALLOW_MULT_PICSYM 0x0008 /*multiple picture symbols are ok */ /*----------------------------------------------------------------------------*/ /* Definitions for accessing field flag */ /*----------------------------------------------------------------------------*/ /* Field Display Options */ #define INITIALBLANKS 0x00000001L /*no display of initial value */ #define CLEARONKEY 0x00000002L /*Clear field on first editing key */ #define RTADJUST 0x00000004L /*Field contents are right justified */ #define LFTADJUST 0x00000008L /*Field contents are left justified */ #define NOECHO 0x00000010L /*Do not echo entered characters */ #define THSEPARATOR 0x00000020L /*Use 1000's separators */ /* Data Entry Options */ #define RTENTRY 0x00000040L /*Field is right-to-left entry */ #define REQUIRED 0x00000080L /*Field must be entered before exiting*/ #define FILL 0x00000100L /*Must fill all field columns or none */ #define PROTECTED 0x00000200L /*Field can be entered but not edited */ #define SKIP 0x00000400L /*Skip field or */ #define UNAVAILABLE SKIP /* unavailable menu item */ #define CHKTRUNCATE 0x00000800L /*No loss of precision allowed */ #define INSERTINIT 0x00001000L /*Put editor in insert mode */ /* Data Conversion Options */ #define PICSKIP 0x00002000L /*Skip protected characters in string */ #define TRAILBLANKS 0x00004000L /*Keep trailing blanks when converting*/ #define FORCECONVERT 0x00008000L /*Force conversion on field exit */ #define KEEPNEWLINES 0x00010000L /*Keep newlines when converting memo */ /* Internal Flags */ #define PUREFLD 0x00020000L /*All picture symbols are the same */ #define FLDALTERED 0x00040000L /*Field has been modified */ #define FLDVALID 0x00080000L /*Field has passed validation */ #define PROTPIC 0x00100000L /*Picture has protected characters */ #define INSFAIL 0x00200000L /*The previous memo insertion failed */ #define MNCHECKSTATUS 0x00400000L /*checkmark ON/OFF for menu field */ #define MNSELECT 0x00800000L /*auto select current item */ #define FLDREDISPLAY 0x01000000L /*force redisplay of field */ /* VVD Options */ #define OMITFROMSTRUCT 0x02000000L /*Not used in data struct resolving */ #define RTJUSTIFY RTENTRY | CLEARONKEY | RTADJUST #define MUSTFILL FILL | REQUIRED /* VVD flags */ #define FLDSUB_OK 0x00000001L /*field sub-forms references resolved */ #define FLDDATA_OK 0x00000002L /*field data variables resolved */ #define FLDCLIST_OK 0x00000004L /*choice list memory files resolved */ #define FLDAUTORD 0x00000008L /*sub-form automatically read */ #define SUBDATA 0x00000010L /*sub-form is a data form */ /*----------------------------------------------------------------------------*/ /* Definitions for accessing the form flags */ /*----------------------------------------------------------------------------*/ /* Form Flags */ #define AUTOEXIT 0x00000001L /*exit if move down from last item */ #define AUTOMOVE 0x00000002L /*move to next field when field full */ #define CURSORCROSS 0x00000004L /*right or left arrow automatically */ /*moves to the next or previous field */ #define CURSORFREE 0x00000008L /*move physically up or down rather */ /*than logically previous or next */ #define VERIFYEXIT 0x00000010L /*verify when exiting a form */ #define VERIFYQUIT 0x00000020L /*verify when quiting a form */ #define FMWRAP 0x00000040L /*wrap around between the first and */ /*last items on a form */ /* Menu Only Flags */ #define MNCHSELECT 0x00000100L /*enable single-character selection */ #define MNTOPESCAPE 0x00000200L /*enable ESCape from top-level menu */ #define MNCONFIRM 0x00000400L /*require confirmation of char select */ #define MNMSGAUTOPLACE 0x00000800L /*automatically place message window */ #define MNREDISPLAY 0x00001000L /*redisplay each menu form level */ #define MNAUTOSELECT 0x00002000L /*automatically select sub-menu */ #define MNSTANDARD 0x00000000L /*not MNAUTOSELECT */ /* Internal Flags - all forms */ #define FMREADY 0x00004000L /*the form is prepared for processing */ #define FMVVD 0x00008000L /*this is an VVD form */ #define FMUP 0x00010000L /*the form is up */ #define FMALTERED 0x00020000L /*the form has been altered */ #define FIRSTKEY 0x00040000L /*no key has been pressed for this fld*/ #define FMVALID 0x00080000L /*the form has been validated */ #define INSERTMODE 0x00100000L /*editor in insert mode on field init */ #define MNAUTOPLACE 0x00200000L /*enable dynamic menu placement */ #define MNAUTOSIZE 0x00400000L /*enable dynamic menu sizing */ #define MNVAUTOSIZE 0x00800000L /*enable dynamic virtual menu sizing */ #define MNMVRIGHT 0x01000000L #define MNMVLEFT 0x02000000L #define REQAUTOMOVE 0x04000000L /*set when AUTOMOVE condition detected*/ #define BGREADY 0x08000000L /*background is displayed */ #define NOREALFLDS 0x10000000L /*no non-skip data fields */ #define FMMARKED 0x20000000L /* VVD flags */ #define FMFUNCS_OK 0x00000001L /*form function references resolved */ #define FMSUBFM_OK 0x00000002L /*all sub-form references resolved */ #define FMDATA_OK 0x00000004L /*all data variable refs resolved */ #define FMCLIST_OK 0x00000008L /*choice list memory file refs resolve*/ #define FMSUBMN_OK 0x00000010L /*all sub-menu references resolved */ #define CK_FLD_RES 0x00000020L /*Checked the fild resolving already */ #define SR_LG_STRUC 0x00000040L /*Scroll region uses large data struct*/ #define FMAUTORD 0x00000080L /*form automatically read */ #define SR_SM_STRUC 0x00000200L /*Scroll region uses small data struct*/ #define SR_MN_STRUC 0x00000400L /*Scroll region uses mini data struct */ #define SR_OMIT 0x00000800L /*Scroll region omit from form struct */ #define SR_HG_STRUC 0x00001000L /*Scroll region uses huge data struct */ /*----------------------------------------------------------------------------*/ /* Return values for Menu Action functions */ /*----------------------------------------------------------------------------*/ #define SAMELEVEL 0 #define TOPLEVEL -1 #define EXITMENU -2 #define FUNCERROR -999 /******************************************************************************/ /* User accessible global variables */ /******************************************************************************/ #define VAL_ERR _val_err /*Validation error index */ #define VAL_ERRLAST _val_last /*Last validation error index */ #define VAL_MSG _errmsgp /*Additional validation message */ #define FM_WNP (&_fm_wn) /*default form window */ #define ERR_WNP (&_err_wn) /*user error window */ /******************************************************************************/ /* Validation Error message definitions for the data field validation */ /******************************************************************************/ /* Quantity of VCS defined validation error codes used to set VAL_ERR */ #define VCSVALQ 20 /*reserve 0 for no error */ #define INV_BOOL 1 /*Entry must be */ #define INV_DATE 2 /*Invalid date - date must be */ #define INV_TIME 3 /*Invalid time */ #define MULT_EXP 4 /*Cannot contain multiple exponent */ #define MULT_POINTS 5 /*Cannot contain multiple points */ #define MULT_SIGN 6 /*Multiple signs not permitted */ #define NOT_FILLED 7 /*Entry must completely fill the field*/ #define NO_BLANKS 8 /*Embedded blanks not permitted */ #define NO_CHOICE 9 /*No choices available */ #define NO_DECPOINT 10 /*Decimal point not allowed */ #define NO_EXP 11 /*Exponential notation not allowed */ #define NO_RTJUST 12 /*Right justification is not possible */ #define OUTOFRANGE 13 /*Value is too large or small */ #define POINTINEXP 14 /*Point cannot occur in exponent */ #define PROT_FIELD 15 /*This is a protected field */ #define REQ_FIELD 16 /*Field entry required */ #define SIGN_FIRST 17 /*Sign must occur first */ #define DECTRUNCATE 18 /*Too many decimal places entered */ #define FLOATTRUNCATE 19 /*Number will be truncated on redispla*/ /******************************************************************************/ /* */ /* Data structure definitions */ /* */ /******************************************************************************/ /*----------------------------------------------------------------------------*/ /* Major structure tags */ /*----------------------------------------------------------------------------*/ #define DFLDTAG (((UINT) 'F' << 8) + 'D') /*Data Field Tag */ #define MFLDTAG (((UINT) 'N' << 8) + 'M') /*Menu Field Tag */ #define MEMOTAG (((UINT) 'D' << 8) + 'E') /*Memo Field Tag */ #define FORMTAG (((UINT) 'R' << 8) + 'F') /*Form Tag */ #define SRTAG (((UINT) 'R' << 8) + 'F') /*Scrollable Region Tag */ #define BGTXTTAG (((UINT) 'X' << 8) + 'T') /*Background Text Tag */ #define BGBOXTAG (((UINT) 'O' << 8) + 'B') /*Background Box Tag */ #define BGFILLTAG (((UINT) 'L' << 8) + 'F') /*Background Fill Tag */ #define BGLINETAG (((UINT) 'I' << 8) + 'L') /*Background Line Tag */ #define FIELDTAG (((UINT) 'T' << 8) + 'F') /*Field type tag */ /*----------------------------------------------------------------------------*/ /* VV/VVD function resolving structures */ /*----------------------------------------------------------------------------*/ typedef struct /*Pointers for form resolving */ { UCHAR *srl; /*Form scroll function */ UCHAR *beg; /*Begin Form function */ UCHAR *end; /*End form function */ UCHAR *val; /*Validation form function */ } FMRES, *FMRESPTR; typedef struct /*Pointers for SR resolving */ { UCHAR *srl; /*scroll data in scroll region */ UCHAR *beg; /*Begin scroll region function */ UCHAR *end; /*End scroll region function */ UCHAR *rowbeg; /*Begin Scroll Region Row function */ UCHAR *rowend; /*End Scroll Region Row function */ } SRRES, *SRRESPTR; typedef struct /*Pointers for field resolving */ { UCHAR *beg; /*Begin Field function */ UCHAR *end; /*End Field function */ UCHAR *val; /*Validation field function */ UCHAR *act; /*Action function */ UCHAR *sub_form; /*Subform used in menus */ } FLDRES, *FLDRESPTR; typedef struct bgtxt_struct /*BACKGROUND TEXT STRUCTURE */ { UINT tag; /*structure tag */ UCHAR *txtp; /*pointer to background text string */ UCHAR att; /*video attribute for background text */ UCHAR dummy; /*for word alignment */ int rb; /*beginning window-row of text */ int cb; /*beginning window-col of text */ short fld_id; /*field id if it is a prompt */ }BG_TXT, *BG_TXTPTR; typedef struct bgbox_struct /*BACKGROUND BOX STRUCTURE */ { UINT tag; /*structure tag */ BORDERPTR bdrp; /*pointer to background border type */ UCHAR att; /*video attribute for background text */ UCHAR dummy; /*form word alignment */ int rb; /*beginning window-row of box */ int cb; /*beginning window-col of box */ int rq; /*ending window-row of box */ int cq; /*ending window-col of box */ }BG_BOX, *BG_BOXPTR; typedef struct bgfill_struct /*BACKGROUND FILL STRUCTURE */ { UINT tag; /*structure tag */ UCHAR att; /*video attribute for background text */ UCHAR ch; /*form word alignment */ int type; /*the move type */ int rb; /*beginning window-row of region */ int cb; /*beginning window-col of region */ int rq; /*ending window-row of region */ int cq; /*ending window-col of region */ }BG_FILL, *BG_FILLPTR; typedef struct bgline_struct /*BACKGROUND LINE STRUCTURE */ { UINT tag; /*structure tag */ LINEPTR stylep; /*pointer to background line style */ UCHAR att; /*video attribute for background text */ UCHAR dummy; /*form word alignment */ int rb; /*beginning window-row of text */ int cb; /*beginning window-col of text */ int len; /*the length of the line */ int dir; /*the direction of the line */ }BG_LINE, *BG_LINEPTR; typedef struct toggle_struct /*BOOLEAN TOGGLE STRUCTURE */ { UCHAR *st_yes; /*string to display for Boolean TRUE */ UCHAR *st_no; /*string to display for Boolean FALSE */ UCHAR att_yes; /*attribute for display of st_true */ UCHAR att_no; /*attribute for display of st_false */ } TOGGLE, *TOGGLEPTR; typedef struct form_struct /*FORM STRUCTURE */ { UINT tag; /*sentinel */ WINDOWPTR wnp; /*pointer to form window */ int nextact; /*next action code or next item offset*/ long flags; /*form flags */ long vvd_flags; /*VV Designer flags */ UCHAR *name; /*form name */ UCHAR *help; /*form help keyword */ struct form_struct *nd_fmp; /*previous form in the global list */ int type; /*form type */ int itemq; /*number of items on the form */ int cur_item; /*current form item */ int nextitem_offset; /*offset of the next item */ NODEPTR item_hdndp; /*head of list of form items */ NODEPTR bg_hdndp; /*head of list of static items */ PTR *item_arrayp; /*item map */ int max_cvbuf; /*longest conversion buffer required */ UCHAR *cvbufp; /*conversion buffer pointer */ PFI scrlfp; /*scroll function pointer */ PFI begfp; /*begin form function pointer */ PFI endfp; /*end form function pointer */ PFI valfp; /*user form validation function ptr */ WINDOWPTR err_wnp; /*pointer to error window */ WINDOWPTR msg_wnp; /*pointer to message window */ int prev_item; /*previous form item */ int mncheckmark; /*check mark character */ int hfldscrlq; /*field horizontal scroll quantity */ int vfldscrlq; /*field vertical scroll quantity */ struct form_struct *prev_fmp; /*previous form */ struct form_struct *next_fmp; /*next form */ struct form_struct *parent_fmp; /*parent form */ struct form_struct *child_fmp; /*child form */ PTR userp; /*user pointer */ int ret_level; /*return call for FORMCALL */ UCHAR *lib_name; /*VVD library name for log att array */ UCHAR *vvd_stbuff; /*VV Designer permanent string buffer */ UCHAR *vvd_resbuff; /*VVD resolving external buffer */ UCHAR *next_fmstr; /*VVD next form string */ UCHAR *prev_fmstr; /*VVD previous form string */ FMRESPTR fmresp; /*VVD resolving pointers */ } FORM, *FORMPTR; typedef struct sr_struct /*SCROLLABLE REGION STRUCTURE */ { UINT tag; /*sentinel */ WINDOWPTR wnp; /*pointer to form window */ int nextact; /*next action code or next item offset*/ long flags; /*scrollable region flags */ long vvd_flags; /*VV Designer flags */ UCHAR *name; /*scrollable region name */ UCHAR *help; /*scrollable region help keyword */ MFILEPTR vvd_helpmfp; /*VV Designer help memory file */ int type; /*type */ int itemq; /*number of fields in the region */ int cur_item; /*current scrollable region field */ int nextitem_offset; /*offset of the next field */ NODEPTR item_hdndp; /*head of list of sr fields */ NODEPTR bg_hdndp; /*head of list of static items */ PTR *item_arrayp; /*field map */ int max_cvbuf; /*longest conversion buffer required */ UCHAR *cvbufp; /*conversion buffer pointer */ PFI scrlfp; /*scroll function pointer */ PFI begfp; /*begin region function pointer */ PFI endfp; /*end region function pointer */ PFI rowbegfp; /*begin row function pointer */ PFI rowendfp; /*end row function pointer */ int rb; /*row begin of scrollable region */ int cb; /*column begin of scrollable region */ int row_q; /*number of visible rows */ int col_q; /*number of columns per row */ UCHAR att; /*scrollable region background att */ UCHAR dummy; /*for word alignment */ int datarowq; /*number of rows in data array */ int datacolq; /*number of fields per row */ int first_visrow; /*row number of first visible row */ int maxrow_disp; /*last data row displayed */ unsigned rec_size; /*size of the record structure */ UCHAR * base_addr; /*base addr of struc and string arrays*/ PTR userp; /*user pointer */ DFORMPTR fmp; /*parent form */ SRRESPTR srresp; /*VVD resolving pointers */ } SR, *SRPTR; typedef struct memo_struct /*MEMO STRUCTURE */ { UINT tag; /*sentinel */ long flags; /*memo field flags */ long vvd_flags; /*VV Designer flags */ UCHAR *name; /*memo field name */ UCHAR *help; /*help message or keyword */ int type; /*the field type */ int row;