UilData.c 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. #ifdef REV_INFO
  34. #ifndef lint
  35. static char rcsid[] = "$TOG: UilData.c /main/14 1999/04/16 10:41:44 mgreess $"
  36. #endif
  37. #endif
  38. /*
  39. * (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  40. /*
  41. **++
  42. ** FACILITY:
  43. **
  44. ** User Interface Language Compiler (UIL)
  45. **
  46. ** ABSTRACT:
  47. **
  48. ** Global data definitions
  49. **
  50. **--
  51. **/
  52. /*
  53. **
  54. ** INCLUDE FILES
  55. **
  56. **/
  57. #include <setjmp.h>
  58. #include <Dt/Editor.h>
  59. #include <Dt/Help.h>
  60. #include <Dt/HelpDialog.h>
  61. #include <Dt/HelpQuickD.h>
  62. #include <Dt/MenuButton.h>
  63. #include <Dt/Print.h>
  64. #include <Dt/TermPrim.h>
  65. #include <Dt/Term.h>
  66. #include <Mrm/MrmAppl.h>
  67. #include <Mrm/Mrm.h>
  68. #include <Xm/MwmUtil.h> /* For MWM_*_* defines. */
  69. #include "UilDefI.h"
  70. #include "UilSymGen.h"
  71. /*
  72. **
  73. ** DEFINE and MACRO DEFINITIONS
  74. **
  75. **/
  76. /*
  77. **
  78. ** EXTERNAL VARIABLE DECLARATIONS
  79. **
  80. **/
  81. /*
  82. **
  83. ** GLOBAL VARIABLE DECLARATIONS
  84. **
  85. **/
  86. /* Case sensitivity switch; TRUE if case sensitive. */
  87. externaldef(uil_comp_glbl) boolean uil_v_case_sensitive = TRUE;
  88. /* Location to store error type. */
  89. externaldef(uil_comp_glbl) jmp_buf uil_az_error_env_block;
  90. externaldef(uil_comp_glbl) boolean uil_az_error_env_valid = FALSE;
  91. /* Debugging switches. */
  92. #if debug_version
  93. externaldef(uil_comp_glbl) boolean uil_v_dump_tokens = FALSE;
  94. externaldef(uil_comp_glbl) boolean uil_v_dump_symbols = FALSE;
  95. #endif
  96. externaldef(uil_comp_glbl) status uil_l_compile_status = uil_k_success_status;
  97. externaldef(uil_comp_glbl) Uil_compile_desc_type *Uil_compile_desc_ptr = NULL;
  98. externaldef(uil_comp_glbl) int Uil_percent_complete = 0;
  99. externaldef(uil_comp_glbl) int Uil_lines_processed = 0;
  100. externaldef(uil_comp_glbl) char *Uil_current_file = "";
  101. /* Define the user-defined object and default character set */
  102. externaldef(uil_sym_glbl) unsigned short int uil_sym_user_defined_object =
  103. sym_k_user_defined_object;
  104. externaldef(uil_sym_glbl) unsigned short int uil_sym_default_charset =
  105. sym_k_iso_latin1_charset;
  106. externaldef(uil_sym_glbl) unsigned short int uil_sym_isolatin1_charset =
  107. sym_k_iso_latin1_charset;
  108. /* argument types, allowed tables, constraints, related arguments */
  109. #include "UilSymArTy.h"
  110. #include "UilSymRArg.h"
  111. #include "UilSymArTa.h"
  112. #include "UilSymReas.h"
  113. #include "UilSymCtl.h"
  114. #include "UilConst.h"
  115. /* Allowed children and child classes */
  116. #include "UilSymChCl.h"
  117. #include "UilSymChTa.h"
  118. /* sym_k... to name vectors. */
  119. #include "UilSymNam.h"
  120. /* Define mapping of sym_k_..._value to data type names. */
  121. externaldef(uil_comp_glbl) int uil_max_value = sym_k_max_value;
  122. externaldef(uil_comp_glbl) char *uil_datatype_names [] = {
  123. "", /* NOT USED */
  124. "any",
  125. "boolean",
  126. "string", /* char 8 */
  127. "compound_string",
  128. "float",
  129. "integer",
  130. "single_float",
  131. "localized_string",
  132. "wchar_string",
  133. "horizontal_dimension_integer",
  134. "vertical_dimension_integer",
  135. "horizontal_dimension_float",
  136. "vertical_dimension_float",
  137. "argument",
  138. "asciz_table",
  139. "class_rec_name",
  140. "color",
  141. "color_table",
  142. "font",
  143. "font_table",
  144. "icon",
  145. "identifier",
  146. "integer_table",
  147. "keysym",
  148. "pixmap",
  149. "reason",
  150. "rgb",
  151. "string_table",
  152. "translation_table",
  153. "widget_ref",
  154. "xbitmapfile",
  155. "fontset",
  156. "child",
  157. };
  158. /* Enumeration Set/Value tables */
  159. #include "UilSymEnum.h"
  160. /* Character set attribute tables */
  161. #include "UilSymCSet.h"
  162. /* Mrm encoding information */
  163. #include "UilUrmClas.h"
  164. /* Names of tokens in grammar */
  165. #include "UilTokName.h"
  166. /* The keyword tables */
  167. #include "UilKeyTab.h"
  168. /*
  169. **
  170. ** OWN VARIABLE DECLARATIONS
  171. **
  172. **/