Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / osf / uil / UilSymDef.h
1 /* 
2  *  @OSF_COPYRIGHT@
3  *  COPYRIGHT NOTICE
4  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
5  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
6  *  the full copyright text.
7 */ 
8 /* 
9  * HISTORY
10 */ 
11 /*   $XConsortium: UilSymDef.h /main/12 1995/07/14 09:38:52 drk $ */
12
13 /*
14 *  (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
15
16 /*
17 **++
18 **  FACILITY:
19 **
20 **      User Interface Language Compiler (UIL)
21 **
22 **  ABSTRACT:
23 **
24 **      This include file defines the interface to the UIL symbol table.
25 **
26 **--
27 **/
28
29 #ifndef UilSymDef_h
30 #define UilSymDef_h
31
32 /*
33 **
34 **  INCLUDE FILES
35 **
36 **/
37
38 #include <Mrm/MrmPublic.h>
39 #include <Xm/Xm.h>
40
41 /*
42 **  constraint check access macro
43 */
44 #define _constraint_check(arg) \
45  (constraint_tab[((arg)-1)/8] & (1 << ((arg)-1)%8))
46
47 /*
48 **  Hash table size
49 */
50
51 /* MOVED TO DBDef.h */
52
53 /* 
54 **  Symbol tags.  These values are used in the tag field of every object header
55 **  to identify the type of the entry.
56 */
57
58 /* MOVED TO DBDef.h */
59
60
61 /*
62 **    Common attribute masks -- These values are used in the b_flags field of
63 **    the object_header.
64 */
65
66 /* MOVED TO DBDef.h */
67
68
69 /*
70 **      Output states - order is important
71 */
72
73 /* MOVED TO DBDef.h */
74
75
76 \f
77 /*
78 **      Constants to define compiler-recognized data types. It is
79 **      important that the names used in .wml language descriptions
80 **      match these names. These values were once automatically generated
81 **      by WML. They are now maintained by hand to reduce compiler
82 **      dependence on WML artifacts.
83 */
84 /* MOVED TO DBDef.h */
85
86  
87 \f
88 /* 
89 **  Header for each symbol entry
90 */
91
92 typedef struct
93 {
94     char                b_tag;
95         /* type of entry The values of this field ia a sym_k_XXX_entry as   */
96         /* defined above.                                                   */
97     char                b_type;
98         /*  generic subtype field usage depends on value of b_tag field     */
99         /*  above (sym_k_value_entry -> b_type is a sym_k_XXX_value as      */
100         /*  defined in UilSymGen.h, sym_k_list_entry -> b_type is a         */
101         /*  sym_k_XXX_list as defined below, sym_k_widget_entry -> b_type   */
102         /*  is a sym_k_XXX_object as defined in UilSymGen.h,                */
103         /*  sym_k_child_entry -> b_type is a sym_k_XXX_child as defined in  */
104         /*  UilSymGen.h, sym_k_section_entry -> b_type is a                 */
105         /*  sym_k_XXX_section as defined below).                            */
106         /*                                                                  */
107     unsigned short      w_node_size;
108         /*  size of the node in longwords                                   */
109     int                 user_data;
110         /* not used directly by the compiler.  It is for use by             */
111         /* applications making use of callable UIL only.                    */
112
113     /*
114     ** Fields to save source information about the symbol:  We currently save
115     ** five things.  The source record where the symbol "begins" (begins is in
116     ** quotes because this may point to just white space before the actual
117     ** symbol), the position (character) within that record where the symbol
118     ** begins, the source record where the symbol ends, the position within
119     ** that record that symbol really begins (i.e. no white space or anything),
120     ** and the position where the symbol definition ends.
121     */
122
123     struct _src_source_record_type  *az_src_rec;
124         /* Source record where symbol defined                       */
125     unsigned char       b_src_pos;
126         /* Starting position within the source record               */
127     unsigned char       b_end_pos;
128         /* Ending position within the source record                 */
129
130 } sym_entry_header_type;
131
132
133 \f
134 /*
135 **  Common view of a symbol entry
136 */
137
138 typedef struct  
139 {
140     sym_entry_header_type   header;
141         /* common part of all symbol entries.                               */
142     char                    b_value[ 1 ];
143         /* information specific to each different entry type.               */
144 } sym_entry_type;
145
146
147 \f
148 /*
149 **  Name entry 
150 */
151
152 /*      Flags for name entries                                              */
153
154 #define         sym_m_referenced        (1 << 0)
155         /* Used in the b_flags field of a name entry.  Set if this name is   */
156         /* reference elsewhere in this UIL source module.                   */
157 #define         sym_m_cycle_checked     (1 << 1)
158         /* set if the widget entry for this name has been checked for   */
159         /* cyclic references.                                           */
160 #define         sym_m_has_cycle         (2 << 1)
161         /* set if a cycle was detected for a widget entry               */
162 #define         sym_m_charset           (1 << 3)
163        /* set if symbol being used as charset name. */
164
165 typedef struct _sym_name_entry_type
166 {
167     sym_entry_header_type       header;
168         /* common header                                                */
169     sym_entry_type              *az_object;
170         /* pointer to the object entry with this name                   */
171     struct _sym_name_entry_type *az_next_name_entry;
172         /* next name on hash chain                                      */
173     struct _sym_name_entry_type *az_prev_name_entry;
174         /* prev name on hash chain                                      */
175     int                         az_cycle_id;
176         /* unique id for each cycle check                               */
177     unsigned char               b_flags;
178         /* flags (possible value is sym_m_referenced as declared above) */
179     char                        c_text[ 1 ];
180         /* text of the name                                             */
181 } sym_name_entry_type;
182
183 /*
184 **  Size of the fixed part of a name entry
185 */
186
187 #define sym_k_name_entry_size (sizeof( sym_name_entry_type)- \
188                                sizeof( char[ 1 ]) )
189
190 \f
191 /*
192 **  Value entry 
193 */
194
195 /*
196 **  Types of values are included in UilSymDef.h
197 */
198
199 /*
200 **  Charsets supported by UIL are defined via WML in UilSymGen.h
201 */
202
203
204 \f
205 /* 
206 **  Common header for each "object" entry.  This header is shared by all
207 **  widget, gadget, list, argument, callback, and control node types.  It
208 **  always appears immediately following the standard entry header field.  Also
209 **  defined here is a prototype node for these types of "object" entries.
210 */
211
212 typedef struct
213 {
214     sym_name_entry_type         * az_name;
215         /* pointer to the name entry that holds the object name.          */
216     sym_entry_type              * az_reference;
217         /* pointer to the entry that references this object.              */
218     sym_entry_type              * az_next;
219         /* pointer to next entry in a list, if this entry is linked under */
220         /* a list entry.                                                  */
221     char                        * az_comment;
222         /* pointer to comment entry associated with this object.          */
223     unsigned int                b_flags;
224         /* object flags.                                                  */
225 } sym_obj_header_type;
226
227 typedef struct
228 {
229     sym_entry_header_type       header;
230         /* common entry header                                            */
231     sym_obj_header_type         obj_header;
232         /* common object header                                           */
233 } sym_obj_entry_type;
234
235
236 \f
237 /*
238 **  This structure defines an element in a color table.  A color table contains
239 **  an array of such elements.
240 */
241
242 typedef struct  
243 {
244     unsigned char       b_letter;
245         /* letter for this color                                          */
246     unsigned char       b_index;
247         /* index for this color                                           */
248     unsigned short      w_desc_offset;
249         /* descriptor offset at in context                                */
250     struct _sym_value_entry_type    *az_color;
251         /* pointer to the value entry for this color                      */
252
253 } sym_color_element;
254
255
256 /*
257 **  This structure defines the data for an icon.
258 */
259
260 typedef struct  
261 {
262     unsigned short      w_height;
263         /* height in pixels of the icon                                   */
264     unsigned short      w_width;
265         /* width in pixels of the icon                                    */
266     struct _sym_value_entry_type    *az_color_table;
267         /* pointer to the value entry for the color table                 */
268     struct _sym_value_entry_type    *az_rows;
269         /* pointer to the list of icon rows                               */
270
271 } sym_icon_element;
272
273 /*
274 **  This structure define an enumeration set entry
275 */
276
277 /* MOVED TO DBDef.h */
278
279
280 /*
281 **      Auxiliary sym_k_flags for values stored in b_aux_flags field
282 */
283
284 #define         sym_m_table_entry       (1 << 0)
285     /* This item is a component of table                                  */
286 #define         sym_m_separate          (1 << 2)
287     /* add CDA separator to end of string                                 */
288 #define         sym_m_sixteen_bit       sym_m_separate
289     /* character set is 16-bit                                            */
290 #define         sym_m_exp_eval          (1 << 3)
291     /* if set, indicates that expression has already been evaluated       */
292
293 /*
294 **      Types of colors - stored in b_arg_type
295 */
296
297 #define sym_k_unspecified_color 0
298 #define sym_k_background_color  1
299        /* This color should displayed in the background on a monochrome   */
300        /* display.                                                        */
301 #define sym_k_foreground_color  2
302        /* This color should displayed in the foreground on a monochrome   */
303        /* display.                                                        */
304
305 /*
306 **      value sets defining expression operators
307 */
308
309 /* MOVED TO DBDef.h */
310
311 typedef struct _sym_value_entry_type
312 {
313     sym_entry_header_type   header;
314         /* common header                                                  */
315     sym_obj_header_type     obj_header;
316         /* common header for objects                                      */
317     unsigned char           b_type;
318         /* b_type distinguishes usage.  Possible values are sym_k_XXX_value */
319         /* as defined in UilSymGen.h                                      */
320     unsigned short          w_length;
321         /* length for variable length types                               */
322     char                    output_state;
323         /* output_state (only byte is needed)                             */
324     unsigned char           b_table_count;
325         /* number of strings in table, colors in a color table, or fonts in */
326         /* a font table.                                                  */
327     unsigned char           b_aux_flags;
328         /* auxiliary flags                                                */
329     unsigned char           b_arg_type;
330         /* type of argument value or monochrome treatment of a color      */
331     unsigned char           b_data_offset;
332         /* offset of bits in context for an icon                          */
333     unsigned char           b_pixel_type;
334         /* pixel size encoding of an icon                                 */
335     unsigned char           b_charset;
336         /* character set of a string                                      */
337     unsigned char           b_direction;
338         /* writing direction of a string, from XmSTRING_DIRECTION_...     */
339     unsigned char           b_max_index;
340         /* max index in a color table                                     */
341     unsigned char           b_expr_opr;
342         /* operator for an expression value node                          */
343     unsigned int            l_circular_ref_chk;
344         /* field to mark when checking for circular references            */
345     unsigned short int      b_enumeration_value_code;
346         /* if non-0, the node takes its value from the value of the       */
347         /* sym_k_..._enumval code in this field (currently integer)       */
348     MrmResource_id      resource_id; 
349         /* 
350 resource id for private values.                           */
351
352 /* Structure for different kinds of nodes pointing to other value nodes   */
353     struct _sym_value_entry_type    * az_charset_value;
354         /* pointer to value entry describing a userdefined charset. */
355         /* Valid only when b_charset == sym_k_userdefined_charset   */
356     struct _sym_value_entry_type    * az_next_table_value;
357         /* next element for tables.                                 */
358     struct _sym_value_entry_type    *az_first_table_value;
359         /* pointer to first table entry (font, string, etc.) if     */
360         /* value is a table.                                        */
361     struct _sym_value_entry_type        * az_exp_op1;
362     struct _sym_value_entry_type        * az_exp_op2;
363         /* pointer to the one or two value operands of an           */
364         /* expression value node. Special operands have an          */
365         /* explicitly state semantic.                               */
366
367 /* Union for the actual value of a value node                           */
368     union _sym_value_entry_value_union
369     {
370         /*  must be capable of holding a pointer, chs */
371         long            l_integer;
372             /* value if an integer.                                     */
373         double          d_real;
374             /* value if a double float.                                 */
375         char            *c_value;
376             /* value of ASCIZ string                                    */
377         XmString        xms_value;
378            /* value of XmString                                         */
379         float           single_float;
380             /* value if a single float                                  */
381         sym_color_element       *z_color;       
382             /* value if color table.                                    */
383         sym_icon_element        *z_icon;
384             /* value if icon                                            */
385         char            *az_data;
386             /* pointer to any other kind of allocated data              */
387     } value;
388 } sym_value_entry_type;
389
390
391 /*
392 **  Define the fixed size of the value entry structure
393 */   
394
395 #define sym_k_value_entry_size (sizeof(sym_value_entry_type))
396
397 \f
398 /*
399 **  List entry
400 */
401
402 /*
403 **  The types of lists, values for the header.b_type field of a list entry.
404 */
405
406 #define         sym_k_error_list                sym_k_error_entry
407 #define         sym_k_callback_list             sym_k_callback_entry
408 #define         sym_k_argument_list             sym_k_argument_entry
409 #define         sym_k_control_list              sym_k_control_entry
410 #define         sym_k_proc_ref_list             sym_k_proc_ref_entry
411
412 typedef struct _sym_list_entry_type
413 {
414     sym_entry_header_type   header;
415         /* common header                                                    */
416     sym_obj_header_type     obj_header;
417         /* common header for objects                                        */
418     unsigned short          w_count;
419         /* number of elements in the list.                                  */
420     unsigned short          w_gadget_count;
421         /* number of gadgets in the list.                                   */
422 } sym_list_entry_type;
423
424 /*
425 **  Define the size of the list structure
426 */   
427
428 #define sym_k_list_entry_size (sizeof(sym_list_entry_type))
429
430
431 \f
432 /*
433 **  Nested List entry
434 */
435
436 /*
437 **  A nested list entry appears in a list as the entry specifying a reference
438 **  to another list (a nested list reference). It has its b_type field set
439 **  to the list type (necessarily the same type as the list it is contained
440 **  in, and the list it points to). The az_next field locates the next list
441 **  element, as usual. The az_list field points to the list entry for the
442 **  list which is referenced.
443 */
444
445 typedef struct _sym_nested_list_entry_type
446 {
447     sym_entry_header_type   header;
448         /* common header                                                    */
449     sym_obj_header_type     obj_header;
450         /* common header for objects                                        */
451     sym_list_entry_type     *az_list;
452         /* pointer to the referenced list                                   */
453 } sym_nested_list_entry_type;
454
455 /*
456 **  Define the size of the nested_list structure
457 */   
458
459 #define sym_k_nested_list_entry_size (sizeof(sym_nested_list_entry_type))
460
461
462 \f
463 /*
464 **  Argument entry
465 */
466
467 typedef struct _sym_argument_entry_type
468 {
469     sym_entry_header_type       header;
470         /* common entry header                                              */
471     sym_obj_header_type         obj_header;
472         /* common object header                                             */
473     sym_value_entry_type        * az_arg_name;
474         /* pointer to the value entry containing the argument name.         */
475     sym_value_entry_type        * az_arg_value;
476         /* pointer to the value entry containing the argument value.        */
477 } sym_argument_entry_type;
478
479 #define sym_k_argument_entry_size (sizeof(sym_argument_entry_type))
480
481 \f
482 /*
483 **  Procedure Definition Entry
484 */
485
486 typedef struct
487 {
488     sym_entry_header_type       header;
489         /* common header.                                                   */
490     sym_obj_header_type         obj_header;
491         /* common header for objects                                        */
492     unsigned char               v_arg_checking;
493         /* should argument type be checked.                                 */
494     unsigned char               b_arg_count;
495         /* number of arguments.                                             */
496     unsigned char               b_arg_type;
497         /* The type of single argument (tag) for this procedure.  It should */
498         /* be a sym_k_XXX_value as defined in UilDBDef.h.                   */
499     unsigned char               b_widget_type;
500        /* If b_arg_type is sym_k_widget_ref_value, then this field should   */
501        /* be a sym_k_XXX_object as defined in UilSymGen.h or                */
502        /* (uil_max_object + 1) if the type is unspecified.                  */
503 } sym_proc_def_entry_type;
504
505 #define sym_k_proc_def_entry_size (sizeof( sym_proc_def_entry_type))
506
507 \f
508 /*
509 **  Procedure Reference Entry
510 */
511
512 typedef struct
513 {
514     sym_entry_header_type       header;
515         /* common header.                                                   */
516     sym_obj_header_type         obj_header;
517         /* common object header.                                            */
518     sym_proc_def_entry_type     *az_proc_def;
519         /* pointer to the procedure definition entry for the procedure to   */
520         /* be called.                                                       */
521     sym_value_entry_type        *az_arg_value;
522         /* pointer to the value entry for the argument to be passed as the  */
523         /* callback tag to the procedure.                                   */
524 } sym_proc_ref_entry_type;
525
526 #define sym_k_proc_ref_entry_size (sizeof( sym_proc_ref_entry_type))
527
528
529 /*
530 **  These values are passed from the grammar to the semantic action routines
531 **  (SAR) to identify how the procedure is used.
532 */
533 #define sym_k_callback_proc     1
534     /*  The procedure was used as a callback routine.                       */
535 #define sym_k_object_proc       2
536     /*  The procedure was used as a creation routine for a user defined     */
537     /*  widget                                                              */
538 \f
539
540 /*
541 **  Callback entry
542 */
543
544 typedef struct _sym_callback_entry_type
545 {
546     sym_entry_header_type       header;
547         /* common entry header.                                             */
548     sym_obj_header_type         obj_header;
549         /* common object header.                                            */
550     sym_value_entry_type        * az_call_reason_name;
551         /* pointer to the value entry containing the reason (callback) name */
552     sym_proc_ref_entry_type     * az_call_proc_ref;
553         /* pointer to the procedure reference to be invoked for this        */
554         /* callback reason.                                                 */
555     sym_list_entry_type         * az_call_proc_ref_list;
556         /* list entry of procedure references when multiple callbacks are   */
557         /* used for the callback.                                           */
558 } sym_callback_entry_type;
559
560 #define sym_k_callback_entry_size (sizeof(sym_callback_entry_type))
561
562 \f
563 /*
564 **  Parent list for widgets and gadgets
565 **
566 **  This list contains pointers to each of the widgets and gadgets that
567 **  reference the current widget in their control list.  This information is
568 **  required in order to check constraint arguments.
569 */
570
571 typedef struct _sym_parent_list_type
572 {
573     sym_entry_header_type           header;
574         /* common entry header                                              */
575     struct _sym_widget_entry_type   * parent;
576         /* pointer to a widget entry that references the originating widget */
577         /* in its controls list.                                            */
578     struct _sym_parent_list_type    * next;
579         /* pointer to next parent list entry.                               */
580 } sym_parent_list_type;
581
582 #define sym_k_parent_list_size (sizeof(sym_parent_list_type))
583
584 \f
585
586 /*
587 **  Widget entry and Gadget entry
588 **
589 **      Gadgets have the same form as a widget.  They are distinguished
590 **      simply by the setting of sym_m_obj_is_gadget in obj_header.b_flags .
591 */
592
593
594
595 /*    widget and gadget node structure.                                     */
596
597 typedef struct _sym_widget_entry_type
598 {
599     sym_entry_header_type       header;
600         /* common entry header                                              */
601     sym_obj_header_type         obj_header;
602         /* common object header                                             */
603     sym_list_entry_type         * az_callbacks;
604         /* pointer to a list entry of type sym_k_callback_list which        */
605         /* contains the callbacks for this widget.                          */
606     sym_list_entry_type         * az_arguments;
607         /* pointer to a list entry of type sym_k_argument_list which        */
608         /* contains the arguments for this widget.                          */
609     sym_list_entry_type         * az_controls;
610         /* pointer to a list entry of type sym_k_controls_list which        */
611         /* contains the widgets that are children (are controlled by) this  */
612         /* widget.                                                          */
613     sym_proc_ref_entry_type     * az_create_proc;
614         /* for user_defined widgets this points to the procedure reference  */
615         /* entry that specifies the creation routine for the widget.        */
616     sym_parent_list_type        * parent_list;
617         /* pointer to a parent list entry that links all objects which      */
618         /* reference this object in there controls lists.  It is used to    */
619         /* traverse through the parents to verify that all contraint        */
620         /* arguments specified on this widget are really inherited from one */
621         /* of its parents.                                                  */
622     int                         output_state;
623         /* Used when generating the UID file.  Possible values:             */
624         /* sym_k_queued, sym_k_emitted, sym_k_not_processed. (only a byte   */
625         /* is needed).                                                      */
626     MrmResource_id                      resource_id;
627         /* The resource id if the object is private.  This is used when     */
628         /* generating the UID file.                                         */
629 } sym_widget_entry_type;
630
631 #define sym_k_widget_entry_size (sizeof(sym_widget_entry_type))
632
633 \f
634
635 /*
636 **  Control entry
637 */
638
639 /*
640 **  Control flags -- These are additional values that may occur in the b_flags
641 **  field for control entries. NOTE: Must not overlap common flags defined
642 **  above.
643 */      
644
645 #define sym_m_def_in_progress   (1 << 6)
646     /*  used in all lists.                                                  */
647 #define sym_m_managed           (1 << 7)
648     /*  This bit is set when the controlled object is to be managed.        */
649 #define sym_m_obj_is_reference  (1 << 8)
650 #define sym_m_forward_ref       (1 << 9)
651     /*  This bit is set if the item is a forward reference not yet resolved*/
652 #define sym_m_validated         (1 << 10)
653     /*  Used for widgets to indicate if it has been validated */
654
655
656 /*    Control node structure.                                               */
657
658 typedef struct _sym_control_entry_type
659 {
660     sym_entry_header_type       header;
661         /* common entry header                                              */
662     sym_obj_header_type         obj_header;
663         /* common object header                                             */
664     sym_widget_entry_type       * az_con_obj;
665         /* pointer to the widget entry that is controlled by this widget.   */
666 } sym_control_entry_type;
667
668 #define sym_k_control_entry_size (sizeof(sym_control_entry_type))
669
670
671 \f
672 /*
673 **  External Definition Entry
674 */
675
676 typedef struct _sym_external_def_entry_type
677 {
678     sym_entry_header_type       header; 
679         /* common header                                                    */
680     struct _sym_external_def_entry_type *az_next_object;
681         /* pointer next external definition entry.                          */
682     sym_name_entry_type         *az_name;
683         /* pointer to the name entry for the external object.               */
684 } sym_external_def_entry_type;
685
686 #define sym_k_external_def_entry_size (sizeof( sym_external_def_entry_type))
687
688 \f
689 /*
690 **  Forward Reference Entry
691 */
692
693 typedef struct _sym_forward_ref_entry_type
694 {
695     sym_entry_header_type       header;
696         /* common header.  The b_type field holds the object type.          */
697     struct _sym_forward_ref_entry_type  *az_next_ref;
698         /* pointer to the next forward reference entry.                     */
699     char                        *a_update_location;
700         /* address of the longword field in the referencing entry that      */
701         /* needs to be updated with the address of the widget entry that    */
702         /* this forward reference entry was created for.  When this forward */
703         /* reference entry is processed in UilP2Reslv.c, then the widget    */
704         /* named in the az_name field will be defined and it can be         */
705         /* assigned directly into the a_update_location.                    */
706     sym_name_entry_type         *az_name;
707         /* pointer to the name entry for the widget being referenced before */
708         /* it has been defined.                                             */
709     sym_widget_entry_type       *parent;
710         /* pointer to the widget entry of the parent of the forward         */
711         /* referenced object.                                               */
712 } sym_forward_ref_entry_type;
713
714 #define sym_k_forward_ref_entry_size (sizeof( sym_forward_ref_entry_type))
715
716 \f
717 /*
718 **  Forward Reference Entry
719 */
720
721 #define sym_k_patch_add         1
722 #define sym_k_bind_value_name   2
723 #define sym_k_patch_list_add    3
724
725 typedef struct _sym_val_forward_ref_entry_type
726 {
727     sym_entry_header_type       header;
728         /* common header.  The b_type field holds the expected value type.  */
729     struct _sym_val_forward_ref_entry_type      *az_next_ref;
730         /* pointer to the next forward reference entry.                     */
731     char                        *a_update_location;
732         /* address of the longword field in the referencing entry that      */
733         /* needs to be updated with the address of the value entry that     */
734         /* this forward reference entry was created for.  When this forward */
735         /* reference entry is processed in UilP2Reslv.c, then the value     */
736         /* named in the az_name field will be defined and it can be         */
737         /* assigned directly into the a_update_location.                    */
738     sym_name_entry_type         *az_name;
739         /* pointer to the name entry for the value being referenced before  */
740         /* it has been defined.                                             */
741     unsigned char               fwd_ref_flags;
742         /* flags used to indicate how to process entry on forward reference */
743         /* chain.                                                           */
744 } sym_val_forward_ref_entry_type;
745
746 #define sym_k_val_forward_ref_entry_size (sizeof( sym_val_forward_ref_entry_type))
747
748 \f
749 /*
750 **  Default object entry.  Pointed to from the module entry.  The first one in
751 **  the list contains source information for the "OBJECTS = " text.  The 'next'
752 **  field is a pointer to a list which contains the data on the actual clauses.
753 */
754
755 typedef struct _sym_def_obj_entry_type
756 {
757     sym_entry_header_type       header;
758         /* common header                                                    */
759     struct _sym_def_obj_entry_type  *next;
760         /* pointer to next default object entry in the list.                */
761     char                        b_object_info;
762     char                        b_variant_info;
763 } sym_def_obj_entry_type;
764
765 #define sym_k_def_obj_entry_size (sizeof( sym_def_obj_entry_type))
766
767
768 \f
769 /*
770 **  Module entry (only 1 per compilation)
771 */
772
773 typedef struct _sym_module_entry_type
774 {
775     sym_entry_header_type       header;
776         /* common header                                                    */
777     sym_obj_header_type         obj_header;
778         /* common header for objects                                        */
779     sym_value_entry_type        *az_version;
780         /* pointer to the value entry containing version string for the     */
781         /* module (version clause).                                         */
782     sym_value_entry_type        *az_character_set;
783         /* pointer to the value entry containing the default character set  */
784         /* information for the module (character set clause).               */
785     sym_value_entry_type        *az_case_sense;
786         /* pointer to the value entry containing the value of the module    */
787         /* case sensitivity clause.                                         */
788     sym_def_obj_entry_type      *az_def_obj;
789         /* pointer to the default object type specified in the module       */
790         /* default object variant clause.                                   */
791 } sym_module_entry_type;
792
793 #define sym_k_module_entry_size (sizeof( sym_module_entry_type))
794
795 \f
796 /*
797 **      Section entry
798 */
799
800 /*
801 ** Posiblilities for header.b_type when header.b_tag is sym_k_section_entry.
802 */
803
804 #define sym_k_list_section      1
805         /* list section                                                     */
806 #define sym_k_procedure_section 2
807         /* procedure section                                                */
808 #define sym_k_value_section     3
809         /* value section                                                    */
810 #define sym_k_identifier_section 4
811         /* identifier section                                               */
812 #define sym_k_object_section    5
813         /* widget/gadget section                                            */
814 #define sym_k_include_section   6
815         /* include directive                                                */
816 #define sym_k_section_tail      7
817         /* This section has no corresponding UIL construct and exists only  */
818         /* to aid in saving source information                              */
819
820
821
822 typedef struct _sym_section_entry_type
823 {
824     sym_entry_header_type       header;
825         /* common header                                                    */
826     struct _sym_section_entry_type *prev_section;
827         /* previous section "LIST".                                         */
828     sym_entry_type              *next;
829         /* pointer to the entry for the next section _OR_ next child.       */
830     sym_entry_type              *entries;
831         /* points to entries in the section _OR_ the entry in the symbol    */
832         /* table for this child.                                            */
833 } sym_section_entry_type;
834
835 #define sym_k_section_entry_size (sizeof (sym_section_entry_type))
836
837 \f
838 /*
839 **  Include file entry
840 */
841
842 typedef struct _sym_include_file_entry_type
843 {
844     sym_entry_header_type       header;
845         /* common header                                                    */
846     sym_section_entry_type      *sections;
847         /* pointer to a section list; this list is all of the sections that */
848         /* exist in this include file.                                      */
849     char                        file_name[255];
850         /* the file name as specified in the include statement in the UIL   */
851         /* source.                                                          */
852     char                        full_file_name[255];
853         /* the expanded name for the include file actually opened.          */
854 } sym_include_file_entry_type;
855
856 #define sym_k_include_file_entry_size (sizeof( sym_include_file_entry_type))
857
858 \f
859 /*
860 **  Symbol table root entry (root of symbol table tree)
861 */
862
863 typedef struct _sym_root_entry_type
864 {
865     sym_entry_header_type       header;
866         /* common header                                                    */
867     struct _src_source_record_type      *src_record_list;
868         /* pointer to a list of source records.                             */
869     char                        file_name[255];
870         /* the main UIL file name as specified on the command line.         */
871     char                        full_file_name[255];
872         /* the expanded name for the main UIL file that was actually        */
873         /* opened.                                                          */
874     sym_section_entry_type      *sections;
875         /* pointer to section list entry.                                   */
876     sym_module_entry_type       *module_hdr;
877         /* pointer to module header entry.                                  */
878     
879 } sym_root_entry_type;
880
881 #define sym_k_root_entry_size (sizeof( sym_root_entry_type))
882
883 \f
884 /*
885 **  Color Item Entry
886 */
887
888 typedef struct _sym_color_item_entry_type
889 {
890     sym_entry_header_type       header;
891         /* common header                                                    */
892     struct _sym_color_item_entry_type   *az_next;
893         /* next item                                                        */
894     unsigned char               b_letter;
895         /* letter used for color                                            */
896     unsigned char               b_index;
897         /* color table index                                                */
898     unsigned char               b_spare1;
899     sym_value_entry_type        *az_color;
900         /* name or value entry for the color.                               */
901         
902 } sym_color_item_entry_type;
903
904 #define sym_k_color_item_entry_size (sizeof( sym_color_item_entry_type))
905
906
907 \f
908 /*
909 **  This macro copies the contents of one entry to another without disturbing
910 **  the the linked list of entries used to connect all symbol table entries.
911 */
912 #define _sym_copy_entry(__dest, __src, __size) _move (__dest, __src, __size)
913
914
915 #endif /* UilSymDef_h */
916 /* DON'T ADD STUFF AFTER THIS #endif */