[Top] [Contents] [Index] [ ? ]

useful routines for ’C’ programming


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Copying


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. What is GLIB


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Doubly linked lists


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Signly linked lists


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. List allocators


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Hash tables


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Cache handling


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. Tree handling


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9. Memory handling


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1 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).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. Timer functions


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1 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)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. Output functions


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.1 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, …)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12. Utility functions


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13. Error handling


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14. String chunks


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

15. String handling


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16. Resizable arrays


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

17. Flexible lexical scanner


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18. Other stuff


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Function Index

Jump to:   G  
Index Entry Section

G
g_blow_chunks9.1 Functions
g_cache_destroy7.1 Functions
g_cache_insert7.1 Functions
g_cache_key_foreach7.1 Functions
g_cache_new7.1 Functions
g_cache_remove7.1 Functions
g_cache_value_foreach7.1 Functions
g_error11.1 Functions
g_hash_table_destroy6.1 Functions
g_hash_table_foreach6.1 Functions
g_hash_table_freeze6.1 Functions
g_hash_table_insert6.1 Functions
g_hash_table_lookup6.1 Functions
g_hash_table_new6.1 Functions
g_hash_table_remove6.1 Functions
g_hash_table_thaw6.1 Functions
g_list_alloc3.1 Functions
g_list_allocator_free5.1 Functions
g_list_allocator_new5.1 Functions
g_list_append3.1 Functions
g_list_concat3.1 Functions
g_list_find3.1 Functions
g_list_first3.1 Functions
g_list_foreach3.1 Functions
g_list_free3.1 Functions
g_list_free_13.1 Functions
g_list_insert3.1 Functions
g_list_insert_sorted3.1 Functions
g_list_last3.1 Functions
g_list_length3.1 Functions
g_list_nth3.1 Functions
g_list_prepend3.1 Functions
g_list_remove3.1 Functions
g_list_remove_link3.1 Functions
g_list_reverse3.1 Functions
g_list_set_allocator5.1 Functions
g_malloc9.1 Functions
g_malloc09.1 Functions
g_mem_check9.1 Functions
g_mem_chunk_alloc9.1 Functions
g_mem_chunk_clean9.1 Functions
g_mem_chunk_destroy9.1 Functions
g_mem_chunk_free9.1 Functions
g_mem_chunk_info9.1 Functions
g_mem_chunk_new9.1 Functions
g_mem_chunk_print9.1 Functions
g_mem_chunk_reset9.1 Functions
g_mem_profile9.1 Functions
g_message11.1 Functions
g_print11.1 Functions
g_realloc9.1 Functions
g_slist_alloc4.1 Functions
g_slist_append4.1 Functions
g_slist_concat4.1 Functions
g_slist_find4.1 Functions
g_slist_foreach4.1 Functions
g_slist_free4.1 Functions
g_slist_free_14.1 Functions
g_slist_insert4.1 Functions
g_slist_insert_sorted4.1 Functions
g_slist_last4.1 Functions
g_slist_length4.1 Functions
g_slist_nth4.1 Functions
g_slist_prepend4.1 Functions
g_slist_remove4.1 Functions
g_slist_remove_link4.1 Functions
g_slist_reverse4.1 Functions
g_slist_set_allocator5.1 Functions
g_timer_destroy10.1 Functions
g_timer_elapsed10.1 Functions
g_timer_new10.1 Functions
g_timer_reset10.1 Functions
g_timer_start10.1 Functions
g_timer_stop10.1 Functions
g_tree_destroy8.1 Functions
g_tree_height8.1 Functions
g_tree_lookup8.1 Functions
g_tree_new8.1 Functions
g_tree_nnodes8.1 Functions
g_tree_remove8.1 Functions
g_tree_search8.1 Functions
g_tree_traverse8.1 Functions
g_warning11.1 Functions

Jump to:   G  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Concept Index


[Top] [Contents] [Index] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

Short Table of Contents


[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated on December 18, 2024 using texi2html 1.82.

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ < ] Back Previous section in reading order 1.2.2
[ > ] Forward Next section in reading order 1.2.4
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ Up ] Up Up section 1.2
[ >> ] FastForward Next chapter 2
[Top] Top Cover (top) of document  
[Contents] Contents Table of contents  
[Index] Index Index  
[ ? ] About About (help)  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:


This document was generated on December 18, 2024 using texi2html 1.82.