diff --git a/Makefile b/Makefile index f092209..7cedc8f 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ bin/line_check: bin/line_check.c $(CC) -O3 bin/line_check.c -o bin/line_check bin/get_argument_list: bin/get_argument_list.c - $(CC) -O3 -g bin/get_argument_list.c $(JSON_C_LDFLAGS) $(JSON_C_CFLAGS) -o bin/get_argument_list + $(CC) -O3 -g --std=gnu17 bin/get_argument_list.c $(JSON_C_LDFLAGS) $(JSON_C_CFLAGS) -o bin/get_argument_list bin/get_path_type: bin/get_path_type.c $(CC) -O3 -g bin/get_path_type.c $(JSON_C_LDFLAGS) $(JSON_C_CFLAGS) -o bin/get_path_type diff --git a/bin/construct_endpoint.c b/bin/construct_endpoint.c index a896b22..7234b4a 100644 --- a/bin/construct_endpoint.c +++ b/bin/construct_endpoint.c @@ -6,21 +6,24 @@ int main(int ac, char **av) { int buf_i; char *componant_name = av[1]; - + char *brk; again: - char *brk = strchr(componant_name, '{'); - if (!brk) { - printf("\tosc_str_append_string(&e->endpoint, \"%s\");\n", componant_name); - return 0; - } + { + brk = strchr(componant_name, '{'); + if (!brk) { + printf("\tosc_str_append_string(&e->endpoint, \"%s\");\n", componant_name); + return 0; + } - *brk = 0; - printf("\tosc_str_append_string(&e->endpoint, \"%s\");\n", componant_name); + *brk = 0; + printf("\tosc_str_append_string(&e->endpoint, \"%s\");\n", componant_name); - printf("\tosc_str_append_string(&e->endpoint, e->"); - for (++brk; *brk != '}'; ++brk) - putchar(*brk); - puts(");"); - componant_name = brk + 1; - goto again; + printf("\tosc_str_append_string(&e->endpoint, e->"); + for (++brk; *brk != '}'; ++brk) + putchar(*brk); + puts(");"); + componant_name = brk + 1; + goto again; + } + return 0; }