From 31423d1ce9d902b988c9b38f996718c7095d4315 Mon Sep 17 00:00:00 2001 From: katherine Date: Mon, 27 May 2019 16:29:08 -0700 Subject: implement hash parsing generation --- src/gen-consts.h | 380 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 246 insertions(+), 134 deletions(-) (limited to 'src/gen-consts.h') diff --git a/src/gen-consts.h b/src/gen-consts.h index 035e3d2..e3b1b16 100644 --- a/src/gen-consts.h +++ b/src/gen-consts.h @@ -1,4 +1,4 @@ -static const char sheader[] = +static const char sheaderp1[] = "#ifndef CONFCONF_HEAD_H\n" "#define CONFCONF_HEAD_H\n" "\n" @@ -14,7 +14,7 @@ static const char sheader[] = " CONFCONF_SUCCESS = 0,\n" " CONFCONF_ERR_UNEXPECTED_EOF,\n" " CONFCONF_ERR_UNEXPECTED_TOKEN,\n" -" CONFCONF_ERR_HASH_KEY_TOO_LONG,\n" +" CONFCONF_ERR_HASH_DUPLICATE_KEY,\n" " CONFCONF_ERR_RANGE,\n" " CONFCONF_ERR_MISSING_VARIABLE,\n" " CONFCONF_ERR_MEMORY,\n" @@ -40,7 +40,7 @@ static const char sheader[] = " float f;\n" " double d;\n" " long double dl;\n" -" };\n" +" } val;\n" "};\n" "\n" "static int confconf_priv_gcp_file(void *fp)\n" @@ -111,72 +111,108 @@ static const char sheader[] = " }\n" "}\n" "\n" +; + +static const char sheaderp2[] = "static enum confconf_result_type confconf_priv_get_tok(\n" " struct confconf_priv_state *st)\n" "{\n" -" size_t len = 0, mlen = 0;\n" +" size_t len = 0, mlen = CONFCONF_ALLOCWIDTH;\n" " char *stmp;\n" " int c;\n" "\n" -" st->s = NULL;\n" +" st->val.s = NULL;\n" "\n" " c = (*(st->gcp))(st->fp);\n" "\n" " if (c == EOF)\n" " return CONFCONF_ERR_UNEXPECTED_EOF;\n" "\n" +" st->val.s = realloc(st->val.s, mlen);\n" +" if (st->val.s == NULL)\n" +" return CONFCONF_ERR_MEMORY;\n" +" st->val.s[0] = '\\0';\n" +"\n" " while (c != ' ' && c != '\\f' && c != '\\n'\n" " && c != '\\r' && c != '\\t' && c != '\\v'\n" -" && c != ']' && c != '}' && c != ','\n" +" && c != ']' && c != '}'\n" +" && c != '[' && c != '{'\n" +" && c != ',' && c != ':'\n" " && c != EOF) {\n" " if (len == mlen) {\n" " mlen += CONFCONF_ALLOCWIDTH;\n" "\n" " if (mlen < len) {\n" -" if (st->s != NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" if (st->val.s != NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " }\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" "\n" -" stmp = realloc(st->s, mlen);\n" +" stmp = realloc(st->val.s, mlen);\n" " if (stmp == NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" -" st->s = stmp;\n" +" st->val.s = stmp;\n" " }\n" "\n" -" st->s[len] = c;\n" +" st->val.s[len] = c;\n" " len++;\n" " c = (*(st->gcp))(st->fp);\n" " }\n" "\n" +" if (st->val.s[0] == '\\0') {\n" +" st->val.s[0] = c;\n" +" len++;\n" +" if (len == mlen) {\n" +" mlen += CONFCONF_ALLOCWIDTH;\n" +"\n" +" if (mlen < len) {\n" +" if (st->val.s != NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" +" }\n" +" return CONFCONF_ERR_MEMORY;\n" +" }\n" +"\n" +" stmp = realloc(st->val.s, mlen);\n" +" if (stmp == NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" +" return CONFCONF_ERR_MEMORY;\n" +" }\n" +" st->val.s = stmp;\n" +" }\n" +" st->val.s[1] = '\\0';\n" +" return CONFCONF_SUCCESS;\n" +" }\n" +"\n" " if (len == mlen) {\n" " mlen += CONFCONF_ALLOCWIDTH;\n" "\n" " if (mlen < len) {\n" -" if (st->s != NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" if (st->val.s != NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " }\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" "\n" -" stmp = realloc(st->s, mlen);\n" +" stmp = realloc(st->val.s, mlen);\n" " if (stmp == NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" -" st->s = stmp;\n" +" st->val.s = stmp;\n" " }\n" "\n" " (*(st->ugcp))(c, st->fp);\n" "\n" -" st->s[len] = '\\0';\n" +" st->val.s[len] = '\\0';\n" "\n" " st->col += len;\n" " st->byte += len;\n" @@ -184,6 +220,50 @@ static const char sheader[] = " return CONFCONF_SUCCESS;\n" "}\n" "\n" +"static enum confconf_result_type confconf_priv_get_id(\n" +" struct confconf_priv_state *st)\n" +"{\n" +" enum confconf_result_type r;\n" +" char *off;\n" +"\n" +" r = confconf_priv_get_tok(st);\n" +"\n" +" if (r != CONFCONF_SUCCESS)\n" +" return r;\n" +"\n" +" for (off = st->val.s; *off != '\\0'; off++) {\n" +" if (*off >= '0' && *off <= '9')\n" +" continue;\n" +" if (\n" +" *off == 'a' || *off == 'b' || *off == 'c' ||\n" +" *off == 'd' || *off == 'e' || *off == 'f' ||\n" +" *off == 'g' || *off == 'h' || *off == 'i' ||\n" +" *off == 'j' || *off == 'k' || *off == 'l' ||\n" +" *off == 'm' || *off == 'n' || *off == 'o' ||\n" +" *off == 'p' || *off == 'q' || *off == 'r' ||\n" +" *off == 's' || *off == 't' || *off == 'u' ||\n" +" *off == 'v' || *off == 'w' || *off == 'x' ||\n" +" *off == 'y' || *off == 'z' ||\n" +" *off == 'A' || *off == 'B' || *off == 'C' ||\n" +" *off == 'D' || *off == 'E' || *off == 'F' ||\n" +" *off == 'G' || *off == 'H' || *off == 'I' ||\n" +" *off == 'J' || *off == 'K' || *off == 'L' ||\n" +" *off == 'M' || *off == 'N' || *off == 'O' ||\n" +" *off == 'P' || *off == 'Q' || *off == 'R' ||\n" +" *off == 'S' || *off == 'T' || *off == 'U' ||\n" +" *off == 'V' || *off == 'W' || *off == 'X' ||\n" +" *off == 'Y' || *off == 'Z' ||\n" +" *off == '-' || *off == '_'\n" +" ) {\n" +" continue;\n" +" }\n" +" \n" +" return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" +" }\n" +"\n" +" return CONFCONF_SUCCESS;\n" +"}\n" +"\n" "#endif\n" "\n" ; @@ -203,7 +283,7 @@ static const char sbool[] = " if (r != CONFCONF_SUCCESS)\n" " return r;\n" "\n" -" off = st->s;\n" +" off = st->val.s;\n" "\n" " if (*off == 't' || *off == 'T') {\n" " if (\n" @@ -212,8 +292,8 @@ static const char sbool[] = " (*(++off) == 'e' || *off == 'E') &&\n" " (*(++off) == '\\0')\n" " ) {\n" -" free(st->s);\n" -" st->b = true;\n" +" free(st->val.s);\n" +" st->val.b = true;\n" " return CONFCONF_SUCCESS;\n" " } else {\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" @@ -226,8 +306,8 @@ static const char sbool[] = " (*(++off) == 's' || *off == 'S') &&\n" " (*(++off) == '\\0')\n" " ) {\n" -" free(st->s);\n" -" st->b = true;\n" +" free(st->val.s);\n" +" st->val.b = true;\n" " return CONFCONF_SUCCESS;\n" " } else {\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" @@ -239,8 +319,8 @@ static const char sbool[] = " (*(++off) == 'o' || *off == 'O') &&\n" " (*(++off) == '\\0')\n" " ) {\n" -" free(st->s);\n" -" st->b = false;\n" +" free(st->val.s);\n" +" st->val.b = false;\n" " return CONFCONF_SUCCESS;\n" " } else {\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" @@ -255,8 +335,8 @@ static const char sbool[] = " (*(++off) == 'e' || *off == 'E') &&\n" " (*(++off) == '\\0')\n" " ) {\n" -" free(st->s);\n" -" st->b = false;\n" +" free(st->val.s);\n" +" st->val.b = false;\n" " return CONFCONF_SUCCESS;\n" " } else {\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" @@ -268,8 +348,8 @@ static const char sbool[] = " (*(off+1) == 'n' || *(off+1) == 'N') &&\n" " (*(off+2) == '\\0')\n" " ) {\n" -" free(st->s);\n" -" st->b = true;\n" +" free(st->val.s);\n" +" st->val.b = true;\n" " return CONFCONF_SUCCESS;\n" " }\n" "\n" @@ -278,8 +358,8 @@ static const char sbool[] = " (*(++off) == 'f' || *off == 'F') &&\n" " (*(++off) == '\\0')\n" " ) {\n" -" free(st->s);\n" -" st->b = false;\n" +" free(st->val.s);\n" +" st->val.b = false;\n" " return CONFCONF_SUCCESS;\n" " } else {\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" @@ -305,7 +385,7 @@ static const char sstring[] = " int c, endc;\n" " bool escape = false;\n" "\n" -" st->s = NULL;\n" +" st->val.s = NULL;\n" "\n" " c = (*(st->gcp))(st->fp);\n" " if (c == EOF)\n" @@ -342,9 +422,9 @@ static const char sstring[] = " }\n" "\n" " if (c == EOF) {\n" -" if (st->s != NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" if (st->val.s != NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " }\n" " return CONFCONF_ERR_UNEXPECTED_EOF;\n" " }\n" @@ -353,23 +433,23 @@ static const char sstring[] = " mlen += CONFCONF_ALLOCWIDTH;\n" "\n" " if (mlen < len) {\n" -" if (st->s != NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" if (st->val.s != NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " }\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" "\n" -" stmp = realloc(st->s, mlen);\n" +" stmp = realloc(st->val.s, mlen);\n" " if (stmp == NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" -" st->s = stmp;\n" +" st->val.s = stmp;\n" " }\n" "\n" -" st->s[len] = c;\n" +" st->val.s[len] = c;\n" " len++;\n" " }\n" "\n" @@ -377,75 +457,23 @@ static const char sstring[] = " mlen += CONFCONF_ALLOCWIDTH;\n" "\n" " if (mlen < len) {\n" -" if (st->s != NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" if (st->val.s != NULL) {\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " }\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" "\n" -" stmp = realloc(st->s, mlen);\n" +" stmp = realloc(st->val.s, mlen);\n" " if (stmp == NULL) {\n" -" free(st->s);\n" -" st->s = NULL;\n" +" free(st->val.s);\n" +" st->val.s = NULL;\n" " return CONFCONF_ERR_MEMORY;\n" " }\n" -" st->s = stmp;\n" -" }\n" -"\n" -" st->s[len] = '\\0';\n" -" return CONFCONF_SUCCESS;\n" -"}\n" -"\n" -"#endif\n" -"\n" -; - -static const char sid[] = -"#ifndef CONFCONF_ID_H\n" -"#define CONFCONF_ID_H\n" -"\n" -"static enum confconf_result_type confconf_priv_get_id(\n" -" struct confconf_priv_state *st)\n" -"{\n" -" enum confconf_result_type r;\n" -" char *off;\n" -"\n" -" r = confconf_priv_get_tok(st);\n" -"\n" -" if (r != CONFCONF_SUCCESS)\n" -" return r;\n" -"\n" -" for (off = st->s; *off != '\\0'; off++) {\n" -" if (*off >= '0' && *off <= '9')\n" -" continue;\n" -" if (\n" -" *off == 'a' || *off == 'b' || *off == 'c' ||\n" -" *off == 'd' || *off == 'e' || *off == 'f' ||\n" -" *off == 'g' || *off == 'h' || *off == 'i' ||\n" -" *off == 'j' || *off == 'k' || *off == 'l' ||\n" -" *off == 'm' || *off == 'n' || *off == 'o' ||\n" -" *off == 'p' || *off == 'q' || *off == 'r' ||\n" -" *off == 's' || *off == 't' || *off == 'u' ||\n" -" *off == 'v' || *off == 'w' || *off == 'x' ||\n" -" *off == 'y' || *off == 'z' ||\n" -" *off == 'A' || *off == 'B' || *off == 'C' ||\n" -" *off == 'D' || *off == 'E' || *off == 'F' ||\n" -" *off == 'G' || *off == 'H' || *off == 'I' ||\n" -" *off == 'J' || *off == 'K' || *off == 'L' ||\n" -" *off == 'M' || *off == 'N' || *off == 'O' ||\n" -" *off == 'P' || *off == 'Q' || *off == 'R' ||\n" -" *off == 'S' || *off == 'T' || *off == 'U' ||\n" -" *off == 'V' || *off == 'W' || *off == 'X' ||\n" -" *off == 'Y' || *off == 'Z' ||\n" -" *off == '-' || *off == '_'\n" -" ) {\n" -" continue;\n" -" }\n" -" \n" -" return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" +" st->val.s = stmp;\n" " }\n" "\n" +" st->val.s[len] = '\\0';\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -473,7 +501,7 @@ static const char sint[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" i = strtol(st->s, &check, 0);\n" +" i = strtol(st->val.s, &check, 0);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -484,8 +512,8 @@ static const char sint[] = " if (i > INT_MAX || i < INT_MIN)\n" " return CONFCONF_ERR_RANGE;\n" "\n" -" free(st->s);\n" -" st->i = (int)i;\n" +" free(st->val.s);\n" +" st->val.i = (int)i;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -512,7 +540,7 @@ static const char sintl[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" il = strtol(st->s, &check, 0);\n" +" il = strtol(st->val.s, &check, 0);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -520,8 +548,8 @@ static const char sintl[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->il = il;\n" +" free(st->val.s);\n" +" st->val.il = il;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -548,7 +576,7 @@ static const char sintll[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" ill = strtoll(st->s, &check, 0);\n" +" ill = strtoll(st->val.s, &check, 0);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -556,8 +584,8 @@ static const char sintll[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->ill = ill;\n" +" free(st->val.s);\n" +" st->val.ill = ill;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -585,7 +613,7 @@ static const char suint[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" u = strtoul(st->s, &check, 0);\n" +" u = strtoul(st->val.s, &check, 0);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -596,8 +624,8 @@ static const char suint[] = " if (u > UINT_MAX)\n" " return CONFCONF_ERR_RANGE;\n" "\n" -" free(st->s);\n" -" st->u = (unsigned)u;\n" +" free(st->val.s);\n" +" st->val.u = (unsigned)u;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -624,7 +652,7 @@ static const char suintl[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" ul = strtoul(st->s, &check, 0);\n" +" ul = strtoul(st->val.s, &check, 0);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -632,8 +660,8 @@ static const char suintl[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->ul = ul;\n" +" free(st->val.s);\n" +" st->val.ul = ul;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -660,7 +688,7 @@ static const char suintll[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" ull = strtoull(st->s, &check, 0);\n" +" ull = strtoull(st->val.s, &check, 0);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -668,8 +696,8 @@ static const char suintll[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->ull = ull;\n" +" free(st->val.s);\n" +" st->val.ull = ull;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -696,7 +724,7 @@ static const char sfloat[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" f = strtof(st->s, &check);\n" +" f = strtof(st->val.s, &check);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -704,8 +732,8 @@ static const char sfloat[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->f = f;\n" +" free(st->val.s);\n" +" st->val.f = f;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -732,7 +760,7 @@ static const char sdouble[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" d = strtod(st->s, &check);\n" +" d = strtod(st->val.s, &check);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -740,8 +768,8 @@ static const char sdouble[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->d = d;\n" +" free(st->val.s);\n" +" st->val.d = d;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" @@ -768,7 +796,7 @@ static const char sdoublel[] = " return r;\n" "\n" " errno = EILSEQ;\n" -" dl = strtold(st->s, &check);\n" +" dl = strtold(st->val.s, &check);\n" "\n" " if (errno == ERANGE)\n" " return CONFCONF_ERR_RANGE;\n" @@ -776,11 +804,95 @@ static const char sdoublel[] = " if (*check != '\\0')\n" " return CONFCONF_ERR_UNEXPECTED_TOKEN;\n" "\n" -" free(st->s);\n" -" st->dl = dl;\n" +" free(st->val.s);\n" +" st->val.dl = dl;\n" " return CONFCONF_SUCCESS;\n" "}\n" "\n" "#endif\n" "\n" ; + +static const char shash[] = +"#ifndef CONFCONF_HASH_H\n" +"#define CONFCONF_HASH_H\n" +"\n" +"#include \n" +"\n" +"#define CONFCONF_PRIV_GET_HASH_main(h, htmp, fun, mem) \\\n" +" do { \\\n" +" int c; \\\n" +" char *hash_swp; \\\n" +" (h) = NULL; \\\n" +" c = (*(st.gcp))(st.fp); \\\n" +" if (c != '[') { \\\n" +" if (c == EOF) { \\\n" +" r = CONFCONF_ERR_UNEXPECTED_EOF; \\\n" +" st.val.s = NULL; \\\n" +" break; \\\n" +" } \\\n" +" (*(st.ugcp))(c, st.fp); \\\n" +" confconf_priv_get_tok(&st); \\\n" +" r = CONFCONF_ERR_UNEXPECTED_TOKEN; \\\n" +" } \\\n" +" st.col++; \\\n" +" st.byte++; \\\n" +" while (1) { \\\n" +" confconf_priv_eat_space(&st); \\\n" +" r = confconf_priv_get_id(&st); \\\n" +" if (r != CONFCONF_SUCCESS) \\\n" +" break; \\\n" +" HASH_FIND_STR((h), st.val.s, (htmp)); \\\n" +" if ((htmp) != NULL) { \\\n" +" r = CONFCONF_ERR_HASH_DUPLICATE_KEY; \\\n" +" break; \\\n" +" } \\\n" +" hash_swp = st.val.s; \\\n" +" confconf_priv_eat_space(&st); \\\n" +" c = (*(st.gcp))(st.fp); \\\n" +" if (c == ':') { \\\n" +" st.col++; \\\n" +" st.byte++; \\\n" +" confconf_priv_eat_space(&st); \\\n" +" } else { \\\n" +" (*(st.ugcp))(c, st.fp); \\\n" +" free(hash_swp); \\\n" +" r = confconf_priv_get_tok(&st); \\\n" +" if (r == CONFCONF_SUCCESS) \\\n" +" r = CONFCONF_ERR_UNEXPECTED_TOKEN; \\\n" +" break; \\\n" +" } \\\n" +" r = confconf_priv_get_ ## fun (&st); \\\n" +" if (r != CONFCONF_SUCCESS) { \\\n" +" free(hash_swp); \\\n" +" break; \\\n" +" } \\\n" +" (htmp) = malloc(sizeof(*(htmp))); \\\n" +" if ((htmp) == NULL) { \\\n" +" free(hash_swp); \\\n" +" r = CONFCONF_ERR_MEMORY; \\\n" +" break; \\\n" +" } \\\n" +" (htmp)->key = hash_swp; \\\n" +" (htmp)->val.mem = st.val.mem; \\\n" +" HASH_ADD_STR((h), key, (htmp)); \\\n" +" confconf_priv_eat_space(&st); \\\n" +" c = (*(st.gcp))(st.fp); \\\n" +" if (c == ',') { \\\n" +" st.col++; \\\n" +" st.byte++; \\\n" +" confconf_priv_eat_space(&st); \\\n" +" } else if (c == ']') { \\\n" +" st.col++; \\\n" +" st.byte++; \\\n" +" r = CONFCONF_SUCCESS; \\\n" +" break; \\\n" +" } else { \\\n" +" (*(st.ugcp))(c, st.fp); \\\n" +" } \\\n" +" } \\\n" +" } while (0)\n" +"\n" +"#endif\n" +"\n" +; -- cgit v1.2.3