Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 /* GLIB - Library of useful routines for C programming
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 * Modified by the GLib Team and others 1997-2000. See the AUTHORS
23 * file for a list of people on the GLib Team. See the ChangeLog
24 * files for a list of changes. These files are distributed with
25 * GLib at ftp://ftp.gtk.org/pub/gtk/.
28 #ifndef __G_STRING_H__
29 #define __G_STRING_H__
32 #include <glib/gtypes.h>
33 #include <glib/gunicode.h>
34 #include <glib/gutils.h> /* for G_CAN_INLINE */
38 typedef struct _GString GString;
39 typedef struct _GStringChunk GStringChunk;
50 IMPORT_C GStringChunk* g_string_chunk_new (gsize size);
51 IMPORT_C void g_string_chunk_free (GStringChunk *chunk);
52 IMPORT_C gchar* g_string_chunk_insert (GStringChunk *chunk,
54 IMPORT_C gchar* g_string_chunk_insert_len (GStringChunk *chunk,
57 IMPORT_C gchar* g_string_chunk_insert_const (GStringChunk *chunk,
63 IMPORT_C GString* g_string_new (const gchar *init);
64 IMPORT_C GString* g_string_new_len (const gchar *init,
66 IMPORT_C GString* g_string_sized_new (gsize dfl_size);
67 IMPORT_C gchar* g_string_free (GString *string,
68 gboolean free_segment);
69 IMPORT_C gboolean g_string_equal (const GString *v,
71 IMPORT_C guint g_string_hash (const GString *str);
72 IMPORT_C GString* g_string_assign (GString *string,
74 IMPORT_C GString* g_string_truncate (GString *string,
76 IMPORT_C GString* g_string_set_size (GString *string,
78 IMPORT_C GString* g_string_insert_len (GString *string,
82 IMPORT_C GString* g_string_append (GString *string,
84 IMPORT_C GString* g_string_append_len (GString *string,
87 IMPORT_C GString* g_string_append_c (GString *string,
89 IMPORT_C GString* g_string_append_unichar (GString *string,
91 IMPORT_C GString* g_string_prepend (GString *string,
93 IMPORT_C GString* g_string_prepend_c (GString *string,
95 IMPORT_C GString* g_string_prepend_unichar (GString *string,
97 IMPORT_C GString* g_string_prepend_len (GString *string,
100 IMPORT_C GString* g_string_insert (GString *string,
103 IMPORT_C GString* g_string_insert_c (GString *string,
106 IMPORT_C GString* g_string_insert_unichar (GString *string,
109 IMPORT_C GString* g_string_erase (GString *string,
112 IMPORT_C GString* g_string_ascii_down (GString *string);
113 IMPORT_C GString* g_string_ascii_up (GString *string);
114 IMPORT_C void g_string_printf (GString *string,
116 ...) G_GNUC_PRINTF (2, 3);
117 IMPORT_C void g_string_append_printf (GString *string,
119 ...) G_GNUC_PRINTF (2, 3);
121 /* -- optimize g_strig_append_c --- */
123 static inline GString*
124 g_string_append_c_inline (GString *gstring,
127 if (gstring->len + 1 < gstring->allocated_len)
129 gstring->str[gstring->len++] = c;
130 gstring->str[gstring->len] = 0;
133 g_string_insert_c (gstring, -1, c);
136 #define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c)
137 #endif /* G_CAN_INLINE */
140 #ifndef G_DISABLE_DEPRECATED
142 /* The following two functions are deprecated and will be removed in
143 * the next major release. They use the locale-specific tolower and
144 * toupper, which is almost never the right thing.
147 IMPORT_C GString* g_string_down (GString *string);
148 IMPORT_C GString* g_string_up (GString *string);
150 /* These aliases are included for compatibility. */
151 #define g_string_sprintf g_string_printf
152 #define g_string_sprintfa g_string_append_printf
154 #endif /* G_DISABLE_DEPRECATED */
158 #endif /* __G_STRING_H__ */