Uil.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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: Uil.h /main/11 1995/07/14 09:32:19 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 set of definitions for use with
  45. ** UIL compiler callable interface.
  46. **
  47. **--
  48. **/
  49. #ifndef Uil_h
  50. #define Uil_h
  51. /*
  52. **
  53. ** INCLUDE FILES
  54. **
  55. **/
  56. /*
  57. **
  58. ** Definition of Compiler Severity Statuses
  59. **
  60. */
  61. typedef unsigned int Uil_status_type;
  62. #define Uil_k_min_status 0
  63. #define Uil_k_success_status 0
  64. #define Uil_k_info_status 1
  65. #define Uil_k_warning_status 2
  66. #define Uil_k_error_status 3
  67. #define Uil_k_severe_status 4
  68. #define Uil_k_max_status 4
  69. /*
  70. **
  71. */
  72. typedef char (*string_array)[];
  73. #define CEIL(a,b) ((a) < (b) ? (a) : (b))
  74. /*
  75. ** Uil_command_type -- Input which describes how/what to compile.
  76. */
  77. typedef struct _Uil_command_type
  78. {
  79. char *source_file; /* single source to compile */
  80. char *resource_file; /* name of output file */
  81. char *listing_file; /* name of listing file */
  82. unsigned int include_dir_count; /* number of directories in */
  83. /* include_dir array */
  84. char **include_dir; /* directory to search for */
  85. /* includes files */
  86. unsigned listing_file_flag: 1; /* produce a listing */
  87. unsigned resource_file_flag: 1; /* generate UID output */
  88. unsigned machine_code_flag : 1; /* generate machine code */
  89. unsigned report_info_msg_flag: 1;/* report info messages */
  90. unsigned report_warn_msg_flag: 1;/* report warnings */
  91. unsigned parse_tree_flag: 1; /* generate parse tree */
  92. unsigned issue_summary: 1; /* issue diagnostics summary */
  93. unsigned int status_update_delay; /* Number of times a status */
  94. /* point is passed before */
  95. /* calling statusCB routine */
  96. /* 0 means called every time */
  97. char *database; /* name of database file */
  98. unsigned database_flag: 1; /* read a new database file */
  99. unsigned use_setlocale_flag: 1; /* Enable calls to setlocale */
  100. } Uil_command_type;
  101. /*
  102. ** Uil_compile_desc_type -- Output information about the compilation including
  103. ** the compiler_version, data_structure_version, parse tree, and error counts.
  104. */
  105. typedef struct _Uil_comp_desc
  106. {
  107. unsigned int compiler_version; /* version number of Compiler */
  108. unsigned int data_version; /* version number of structures */
  109. char *parse_tree_root; /* parse tree output */
  110. unsigned int message_count[Uil_k_max_status+1];
  111. /* array of severity counts */
  112. } Uil_compile_desc_type;
  113. /*
  114. ** Uil_continue_type -- A value returned from a Uil callback routine which
  115. ** allows the application to specify whether to terminate or continue the
  116. ** compilation.
  117. */
  118. typedef unsigned int Uil_continue_type;
  119. #define Uil_k_terminate 0
  120. #define Uil_k_continue 1
  121. /*
  122. **
  123. ** Entry Points
  124. **
  125. */
  126. #ifndef _ARGUMENTS
  127. #define _ARGUMENTS(arglist) arglist
  128. #endif
  129. #if defined(__cplusplus) || defined(c_plusplus)
  130. extern "C" {
  131. #endif
  132. extern Uil_status_type Uil
  133. _ARGUMENTS((
  134. Uil_command_type *command_desc ,
  135. Uil_compile_desc_type *compile_desc ,
  136. Uil_continue_type (*message_cb )(),
  137. char *message_data ,
  138. Uil_continue_type (*status_cb )(),
  139. char *status_data ));
  140. #if defined(__cplusplus) || defined(c_plusplus)
  141. }
  142. #endif
  143. #undef _ARGUMENTS
  144. #endif /* Uil_h */
  145. /* DON'T ADD STUFF AFTER THIS #endif */