BEGIN { n = 0; vec[0] = 0; } /^[ ]*$/ { next; } /^[ ]*[;#]/ { next; } { vec[n] = $0; n ++; } END { for (i=0;i "tests.h"; } printf("#include \"test.h\"\n") > "tests.c"; printf("#include \"tests.h\"\n") > "tests.c"; printf("const TEST * const tests[] = {\n") > "tests.c"; for (i=0;i "tests.c"; } printf("};\n") > "tests.c"; printf("const char * const test_names[] = {\n") > "tests.c"; for (i=0;i "tests.c"; } printf("};\n") > "tests.c"; printf("const int n_tests = %d;\n",n) > "tests.c"; }