diff options
Diffstat (limited to 'src/melon.c')
-rw-r--r-- | src/melon.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/melon.c b/src/melon.c index cba0217..62b742d 100644 --- a/src/melon.c +++ b/src/melon.c @@ -16,9 +16,6 @@ int main(int argc, char **argv, char **envp) { - printf("Melon " VERSION "." RELEASE "." PATCH EXTRA "\n"); - printf("Copyright (c) 2020, yzrh <yzrh@noema.org>\n\n"); - cnki_t *param = NULL; if (cnki_create(¶m) != 0) { @@ -83,6 +80,10 @@ main(int argc, char **argv, char **envp) return EXIT_FAILURE; } + if (param->stat > 0) + printf("Melon " VERSION "." RELEASE "." PATCH EXTRA "\n" + "Copyright (c) 2020, yzrh <yzrh@noema.org>\n\n"); + cnki_info(¶m); if (strcmp(param->file_stat->type, "%PDF") == 0) { @@ -98,7 +99,7 @@ main(int argc, char **argv, char **envp) return EXIT_FAILURE; } } else if (strcmp(param->file_stat->type, "HN") == 0) { - if (cnki_nh(¶m) != 0) { + if (cnki_hn(¶m) != 0) { fprintf(stderr, "%s: %s\n", argv[0], strerror(errno)); return EXIT_FAILURE; |