diff options
author | yzrh <yzrh@noema.org> | 2020-12-29 02:10:17 +0000 |
---|---|---|
committer | yzrh <yzrh@noema.org> | 2020-12-29 02:10:17 +0000 |
commit | 5c5ddc926b20fae71544a8f2e2d96f15e1546c71 (patch) | |
tree | a6144bf5f9f2e45085d125e9c11575a6855821a6 /src/melon.c | |
parent | bcb8ef9cd96738da8474e70c03c1f2a3bdf9053a (diff) | |
download | melon-5c5ddc926b20fae71544a8f2e2d96f15e1546c71.tar.gz melon-5c5ddc926b20fae71544a8f2e2d96f15e1546c71.tar.zst |
Update HN data structure.
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; |