|
@@ -136,9 +136,7 @@ int parse_res(char *in, char *out, char *outs) {
|
|
|
#ifndef _RESPONSE_H\n\
|
|
#ifndef _RESPONSE_H\n\
|
|
|
#define _RESPONSE_H\n\
|
|
#define _RESPONSE_H\n\
|
|
|
\n\
|
|
\n\
|
|
|
-char *response(int);\n\
|
|
|
|
|
-void init_responses();\n\n\
|
|
|
|
|
-enum {\n");
|
|
|
|
|
|
|
+typedef enum {\n");
|
|
|
|
|
|
|
|
fprintf(outsf, "/* DO NOT EDIT THIS FILE. */\n\
|
|
fprintf(outsf, "/* DO NOT EDIT THIS FILE. */\n\
|
|
|
#ifndef _RESPONSES_H\n\
|
|
#ifndef _RESPONSES_H\n\
|
|
@@ -174,7 +172,8 @@ typedef char * res_t;\n\n");
|
|
|
fprintf(outsf, "static res_t res_%s[] = {\n", cmd);
|
|
fprintf(outsf, "static res_t res_%s[] = {\n", cmd);
|
|
|
sprintf(lower_resps, "%s,\n\tres_%s", lower_resps, cmd);
|
|
sprintf(lower_resps, "%s,\n\tres_%s", lower_resps, cmd);
|
|
|
} else { /* END */
|
|
} else { /* END */
|
|
|
- fprintf(outf, "\tRES_END\n};\n\n#define RES_TYPES %d\n\n#endif /* !_RESPONSE_H */\n", total_responses);
|
|
|
|
|
|
|
+ fprintf(outf, "\tRES_END\n} response_t;\n\n#define RES_TYPES %d\n", total_responses);
|
|
|
|
|
+ fprintf(outf, "char *response(response_t);\nvoid init_responses();\n\n#endif /* !_RESPONSE_H */\n");
|
|
|
fprintf(outsf, "static res_t *res[] = {\n\tNULL%s\n};\n#endif /* !_RESPONSES_H */\n", lower_resps);
|
|
fprintf(outsf, "static res_t *res[] = {\n\tNULL%s\n};\n#endif /* !_RESPONSES_H */\n", lower_resps);
|
|
|
}
|
|
}
|
|
|
} else { /* NEXT RES TEXT */
|
|
} else { /* NEXT RES TEXT */
|