ROOT  6.05/03
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions | Variables
gutils.h File Reference
#include <glib/gtypes.h>
#include <stdarg.h>
+ Include dependency graph for gutils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GDebugKey
 
struct  _GTrashStack
 

Macros

#define G_DIR_SEPARATOR   '/'
 
#define G_DIR_SEPARATOR_S   "/"
 
#define G_SEARCHPATH_SEPARATOR   ':'
 
#define G_SEARCHPATH_SEPARATOR_S   ":"
 
#define G_VA_COPY(ap1, ap2)   ((ap1) = (ap2))
 
#define G_CAN_INLINE   1
 
#define inline   /* don't inline, then */
 
#define G_INLINE_FUNC   extern
 
#define g_dirname   g_path_get_dirname
 
#define ATEXIT(proc)   g_ATEXIT(proc)
 
#define GLIB_CHECK_VERSION(major, minor, micro)
 

Typedefs

typedef struct _GDebugKey GDebugKey
 
typedef void(* GVoidFunc )(void)
 
typedef struct _GTrashStack GTrashStack
 

Functions

G_CONST_RETURN gcharg_get_user_name (void)
 
G_CONST_RETURN gcharg_get_real_name (void)
 
G_CONST_RETURN gcharg_get_home_dir (void)
 
G_CONST_RETURN gcharg_get_tmp_dir (void)
 
gcharg_get_prgname (void)
 
void g_set_prgname (const gchar *prgname)
 
guint g_parse_debug_string (const gchar *string, const GDebugKey *keys, guint nkeys)
 
gint g_snprintf (gchar *string, gulong n, gchar const *format,...) G_GNUC_PRINTF(3
 
gint gint g_vsnprintf (gchar *string, gulong n, gchar const *format, va_list args)
 
gboolean g_path_is_absolute (const gchar *file_name)
 
G_CONST_RETURN gcharg_path_skip_root (const gchar *file_name)
 
G_CONST_RETURN gcharg_basename (const gchar *file_name)
 
gcharg_get_current_dir (void)
 
gcharg_path_get_basename (const gchar *file_name)
 
gcharg_path_get_dirname (const gchar *file_name)
 
void g_nullify_pointer (gpointer *nullify_location)
 g_nullify_pointer: : the memory address of the pointer. More...
 
G_CONST_RETURN gcharg_getenv (const gchar *variable)
 
void g_atexit (GVoidFunc func)
 
gcharg_find_program_in_path (const gchar *program)
 g_find_program_in_path: : a program name More...
 
G_INLINE_FUNC gint g_bit_nth_lsf (gulong mask, gint nth_bit)
 
G_INLINE_FUNC gint g_bit_nth_msf (gulong mask, gint nth_bit)
 
G_INLINE_FUNC guint g_bit_storage (gulong number)
 
G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p, gpointer data_p)
 
G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p)
 
G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p)
 
G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p)
 

Variables

GLIB_VAR const guint glib_major_version
 
GLIB_VAR const guint glib_minor_version
 
GLIB_VAR const guint glib_micro_version
 
GLIB_VAR const guint glib_interface_age
 
GLIB_VAR const guint glib_binary_age
 

Macro Definition Documentation

#define ATEXIT (   proc)    g_ATEXIT(proc)

Definition at line 186 of file gutils.h.

Referenced by g_atexit().

#define G_CAN_INLINE   1

Definition at line 85 of file gutils.h.

#define G_DIR_SEPARATOR   '/'
#define G_DIR_SEPARATOR_S   "/"
#define g_dirname   g_path_get_dirname

Definition at line 159 of file gutils.h.

#define G_INLINE_FUNC   extern

Definition at line 109 of file gutils.h.

#define G_SEARCHPATH_SEPARATOR   ':'

Definition at line 51 of file gutils.h.

Referenced by g_find_program_in_path().

#define G_SEARCHPATH_SEPARATOR_S   ":"

Definition at line 52 of file gutils.h.

#define G_VA_COPY (   ap1,
  ap2 
)    ((ap1) = (ap2))

Definition at line 65 of file gutils.h.

Referenced by g_logv(), and g_strdup_vprintf().

#define GLIB_CHECK_VERSION (   major,
  minor,
  micro 
)
Value:
(GLIB_MAJOR_VERSION > (major) || \
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \
GLIB_MICRO_VERSION >= (micro)))
#define GLIB_MAJOR_VERSION
#define GLIB_MINOR_VERSION
#define GLIB_MICRO_VERSION

Definition at line 325 of file gutils.h.

#define inline   /* don't inline, then */

Definition at line 97 of file gutils.h.

Typedef Documentation

typedef struct _GDebugKey GDebugKey

Definition at line 124 of file gutils.h.

typedef struct _GTrashStack GTrashStack

Definition at line 211 of file gutils.h.

typedef void(* GVoidFunc)(void)

