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.2 2004-09-22 23:38:51 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 <libIDL/IDL.h> |
---|
37 | |
---|
38 | /* Internal parse flags */ |
---|
39 | #define IDLFP_PROPERTIES (1UL << 0) |
---|
40 | #define IDLFP_NATIVE (1UL << 1) |
---|
41 | #define IDLFP_IN_INCLUDES (1UL << 2) |
---|
42 | |
---|
43 | typedef struct { |
---|
44 | unsigned long flags; |
---|
45 | char* name; |
---|
46 | int seenCnt; |
---|
47 | } IDL_fileinfo; |
---|
48 | |
---|
49 | extern void yyerror (const char *s); |
---|
50 | extern void yyerrorl (const char *s, int ofs); |
---|
51 | extern void yywarning (int level, const char *s); |
---|
52 | extern void yywarningl (int level, const char *s, int ofs); |
---|
53 | extern void yyerrorv (const char *fmt, ...) |
---|
54 | G_GNUC_PRINTF (1, 2); |
---|
55 | extern void yyerrorlv (const char *fmt, int ofs, ...) |
---|
56 | G_GNUC_PRINTF (1, 3); |
---|
57 | extern void yywarningv (int level, const char *fmt, ...) |
---|
58 | G_GNUC_PRINTF (2, 3); |
---|
59 | extern void yywarninglv (int level, const char *fmt, int ofs, ...) |
---|
60 | G_GNUC_PRINTF (2, 4); |
---|
61 | extern void yyerrornv (IDL_tree p, const char *fmt, ...) |
---|
62 | G_GNUC_PRINTF (2, 3); |
---|
63 | extern void yywarningnv (IDL_tree p, int level, const char *fmt, ...) |
---|
64 | G_GNUC_PRINTF (3, 4); |
---|
65 | |
---|
66 | extern guint IDL_strcase_hash (gconstpointer v); |
---|
67 | extern gint IDL_strcase_equal (gconstpointer a, gconstpointer b); |
---|
68 | extern gint IDL_strcase_cmp (gconstpointer a, gconstpointer b); |
---|
69 | extern guint IDL_ident_hash (gconstpointer v); |
---|
70 | extern gint IDL_ident_equal (gconstpointer a, gconstpointer b); |
---|
71 | extern gint IDL_ident_cmp (gconstpointer a, gconstpointer b); |
---|
72 | extern int IDL_ns_check_for_ambiguous_inheritance |
---|
73 | (IDL_tree interface_ident, |
---|
74 | IDL_tree p); |
---|
75 | extern void IDL_tree_process_forward_dcls (IDL_tree *p, IDL_ns ns); |
---|
76 | extern void IDL_tree_remove_empty_modules (IDL_tree *p, IDL_ns ns); |
---|
77 | |
---|
78 | extern void __IDL_free_properties (GHashTable *table); |
---|
79 | extern void __IDL_assign_up_node (IDL_tree up, IDL_tree node); |
---|
80 | extern void __IDL_assign_location (IDL_tree node, IDL_tree from_node); |
---|
81 | extern void __IDL_assign_this_location (IDL_tree node, char *filename, int line); |
---|
82 | extern void __IDL_parser_reset (void); |
---|
83 | extern void __IDL_do_pragma (const char *s); |
---|
84 | |
---|
85 | extern void __IDL_lex_init (void); |
---|
86 | extern void __IDL_lex_cleanup (void); |
---|
87 | |
---|
88 | |
---|
89 | #ifndef HAVE_CPP_PIPE_STDIN |
---|
90 | extern char * __IDL_tmp_filename; |
---|
91 | #endif |
---|
92 | extern const char * __IDL_real_filename; |
---|
93 | extern char * __IDL_cur_filename; |
---|
94 | extern int __IDL_cur_line; |
---|
95 | extern GHashTable * __IDL_filename_hash; |
---|
96 | extern IDL_fileinfo * __IDL_cur_fileinfo; |
---|
97 | extern int __IDL_prev_token_line; |
---|
98 | extern int __IDL_cur_token_line; |
---|
99 | extern GHashTable * __IDL_structunion_ht; |
---|
100 | extern int __IDL_inhibits; |
---|
101 | extern int __IDL_typecodes_as_tok; |
---|
102 | extern int __IDL_pidl; |
---|
103 | extern IDL_tree __IDL_root; |
---|
104 | extern IDL_ns __IDL_root_ns; |
---|
105 | extern int __IDL_is_okay; |
---|
106 | extern int __IDL_is_parsing; |
---|
107 | extern unsigned long __IDL_flags; |
---|
108 | extern unsigned long __IDL_flagsi; |
---|
109 | extern gpointer __IDL_inputcb_user_data; |
---|
110 | extern IDL_input_callback __IDL_inputcb; |
---|
111 | extern GSList * __IDL_new_ident_comments; |
---|
112 | |
---|
113 | |
---|
114 | #endif /* __UTIL_H */ |
---|