From 24273ca743bc88e8c2a64fead4f13b8367af0ddd Mon Sep 17 00:00:00 2001 From: EST 1998 Gregory McLean Date: Wed, 11 Nov 1998 23:19:57 +0000 Subject: [PATCH] Batch of new documentation that should be easier to maintain and extend. Wed Nov 11 18:11:24 EST 1998 Gregory McLean * docs/*.sgml : Batch of new documentation that should be easier to maintain and extend. Plus generate whatever sort of doc file you would like. I didn't change the Makefile stuff as I'm not sure what default doc type people want. Oh and this is all DocBook format. Enjoy! --- ChangeLog | 8 + ChangeLog.pre-2-0 | 8 + ChangeLog.pre-2-10 | 8 + ChangeLog.pre-2-12 | 8 + ChangeLog.pre-2-2 | 8 + ChangeLog.pre-2-4 | 8 + ChangeLog.pre-2-6 | 8 + ChangeLog.pre-2-8 | 8 + docs/defintions.sgml | 108 +++++++ docs/gcache.sgml | 196 +++++++++++ docs/ghash.sgml | 262 +++++++++++++++ docs/glib.sgml | 77 +++++ docs/glist.sgml | 900 +++++++++++++++++++++++++++++++++++++++++++++++++++ docs/gmem.sgml | 181 +++++++++++ docs/gtimer.sgml | 214 ++++++++++++ docs/gtree.sgml | 57 ++++ 16 files changed, 2059 insertions(+) create mode 100644 docs/defintions.sgml create mode 100644 docs/gcache.sgml create mode 100644 docs/ghash.sgml create mode 100644 docs/glib.sgml create mode 100644 docs/glist.sgml create mode 100644 docs/gmem.sgml create mode 100644 docs/gtimer.sgml create mode 100644 docs/gtree.sgml diff --git a/ChangeLog b/ChangeLog index bfa281c..8622b70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index bfa281c..8622b70 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Nov 11 18:11:24 EST 1998 Gregory McLean + + * docs/*.sgml : Batch of new documentation that should be easier + to maintain and extend. Plus generate whatever sort of doc file + you would like. I didn't change the Makefile stuff as I'm not sure + what default doc type people want. Oh and this is all DocBook format. + Enjoy! + Tue Nov 10 17:12:45 PST 1998 Manish Singh * configure.in: use __extension__ for long long on gcc >= 2.8 and diff --git a/docs/defintions.sgml b/docs/defintions.sgml new file mode 100644 index 0000000..6dce081 --- /dev/null +++ b/docs/defintions.sgml @@ -0,0 +1,108 @@ + + + + GLIB Definitions and types + + GLIB Definitions and types + + Introduction + GLIB provides many abstract defintions to ease the cross platform + programming tasks. All of these types and definitions have system + specific values that glib, compiled on the native machine will be + adjusted to the system specific types. + By using the following types and defintions in your program, it will + function in the way you designed on more hardware and operating systems + combinations. + We also are provided with definitions for some commonly used macros. + Some of them are only provided if they haven't already been defined. It + is assumed that if they are already defined then the current definition + is correct. + + + Limits + GLIB provides standard definitions for the extremes of many of the + standard types. They are as follows. + + + G_MINFLOAT + This is the minimum floating point number that the machine + that your application is running on can handle. + + + G_MAXFLOAT + This is the maximum floating point number that the machine + that your application is running on can handle. + + + G_MINDOUBLE + FIXME + + + G_MAXDOUBLE + FIXME + + + G_MINSHORT + FIXME + + + G_MAXSHORT + FIXME + + + G_MININT + FIXME + + + G_MAXINT + FIXME + + + G_MINLONG + FIXME + + + G_MAXLONG + FIXME + + + + + Commonly used macros + This section details out the commonly used macros that the library + will provide. These definitions will only be provided if they haven't + been defined before. + + + NULL + A nothing value. + + + FALSE + This macro is used to indicate a non truth. + + + TRUE + This macro represents a true value. + + + MAX + This macro will return the maximum of two variables. + + + MIN + This macro will return the minmum of two variables. + + + ABS + This macros will return the absolute value of a signed integer + + + + CLAMP + FIXME + + + + + diff --git a/docs/gcache.sgml b/docs/gcache.sgml new file mode 100644 index 0000000..251419d --- /dev/null +++ b/docs/gcache.sgml @@ -0,0 +1,196 @@ + + + + Cache handling functions + + Cache handling functions + + Introduction + + + + Cache functions + + + g_cache_new + + 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 + + Description + + + Usage + + + + + + + g_cache_destroy + + void g_cache_destroy + GCache *cache + + Description + + + Usage + + + + + Parameters + + + GCache cache + + + + + + + g_cache_insert + + gpointer g_cache_insert + GCache *cache + gpointer key + + Description + + + Usage + + + + + Parameters + + + GCache *cache + + + + gpointer key + + + + + + + g_cache_remove + + void g_cache_remove + GCache *cache + gpointer value + + Description + + + Usage + + + + + Parameters + + + GCache *cache + + + + gpointer value + + + + + + + g_cache_key_foreach + + void g_cache_key_foreach + GCache *cache + GHFunc func + gpointer user_data + + Description + + + Usage + + + + + Parameters + + + GCache *cache + + + + GHFunc func + + + + gpointer user_data + + + + + + + g_cache_value_foreach + + void g_cache_value_foreach + GCache *cache + GHFunc func + gpointer user_data + + Description + + + Usage + + + + + Parameters + + + GCache *cache + + + + GHFunc func + + + + gpointer user_data + + + + + + + + \ No newline at end of file diff --git a/docs/ghash.sgml b/docs/ghash.sgml new file mode 100644 index 0000000..63f0645 --- /dev/null +++ b/docs/ghash.sgml @@ -0,0 +1,262 @@ + + + + Hash Table functions + + Hash Table functions + + Introduction + + + + Hash Table functions + + + g_hash_table_new + + GHashTable *g_hash_table_new + GHashFunc *hash_func + GCompareFunc key_compare_func + + Description + Allocate a new GHashTable for use and return a + pointer to the new hash table. If the table could not be allocated + for some reason a NULL is returned. + + Usage + + GHashTable *hash_table; + + hash_table = g_hash_table_new (g_str_hash, g_str_equal); + + /* use the hash table */ + + + Parameters + GHashFunc hash_func + A function pointer for the hashing function for this hash table. + + GCompareFunc key_compare_func + A function pointer for comparing keys, used by the hash function + specified in the first argument + + + + g_hash_table_destroy + + void g_hash_table_destroy + GHashTable *hash_table + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_insert + + void g_hash_table_insert + GHashTable *hash_table + gpointer key + gpointer value + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_remove + + void g_hash_table_remove + GHashTable *hash_table + gconstpointer key + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_lookup + + gpointer g_hash_table_lookup + gconstpointer key + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_lookup_extended + + gboolean g_hash_table_lookup_extended + GHashTable *hash_table + gconstpointer lookup_key + gpointer *orig_key + gpointer *value + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_freeze + + void g_hash_table_freeze + GHashTable *hash_table + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_thaw + + void g_hash_table_thaw + GHashTable *hash_table + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_foreach + + void g_hash_table_foreach + GHashTable *hash_table + GHFunc func + gpointer user_data + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_foreach_remove + + gint g_hash_table_foreach_remove + GHashTable *hash_table + GHRFunc func + gpointer user_data + + Description + + + Usage + + + + + Parameters + GHashTable *hash_table + + + + + g_hash_table_size + + gint g_hash_table_size + GHashTable *hash_table + + Description + Get the size of the hash table passed in the + hash_table. + + Usage + + + + + Parameters + GHashTable *hash_table + A pointer to a GHashTable hash_table previously + allocated. + + + + + diff --git a/docs/glib.sgml b/docs/glib.sgml new file mode 100644 index 0000000..8a74685 --- /dev/null +++ b/docs/glib.sgml @@ -0,0 +1,77 @@ + + + + + + + +]> + + + GLIB Developers' Reference Guide + + + Gregory + McLean + +
gregm@comstar.net
+
+
+
+ + 1998 + Gregory A. McLean + + + This documentation is free; this means that + everyone is free to use it and free to redistribute it on a free basis. + This documentation is not in the public domain; it is a copyrighted + work and there are restrictions on its distribution, but these + restrictions are designed to permit everything that a good cooperating + citizen would want to do. What is not allowed is to try and prevent + others from further sharing any version of this documentation that they + might get from you. + Specifically, we want to make sure that you have the right to + give away copies of this documentation, that you receive the source + or else can get it if you want it, that you can change the documentation + or use pieces of it in new free documentation, and that you know you + can legally do these things. + This documentation is being distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without the + even implied warranty of MERCHANTABILITY OR FITNESS FOR A + PARTICULAR PURPOSE. + For the exact details of copying this library and the related + documentation please see the COPYING file that + should have come with this library. + +
+ + + Introduction + + + What is GLIB + GLIB is a collection of useful functions designed with portabilty + and ease of use in mind. Many of the functions provided by GLIB can + be duplicated or are wrappers to standard UNIX + functions and system calls. The are provided in this library mainly + for consistancy and the write once philophsy. + + + &defintions; + + &memory; + + &lists; + + &hashtables; + + &caches; + + &trees; + + &timers; + +
+ diff --git a/docs/glist.sgml b/docs/glist.sgml new file mode 100644 index 0000000..f0887b8 --- /dev/null +++ b/docs/glist.sgml @@ -0,0 +1,900 @@ + + + + List handling functions + + List handling functions + + Introduction + When developing an application of any mangnitude there comes a time + when you will need to deal with lists of data within your application. To + this end GLIB provides some convient functions to handle both signly + linked lists, and doubly linked lists. Facilities also exist for custom + list handling if the basic lists don't suite your purpose. + This chapter will cover the all the functions provided in GLIB for + list management. + + + List Allocators + Describe the list allocation functions... + + g_list_allocator_new + + + GListAllocator *g_list_allocator_new + GListAllocator *allocator + + Description + Describe this function + + Usage + + FIXME! + + + Parameters + + + GListAllocator *allocator + A list allocator pointer + + + + + + g_list_allocator_free + + void g_list_allocator_free + GListAllocator *allocator + + Description + Describe this thing. + + Usage + + FIXME! + + + Parameters + + + GListAllocator *allocator + The pointer to list allocator to free. + + + + + + g_slist_set_allocator + + GListAllocator *g_slist_set_allocator + GListAllocator *allocator + + Description + This function will set the allocator for a singly linked list + + Usage + + FIXME + + + Parameters + + + GListAllocator *allocator + The pointer to the list allocator to use for the signly + linked lists allocations. + + + + + + g_list_set_allocator + + GListAllocator *g_list_set_allocator + GListAllocator *allocator + + Description + This function will set the allocator for a doubly linked list + + Usage + + FIXME + + + Parameters + + + GListAllocator *allocator + The pointer to the list allocator to use for the doubly + linked list allocations. + + + + + + + + Signly linked lists + Signly linked lists! + + g_slist_alloc + + GSList *g_slist_alloc + voidnone + + Description + + + Usage + + FIXME + + + Parameters + + + void (null) + This function takes no arguments + + + + + + g_slist_free + + GSList *g_slist_free + GSList *list + + Description + + + Usage + + FIXME + + + Parameters + + + GSList *list + A pointer to a GSList structure. + + + + + + g_slist_free_1 + + GSList *g_slist_free_1 + GSList *list + + Description + + + Usage + + FIXME + + + Parameters + + + GSList *list + A pointer to a GSList structure. + + + + + + g_slist_append + + GSList *g_slist_append + GSList *list + gpointer data + + Description + Append the data to the list given + in the list argument. This function will + store the pointer to the data and return a new list pointer + with the new element attached to the end. + + Usage + + FIXME + + + Parameters + + + GSList *list + The pointer to the list to append the + dataitem to. This can be NULL + in the case of a new list. + + + gpointer data + A pointer to the data to store in this list element + + + + + + g_slist_preppend + + GSList *g_slist_preppend + GSList *list + gpointer data + + Description + + + Usage + + FIXME + + + Parameters + + + GSList *list + A pointer to a GSList structure. + + + gpointer data + A pointer to the data for this list element + + + + + + g_slist_insert + + GSList *g_slist_insert + GSList *list + gpointer data + gint position + + Description + + + Usage + + FIXME + + + Parameters + + + GSList *list + A pointer to a GSList structure. + + + + + + g_slist_insert_sorted + + GSList *g_slist_insert_sorted + GSList *list + gpointer data + GCompareFunc func + + Description + + + Usage + + FIXME + + + + + g_slist_concat + + GSList *g_slist_concat + GSList *list1 + GSList *list2 + + Description + + + Usage + + FIXME + + + + + g_slist_remove + + GSList *g_slist_remove + GSList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_slist_remove_link + + GSList *g_slist_remove_link + GSList *list + GSList *llink + + Description + + + Usage + + FIXME + + + + + g_slist_reverse + + GSList *g_slist_reverse + GSList *list + + Description + + + Usage + + FIXME + + + + + g_slist_nth + + GSList *g_slist_nth + GSList *list + guint n + + Description + + + Usage + + FIXME + + + + + g_slist_find + + GSList *g_slist_find + GSList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_slist_find_custom + + GSList *g_slist_find_custom + GSList *list + gpointer data + GCompareFunc func + + Description + + + Usage + + FIXME + + + + + g_slist_position + + gint g_slist_position + GSList *list + GSList *llink + + Description + + + Usage + + FIXME + + + + + g_slist_index + + gint g_slist_index + GSList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_slist_last + + GSList *g_slist_last + GSList *list + + Description + + + Usage + + FIXME + + + + + g_slist_length + + guint g_slist_length + GSList *list + + Description + + + Usage + + FIXME + + + + + g_slist_foreach + + void g_slist_foreach + GSList *list + GFunc func + gpointer user_data + + Description + + + Usage + + FIXME + + + + + g_slist_nth_data + + gpointer g_slist_nth_data + GSList *list + guint n + + Description + + + Usage + + FIXME + + + + + g_slist_next + + GSList *g_slist_next + GSList *list + + Description + + + Usage + + FIXME + + + + + + + + + Doubly linked lists + Doubly linked lists! + + g_list_alloc + + GList *g_list_alloc + voidnone + + Description + + + Usage + + FIXME + + + + + g_list_free + + GList *g_list_free + GList *list + + Description + This function will destroy and free the resources used by + the GList structure. It will not free the resources consumed by + the data pointers in the list that is up to the application to + free. + + Usage + + GList *list; + + /* add elements and otherwise manipulate the list */ + /* once finished with the list free all elements of the list */ + /* Then free the list structure itself */ + g_list_free (list); + + + Parameters + + + GList *list + A pointer to the GList structure to free + + + + + + g_list_free_1 + + GList *g_list_free_1 + GList *list + + Description + + + Usage + + FIXME + + + + + g_list_append + + GList *g_list_append + GList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_list_preppend + + GList *g_list_preppend + GList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_list_insert + + GList *g_list_insert + GList *list + gpointer data + gint position + + Description + + + Usage + + FIXME + + + + + g_list_insert_sorted + + GList *g_list_insert_sorted + GList *list + gpointer data + GCompareFunc func + + Description + + + Usage + + FIXME + + + + + g_list_concat + + GList *g_list_concat + GList *list1 + GList *list2 + + Description + + + Usage + + FIXME + + + + + g_list_remove + + GList *g_list_remove + GList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_list_remove_link + + GList *g_list_remove_link + GList *list + GList *llink + + Description + + + Usage + + FIXME + + + + + g_list_reverse + + GList *g_list_reverse + GList *list + + Description + + + Usage + + FIXME + + + + + g_list_nth + + GList *g_list_nth + GList *list + guint n + + Description + + + Usage + + FIXME + + + + + g_list_find + + GList *g_list_find + GList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_list_find_custom + + GList *g_list_find_custom + GList *list + gpointer data + GCompareFunc func + + Description + + + Usage + + FIXME + + + + + g_list_position + + gint g_list_position + GList *list + GList *llink + + Description + + + Usage + + FIXME + + + + + g_list_index + + gint g_list_index + GList *list + gpointer data + + Description + + + Usage + + FIXME + + + + + g_list_last + + GList *g_list_last + GList *list + + Description + + + Usage + + FIXME + + + + + g_list_length + + guint g_list_length + GList *list + + Description + + + Usage + + FIXME + + + + + g_list_foreach + + void g_list_foreach + GList *list + GFunc func + gpointer user_data + + Description + + + Usage + + FIXME + + + + + g_list_nth_data + + gpointer g_list_nth_data + GList *list + guint n + + Description + + + Usage + + FIXME + + + + + g_list_previous + + GList *g_list_previous + GList *list + + Description + + + Usage + + FIXME + + + + g_list_next + + GList *g_list_next + GList *list + + Description + + + Usage + + FIXME + + + + + + diff --git a/docs/gmem.sgml b/docs/gmem.sgml new file mode 100644 index 0000000..d78ea44 --- /dev/null +++ b/docs/gmem.sgml @@ -0,0 +1,181 @@ + + + + Memory handling functions + + Memory Handling functions + + Introduction + + + + Standard memory handlers + This section describes the normal flat memory handling functions + provided by GLIB. + + g_malloc + + gpointer g_malloc + gulong size + + Description + Allocate a piece of memory and return the pointer to the + newly allocated memory. This function does not clear the memory. + + + Usage + + + + + Parameters + + + gulong size + The size of the requested piece of memory + + + + + + g_malloc0 + + gpointer g_malloc0 + gulong size + + Description + Allocate a piece of memory and, clear it, returning a + pointer to the freshly allocated piece. NULL is + returned on failure. + + Usage + + + + + Parameters + + + gulong size + The size of the requested piece of memory. + + + + + + g_realloc + + gpointer g_realloc + gpointer mem + gulong size + + Description + Change the size of a previously allocated piece of memory. + + + Usage + + + + + Parameters + + + gpointer mem + A pointer to the allocated memory + + + gulong size + The amount to change the allocation by. + + + + + + + Array memory handlers + This section will describe the array memory handling functions + provided by GLIB + + + Chunk memory handlers + Memory chunks are used to allocate pieces of memory which are always + the same size. Lists are a good example of such a data type. The memory + chunk allocates and frees blocks of memory as needed. Just be sure to + call g_mem_chunk_free and not + g_free on data allocated in a mem chunk. Calling + g_free will most likely cause a segmentation fault + somewhere that will be dificult to track down. + + The GLIB library allocates and tracks memory chunks with the opaque + data type GMemChunk. + Currently there are two types of memory chunks you can allocate and + manage with the functions documented in here. + + + G_ALLOC_ONLY + The memory chunks of this type only allocate memory. The free + operations are interpreted as a no-op Also + memory chunks of thus type save four bytes per atom. They are + also useful for lists which use the MemChunk to allocate memory + but are also part of the MemChunk implementation. + + + G_ALLOC_AND_FREE + Memory chunks of this type can allocate and free memory. + + + This section of the reference manual will detail out the functions + provided by GLIB for memory chunk handling. + + g_blow_chunks + + void g_blow_chunks + void (null) + + Description + The g_blow_chunks simply compresses all + the chunks of memory. This operation consists of freeing every + memory area that should be freed, but which we haven't gotten + around to doing yet. And, no, g_blow_chunks + doesn't following the naming scheme, but it is a much better name + then g_mem_chunk_clean_all or something + similar. + + Usage + + + + + Parameters + + + void (null) + This function takes and returns no values or aruments. + + + + + + + + + + + + + diff --git a/docs/gtimer.sgml b/docs/gtimer.sgml new file mode 100644 index 0000000..027588b --- /dev/null +++ b/docs/gtimer.sgml @@ -0,0 +1,214 @@ + + + + Timer functions + + Timer functions + + Introduction + + + + Timer functions + This section describes the timer functions that are provided by + GLIB. + + g_timer_new + + GTimer *g_timer_new + void (null) + + Description + Allocate a new timer and return the pointer to the newly + allocated timer structure. If enough resources are not available + for a new timer structure NULL will be returned. + This function will also start the timer once it has been allocated. + + + Usage + + GTimer *timer; + + timer = g_timer_new (); + + + Parameters + + + void (null) + This function takes no arguments + + + + + + g_timer_destroy + + void g_timer_destroy + GTimer *timer + + Description + This will destroy and free up the resources used by the + timer previously created with g_timer_new(). You should call this + function when your done with the timer in question. + + Usage + + GTimer *timer; + + timer = g_timer_new (); + + /* do something useful with the timer */ + + g_timer_destroy (timer); + + + Parameters + GTimer *timer + The pointer to the GTimer structre you wish to + destroy. + + + + g_timer_start + + void g_timer_start + GTimer *timer + + Description + This will re-start the previously allocated timer running. + + + Usage + + GTimer *timer; + + timer = g_timer_new (); + g_timer_stop (timer); + + /* do stuff we don't want to time */ + + g_timer_start (timer); + + /* do the stuff we want timed */ + + + + Parameters + GTimer *timer + The timer to start that has been previously allocted with + g_timer_new (); + + + + + g_timer_stop + + void g_timer_stop + GTimer *timer + + Description + This will stop a running timer. + + Usage + + GTimer *timer; + + /* allocate and start new timer */ + timer = g_timer_new (); + + /* do anything you want timed with this timer */ + + g_timer_stop (timer); /* And stop the timer at the end */ + + + Parameters + GTimer *timer + A pointer to the previously allocated timer structre to + stop. + + + + g_timer_reset + + void g_timer_reset + GTimer *timer + + Description + Reset a previously allocated timer to prepare to time + another sequence of events. + + Usage + + GTimer *timer; + + /* allocate a timer */ + timer = g_timer_new (); + + /* timed function loop or what have you */ + g_timer_stop (timer); + g_timer_reset (timer); + g_timer_start (timer); + /* loop here with a clean timer */ + + g_timer_destroy (timer); /* done with the timer */ + + + Parameters + GTimer *timer + A pointer to a previously allocated timer structure. + + + + g_timer_elapsed + + gdouble g_timer_elapsed + GTimer *timer + gulong *microseconds + + Description + Get the elapsed time between all g_timer_start() and the + g_timer_stop() function calls. The return value of this function + is in seconds and the microseconds argument + will contain the microseconds value. If you are not intrested in + the microseconds value just pass a NULL as the + second parameter. + + Usage + + GTimer *timer + gdouble seconds; + gulong microseconds; + + timer = g_timer_new (); + + /* do something that you want timed. */ + + g_timer_stop (timer); + + seconds = g_timer_elapsed (timer, \µseconds); + + g_print ("Elapsed time was %f seconds and %f microseconds\n", + seconds, microseconds); + + g_timer_destroy (timer); + + + + + + diff --git a/docs/gtree.sgml b/docs/gtree.sgml new file mode 100644 index 0000000..a04cf85 --- /dev/null +++ b/docs/gtree.sgml @@ -0,0 +1,57 @@ + + + + Balanced binary trees + + Balanced binary trees + + Introduction + + + + Binary tree functions + + + g_tree_new + + GTree *g_tree_new + GCompareFunc key_compare_func + + Description + + + Usage + + + + + Parameters + + + GCompareFunc key_compare_func + + + + + + + + Node functions + + + + \ No newline at end of file -- 2.7.4