home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a002 / 7.ddi / INCLUDE / SYBFRS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-24  |  33.8 KB  |  1,118 lines

  1. /*    sybfrs.h    49.1    4/14/89    */
  2.  
  3. /*
  4. ** SYBFRS.H 
  5. **
  6. ** Forms runtime system (frs) object definitions.
  7. */
  8.  
  9. /* If screenio.h hasn't been included yet, go and get it.  */
  10.  
  11. #ifndef SCREENIO
  12. #include <screenio.h>
  13. #endif
  14.  
  15. /*
  16. ** Basic types
  17. */
  18. typedef    short        SYMTYPE; 
  19. typedef    DBINT            ID;
  20. typedef    short        OBJTYPE;
  21. typedef    short        PICTYPE;
  22. typedef    short        LINTYPE;
  23. typedef    short        SELSTATE;
  24. typedef    short        MENURETURN;
  25. typedef    short        DATATYPE;
  26.  
  27. /*
  28. ** Flag definitions for the flags in the field, group and form structures.
  29. ** These flags are used by clients when calling flags set/clear functions.
  30. */
  31.  
  32. #define        FRS_NOSTOP    0x1
  33. #define        FRS_READONLY    0x2
  34. #define        FRS_MUSTENTER    0x4
  35. #define        FRS_INVISIBLE    0x8
  36. #define        FRS_NOINIT    0x10
  37. #define        FRS_ORDERED    0x20
  38. #define        FRS_RETMENUS    0x40
  39. #define        FRS_CHARMOVE     0x80
  40. #define        FRS_SAVEMODS    0x100
  41. #define        FRS_NOECHO    0x200
  42. #define        FRS_HILITE    0x400
  43. #define        FRS_MODIFIED    0x800
  44. #define        FRS_NOREDRAW    0x1000
  45. #define        FRS_TYPECHECK    0x2000
  46. #define        FRS_AUTOTAB    0x4000
  47. #define        FRS_SAVEORIG    0x8000
  48. #define        FRS_INHERITFKEY 0x10000
  49.  
  50. /*
  51. ** Flag definitions for the flags offered as fsprint options.
  52. */
  53. #define        FRS_HEADER    0x1
  54.  
  55. /*
  56. ** Maximum Nesting level for groups.
  57. */
  58.  
  59. #define        MAXNEST        10
  60.  
  61. /*
  62. ** Display and data list traversal types.
  63. */
  64.  
  65. typedef    short        TRAVTYPE;
  66.  
  67. #define        TRAVVIS        (TRAVTYPE)0
  68. #define        TRAVALL        (TRAVTYPE)1
  69. #define        TRAVTPLT    (TRAVTYPE)2
  70. #define        TRAVCLR        (TRAVTYPE)3
  71.  
  72. /*
  73. ** Defines used by frsrefresh.
  74. */
  75.  
  76. #define        WRTFLPROMPT    1
  77. #define        WRTGPPROMPT    2
  78. #define        WRTDATA        4
  79. #define        WRTFEDDATA    8
  80.  
  81. /* 
  82. ** Defines used for scrolling groups and picklists.
  83. */
  84.  
  85. #define        FRS_SCROLLUP    1
  86. #define        FRS_SCROLLDOWN    2
  87. #define        FRS_ASCROLLUP    3
  88. #define        FRS_ASCROLLDOWN    4
  89.  
  90. /* 
  91. ** Defines used by frslocpic.
  92. */
  93.  
  94. typedef    int        LOCTYPE;
  95.  
  96. #define        OFFFLD        (LOCTYPE)0
  97. #define        ONFLD        (LOCTYPE)1
  98.  
  99. /*
  100. ** Define used by frsvalues.
  101. */
  102.  
  103. #define        FRSVALUES_SEP    '\001'
  104.  
  105. /*
  106. ** Defines used when adding objects to linked lists.
  107. */
  108.  
  109. #define        TO_BEGINNING    1
  110. #define        TO_END        2
  111. #define        TO_RELATIVE    3
  112.  
  113. /*
  114. ** Define used to control quitting a processing list in frsprocess().
  115. */
  116. #define        PROCESS_QUIT    2
  117.         
  118. /*
  119. ** Index Descriptor.
  120. */
  121.  
  122. typedef    struct    objindex
  123. {
  124.     int    oinumindex;        /* Number of indexes in index array */
  125.     int    oiindexes[MAXNEST];    /* Actual indexes (zero based) */
  126. } OBJINDEX;
  127.  
  128. /*
  129. ** Form Descriptor.
  130. */
  131.  
  132. typedef    struct formdsc
  133. {
  134.     ID    fmdid;            /* Form id */
  135.     char    *fmdname;        /* Form name */
  136.     char    *fmdversion;        /* Form version */
  137. } FORMDSC;
  138.  
  139. /*
  140. ** Form symbol table record.
  141. */
  142.  
  143. typedef    struct    formst
  144. {
  145.     char    *fst_name;    /* Pointer to name of symbol in the form.  */
  146.     ID    fst_id;        /* ID of the field, group, or menu item.   */
  147.     SYMTYPE    fst_type;    /* Type of symbol (see symbol types above) */    
  148.     POINTER    fst_dsc;    /* Descriptor for symbol */
  149. } FORMST;
  150.  
  151. /*
  152. ** Useform structure.
  153. */
  154.  
  155. typedef struct useformrec
  156. {
  157.     ID            objid;        /* object id in form */
  158.     char            *name;        /* pointer to name string */
  159.     SYMTYPE             stype;        /* symbol type */
  160.     DBINT            sdatatype;    /* datatype */
  161.     int            index;        /* poition in list, 1 = first */
  162.     struct useformrec    *parent;    /* NULL if not grouped */
  163.     struct useformrec    *next;        /* next in list; NULL ends */
  164. } USEFORMREC;
  165.  
  166. /*
  167. ** Line Descriptor.
  168. */
  169.  
  170. #define        FRMVERTLINE    (LINTYPE)0
  171. #define        FRMHORIZLINE    (LINTYPE)1
  172.  
  173. typedef    struct    frmline
  174. {
  175.     LINTYPE    liorient;    /* Line orientation (horiz or vertical) */    
  176.     REGION    liregion;    /* Region of line */
  177.     REGION    lioldreg;    /* New region (used by move, copy) */
  178.     struct    frmline    *linext;    /* Next line in the list */
  179.     struct    frmline    *liprev;    /* Previous line in the list */
  180. } FRMLINE;
  181.  
  182. /*
  183. ** Box Descriptor.
  184. */
  185.  
  186. typedef    struct    frmbox
  187. {
  188.     REGION    bxregion;    /* Region of the box */
  189.     REGION    bxoldreg;    /* New region (used by move, copy) */
  190.     struct    frmbox    *bxnext;    /* Next box in list */
  191.     struct    frmbox    *bxprev;    /* Previous box in list */
  192. } FRMBOX;
  193.  
  194. /*
  195. ** Database table descriptor.
  196. */
  197.  
  198. typedef    struct    tbldsc
  199. {
  200.     char    *tdsitename;    /* Site name.*/
  201.     char    *tddbname;    /* Database name.*/
  202.     char    *tdowner;    /* Table owner name. */
  203.     char    *tdtablename;    /* Table name.*/
  204.     char    *tdcolname;    /* Column name.*/
  205. } TBLDSC;
  206.  
  207. /*
  208. ** SQL Descriptor.
  209. */
  210.  
  211. typedef struct    sqldsc
  212. {
  213.     char    *sqltext;    /* Actual SQL statement (NULL if stored proc) */
  214.     char    *sqlname;    /* Name of the stored procedure */
  215.     struct    objlist *sqlargs; /* Arguments to the stored procedure */
  216. } SQLDSC;
  217.  
  218. /* 
  219. ** Message Descriptor.
  220. */
  221.  
  222. typedef struct    msgdsc
  223. {
  224.     char    *msgname;    /* Message name */
  225.     char    *msgtext;    /* Text of message */
  226.     FONT    msgfont;    /* Font of message */
  227.     SYBCOLOR    msgcolor;    /* Color of message */
  228.     VIDEO    msgvideo;    /* Video attributes of the message */
  229.     short    msgx;        /* x-coord (upper left corner of msg window) */
  230.     short    msgy;        /* y-coord (upper left corner of msg window) */
  231. } MSGDSC;
  232.  
  233. /*
  234. ** Prompt Descriptor.
  235. */
  236.  
  237. typedef    struct    prompt
  238. {
  239.     char    *prtext;        /* Text of prompt */
  240.     FONT    prfont;            /* Prompt's font */
  241.     SYBCOLOR    prcolor;        /* Color of prompt text */
  242.     VIDEO    prvideo;        /* Video attributes of prompt */
  243.     REGION    prregion;        /* Prompt's region on the form */
  244.     REGION    proldreg;        /* New region (used in move, copy) */
  245. } PROMPT;
  246.  
  247. /*
  248. ** Rule Descriptor
  249. */
  250.  
  251. typedef    struct    ruledsc
  252. {
  253.     char    *rlmsg;            /* Rule error message.    */
  254.     char    *rlname;        /* Name of DataServer rule */
  255.     char    *rlquery;        /* SQL query for rule at run time. */
  256.     DBDATETIME rldate;        /* DS rule mod date    */
  257. } RULEDSC;
  258.  
  259. /*
  260. ** Rule/Default structure for holding query results.
  261. */
  262. typedef struct rl_def
  263. {
  264.     char            *owner;
  265.     char            *table;
  266.     char            *column;
  267.     char            *name;
  268.     char            *text;
  269.     DBTINYINT        coltype;
  270.     DBTINYINT        collen;
  271.     DBDATETIME    ruledate;
  272.     DBDATETIME    getdate;    
  273.     struct rl_def    *next;
  274. }RL_DEF;
  275.  
  276. /*
  277. ** Data Descriptor.
  278. */
  279.  
  280. #define    SSON    (SELSTATE)1    
  281. #define    SSOFF    (SELSTATE)0    
  282.  
  283. typedef struct    datadsc
  284. {
  285.     char        *ddval;        /* Pointer to data (char string) */
  286.     char        *ddoval;    /* Pointer to original data */
  287.     char        *ddpval;    /* Pointer to previous data */
  288.     DBINT    ddmaxlen;    /* Maximum buffer len (not incl NULL) */
  289.     DBINT    ddcurlen;    /* Current length of data */
  290.     ID        ddid;        /* Id of this item (auto generated) */
  291.     SELSTATE    ddcurstate;    /* Current select state */
  292.     SELSTATE    ddinitstate;    /* Initial select state */
  293.     SELSTATE    ddorigstate;    /* Original select state */
  294.     struct    datadsc *ddnext;    /* Next item in list */
  295.     struct    datadsc    *ddprev;    /* Previous item in list */
  296. } DATADSC;
  297.  
  298. /*
  299. ** Data Cell Descriptor.
  300. */
  301.  
  302. typedef struct    datacell
  303. {
  304.     int        dcoffset;    /* Offset into the datacell list */
  305.     REGION        dcregion;    /* Datacell's region on the form */
  306.     REGION        dcoldreg;    /* New region (used by move, copy) */
  307.     FONT    dcfont;            /* Data item's font */
  308.     SYBCOLOR    dccolor;        /* Data item's color */
  309.     struct    datacell *dcnext;    /* Next datacell in list */
  310.     struct    datacell *dcprev;    /* Previous datacell in list */
  311. } DATACELL;
  312.  
  313. /*
  314. ** Exit field    To indicate an exit of the current form, call frsexitform
  315. **        which sets the current field and datacell pointers to NULL.
  316. */
  317.  
  318. typedef    SYMTYPE    FLDTYPE;
  319.  
  320. #define        FDTEXIT        (FLDTYPE)0
  321.  
  322. /*
  323. ** Rotating Select    1 display cell, N value rotation of data, 
  324. ** Rotating Choice    exactly one must be visible (and hence picked)
  325. **            at any given time.
  326. */
  327.  
  328. #define        FDTROTSEL    (FLDTYPE)1
  329.  
  330. /*
  331. ** Exclusive Select    N display cells, N data items, pick to choose, 
  332. ** Single Choice    exactly one must be picked at any given time.
  333. */
  334.  
  335. #define        FDTEXSEL    (FLDTYPE)2
  336.  
  337. /*
  338. ** Any Select        N displayed cells, N data items, toggle on/off, 
  339. ** Multi Choice     any number of cells (>= 0) may be on at one time.
  340. */
  341.  
  342. #define        FDTANYSEL    (FLDTYPE)3
  343.  
  344. /*
  345. ** Entry    Basic data entry field.
  346. */
  347.  
  348. /*
  349. ** The actual data buffers pointed to by the entry struct, by fecurval, 
  350. ** by feival and by fepval must be allocated and pointed to when 
  351. ** initializing the form.  They all have length of feenlen.
  352. ** Furthermore, the datacells data pointer (dcdata) will be initialized to
  353. ** point to the data buffer pointed to by the entry struct.
  354. */
  355.  
  356. #define        FDTENTRY    (FLDTYPE)4
  357.  
  358. typedef    struct    fdentry
  359. {
  360.     int        femaxlen;        /* Maximum data buffer size */
  361.                         /* Datacell width should be */
  362.                         /* femaxlen + 2 (microscroll) */
  363.     char        *feidata;        /* Initial value (as a str) */
  364.     char        *fevalues;        /* Value key string.    */
  365.     POINTER        feplist;        /* Saved popup list */
  366.     struct    
  367.     {
  368.         unsigned fefnoecho:1;        /* No echo */ 
  369.         unsigned fefdelimit:1;        /* Show entry region bounds */
  370.         unsigned fefallownewline:1;    /* Allow nl in text */
  371.         unsigned fefvalissql:1;        /* Value is an sql stmt.*/
  372.         unsigned fefalwaysload:1;    /* For values generated by  */
  373.                         /* SQL, retrieve them every */
  374.                         /* time the values key is hit.*/
  375.         unsigned fefrunrule:1;        /* Run the DataServer rule.*/
  376.         unsigned fefdsrule:1;        /* Run rule via DataServer.*/
  377.         unsigned fefdsdefault:1;    /* Use DataServer col default.*/
  378.     }        feflags;        /* Entry flags */
  379.     char        *feinformat;        /* Input format */
  380.     char        *feoutformat;        /* Output format */
  381.     RULEDSC        *ferule;        /* Rule information. */
  382. } FDENTRY;
  383.  
  384. /*
  385. ** Trim        Read-only, non-tabable descriptive text on the form.
  386. ** Annotation.  The trim is the field's prompt - it has no other attributes.
  387. */
  388.  
  389. #define        FDTTRIM        (FLDTYPE)5
  390.  
  391. /*
  392. ** Hidden    A field, occupying no display space on the form which may
  393. **        be read or written during processing only.  These fields
  394. **        are the basis of temporary variables of an application.
  395. */
  396.  
  397. #define        FDTHIDDEN    (FLDTYPE)6
  398.     
  399. typedef    struct    fdhidden
  400. {
  401.     char        *fhidata;        /* Initial data value */
  402.     int        fhmaxlen;
  403. } FDHIDDEN;
  404.  
  405. /*
  406. ** Derived    A readonly, single valued field whose value is derived from
  407. ** Spreadsheet    other fields and is updated ONLY when any of those fields 
  408. **        change.
  409. */
  410.  
  411. #define        FDTDERIVED    (FLDTYPE)7
  412.  
  413. /*
  414. ** PickList    A readonly list of options (in table format) which is scrollable
  415. ** Menufield    (ie., more items that display lines) which, when picked, act
  416. **        like an exclusive or any select.
  417. */
  418.  
  419. #define     FDTPICKLIST    (FLDTYPE)8
  420.  
  421. #define        SINGLEVAL    (PICTYPE)1
  422. #define        MULTIVAL    (PICTYPE)2
  423.  
  424. typedef    struct    fdpicklist
  425. {
  426.     int        fppictype;        /* Any or exclusive choice */
  427.     SQLDSC        *fpsql;            /* SQL statement or stored */
  428.                         /* procedure name to get data */
  429. } FDPICKLIST;
  430.  
  431. /*
  432. ** Processing Events. 
  433. */
  434.  
  435. #define        PRC_PRE        1
  436. #define        PRC_PICK    2
  437. #define        PRC_POST    3
  438. #define        PRC_RULE    4
  439.  
  440. /*
  441. ** Processing Types (positive!).
  442. */
  443.  
  444. #define        PRC_CALLFPL        1
  445. #define        PRC_CALLEXTERNAL    2
  446. #define        PRC_CALLFORM        3
  447. #define        PRC_CALLSUPPLIED    4
  448. #define        PRC_CALLBUILD        5
  449.  
  450. /*
  451. ** FPL Descriptor.
  452. */
  453.  
  454. typedef struct    fpldsc
  455. {
  456.     int         fpltype;        /* Processing type    */
  457.     char        *fplname;        /* Name of 3GL/FPL procedure */
  458.     char        *fplversion;        /* Version of FPL procedure */
  459.     struct objlist    *fplparams;        /* Parameter list */
  460.     struct fpldsc    *fplnext;        /* Next link for fpldsc list */
  461.     struct fpldsc    *fplprev;         /* Prev link for fpldsc list */
  462. } FPLDSC;
  463.  
  464. /*
  465. ** Procedure reference array.
  466. */
  467.  
  468. #define    MAXARGS    10
  469.  
  470. typedef    struct    frsprocedure
  471. {
  472.     char        *fpname;    /* Procedure name (as known to frs) */
  473.     INTFUNCPTR    fpproc;        /* Pointer to the procedure */
  474.     POINTER        *fpargs;     /* Ptr to array of pointers to args */
  475.     int        fplang;        /* Language of the procedure */
  476. } FSPROCEDURE;
  477.  
  478. typedef FSPROCEDURE    FRSPROCEDURE;    /* Accomodate obsolescent name.    */
  479.  
  480. /*
  481. ** Field Structure.
  482. */
  483.  
  484. typedef    struct    field
  485. {
  486.     ID        flid;        /* Field id (internal use only) */
  487.     TBLDSC        *fltable;    /* Associated table info */
  488.     char        *flname;    /* Field name */
  489.     char        *fldesc;    /* Description of the field */
  490.     int        flnumcells;    /* Number of data cells */
  491.     DATACELL    *flcells;    /* Display cells for this field */
  492.     DBINT        fldatatype;    /* Type of data in these cells */
  493.     short        fldatlen;    /* Maximum length of the data */
  494.     struct    
  495.     {
  496.         unsigned flfmustenter:1;/* Must enter or specify a value */
  497.         unsigned flfinputpnd:1;    /* Input pending on this field */
  498.         unsigned flfinvisible:1;/* Field not visible on the form */
  499.         unsigned flfnostop:1;    /* May not stop on this field */
  500.         unsigned flfinparam:1;    /* Input parameter for form */
  501.         unsigned flfretparam:1;    /* Return parameter for form */
  502.         unsigned flfstatic:1;    /* Do not initialize value from init */
  503.                     /* each time the form is called */
  504.         unsigned flfreadonly:1;    /* Readonly */
  505.         unsigned flfautotab:1;  /* Automatically go to next
  506.                        field when all characters
  507.                        entered  */
  508.         unsigned flfkeyfield:1; /* Field is a key for a table */
  509.     }        flflags;    /* Field flags */
  510.     PROMPT        *flprompt;    /* Prompt for the field */
  511.     PROMPT        *floldprompt;    /* Used by the forms editor (undo) */
  512.     FLDTYPE        fltype;        /* Field type (see types above) */
  513.     POINTER        flfield;    /* Pointer to a specific field type */
  514.     FPLDSC        *flpreprc;    /* Field pre processing */
  515.     FPLDSC        *flpickprc;    /* Field pick processing */
  516.     FPLDSC        *flruleprc;    /* Field rule processing */
  517.     FPLDSC        *flpostprc;    /* Field post processing */
  518.     char        *flhelp;    /* Field help text.    */
  519. } FIELD;
  520.  
  521. /*
  522. ** Group structure.
  523. */
  524.  
  525. typedef    struct    group
  526. {
  527.     ID        gpid;        /* Group id (internal use only ) */
  528.     char        *gpname;    /* Group name */
  529.     char        *gpdesc;    /* Description of the group */
  530.     int        gplinperrow;    /* Number of display lines per row */
  531.     int        gpdisprows;    /* Number of rows to display */
  532.     int        gpolddisprows;    /* If has to move, old no. of rows */
  533.     int        gpmaxsize;    /* Maximum size (rows) of the group */
  534.     int        gpminsize;    /* Minimum/init size of the group */
  535.     int        gpextsize;    /* # rows for increasing group size*/
  536.     REGION        gpextent;    /* Region enclosing the group */
  537.                     /* (includes all prompts) */
  538.     struct    
  539.     {
  540.         unsigned gpfnostop:1;    /* May not stop on this object */
  541.         unsigned gpfreadonly:1;    /* Entire group readonly */
  542.         unsigned gpfinparam:1;    /* Input parameter for form */
  543.         unsigned gpfretparam:1;    /* Return parameter for form */
  544.         unsigned gpfinvisible:1;/* Group not visible on the form */
  545.     }         gpflags;    /* Group flags */
  546.     PROMPT        *gpprompt;    /* Group's prompt */
  547.     PROMPT        *gpoldprompt;    /* Used by the forms editor (undo) */
  548.     char        *gphelp;    /* Unused */
  549.     struct frmobj    *gpobjects;    /* List of component objects */
  550.     FPLDSC        *gppreprc;    /* Group pre processing */
  551.     FPLDSC        *gppostprc;    /* Group post processing */
  552. } GROUP;
  553.  
  554. #define        FOGROUP        (OBJTYPE)0
  555. #define        FOFIELD        (OBJTYPE)1
  556.  
  557. typedef struct     frmobj
  558. {
  559.     struct    frmobj    *foparent;    /* Parent object (null for ungrouped */
  560.                     /* fields and groups) */
  561.     OBJTYPE        fotype;        /* Object type (group or field) */
  562.     short        foseq;        /* Used by frsloadform */
  563.     POINTER        foobject;    /* FIELD or GROUP */
  564.     struct    frmobj    *fonext;    /* Next link for object list */
  565.     struct    frmobj    *foprev;     /* Previous link for object list */
  566. } FRMOBJ;
  567.  
  568. typedef struct     datobj
  569. {
  570.     OBJTYPE        dotype;        /* Object type (FOGROUP or FOFIELD) */
  571.     POINTER        doobject;    /* DATFIELD or DATGROUP pointer */
  572.     struct    datobj    *donext;    /* Next link for data list */
  573.     struct    datobj    *doprev;     /* Previous link for data list */
  574. } DATOBJ;
  575.  
  576. /*
  577. ** Data object list node (describes the data (one for every occurrance of
  578. ** every field). This is a leaf node in the data list.
  579. */
  580.  
  581. typedef    struct    datfield
  582. {
  583.     ID        dffldid;    /* Id of field */
  584.     DATADSC        *dfdata;    /* Data descriptor list */
  585.     DATADSC     *dfcurdsc;    /* Pointer to current descriptor */
  586.     DATADSC     *dffirstdsc;    /* Pointer to first visible desc */
  587.     DATADSC     *dflastdsc;    /* Pointer to last visible desc */
  588.     struct    
  589.     {
  590.         unsigned dffismodified:1;  /* Data for field was modified */
  591.         unsigned dffhilite:1;       /* Hilite entry region      */
  592.     }        dfflags;    /* Data descriptor flags */
  593. } DATFIELD;
  594.  
  595. /*
  596. ** Data object list node.  This node points to other data lists.
  597. */
  598.  
  599. typedef struct    datgroup
  600. {
  601.     ID        dggrpid;    /* Id of group (used to init stack) */
  602.     DATOBJ        **dggrp;    /* Array of pointers to data lists */
  603.                     /* (one pointer per row in group) */
  604.     int        dgused;        /* Number of used rows of data */
  605.     int        dgsize;        /* Maximum size of the dgdata array */
  606.     int        dgfirstrow;    /* First, last, and current row in */
  607.                     /* the display (indexes into the */
  608.     int        dglastrow;    /* dgdata array) */
  609.     int        dgcurrow;
  610.     struct    
  611.     {
  612.         unsigned dgoverflow:1;    /* Group overflow.    */
  613.         unsigned dgfismodified:1; /* Data for field in group modified.*/
  614.     }        dgflags;      /* Data group flags */
  615.     int        dgminsize;      /* Copy of minimum size from GROUP
  616.                          structure. Needed to accurately
  617.                          copy rows. */
  618. } DATGROUP;
  619.  
  620. /*
  621. ** Form object descriptor.  This node describes the display characteristics 
  622. ** and data associated with a given form object.
  623. */
  624.  
  625. typedef    struct    objdsc
  626. {
  627.     FRMOBJ        *oddisplay;    /* Pointer to the display object */
  628.     DATOBJ        *oddata;    /* Pointer to the data object */
  629.     int        odindexes[MAXNEST]; /* Row indexes (all ancestors) */
  630.     int        odnumindex;    /* Number of indexes in odindexes */
  631.     int        odstktop;    /* Top of group stack */
  632.     DATOBJ         *odgrpstk[MAXNEST]; /* Stack of groups for this obj */
  633. } OBJDSC;
  634.  
  635. /*
  636. ** Object List.
  637. **
  638. ** List of form objects (used by various forms subsystems).
  639. */
  640.  
  641. #define    OL_FIELD    -1        /* Grouped/Ungrouped field (indexes */
  642.                     /* specify which) */
  643. #define    OL_ROW        -2        /* A single row of a group (indexes */
  644.                     /* for all parent groups plus row) */
  645. #define    OL_GROUP    -3        /* Entire group (indexes for all */ 
  646.                     /* parent groups) */
  647. #define    OL_CONSTANT    -4        /* A constant */
  648.  
  649. typedef    struct    objlist
  650. {
  651.     int    oltype;            /* Type of the object */
  652.     OBJDSC    *olobj;            /* Pointer to the object descriptor */
  653.     struct fplconst *olconst;        /* or constant descriptor */
  654.     struct    objlist *olnext;    /* Next node link */
  655.     struct    objlist *olprev;    /* Previous node link */
  656. } OBJLIST;
  657.  
  658. /*
  659. **    Debug run-time modes
  660. */
  661. #define        FMRUNUSER    0
  662. #define        FMRUNEXECUTE    1
  663. #define        FMRUNINFO    2
  664. #define        FMRUNQUIET    3
  665.  
  666. typedef struct finfo
  667. {
  668.     char        *fieldname;
  669.     TBLDSC        *tbl;
  670.     struct finfo    *next;
  671. } FINFO;
  672.  
  673. typedef struct dbtables
  674. {
  675.     char        *tablename;
  676.     FINFO        *fieldlist;
  677.     struct dbtables    *next;
  678. } DBTABLES;
  679.  
  680. typedef    struct joindsc
  681. {
  682.     OBJDSC        *field1;
  683.     OBJDSC        *field2;
  684.     struct    joindsc    *next;
  685. } JOINDSC;
  686.  
  687. typedef struct fkeybind FKEYBIND;     /* Forward reference to later
  688.                        definition  */
  689.  
  690. /*
  691. ** Form Structure.
  692. */
  693.  
  694. typedef    struct    form
  695. {
  696.     ID        fmid;        /* Numeric id of the object */        
  697.     char        *fmname;    /* Symbolic name of the object */
  698.     char        *fmversion;    /* Version info for form */
  699.     char        *fmcreator;    /* Object's creator */
  700.     char        *fmdesc;    /* Description of the object */
  701.     WINDOW    *fmwindow;        /* Window containing the form */
  702.     short    fmvpx;            /* (x,y) coord of upper left corner */
  703.     short    fmvpy;            /* of window for form (norm coords) */
  704.     short    fmvpwidth;        /* Width of the window (norm coords) */
  705.     short    fmvpheight;        /* Height of the window (norm coords) */
  706.     short    fmtpwidth;        /* Width of the window's textport */
  707.     short    fmtpheight;        /* Height of the window's textport */
  708.     SELPARMS *fmmenudef;        /* Menu tree */
  709.     SELPORT *fmselport;        /* Associated select port structure */
  710.     FRMOBJ    *fmifld;        /* Initial field */
  711.     FONT    fmfont;            /* Default font for form objects */
  712.     SYBCOLOR    fmcolor;        /* Default color for the objects */
  713.     struct
  714.     {
  715.         unsigned fmffirstform:1;/* Unimplemented. */
  716.         unsigned fmfdebug:2;    /* Run form in debug or regular modes */
  717.         unsigned fmfismodified:1;/* Form was modified */
  718.         unsigned fmfsaveorig:1;    /* Save original value */
  719.         unsigned fmfeditexcp:1;    /* Did last proc event call frsresume?*/
  720.         unsigned fmfunused2:1;    /* Unused */
  721.         unsigned fmfreadonly:1;    /* Form is readonly */
  722.         unsigned fmfcharmove:1;  /* Do not trap up/down/left/right */
  723.                     /* arrows and allow char movement */
  724.         unsigned fmfclrmod:1;    /* Clear modify flags each callform.*/
  725.                     /* Used by old DWB only. annk 6/88 */
  726.         unsigned fmfnoinheritfkey:1;    /* Supresses inheritance of
  727.                            function keys when set */
  728.         unsigned fmfexitform:1;    /* Set to terminate execution */
  729.         unsigned fmfinhibproc:1;/* Set to terminate execution */
  730.         unsigned fmffldchange:1;/* Set by frsresume().    */
  731.         unsigned fmfinhibmenu:1;/* Display/suppress the menubar. */
  732.         unsigned fmftypecheck:1;/* Check entry fields for datatype.*/
  733.     }    fmflags;        /* Form flags */
  734.     FRMOBJ    *fmobjects;        /* List of all form objects (listed */
  735.                     /* in their tab order) */
  736.     DATOBJ    *fmdata;        /* Data corresponding to all objects */
  737.                     /* (and all occurrences) in fmobjects */
  738.     FRMLINE    *fmlines;        /* List of lines in the form */
  739.     FRMBOX    *fmboxes;        /* List of boxes in the form */
  740.     OBJLIST    *fmparams;        /* List of the form's parameters */
  741.     FPLDSC  *fmpreprc;        /* Form pre-processing */
  742.     FPLDSC  *fmpostprc;         /* Form post-processing */
  743.     char    *fmhelp;        /* Unused. */
  744.     struct    frscontext *fmcontext;    /* Context structure (used only if */
  745.                     /* the client is processing the menus)*/
  746.     struct    formst *fmsymtbl;    /* Form symbol table. */
  747.     struct    dbinfo *fmfplmsg;    /* Linked list of fpl messages. */
  748.     JOINDSC    *joinlist;        /* List of joins. */
  749.     FKEYBIND *fmbinding;        /* List of function key bindings */
  750. } FORM;
  751.  
  752. /*
  753. **    Traversal Context Structure.
  754. */
  755.  
  756. typedef    struct    travcxt
  757. {
  758.     FORM        *tvform;
  759.     TRAVTYPE    tvtrvtype;
  760.  DBBOOL tvfirst;
  761.     OBJDSC        tvcurobj;
  762. } TRAVCXT;
  763.  
  764. /*
  765. ** Context header used by runtime data extraction routines.
  766. */
  767.  
  768. typedef    struct    frscxt
  769. {
  770.     FORM     *frform;    /* Pointer to the form */
  771.     OBJDSC   frobjdsc;    /* Field or form object descriptor */
  772.     DATADSC  *frvaldsc;    /* Value descriptor */    
  773.  DBBOOL frfirst;
  774.  DBBOOL frfirstddc;
  775. } FRSIO;
  776.  
  777. typedef FRSIO    FRSCXT;        /* Accomodate obsolescent name.    */
  778.  
  779. /*
  780. ** Execute runtime stack frame.
  781. */
  782.  
  783. typedef struct    excontext
  784. {
  785.     int        *ec_pc;    /* Saved program counter for FPL procedure */    
  786.     struct fplnode    *ec_fpl;/* Pointer to cached FPL node */
  787.     struct
  788.     {
  789.         unsigned ecfrmcache:1;
  790.     }        ec_flags;
  791.     struct excontext *ec_next; /* Stack link */
  792. } EXCONTEXT;
  793.  
  794.  
  795. /*
  796. ** Forms runtime environment.
  797. **
  798. ** This is used by the forms runtime system (frs) as a context stack to support
  799. ** forms context switches.
  800. */
  801.  
  802. typedef    struct    frscontext
  803. {
  804.     FORM        *fcform;    /* Pointer to the current form */
  805.     OBJDSC        fcprvfld;    /* Previous field descriptor */
  806.     DATACELL    *fcprvcell;    /* Pointer to the previous datacell */
  807.     OBJDSC        fccurfld;    /* Current field descriptor */
  808.     DATACELL    *fccurcell;    /* Pointer to the current datacell */
  809.     OBJDSC        fcnxtfld;    /* Next field descriptor */
  810.     DATACELL    *fcnxtcell;    /* (ONLY set in a processing phase) */
  811.     int        fccurpick;    /* Index into form symbol table of */
  812.                     /* the most recent menuitem pick */
  813.     OPTION        fcoption;    /* Current OPTION (entry event) */
  814.     EXCONTEXT    *fcfplbase;    /* Pointer to base activation frame */
  815.                     /* in the FPL execution stack */
  816.     DATOBJ        *fcobjstate;    /* List of all of the form's data */
  817.                     /* (to support re-entrant forms) */
  818.     ENTRY        fcentry;    /* Shared entry structure */
  819.     struct frscontext *fcnext;    /* Stack link */
  820.  
  821.     /*
  822.     ** fcftab and fcfbacktab work together to record the directory the
  823.     ** operator last moved the cursor on the form. They are set only
  824.     ** when we detect a TAB or BACKTAB character and are cleared prior
  825.     ** to reading input and also when fsfsetcurfld is called.
  826.     */
  827.  
  828.     struct
  829.     {
  830.         unsigned fcftab:1;    /* True if most recent operation was
  831.                        a tab */
  832.         unsigned fcfbacktab:1;    /* True if most recent operation was
  833.                        a backtab. */
  834.     } fcflags;
  835.     
  836. } FRSCONTEXT;
  837.  
  838. /*
  839. ** List of forms used by the application.
  840. **
  841. ** This list is used by the forms runtime system (frs) to resolve form
  842. ** references.  This list is built partially (or totally) when forms are 
  843. ** compiled.  Then, at runtime, if form references cannot be resolved from
  844. ** this list, the form will be read from the database and added to the list.
  845. */
  846.  
  847. typedef struct    frmdef
  848. {
  849.     char    *fdname;        /* Form name */
  850.     char    *fdversion;        /* Version number for form */
  851.     struct    
  852.     {
  853.         unsigned fdfpreload:1;    /* Load form before first reference */
  854.     }     fdflags;        
  855.     FORM    *fdform;        /* Pointer to actual in-core form (if */
  856.                     /* NULL, form must be loaded from db) */
  857.     struct    frmdef *fdnext;        /* Next form in list */
  858. } FRMDEF;
  859.  
  860. /*
  861. ** The following definitions are for function key support.
  862. **
  863. ** A FUNCTIONKEY is used to describe each possible function key that is
  864. ** available.
  865. **
  866. ** FSFUNCTIONKEY is a structure that maps procedures to functions keys
  867. ** in a manner similar to FSPROCEDURE.
  868. **
  869. ** The procedure fsinstallkeys and fskeyargs are used to define the key
  870. ** mapping and provide arguments for the mapped routines.
  871. */
  872.  
  873. typedef int FUNCTIONKEY;
  874.  
  875. /*
  876. ** FKEY<n> are the name of our function keys
  877. */
  878.  
  879. #define FKEYS        32        /* number of function keys */
  880.  
  881. #define FKEY1        (FUNCTIONKEY) 1
  882. #define FKEY2        (FUNCTIONKEY) 2
  883. #define FKEY3        (FUNCTIONKEY) 3
  884. #define FKEY4        (FUNCTIONKEY) 4
  885. #define FKEY5        (FUNCTIONKEY) 5
  886. #define FKEY6        (FUNCTIONKEY) 6
  887. #define FKEY7        (FUNCTIONKEY) 7
  888. #define FKEY8        (FUNCTIONKEY) 8
  889. #define FKEY9        (FUNCTIONKEY) 9
  890. #define FKEY10        (FUNCTIONKEY) 10
  891. #define FKEY11        (FUNCTIONKEY) 11
  892. #define FKEY12        (FUNCTIONKEY) 12
  893. #define FKEY13        (FUNCTIONKEY) 13
  894. #define FKEY14        (FUNCTIONKEY) 14
  895. #define FKEY15        (FUNCTIONKEY) 15
  896. #define FKEY16        (FUNCTIONKEY) 16
  897. #define FKEY17        (FUNCTIONKEY) 17
  898. #define FKEY18        (FUNCTIONKEY) 18
  899. #define FKEY19        (FUNCTIONKEY) 19
  900. #define FKEY20        (FUNCTIONKEY) 20
  901. #define FKEY21        (FUNCTIONKEY) 21
  902. #define FKEY22        (FUNCTIONKEY) 22
  903. #define FKEY23        (FUNCTIONKEY) 23
  904. #define FKEY24        (FUNCTIONKEY) 24
  905. #define FKEY25        (FUNCTIONKEY) 25
  906. #define FKEY26        (FUNCTIONKEY) 26
  907. #define FKEY27        (FUNCTIONKEY) 27
  908. #define FKEY28        (FUNCTIONKEY) 28
  909. #define FKEY29        (FUNCTIONKEY) 29
  910. #define FKEY30        (FUNCTIONKEY) 30
  911. #define FKEY31        (FUNCTIONKEY) 31
  912. #define FKEY32        (FUNCTIONKEY) 32
  913.  
  914. typedef struct    _FSFUNCTIONKEY
  915. {
  916.     FUNCTIONKEY    fkeyname;
  917.     INTFUNCPTR    fkeyproc;
  918.     POINTER        *fkeyargs;
  919.     int        fkeylang;
  920. } FSFUNCTIONKEY;
  921.  
  922. struct fkeybind
  923. {
  924.     FKEYBIND    * fk_next;    /* Null terminated linked list */
  925.     FUNCTIONKEY      fk_key;    /* Which key is being bound */
  926.     FPLDSC        * fk_binding;    /* List of processing bound to the
  927.                        key  */
  928. };
  929.  
  930. /* parser filespec structure */
  931. typedef struct    _FSPEC
  932. {
  933.     char    *version;
  934.     char    *wdir;
  935.     char    *name;
  936. #if VMS
  937.     char    *diag;
  938.     char    *list;
  939. #endif
  940. } FSPEC;
  941.  
  942. /* parser runtime flags structure */
  943. typedef struct    _PFLAGS
  944. {
  945.     unsigned pf_usefpe:1;
  946.     unsigned pf_rtsyms:1;
  947.     unsigned pf_topt:1;
  948.     unsigned pf_dump:1;
  949.     unsigned pf_sybout:1;
  950. } PFLAGS;
  951.  
  952. /*
  953. ** The following structure is used to pass parameters from Apt-Sql code to
  954. ** 3GL (C and the other supported languages) code.
  955. **
  956. ** A 3GL routine recieves 3 parameters, the context, the arg array set up by
  957. ** the main-line code, and an array of type FSPASSED. This array contains
  958. ** one entry for each parameter passed from a 4GL routine. It is NULL if
  959. ** none were passed.
  960. **
  961. ** Since the Apt-Sql routine can pass any of its data types, the FSPASSED
  962. ** structure has a way of representing them all and a method for informing
  963. ** the called program of this. The p_type field is set to one of the PT_*
  964. ** values listed below. This code lets the 3GL program know what to expect
  965. ** and which field in the union to reference. There is always an extra
  966. ** parameter in the array whose type is PT_NOMORE. This allows Apt-Sql to
  967. ** pass a variable number of parameters to the called routine and enables the
  968. ** called routine to adapt to that number.
  969. */
  970.  
  971. #define PT_NOMORE    0
  972. #define    PT_FLDOBJECT    1
  973. #define    PT_INT        2
  974. #define    PT_SMALLINT    3
  975. #define    PT_TINYINT    4
  976. #define    PT_CHAR        5
  977. #define    PT_BIT        6
  978. #define    PT_DATETIME    7
  979. #define    PT_MONEY    8
  980. #define    PT_FLT8        9
  981. #define PT_BINARY    10
  982. #define PT_GRPOBJECT    11
  983.  
  984. typedef struct    _fspassed
  985. {
  986.     short            p_type;
  987.     short            p_len;
  988.     union
  989.     {
  990.         OBJDSC        p_object;
  991.         DBINT        p_int;
  992.         DBSMALLINT    p_smallint;
  993.         DBTINYINT    p_tinyint;
  994.         DBCHAR        *p_char;
  995.         DBBIT        p_bit;
  996.         DBDATETIME    p_datetime;
  997.         DBMONEY        p_money;
  998.         DBFLT8        p_flt8;
  999.         DBBINARY    *p_binary;
  1000.     } p_value;
  1001.     
  1002. } FSPASSED;
  1003.  
  1004.  
  1005. /* APT-Lib function prototypes */
  1006. struct  objindex *fsgoialloc(void);
  1007. void  fsgoifree(struct  objindex *obji);
  1008. void  fsgoiassign(struct  objindex *obji,int  level,int  i0,int  i1,int  i2,int  i3,int  i4,int  i5,int  i6,int  i7,int  i8,int  i9);
  1009. int  fsgoiget(struct  objindex *obji,int  index);
  1010. int  fsgoigetlevel(struct  objindex *obji);
  1011. int  fsgoisetlevel(struct  objindex *obji,int  level);
  1012. int  fsgoiset(struct  objindex *obji,int  index,int  value);
  1013. struct  datadsc *fsdgetddc(struct  objdsc *fld,char  *dataval,long  dataid);
  1014. char  *fsfreadval(struct  form *frm,char  *fldname,long  fldid,struct  objindex *fldindex,unsigned char  *retbuf,int  *buflen);
  1015. int  fsgmoverow(struct  frscontext *context,struct  objdsc *fld);
  1016. struct  form *fsiogetform(struct  frscxt *frs_cxt);
  1017. int  fsprint(struct  form *inform,int  flags);
  1018. void  fsabort(char  *message);
  1019. int  fsfsetcurfld(struct  frscontext *context,struct  objdsc *flddsc);
  1020. struct  datadsc *fsionxtddc(struct  frscxt *frs_io,unsigned char  selonly);
  1021. void  fsresume(void);
  1022. void  fsexitform(void);
  1023. struct  objdsc *fsionxtfld(struct  frscxt *frs_io,unsigned char  modonly);
  1024. int  fscallform(struct  form *frm);
  1025. struct  objdsc *fsfgetfld(struct  form *frm,char  *fldname,long  fldid,struct  objindex *index,struct  objdsc *retobj);
  1026. int  fsfsetvalues(struct  objdsc *flddsc,char  *text);
  1027. struct  objdsc *fsionxtrow(struct  frscxt *frsio,unsigned char  modonly);
  1028. void  fsseticon(short  *icon,int  width,int  height,int  depth);
  1029. void  fscancelform(void);
  1030. int  fsfwriteval(struct  form *frm,char  *fldname,long  fldid,struct  objindex *fldindex,long  dataid,short  state,unsigned char  *val,char  *sval,int  len,unsigned char  setmod);
  1031. int  fsiosetddc(struct  frscxt *frs_io,struct  objdsc *flddsc,struct  datadsc *valdsc);
  1032. struct  form *fscurform(struct  frscontext *context);
  1033. struct  objdsc *fsfgetinitfld(struct  form *frm,struct  objdsc *flddsc);
  1034. void  fsfsetinitfld(struct  form *frm,struct  objdsc *fld);
  1035. struct  objdsc *fsfcurfld(struct  frscontext *context);
  1036. struct  objdsc *fsfprvfld(struct  frscontext *context);
  1037. struct  datadsc *fsdcurddc(struct  frscontext *context);
  1038. char  *fsfgetval(struct  form *frm,struct  objdsc *field,unsigned char  *retbuf,int  *buflen);
  1039. struct  objdsc *fsgaddrow(struct  frscontext *context,struct  objdsc *grp,int  row,struct  objdsc *retobj);
  1040. int  fsggetmaxrows(struct  objdsc *grpobj);
  1041. int  fsggetusedrows(struct  objdsc *group);
  1042. int  fsgsetusedrows(struct  form *form,struct  objdsc *grpobj,int  used);
  1043. int  fsiosetfld(struct  frscxt *frs_io,struct  objdsc *grpdsc,struct  objdsc *flddsc);
  1044. int  fssql(struct dbprocess *dbproc,char  *sqltext);
  1045. void  fscopyobj(struct  objdsc *dst,struct  objdsc *src);
  1046. int  fsfsetfldflags(struct  form *frm,struct  objdsc *fld,int  flags);
  1047. int  fsgsetgrpflags(struct  form *frm,struct  objdsc *grp,int  flags);
  1048. int  fssetformflags(struct  form *frm,int  flags);
  1049. int  fsfclrfldflags(struct  form *frm,struct  objdsc *fld,int  flags);
  1050. int  fsgclrgrpflags(struct  form *frm,struct  objdsc *grp,int  flags);
  1051. int  fsclrformflags(struct  form *frm,int  flags);
  1052. unsigned char  fsftestfldflags(struct  form *frm,struct  objdsc *fld,int  flags);
  1053. unsigned char  fsgtestgrpflags(struct  form *frm,struct  objdsc *grp,int  flags);
  1054. unsigned char  fstestformflags(struct  form *frm,int  flags);
  1055. int  fsgdelrow(struct  frscontext *context,struct  objdsc *grp,int  row,struct  objdsc *newfld);
  1056. int  fsgscrollgrp(struct  form *frm,struct  objdsc *grpobj,int  toprow);
  1057. void  fsmessage(char  *msg);
  1058. void  fssuspend(void);
  1059. struct dbprocess *fsdblogin(struct loginrec * *ploginrec,char  *title);
  1060. char  *fsformname(struct  form *form);
  1061. char  *fsformver(struct  form *form);
  1062. struct  form *fsgetform(char  *formname,char  *version);
  1063. int  fsfreeform(struct  form *frm);
  1064. int  fsmonmenu(struct  form *frm,short  menuid);
  1065. int  fsmoffmenu(struct  form *frm,short  menuid);
  1066. short  fsmcurmenu(struct  frscontext *context);
  1067. void  fstsetalarm(long  initial_delay,long  repeat_delay,void  (*alarm_func)(),unsigned char  *arguments);
  1068. void  fststartcrit(void);
  1069. void  fstendcrit(void);
  1070. struct dbprocess *fsdbproc(struct dbprocess *dbproc);
  1071. struct dbprocess *fsdbenviron(struct dbprocess *dbproc);
  1072. int  fsfputval(struct  form *frm,struct  objdsc *fld,long  dataid,short  state,unsigned char  *val,char  *sval,int  len,unsigned char  setmod);
  1073. struct  objdsc *fsggetgrp(struct  form *frm,char  *grpname,long  grpid,struct  objindex *index,struct  objdsc *retobj);
  1074. struct  frsprocedure *fsinstallproc(struct  frsprocedure *procarray);
  1075. int  fsprocargs(char  *procname,unsigned char  * *procargs);
  1076. int  fsprocreturn(void);
  1077. short  fsfgettype(struct  objdsc *flddsc);
  1078. long  fsfgetid(struct  objdsc *flddsc);
  1079. char  *fsfgetname(struct  objdsc *flddsc);
  1080. int  fsfgetdtype(struct  objdsc *flddsc);
  1081. short  fsfgetlen(struct  objdsc *flddsc);
  1082. unsigned char  fsfisfldmod(struct  objdsc *flddsc);
  1083. unsigned char  fsisformmod(struct  form *form);
  1084. int  fsfgetrow(struct  objdsc *fld);
  1085. struct  objindex *fsggetindex(struct  objdsc *obj,struct  objindex *indexdsc);
  1086. void  fsgcopyindex(struct  objindex *dest,struct  objindex *source);
  1087. char  *fsdgetprvval(struct  datadsc *ddptr);
  1088. char  *fsdgetval(struct  datadsc *ddptr);
  1089. int  fsdputval(struct  datadsc *ddptr,char  *val);
  1090. char  *fsfgetdefault(struct  objdsc *flddsc,unsigned char  *val,int  *ptrlen);
  1091. int  fsfputdefault(struct  objdsc *flddsc,unsigned char  *val,char  *sval,int  len);
  1092. int  fsdgetmaxlen(struct  datadsc *ddptr);
  1093. int  fsdgetlen(struct  datadsc *ddptr);
  1094. long  fsdgetid(struct  datadsc *ddptr);
  1095. short  fsdgetstate(struct  datadsc *ddptr);
  1096. void  fsdputstate(struct  datadsc *ddptr,short  ss);
  1097. short  fsdgetinitstate(struct  datadsc *ddptr);
  1098. void  fsdputinitstate(struct  datadsc *ddptr,short  ss);
  1099. struct loginrec *fsdbrec(struct loginrec *loginrec);
  1100. struct  objdsc *fsggetparent(struct  form *frm,struct  objdsc *objdsc,struct  objdsc *retobj);
  1101. struct  frscxt *fsioalloc(struct  form *frm);
  1102. void  fsiofree(struct  frscxt *frs_cxt);
  1103. int  fsopenscreen(int  *argcptr,char  * *argv,char  *label);
  1104. int  fsclosescreen(void);
  1105.  
  1106. #if VOS
  1107. /*  external variables available to Stratus users  */
  1108.  
  1109. extern char *Sqlroot;        /* Root SQL/2000 directory */
  1110. extern char *Term;        /* Terminal type */
  1111. extern char *User;        /* User Name */
  1112. extern char *Sybformlist;     /* directory for formdefs */
  1113. extern char *Printer;        /* Printer queue */
  1114. extern char *Sqlbufflen;    /* SQL buffer length */
  1115. extern char *Hostname;        /* Server Name */
  1116. #endif    /* VOS */
  1117.  
  1118.