39static const char* adapter_str =
"adapter";
61 while (c != EOF && (
char)c !=
'\n') {
68 ods_log_error(
"[%s] read line: bracket mismatch discovered at "
69 "line %i, missing ')'", adapter_str, l&&*l?*l:0);
77 }
else if ((
char)c ==
'"' && (
char)lc !=
'\\') {
78 in_string = 1 - in_string;
81 }
else if ((
char)c ==
'(') {
85 }
else if ((
char)lc !=
'\\') {
93 }
else if ((
char)c ==
')') {
97 }
else if ((
char)lc !=
'\\') {
99 ods_log_error(
"[%s] read line: bracket mismatch "
100 "discovered at line %i, missing '('", adapter_str,
112 }
else if ((
char)c ==
';') {
116 }
else if ((
char)lc !=
'\\' && !keep_comments) {
122 }
else if ((
char)c ==
'\n' && (char)lc !=
'\\') {
140 ods_log_error(
"[%s] read line: bracket mismatch discovered at line %i,"
141 " missing ')'", adapter_str, l&&*l?*l:0);
156 int i = strlen(line), nl = 0;
161 if (line[i] ==
'\n') {
164 if (line[i] ==
' ' || line[i] ==
'\t' || line[i] ==
'\n') {
174 *line_len -= trimmed;
186 for (i = 0; i < line_len; i++) {
187 if (!isspace((
int)line[i])) {
void adutil_rtrim_line(char *line, int *line_len)
int adutil_readline_frm_file(FILE *fd, char *line, unsigned int *l, int keep_comments)
int adutil_whitespace_line(char *line, int line_len)
#define SE_ADFILE_MAXLINE