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
}
lib
gis
myname.c
Generated on Sat Oct 5 2013 12:11:09 for GRASS Programmer's Manual by
1.8.4