Miscellaneous Utility Functions
a selection of portable utility functions.
These are portable utility functions.
@Returns:
@application_name:
@Returns:
@prgname:
@variable:
@Returns:
@variable:
@value:
@overwrite:
@Returns:
@variable:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@Returns:
@file_name:
@Returns:
This function is deprecated and will be removed in the next major
release of GLib. Use g_path_get_dirname() instead.
Gets the directory components of a file name.
If the file name has no directory components "." is returned.
The returned string should be freed when no longer needed.
@Returns: the directory components of the file.
@file_name:
@Returns:
@file_name:
@Returns:
@file_name:
@Returns:
@file_name:
@Returns:
@first_element:
@Varargs:
@Returns:
@args:
@Returns:
@separator:
@first_element:
@Varargs:
@Returns:
@separator:
@args:
@Returns:
@program:
@Returns:
Find the position of the first bit set in @mask, searching from (but not
including) @nth_bit upwards. Bits are numbered from 0 (least significant)
to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the
0th bit, set @nth_bit to -1.
@mask: a #gulong containing flags.
@nth_bit: the index of the bit to start the search from.
@Returns: the index of the first bit set which is higher than @nth_bit.
Find the position of the first bit set in @mask, searching from (but not
including) @nth_bit downwards. Bits are numbered from 0 (least significant)
to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the
last bit, set @nth_bit to -1 or GLIB_SIZEOF_LONG * 8.
@mask: a #gulong containing flags.
@nth_bit: the index of the bit to start the search from.
@Returns: the index of the first bit set which is lower than @nth_bit.
Gets the number of bits used to hold @number,
e.g. if @number is 4, 3 bits are needed.
@number: a guint.
@Returns: the number of bits used to hold @number.
Gets the smallest prime number from a built-in array of primes which
is larger than @num. This is used within GLib to calculate the optimum
size of a #GHashTable.
The built-in array of primes ranges from 11 to 13845163 such that
each prime is approximately 1.5-2 times the previous prime.
@num: a #guint.
@Returns: the smallest prime number from a built-in array of primes which is
larger than @num.
@func:
@string:
@keys:
@nkeys:
@Returns:
Associates a string with a bit flag.
Used in g_parse_debug_string().
@key: the string
@value: the flag
Declares a type of function which takes no arguments and has no return value.
It is used to specify the type function passed to g_atexit().
Declares a type of function which takes an arbitrary data pointer argument
and has no return value. It is not currently used in GLib or GTK+.
@data: a data pointer.
@pbase:
@total_elems:
@size:
@compare_func:
@user_data:
@nullify_location: