| This is glib.info, produced by makeinfo version 4.0 from glib.texi. |
| |
| This file documents GLIB, A library of useful routines for C |
| programming |
| |
| Copyright (C) 1998 Gregory A McLean |
| |
| Permission is granted to make and distributed verbatim copies of this |
| manual, provided the copyright notice and this permission notice are |
| preserved on all copies. |
| |
| Permission is granted to copy and distribute modified versions of |
| this manual under the conditions for verbatim copying, provided that the |
| entire resulting derived work is distributed under the terms of a |
| permission notice identical to this one. |
| |
| Permission is granted to copy and distribute translations of this |
| manual into another language, under the above conditions for modified |
| versions, except that this permission notice may be stated in a |
| translation approved by Gregory McLean. |
| |
| INFO-DIR-SECTION Library of useful routines for 'C' programing |
| START-INFO-DIR-ENTRY |
| * GLIB: (glib). useful routines for 'C' programming |
| END-INFO-DIR-ENTRY |
| |
| |
| File: glib.info, Node: Top, Next: Copying, Prev: (dir), Up: (dir) |
| |
| useful routines for 'C' programming |
| *********************************** |
| |
| This is edition 1.0 of the GLIB documentation, 3 Feburary 1998. |
| |
| * Menu: |
| |
| * Copying:: Your rights. |
| * Overview:: What is GLIB? |
| * Doubly linked lists:: Doubly linked lists |
| * Signly linked lists:: Singly linked lists |
| * List allocators:: List Allocators |
| * Hash tables:: Hash tables |
| * Caches:: Cache handling |
| * Trees:: Tree handling |
| * Memory:: Memory handling |
| * Timers:: Timer functions |
| * Output:: Output handling |
| * Utilities:: Utilitiy functions |
| * Errors:: Error handling |
| * String Chunks:: String Chunks |
| * Strings:: String handling |
| * Resizable arrays:: Resizeable arrays |
| * GScanner:: Flexible lexical scanner |
| * Miscellany:: Other stuff |
| * Function Index:: Index of functions |
| * Concept Index:: Index of concepts |
| |
| |
| File: glib.info, Node: Copying, Next: Overview, Prev: Top, Up: Top |
| |
| Copying |
| ******* |
| |
| |
| File: glib.info, Node: Overview, Next: Doubly linked lists, Prev: Copying, Up: Top |
| |
| What is GLIB |
| ************ |
| |
| |
| File: glib.info, Node: Doubly linked lists, Next: Signly linked lists, Prev: Overview, Up: Top |
| |
| Doubly linked lists |
| ******************* |
| |
| Functions |
| --------- |
| |
| - Function: GList* g_list_alloc (void) |
| |
| - Function: void g_list_free (GList *LIST) |
| |
| - Function: void g_list_free_1 (GList *LIST) |
| |
| - Function: GList* g_list_append (GList *LIST, gpointer DATA) |
| |
| - Function: GList* g_list_prepend (GList *LIST, gpointer DATA) |
| |
| - Function: GList* g_list_insert (GList *LIST, gpointer DATA, gint |
| POSITION) |
| |
| - Function: GList* g_list_insert_sorted (GList *LIST, gpointer DATA, |
| GCompareFunc FUNC) |
| |
| - Function: GList* g_list_concat (GList *LIST1, GList *LIST2) |
| |
| - Function: GList* g_list_remove (GList *LIST, gpointer DATA) |
| |
| - Function: GList* g_list_remove_link (GList *LIST, GList *LINK) |
| |
| - Function: GList* g_list_reverse (GList *LIST) |
| |
| - Function: GList* g_list_nth (GList *LIST, gint N) |
| |
| - Function: GList* g_list_find (GList *LIST, gpointer DATA) |
| |
| - Function: GList* g_list_last (GList *LIST) |
| |
| - Function: GList* g_list_first (GList *LIST) |
| |
| - Function: gint g_list_length (GList *LIST) |
| |
| - Function: void g_list_foreach (GList *LIST, GFunc FUNC, gpointer |
| USER_DATA) |
| |
| |
| File: glib.info, Node: Signly linked lists, Next: List allocators, Prev: Doubly linked lists, Up: Top |
| |
| Signly linked lists |
| ******************* |
| |
| Functions |
| --------- |
| |
| - Function: GSList* g_slist_alloc (void) |
| |
| - Function: void g_slist_free (GSList *LIST) |
| |
| - Function: void g_slist_free_1 (GSList *LIST) |
| |
| - Function: GSList* g_slist_append (GSList *LIST, gpointer DATA) |
| |
| - Function: GSList* g_slist_prepend (GSList *LIST, gpointer DATA) |
| |
| - Function: GSList* g_slist_insert (GSList *LIST, gpointer DATA, gint |
| POSITION) |
| |
| - Function: GSList* g_slist_insert_sorted (GSList *LIST, gpointer |
| DATA, GCompareFunc FUNC) |
| |
| - Function: GSList* g_slist_concat (GSList *LIST1, GSList *LIST2) |
| |
| - Function: GSList* g_slist_remove (GSList *LIST, gpointer DATA) |
| |
| - Function: GSList* g_slist_remove_link (GSList *LIST, GSList *LINK) |
| |
| - Function: GSList* g_slist_reverse (GSList *LIST) |
| |
| - Function: GSList* g_slist_nth (GSList *LIST, gint N) |
| |
| - Function: GSList* g_slist_find (GSList *LIST, gpointer DATA) |
| |
| - Function: GSList* g_slist_last (GSList *LIST) |
| |
| - Function: gint g_slist_length (GSList *LIST) |
| |
| - Function: void g_slist_foreach (GSList *LIST, GFunc FUNC, gpointer |
| USER_DATA) |
| |
| |
| File: glib.info, Node: List allocators, Next: Hash tables, Prev: Signly linked lists, Up: Top |
| |
| List allocators |
| *************** |
| |
| Functions |
| --------- |
| |
| - Function: GListAllocator* g_list_allocator_new (void) |
| |
| - Function: void g_list_allocator_free (GListAllocator *ALLOCATOR) |
| |
| - Function: GListAllocator* g_slist_set_allocator (GListAllocator |
| *ALLOCATOR) |
| |
| - Function: GListAllocator* g_list_set_allocator (GListAllocator |
| *ALLOCATOR) |
| |
| |
| File: glib.info, Node: Hash tables, Next: Caches, Prev: List allocators, Up: Top |
| |
| Hash tables |
| *********** |
| |
| Functions |
| --------- |
| |
| - Function: GHashTable* g_hash_table_new (GHashFunc HASH_FUNC, |
| GCompareFunc KEY_COMPARE_FUNC) |
| |
| - Function: void g_hash_table_destroy (GHashTable *HASH_TABLE) |
| |
| - Function: void g_hash_table_insert (GHashTable *HASH_TABLE, gpointer |
| KEY, gpointer VALUE) |
| |
| - Function: void g_hash_table_remove (GHashTable *HASH_TABLE, gpointer |
| KEY) |
| |
| - Function: gpointer g_hash_table_lookup (GHashTable *HASH_TABLE, |
| gpointer KEY) |
| |
| - Function: void g_hash_table_freeze (GHashTable *HASH_TABLE) |
| |
| - Function: void g_hash_table_thaw (GHashTable *HASH_TABLE) |
| |
| - Function: void g_hash_table_foreach (GHashTable *HASH_TABLE, GHFunc |
| FUNC, gpointer USER_DATA) |
| |
| |
| File: glib.info, Node: Caches, Next: Trees, Prev: Hash tables, Up: Top |
| |
| Cache handling |
| ************** |
| |
| Functions |
| --------- |
| |
| - Function: GCache* g_cache_new (GCacheNewFunc VALUE_NEW_FUNC, |
| GCacheDestroyFunc VALUE_DESTROY_FUNC, GCacheDupFunc |
| KEY_DUP_FUNC, GCacheDestroyFunc KEY_DESTROY_FUNC, GHashFunc |
| HASH_KEY_FUNC, GHashFunc HASH_VALUE_FUNC, GCompareFunc |
| KEY_COMPARE_FUNC) |
| |
| - Function: void g_cache_destroy (GCache *CACHE) |
| |
| - Function: gpointer g_cache_insert (GCache *CACHE, gpointer KEY) |
| |
| - Function: void g_cache_remove (GCache *CACHE, gpointer KEY) |
| |
| - Function: void g_cache_key_foreach (GCache *CACHE, GHFunc FUNC, |
| gpointer USER_DATA) |
| |
| - Function: void g_cache_value_foreach (GCache *CACHE, GHFunc FUNC, |
| gpointer USER_DATA) |
| |
| |
| File: glib.info, Node: Trees, Next: Memory, Prev: Caches, Up: Top |
| |
| Tree handling |
| ************* |
| |
| Functions |
| --------- |
| |
| - Function: GTree* g_tree_new (GCompareFunc KEY_COMPARE_FUNC) |
| |
| - Function: void g_tree_destroy (GTree *TREE) |
| |
| - Function: void g_tree_remove (GTree *TREE, gpointer KEY, gpointer |
| VALUE) |
| |
| - Function: gpointer g_tree_lookup (GTree *TREE, gpointer KEY) |
| |
| - Function: void g_tree_traverse (GTree *TREE, GTraverseFunc |
| TRAVERSE_FUNC, GTraverseType TRAVERSE_TYPE, gpointer DATA |
| |
| - Function: gpointer g_tree_search (GTree *TREE, GSearchFunc |
| SEARCH_FUNC, gpointer DATA) |
| |
| - Function: gint g_tree_height (GTree *TREE) |
| |
| - Function: gint g_tree_nnodes (GTree *TREE) |
| |
| |
| File: glib.info, Node: Memory, Next: Timers, Prev: Trees, Up: Top |
| |
| Memory handling |
| *************** |
| |
| Functions |
| --------- |
| |
| - Function: gpointer g_malloc (gulong SIZE) |
| |
| - Function: gpointer g_malloc0 (gulong SIZE) |
| |
| - Function: gpointer g_realloc (gpointer MEM, gulong SIZE) |
| |
| - Function: void g_mem_profile (void) |
| |
| - Function: void g_mem_check (gpointer MEM) |
| |
| - Function: GMemChunk* g_mem_chunk_new (gchar *NAME, gint ATOM_SIZE, |
| gulong AREA_SIZE, gint TYPE) |
| |
| - Function: void g_mem_chunk_destroy (GMemChunk *MEM_CHUNK) |
| |
| - Function: gpointer g_mem_chunk_alloc (GMemChunk *MEM_CHUNK) |
| |
| - Function: void g_mem_chunk_free (GMemChunk *MEM_CHUNK, gpointer MEM) |
| |
| - Function: void g_mem_chunk_clean (GMemChunk *MEM_CHUNK) |
| |
| - Function: void g_mem_chunk_reset (GMemChunk *MEM_CHUNK) |
| |
| - Function: void g_mem_chunk_print (GMemChunk *MEM_CHUNK) |
| |
| - Function: void g_mem_chunk_info (void) |
| |
| - Function: void g_blow_chunks (void) |
| Not what you might be thinking, `g_blow_chunks()' simply |
| compresses all the chunks. This operation consists of freeing |
| every memory area that should be freed (but which we haven't |
| gotten around to doing yet). |
| |
| |
| File: glib.info, Node: Timers, Next: Output, Prev: Memory, Up: Top |
| |
| Timer functions |
| *************** |
| |
| Functions |
| --------- |
| |
| - Function: GTimer* g_timer_new (void) |
| |
| - Function: void g_timer_destroy (GTimer *TIMER) |
| |
| - Function: void g_timer_start (GTimer *TIMER) |
| |
| - Function: void g_timer_stop (GTimer *TIMER) |
| |
| - Function: void g_timer_reset (GTimer *TIMER) |
| |
| - Function: gdouble g_timer_elapsed (GTimer *TIMER, gulong |
| *MICROSECONDS) |
| |
| |
| File: glib.info, Node: Output, Next: Utilities, Prev: Timers, Up: Top |
| |
| Output functions |
| **************** |
| |
| Functions |
| --------- |
| |
| - Function: void g_error (gchar *FORMAT, ...) |
| |
| - Function: void g_warning (gchar *FORMAT, ...) |
| |
| - Function: void g_message (gchar *FORMAT, ...) |
| |
| - Function: void g_print (gchar *FORMAT, ...) |
| |
| |
| File: glib.info, Node: Utilities, Next: Errors, Prev: Output, Up: Top |
| |
| Utility functions |
| ***************** |
| |
| |
| File: glib.info, Node: Errors, Next: String Chunks, Prev: Utilities, Up: Top |
| |
| Error handling |
| ************** |
| |
| |
| File: glib.info, Node: String Chunks, Next: Strings, Prev: Errors, Up: Top |
| |
| String chunks |
| ************* |
| |
| |
| File: glib.info, Node: Strings, Next: Resizable arrays, Prev: String Chunks, Up: Top |
| |
| String handling |
| *************** |
| |
| |
| File: glib.info, Node: Resizable arrays, Next: GScanner, Prev: Strings, Up: Top |
| |
| Resizable arrays |
| **************** |
| |
| |
| File: glib.info, Node: GScanner, Next: Miscellany, Prev: Resizable arrays, Up: Top |
| |
| Flexible lexical scanner |
| ************************ |
| |
| |
| File: glib.info, Node: Miscellany, Next: Function Index, Prev: GScanner, Up: Top |
| |
| Other stuff |
| *********** |
| |
| |
| File: glib.info, Node: Function Index, Next: Concept Index, Prev: Miscellany, Up: Top |
| |
| Function Index |
| ************** |
| |
| * Menu: |
| |
| * g_blow_chunks: Memory. |
| * g_cache_destroy: Caches. |
| * g_cache_insert: Caches. |
| * g_cache_key_foreach: Caches. |
| * g_cache_new: Caches. |
| * g_cache_remove: Caches. |
| * g_cache_value_foreach: Caches. |
| * g_error: Output. |
| * g_hash_table_destroy: Hash tables. |
| * g_hash_table_foreach: Hash tables. |
| * g_hash_table_freeze: Hash tables. |
| * g_hash_table_insert: Hash tables. |
| * g_hash_table_lookup: Hash tables. |
| * g_hash_table_new: Hash tables. |
| * g_hash_table_remove: Hash tables. |
| * g_hash_table_thaw: Hash tables. |
| * g_list_alloc: Doubly linked lists. |
| * g_list_allocator_free: List allocators. |
| * g_list_allocator_new: List allocators. |
| * g_list_append: Doubly linked lists. |
| * g_list_concat: Doubly linked lists. |
| * g_list_find: Doubly linked lists. |
| * g_list_first: Doubly linked lists. |
| * g_list_foreach: Doubly linked lists. |
| * g_list_free: Doubly linked lists. |
| * g_list_free_1: Doubly linked lists. |
| * g_list_insert: Doubly linked lists. |
| * g_list_insert_sorted: Doubly linked lists. |
| * g_list_last: Doubly linked lists. |
| * g_list_length: Doubly linked lists. |
| * g_list_nth: Doubly linked lists. |
| * g_list_prepend: Doubly linked lists. |
| * g_list_remove: Doubly linked lists. |
| * g_list_remove_link: Doubly linked lists. |
| * g_list_reverse: Doubly linked lists. |
| * g_list_set_allocator: List allocators. |
| * g_malloc: Memory. |
| * g_malloc0: Memory. |
| * g_mem_check: Memory. |
| * g_mem_chunk_alloc: Memory. |
| * g_mem_chunk_clean: Memory. |
| * g_mem_chunk_destroy: Memory. |
| * g_mem_chunk_free: Memory. |
| * g_mem_chunk_info: Memory. |
| * g_mem_chunk_new: Memory. |
| * g_mem_chunk_print: Memory. |
| * g_mem_chunk_reset: Memory. |
| * g_mem_profile: Memory. |
| * g_message: Output. |
| * g_print: Output. |
| * g_realloc: Memory. |
| * g_slist_alloc: Signly linked lists. |
| * g_slist_append: Signly linked lists. |
| * g_slist_concat: Signly linked lists. |
| * g_slist_find: Signly linked lists. |
| * g_slist_foreach: Signly linked lists. |
| * g_slist_free: Signly linked lists. |
| * g_slist_free_1: Signly linked lists. |
| * g_slist_insert: Signly linked lists. |
| * g_slist_insert_sorted: Signly linked lists. |
| * g_slist_last: Signly linked lists. |
| * g_slist_length: Signly linked lists. |
| * g_slist_nth: Signly linked lists. |
| * g_slist_prepend: Signly linked lists. |
| * g_slist_remove: Signly linked lists. |
| * g_slist_remove_link: Signly linked lists. |
| * g_slist_reverse: Signly linked lists. |
| * g_slist_set_allocator: List allocators. |
| * g_timer_destroy: Timers. |
| * g_timer_elapsed: Timers. |
| * g_timer_new: Timers. |
| * g_timer_reset: Timers. |
| * g_timer_start: Timers. |
| * g_timer_stop: Timers. |
| * g_tree_destroy: Trees. |
| * g_tree_height: Trees. |
| * g_tree_lookup: Trees. |
| * g_tree_new: Trees. |
| * g_tree_nnodes: Trees. |
| * g_tree_remove: Trees. |
| * g_tree_search: Trees. |
| * g_tree_traverse: Trees. |
| * g_warning: Output. |
| |
| |
| File: glib.info, Node: Concept Index, Prev: Function Index, Up: Top |
| |
| Concept Index |
| ************* |
| |
| * Menu: |
| |
| |
| Tag Table: |
| Node: Top1011 |
| Node: Copying2203 |
| Node: Overview2294 |
| Node: Doubly linked lists2411 |
| Node: Signly linked lists3619 |
| Node: List allocators4831 |
| Node: Hash tables5292 |
| Node: Caches6115 |
| Node: Trees6916 |
| Node: Memory7629 |
| Node: Timers8797 |
| Node: Output9249 |
| Node: Utilities9578 |
| Node: Errors9692 |
| Node: String Chunks9807 |
| Node: Strings9918 |
| Node: Resizable arrays10043 |
| Node: GScanner10165 |
| Node: Miscellany10306 |
| Node: Function Index10419 |
| Node: Concept Index15117 |
| |
| End Tag Table |