28 G_warning(
_(
"category information for [%s] in [%s]" 29 " missing or invalid"), name, mapset);
34 out = fopen(tempfile,
"w");
37 G_warning(
_(
"G_put_title - can't create a temp file"));
41 for (line = 0;
G_getl(buf,
sizeof buf, in); line++) {
46 fprintf(out,
"%s\n", buf);
53 G_warning(
_(
"category information for [%s] in [%s] invalid"),
58 in = fopen(tempfile,
"r");
60 G_warning(
_(
"G_put_title - can't reopen temp file"));
67 G_warning(
_(
"can't write category information for [%s] in [%s]"),
72 while (fgets(buf,
sizeof buf, in))
73 fprintf(out,
"%s", buf);
int G_getl(char *, int, FILE *)
Gets a line of text from a file.
int Rast_put_cell_title(const char *name, const char *title)
void G_strip(char *)
Removes all leading and trailing white space from string.
FILE * G_fopen_new(const char *, const char *)
Open a new database file.
char * G_tempfile(void)
Returns a temporary file name.
FILE * G_fopen_old(const char *, const char *, const char *)
Open a database file for reading.
const char * G_mapset(void)
Get current mapset name.
void G_warning(const char *,...) __attribute__((format(printf