]> git.draconx.ca Git - gob-dx.git/blob - src/util.h
Release 0.92.2
[gob-dx.git] / src / util.h
1 /* GOB C Preprocessor
2  * Copyright (C) 1999-2000 the Free Software Foundation.
3  *
4  * Author: George Lebl
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the  Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19  * USA.
20  */
21
22 #ifndef _UTIL_H_
23 #define _UTIL_H_
24
25 /* print an error, or warning (if 'is_warn') referring to 'line' */
26 void print_error(int is_warn, char *error, int line);
27
28 /* remove the : separator from a typename */
29 char * remove_sep(char *base);
30 /* replace the : separator from a typename with a different character*/
31 char * replace_sep(char *base, char r);
32
33 /*separate the namespace part and then replace rest of
34   separators with r*/
35 void separns_replace_sep(char *base, char **ns, char **name, char r);
36
37 /* make a macro with some prefix before the name but after
38    namespace */
39 char * make_pre_macro(char *base, char *pre);
40
41 /* get a name usable for a cast from a GTK+ type (without GTK_TYPE_)*/
42 const char * get_cast(char *type, gboolean simple_only);
43
44 #endif
45