gnome-util

Name

gnome-util -- 

Synopsis


#include <libgnome/libgnome.h>


char*       gnome_is_program_in_path        (const gchar *program);
#define     g_concat_dir_and_file           (dir,file)
const char* g_extension_pointer             (const char *path);
#define     gnome_util_prepend_user_home    (x)
#define     gnome_util_home_file            (afile)
char*       gnome_util_user_shell           (void);
int         gnome_setenv                    (const char *name,
                                             const char *value,
                                             gboolean overwrite);
void        gnome_unsetenv                  (const char *name);
void        gnome_clearenv                  (void);
#define     g_file_exists                   (filename)
#define     g_unix_error_string             (error_num)
#define     gnome_util_user_home            ()
#define     g_copy_vector                   (vec)
#define     gnome_libdir_file               (f)
#define     gnome_datadir_file              (f)
#define     gnome_sound_file                (f)
#define     gnome_pixmap_file               (f)
#define     gnome_config_file               (f)
#define     gnome_unconditional_libdir_file (f)
#define     gnome_unconditional_datadir_file(f)
#define     gnome_unconditional_sound_file  (f)
#define     gnome_unconditional_pixmap_file (f)
#define     gnome_unconditional_config_file (f)

Description

Details

gnome_is_program_in_path ()

char*       gnome_is_program_in_path        (const gchar *program);

Looks for program in the PATH, if it is found, a g_strduped string with the full path name is returned.

program : a program name.
Returns :NULL if program is not on the path or a string allocated with g_malloc with the full path name of the program found


g_concat_dir_and_file()

#define     g_concat_dir_and_file(dir,file)

dir : directory name
file : filename.
Returns :a new allocated string that is the concatenation of dir and file, takes care of the exact details for concatenating them.


g_extension_pointer ()

const char* g_extension_pointer             (const char *path);

path : a filename or file path
Returns :a pointer to the extension part of the filename, or a pointer to the end of the string if the filename does not have an extension.


gnome_util_prepend_user_home()

#define     gnome_util_prepend_user_home(x)

x : 


gnome_util_home_file()

#define     gnome_util_home_file(afile)

afile : 


gnome_util_user_shell ()

char*       gnome_util_user_shell           (void);

Returns :a newly allocated string that is the path to the user's preferred shell.


gnome_setenv ()

int         gnome_setenv                    (const char *name,
                                             const char *value,
                                             gboolean overwrite);

Adds "name=value" to the environment Note that on systems without setenv, this leaks memory so please do not use inside a loop or anything like that. semantics are the same as the glibc setenv. The overwrite flag says that existing name in the environment should be overwritten.

name : 
value : 
overwrite : 
Returns : 0 on success -1 on error


gnome_unsetenv ()

void        gnome_unsetenv                  (const char *name);

Removes name from the environment. In case there is no native implementation of unsetenv, this could cause leaks depending on the implementation of enviroment.

name : 


gnome_clearenv ()

void        gnome_clearenv                  (void);

Clears out the environment completely. In case there is no native implementation of clearenv, this could cause leaks depending on the implementation of enviroment.


g_file_exists()

#define     g_file_exists(filename)

filename : 


g_unix_error_string()

#define     g_unix_error_string(error_num)

error_num : 


gnome_util_user_home()

#define     gnome_util_user_home()


g_copy_vector()

#define     g_copy_vector(vec)

vec : an array of strings. NULL terminated


gnome_libdir_file()

#define     gnome_libdir_file(f)

f : 


gnome_datadir_file()

#define     gnome_datadir_file(f)

f : 


gnome_sound_file()

#define     gnome_sound_file(f)

f : 


gnome_pixmap_file()

#define     gnome_pixmap_file(f)

f : 


gnome_config_file()

#define     gnome_config_file(f)

f : 


gnome_unconditional_libdir_file()

#define     gnome_unconditional_libdir_file(f)

f : 


gnome_unconditional_datadir_file()

#define     gnome_unconditional_datadir_file(f)

f : 


gnome_unconditional_sound_file()

#define     gnome_unconditional_sound_file(f)

f : 


gnome_unconditional_pixmap_file()

#define     gnome_unconditional_pixmap_file(f)

f : 


gnome_unconditional_config_file()

#define     gnome_unconditional_config_file(f)

f :