Skip to content
Snippets Groups Projects
Commit 75b827f8 authored by Cedric Roux's avatar Cedric Roux
Browse files

don't accept spaces at end of lines in the messages' file

parent 6fa27370
Branches
Tags
No related merge requests found
...@@ -135,6 +135,11 @@ int main(int n, char **v) ...@@ -135,6 +135,11 @@ int main(int n, char **v)
get_line(in, &name, &value); get_line(in, &name, &value);
if (name == NULL) break; if (name == NULL) break;
printf("name '%s' value '%s'\n", name, value); printf("name '%s' value '%s'\n", name, value);
if (isspace(value[strlen(value)-1])) {
printf("bad value '%s' (no space at the end please!)\n", value);
unlink(out_name);
exit(1);
}
if (!strcmp(name, "ID")) { if (!strcmp(name, "ID")) {
if (!new_unique_id(value)) { unlink(out_name); exit(1); } if (!new_unique_id(value)) { unlink(out_name); exit(1); }
fprintf(out, "#define T_%s T_ID(%d)\n", value, n); fprintf(out, "#define T_%s T_ID(%d)\n", value, n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment