00001 #ifndef __GSTR_UTILS_H
00002 #define __GSTR_UTILS_H
00003 /*-------------------------------------------------------------------------
00004 * Copyright (c) 2000-2002 Kenneth W. Sodemann (stuffle@charter.net)
00005 *-------------------------------------------------------------------------
00006 * gstr_utils
00007 *
00008 * Synopsis:
00009 * A collection of utilities for working with GStrings
00010 *
00011 * $Id: gstr_utils.h,v 1.5 2002/01/30 00:40:02 stuffle Exp $
00012 *
00013 * This program is free software; you can redistribute it and/or modify
00014 * it under the terms of the GNU General Public License as published by
00015 * the Free Software Foundation; either version 2 of the License, or
00016 * (at your option) any later version.
00017 *
00018 * This program is distributed in the hope that it will be useful,
00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021 * GNU General Public License for more details.
00022 *
00023 * You should have received a copy of the GNU General Public License
00024 * along with this program; if not, write to
00025 * Free Software Foundation, Inc.
00026 * 59 Temple Place, Suite 330
00027 * Boston, MA 02111-1307 USA
00028 *-------------------------------------------------------------------------
00029 */
00042 #include <glib.h>
00043
00044 /*
00045 * __BEGIN_DECLS should be used at the beginning of your declarations,
00046 * so that C++ compilers don't mangle their names. Use __END_DECLS at
00047 * the end of C declarations.
00048 */
00049 #undef __BEGIN_DECLS
00050 #undef __END_DECLS
00051 #ifdef __cplusplus
00052 # define __BEGIN_DECLS extern "C" {
00053 # define __END_DECLS }
00054 #else
00055 # define __BEGIN_DECLS /* empty */
00056 # define __END_DECLS /* empty */
00057 #endif
00058
00059 /*
00060 * __P is a macro used to wrap function prototypes, so that compilers
00061 * that don't understand ANSI C prototypes still work, and ANSI C
00062 * compilers can issue warnings about type mismatches.
00063 */
00064 #undef __P
00065 #if defined (__STDC__) || defined (_AIX) \
00066 || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
00067 || defined(WIN32) || defined(__cplusplus)
00068 # define __P(protos) protos
00069 #else
00070 # define __P(protos) ()
00071 #endif
00072
00073 __BEGIN_DECLS
00084 GString *g_string_strip __P((GString *str));
00085
00086
00100 void g_string_delete_char __P((GString *str, gint pos));
00101
00102
00119 void g_string_insert_char __P((GString *str, gchar chr, gint pos));
00120
00121
00139 void g_string_insert_str __P((GString *str1, gchar *str2, gint pos));
00140
00141
00166 void g_string_escape_char __P((GString *str, gchar chr));
00167
00168
00194 void g_string_prepare_db_instr __P((GString *str));
00195
00223 void g_string_prepare_html __P((GString *str));
00224
00225 __END_DECLS
00226 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002