aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnki.c
diff options
context:
space:
mode:
authoryzrh <yzrh@noema.org>2020-12-29 02:10:17 +0000
committeryzrh <yzrh@noema.org>2020-12-29 02:10:17 +0000
commit5c5ddc926b20fae71544a8f2e2d96f15e1546c71 (patch)
treea6144bf5f9f2e45085d125e9c11575a6855821a6 /src/cnki.c
parentbcb8ef9cd96738da8474e70c03c1f2a3bdf9053a (diff)
downloadmelon-5c5ddc926b20fae71544a8f2e2d96f15e1546c71.tar.gz
melon-5c5ddc926b20fae71544a8f2e2d96f15e1546c71.tar.zst
Update HN data structure.
Diffstat (limited to 'src/cnki.c')
-rw-r--r--src/cnki.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cnki.c b/src/cnki.c
index 5b9801b..4218adb 100644
--- a/src/cnki.c
+++ b/src/cnki.c
@@ -33,7 +33,7 @@ cnki_create(cnki_t **param)
memset((*param)->file_stat, 0, sizeof(file_stat_t));
(*param)->object_outline = NULL;
- (*param)->object_nh = NULL;
+ (*param)->object_hn = NULL;
return 0;
}
@@ -46,8 +46,8 @@ cnki_destroy(cnki_t **param)
free((*param)->file_stat);
if ((*param)->object_outline != NULL)
free((*param)->object_outline);
- if ((*param)->object_nh != NULL)
- free((*param)->object_nh);
+ if ((*param)->object_hn != NULL)
+ free((*param)->object_hn);
free(*param);
}
}
@@ -59,7 +59,7 @@ cnki_info(cnki_t **param)
return 1;
if ((*param)->stat > 1)
- printf("Reading file header at %x\n", ADDRESS_HEAD);
+ printf("Reading file header at 0x%x\n", ADDRESS_HEAD);
int addr[2];
@@ -84,7 +84,7 @@ cnki_info(cnki_t **param)
}
if ((*param)->stat > 1)
- printf("Reading page count at %x\n", addr[0]);
+ printf("Reading page count at 0x%x\n", addr[0]);
fseek((*param)->fp_i, addr[0], SEEK_SET);
fread(&(*param)->file_stat->page, 4, 1, (*param)->fp_i);
@@ -94,7 +94,7 @@ cnki_info(cnki_t **param)
(*param)->file_stat->page);
if ((*param)->stat > 1)
- printf("Reading outline count at %x\n", addr[1]);
+ printf("Reading outline count at 0x%x\n", addr[1]);
fseek((*param)->fp_i, addr[1], SEEK_SET);
fread(&(*param)->file_stat->outline, 4, 1, (*param)->fp_i);