Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:15:56

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 
0024 /*
0025 **++
0026 **  FACILITY:
0027 **
0028 **      User Interface Language Compiler (UIL)
0029 **
0030 **  ABSTRACT:
0031 **
0032 **      This include file defines the interface to the UIL symbol table.
0033 **
0034 **--
0035 **/
0036 
0037 #ifndef UilSymDef_h
0038 #define UilSymDef_h
0039 
0040 /*
0041 **
0042 **  INCLUDE FILES
0043 **
0044 **/
0045 
0046 #include <Mrm/MrmPublic.h>
0047 #include <Xm/Xm.h>
0048 
0049 /*
0050 **  constraint check access macro
0051 */
0052 #define _constraint_check(arg) \
0053  (constraint_tab[((arg)-1)/8] & (1 << ((arg)-1)%8))
0054 
0055 /*
0056 **  Hash table size
0057 */
0058 
0059 /* MOVED TO DBDef.h */
0060 
0061 /* 
0062 **  Symbol tags.  These values are used in the tag field of every object header
0063 **  to identify the type of the entry.
0064 */
0065 
0066 /* MOVED TO DBDef.h */
0067 
0068 
0069 /*
0070 **    Common attribute masks -- These values are used in the b_flags field of
0071 **    the object_header.
0072 */
0073 
0074 /* MOVED TO DBDef.h */
0075 
0076 
0077 /*
0078 **  Output states - order is important
0079 */
0080 
0081 /* MOVED TO DBDef.h */
0082 
0083 
0084 
0085 /*
0086 **  Constants to define compiler-recognized data types. It is
0087 **  important that the names used in .wml language descriptions
0088 **  match these names. These values were once automatically generated
0089 **  by WML. They are now maintained by hand to reduce compiler
0090 **  dependence on WML artifacts.
0091 */
0092 /* MOVED TO DBDef.h */
0093 
0094  
0095 
0096 /* 
0097 **  Header for each symbol entry
0098 */
0099 
0100 typedef struct
0101 {
0102     char                b_tag;
0103     /* type of entry The values of this field ia a sym_k_XXX_entry as   */
0104     /* defined above.                           */
0105     char        b_type;
0106     /*  generic subtype field usage depends on value of b_tag field     */
0107     /*  above (sym_k_value_entry -> b_type is a sym_k_XXX_value as      */
0108     /*  defined in UilSymGen.h, sym_k_list_entry -> b_type is a     */
0109     /*  sym_k_XXX_list as defined below, sym_k_widget_entry -> b_type   */
0110     /*  is a sym_k_XXX_object as defined in UilSymGen.h,            */
0111     /*  sym_k_child_entry -> b_type is a sym_k_XXX_child as defined in  */
0112         /*  UilSymGen.h, sym_k_section_entry -> b_type is a             */
0113     /*  sym_k_XXX_section as defined below).                */
0114     /*                                  */
0115     unsigned short  w_node_size;
0116     /*  size of the node in longwords                   */
0117     int         user_data;
0118     /* not used directly by the compiler.  It is for use by         */
0119     /* applications making use of callable UIL only.            */
0120 
0121     /*
0122     ** Fields to save source information about the symbol:  We currently save
0123     ** five things.  The source record where the symbol "begins" (begins is in
0124     ** quotes because this may point to just white space before the actual
0125     ** symbol), the position (character) within that record where the symbol
0126     ** begins, the source record where the symbol ends, the position within
0127     ** that record that symbol really begins (i.e. no white space or anything),
0128     ** and the position where the symbol definition ends.
0129     */
0130 
0131     struct _src_source_record_type  *az_src_rec;
0132     /* Source record where symbol defined               */
0133     unsigned char   b_src_pos;
0134     /* Starting position within the source record           */
0135     unsigned char   b_end_pos;
0136     /* Ending position within the source record         */
0137 
0138 } sym_entry_header_type;
0139 
0140 
0141 
0142 /*
0143 **  Common view of a symbol entry
0144 */
0145 
0146 typedef struct  
0147 {
0148     sym_entry_header_type   header;
0149     /* common part of all symbol entries.                   */
0150     char                    b_value[ 1 ];
0151     /* information specific to each different entry type.           */
0152 } sym_entry_type;
0153 
0154 
0155 
0156 /*
0157 **  Name entry 
0158 */
0159 
0160 /*  Flags for name entries                          */
0161 
0162 #define     sym_m_referenced    (1 << 0)
0163     /* Used in the b_flags field of a name entry.  Set if this name is   */
0164     /* reference elsewhere in this UIL source module.           */
0165 #define     sym_m_cycle_checked (1 << 1)
0166     /* set if the widget entry for this name has been checked for   */
0167     /* cyclic references.                       */
0168 #define     sym_m_has_cycle     (2 << 1)
0169     /* set if a cycle was detected for a widget entry       */
0170 #define     sym_m_charset       (1 << 3)
0171        /* set if symbol being used as charset name. */
0172 
0173 typedef struct _sym_name_entry_type
0174 {
0175     sym_entry_header_type   header;
0176     /* common header                        */
0177     sym_entry_type      *az_object;
0178     /* pointer to the object entry with this name           */
0179     struct _sym_name_entry_type *az_next_name_entry;
0180     /* next name on hash chain                  */
0181     struct _sym_name_entry_type *az_prev_name_entry;
0182     /* prev name on hash chain                  */
0183     int             az_cycle_id;
0184     /* unique id for each cycle check               */
0185     unsigned char       b_flags;
0186     /* flags (possible value is sym_m_referenced as declared above) */
0187     char            c_text[ 1 ];
0188     /* text of the name                     */
0189 } sym_name_entry_type;
0190 
0191 /*
0192 **  Size of the fixed part of a name entry
0193 */
0194 
0195 #define sym_k_name_entry_size (sizeof( sym_name_entry_type)- \
0196                    sizeof( char[ 1 ]) )
0197 
0198 
0199 /*
0200 **  Value entry 
0201 */
0202 
0203 /*
0204 **  Types of values are included in UilSymDef.h
0205 */
0206 
0207 /*
0208 **  Charsets supported by UIL are defined via WML in UilSymGen.h
0209 */
0210 
0211 
0212 
0213 /* 
0214 **  Common header for each "object" entry.  This header is shared by all
0215 **  widget, gadget, list, argument, callback, and control node types.  It
0216 **  always appears immediately following the standard entry header field.  Also
0217 **  defined here is a prototype node for these types of "object" entries.
0218 */
0219 
0220 typedef struct
0221 {
0222     sym_name_entry_type     * az_name;
0223     /* pointer to the name entry that holds the object name.      */
0224     sym_entry_type      * az_reference;
0225     /* pointer to the entry that references this object.          */
0226     sym_entry_type      * az_next;
0227     /* pointer to next entry in a list, if this entry is linked under */
0228         /* a list entry.                          */
0229     char                        * az_comment;
0230     /* pointer to comment entry associated with this object.          */
0231     unsigned int        b_flags;
0232     /* object flags.                          */
0233 } sym_obj_header_type;
0234 
0235 typedef struct
0236 {
0237     sym_entry_header_type   header;
0238     /* common entry header                        */
0239     sym_obj_header_type     obj_header;
0240     /* common object header                       */
0241 } sym_obj_entry_type;
0242 
0243 
0244 
0245 /*
0246 **  This structure defines an element in a color table.  A color table contains
0247 **  an array of such elements.
0248 */
0249 
0250 typedef struct  
0251 {
0252     unsigned char   b_letter;
0253     /* letter for this color                      */
0254     unsigned char   b_index;
0255     /* index for this color                       */
0256     unsigned short  w_desc_offset;
0257     /* descriptor offset at in context                */
0258     struct _sym_value_entry_type    *az_color;
0259     /* pointer to the value entry for this color              */
0260 
0261 } sym_color_element;
0262 
0263 
0264 /*
0265 **  This structure defines the data for an icon.
0266 */
0267 
0268 typedef struct  
0269 {
0270     unsigned short  w_height;
0271     /* height in pixels of the icon                   */
0272     unsigned short  w_width;
0273     /* width in pixels of the icon                    */
0274     struct _sym_value_entry_type    *az_color_table;
0275     /* pointer to the value entry for the color table         */
0276     struct _sym_value_entry_type    *az_rows;
0277     /* pointer to the list of icon rows               */
0278 
0279 } sym_icon_element;
0280 
0281 /*
0282 **  This structure define an enumeration set entry
0283 */
0284 
0285 /* MOVED TO DBDef.h */
0286 
0287 
0288 /*
0289 **  Auxiliary sym_k_flags for values stored in b_aux_flags field
0290 */
0291 
0292 #define     sym_m_table_entry   (1 << 0)
0293     /* This item is a component of table                  */
0294 #define     sym_m_separate      (1 << 2)
0295     /* add CDA separator to end of string                 */
0296 #define     sym_m_sixteen_bit   sym_m_separate
0297     /* character set is 16-bit                        */
0298 #define     sym_m_exp_eval      (1 << 3)
0299     /* if set, indicates that expression has already been evaluated   */
0300 
0301 /*
0302 **  Types of colors - stored in b_arg_type
0303 */
0304 
0305 #define sym_k_unspecified_color 0
0306 #define sym_k_background_color  1
0307        /* This color should displayed in the background on a monochrome   */
0308        /* display.                            */
0309 #define sym_k_foreground_color  2
0310        /* This color should displayed in the foreground on a monochrome   */
0311        /* display.                            */
0312 
0313 /*
0314 **  value sets defining expression operators
0315 */
0316 
0317 /* MOVED TO DBDef.h */
0318 
0319 typedef struct _sym_value_entry_type
0320 {
0321     sym_entry_header_type   header;
0322     /* common header                          */
0323     sym_obj_header_type     obj_header;
0324     /* common header for objects                      */
0325     unsigned char       b_type;
0326     /* b_type distinguishes usage.  Possible values are sym_k_XXX_value */
0327     /* as defined in UilSymGen.h                      */
0328     unsigned short          w_length;
0329     /* length for variable length types               */
0330     char            output_state;
0331     /* output_state (only byte is needed)                 */
0332     unsigned char       b_table_count;
0333     /* number of strings in table, colors in a color table, or fonts in */
0334     /* a font table.                          */
0335     unsigned char       b_aux_flags;
0336     /* auxiliary flags                        */
0337     unsigned char       b_arg_type;
0338     /* type of argument value or monochrome treatment of a color      */
0339     unsigned char       b_data_offset;
0340     /* offset of bits in context for an icon              */
0341     unsigned char       b_pixel_type;
0342     /* pixel size encoding of an icon                 */
0343     unsigned char       b_charset;
0344     /* character set of a string                      */
0345     unsigned char       b_direction;
0346     /* writing direction of a string, from XmSTRING_DIRECTION_...     */
0347     unsigned char       b_max_index;
0348     /* max index in a color table                     */
0349     unsigned char       b_expr_opr;
0350     /* operator for an expression value node              */
0351     unsigned int        l_circular_ref_chk;
0352     /* field to mark when checking for circular references        */
0353     unsigned short int      b_enumeration_value_code;
0354         /* if non-0, the node takes its value from the value of the       */
0355         /* sym_k_..._enumval code in this field (currently integer)       */
0356     MrmResource_id      resource_id; 
0357     /* 
0358 resource id for private values.               */
0359 
0360 /* Structure for different kinds of nodes pointing to other value nodes   */
0361     struct _sym_value_entry_type    * az_charset_value;
0362         /* pointer to value entry describing a userdefined charset. */
0363         /* Valid only when b_charset == sym_k_userdefined_charset   */
0364     struct _sym_value_entry_type    * az_next_table_value;
0365     /* next element for tables.                 */
0366     struct _sym_value_entry_type    *az_first_table_value;
0367         /* pointer to first table entry (font, string, etc.) if     */
0368         /* value is a table.                        */
0369     struct _sym_value_entry_type    * az_exp_op1;
0370     struct _sym_value_entry_type    * az_exp_op2;
0371         /* pointer to the one or two value operands of an       */
0372         /* expression value node. Special operands have an          */
0373         /* explicitly state semantic.                               */
0374 
0375 /* Union for the actual value of a value node               */
0376     union _sym_value_entry_value_union
0377     {
0378     /*  must be capable of holding a pointer, chs */
0379     long        l_integer;
0380         /* value if an integer.                 */
0381         double      d_real;
0382         /* value if a double float.                 */
0383     char        *c_value;
0384         /* value of ASCIZ string                    */
0385     XmString    xms_value;
0386        /* value of XmString                     */
0387     float           single_float;
0388         /* value if a single float                  */
0389     sym_color_element   *z_color;   
0390         /* value if color table.                    */
0391     sym_icon_element    *z_icon;
0392         /* value if icon                        */
0393     char        *az_data;
0394         /* pointer to any other kind of allocated data      */
0395     } value;
0396 } sym_value_entry_type;
0397 
0398 
0399 /*
0400 **  Define the fixed size of the value entry structure
0401 */   
0402 
0403 #define sym_k_value_entry_size (sizeof(sym_value_entry_type))
0404 
0405 
0406 /*
0407 **  List entry
0408 */
0409 
0410 /*
0411 **  The types of lists, values for the header.b_type field of a list entry.
0412 */
0413 
0414 #define     sym_k_error_list        sym_k_error_entry
0415 #define     sym_k_callback_list     sym_k_callback_entry
0416 #define     sym_k_argument_list     sym_k_argument_entry
0417 #define     sym_k_control_list      sym_k_control_entry
0418 #define     sym_k_proc_ref_list     sym_k_proc_ref_entry
0419 
0420 typedef struct _sym_list_entry_type
0421 {
0422     sym_entry_header_type   header;
0423     /* common header                            */
0424     sym_obj_header_type     obj_header;
0425     /* common header for objects                        */
0426     unsigned short      w_count;
0427     /* number of elements in the list.                  */
0428     unsigned short      w_gadget_count;
0429     /* number of gadgets in the list.                   */
0430 } sym_list_entry_type;
0431 
0432 /*
0433 **  Define the size of the list structure
0434 */   
0435 
0436 #define sym_k_list_entry_size (sizeof(sym_list_entry_type))
0437 
0438 
0439 
0440 /*
0441 **  Nested List entry
0442 */
0443 
0444 /*
0445 **  A nested list entry appears in a list as the entry specifying a reference
0446 **  to another list (a nested list reference). It has its b_type field set
0447 **  to the list type (necessarily the same type as the list it is contained
0448 **  in, and the list it points to). The az_next field locates the next list
0449 **  element, as usual. The az_list field points to the list entry for the
0450 **  list which is referenced.
0451 */
0452 
0453 typedef struct _sym_nested_list_entry_type
0454 {
0455     sym_entry_header_type   header;
0456     /* common header                            */
0457     sym_obj_header_type     obj_header;
0458     /* common header for objects                        */
0459     sym_list_entry_type     *az_list;
0460     /* pointer to the referenced list                                   */
0461 } sym_nested_list_entry_type;
0462 
0463 /*
0464 **  Define the size of the nested_list structure
0465 */   
0466 
0467 #define sym_k_nested_list_entry_size (sizeof(sym_nested_list_entry_type))
0468 
0469 
0470 
0471 /*
0472 **  Argument entry
0473 */
0474 
0475 typedef struct _sym_argument_entry_type
0476 {
0477     sym_entry_header_type   header;
0478     /* common entry header                          */
0479     sym_obj_header_type     obj_header;
0480     /* common object header                         */
0481     sym_value_entry_type    * az_arg_name;
0482     /* pointer to the value entry containing the argument name.     */
0483     sym_value_entry_type    * az_arg_value;
0484     /* pointer to the value entry containing the argument value.        */
0485 } sym_argument_entry_type;
0486 
0487 #define sym_k_argument_entry_size (sizeof(sym_argument_entry_type))
0488 
0489 
0490 /*
0491 **  Procedure Definition Entry
0492 */
0493 
0494 typedef struct
0495 {
0496     sym_entry_header_type   header;
0497     /* common header.                           */
0498     sym_obj_header_type     obj_header;
0499     /* common header for objects                        */
0500     unsigned char       v_arg_checking;
0501     /* should argument type be checked.                 */
0502     unsigned char       b_arg_count;
0503     /* number of arguments.                         */
0504     unsigned char       b_arg_type;
0505     /* The type of single argument (tag) for this procedure.  It should */
0506     /* be a sym_k_XXX_value as defined in UilDBDef.h.           */
0507     unsigned char       b_widget_type;
0508        /* If b_arg_type is sym_k_widget_ref_value, then this field should   */
0509        /* be a sym_k_XXX_object as defined in UilSymGen.h or            */
0510        /* (uil_max_object + 1) if the type is unspecified.          */
0511 } sym_proc_def_entry_type;
0512 
0513 #define sym_k_proc_def_entry_size (sizeof( sym_proc_def_entry_type))
0514 
0515 
0516 /*
0517 **  Procedure Reference Entry
0518 */
0519 
0520 typedef struct
0521 {
0522     sym_entry_header_type   header;
0523     /* common header.                           */
0524     sym_obj_header_type     obj_header;
0525     /* common object header.                        */
0526     sym_proc_def_entry_type *az_proc_def;
0527     /* pointer to the procedure definition entry for the procedure to   */
0528     /* be called.                               */
0529     sym_value_entry_type    *az_arg_value;
0530     /* pointer to the value entry for the argument to be passed as the  */
0531     /* callback tag to the procedure.                   */
0532 } sym_proc_ref_entry_type;
0533 
0534 #define sym_k_proc_ref_entry_size (sizeof( sym_proc_ref_entry_type))
0535 
0536 
0537 /*
0538 **  These values are passed from the grammar to the semantic action routines
0539 **  (SAR) to identify how the procedure is used.
0540 */
0541 #define sym_k_callback_proc 1
0542     /*  The procedure was used as a callback routine.               */
0543 #define sym_k_object_proc   2
0544     /*  The procedure was used as a creation routine for a user defined     */
0545     /*  widget                                  */
0546 
0547 
0548 /*
0549 **  Callback entry
0550 */
0551 
0552 typedef struct _sym_callback_entry_type
0553 {
0554     sym_entry_header_type   header;
0555     /* common entry header.                         */
0556     sym_obj_header_type     obj_header;
0557     /* common object header.                        */
0558     sym_value_entry_type    * az_call_reason_name;
0559     /* pointer to the value entry containing the reason (callback) name */
0560     sym_proc_ref_entry_type * az_call_proc_ref;
0561     /* pointer to the procedure reference to be invoked for this        */
0562     /* callback reason.                         */
0563     sym_list_entry_type     * az_call_proc_ref_list;
0564     /* list entry of procedure references when multiple callbacks are   */
0565     /* used for the callback.                       */
0566 } sym_callback_entry_type;
0567 
0568 #define sym_k_callback_entry_size (sizeof(sym_callback_entry_type))
0569 
0570 
0571 /*
0572 **  Parent list for widgets and gadgets
0573 **
0574 **  This list contains pointers to each of the widgets and gadgets that
0575 **  reference the current widget in their control list.  This information is
0576 **  required in order to check constraint arguments.
0577 */
0578 
0579 typedef struct _sym_parent_list_type
0580 {
0581     sym_entry_header_type           header;
0582     /* common entry header                          */
0583     struct _sym_widget_entry_type   * parent;
0584     /* pointer to a widget entry that references the originating widget */
0585     /* in its controls list.                        */
0586     struct _sym_parent_list_type    * next;
0587     /* pointer to next parent list entry.                   */
0588 } sym_parent_list_type;
0589 
0590 #define sym_k_parent_list_size (sizeof(sym_parent_list_type))
0591 
0592 
0593 
0594 /*
0595 **  Widget entry and Gadget entry
0596 **
0597 **  Gadgets have the same form as a widget.  They are distinguished
0598 **  simply by the setting of sym_m_obj_is_gadget in obj_header.b_flags .
0599 */
0600 
0601 
0602 
0603 /*    widget and gadget node structure.                     */
0604 
0605 typedef struct _sym_widget_entry_type
0606 {
0607     sym_entry_header_type   header;
0608     /* common entry header                          */
0609     sym_obj_header_type     obj_header;
0610     /* common object header                         */
0611     sym_list_entry_type     * az_callbacks;
0612     /* pointer to a list entry of type sym_k_callback_list which        */
0613     /* contains the callbacks for this widget.              */
0614     sym_list_entry_type     * az_arguments;
0615     /* pointer to a list entry of type sym_k_argument_list which        */
0616     /* contains the arguments for this widget.              */
0617     sym_list_entry_type     * az_controls;
0618     /* pointer to a list entry of type sym_k_controls_list which        */
0619     /* contains the widgets that are children (are controlled by) this  */
0620     /* widget.                              */
0621     sym_proc_ref_entry_type * az_create_proc;
0622     /* for user_defined widgets this points to the procedure reference  */
0623     /* entry that specifies the creation routine for the widget.        */
0624     sym_parent_list_type    * parent_list;
0625     /* pointer to a parent list entry that links all objects which      */
0626     /* reference this object in there controls lists.  It is used to    */
0627     /* traverse through the parents to verify that all contraint        */
0628     /* arguments specified on this widget are really inherited from one */
0629     /* of its parents.                          */
0630     int             output_state;
0631     /* Used when generating the UID file.  Possible values:         */
0632     /* sym_k_queued, sym_k_emitted, sym_k_not_processed. (only a byte   */
0633     /* is needed).                              */
0634     MrmResource_id          resource_id;
0635     /* The resource id if the object is private.  This is used when     */
0636     /* generating the UID file.                     */
0637 } sym_widget_entry_type;
0638 
0639 #define sym_k_widget_entry_size (sizeof(sym_widget_entry_type))
0640 
0641 
0642 
0643 /*
0644 **  Control entry
0645 */
0646 
0647 /*
0648 **  Control flags -- These are additional values that may occur in the b_flags
0649 **  field for control entries. NOTE: Must not overlap common flags defined
0650 **  above.
0651 */  
0652 
0653 #define sym_m_def_in_progress   (1 << 6)
0654     /*  used in all lists.                          */
0655 #define sym_m_managed       (1 << 7)
0656     /*  This bit is set when the controlled object is to be managed.        */
0657 #define sym_m_obj_is_reference  (1 << 8)
0658 #define sym_m_forward_ref   (1 << 9)
0659     /*  This bit is set if the item is a forward reference not yet resolved*/
0660 #define sym_m_validated     (1 << 10)
0661     /*  Used for widgets to indicate if it has been validated */
0662 
0663 
0664 /*    Control node structure.                           */
0665 
0666 typedef struct _sym_control_entry_type
0667 {
0668     sym_entry_header_type   header;
0669     /* common entry header                          */
0670     sym_obj_header_type     obj_header;
0671     /* common object header                         */
0672     sym_widget_entry_type   * az_con_obj;
0673     /* pointer to the widget entry that is controlled by this widget.   */
0674 } sym_control_entry_type;
0675 
0676 #define sym_k_control_entry_size (sizeof(sym_control_entry_type))
0677 
0678 
0679 
0680 /*
0681 **  External Definition Entry
0682 */
0683 
0684 typedef struct _sym_external_def_entry_type
0685 {
0686     sym_entry_header_type   header; 
0687     /* common header                            */
0688     struct _sym_external_def_entry_type *az_next_object;
0689     /* pointer next external definition entry.              */
0690     sym_name_entry_type     *az_name;
0691     /* pointer to the name entry for the external object.           */
0692 } sym_external_def_entry_type;
0693 
0694 #define sym_k_external_def_entry_size (sizeof( sym_external_def_entry_type))
0695 
0696 
0697 /*
0698 **  Forward Reference Entry
0699 */
0700 
0701 typedef struct _sym_forward_ref_entry_type
0702 {
0703     sym_entry_header_type   header;
0704     /* common header.  The b_type field holds the object type.      */
0705     struct _sym_forward_ref_entry_type  *az_next_ref;
0706     /* pointer to the next forward reference entry.             */
0707     char            *a_update_location;
0708     /* address of the longword field in the referencing entry that      */
0709     /* needs to be updated with the address of the widget entry that    */
0710     /* this forward reference entry was created for.  When this forward */
0711     /* reference entry is processed in UilP2Reslv.c, then the widget    */
0712     /* named in the az_name field will be defined and it can be     */
0713     /* assigned directly into the a_update_location.            */
0714     sym_name_entry_type     *az_name;
0715     /* pointer to the name entry for the widget being referenced before */
0716     /* it has been defined.                         */
0717     sym_widget_entry_type   *parent;
0718     /* pointer to the widget entry of the parent of the forward     */
0719     /* referenced object.                           */
0720 } sym_forward_ref_entry_type;
0721 
0722 #define sym_k_forward_ref_entry_size (sizeof( sym_forward_ref_entry_type))
0723 
0724 
0725 /*
0726 **  Forward Reference Entry
0727 */
0728 
0729 #define sym_k_patch_add     1
0730 #define sym_k_bind_value_name   2
0731 #define sym_k_patch_list_add    3
0732 
0733 typedef struct _sym_val_forward_ref_entry_type
0734 {
0735     sym_entry_header_type   header;
0736     /* common header.  The b_type field holds the expected value type.  */
0737     struct _sym_val_forward_ref_entry_type  *az_next_ref;
0738     /* pointer to the next forward reference entry.             */
0739     char            *a_update_location;
0740     /* address of the longword field in the referencing entry that      */
0741     /* needs to be updated with the address of the value entry that     */
0742     /* this forward reference entry was created for.  When this forward */
0743     /* reference entry is processed in UilP2Reslv.c, then the value     */
0744     /* named in the az_name field will be defined and it can be     */
0745     /* assigned directly into the a_update_location.            */
0746     sym_name_entry_type     *az_name;
0747     /* pointer to the name entry for the value being referenced before  */
0748     /* it has been defined.                         */
0749     unsigned char       fwd_ref_flags;
0750     /* flags used to indicate how to process entry on forward reference */
0751     /* chain.                               */
0752 } sym_val_forward_ref_entry_type;
0753 
0754 #define sym_k_val_forward_ref_entry_size (sizeof( sym_val_forward_ref_entry_type))
0755 
0756 
0757 /*
0758 **  Default object entry.  Pointed to from the module entry.  The first one in
0759 **  the list contains source information for the "OBJECTS = " text.  The 'next'
0760 **  field is a pointer to a list which contains the data on the actual clauses.
0761 */
0762 
0763 typedef struct _sym_def_obj_entry_type
0764 {
0765     sym_entry_header_type   header;
0766     /* common header                            */
0767     struct _sym_def_obj_entry_type  *next;
0768     /* pointer to next default object entry in the list.            */
0769     char            b_object_info;
0770     char            b_variant_info;
0771 } sym_def_obj_entry_type;
0772 
0773 #define sym_k_def_obj_entry_size (sizeof( sym_def_obj_entry_type))
0774 
0775 
0776 
0777 /*
0778 **  Module entry (only 1 per compilation)
0779 */
0780 
0781 typedef struct _sym_module_entry_type
0782 {
0783     sym_entry_header_type   header;
0784     /* common header                            */
0785     sym_obj_header_type     obj_header;
0786     /* common header for objects                        */
0787     sym_value_entry_type    *az_version;
0788     /* pointer to the value entry containing version string for the     */
0789     /* module (version clause).                     */
0790     sym_value_entry_type    *az_character_set;
0791     /* pointer to the value entry containing the default character set  */
0792     /* information for the module (character set clause).           */
0793     sym_value_entry_type    *az_case_sense;
0794     /* pointer to the value entry containing the value of the module    */
0795     /* case sensitivity clause.                     */
0796     sym_def_obj_entry_type  *az_def_obj;
0797     /* pointer to the default object type specified in the module       */
0798     /* default object variant clause.                   */
0799 } sym_module_entry_type;
0800 
0801 #define sym_k_module_entry_size (sizeof( sym_module_entry_type))
0802 
0803 
0804 /*
0805 **  Section entry
0806 */
0807 
0808 /*
0809 ** Posiblilities for header.b_type when header.b_tag is sym_k_section_entry.
0810 */
0811 
0812 #define sym_k_list_section  1
0813     /* list section                             */
0814 #define sym_k_procedure_section 2
0815     /* procedure section                            */
0816 #define sym_k_value_section 3
0817     /* value section                            */
0818 #define sym_k_identifier_section 4
0819     /* identifier section                           */
0820 #define sym_k_object_section    5
0821     /* widget/gadget section                        */
0822 #define sym_k_include_section   6
0823     /* include directive                            */
0824 #define sym_k_section_tail  7
0825     /* This section has no corresponding UIL construct and exists only  */
0826     /* to aid in saving source information                  */
0827 
0828 
0829 
0830 typedef struct _sym_section_entry_type
0831 {
0832     sym_entry_header_type   header;
0833     /* common header                            */
0834     struct _sym_section_entry_type *prev_section;
0835     /* previous section "LIST".                     */
0836     sym_entry_type      *next;
0837     /* pointer to the entry for the next section _OR_ next child.       */
0838     sym_entry_type      *entries;
0839     /* points to entries in the section _OR_ the entry in the symbol    */
0840     /* table for this child.                        */
0841 } sym_section_entry_type;
0842 
0843 #define sym_k_section_entry_size (sizeof (sym_section_entry_type))
0844 
0845 
0846 /*
0847 **  Include file entry
0848 */
0849 
0850 typedef struct _sym_include_file_entry_type
0851 {
0852     sym_entry_header_type   header;
0853     /* common header                            */
0854     sym_section_entry_type  *sections;
0855     /* pointer to a section list; this list is all of the sections that */
0856     /* exist in this include file.                      */
0857     char            file_name[255];
0858     /* the file name as specified in the include statement in the UIL   */
0859     /* source.                              */
0860     char            full_file_name[255];
0861     /* the expanded name for the include file actually opened.      */
0862 } sym_include_file_entry_type;
0863 
0864 #define sym_k_include_file_entry_size (sizeof( sym_include_file_entry_type))
0865 
0866 
0867 /*
0868 **  Symbol table root entry (root of symbol table tree)
0869 */
0870 
0871 typedef struct _sym_root_entry_type
0872 {
0873     sym_entry_header_type   header;
0874     /* common header                            */
0875     struct _src_source_record_type  *src_record_list;
0876     /* pointer to a list of source records.                 */
0877     char            file_name[255];
0878     /* the main UIL file name as specified on the command line.     */
0879     char            full_file_name[255];
0880     /* the expanded name for the main UIL file that was actually        */
0881     /* opened.                              */
0882     sym_section_entry_type  *sections;
0883     /* pointer to section list entry.                   */
0884     sym_module_entry_type   *module_hdr;
0885     /* pointer to module header entry.                  */
0886     
0887 } sym_root_entry_type;
0888 
0889 #define sym_k_root_entry_size (sizeof( sym_root_entry_type))
0890 
0891 
0892 /*
0893 **  Color Item Entry
0894 */
0895 
0896 typedef struct _sym_color_item_entry_type
0897 {
0898     sym_entry_header_type   header;
0899     /* common header                            */
0900     struct _sym_color_item_entry_type   *az_next;
0901     /* next item                                */
0902     unsigned char       b_letter;
0903     /* letter used for color                        */
0904     unsigned char       b_index;
0905     /* color table index                            */
0906     unsigned char       b_spare1;
0907     sym_value_entry_type    *az_color;
0908     /* name or value entry for the color.                   */
0909     
0910 } sym_color_item_entry_type;
0911 
0912 #define sym_k_color_item_entry_size (sizeof( sym_color_item_entry_type))
0913 
0914 
0915 
0916 /*
0917 **  This macro copies the contents of one entry to another without disturbing
0918 **  the the linked list of entries used to connect all symbol table entries.
0919 */
0920 #define _sym_copy_entry(__dest, __src, __size) _move (__dest, __src, __size)
0921 
0922 
0923 #endif /* UilSymDef_h */
0924 /* DON'T ADD STUFF AFTER THIS #endif */