## gnome-util

gnome-util

## Functions

#define | gnome_is_program_in_path()
const char * | g_extension_pointer ()
#define | gnome_util_prepend_user_home()
#define | gnome_util_home_file()
char * | gnome_util_user_shell ()
int | gnome_setenv ()
void | gnome_unsetenv ()
void | gnome_clearenv ()
#define | g_concat_dir_and_file()
#define | g_file_exists()
#define | g_unix_error_string()
#define | gnome_util_user_home
#define | g_copy_vector()
#define | gnome_libdir_file()
#define | gnome_datadir_file()
#define | gnome_sound_file()
#define | gnome_pixmap_file()
#define | gnome_config_file()
#define | gnome_unconditional_libdir_file()
#define | gnome_unconditional_datadir_file()
#define | gnome_unconditional_sound_file()
#define | gnome_unconditional_pixmap_file()
#define | gnome_unconditional_config_file()

## Includes

    #include <libgnome/libgnome.h>

## Description

## Functions

### gnome_is_program_in_path()

    #define             gnome_is_program_in_path(program)

`gnome_is_program_in_path` is deprecated and should not be used in newly-written code.

Deprecated, use g_find_program_in_path

#### Parameters

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_extension_pointer ()

    const char *
    g_extension_pointer (const char *path);

Extracts the extension from the end of a filename (the part after the final '.' in the filename).

#### Parameters

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)

### gnome_util_home_file()

    #define             gnome_util_home_file(afile)

### gnome_util_user_shell ()

    char *
    gnome_util_user_shell (void);

Retrieves the user's preferred shell.

#### Returns

A newly allocated string that is the path to the shell.

### gnome_setenv ()

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

`gnome_setenv` is deprecated and should not be used in newly-written code.

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. The semantics are the same as the glibc `setenv()` (if `setenv()` exists, it is used).

If `overwrite` is `FALSE` and the variable already exists in the environment, then `0` is returned and the value is not changed.

#### Parameters

name | An environment variable name. |
value | The value to assign to the environment variable. |
overwrite | If `TRUE`, overwrite the existing `name` variable in the environment. |

#### Returns

`0` on success, `-1` on error

`Deprecated` : 2.30: Use `g_setenv()` instead

### gnome_unsetenv ()

    void
    gnome_unsetenv (const char *name);

`gnome_unsetenv` is deprecated and should not be used in newly-written code.

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

`Deprecated` : 2.30: Use `g_unsetenv()` instead

#### Parameters

name | The environment variable to unset. |

### gnome_clearenv ()

    void
    gnome_clearenv (void);

`gnome_clearenv` is deprecated and should not be used in newly-written code.

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

`Deprecated` : 2.30

### g_concat_dir_and_file()

    #define             g_concat_dir_and_file(dir,file)

`g_concat_dir_and_file` is deprecated and should not be used in newly-written code.

### g_file_exists()

    #define             g_file_exists(filename)

`g_file_exists` is deprecated and should not be used in newly-written code.

### g_unix_error_string()

    #define             g_unix_error_string(error_num)

`g_unix_error_string` is deprecated and should not be used in newly-written code.

### gnome_util_user_home

    #define             gnome_util_user_home()

`gnome_util_user_home` is deprecated and should not be used in newly-written code.

### g_copy_vector()

    #define             g_copy_vector(vec)

`g_copy_vector` is deprecated and should not be used in newly-written code.

### gnome_libdir_file()

    #define             gnome_libdir_file(f)

`gnome_libdir_file` is deprecated and should not be used in newly-written code.

### gnome_datadir_file()

    #define             gnome_datadir_file(f)

`gnome_datadir_file` is deprecated and should not be used in newly-written code.

### gnome_sound_file()

    #define             gnome_sound_file(f)

`gnome_sound_file` is deprecated and should not be used in newly-written code.

### gnome_pixmap_file()

    #define             gnome_pixmap_file(f)

`gnome_pixmap_file` is deprecated and should not be used in newly-written code.

### gnome_config_file()

    #define             gnome_config_file(f)

`gnome_config_file` is deprecated and should not be used in newly-written code.

### gnome_unconditional_libdir_file()

    #define             gnome_unconditional_libdir_file(f)

`gnome_unconditional_libdir_file` is deprecated and should not be used in newly-written code.

### gnome_unconditional_datadir_file()

    #define             gnome_unconditional_datadir_file(f)

`gnome_unconditional_datadir_file` is deprecated and should not be used in newly-written code.

### gnome_unconditional_sound_file()

    #define             gnome_unconditional_sound_file(f)

`gnome_unconditional_sound_file` is deprecated and should not be used in newly-written code.

### gnome_unconditional_pixmap_file()

    #define             gnome_unconditional_pixmap_file(f)

`gnome_unconditional_pixmap_file` is deprecated and should not be used in newly-written code.

### gnome_unconditional_config_file()

    #define             gnome_unconditional_config_file(f)

`gnome_unconditional_config_file` is deprecated and should not be used in newly-written code.

## Types and Values