UilSymDef.h 28 KB

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