ng
[oweals/gnunet.git] / src / upnp / upnp_util.h
1 /**
2  * @file util.h Utility Functions
3  * @ingroup core
4  *
5  * gaim
6  *
7  * Gaim is the legal property of its developers, whose names are too numerous
8  * to list here.  Please refer to the COPYRIGHT file distributed with this
9  * source distribution.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  *
25  * @todo Rename the functions so that they live somewhere in the gaim
26  *       namespace.
27  */
28 #ifndef _GAIM_UTIL_H_
29 #define _GAIM_UTIL_H_
30
31 #include <stdio.h>
32 #include <string.h>
33
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38
39 /**
40  * Unescapes HTML entities to their literal characters.
41  * For example "&amp;" is replaced by '&' and so on.
42  * Actually only "&amp;", "&quot;", "&lt;" and "&gt;" are currently
43  * supported.
44  *
45  * @param html The string in which to unescape any HTML entities
46  *
47  * @return the text with HTML entities literalized
48  */
49   char *gaim_unescape_html (const char *html);
50
51 /**
52  * Compares two strings to see if the first contains the second as
53  * a proper prefix.
54  *
55  * @param s  The string to check.
56  * @param p  The prefix in question.
57  *
58  * @return   TRUE if p is a prefix of s, otherwise FALSE.
59  */
60   int gaim_str_has_prefix (const char *s, const char *p);
61
62   char *g_strdup_printf (const char *fmt, ...);
63
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif