21#include "manage_local_proto.h"
26static void format_error(
char *,
int,
char *);
65 env =
getenv(
"ELEMENT_LIST");
70 fd =
fopen(element_list,
"r");
77 while (
G_getl(buf,
sizeof(buf), fd)) {
81 if (*buf ==
' ' || *buf ==
'\t') {
83 if (
sscanf(buf,
"%[^:]:%[^\n]", elem,
desc) < 1)
88 format_error(element_list, line, buf);
98 format_error(element_list, line, buf);
131void format_error(
char *element_list,
int line,
char *buf)
133 G_fatal_error(
_(
"Format error: file ('%s') line (%d) - %s"), element_list,
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
const char * G_gisbase(void)
Get full path name of the top level module directory.
void G_strip(char *)
Removes all leading and trailing white space from string.
char * G_store(const char *)
Copy string to allocated memory.
int G_getl(char *, int, FILE *)
Gets a line of text from a file.
int M__empty(char *)
Check if element is empty.
void M__add_element(const char *, const char *)
Add element to the list.
int M_read_list(int check_if_empty, int *num)
Read list of elements.