1 This is glib.info, produced by Makeinfo version 3.12f from glib.texi.
3 This file documents GLIB, A library of useful routines for C
6 Copyright (C) 1998 Gregory A McLean
8 Permission is granted to make and distributed verbatim copies of this
9 manual, provided the copyright notice and this permission notice are
10 preserved on all copies.
12 Permission is granted to copy and distribute modified versions of
13 this manual under the conditions for verbatim copying, provided that the
14 entire resulting derived work is distributed under the terms of a
15 permission notice identical to this one.
17 Permission is granted to copy and distribute translations of this
18 manual into another language, under the above conditions for modified
19 versions, except that this permission notice may be stated in a
20 translation approved by Gregory McLean.
22 INFO-DIR-SECTION Library of useful routines for 'C' programing
24 * GLIB: (glib). useful routines for 'C' programming
28 File: glib.info, Node: Top, Next: Copying, Prev: (dir), Up: (dir)
30 useful routines for 'C' programming
31 ***********************************
33 This is edition 1.0 of the GLIB documentation, 3 Feburary 1998.
37 * Copying:: Your rights.
38 * Overview:: What is GLIB?
39 * Doubly linked lists:: Doubly linked lists
40 * Signly linked lists:: Singly linked lists
41 * List allocators:: List Allocators
42 * Hash tables:: Hash tables
43 * Caches:: Cache handling
44 * Trees:: Tree handling
45 * Memory:: Memory handling
46 * Timers:: Timer functions
47 * Output:: Output handling
48 * Utilities:: Utilitiy functions
49 * Errors:: Error handling
50 * String Chunks:: String Chunks
51 * Strings:: String handling
52 * Resizable arrays:: Resizeable arrays
53 * GScanner:: Flexible lexical scanner
54 * Miscellany:: Other stuff
55 * Function Index:: Index of functions
56 * Concept Index:: Index of concepts
59 File: glib.info, Node: Copying, Next: Overview, Prev: Top, Up: Top
65 File: glib.info, Node: Overview, Next: Doubly linked lists, Prev: Copying, Up: Top
71 File: glib.info, Node: Doubly linked lists, Next: Signly linked lists, Prev: Overview, Up: Top
79 - Function: GList* g_list_alloc (void)
81 - Function: void g_list_free (GList *LIST)
83 - Function: void g_list_free_1 (GList *LIST)
85 - Function: GList* g_list_append (GList *LIST, gpointer DATA)
87 - Function: GList* g_list_prepend (GList *LIST, gpointer DATA)
89 - Function: GList* g_list_insert (GList *LIST, gpointer DATA, gint
92 - Function: GList* g_list_insert_sorted (GList *LIST, gpointer DATA,
95 - Function: GList* g_list_concat (GList *LIST1, GList *LIST2)
97 - Function: GList* g_list_remove (GList *LIST, gpointer DATA)
99 - Function: GList* g_list_remove_link (GList *LIST, GList *LINK)
101 - Function: GList* g_list_reverse (GList *LIST)
103 - Function: GList* g_list_nth (GList *LIST, gint N)
105 - Function: GList* g_list_find (GList *LIST, gpointer DATA)
107 - Function: GList* g_list_last (GList *LIST)
109 - Function: GList* g_list_first (GList *LIST)
111 - Function: gint g_list_length (GList *LIST)
113 - Function: void g_list_foreach (GList *LIST, GFunc FUNC, gpointer
117 File: glib.info, Node: Signly linked lists, Next: List allocators, Prev: Doubly linked lists, Up: Top
125 - Function: GSList* g_slist_alloc (void)
127 - Function: void g_slist_free (GSList *LIST)
129 - Function: void g_slist_free_1 (GSList *LIST)
131 - Function: GSList* g_slist_append (GSList *LIST, gpointer DATA)
133 - Function: GSList* g_slist_prepend (GSList *LIST, gpointer DATA)
135 - Function: GSList* g_slist_insert (GSList *LIST, gpointer DATA, gint
138 - Function: GSList* g_slist_insert_sorted (GSList *LIST, gpointer
139 DATA, GCompareFunc FUNC)
141 - Function: GSList* g_slist_concat (GSList *LIST1, GSList *LIST2)
143 - Function: GSList* g_slist_remove (GSList *LIST, gpointer DATA)
145 - Function: GSList* g_slist_remove_link (GSList *LIST, GSList *LINK)
147 - Function: GSList* g_slist_reverse (GSList *LIST)
149 - Function: GSList* g_slist_nth (GSList *LIST, gint N)
151 - Function: GSList* g_slist_find (GSList *LIST, gpointer DATA)
153 - Function: GSList* g_slist_last (GSList *LIST)
155 - Function: gint g_slist_length (GSList *LIST)
157 - Function: void g_slist_foreach (GSList *LIST, GFunc FUNC, gpointer
161 File: glib.info, Node: List allocators, Next: Hash tables, Prev: Signly linked lists, Up: Top
169 - Function: GListAllocator* g_list_allocator_new (void)
171 - Function: void g_list_allocator_free (GListAllocator *ALLOCATOR)
173 - Function: GListAllocator* g_slist_set_allocator (GListAllocator
176 - Function: GListAllocator* g_list_set_allocator (GListAllocator
180 File: glib.info, Node: Hash tables, Next: Caches, Prev: List allocators, Up: Top
188 - Function: GHashTable* g_hash_table_new (GHashFunc HASH_FUNC,
189 GCompareFunc KEY_COMPARE_FUNC)
191 - Function: void g_hash_table_destroy (GHashTable *HASH_TABLE)
193 - Function: void g_hash_table_insert (GHashTable *HASH_TABLE, gpointer
196 - Function: void g_hash_table_remove (GHashTable *HASH_TABLE, gpointer
199 - Function: gpointer g_hash_table_lookup (GHashTable *HASH_TABLE,
202 - Function: void g_hash_table_freeze (GHashTable *HASH_TABLE)
204 - Function: void g_hash_table_thaw (GHashTable *HASH_TABLE)
206 - Function: void g_hash_table_foreach (GHashTable *HASH_TABLE, GHFunc
207 FUNC, gpointer USER_DATA)
210 File: glib.info, Node: Caches, Next: Trees, Prev: Hash tables, Up: Top
218 - Function: GCache* g_cache_new (GCacheNewFunc VALUE_NEW_FUNC,
219 GCacheDestroyFunc VALUE_DESTROY_FUNC, GCacheDupFunc
220 KEY_DUP_FUNC, GCacheDestroyFunc KEY_DESTROY_FUNC, GHashFunc
221 HASH_KEY_FUNC, GHashFunc HASH_VALUE_FUNC, GCompareFunc
224 - Function: void g_cache_destroy (GCache *CACHE)
226 - Function: gpointer g_cache_insert (GCache *CACHE, gpointer KEY)
228 - Function: void g_cache_remove (GCache *CACHE, gpointer KEY)
230 - Function: void g_cache_key_foreach (GCache *CACHE, GHFunc FUNC,
233 - Function: void g_cache_value_foreach (GCache *CACHE, GHFunc FUNC,
237 File: glib.info, Node: Trees, Next: Memory, Prev: Caches, Up: Top
245 - Function: GTree* g_tree_new (GCompareFunc KEY_COMPARE_FUNC)
247 - Function: void g_tree_destroy (GTree *TREE)
249 - Function: void g_tree_remove (GTree *TREE, gpointer KEY, gpointer
252 - Function: gpointer g_tree_lookup (GTree *TREE, gpointer KEY)
254 - Function: void g_tree_traverse (GTree *TREE, GTraverseFunc
255 TRAVERSE_FUNC, GTraverseType TRAVERSE_TYPE, gpointer DATA
257 - Function: gpointer g_tree_search (GTree *TREE, GSearchFunc
258 SEARCH_FUNC, gpointer DATA)
260 - Function: gint g_tree_height (GTree *TREE)
262 - Function: gint g_tree_nnodes (GTree *TREE)
265 File: glib.info, Node: Memory, Next: Timers, Prev: Trees, Up: Top
273 - Function: gpointer g_malloc (gulong SIZE)
275 - Function: gpointer g_malloc0 (gulong SIZE)
277 - Function: gpointer g_realloc (gpointer MEM, gulong SIZE)
279 - Function: void g_mem_profile (void)
281 - Function: void g_mem_check (gpointer MEM)
283 - Function: GMemChunk* g_mem_chunk_new (gchar *NAME, gint ATOM_SIZE,
284 gulong AREA_SIZE, gint TYPE)
286 - Function: void g_mem_chunk_destroy (GMemChunk *MEM_CHUNK)
288 - Function: gpointer g_mem_chunk_alloc (GMemChunk *MEM_CHUNK)
290 - Function: void g_mem_chunk_free (GMemChunk *MEM_CHUNK, gpointer MEM)
292 - Function: void g_mem_chunk_clean (GMemChunk *MEM_CHUNK)
294 - Function: void g_mem_chunk_reset (GMemChunk *MEM_CHUNK)
296 - Function: void g_mem_chunk_print (GMemChunk *MEM_CHUNK)
298 - Function: void g_mem_chunk_info (void)
300 - Function: void g_blow_chunks (void)
301 Not what you might be thinking, `g_blow_chunks()' simply
302 compresses all the chunks. This operation consists of freeing
303 every memory area that should be freed (but which we haven't
304 gotten around to doing yet).
307 File: glib.info, Node: Timers, Next: Output, Prev: Memory, Up: Top
315 - Function: GTimer* g_timer_new (void)
317 - Function: void g_timer_destroy (GTimer *TIMER)
319 - Function: void g_timer_start (GTimer *TIMER)
321 - Function: void g_timer_stop (GTimer *TIMER)
323 - Function: void g_timer_reset (GTimer *TIMER)
325 - Function: gdouble g_timer_elapsed (GTimer *TIMER, gulong
329 File: glib.info, Node: Output, Next: Utilities, Prev: Timers, Up: Top
337 - Function: void g_error (gchar *FORMAT, ...)
339 - Function: void g_warning (gchar *FORMAT, ...)
341 - Function: void g_message (gchar *FORMAT, ...)
343 - Function: void g_print (gchar *FORMAT, ...)
346 File: glib.info, Node: Utilities, Next: Errors, Prev: Output, Up: Top
352 File: glib.info, Node: Errors, Next: String Chunks, Prev: Utilities, Up: Top
358 File: glib.info, Node: String Chunks, Next: Strings, Prev: Errors, Up: Top
364 File: glib.info, Node: Strings, Next: Resizable arrays, Prev: String Chunks, Up: Top
370 File: glib.info, Node: Resizable arrays, Next: GScanner, Prev: Strings, Up: Top
376 File: glib.info, Node: GScanner, Next: Miscellany, Prev: Resizable arrays, Up: Top
378 Flexible lexical scanner
379 ************************
382 File: glib.info, Node: Miscellany, Next: Function Index, Prev: GScanner, Up: Top
388 File: glib.info, Node: Function Index, Next: Concept Index, Prev: Miscellany, Up: Top
395 * g_blow_chunks: Memory.
396 * g_cache_destroy: Caches.
397 * g_cache_insert: Caches.
398 * g_cache_key_foreach: Caches.
399 * g_cache_new: Caches.
400 * g_cache_remove: Caches.
401 * g_cache_value_foreach: Caches.
403 * g_hash_table_destroy: Hash tables.
404 * g_hash_table_foreach: Hash tables.
405 * g_hash_table_freeze: Hash tables.
406 * g_hash_table_insert: Hash tables.
407 * g_hash_table_lookup: Hash tables.
408 * g_hash_table_new: Hash tables.
409 * g_hash_table_remove: Hash tables.
410 * g_hash_table_thaw: Hash tables.
411 * g_list_alloc: Doubly linked lists.
412 * g_list_allocator_free: List allocators.
413 * g_list_allocator_new: List allocators.
414 * g_list_append: Doubly linked lists.
415 * g_list_concat: Doubly linked lists.
416 * g_list_find: Doubly linked lists.
417 * g_list_first: Doubly linked lists.
418 * g_list_foreach: Doubly linked lists.
419 * g_list_free: Doubly linked lists.
420 * g_list_free_1: Doubly linked lists.
421 * g_list_insert: Doubly linked lists.
422 * g_list_insert_sorted: Doubly linked lists.
423 * g_list_last: Doubly linked lists.
424 * g_list_length: Doubly linked lists.
425 * g_list_nth: Doubly linked lists.
426 * g_list_prepend: Doubly linked lists.
427 * g_list_remove: Doubly linked lists.
428 * g_list_remove_link: Doubly linked lists.
429 * g_list_reverse: Doubly linked lists.
430 * g_list_set_allocator: List allocators.
433 * g_mem_check: Memory.
434 * g_mem_chunk_alloc: Memory.
435 * g_mem_chunk_clean: Memory.
436 * g_mem_chunk_destroy: Memory.
437 * g_mem_chunk_free: Memory.
438 * g_mem_chunk_info: Memory.
439 * g_mem_chunk_new: Memory.
440 * g_mem_chunk_print: Memory.
441 * g_mem_chunk_reset: Memory.
442 * g_mem_profile: Memory.
446 * g_slist_alloc: Signly linked lists.
447 * g_slist_append: Signly linked lists.
448 * g_slist_concat: Signly linked lists.
449 * g_slist_find: Signly linked lists.
450 * g_slist_foreach: Signly linked lists.
451 * g_slist_free: Signly linked lists.
452 * g_slist_free_1: Signly linked lists.
453 * g_slist_insert: Signly linked lists.
454 * g_slist_insert_sorted: Signly linked lists.
455 * g_slist_last: Signly linked lists.
456 * g_slist_length: Signly linked lists.
457 * g_slist_nth: Signly linked lists.
458 * g_slist_prepend: Signly linked lists.
459 * g_slist_remove: Signly linked lists.
460 * g_slist_remove_link: Signly linked lists.
461 * g_slist_reverse: Signly linked lists.
462 * g_slist_set_allocator: List allocators.
463 * g_timer_destroy: Timers.
464 * g_timer_elapsed: Timers.
465 * g_timer_new: Timers.
466 * g_timer_reset: Timers.
467 * g_timer_start: Timers.
468 * g_timer_stop: Timers.
469 * g_tree_destroy: Trees.
470 * g_tree_height: Trees.
471 * g_tree_lookup: Trees.
473 * g_tree_nnodes: Trees.
474 * g_tree_remove: Trees.
475 * g_tree_search: Trees.
476 * g_tree_traverse: Trees.
480 File: glib.info, Node: Concept Index, Prev: Function Index, Up: Top
490 Node: Copying
\x7f2205
491 Node: Overview
\x7f2296
492 Node: Doubly linked lists
\x7f2413
493 Node: Signly linked lists
\x7f3621
494 Node: List allocators
\x7f4833
495 Node: Hash tables
\x7f5294
501 Node: Utilities
\x7f9580
503 Node: String Chunks
\x7f9809
504 Node: Strings
\x7f9920
505 Node: Resizable arrays
\x7f10045
506 Node: GScanner
\x7f10167
507 Node: Miscellany
\x7f10308
508 Node: Function Index
\x7f10421
509 Node: Concept Index
\x7f15119