<!-- ##### SECTION Title ##### -->
mate-util

<!-- ##### SECTION Short_Description ##### -->
Miscellaneous utility functions.

<!-- ##### SECTION Long_Description ##### -->
<para>
The functions in this section provide some shortcuts to finding certain file
paths. There are also some functions for manipulating environment variables for
those systems that do not have <function>getenv()</function> and similar
functions.
</para>
<note>
   <para>
   Many of the function in here are now deprecated in favour of similar
   functions in glib. The preferred replacement function in those cases is
   indicated below.
   </para>
</note>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### MACRO mate_is_program_in_path ##### -->
<para>

</para>

@program: 
@Returns: 


<!-- ##### FUNCTION g_extension_pointer ##### -->
<para>

</para>

@path: 
@Returns: 


<!-- ##### MACRO mate_util_prepend_user_home ##### -->
<para>
Prepends the home directory of the user to a filename.
</para>

@x: A relative filename in the user's home directory.
@Returns: A string containing @x with the user's home directory path prepended.
The string should be freed with g_free() when no longer required.


<!-- ##### MACRO mate_util_home_file ##### -->
<para>
Similar to mate_util_prepend_user_home(), except that "/home/fred/.mate2",
instead of just "/home/fred/" is put on the front.
</para>

@afile:  A filename relative to the user's .mate2 directory.
Returns: A string containing @afile with the user's home directory path  and
"/.mate2" prepended. The string should be freed with g_free() when no longer
required.


<!-- ##### FUNCTION mate_util_user_shell ##### -->
<para>

</para>

@void: 
@Returns: 


<!-- ##### FUNCTION mate_setenv ##### -->
<para>

</para>

@name: 
@value: 
@overwrite: 
@Returns: 


<!-- ##### FUNCTION mate_unsetenv ##### -->
<para>

</para>

@name: 


<!-- ##### FUNCTION mate_clearenv ##### -->
<para>

</para>

@void: 


<!-- ##### MACRO g_concat_dir_and_file ##### -->
<para>
Programs should use g_build_filename() instead of this function.
</para>

@dir: Directory name.
@file: Filename.
@Returns: A newly allocated string that is the concatenation of @dir and @file,
with seperators appropriate for the filesystem automatically taken care of.


<!-- ##### MACRO g_file_exists ##### -->
<para>
Programs should use g_file_test(@filename, G_FILE_TEST_EXISTS) instead of this
function.
</para>

@filename: Filename.
@Returns: Returns %TRUE if @filename exists, %FALSE otherwise.


<!-- ##### MACRO g_unix_error_string ##### -->
<para>
Programs should use g_strerror() instead of this function. Also, note that the
returned string is only valid until the next call to g_strerror() or
g_unix_error_string().
</para>

@error_num: A system error number (see C #errno documentation for more info).
@Returns: A string describing the error code.


<!-- ##### MACRO mate_util_user_home ##### -->
<para>
Programs should use g_get_home_dir() instead of this function.
</para>

@Returns: The current user's home directory.


<!-- ##### MACRO g_copy_vector ##### -->
<para>
Use g_strdupv() instead of this function.
</para>

@vec: An array of strings. %NULL terminated.
@Returns: A copy of the %NULL-terminated string array.


<!-- ##### MACRO mate_libdir_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
library directory (not the application's directory).


<!-- ##### MACRO mate_datadir_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
data directory (not the application's directory).


<!-- ##### MACRO mate_sound_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
sound files directory (not the application's directory).


<!-- ##### MACRO mate_pixmap_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
pixmap directory (not the application's directory).


<!-- ##### MACRO mate_config_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
config directory (not the application's directory).


<!-- ##### MACRO mate_unconditional_libdir_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
library directory (not the application's directory).


<!-- ##### MACRO mate_unconditional_datadir_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
data directory (not the application's directory).


<!-- ##### MACRO mate_unconditional_sound_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
sound files directory (not the application's directory).


<!-- ##### MACRO mate_unconditional_pixmap_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
pixmap directory (not the application's directory).


<!-- ##### MACRO mate_unconditional_config_file ##### -->
<para>
Programs should use mate_program_locate_file() instead of this function.
</para>

@f: Filename.
@Returns: A full path to the file @f that is stored in the system's MATE
config directory (not the application's directory).


