diff options
Diffstat (limited to 'src/tchdb')
-rw-r--r-- | src/tchdb/tchdb.c | 68 | ||||
-rw-r--r-- | src/tchdb/tests/tchmttest.c | 62 | ||||
-rw-r--r-- | src/tchdb/tests/tchtest.c | 68 | ||||
-rw-r--r-- | src/tchdb/tools/jbhmgr.c | 10 |
4 files changed, 104 insertions, 104 deletions
diff --git a/src/tchdb/tchdb.c b/src/tchdb/tchdb.c index b6290bc..3b7707d 100644 --- a/src/tchdb/tchdb.c +++ b/src/tchdb/tchdb.c @@ -5043,7 +5043,7 @@ static bool tchdbiternextintoxstr2(TCHDB *hdb, uint64_t *iter, TCXSTR *kxstr, TC static bool tchdboptimizeimpl(TCHDB *hdb, int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts) { assert(hdb); bool err = false; - char *tpath = tcsprintf("%s%ctmp%c%" PRIuMAX "", hdb->path, MYEXTCHR, MYEXTCHR, hdb->inode); + char *tpath = tcsprintf("%s%ctmp%c%" PRIu64 "", hdb->path, MYEXTCHR, MYEXTCHR, hdb->inode); int omode = (hdb->omode & ~HDBOCREAT) & ~HDBOTRUNC; TCHDB *thdb = tchdbnew(); thdb->dbgfd = hdb->dbgfd; @@ -5197,7 +5197,7 @@ static bool tchdbcopyimpl(TCHDB *hdb, const char *path) { } if (*path == '@') { char tsbuf[TCNUMBUFSIZ]; - sprintf(tsbuf, "%" PRIuMAX "", (uint64_t) (tctime() * 1000000)); + sprintf(tsbuf, "%" PRIu64 "", (uint64_t) (tctime() * 1000000)); const char *args[3]; args[0] = path + 1; args[1] = hdb->path; @@ -5757,19 +5757,19 @@ void tchdbprintmeta(TCHDB *hdb) { wp += sprintf(wp, " rpath=%s", hdb->rpath ? hdb->rpath : "-"); wp += sprintf(wp, " type=%02X", hdb->type); wp += sprintf(wp, " flags=%02X", hdb->flags); - wp += sprintf(wp, " bnum=%" PRIuMAX "", (uint64_t) hdb->bnum); + wp += sprintf(wp, " bnum=%" PRIu64 "", (uint64_t) hdb->bnum); wp += sprintf(wp, " apow=%u", hdb->apow); wp += sprintf(wp, " fpow=%u", hdb->fpow); wp += sprintf(wp, " opts=%u", hdb->opts); wp += sprintf(wp, " path=%s", hdb->path ? hdb->path : "-"); wp += sprintf(wp, " omode=%u", hdb->omode); - wp += sprintf(wp, " rnum=%" PRIuMAX "", (uint64_t) hdb->rnum); - wp += sprintf(wp, " fsiz=%" PRIuMAX "", (uint64_t) hdb->fsiz); - wp += sprintf(wp, " frec=%" PRIuMAX "", (uint64_t) hdb->frec); - wp += sprintf(wp, " dfcur=%" PRIuMAX "", (uint64_t) hdb->dfcur); - wp += sprintf(wp, " iter=%" PRIuMAX "", (uint64_t) hdb->iter); + wp += sprintf(wp, " rnum=%" PRIu64 "", (uint64_t) hdb->rnum); + wp += sprintf(wp, " fsiz=%" PRIu64 "", (uint64_t) hdb->fsiz); + wp += sprintf(wp, " frec=%" PRIu64 "", (uint64_t) hdb->frec); + wp += sprintf(wp, " dfcur=%" PRIu64 "", (uint64_t) hdb->dfcur); + wp += sprintf(wp, " iter=%" PRIu64 "", (uint64_t) hdb->iter); wp += sprintf(wp, " map=%p", (void *) hdb->map); - wp += sprintf(wp, " msiz=%" PRIuMAX "", (uint64_t) hdb->msiz); + wp += sprintf(wp, " msiz=%" PRIu64 "", (uint64_t) hdb->msiz); wp += sprintf(wp, " ba64=%d", hdb->ba64); wp += sprintf(wp, " align=%u", hdb->align); wp += sprintf(wp, " runit=%u", hdb->runit); @@ -5780,17 +5780,17 @@ void tchdbprintmeta(TCHDB *hdb) { wp += sprintf(wp, " fbpmis=%d", hdb->fbpmis); wp += sprintf(wp, " drpool=%p", (void *) hdb->drpool); wp += sprintf(wp, " drpdef=%p", (void *) hdb->drpdef); - wp += sprintf(wp, " drpoff=%" PRIuMAX "", (uint64_t) hdb->drpoff); + wp += sprintf(wp, " drpoff=%" PRIu64 "", (uint64_t) hdb->drpoff); wp += sprintf(wp, " recc=%p", (void *) hdb->recc); wp += sprintf(wp, " rcnum=%u", hdb->rcnum); wp += sprintf(wp, " ecode=%d", hdb->ecode); wp += sprintf(wp, " fatal=%u", hdb->fatal); - wp += sprintf(wp, " inode=%" PRIuMAX "", (uint64_t) (uint64_t) hdb->inode); - wp += sprintf(wp, " mtime=%" PRIuMAX "", (uint64_t) (uint64_t) hdb->mtime); + wp += sprintf(wp, " inode=%" PRIu64 "", (uint64_t) (uint64_t) hdb->inode); + wp += sprintf(wp, " mtime=%" PRIu64 "", (uint64_t) (uint64_t) hdb->mtime); wp += sprintf(wp, " dfunit=%u", hdb->dfunit); wp += sprintf(wp, " dfcnt=%u", hdb->dfcnt); wp += sprintf(wp, " tran=%d", hdb->tran); - wp += sprintf(wp, " walend=%" PRIuMAX "", (uint64_t) hdb->walend); + wp += sprintf(wp, " walend=%" PRIu64 "", (uint64_t) hdb->walend); #ifndef _WIN32 wp += sprintf(wp, " fd=%d", hdb->fd); wp += sprintf(wp, " walfd=%d", hdb->walfd); @@ -5798,23 +5798,23 @@ void tchdbprintmeta(TCHDB *hdb) { #endif #ifndef NDEBUG - wp += sprintf(wp, " cnt_writerec=%" PRIdMAX "", (int64_t) hdb->cnt_writerec); - wp += sprintf(wp, " cnt_reuserec=%" PRIdMAX "", (int64_t) hdb->cnt_reuserec); - wp += sprintf(wp, " cnt_moverec=%" PRIdMAX "", (int64_t) hdb->cnt_moverec); - wp += sprintf(wp, " cnt_readrec=%" PRIdMAX "", (int64_t) hdb->cnt_readrec); - wp += sprintf(wp, " cnt_searchfbp=%" PRIdMAX "", (int64_t) hdb->cnt_searchfbp); - wp += sprintf(wp, " cnt_insertfbp=%" PRIdMAX "", (int64_t) hdb->cnt_insertfbp); - wp += sprintf(wp, " cnt_splicefbp=%" PRIdMAX "", (int64_t) hdb->cnt_splicefbp); - wp += sprintf(wp, " cnt_dividefbp=%" PRIdMAX "", (int64_t) hdb->cnt_dividefbp); - wp += sprintf(wp, " cnt_mergefbp=%" PRIdMAX "", (int64_t) hdb->cnt_mergefbp); - wp += sprintf(wp, " cnt_reducefbp=%" PRIdMAX "", (int64_t) hdb->cnt_reducefbp); - wp += sprintf(wp, " cnt_appenddrp=%" PRIdMAX "", (int64_t) hdb->cnt_appenddrp); - wp += sprintf(wp, " cnt_deferdrp=%" PRIdMAX "", (int64_t) hdb->cnt_deferdrp); - wp += sprintf(wp, " cnt_flushdrp=%" PRIdMAX "", (int64_t) hdb->cnt_flushdrp); - wp += sprintf(wp, " cnt_adjrecc=%" PRIdMAX "", (int64_t) hdb->cnt_adjrecc); - wp += sprintf(wp, " cnt_defrag=%" PRIdMAX "", (int64_t) hdb->cnt_defrag); - wp += sprintf(wp, " cnt_shiftrec=%" PRIdMAX "", (int64_t) hdb->cnt_shiftrec); - wp += sprintf(wp, " cnt_trunc=%" PRIdMAX "", (int64_t) hdb->cnt_trunc); + wp += sprintf(wp, " cnt_writerec=%" PRId64 "", (int64_t) hdb->cnt_writerec); + wp += sprintf(wp, " cnt_reuserec=%" PRId64 "", (int64_t) hdb->cnt_reuserec); + wp += sprintf(wp, " cnt_moverec=%" PRId64 "", (int64_t) hdb->cnt_moverec); + wp += sprintf(wp, " cnt_readrec=%" PRId64 "", (int64_t) hdb->cnt_readrec); + wp += sprintf(wp, " cnt_searchfbp=%" PRId64 "", (int64_t) hdb->cnt_searchfbp); + wp += sprintf(wp, " cnt_insertfbp=%" PRId64 "", (int64_t) hdb->cnt_insertfbp); + wp += sprintf(wp, " cnt_splicefbp=%" PRId64 "", (int64_t) hdb->cnt_splicefbp); + wp += sprintf(wp, " cnt_dividefbp=%" PRId64 "", (int64_t) hdb->cnt_dividefbp); + wp += sprintf(wp, " cnt_mergefbp=%" PRId64 "", (int64_t) hdb->cnt_mergefbp); + wp += sprintf(wp, " cnt_reducefbp=%" PRId64 "", (int64_t) hdb->cnt_reducefbp); + wp += sprintf(wp, " cnt_appenddrp=%" PRId64 "", (int64_t) hdb->cnt_appenddrp); + wp += sprintf(wp, " cnt_deferdrp=%" PRId64 "", (int64_t) hdb->cnt_deferdrp); + wp += sprintf(wp, " cnt_flushdrp=%" PRId64 "", (int64_t) hdb->cnt_flushdrp); + wp += sprintf(wp, " cnt_adjrecc=%" PRId64 "", (int64_t) hdb->cnt_adjrecc); + wp += sprintf(wp, " cnt_defrag=%" PRId64 "", (int64_t) hdb->cnt_defrag); + wp += sprintf(wp, " cnt_shiftrec=%" PRId64 "", (int64_t) hdb->cnt_shiftrec); + wp += sprintf(wp, " cnt_trunc=%" PRId64 "", (int64_t) hdb->cnt_trunc); #endif *(wp++) = '\n'; @@ -5833,18 +5833,18 @@ void tchdbprintrec(TCHDB *hdb, TCHREC *rec) { char buf[HDBIOBUFSIZ]; char *wp = buf; wp += sprintf(wp, "REC:"); - wp += sprintf(wp, " off=%" PRIuMAX "", (uint64_t) rec->off); + wp += sprintf(wp, " off=%" PRIu64 "", (uint64_t) rec->off); wp += sprintf(wp, " rsiz=%u", rec->rsiz); wp += sprintf(wp, " magic=%02X", rec->magic); wp += sprintf(wp, " hash=%02X", rec->hash); - wp += sprintf(wp, " left=%" PRIuMAX "", (uint64_t) rec->left); - wp += sprintf(wp, " right=%" PRIuMAX "", (uint64_t) rec->right); + wp += sprintf(wp, " left=%" PRIu64 "", (uint64_t) rec->left); + wp += sprintf(wp, " right=%" PRIu64 "", (uint64_t) rec->right); wp += sprintf(wp, " ksiz=%u", rec->ksiz); wp += sprintf(wp, " vsiz=%u", rec->vsiz); wp += sprintf(wp, " psiz=%u", rec->psiz); wp += sprintf(wp, " kbuf=%p", (void *) rec->kbuf); wp += sprintf(wp, " vbuf=%p", (void *) rec->vbuf); - wp += sprintf(wp, " boff=%" PRIuMAX "", (uint64_t) rec->boff); + wp += sprintf(wp, " boff=%" PRIu64 "", (uint64_t) rec->boff); wp += sprintf(wp, " bbuf=%p", (void *) rec->bbuf); *(wp++) = '\n'; tcwrite(dbgfd, buf, wp - buf); diff --git a/src/tchdb/tests/tchmttest.c b/src/tchdb/tests/tchmttest.c index 4f5c1ef..1ebecfb 100644 --- a/src/tchdb/tests/tchmttest.c +++ b/src/tchdb/tests/tchmttest.c @@ -196,27 +196,27 @@ static void eprint(TCHDB *hdb, int line, const char *func) { /* print members of hash database */ static void mprint(TCHDB *hdb) { - iprintf("bucket number: %" PRIdMAX "\n", (int64_t) tchdbbnum(hdb)); - iprintf("used bucket number: %" PRIdMAX "\n", (int64_t) tchdbbnumused(hdb)); + iprintf("bucket number: %" PRId64 "\n", (int64_t) tchdbbnum(hdb)); + iprintf("used bucket number: %" PRId64 "\n", (int64_t) tchdbbnumused(hdb)); #ifndef NDEBUG if (hdb->cnt_writerec < 0) return; - iprintf("cnt_writerec: %" PRIdMAX "\n", (int64_t) hdb->cnt_writerec); - iprintf("cnt_reuserec: %" PRIdMAX "\n", (int64_t) hdb->cnt_reuserec); - iprintf("cnt_moverec: %" PRIdMAX "\n", (int64_t) hdb->cnt_moverec); - iprintf("cnt_readrec: %" PRIdMAX "\n", (int64_t) hdb->cnt_readrec); - iprintf("cnt_searchfbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_searchfbp); - iprintf("cnt_insertfbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_insertfbp); - iprintf("cnt_splicefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_splicefbp); - iprintf("cnt_dividefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_dividefbp); - iprintf("cnt_mergefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_mergefbp); - iprintf("cnt_reducefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_reducefbp); - iprintf("cnt_appenddrp: %" PRIdMAX "\n", (int64_t) hdb->cnt_appenddrp); - iprintf("cnt_deferdrp: %" PRIdMAX "\n", (int64_t) hdb->cnt_deferdrp); - iprintf("cnt_flushdrp: %" PRIdMAX "\n", (int64_t) hdb->cnt_flushdrp); - iprintf("cnt_adjrecc: %" PRIdMAX "\n", (int64_t) hdb->cnt_adjrecc); - iprintf("cnt_defrag: %" PRIdMAX "\n", (int64_t) hdb->cnt_defrag); - iprintf("cnt_shiftrec: %" PRIdMAX "\n", (int64_t) hdb->cnt_shiftrec); - iprintf("cnt_trunc: %" PRIdMAX "\n", (int64_t) hdb->cnt_trunc); + iprintf("cnt_writerec: %" PRId64 "\n", (int64_t) hdb->cnt_writerec); + iprintf("cnt_reuserec: %" PRId64 "\n", (int64_t) hdb->cnt_reuserec); + iprintf("cnt_moverec: %" PRId64 "\n", (int64_t) hdb->cnt_moverec); + iprintf("cnt_readrec: %" PRId64 "\n", (int64_t) hdb->cnt_readrec); + iprintf("cnt_searchfbp: %" PRId64 "\n", (int64_t) hdb->cnt_searchfbp); + iprintf("cnt_insertfbp: %" PRId64 "\n", (int64_t) hdb->cnt_insertfbp); + iprintf("cnt_splicefbp: %" PRId64 "\n", (int64_t) hdb->cnt_splicefbp); + iprintf("cnt_dividefbp: %" PRId64 "\n", (int64_t) hdb->cnt_dividefbp); + iprintf("cnt_mergefbp: %" PRId64 "\n", (int64_t) hdb->cnt_mergefbp); + iprintf("cnt_reducefbp: %" PRId64 "\n", (int64_t) hdb->cnt_reducefbp); + iprintf("cnt_appenddrp: %" PRId64 "\n", (int64_t) hdb->cnt_appenddrp); + iprintf("cnt_deferdrp: %" PRId64 "\n", (int64_t) hdb->cnt_deferdrp); + iprintf("cnt_flushdrp: %" PRId64 "\n", (int64_t) hdb->cnt_flushdrp); + iprintf("cnt_adjrecc: %" PRId64 "\n", (int64_t) hdb->cnt_adjrecc); + iprintf("cnt_defrag: %" PRId64 "\n", (int64_t) hdb->cnt_defrag); + iprintf("cnt_shiftrec: %" PRId64 "\n", (int64_t) hdb->cnt_shiftrec); + iprintf("cnt_trunc: %" PRId64 "\n", (int64_t) hdb->cnt_trunc); #endif } @@ -685,8 +685,8 @@ static int procwrite(const char *path, int tnum, int rnum, int bnum, int apow, i } } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -766,8 +766,8 @@ static int procread(const char *path, int tnum, int rcnum, int xmsiz, int dfunit } } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -845,8 +845,8 @@ static int procremove(const char *path, int tnum, int rcnum, int xmsiz, int dfun } } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -972,8 +972,8 @@ static int procwicked(const char *path, int tnum, int rnum, int opts, int omode, if (rnum % 50 > 0) iprintf(" (%08d)\n", rnum); } tcmapdel(map); - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -1059,8 +1059,8 @@ static int proctypical(const char *path, int tnum, int rnum, int bnum, int apow, } } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -1136,8 +1136,8 @@ static int procrace(const char *path, int tnum, int rnum, int bnum, int apow, in } } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { diff --git a/src/tchdb/tests/tchtest.c b/src/tchdb/tests/tchtest.c index fb9772d..b092ece 100644 --- a/src/tchdb/tests/tchtest.c +++ b/src/tchdb/tests/tchtest.c @@ -146,31 +146,31 @@ static void eprint(TCHDB *hdb, int line, const char *func) { /* print members of hash database */ static void mprint(TCHDB *hdb) { - iprintf("bucket number: %" PRIdMAX "\n", (int64_t) tchdbbnum(hdb)); - iprintf("used bucket number: %" PRIdMAX "\n", (int64_t) tchdbbnumused(hdb)); - iprintf("msiz: %" PRIdMAX "\n", hdb->msiz); - iprintf("xmsiz: %" PRIdMAX "\n", hdb->xmsiz); - iprintf("fbpnum: %" PRIdMAX "\n", hdb->fbpnum); + iprintf("bucket number: %" PRId64 "\n", (int64_t) tchdbbnum(hdb)); + iprintf("used bucket number: %" PRId64 "\n", (int64_t) tchdbbnumused(hdb)); + iprintf("msiz: %" PRId64 "\n", hdb->msiz); + iprintf("xmsiz: %" PRId64 "\n", hdb->xmsiz); + iprintf("fbpnum: %" PRId64 "\n", hdb->fbpnum); iprintf("fbpool: %p\n", hdb->fbpool); #ifndef NDEBUG if (hdb->cnt_writerec < 0) return; - iprintf("cnt_writerec: %" PRIdMAX "\n", (int64_t) hdb->cnt_writerec); - iprintf("cnt_reuserec: %" PRIdMAX "\n", (int64_t) hdb->cnt_reuserec); - iprintf("cnt_moverec: %" PRIdMAX "\n", (int64_t) hdb->cnt_moverec); - iprintf("cnt_readrec: %" PRIdMAX "\n", (int64_t) hdb->cnt_readrec); - iprintf("cnt_searchfbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_searchfbp); - iprintf("cnt_insertfbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_insertfbp); - iprintf("cnt_splicefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_splicefbp); - iprintf("cnt_dividefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_dividefbp); - iprintf("cnt_mergefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_mergefbp); - iprintf("cnt_reducefbp: %" PRIdMAX "\n", (int64_t) hdb->cnt_reducefbp); - iprintf("cnt_appenddrp: %" PRIdMAX "\n", (int64_t) hdb->cnt_appenddrp); - iprintf("cnt_deferdrp: %" PRIdMAX "\n", (int64_t) hdb->cnt_deferdrp); - iprintf("cnt_flushdrp: %" PRIdMAX "\n", (int64_t) hdb->cnt_flushdrp); - iprintf("cnt_adjrecc: %" PRIdMAX "\n", (int64_t) hdb->cnt_adjrecc); - iprintf("cnt_defrag: %" PRIdMAX "\n", (int64_t) hdb->cnt_defrag); - iprintf("cnt_shiftrec: %" PRIdMAX "\n", (int64_t) hdb->cnt_shiftrec); - iprintf("cnt_trunc: %" PRIdMAX "\n", (int64_t) hdb->cnt_trunc); + iprintf("cnt_writerec: %" PRId64 "\n", (int64_t) hdb->cnt_writerec); + iprintf("cnt_reuserec: %" PRId64 "\n", (int64_t) hdb->cnt_reuserec); + iprintf("cnt_moverec: %" PRId64 "\n", (int64_t) hdb->cnt_moverec); + iprintf("cnt_readrec: %" PRId64 "\n", (int64_t) hdb->cnt_readrec); + iprintf("cnt_searchfbp: %" PRId64 "\n", (int64_t) hdb->cnt_searchfbp); + iprintf("cnt_insertfbp: %" PRId64 "\n", (int64_t) hdb->cnt_insertfbp); + iprintf("cnt_splicefbp: %" PRId64 "\n", (int64_t) hdb->cnt_splicefbp); + iprintf("cnt_dividefbp: %" PRId64 "\n", (int64_t) hdb->cnt_dividefbp); + iprintf("cnt_mergefbp: %" PRId64 "\n", (int64_t) hdb->cnt_mergefbp); + iprintf("cnt_reducefbp: %" PRId64 "\n", (int64_t) hdb->cnt_reducefbp); + iprintf("cnt_appenddrp: %" PRId64 "\n", (int64_t) hdb->cnt_appenddrp); + iprintf("cnt_deferdrp: %" PRId64 "\n", (int64_t) hdb->cnt_deferdrp); + iprintf("cnt_flushdrp: %" PRId64 "\n", (int64_t) hdb->cnt_flushdrp); + iprintf("cnt_adjrecc: %" PRId64 "\n", (int64_t) hdb->cnt_adjrecc); + iprintf("cnt_defrag: %" PRId64 "\n", (int64_t) hdb->cnt_defrag); + iprintf("cnt_shiftrec: %" PRId64 "\n", (int64_t) hdb->cnt_shiftrec); + iprintf("cnt_trunc: %" PRId64 "\n", (int64_t) hdb->cnt_trunc); #endif } @@ -628,8 +628,8 @@ static int procwrite(const char *path, int rnum, int bnum, int apow, int fpow, if (i == rnum || i % (rnum / 10) == 0) iprintf(" (%08d)\n", i); } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -702,8 +702,8 @@ static int procread(const char *path, bool mt, int rcnum, int xmsiz, int dfunit, if (i == rnum || i % (rnum / 10) == 0) iprintf(" (%08d)\n", i); } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -763,8 +763,8 @@ static int procremove(const char *path, bool mt, int rcnum, int xmsiz, int dfuni if (i == rnum || i % (rnum / 10) == 0) iprintf(" (%08d)\n", i); } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -918,8 +918,8 @@ static int procrcat(const char *path, int rnum, int bnum, int apow, int fpow, if (i == rnum || i % (rnum / 10) == 0) iprintf(" (%08d)\n", i); } } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -1678,8 +1678,8 @@ static int procmisc(const char *path, int rnum, bool mt, int opts, int omode) { eprint(hdb, __LINE__, "tchdbforeach"); err = true; } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); if (!tchdbclose(hdb)) { @@ -2102,8 +2102,8 @@ static int procwicked(const char *path, int rnum, bool mt, int opts, int omode) eprint(hdb, __LINE__, "(validation)"); err = true; } - iprintf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - iprintf("size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + iprintf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + iprintf("size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); mprint(hdb); sysprint(); tcmapdel(map); diff --git a/src/tchdb/tools/jbhmgr.c b/src/tchdb/tools/jbhmgr.c index 7594c9d..e3e60a3 100644 --- a/src/tchdb/tools/jbhmgr.c +++ b/src/tchdb/tools/jbhmgr.c @@ -549,14 +549,14 @@ static int procinform(const char *path, int omode) { if (flags & HDBFOPEN) printf(" open"); if (flags & HDBFFATAL) printf(" fatal"); printf("\n"); - printf("bucket number: %" PRIuMAX "\n", (uint64_t) tchdbbnum(hdb)); + printf("bucket number: %" PRIu64 "\n", (uint64_t) tchdbbnum(hdb)); #ifndef NDEBUG if (hdb->cnt_writerec >= 0) - printf("used bucket number: %" PRIdMAX "\n", (int64_t) tchdbbnumused(hdb)); + printf("used bucket number: %" PRId64 "\n", (int64_t) tchdbbnumused(hdb)); #endif printf("alignment: %u\n", tchdbalign(hdb)); printf("free block pool: %u\n", tchdbfbpmax(hdb)); - printf("inode number: %" PRIdMAX "\n", (int64_t) tchdbinode(hdb)); + printf("inode number: %" PRId64 "\n", (int64_t) tchdbinode(hdb)); char date[48]; tcdatestrwww(tchdbmtime(hdb), INT_MAX, date); printf("modified time: %s\n", date); @@ -568,8 +568,8 @@ static int procinform(const char *path, int omode) { if (opts & HDBTTCBS) printf(" tcbs"); if (opts & HDBTEXCODEC) printf(" excodec"); printf("\n"); - printf("record number: %" PRIuMAX "\n", (uint64_t) tchdbrnum(hdb)); - printf("file size: %" PRIuMAX "\n", (uint64_t) tchdbfsiz(hdb)); + printf("record number: %" PRIu64 "\n", (uint64_t) tchdbrnum(hdb)); + printf("file size: %" PRIu64 "\n", (uint64_t) tchdbfsiz(hdb)); if (!tchdbclose(hdb)) { if (!err) printerr(hdb); err = true; |