1 | /************************************************************************** |
---|
2 | |
---|
3 | util.h |
---|
4 | |
---|
5 | Copyright (C) 1998, 1999 Andrew T. Veliath |
---|
6 | |
---|
7 | This library is free software; you can redistribute it and/or |
---|
8 | modify it under the terms of the GNU Library General Public |
---|
9 | License as published by the Free Software Foundation; either |
---|
10 | version 2 of the License, or (at your option) any later version. |
---|
11 | |
---|
12 | This library is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | Library General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU Library General Public |
---|
18 | License along with this library; if not, write to the Free |
---|
19 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
20 | |
---|
21 | $Id: util.h,v 1.1.1.1 2002-12-26 17:11:04 ghudson Exp $ |
---|
22 | |
---|
23 | ***************************************************************************/ |
---|
24 | #ifndef __UTIL_H |
---|
25 | #define __UTIL_H |
---|
26 | |
---|
27 | #if defined(HAVE_STDDEF_H) |
---|
28 | # include <stddef.h> |
---|
29 | #endif |
---|
30 | #if defined(HAVE_WCHAR_H) |
---|
31 | # include <wchar.h> |
---|
32 | #elif defined(HAVE_WCSTR_H) |
---|
33 | # include <wcstr.h> |
---|
34 | #endif |
---|
35 | #include <glib.h> |
---|
36 | #include "IDL.h" |
---|
37 | |
---|
38 | #ifdef _WIN32 |
---|
39 | # define alloca |
---|
40 | # define NO_ACCESS |
---|
41 | #endif |
---|
42 | |
---|
43 | #ifdef XP_MAC |
---|
44 | # include <alloca.h> |
---|
45 | # define alloca |
---|
46 | # define NO_ACCESS |
---|
47 | # define NO_SYMLINK |
---|
48 | # define NO_POPEN |
---|
49 | #endif |
---|
50 | |
---|
51 | /* Internal parse flags */ |
---|
52 | #define IDLFP_PROPERTIES (1UL << 0) |
---|
53 | #define IDLFP_NATIVE (1UL << 1) |
---|
54 | #define IDLFP_IN_INCLUDES (1UL << 2) |
---|
55 | |
---|
56 | typedef struct { |
---|
57 | unsigned long flags; |
---|
58 | char* name; |
---|
59 | int seenCnt; |
---|
60 | } IDL_fileinfo; |
---|
61 | |
---|
62 | extern void yyerror (const char *s); |
---|
63 | extern void yyerrorl (const char *s, int ofs); |
---|
64 | extern void yywarning (int level, const char *s); |
---|
65 | extern void yywarningl (int level, const char *s, int ofs); |
---|
66 | extern void yyerrorv (const char *fmt, ...) |
---|
67 | G_GNUC_PRINTF (1, 2); |
---|
68 | extern void yyerrorlv (const char *fmt, int ofs, ...) |
---|
69 | G_GNUC_PRINTF (1, 3); |
---|
70 | extern void yywarningv (int level, const char *fmt, ...) |
---|
71 | G_GNUC_PRINTF (2, 3); |
---|
72 | extern void yywarninglv (int level, const char *fmt, int ofs, ...) |
---|
73 | G_GNUC_PRINTF (2, 4); |
---|
74 | extern void yyerrornv (IDL_tree p, const char *fmt, ...) |
---|
75 | G_GNUC_PRINTF (2, 3); |
---|
76 | extern void yywarningnv (IDL_tree p, int level, const char *fmt, ...) |
---|
77 | G_GNUC_PRINTF (3, 4); |
---|
78 | |
---|
79 | extern guint IDL_strcase_hash (gconstpointer v); |
---|
80 | extern gint IDL_strcase_equal (gconstpointer a, gconstpointer b); |
---|
81 | extern gint IDL_strcase_cmp (gconstpointer a, gconstpointer b); |
---|
82 | extern guint IDL_ident_hash (gconstpointer v); |
---|
83 | extern gint IDL_ident_equal (gconstpointer a, gconstpointer b); |
---|
84 | extern gint IDL_ident_cmp (gconstpointer a, gconstpointer b); |
---|
85 | extern int IDL_ns_check_for_ambiguous_inheritance |
---|
86 | (IDL_tree interface_ident, |
---|
87 | IDL_tree p); |
---|
88 | extern void IDL_tree_process_forward_dcls (IDL_tree *p, IDL_ns ns); |
---|
89 | extern void IDL_tree_remove_empty_modules (IDL_tree *p, IDL_ns ns); |
---|
90 | |
---|
91 | extern void __IDL_free_properties (GHashTable *table); |
---|
92 | extern void __IDL_assign_up_node (IDL_tree up, IDL_tree node); |
---|
93 | extern void __IDL_assign_location (IDL_tree node, IDL_tree from_node); |
---|
94 | extern void __IDL_assign_this_location (IDL_tree node, char *filename, int line); |
---|
95 | extern void __IDL_parser_reset (void); |
---|
96 | extern void __IDL_do_pragma (const char *s); |
---|
97 | |
---|
98 | extern void __IDL_lex_init (void); |
---|
99 | extern void __IDL_lex_cleanup (void); |
---|
100 | |
---|
101 | |
---|
102 | #ifndef HAVE_CPP_PIPE_STDIN |
---|
103 | extern char * __IDL_tmp_filename; |
---|
104 | #endif |
---|
105 | extern const char * __IDL_real_filename; |
---|
106 | extern char * __IDL_cur_filename; |
---|
107 | extern int __IDL_cur_line; |
---|
108 | extern GHashTable * __IDL_filename_hash; |
---|
109 | extern IDL_fileinfo * __IDL_cur_fileinfo; |
---|
110 | extern int __IDL_prev_token_line; |
---|
111 | extern int __IDL_cur_token_line; |
---|
112 | extern GHashTable * __IDL_structunion_ht; |
---|
113 | extern int __IDL_inhibits; |
---|
114 | extern int __IDL_typecodes_as_tok; |
---|
115 | extern int __IDL_pidl; |
---|
116 | extern IDL_tree __IDL_root; |
---|
117 | extern IDL_ns __IDL_root_ns; |
---|
118 | extern int __IDL_is_okay; |
---|
119 | extern int __IDL_is_parsing; |
---|
120 | extern unsigned long __IDL_flags; |
---|
121 | extern unsigned long __IDL_flagsi; |
---|
122 | extern gpointer __IDL_inputcb_user_data; |
---|
123 | extern IDL_input_callback __IDL_inputcb; |
---|
124 | extern GSList * __IDL_new_ident_comments; |
---|
125 | |
---|
126 | |
---|
127 | #endif /* __UTIL_H */ |
---|