version 1.4, 2019/04/08 22:47:34 |
version 1.5, 2019/04/09 15:23:51 |
Line 75 main(int argc, char *argv[]) |
|
Line 75 main(int argc, char *argv[]) |
|
|
|
if ((parser = parse_alloc(warn)) == NULL) { |
if ((parser = parse_alloc(warn)) == NULL) { |
perror(NULL); |
perror(NULL); |
return 1; |
return 6; |
} |
} |
tree = parse_file(parser, fd, fname); |
tree = parse_file(parser, fd, fname); |
rc = tree->flags & TREE_FAIL ? 1 : 0; |
rc = tree->flags & TREE_ERROR ? 3 : tree->flags & TREE_WARN ? 2 : 0; |
|
|
/* Format. */ |
/* Format. */ |
|
|
if (tree->root != NULL) { |
if (tree->root != NULL) { |
if (rc) |
if (rc > 2) |
fputc('\n', stderr); |
fputc('\n', stderr); |
ptree_print(tree); |
ptree_print(tree); |
if (rc) |
if (rc > 2) |
fputs("\nThe output may be incomplete, see the " |
fputs("\nThe output may be incomplete, see the " |
"parse error reported above.\n\n", stderr); |
"parse error reported above.\n\n", stderr); |
} |
} |
Line 95 main(int argc, char *argv[]) |
|
Line 95 main(int argc, char *argv[]) |
|
|
|
usage: |
usage: |
fprintf(stderr, "usage: %s [-W] [input_filename]\n", progname); |
fprintf(stderr, "usage: %s [-W] [input_filename]\n", progname); |
return 1; |
return 5; |
} |
} |