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/.
32 #include <glib/gtypes.h>
36 typedef struct _GArray GArray;
37 typedef struct _GByteArray GByteArray;
38 typedef struct _GPtrArray GPtrArray;
58 /* Resizable arrays. remove fills any cleared spot and shortens the
59 * array, while preserving the order. remove_fast will distort the
60 * order by moving the last element to the position of the removed.
63 #define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1)
64 #define g_array_prepend_val(a,v) g_array_prepend_vals (a, &(v), 1)
65 #define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1)
66 #define g_array_index(a,t,i) (((t*) (a)->data) [(i)])
68 IMPORT_C GArray* g_array_new (gboolean zero_terminated,
71 IMPORT_C GArray* g_array_sized_new (gboolean zero_terminated,
75 IMPORT_C gchar* g_array_free (GArray *array,
76 gboolean free_segment);
77 IMPORT_C GArray* g_array_append_vals (GArray *array,
80 IMPORT_C GArray* g_array_prepend_vals (GArray *array,
83 IMPORT_C GArray* g_array_insert_vals (GArray *array,
87 IMPORT_C GArray* g_array_set_size (GArray *array,
89 IMPORT_C GArray* g_array_remove_index (GArray *array,
91 IMPORT_C GArray* g_array_remove_index_fast (GArray *array,
93 IMPORT_C GArray* g_array_remove_range (GArray *array,
96 IMPORT_C void g_array_sort (GArray *array,
97 GCompareFunc compare_func);
98 IMPORT_C void g_array_sort_with_data (GArray *array,
99 GCompareDataFunc compare_func,
102 /* Resizable pointer array. This interface is much less complicated
103 * than the above. Add appends a pointer. Remove fills any cleared
104 * spot and shortens the array. remove_fast will again distort order.
106 #define g_ptr_array_index(array,index_) ((array)->pdata)[index_]
107 IMPORT_C GPtrArray* g_ptr_array_new (void);
108 IMPORT_C GPtrArray* g_ptr_array_sized_new (guint reserved_size);
109 IMPORT_C gpointer* g_ptr_array_free (GPtrArray *array,
111 IMPORT_C void g_ptr_array_set_size (GPtrArray *array,
113 IMPORT_C gpointer g_ptr_array_remove_index (GPtrArray *array,
115 IMPORT_C gpointer g_ptr_array_remove_index_fast (GPtrArray *array,
117 IMPORT_C gboolean g_ptr_array_remove (GPtrArray *array,
119 IMPORT_C gboolean g_ptr_array_remove_fast (GPtrArray *array,
121 IMPORT_C void g_ptr_array_remove_range (GPtrArray *array,
124 IMPORT_C void g_ptr_array_add (GPtrArray *array,
126 IMPORT_C void g_ptr_array_sort (GPtrArray *array,
127 GCompareFunc compare_func);
128 IMPORT_C void g_ptr_array_sort_with_data (GPtrArray *array,
129 GCompareDataFunc compare_func,
131 IMPORT_C void g_ptr_array_foreach (GPtrArray *array,
136 /* Byte arrays, an array of guint8. Implemented as a GArray,
140 IMPORT_C GByteArray* g_byte_array_new (void);
141 IMPORT_C GByteArray* g_byte_array_sized_new (guint reserved_size);
142 IMPORT_C guint8* g_byte_array_free (GByteArray *array,
143 gboolean free_segment);
144 IMPORT_C GByteArray* g_byte_array_append (GByteArray *array,
147 IMPORT_C GByteArray* g_byte_array_prepend (GByteArray *array,
150 IMPORT_C GByteArray* g_byte_array_set_size (GByteArray *array,
152 IMPORT_C GByteArray* g_byte_array_remove_index (GByteArray *array,
154 IMPORT_C GByteArray* g_byte_array_remove_index_fast (GByteArray *array,
156 IMPORT_C GByteArray* g_byte_array_remove_range (GByteArray *array,
159 IMPORT_C void g_byte_array_sort (GByteArray *array,
160 GCompareFunc compare_func);
161 IMPORT_C void g_byte_array_sort_with_data (GByteArray *array,
162 GCompareDataFunc compare_func,
168 #endif /* __G_ARRAY_H__ */