Пример #1
0
bool parse_line(char *row) {
  if(row[0]=='\0')
    return true;

  if(row[0]=='#')
    return true;

  return parse_line_file(row) ||
    parse_line_column(row) ||
    parse_line_where(row);
}
Пример #2
0
Файл: config.c Проект: XQF/xqf
static gboolean parse_line_script(char* buf, struct state_s* state) {
	switch(GPOINTER_TO_INT(state->data)) {
		case 0:
			if (!strncmp(buf, BEGIN_XQF_INFO, strlen(BEGIN_XQF_INFO)))
				state->data = GINT_TO_POINTER(1);
			return TRUE;

		case 1:
			if (!strncmp(buf, "# ", 2))
				return parse_line_file(buf+2, state);
			else if (!strncmp(buf, END_XQF_INFO, strlen(END_XQF_INFO)))
				return FALSE;
	}
	return FALSE;
}