UilDefI.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  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. /* $TOG: UilDefI.h /main/13 1999/07/07 10:24:15 vipin $ */
  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 set of definitions used by all of
  45. ** modules of the UIL compiler.
  46. **
  47. **--
  48. **/
  49. #ifndef UilDefI_h
  50. #define UilDefI_h
  51. /*
  52. **
  53. ** INCLUDE FILES
  54. **
  55. **/
  56. #define X_INCLUDE_TIME_H
  57. #define XOS_USE_XT_LOCKING
  58. #include <X11/Xos_r.h> /* for _Xctimeparams */
  59. #include <Mrm/MrmAppl.h>
  60. #include <Mrm/Mrm.h>
  61. /*
  62. **
  63. ** Universal Definitions
  64. **
  65. */
  66. #define _compiler_version "V2.0-000"
  67. #define _compiler_version_int 2
  68. #define _data_version 2
  69. #define _host_compiler "Motif Uil Compiler"
  70. #ifdef TRUE
  71. #undef TRUE
  72. #endif
  73. #define TRUE 1
  74. #ifdef FALSE
  75. #undef FALSE
  76. #endif
  77. #define FALSE 0
  78. #ifndef debug_version
  79. #define debug_version FALSE
  80. #endif
  81. #define NOSTRING_DIRECTION 2
  82. #define k_normal 1
  83. #define k_error 0
  84. typedef int status;
  85. typedef int boolean;
  86. /*
  87. ** Copy const handling from XmP.h.
  88. */
  89. #ifndef XmConst
  90. #if defined(__STDC__) || !defined( NO_CONST )
  91. #define XmConst const
  92. #else
  93. #define XmConst
  94. #endif /* __STDC__ */
  95. #endif /* XmConst */
  96. /* Uil will automatically strip this prefix when saving name of automatically
  97. * created child. This is used to prevent name conflicts in existing uil
  98. * files. Children names without this prefix will be saved as is.
  99. */
  100. #define AUTO_CHILD_PREFIX "Xm_"
  101. /*
  102. **
  103. ** Constants controlling limits in the compiler
  104. **
  105. */
  106. #define src_k_max_source_files 101
  107. #define src_k_max_source_line_length 132
  108. #define lex_k_unprint_sub '?'
  109. #define sym_k_max_list_count 1000
  110. #define sym_k_max_color_count 256
  111. #define Uil_k_max_include_dir_count 32
  112. /*
  113. **
  114. ** Definition of Compiler Termination Statuses
  115. **
  116. */
  117. #define uil_k_min_status Uil_k_min_status
  118. #define uil_k_success_status Uil_k_success_status
  119. #define uil_k_info_status Uil_k_info_status
  120. #define uil_k_warning_status Uil_k_warning_status
  121. #define uil_k_error_status Uil_k_error_status
  122. #define uil_k_severe_status Uil_k_severe_status
  123. #define uil_k_max_status Uil_k_max_status
  124. /*
  125. **
  126. ** Macros to access bit vectors
  127. **
  128. */
  129. /* MOVED TO DBDef.h */
  130. /*
  131. **
  132. ** Upper and Lower Case Translation Macros
  133. **
  134. */
  135. #define _upper(c) ((c) >= 'a' && (c) <= 'z' ? (c) & 0x5F:(c))
  136. #define _lower(c) ((c) >= 'A' && (c) <= 'Z' ? (c) | 0x20:(c))
  137. /*
  138. **
  139. ** Assert Macro
  140. **
  141. */
  142. #if debug_version
  143. #define _assert( __condition, __text ) \
  144. if (!(__condition)) \
  145. { diag_issue_internal_error( (__text)); }
  146. #else
  147. #define _assert( __condition, __text ) \
  148. if (!(__condition)) \
  149. { diag_issue_internal_error( NULL ); }
  150. #endif
  151. /*
  152. **
  153. ** _error and _okay macro
  154. **
  155. */
  156. #define _error( __status ) \
  157. ((__status & 1)==0)
  158. #define _success( __status ) \
  159. ((__status & 1)==1)
  160. /*
  161. **
  162. ** Memory allocation definitions
  163. **
  164. */
  165. #define _get_memory XtMalloc
  166. #define _free_memory XtFree
  167. /*
  168. **
  169. ** Move macro
  170. **
  171. */
  172. #ifdef NO_MEMMOVE
  173. /* For fixing the bug CR 4581 */
  174. extern char* uil_mmove(char*, char*, int);
  175. #define _move uil_mmove
  176. #else
  177. #define _move memmove
  178. #endif /* NO_MEMMOVE */
  179. /*
  180. **
  181. ** Compare macro
  182. **
  183. */
  184. #define _compare strcmp
  185. /*
  186. **
  187. ** Fill macro
  188. **
  189. */
  190. #define _fill( __string, __char, __len ) \
  191. { \
  192. register int i = __len; \
  193. while (--i >= 0) \
  194. (__string)[i] = __char; \
  195. }
  196. /*
  197. **
  198. ** Index macro
  199. **
  200. */
  201. #define _index( __char, __string, __len ) \
  202. ((int)((char *)memchr( __string, __char, __len ) - (char *)__string ))
  203. /*
  204. **
  205. ** Debug output macro
  206. **
  207. */
  208. #if debug_version
  209. #define _debug_output lst_debug_output
  210. #else
  211. #define _debug_output printf
  212. #endif
  213. /*
  214. **
  215. ** Common includes needed by most modules
  216. **
  217. */
  218. #include "Uil.h"
  219. #include "UilDBDef.h" /* for binary database */
  220. #include "UilMess.h"
  221. #include "UilSymDef.h" /* must come before UilKeyDef.h */
  222. #include "UilSrcDef.h" /* must come before UilIODef.h */
  223. #include "UilIODef.h"
  224. #include "UilDiagDef.h"
  225. #include "UilSarDef.h"
  226. #if defined(linux)
  227. #define YYSTYPE yystype
  228. #endif
  229. #include "UilLexPars.h"
  230. #include "UilCmdDef.h"
  231. #include "UilLexDef.h"
  232. /*
  233. ** Global declarations
  234. */
  235. #include "UilSymGl.h"
  236. #include "UilCompGl.h"
  237. /* Needed for following macro. */
  238. #include "UilSymGen.h"
  239. #define DEFAULT_TAG uil_charset_names[sym_k_XmFONTLIST_DEFAULT_TAG_charset]
  240. /*
  241. ** Function declarations not defined elsewhere
  242. */
  243. #define _ARGUMENTS(arglist) arglist
  244. /* uilcmd.c */
  245. #if defined(__cplusplus) || defined(c_plusplus)
  246. extern "C" {
  247. #endif
  248. extern void diag_issue_diagnostic
  249. _ARGUMENTS(( int d_message_number ,
  250. src_source_record_type *az_src_rec ,
  251. int l_start_column, ... ));
  252. extern void lst_debug_output _ARGUMENTS(( char *format, ... ));
  253. void cmd_decode_command_line _ARGUMENTS(( int l_arg_count , char *rac_arg_value []));
  254. /* uildb.c */
  255. extern void db_incorporate _ARGUMENTS(( void ));
  256. extern void db_read_ints_and_string _ARGUMENTS((_db_header_ptr header));
  257. extern void db_read_char_table _ARGUMENTS((_db_header_ptr header));
  258. extern void db_read_length_and_string _ARGUMENTS((_db_header_ptr header));
  259. extern void db_read_int_and_shorts _ARGUMENTS((_db_header_ptr header));
  260. extern void db_open_file _ARGUMENTS(( void ));
  261. extern String get_root_dir_name _ARGUMENTS(( void ));
  262. extern String init_wmd_path _ARGUMENTS((String filename));
  263. /* uildiags.c */
  264. extern void diag_issue_summary _ARGUMENTS(( void ));
  265. extern char *diag_tag_text _ARGUMENTS(( int XmConst b_tag ));
  266. extern char *diag_object_text _ARGUMENTS(( int XmConst b_type ));
  267. extern char *diag_value_text _ARGUMENTS(( int XmConst b_type ));
  268. extern char *diag_charset_text _ARGUMENTS(( int XmConst b_type ));
  269. extern void diag_initialize_diagnostics _ARGUMENTS(( void ));
  270. extern void diag_restore_diagnostics _ARGUMENTS(( void ));
  271. extern void diag_reset_overflow_handler _ARGUMENTS(( void ));
  272. extern void diag_handler _ARGUMENTS(( int l_error ));
  273. extern void diag_issue_internal_error _ARGUMENTS(( char *error_text ));
  274. extern void write_msg_to_standard_error _ARGUMENTS(( XmConst int message_number , XmConst char *src_buffer , XmConst char *ptr_buffer , XmConst char *msg_buffer , XmConst char *loc_buffer ));
  275. extern char XmConst *diag_get_message_abbrev _ARGUMENTS(( int d_message_number ));
  276. extern void diag_report_status _ARGUMENTS(( void ));
  277. /* uilkeytab.c */
  278. extern key_keytable_entry_type *key_find_keyword _ARGUMENTS(( unsigned int symbol_length , char *symbol_ptr ));
  279. extern void key_initialize _ARGUMENTS(( void ));
  280. /* uillexana.c */
  281. extern int yylex _ARGUMENTS(( void ));
  282. extern void lex_initialize_analyzer _ARGUMENTS(( void ));
  283. extern void Uil_lex_cleanup_analyzer _ARGUMENTS(( void ));
  284. extern void lex_issue_error _ARGUMENTS(( int restart_token ));
  285. extern void issue_control_char_diagnostic _ARGUMENTS(( unsigned char c_char ));
  286. extern void lex_filter_unprintable_chars _ARGUMENTS(( unsigned char *buffer , int length , unsigned long flags ));
  287. extern long cvt_ascii_to_long _ARGUMENTS(( unsigned char XmConst *c_text ));
  288. extern sym_value_entry_type *create_str_entry _ARGUMENTS(( int l_size , int l_charset , sym_value_entry_type *az_charset_entry ));
  289. /* uillstlst.c */
  290. extern void lst_open_listing _ARGUMENTS(( void ));
  291. extern void Uil_lst_cleanup_listing _ARGUMENTS(( void ));
  292. extern status create_listing_file _ARGUMENTS(( uil_fcb_type *az_fcb ));
  293. extern void lst_output_line _ARGUMENTS(( char *ac_line , boolean v_new_page ));
  294. extern char *current_time _ARGUMENTS(( _Xctimeparams *ctime_buf ));
  295. extern void lst_output_listing _ARGUMENTS(( void ));
  296. extern void lst_output_messages _ARGUMENTS(( src_message_item_type *az_message_item ));
  297. extern void lst_output_machine_code _ARGUMENTS(( src_source_record_type *az_src_rec ));
  298. extern void lst_output_message_ptr_line _ARGUMENTS(( src_source_record_type *az_src_rec , char *src_buffer ));
  299. /* uillstmac.c */
  300. extern void save_widget_machine_code _ARGUMENTS(( sym_widget_entry_type *widget_entry , URMResourceContext *az_context ));
  301. extern void unload_stack _ARGUMENTS(( char *rec , int rec_size , src_source_record_type *az_src_rec ));
  302. extern void save_value_machine_code _ARGUMENTS(( sym_value_entry_type *value_entry , URMResourceContext *az_context ));
  303. extern void save_module_machine_code _ARGUMENTS(( src_source_record_type *az_src_rec , URMResourceContext *az_context ));
  304. extern void off_put _ARGUMENTS(( unsigned short off_type , unsigned short off_offset ));
  305. extern void off_get _ARGUMENTS(( unsigned short *off_type , unsigned short *off_offset ));
  306. extern char *type_from_code _ARGUMENTS(( MrmType type_code ));
  307. extern char *access_from_code _ARGUMENTS(( MrmFlag access_code ));
  308. extern char *group_from_code _ARGUMENTS(( MrmGroup group_code ));
  309. extern void format_arg_value _ARGUMENTS(( RGMArgValuePtr argval_ptr , char *buffer ));
  310. extern char *class_name_from_code _ARGUMENTS(( MrmCode mrm_class ));
  311. extern char *resource_name_from_code _ARGUMENTS(( MrmCode resource ));
  312. /* uilmain.c */
  313. extern void uil_exit _ARGUMENTS(( int severity ));
  314. extern Uil_status_type Uil _ARGUMENTS((Uil_command_type
  315. *comand_desc,Uil_compile_desc_type *compile_desc,Uil_continue_type
  316. (*message_cb)(), char *message_data, Uil_continue_type (*status_cb)(),
  317. char *status_data));
  318. /* uilp2out.c */
  319. extern void sem_output_uid_file _ARGUMENTS(( void ));
  320. extern void push _ARGUMENTS(( sym_entry_type *sym_entry ));
  321. extern sym_entry_type *pop _ARGUMENTS(( void ));
  322. extern void out_emit_widget _ARGUMENTS(( sym_widget_entry_type *widget_entry ));
  323. extern void extract_subtree_control _ARGUMENTS(( sym_list_entry_type *list_entry , sym_control_entry_type **menu_entry , int *count ));
  324. extern void extract_create_callback _ARGUMENTS(( sym_list_entry_type *list_entry , sym_callback_entry_type **create_entry ));
  325. extern void process_all_callbacks _ARGUMENTS(( sym_list_entry_type *list_entry , int *arglist_index ));
  326. extern void process_all_arguments _ARGUMENTS(( sym_list_entry_type *list_entry , int *arglist_index , int *related_count ));
  327. extern void process_all_controls _ARGUMENTS(( sym_list_entry_type *list_entry , int *widget_index ));
  328. extern void out_emit_value _ARGUMENTS(( sym_value_entry_type *value_entry ));
  329. extern void emit_callback _ARGUMENTS(( sym_callback_entry_type *callback_entry , int *arglist_index , boolean emit_create ));
  330. extern void emit_callback_procedures _ARGUMENTS(( sym_proc_ref_entry_type *proc_ref_entry_next, int *proc_ref_index, MrmOffset callback_offset ));
  331. extern int count_proc _ARGUMENTS(( sym_list_entry_type *proc_list, int count));
  332. extern void emit_argument _ARGUMENTS(( sym_argument_entry_type *argument_entry , int arglist_index , int *related_arg_count ));
  333. extern void emit_control _ARGUMENTS(( sym_control_entry_type *control_entry , int control_offset ));
  334. extern MrmCode ref_value _ARGUMENTS(( sym_value_entry_type *value_entry , MrmCode *arg_type , long *arg_value , MrmCode *arg_access , char **arg_index , MrmResource_id *arg_id , MrmCode *arg_group ));
  335. extern MrmCode ref_control _ARGUMENTS(( sym_control_entry_type *control_entry , MrmCode *access , char **index , MrmResource_id *id ));
  336. extern void issue_urm_error _ARGUMENTS(( char *problem ));
  337. extern MrmCode Urm_code_from_uil_type _ARGUMENTS(( int uil_type ));
  338. extern int compute_color_table_size _ARGUMENTS(( sym_value_entry_type *table_entry ));
  339. extern void create_color_table _ARGUMENTS(( sym_value_entry_type *table_entry , char *buffer ));
  340. extern int compute_icon_size _ARGUMENTS(( sym_value_entry_type *icon_entry ));
  341. extern void create_icon _ARGUMENTS(( sym_value_entry_type *icon_entry , char *buffer ));
  342. extern int compute_list_size _ARGUMENTS(( sym_list_entry_type *list_entry , int type ));
  343. extern void create_int_compression_codes _ARGUMENTS(( void ));
  344. extern void create_ext_compression_codes _ARGUMENTS(( void ));
  345. /* uilp2reslv.c */
  346. extern void sem_resolve_forward_refs _ARGUMENTS(( void ));
  347. /* uilsarcomp.c */
  348. extern sym_value_entry_type *sem_create_cstr _ARGUMENTS(( void ));
  349. extern sym_value_entry_type *sem_create_wchar_str _ARGUMENTS(( void ));
  350. extern void sem_append_str_to_cstr _ARGUMENTS(( sym_value_entry_type *az_cstr_entry , sym_value_entry_type *az_str_entry , boolean op2_temporary ));
  351. extern void sem_append_cstr_to_cstr _ARGUMENTS(( sym_value_entry_type *az_cstr1_entry , sym_value_entry_type *az_cstr2_entry , boolean op2_temporary ));
  352. extern sym_value_entry_type *sem_cat_str_to_str _ARGUMENTS(( sym_value_entry_type *az_str1_entry , boolean op1_temporary , sym_value_entry_type *az_str2_entry , boolean op2_temporary ));
  353. extern int sem_map_subclass_to_charset _ARGUMENTS(( int charset_as_subclass ));
  354. extern void sar_charset_verify _ARGUMENTS(( yystype *charset_frame ));
  355. extern void sar_make_fallback_charset _ARGUMENTS((yystype *name_frame));
  356. extern void sar_chk_charset_attr _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *prior_value_frame ));
  357. extern void sar_make_charset _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *attr_frame , yystype *keyword_frame ));
  358. /* uilsarexp.c */
  359. extern void sar_binary_op _ARGUMENTS(( yystype *operator_frame , yystype *op1_frame , yystype *op2_frame ));
  360. extern void sar_unary_op _ARGUMENTS(( yystype *operator_frame , yystype *op1_frame ));
  361. /* uilsarinc.c */
  362. extern void sar_include_file _ARGUMENTS(( yystype *file_frame , yystype *include_frame , yystype *semi_frame ));
  363. /* uilsarmod.c */
  364. extern void sar_initialize _ARGUMENTS(( void ));
  365. extern void sar_create_root _ARGUMENTS(( yystype *root_frame ));
  366. extern void sar_create_module _ARGUMENTS(( yystype *target_frame , yystype *id_frame , yystype *module_frame ));
  367. extern void sar_process_module_version _ARGUMENTS(( yystype *value_frame , yystype *start_frame ));
  368. extern void sar_process_module_sensitivity _ARGUMENTS(( yystype *token_frame , yystype *start_frame ));
  369. extern void sar_process_module_charset _ARGUMENTS(( yystype *token_frame , yystype *start_frame ));
  370. extern void sar_save_module_source _ARGUMENTS(( void ));
  371. extern void sar_make_def_obj _ARGUMENTS(( yystype *object_frame ));
  372. extern void sar_process_module_variant _ARGUMENTS(( yystype *obj_type_frame , yystype *variant_frame ));
  373. extern void sar_save_section_source _ARGUMENTS(( yystype *header_frame , int section_type ));
  374. /* uilsarobj.c */
  375. extern void sar_assoc_comment _ARGUMENTS(( sym_obj_entry_type *object ));
  376. extern void sar_create_object _ARGUMENTS(( yystype *object_frame , unsigned char object_type ));
  377. extern void sar_create_child _ARGUMENTS(( yystype *object_frame ));
  378. extern void sar_link_section _ARGUMENTS(( yystype *id_frame ));
  379. extern void sar_save_src_semicolon_pos _ARGUMENTS(( yystype *semi_frame ));
  380. extern void sar_save_list_end _ARGUMENTS(( yystype *close_frame ));
  381. extern void sar_save_src_entry_end _ARGUMENTS(( yystype *close_frame , yystype *entry_frame ));
  382. extern void sar_set_object_flags _ARGUMENTS(( yystype *current_frame , unsigned char mask ));
  383. extern void sar_unset_object_flags _ARGUMENTS(( yystype *current_frame , unsigned char mask ));
  384. extern void sar_set_list_type _ARGUMENTS(( yystype *current_frame ));
  385. extern void sar_set_object_class _ARGUMENTS(( yystype *current_frame ));
  386. extern void sar_set_object_variant _ARGUMENTS(( yystype *current_frame ));
  387. extern yystype *sem_find_object _ARGUMENTS(( yystype *current_frame ));
  388. extern void sar_object_reference _ARGUMENTS(( yystype *ref_frame ));
  389. extern void sar_update_parent_list _ARGUMENTS(( yystype *control_list_frame ));
  390. extern void parent_list_traverse _ARGUMENTS(( sym_widget_entry_type *widget_entry , sym_list_entry_type *control_list_entry ));
  391. extern void sar_save_feature _ARGUMENTS(( yystype *feature_frame ));
  392. extern void sar_save_argument_pair _ARGUMENTS(( yystype *argument_frame , yystype *value_frame , yystype *equals_frame ));
  393. extern void sar_save_reason_binding _ARGUMENTS(( yystype *reason_frame , yystype *proc_ref_frame , yystype *equals_frame ));
  394. extern void sar_save_control_item _ARGUMENTS(( yystype *managed_frame , yystype *item_frame ));
  395. extern void sar_save_control_widget _ARGUMENTS(( yystype *control_frame , yystype *item_frame ));
  396. extern void sar_save_user_proc_ref_src _ARGUMENTS(( yystype *procedure_frame , yystype *proc_id_frame , yystype *proc_arg_frame ));
  397. extern void sar_process_proc_ref _ARGUMENTS(( yystype *proc_id_frame , yystype *proc_arg_frame , int context ));
  398. extern void sar_add_list_entry _ARGUMENTS(( yystype *entry_frame ));
  399. extern void sar_add_forward_list_entry _ARGUMENTS(( yystype *entry_frame ));
  400. extern void sar_verify_object _ARGUMENTS(( yystype *current_frame ));
  401. extern sym_entry_type *sem_allocate_node _ARGUMENTS(( unsigned char node_tag , unsigned short node_size ));
  402. extern void sem_free_node _ARGUMENTS(( sym_entry_type *node_ptr ));
  403. /* uilsarproc.c */
  404. extern void sar_create_procedure _ARGUMENTS(( XmConst yystype *id_frame , XmConst yystype *param_frame , XmConst yystype *class_frame , XmConst yystype *semi_frame ));
  405. extern sym_proc_ref_entry_type *sem_reference_procedure _ARGUMENTS(( yystype *id_frame , XmConst yystype *value_frame , XmConst int context ));
  406. extern sym_entry_type *sem_ref_name _ARGUMENTS(( yystype *id_frame , XmConst int tag ));
  407. /* uilsarval.c */
  408. extern void sar_map_keyword_to_name _ARGUMENTS(( yystype *target_frame , yystype *keyword_frame ));
  409. extern void sar_process_id _ARGUMENTS(( yystype *target_frame , yystype *id_frame ));
  410. extern void sar_process_id_ref _ARGUMENTS(( yystype *id_frame ));
  411. extern void sar_make_private_value _ARGUMENTS(( yystype *value_frame , yystype *token_frame , int value_type , yystype *keyword_frame , int arg_type ));
  412. extern void sar_make_rgb_private_value _ARGUMENTS(( yystype *value_frame , yystype *token_frame , int value_type , yystype *keyword_frame , int arg_type ));
  413. extern void sar_append_table_value _ARGUMENTS(( yystype *value_frame , yystype *table_frame , int table_type , yystype *comma_frame ));
  414. extern void sar_value_not_implemented _ARGUMENTS(( yystype *value_frame , yystype *token_frame , char *error_text ));
  415. extern void sar_cat_value _ARGUMENTS(( yystype *operator_frame , yystype *op1_frame , yystype *op2_frame ));
  416. extern void sar_chk_comp_str_attr _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *prior_value_frame ));
  417. extern void sar_make_comp_str _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *attr_frame , yystype *keyword_frame ));
  418. extern void sar_make_comp_str_comp _ARGUMENTS((yystype *target_frame, yystype *type_frame, yystype *value_frame, yystype *keyword_frame));
  419. extern void sar_make_wchar_str _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *attr_frame , yystype *keyword_frame ));
  420. extern void sar_value_type_error _ARGUMENTS(( yystype *value_frame , int expected_type ));
  421. extern void sar_private_error _ARGUMENTS(( yystype *value_frame ));
  422. extern void sar_import_value_entry _ARGUMENTS(( yystype *target_frame , yystype *token_frame ));
  423. extern void sar_bind_value_name _ARGUMENTS(( yystype *id_frame , yystype *value_frame , yystype *semi_frame ));
  424. extern sym_name_entry_type *sem_dcl_name _ARGUMENTS(( XmConst yystype *id_frame ));
  425. extern sym_value_entry_type *sem_create_value_entry _ARGUMENTS(( char *value , int length , int value_type ));
  426. extern void sar_create_identifier _ARGUMENTS(( XmConst yystype *id_frame , XmConst yystype *semi_frame ));
  427. extern void sar_make_font_table _ARGUMENTS(( yystype *target_frame , yystype *font_frame , yystype *prior_target_frame , yystype *keyword_frame ));
  428. extern void sar_make_font_item _ARGUMENTS(( yystype *target_frame , yystype *charset_frame , yystype *font_frame ));
  429. extern void sar_make_font _ARGUMENTS(( yystype *target_frame , yystype *charset_frame , yystype *value_frame , yystype *keyword_frame ));
  430. extern void sar_make_fontset _ARGUMENTS(( yystype *target_frame , yystype *charset_frame , yystype *value_frame , yystype *keyword_frame ));
  431. extern void sar_make_color_item _ARGUMENTS(( yystype *target_frame , yystype *color_frame , yystype *letter_frame ));
  432. extern void sar_append_color_item _ARGUMENTS(( yystype *target_frame , yystype *item_frame , yystype *prior_target_frame ));
  433. extern void sar_make_color_table _ARGUMENTS(( yystype *target_frame , yystype *list_frame , yystype *keyword_frame ));
  434. extern void sar_make_color _ARGUMENTS(( yystype *target_frame , yystype *color_frame , yystype *mono_frame , yystype *keyword_frame ));
  435. extern void sar_make_icon _ARGUMENTS(( yystype *target_frame , yystype *list_frame , yystype *table_frame , yystype *keyword_frame ));
  436. /* uilsemcset.c */
  437. extern char *sem_charset_name _ARGUMENTS(( int l_charset , sym_value_entry_type *az_charset_entry ));
  438. extern void sem_charset_info _ARGUMENTS(( int l_charset , sym_value_entry_type *az_charset_entry , int *write_direction , int *parse_direction , int *sixteen_bit ));
  439. extern int sem_charset_lang_name _ARGUMENTS(( char *lang_charset ));
  440. /* uilsemval.c */
  441. typedef union {
  442. boolean boolean_value;
  443. int integer_value;
  444. double real_value;
  445. char character_value; /* character data type RAP */
  446. float single_float_value; /* single float data type RAP */
  447. } data_value_type;
  448. extern void sem_validation _ARGUMENTS(( void ));
  449. extern void sem_validate_node _ARGUMENTS(( sym_entry_type *node ));
  450. extern sym_value_entry_type *sem_validate_value_node _ARGUMENTS(( sym_value_entry_type *value_node ));
  451. extern void sem_validate_widget_node _ARGUMENTS(( sym_widget_entry_type *widget_node ));
  452. extern void sem_validate_argument_list _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_argument_entry_type **seen ));
  453. extern void sem_validate_argument_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_argument_entry_type *argument_entry , sym_argument_entry_type **seen ));
  454. extern void sem_validate_argument_enumset _ARGUMENTS(( sym_argument_entry_type *argument_entry , int arg_code , sym_value_entry_type *arg_value_entry ));
  455. extern void sem_validate_constraint_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , sym_argument_entry_type *argument_entry, unsigned int widget_type ));
  456. extern void sem_validate_callback_list _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_callback_entry_type **seen ));
  457. extern void sem_validate_callback_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_callback_entry_type *callback_entry , sym_callback_entry_type **seen ));
  458. extern void sem_validate_control_list _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , int *count ));
  459. extern void sem_validate_control_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_control_entry_type *control_entry , int *gadget_count ));
  460. extern void sem_validate_widget_cycle _ARGUMENTS(( sym_list_entry_type *list_entry , sym_name_entry_type *cycle_name ));
  461. extern boolean sem_validate_widget_cycle_aux _ARGUMENTS(( sym_list_entry_type *list_entry , sym_name_entry_type *cycle_name ));
  462. extern boolean sem_validate_verify_cycle _ARGUMENTS(( sym_widget_entry_type *cycle_obj , sym_list_entry_type *list_entry ));
  463. extern void sem_validate_procref_list _ARGUMENTS(( sym_list_entry_type *list_entry ));
  464. extern void sem_validate_procref_entry _ARGUMENTS(( sym_proc_ref_entry_type *procref_entry ));
  465. extern boolean sem_argument_allowed _ARGUMENTS(( unsigned int arg_code , unsigned int class_code ));
  466. extern boolean sem_reason_allowed _ARGUMENTS(( unsigned int rsn_code , unsigned int class_code ));
  467. extern boolean sem_control_allowed _ARGUMENTS(( unsigned int ctl_code , unsigned int class_code ));
  468. extern boolean sem_child_allowed _ARGUMENTS(( unsigned int ctl_code , unsigned int class_code ));
  469. extern sym_value_entry_type *sem_evaluate_value _ARGUMENTS(( sym_value_entry_type *val_entry ));
  470. extern sym_value_entry_type *sem_evaluate_value_cs _ARGUMENTS(( sym_value_entry_type *csval_entry ));
  471. /* BEGIN OSF Fix CR 4859 */
  472. /* END OSF Fix CR 4859 */
  473. extern sym_value_entry_type *sem_evaluate_value_expr _ARGUMENTS(( sym_value_entry_type *value_entry ));
  474. extern int validate_arg _ARGUMENTS(( sym_value_entry_type *operand_entry , int v_operator ));
  475. extern int sem_convert_to_float _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
  476. extern int sem_convert_to_integer _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
  477. extern int sem_convert_to_single_float _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
  478. extern int sem_convert_to_error _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
  479. extern void sar_cat_value_entry _ARGUMENTS(( sym_value_entry_type **target_entry , sym_value_entry_type *op1_entry , sym_value_entry_type *op2_entry ));
  480. /* uilsrcsrc.c */
  481. extern void src_initialize_source _ARGUMENTS(( void ));
  482. extern void Uil_src_cleanup_source _ARGUMENTS(( void ));
  483. extern void src_open_file _ARGUMENTS(( XmConst char *c_file_name , char *full_file_name ));
  484. extern status src_get_source_line _ARGUMENTS(( void ));
  485. extern status open_source_file _ARGUMENTS(( XmConst char *c_file_name , uil_fcb_type *az_fcb , src_source_buffer_type *az_source_buffer ));
  486. extern status close_source_file _ARGUMENTS(( uil_fcb_type *az_fcb ));
  487. extern status get_line _ARGUMENTS(( uil_fcb_type *az_fcb ));
  488. extern boolean reget_line _ARGUMENTS(( uil_fcb_type *az_fcb , char *c_buffer , XmConst z_key *z_access_key ));
  489. extern char *src_get_file_name _ARGUMENTS(( XmConst src_source_record_type *az_src_rec ));
  490. extern boolean src_retrieve_source _ARGUMENTS(( XmConst src_source_record_type *az_src_rec , char *c_buffer ));
  491. extern void src_append_diag_info _ARGUMENTS(( XmConst src_source_record_type *az_src_rec , XmConst int l_src_pos , XmConst char *c_msg_text , XmConst int l_msg_number ));
  492. extern void src_append_machine_code _ARGUMENTS(( src_source_record_type *az_src_rec , XmConst int l_offset , XmConst int l_code_len , XmConst char *c_code , XmConst char *c_text_arg ));
  493. /* uilsymnam.c */
  494. extern sym_name_entry_type *sym_find_name _ARGUMENTS(( int l_length , char *c_text ));
  495. extern sym_name_entry_type *sym_insert_name _ARGUMENTS(( int l_length , char *c_text ));
  496. extern int hash_function _ARGUMENTS(( int l_length , char *c_value ));
  497. #if debug_version
  498. extern void sym_dump_hash_table _ARGUMENTS(( void ));
  499. #endif
  500. /* uilsymstor.c */
  501. extern void sym_initialize_storage _ARGUMENTS(( void ));
  502. extern void Uil_sym_cleanup_storage _ARGUMENTS(( boolean freealloc ));
  503. extern void sym_make_external_def _ARGUMENTS(( XmConst sym_name_entry_type *az_name ));
  504. extern void sym_make_forward_ref _ARGUMENTS(( XmConst yystype *az_id_frame , XmConst int l_widget_type , XmConst char *a_location ));
  505. extern void sym_make_value_forward_ref _ARGUMENTS(( XmConst yystype *az_value_frame , XmConst char *a_location , XmConst unsigned char fwd_ref_flags ));
  506. extern void UilDumpSymbolTable _ARGUMENTS(( sym_entry_type *node_entry ));
  507. extern void sym_dump_symbols _ARGUMENTS(( void ));
  508. extern void sym_dump_symbol _ARGUMENTS(( sym_entry_type *az_symbol_entry ));
  509. extern void sym_dump_widget _ARGUMENTS(( XmConst sym_widget_entry_type *az_widget_entry ));
  510. extern void sym_dump_argument _ARGUMENTS(( XmConst sym_argument_entry_type *az_argument_entry ));
  511. extern void sym_dump_control _ARGUMENTS(( XmConst sym_control_entry_type *az_control_entry ));
  512. extern void sym_dump_callback _ARGUMENTS(( XmConst sym_callback_entry_type *az_callback_entry ));
  513. extern void sym_dump_list _ARGUMENTS(( XmConst sym_list_entry_type *az_list_entry ));
  514. extern void sym_dump_name _ARGUMENTS(( XmConst sym_name_entry_type *az_name_entry ));
  515. extern void sym_dump_module _ARGUMENTS(( XmConst sym_module_entry_type *az_module_entry ));
  516. extern void sym_dump_color_item _ARGUMENTS(( XmConst sym_color_item_entry_type *az_color_item_entry ));
  517. extern void sym_dump_parent_list_item _ARGUMENTS(( XmConst sym_parent_list_type *az_parent_list_item ));
  518. extern void sym_dump_external_def _ARGUMENTS(( XmConst sym_external_def_entry_type *az_external_def_entry ));
  519. extern void sym_dump_proc_def _ARGUMENTS(( XmConst sym_proc_def_entry_type *az_proc_def_entry ));
  520. extern void sym_dump_proc_ref _ARGUMENTS(( XmConst sym_proc_ref_entry_type *az_proc_ref_entry ));
  521. extern void sym_dump_forward_ref _ARGUMENTS(( XmConst sym_forward_ref_entry_type *az_forward_ref_entry ));
  522. extern void sym_dump_value _ARGUMENTS(( XmConst sym_value_entry_type *az_value_entry ));
  523. extern void output_text _ARGUMENTS(( XmConst int length , XmConst char *text ));
  524. extern void sym_dump_source_info _ARGUMENTS(( sym_entry_header_type *hdr ));
  525. extern void sym_dump_obj_header _ARGUMENTS(( XmConst sym_obj_entry_type *az_obj_entry ));
  526. extern void sym_dump_include_file _ARGUMENTS(( sym_include_file_entry_type *az_symbol_entry ));
  527. extern void sym_dump_section _ARGUMENTS(( sym_section_entry_type *az_symbol_entry ));
  528. extern void sym_dump_object_variant _ARGUMENTS(( sym_def_obj_entry_type *az_symbol_entry ));
  529. extern void sym_dump_root_entry _ARGUMENTS(( sym_root_entry_type *az_symbol_entry ));
  530. extern char *sym_section_text _ARGUMENTS(( int b_type ));
  531. extern void dump_free_list _ARGUMENTS(( void ));
  532. #if defined(__cplusplus) || defined(c_plusplus)
  533. }
  534. #endif
  535. #endif /* UilDefI_h */
  536. /* DON'T ADD STUFF AFTER THIS #endif */