Definition at line 184 of file gutils.h.

Function Documentation

void g_atexit ( GVoidFunc  func)

Definition at line 118 of file gutils.c.

Referenced by gdk_init_check().

G_CONST_RETURN gchar* g_basename ( const gchar file_name)

Definition at line 469 of file gutils.c.

G_INLINE_FUNC gint g_bit_nth_lsf ( gulong  mask,
gint  nth_bit 
)
G_INLINE_FUNC gint g_bit_nth_msf ( gulong  mask,
gint  nth_bit 
)

Referenced by g_log_default_handler(), and g_logv().

G_INLINE_FUNC guint g_bit_storage ( gulong  number)

Referenced by upper_power2().

gchar* g_find_program_in_path ( const gchar program)

g_find_program_in_path: : a program name

Locates the first executable named in the user's path, in the same way that execvp() would locate it. Returns an allocated string with the absolute path name, or NULL if the program is not found in the path. If is already an absolute path, returns a copy of if exists and is executable, and NULL otherwise.

On Windows, if does not have a file type suffix, tries to append the suffixes in the PATHEXT environment variable (if that doesn't exists, the suffixes .com, .exe, and .bat) in turn, and then look for the resulting file name in the same way as CreateProcess() would. This means first in the directory where the program was loaded from, then in the current directory, then in the Windows 32-bit system directory, then in the Windows directory, and finally in the directories in the PATH environment variable. If the program is found, the return value contains the full name including the type suffix.

Return value: absolute path, or NULL

Definition at line 236 of file gutils.c.

gchar* g_get_current_dir ( void  )

Definition at line 624 of file gutils.c.

G_CONST_RETURN gchar* g_get_home_dir ( void  )

Definition at line 978 of file gutils.c.

gchar* g_get_prgname ( void  )

Definition at line 1009 of file gutils.c.

Referenced by g_log_write_prefix(), g_on_error_query(), gdk_init_check(), and gdk_window_new().

G_CONST_RETURN gchar* g_get_real_name ( void  )

Definition at line 961 of file gutils.c.

G_CONST_RETURN gchar* g_get_tmp_dir ( void  )

Definition at line 996 of file gutils.c.

Referenced by g_file_open_tmp().

G_CONST_RETURN gchar* g_get_user_name ( void  )

Definition at line 950 of file gutils.c.

G_CONST_RETURN gchar* g_getenv ( const gchar variable)

Definition at line 671 of file gutils.c.

Referenced by g_execute(), g_find_program_in_path(), g_get_any_init(), and g_log_write_prefix().

void g_nullify_pointer ( gpointer nullify_location)

g_nullify_pointer: : the memory address of the pointer.

Set the pointer at the specified location to NULL.

Definition at line 1065 of file gutils.c.

guint g_parse_debug_string ( const gchar string,
const GDebugKey keys,
guint  nkeys 
)
gchar* g_path_get_basename ( const gchar file_name)

Definition at line 488 of file gutils.c.

Referenced by g_win32_readdir().

gchar* g_path_get_dirname ( const gchar file_name)

Definition at line 602 of file gutils.c.

Referenced by g_find_program_in_path().

gboolean g_path_is_absolute ( const gchar file_name)

Definition at line 534 of file gutils.c.

Referenced by g_filename_from_uri(), g_filename_to_uri(), and g_find_program_in_path().

G_CONST_RETURN gchar* g_path_skip_root ( const gchar file_name)

Definition at line 555 of file gutils.c.

void g_set_prgname ( const gchar prgname)

Definition at line 1021 of file gutils.c.

Referenced by gdk_arg_name_cb(), and gdk_init_check().

gint g_snprintf ( gchar string,
gulong  n,
gchar const *  format,
  ... 
)
G_INLINE_FUNC guint g_trash_stack_height ( GTrashStack **  stack_p)
G_INLINE_FUNC gpointer g_trash_stack_peek ( GTrashStack **  stack_p)
G_INLINE_FUNC gpointer g_trash_stack_pop ( GTrashStack **  stack_p)

Referenced by g_queue_new().

G_INLINE_FUNC void g_trash_stack_push ( GTrashStack **  stack_p,
gpointer  data_p 
)

Referenced by g_queue_free().

gint gint g_vsnprintf ( gchar string,
gulong  n,
gchar const *  format,
va_list  args 
)

Definition at line 388 of file gutils.c.

Variable Documentation

GLIB_VAR const guint glib_binary_age

Definition at line 323 of file gutils.h.

GLIB_VAR const guint glib_interface_age

Definition at line 322 of file gutils.h.

GLIB_VAR const guint glib_major_version

Definition at line 319 of file gutils.h.

GLIB_VAR const guint glib_micro_version

Definition at line 321 of file gutils.h.

GLIB_VAR const guint glib_minor_version

Definition at line 320 of file gutils.h.