Miscellaneous Utility Functions a selection of portable utility functions. These are portable utility functions. @Returns: @application_name: Gets the name of the program. This name should NOT be localized, contrast with g_get_application_name(). (If you are using GDK or GTK+ the program name is set in gdk_init(), which is called by gtk_init(). The program name is found by taking the last component of argv[0].) @Returns: the name of the program. Sets the name of the program. This name should NOT be localized, contrast with g_set_application_name(). Note that for thread-safety reasons this function can only be called once. @prgname: the name of the program. @variable: @Returns: @variable: @value: @overwrite: @Returns: @variable: Gets the user name of the current user. @Returns: the user name of the current user. Gets the real name of the user. This usually comes from the user's entry in the passwd file. The encoding of the returned string is system defined. If the real user name cannot be determined, the string "Unknown" is returned. @Returns: the user's real name. Gets the current user's home directory. @Returns: the current user's home directory. Gets the directory to use for temporary files. This is found from inspecting the environment variables TMPDIR, TMP, and TEMP in that order. If none of those are defined "/tmp" is returned on UNIX and "C:\" on Windows. @Returns: the directory to use for temporary files. Gets the current directory. The returned string should be freed when no longer needed. @Returns: the current directory. @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. Returns %TRUE if the given @file_name is an absolute file name, i.e. it contains a full path from the root directory such as '/usr/local' on UNIX or 'C:\windows' on Windows systems. @file_name: a file name. @Returns: %TRUE if @file_name is an absolute path. Returns a pointer into @file_name after the root component, i.e. after the '/' in UNIX or 'C:\' under Windows. If @file_name is not an absolute path it returns %NULL. @file_name: a file name. @Returns: a pointer into @file_name after the root component. @file_name: @Returns: 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. @file_name: the name of the file. @Returns: the directory components of the file. @first_element: @Varargs: @Returns: @separator: @first_element: @Varargs: @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. Specifies a function to be called at normal program termination. @func: the function to call on normal program termination. Parses a string containing debugging options separated by ':' into a guint containing bit flags. This is used within GDK and GTK+ to parse the debug options passed on the command line or through environment variables. @string: a list of debug options separated by ':' or "all" to set all flags. @keys: pointer to an array of #GDebugKey which associate strings with bit flags. @nkeys: the number of #GDebugKey in the array. @Returns: the combined set of bit flags. Associates a string with a bit flag. Used in g_parse_debug_string(). @key: @value: 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: