mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-06 09:26:17 +01:00
c3d01e7332
Sun Oct 25 01:24:01 CST 1998 Shawn T. Amundson <amundson@gtk.org> * Released GLib 1.1.4 * docs/Makefile.am: * docs/.cvsignore * docs/glib-config.1: * docs/glib.texi: Moved docs from gtk and created glib-config.1 from gtk-config.1 in gtk * configure.in: * Makefile.am: * sanity_check: added in docs directory, change rule 'release' to 'snapshot' and created a new 'release' rule for doing the distribution. Added in a 'sanity' rule. * NEWS: * README: * INSTALL: Updated for the release
456 lines
13 KiB
Plaintext
456 lines
13 KiB
Plaintext
\input texinfo @c -*-texinfo-*-
|
|
@c %**start of header
|
|
@setfilename glib.info
|
|
@settitle GLIB
|
|
@setchapternewpage odd
|
|
|
|
@set edition 1.0
|
|
@set update-date 3 Feburary 1998
|
|
@set update-month Feburary 1998
|
|
@c %**end of header
|
|
|
|
@ifinfo
|
|
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.
|
|
|
|
@ignore
|
|
Permission is granted to process this file throught TeX and print the
|
|
results, provided the printed document carries copying permission notice
|
|
identical to this one except for the removal of this paragraph (this
|
|
paragraph not being relevant to the printed manual).
|
|
|
|
@end ignore
|
|
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.
|
|
@end ifinfo
|
|
|
|
@titlepage
|
|
@title GLIB, Useful routines for C programming
|
|
@subtitle Version 1.0
|
|
@subtitle @value{update-month}
|
|
@author by Gregory McLean
|
|
|
|
@page
|
|
@vskip 0pt plus 1filll
|
|
Copyright @copyright{} 1998 Gregory McLean
|
|
|
|
Permission is granted to make and distribute 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.
|
|
@end titlepage
|
|
|
|
@dircategory Library of useful routines for 'C' programing
|
|
@direntry
|
|
* GLIB: (glib). useful routines for 'C' programming
|
|
@end direntry
|
|
|
|
@node Top, Copying, (dir), (dir)
|
|
@top useful routines for 'C' programming
|
|
@ifinfo
|
|
This is edition @value{edition} of the GLIB documentation,
|
|
@w{@value{update-date}}.
|
|
@end ifinfo
|
|
|
|
@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
|
|
@end menu
|
|
|
|
@node Copying, Overview, Top, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Copying
|
|
|
|
@node Overview, Doubly linked lists, Copying, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter What is GLIB
|
|
|
|
@node Doubly linked lists, Signly linked lists, Overview, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Doubly linked lists
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun GList* g_list_alloc (void)
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_list_free (GList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_list_free_1 (GList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_append (GList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_prepend (GList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_insert (GList *@var{list}, gpointer @var{data}, gint @var{position})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_insert_sorted (GList *@var{list}, gpointer @var{data}, GCompareFunc @var{func})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_concat (GList *@var{list1}, GList *@var{list2})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_remove (GList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_remove_link (GList *@var{list}, GList *@var{link})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_reverse (GList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_nth (GList *@var{list}, gint @var{n})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_find (GList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_last (GList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun GList* g_list_first (GList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun gint g_list_length (GList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_list_foreach (GList *@var{list}, GFunc @var{func}, gpointer @var{user_data})
|
|
@end deftypefun
|
|
|
|
@node Signly linked lists, List allocators, Doubly linked lists, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Signly linked lists
|
|
|
|
@subsection Functions
|
|
@deftypefun GSList* g_slist_alloc (void)
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_slist_free (GSList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_slist_free_1 (GSList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_append (GSList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_prepend (GSList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_insert (GSList *@var{list}, gpointer @var{data}, gint @var{position})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_insert_sorted (GSList *@var{list}, gpointer @var{data}, GCompareFunc @var{func})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_concat (GSList *@var{list1}, GSList *@var{list2})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_remove (GSList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_remove_link (GSList *@var{list}, GSList *@var{link})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_reverse (GSList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_nth (GSList *@var{list}, gint @var{n})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_find (GSList *@var{list}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun GSList* g_slist_last (GSList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun gint g_slist_length (GSList *@var{list})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_slist_foreach (GSList *@var{list}, GFunc @var{func}, gpointer @var{user_data})
|
|
@end deftypefun
|
|
|
|
@node List allocators, Hash tables, Signly linked lists, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter List allocators
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun GListAllocator* g_list_allocator_new (void)
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_list_allocator_free (GListAllocator *@var{allocator})
|
|
@end deftypefun
|
|
|
|
@deftypefun GListAllocator* g_slist_set_allocator (GListAllocator *@var{allocator})
|
|
@end deftypefun
|
|
|
|
@deftypefun GListAllocator* g_list_set_allocator (GListAllocator *@var{allocator})
|
|
@end deftypefun
|
|
|
|
@node Hash tables, Caches, List allocators, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Hash tables
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun GHashTable* g_hash_table_new (GHashFunc @var{hash_func}, GCompareFunc @var{key_compare_func})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_hash_table_destroy (GHashTable *@var{hash_table})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_hash_table_insert (GHashTable *@var{hash_table}, gpointer @var{key}, gpointer @var{value})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_hash_table_remove (GHashTable *@var{hash_table}, gpointer @var{key})
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_hash_table_lookup (GHashTable *@var{hash_table}, gpointer @var{key})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_hash_table_freeze (GHashTable *@var{hash_table})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_hash_table_thaw (GHashTable *@var{hash_table})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_hash_table_foreach (GHashTable *@var{hash_table}, GHFunc @var{func}, gpointer @var{user_data})
|
|
@end deftypefun
|
|
|
|
@node Caches, Trees, Hash tables, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Cache handling
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun GCache* g_cache_new (GCacheNewFunc @var{value_new_func}, GCacheDestroyFunc @var{value_destroy_func}, GCacheDupFunc @var{key_dup_func}, GCacheDestroyFunc @var{key_destroy_func}, GHashFunc @var{hash_key_func}, GHashFunc @var{hash_value_func}, GCompareFunc @var{key_compare_func})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_cache_destroy (GCache *@var{cache})
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_cache_insert (GCache *@var{cache}, gpointer @var{key})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_cache_remove (GCache *@var{cache}, gpointer @var{key})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_cache_key_foreach (GCache *@var{cache}, GHFunc @var{func}, gpointer @var{user_data})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_cache_value_foreach (GCache *@var{cache}, GHFunc @var{func}, gpointer @var{user_data})
|
|
@end deftypefun
|
|
|
|
@node Trees, Memory, Caches, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Tree handling
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun GTree* g_tree_new (GCompareFunc @var{key_compare_func})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_tree_destroy (GTree *@var{tree})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_tree_remove (GTree *@var{tree}, gpointer @var{key}, gpointer @var{value})
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_tree_lookup (GTree *@var{tree}, gpointer @var{key})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_tree_traverse (GTree *@var{tree}, GTraverseFunc @var{traverse_func}, GTraverseType @var{traverse_type}, gpointer @var{data}
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_tree_search (GTree *@var{tree}, GSearchFunc @var{search_func}, gpointer @var{data})
|
|
@end deftypefun
|
|
|
|
@deftypefun gint g_tree_height (GTree *@var{tree})
|
|
@end deftypefun
|
|
|
|
@deftypefun gint g_tree_nnodes (GTree *@var{tree})
|
|
@end deftypefun
|
|
|
|
@node Memory, Timers, Trees, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Memory handling
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun gpointer g_malloc (gulong @var{size})
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_malloc0 (gulong @var{size})
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_realloc (gpointer @var{mem}, gulong @var{size})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_profile (void)
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_check (gpointer @var{mem})
|
|
@end deftypefun
|
|
|
|
@deftypefun GMemChunk* g_mem_chunk_new (gchar *@var{name}, gint @var{atom_size}, gulong @var{area_size}, gint @var{type})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_chunk_destroy (GMemChunk *@var{mem_chunk})
|
|
@end deftypefun
|
|
|
|
@deftypefun gpointer g_mem_chunk_alloc (GMemChunk *@var{mem_chunk})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_chunk_free (GMemChunk *@var{mem_chunk}, gpointer @var{mem})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_chunk_clean (GMemChunk *@var{mem_chunk})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_chunk_reset (GMemChunk *@var{mem_chunk})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_chunk_print (GMemChunk *@var{mem_chunk})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_mem_chunk_info (void)
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_blow_chunks (void)
|
|
Not what you might be thinking, @code{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).
|
|
@end deftypefun
|
|
|
|
@node Timers, Output, Memory, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Timer functions
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun GTimer* g_timer_new (void)
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_timer_destroy (GTimer *@var{timer})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_timer_start (GTimer *@var{timer})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_timer_stop (GTimer *@var{timer})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_timer_reset (GTimer *@var{timer})
|
|
@end deftypefun
|
|
|
|
@deftypefun gdouble g_timer_elapsed (GTimer *@var{timer}, gulong *@var{microseconds})
|
|
@end deftypefun
|
|
|
|
@node Output, Utilities, Timers, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Output functions
|
|
|
|
@subsection Functions
|
|
|
|
@deftypefun void g_error (gchar *@var{format}, @dots{})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_warning (gchar *@var{format}, @dots{})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_message (gchar *@var{format}, @dots{})
|
|
@end deftypefun
|
|
|
|
@deftypefun void g_print (gchar *@var{format}, @dots{})
|
|
@end deftypefun
|
|
|
|
@node Utilities, Errors, Output, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Utility functions
|
|
|
|
@node Errors, String Chunks, Utilities, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Error handling
|
|
|
|
@node String Chunks, Strings, Errors, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter String chunks
|
|
|
|
@node Strings, Resizable arrays, String Chunks, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter String handling
|
|
|
|
@node Resizable arrays, GScanner, Strings, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Resizable arrays
|
|
|
|
@node GScanner, Miscellany, Resizable arrays, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Flexible lexical scanner
|
|
|
|
@node Miscellany, Function Index, GScanner, Top
|
|
@comment node-name, next, previous, up
|
|
@chapter Other stuff
|
|
|
|
@node Function Index, Concept Index, Miscellany, Top
|
|
@comment node-name, next, previous, up
|
|
@unnumbered Function Index
|
|
|
|
@printindex fn
|
|
|
|
@node Concept Index, , Function Index, Top
|
|
@comment node-name, next, previous, up
|
|
@unnumbered Concept Index
|
|
|
|
@printindex cp
|
|
|
|
@summarycontents
|
|
@contents
|
|
@bye
|
|
|