printversion() can only go to stdout now

This commit is contained in:
N1xis10t 2021-08-25 09:38:01 -06:00 committed by GitHub
parent 28854e5fc1
commit 5f95ef9a67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
main.c
View file

@ -130,9 +130,9 @@ static void printhelp(FILE *out,const char *progname)
fflush(out); fflush(out);
} }
static void printversion(FILE *out) static void printversion(void)
{ {
fprintf(out, fprintf(stdout,
"mkp224o 1.5.0\n" "mkp224o 1.5.0\n"
"Copyright (C) 2021 cathugger\n" "Copyright (C) 2021 cathugger\n"
"License public domain:\n" "License public domain:\n"
@ -144,7 +144,7 @@ static void printversion(FILE *out)
"Please visit the mkp224o home page to find additional acknowledgements:\n" "Please visit the mkp224o home page to find additional acknowledgements:\n"
"<https://github.com/cathugger/mkp224o>\n" "<https://github.com/cathugger/mkp224o>\n"
); );
fflush(out); fflush(stdout);
} }
static void e_additional(void) static void e_additional(void)
@ -279,7 +279,7 @@ int main(int argc,char **argv)
else if (!strcmp(arg,"rawyaml")) else if (!strcmp(arg,"rawyaml"))
yamlraw = 1; yamlraw = 1;
else if (!strcmp(arg,"version")) { else if (!strcmp(arg,"version")) {
printversion(stdout); printversion();
exit(0); exit(0);
} }
else { else {