Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / osf / uil / Uil.h
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 /*
36 *  (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
37
38 /*
39 **++
40 **  FACILITY:
41 **
42 **      User Interface Language Compiler (UIL)
43 **
44 **  ABSTRACT:
45 **
46 **      This include file defines the set of definitions for use with
47 **      UIL compiler callable interface.
48 **
49 **--
50 **/
51
52 #ifndef Uil_h
53 #define Uil_h
54
55 /*
56 **
57 **  INCLUDE FILES
58 **
59 **/
60
61
62
63 /*
64 **
65 **  Definition of Compiler Severity Statuses
66 **
67 */
68
69 typedef unsigned int    Uil_status_type;
70 #define Uil_k_min_status        0
71 #define Uil_k_success_status    0
72 #define Uil_k_info_status       1
73 #define Uil_k_warning_status    2
74 #define Uil_k_error_status      3
75 #define Uil_k_severe_status     4
76 #define Uil_k_max_status        4
77
78 /*
79 **
80 */
81
82 typedef char (*string_array)[];
83 #define CEIL(a,b) ((a) < (b) ? (a) : (b))
84
85
86 /*
87 **  Uil_command_type -- Input which describes how/what to compile.
88 */
89
90 typedef struct  _Uil_command_type
91 {
92     char            *source_file;           /* single source to compile     */
93     char            *resource_file;         /* name of output file          */
94     char            *listing_file;          /* name of listing file         */
95     unsigned int    include_dir_count;      /* number of directories in     */
96                                             /* include_dir array            */
97     char            **include_dir;         /* directory to search for       */
98                                             /* includes files               */
99     unsigned        listing_file_flag: 1;   /* produce a listing            */
100     unsigned        resource_file_flag: 1;  /* generate UID output          */
101     unsigned        machine_code_flag : 1;  /* generate machine code        */
102     unsigned        report_info_msg_flag: 1;/* report info messages         */
103     unsigned        report_warn_msg_flag: 1;/* report warnings              */
104     unsigned        parse_tree_flag: 1;     /* generate parse tree          */
105     unsigned        issue_summary: 1;       /* issue diagnostics summary    */
106     
107     unsigned int    status_update_delay;    /* Number of times a status     */
108                                             /* point is passed before       */
109                                             /* calling statusCB routine     */
110                                             /* 0 means called every time    */
111     char            *database;              /* name of database file        */
112     unsigned        database_flag: 1;       /* read a new database file     */
113     unsigned        use_setlocale_flag: 1;  /* Enable calls to setlocale    */
114 } Uil_command_type;
115
116
117
118 /*
119 ** Uil_compile_desc_type -- Output information about the compilation including
120 ** the compiler_version, data_structure_version, parse tree, and error counts.
121 */
122
123 typedef struct _Uil_comp_desc
124 {
125     unsigned int        compiler_version;   /* version number of Compiler */
126     unsigned int        data_version;       /* version number of structures */
127     char                *parse_tree_root;   /* parse tree output */
128     unsigned int        message_count[Uil_k_max_status+1];    
129                                             /* array of severity counts */
130 } Uil_compile_desc_type;    
131
132
133
134
135 /*
136 **  Uil_continue_type -- A value returned from a Uil callback routine which
137 **  allows the application to specify whether to terminate or continue the
138 **  compilation.
139 */
140
141 typedef unsigned int    Uil_continue_type;
142 #define Uil_k_terminate         0
143 #define Uil_k_continue          1
144
145
146
147 /*
148 **
149 **  Entry Points
150 **
151 */
152
153 #ifndef _ARGUMENTS
154 #define _ARGUMENTS(arglist) arglist
155 #endif
156
157 #if defined(__cplusplus) || defined(c_plusplus)
158 extern "C" {
159 #endif
160
161 extern Uil_status_type Uil
162                     _ARGUMENTS((
163                         Uil_command_type *command_desc ,
164                         Uil_compile_desc_type *compile_desc ,
165                         Uil_continue_type (*message_cb )(),
166                         char *message_data ,
167                         Uil_continue_type (*status_cb )(),
168                         char *status_data ));
169
170
171 #if defined(__cplusplus) || defined(c_plusplus)
172 }
173 #endif
174
175 #undef _ARGUMENTS
176
177
178 #endif /* Uil_h */
179 /* DON'T ADD STUFF AFTER THIS #endif */