Index: work/alien_formats/altium_parser/main.c =================================================================== --- work/alien_formats/altium_parser/main.c (revision 35274) +++ work/alien_formats/altium_parser/main.c (revision 35275) @@ -7,6 +7,7 @@ const char *fn = "A.PcbDoc"; FILE *f; altium_tree_t tree = {0}; + int res; f = fopen(fn, "r"); if (f == NULL) { @@ -13,8 +14,10 @@ fprintf(stderr, "can't open %s for read\n", fn); return -1; } + res = pcbdoc_ascii_test_parse(NULL, 0, fn, f); + fclose(f); - if (!pcbdoc_ascii_test_parse(NULL, 0, fn, f)) { + if (!res) { fprintf(stderr, "test parse says '%s' is not a PcbDoc\n", fn); return -1; }