GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
myname.c
Go to the documentation of this file.
1
17
#include <string.h>
18
#include <grass/gis.h>
19
#include <grass/glocale.h>
20
21
35
char
*
G_myname
(
void
)
36
{
37
static
char
name
[GNAME_MAX];
38
char
path[GPATH_MAX];
39
FILE *
fd
;
40
int
ok;
41
42
ok = 0;
43
44
G__file_name
(path,
""
,
"MYNAME"
,
"PERMANENT"
);
45
if
((fd = fopen(path,
"r"
))) {
46
ok =
G_getl
(name,
sizeof
name, fd);
47
fclose
(fd);
48
}
49
if
(!ok)
50
strcpy(name, _(
"This location has no description."
));
51
52
return
name
;
53
}
G_myname
char * G_myname(void)
Returns location title.
Definition:
myname.c:35
fd
FILE * fd
Definition:
g3dcolor.c:368
render.name
string name
Definition:
render.py:1305
G__file_name
char * G__file_name(char *path, const char *element, const char *name, const char *mapset)
Builds full path names to GIS data files.
Definition:
file_name.c:33
G_getl
int G_getl(char *buf, int n, FILE *fd)
gets a line of text from a file
Definition:
getl.c:17
fclose
fclose(fd)
lib
gis
myname.c
Generated on Mon Dec 16 2013 12:20:02 for GRASS Programmer's Manual by
1.8.5