Commit d749afd5 authored by Camil Staps's avatar Camil Staps 🚀

Add -V option to bcgen to output ABC version number to stderr

parent 421da3d2
Pipeline #22691 passed with stages
in 18 minutes and 20 seconds
......@@ -49,7 +49,10 @@ int main (int argc, char *argv[]) {
int i;
for(i = 1; i < argc; i++) {
if(strcmp("-o", argv[i]) == 0 && i <= argc - 1) {
if (!strcmp("-V",argv[i])) {
fprintf(stderr,"%d\n",ABC_VERSION);
return 0;
} else if (!strcmp("-o",argv[i]) && i<=argc-1) {
if((output_file = fopen(argv[i + 1], "wb")) == NULL) {
fprintf(stderr, "Error: Could not open output file: %s\n", argv[i + 1]);
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment