22 static char *misc_read_line(
const char *,
const char *,
const char *);
23 static void misc_write_line(
const char *,
const char *,
const char *);
38 return misc_read_line(
"units", name, mapset);
51 misc_write_line(
"units", name, str);
67 return misc_read_line(
"vertical_datum", name, mapset);
81 misc_write_line(
"vertical_datum", name, str);
96 static char *misc_read_line(
const char *elem,
97 const char *
name,
const char *mapset)
109 G_warning(
_(
"Unable to read <%s> for raster map <%s@%s>"),
113 if (
G_getl2(buff,
sizeof(buff) - 1, fp) == 0) {
119 G_fatal_error(
_(
"Error closing <%s> metadata file for raster map <%s@%s>"),
136 static void misc_write_line(
const char *elem,
const char *
name,
const char *str)
142 G_fatal_error(
_(
"Unable to create <%s> metadata file for raster map <%s@%s>"),
145 fprintf(fp,
"%s\n", str);
148 G_fatal_error(
_(
"Error closing <%s> metadata file for raster map <%s@%s>"),
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
FILE * G_fopen_old_misc(const char *, const char *, const char *, const char *)
open a database file for reading
const char * G_find_file2_misc(const char *, const char *, const char *, const char *)
Searches for a file from the mapset search list or in a specified mapset. (look but don't touch) ...
FILE * G_fopen_new_misc(const char *, const char *, const char *)
open a new database file
const char * G_mapset(void)
Get current mapset name.
void G_warning(const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.