27 G_warning(
_(
"category information for [%s] in [%s]"
28 " missing or invalid"),
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"),
name,
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]"),
name,
72 while (fgets(buf,
sizeof buf, in))
73 fprintf(out,
"%s", buf);
FILE * G_fopen_old(const char *, const char *, const char *)
Open a database file for reading.
void G_warning(const char *,...) __attribute__((format(printf
char * G_tempfile(void)
Returns a temporary file name.
const char * G_mapset(void)
Get current mapset name.
void G_strip(char *)
Removes all leading and trailing white space from string.
int G_getl(char *, int, FILE *)
Gets a line of text from a file.
FILE * G_fopen_new(const char *, const char *)
Open a new database file.
int Rast_put_cell_title(const char *name, const char *title)