]> git.draconx.ca Git - gob-dx.git/blob - src/util.h
Release 1.0.2
[gob-dx.git] / src / util.h
1 /* GOB C Preprocessor
2  * Copyright (C) 1999-2000 the Free Software Foundation.
3  * Copyright (C) 2000 Eazel, Inc.
4  *
5  * Author: George Lebl
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program 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
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the  Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20  * USA.
21  */
22
23 #ifndef _UTIL_H_
24 #define _UTIL_H_
25
26 /* print an error, or warning (if 'is_warn') referring to 'line' */
27 void print_error(gboolean is_warn, char *error, int line);
28
29 /* remove the : separator from a typename */
30 char * remove_sep(char *base);
31 /* replace the : separator from a typename with a different character*/
32 char * replace_sep(const char *base, char r);
33
34 /*separate the namespace part and then replace rest of
35   separators with r*/
36 void separns_replace_sep(const char *base, char **ns, char **name, char r);
37
38 /* make a macro with some prefix before the name but after
39    namespace */
40 char * make_pre_macro(const char *base,const  char *pre);
41
42 /* get a name usable for a cast from a GTK+ type (without GTK_TYPE_)*/
43 const char * get_cast(char *type, gboolean simple_only);
44
45 enum {
46         SPECIAL_2POINTER,
47         SPECIAL_3POINTER,
48         SPECIAL_INT_POINTER,
49         SPECIAL_LAST
50 };
51 /* returns TRUE if there are any special types at all */
52 gboolean setup_special_array(Class *c, gboolean *special_array);
53
54 /* get the id without the first underscore, but only if we're removing them */
55 char *get_real_id(char *id);
56
57 #endif
58