GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
user_config.c File Reference

GIS Library - Routines related to user's GRASS configuration, tmp, and miscellaneous files. More...

#include <grass/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <stdint.h>
#include <stddef.h>
#include <pwd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <grass/gis.h>
Include dependency graph for user_config.c:

Go to the source code of this file.

Functions

char * G_rc_path (const char *element, const char *item)
 Returns path to element and item. More...
 

Detailed Description

GIS Library - Routines related to user's GRASS configuration, tmp, and miscellaneous files.

Functions related to the user's GRASS configuration, tmp, and miscellaneous files. Provides a set of routines for creating and accessing elements within the user's "rc" directory. The directory is in $HOME/.grass.

NOTE: As of 2001-03-25 this file is not hooked up. It is provided as a candidate for handling $HOME/.grass files and subdirectories. There may be more functionality desired (such as deletion routines, directory globs).

(C) 2001-2014 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Eric G Miller - egm2 at jps net
Date
2007-04-14

Definition in file user_config.c.

Function Documentation

◆ G_rc_path()

char* G_rc_path ( const char *  element,
const char *  item 
)

Returns path to element and item.

Either element or item can be NULL, but not both. If element is NULL, then the file is assumed to live at the top level. If file is NULL, then it is assumed the caller is not interested in the file. If the element or rc dir do not exist, they are created. However, the file is never checked for.

Parameters
[in]element
[in]item
Returns
Pointer to string path

Definition at line 288 of file user_config.c.