Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: indexdata/idzebra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.4
Choose a base ref
...
head repository: indexdata/idzebra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jun 6, 2022

  1. Testing dict_insert

    adamdickmeiss committed Jun 6, 2022
    Copy the full SHA
    fc93e54 View commit details

Commits on Jun 21, 2022

  1. Copy the full SHA
    1b807ff View commit details
  2. dict: split_page choose combined longest string

    Rather than number of entries - which could be 1.
    adamdickmeiss committed Jun 21, 2022
    Copy the full SHA
    5653b59 View commit details
  3. Copy the full SHA
    a261536 View commit details

Commits on Jun 22, 2022

  1. inserttest is a test

    adamdickmeiss committed Jun 22, 2022
    Copy the full SHA
    31f9e25 View commit details
  2. expand tabs to spaces

    adamdickmeiss committed Jun 22, 2022
    Copy the full SHA
    4023430 View commit details
  3. centos7, centos8 back

    adamdickmeiss committed Jun 22, 2022
    Copy the full SHA
    b920eca View commit details
  4. Copy the full SHA
    9b6ef86 View commit details
  5. Version 2.2.5

    adamdickmeiss committed Jun 22, 2022
    Copy the full SHA
    bf867d2 View commit details

Commits on Aug 18, 2022

  1. Only Ubuntu LTS

    adamdickmeiss committed Aug 18, 2022
    Copy the full SHA
    c5197c7 View commit details

Commits on Oct 8, 2022

  1. Update m4

    adamdickmeiss committed Oct 8, 2022
    Copy the full SHA
    bd913c1 View commit details

Commits on Oct 14, 2022

  1. Copy the full SHA
    c5a47a8 View commit details

Commits on Nov 1, 2022

  1. Call zebra_stop on termination signal (#38)

    This ensures saved results sets are removed when terminated.
    adamdickmeiss authored Nov 1, 2022
    Copy the full SHA
    5b97fb6 View commit details

Commits on Nov 7, 2022

  1. Copy the full SHA
    0182262 View commit details

Commits on Nov 10, 2022

  1. Copy the full SHA
    f38a93b View commit details

Commits on Nov 21, 2022

  1. apt update (#41)

    adamdickmeiss authored Nov 21, 2022
    Copy the full SHA
    cdfad82 View commit details

Commits on Dec 2, 2022

  1. Copy the full SHA
    4d3e1ec View commit details

Commits on Dec 14, 2022

  1. No Debian jessie

    adamdickmeiss committed Dec 14, 2022
    Copy the full SHA
    2700e24 View commit details
  2. Version 2.2.6

    adamdickmeiss committed Dec 14, 2022
    Copy the full SHA
    4fd948d View commit details
  3. Merge pull request #45 from indexdata/release-2-2-6

    Release 2.2.6
    adamdickmeiss authored Dec 14, 2022
    Copy the full SHA
    d1ce4f0 View commit details

Commits on Dec 15, 2022

  1. Buffer overflow fixes and reformats (#47)

    Fix buffer overflow #44 and avoid sprintf.
    adamdickmeiss authored Dec 15, 2022
    Copy the full SHA
    71725dc View commit details

Commits on Dec 27, 2022

  1. Fix tcl not enabled (#48)

    The config definition HAVE_TCL_H was never set to 1
    after commit 162763e even
    if Tcl development libs were found.
    adamdickmeiss authored Dec 27, 2022
    Copy the full SHA
    f008d9a View commit details

Commits on Jan 8, 2023

  1. Copy the full SHA
    6cf93ff View commit details
  2. Happy new year (#49)

    adamdickmeiss authored Jan 8, 2023
    Copy the full SHA
    6c34b1b View commit details

Commits on Jan 13, 2023

  1. Copy the full SHA
    0b3daba View commit details
  2. Use Expat 2.5.0

    adamdickmeiss committed Jan 13, 2023
    Copy the full SHA
    d6e1aca View commit details
  3. Copy the full SHA
    14be092 View commit details
  4. Merge pull request #51 from indexdata/update-for-moved-yaz-include-lo…

    …cation
    
    Update for moved yaz include location
    adamdickmeiss authored Jan 13, 2023
    Copy the full SHA
    8167958 View commit details
  5. Version 2.2.7

    adamdickmeiss committed Jan 13, 2023
    Copy the full SHA
    ac40f28 View commit details
  6. Merge pull request #52 from indexdata/release-2-2-7

    Version 2.2.7
    adamdickmeiss authored Jan 13, 2023
    Copy the full SHA
    b0415aa View commit details

Commits on Jan 14, 2023

  1. Fix tests failing when running with make -j4 check (#53)

    Fixed by creating separate .mf files.
    adamdickmeiss authored Jan 14, 2023
    Copy the full SHA
    f89d18c View commit details

Commits on Feb 12, 2024

  1. Copy the full SHA
    0620993 View commit details
  2. Merge pull request #55 from indexdata/DEVOPS-2662-upgrade-actions

    DEVOPS-2662 upgrade github actions
    dcrossleyau authored Feb 12, 2024
    Copy the full SHA
    283fecb View commit details

Commits on Oct 22, 2024

  1. Fix implicit atoi import

    jakub-id committed Oct 22, 2024
    Copy the full SHA
    62bff2e View commit details
  2. Merge pull request #60 from indexdata/fix-stdlib-import

    Fix implicit atoi import
    jakub-id authored Oct 22, 2024
    Copy the full SHA
    35f3792 View commit details
  3. Version 2.2.8

    jakub-id committed Oct 22, 2024
    Copy the full SHA
    6d8a281 View commit details
  4. Copy the full SHA
    84def7b View commit details
  5. Copy the full SHA
    56ed67b View commit details
  6. Merge pull request #61 from indexdata/version-2-2-8

    Version 2.2.8
    jakub-id authored Oct 22, 2024
    Copy the full SHA
    1439c55 View commit details

Commits on Feb 17, 2025

  1. Copy the full SHA
    dfd386f View commit details

Commits on Feb 18, 2025

  1. Copy the full SHA
    40adf1b View commit details
  2. inkscape

    adamdickmeiss committed Feb 18, 2025
    Copy the full SHA
    951bede View commit details
  3. Just fork as usual

    adamdickmeiss committed Feb 18, 2025
    Copy the full SHA
    9f2461d View commit details
  4. No writes to storage

    adamdickmeiss committed Feb 18, 2025
    Copy the full SHA
    6b85ad1 View commit details
  5. Update m4 (#66)

    adamdickmeiss authored Feb 18, 2025
    Copy the full SHA
    84b5712 View commit details
  6. Copy the full SHA
    a050458 View commit details
  7. Merge pull request #65 from indexdata/docker-file-for-zebra-indexdata…

    …-com
    
    Dockerfile for zebra indexdata com
    funkymalc authored Feb 18, 2025
    Copy the full SHA
    cdedc7e View commit details

Commits on Feb 20, 2025

  1. doc: Use rsvg-convert rather than inkscape (#67)

    inkscape is a rather heavy package.
    adamdickmeiss authored Feb 20, 2025
    Copy the full SHA
    e25f764 View commit details
  2. Copy the full SHA
    8993388 View commit details
Showing with 11,606 additions and 12,473 deletions.
  1. +40 −0 .github/workflows/build-idzebra.yaml
  2. +0 −54 .travis.yml
  3. +20 −0 .vscode/c_cpp_properties.json
  4. +3 −0 .vscode/settings.json
  5. +4 −4 IDMETA
  6. +21 −0 NEWS
  7. +1 −1 README.md
  8. +16 −16 bfile/bfile.c
  9. +8 −7 bfile/cfile.c
  10. +2 −2 bfile/commit.c
  11. +233 −233 bfile/mfile.c
  12. +1 −1 bfile/mfile.h
  13. +58 −55 bfile/tstbfile2.c
  14. +2 −2 buildconf.sh
  15. +11 −10 configure.ac
  16. +627 −628 data1/d1_absyn.c
  17. +95 −95 data1/d1_attset.c
  18. +178 −178 data1/d1_doespec.c
  19. +226 −226 data1/d1_espec.c
  20. +740 −737 data1/d1_expout.c
  21. +91 −91 data1/d1_grs.c
  22. +30 −34 data1/d1_handle.c
  23. +185 −187 data1/d1_map.c
  24. +258 −257 data1/d1_marc.c
  25. +53 −53 data1/d1_prtree.c
  26. +487 −517 data1/d1_read.c
  27. +38 −42 data1/d1_soif.c
  28. +36 −35 data1/d1_sumout.c
  29. +86 −91 data1/d1_sutrs.c
  30. +157 −157 data1/d1_tagset.c
  31. +19 −53 data1/d1_utils.c
  32. +91 −91 data1/d1_varset.c
  33. +82 −82 data1/d1_write.c
  34. +2 −0 debian/rules
  35. +28 −26 dfa/dfa.c
  36. +1 −1 dfa/lexer.c
  37. +1 −0 dict/.gitignore
  38. +3 −2 dict/Makefile.am
  39. +1 −1 dict/close.c
  40. +31 −31 dict/dcompact.c
  41. +79 −79 dict/delete.c
  42. +1 −1 dict/dict-p.h
  43. +42 −41 dict/dicttest.c
  44. +2 −2 dict/dopen.c
  45. +30 −30 dict/drdwr.c
  46. +69 −67 dict/insert.c
  47. +106 −0 dict/inserttest.c
  48. +1 −1 dict/lookgrep.c
  49. +7 −7 dict/open.c
  50. +25 −25 dict/scan.c
  51. +50 −49 dict/scantest.c
  52. +3 −5 doc/Makefile.am
  53. +1 −1 doc/entities.ent
  54. +51 −0 examples/Dockerfile
  55. +1 −1 examples/gils/zebra.cfg
  56. +3 −0 idzebra.spec
  57. +3 −3 include/charmap.h
  58. +40 −40 include/idzebra/api.h
  59. +2 −2 include/idzebra/bfile.h
  60. +132 −125 include/idzebra/data1.h
  61. +1 −1 include/idzebra/isamc.h
  62. +1 −1 include/idzebra/isams.h
  63. +7 −7 include/idzebra/recctrl.h
  64. +2 −2 include/idzebra/recgrs.h
  65. +1 −1 include/idzebra/res.h
  66. +4 −4 include/idzebra/snippet.h
  67. +12 −12 include/rset.h
  68. +1 −1 include/zebramap.h
  69. +0 −1 index/.gitignore
  70. +1 −4 index/Makefile.am
  71. +7 −7 index/attribute.c
  72. +2 −2 index/dir.c
  73. +12 −11 index/dirs.c
  74. +327 −326 index/extract.c
  75. +25 −24 index/index.h
  76. +59 −59 index/inline.c
  77. +34 −34 index/invstat.c
  78. +7 −7 index/kcontrol.c
  79. +22 −22 index/kdump.c
  80. +9 −7 index/key_block.c
  81. +80 −85 index/kinput.c
  82. +27 −27 index/limit.c
  83. +149 −149 index/marcomp.c
  84. +12 −12 index/marcomp.h
  85. +202 −201 index/mod_alvis.c
  86. +17 −17 index/mod_dom.c
  87. +379 −378 index/mod_grs_marc.c
  88. +455 −454 index/mod_grs_regx.c
  89. +7 −7 index/mod_grs_sgml.c
  90. +94 −102 index/mod_grs_xml.c
  91. +40 −37 index/mod_safari.c
  92. +36 −33 index/mod_text.c
  93. +2 −2 index/orddict.c
  94. +2 −2 index/orddict.h
  95. +4 −4 index/rank.h
  96. +20 −20 index/rank1.c
  97. +1 −1 index/ranksimilarity.c
  98. +19 −19 index/rankstatic.c
  99. +63 −63 index/recctrl.c
  100. +451 −460 index/recgrs.c
  101. +1 −1 index/recindex.c
  102. +49 −49 index/reckeys.c
  103. +5 −5 index/reckeys.h
  104. +216 −215 index/records.c
  105. +2 −2 index/retrieve.c
  106. +26 −25 index/rpnscan.c
  107. +405 −441 index/rpnsearch.c
  108. +1 −1 index/rset_isam.c
  109. +14 −13 index/sortidx.c
  110. +35 −35 index/trunc.c
  111. +9 −30 index/update_file.c
  112. +5 −5 index/update_path.c
  113. +7 −7 index/zaptterm.c
  114. +399 −398 index/zebraapi.c
  115. +65 −64 index/zebraidx.c
  116. +0 −876 index/zebrash.c
  117. +260 −257 index/zebrasrv.c
  118. +521 −522 index/zinfo.c
  119. +7 −14 index/zinfo.h
  120. +261 −261 index/zsets.c
  121. +5 −5 isamb/benchindex1.c
  122. +7 −7 isamb/benchisamb.c
  123. +321 −319 isamb/isamb.c
  124. +152 −152 isamb/tstisamb.c
  125. +125 −124 isamc/isamc.c
  126. +32 −32 isamc/merge.c
  127. +62 −62 isams/isams.c
  128. +1 −1 m4
  129. +3 −3 rset/rsbetween.c
  130. +5 −5 rset/rsbool.c
  131. +90 −90 rset/rset.c
  132. +7 −7 rset/rsisamb.c
  133. +2 −2 rset/rsisamc.c
  134. +2 −2 rset/rsisams.c
  135. +30 −30 rset/rsmultiandor.c
  136. +1 −1 rset/rsprox.c
  137. +19 −16 rset/rstemp.c
  138. +1 −1 test/Makefile.am
  139. +7 −6 test/api/Makefile.am
  140. +22 −22 test/api/test_create_databases.c
  141. +2 −2 test/api/test_icu_indexing.c
  142. +40 −40 test/api/test_insert_fetch.c
  143. +2 −2 test/api/test_rank.c
  144. +17 −17 test/api/test_resources.c
  145. +24 −24 test/api/test_result_sets.c
  146. +52 −52 test/api/test_scan.c
  147. +5 −5 test/api/test_search.c
  148. +6 −0 test/api/test_sort1.c
  149. +5 −5 test/api/test_sort_set.c
  150. +39 −37 test/api/test_trunc.c
  151. +2 −2 test/api/test_update_record.c
  152. +29 −29 test/api/test_zebra_fork.c
  153. +14 −14 test/api/testclient.c
  154. +91 −82 test/api/testlib.c
  155. +9 −6 test/api/testlib.h
  156. +2 −2 test/charmap/charmap1.c
  157. +97 −97 test/codec/tstcodec.c
  158. +1 −1 test/espec/t1.c
  159. +2 −2 test/filters/grs.marc.c
  160. +2 −2 test/filters/grs.xml.c
  161. +2 −2 test/filters/grs.xml.idzebra.c
  162. +3 −3 test/filters/text.c
  163. +3 −3 test/marcxml/Makefile.am
  164. +7 −7 test/marcxml/t1.c
  165. +5 −5 test/marcxml/t2.c
  166. +5 −7 test/mbox/mbox1.c
  167. +4 −3 test/rusmarc/t1.c
  168. +3 −3 test/xpath/Makefile.am
  169. +6 −6 test/xpath/xpath6.c
  170. +4 −7 test/xslt/dom1.c
  171. +4 −7 test/xslt/xslt1.c
  172. +9 −13 test/xslt/xslt2.c
  173. +9 −13 test/xslt/xslt3.c
  174. +9 −13 test/xslt/xslt4.c
  175. +4 −7 test/xslt/xslt5.c
  176. +0 −3 test/zsh/.gitignore
  177. +0 −21 test/zsh/Makefile.am
  178. +0 −10 test/zsh/test1.zsh
  179. +0 −8 test/zsh/test2.zsh
  180. +0 −10 test/zsh/zebra.cfg
  181. +1 −1 util/atoi_zn.c
  182. +1 −1 util/attrfind.c
  183. +300 −300 util/charmap.c
  184. +10 −21 util/flock.c
  185. +53 −52 util/it_key.c
  186. +41 −41 util/passwddb.c
  187. +89 −89 util/res.c
  188. +96 −96 util/snippet.c
  189. +7 −7 util/su_codec.c
  190. +8 −8 util/tstcharmap.c
  191. +6 −6 util/xpath.c
  192. +13 −13 util/zebra-lock.c
  193. +67 −66 util/zebramap.c
  194. +1 −1 util/zint.c
  195. +4 −5 win/makefile
  196. +1 −1 win/zebra.rc
40 changes: 40 additions & 0 deletions .github/workflows/build-idzebra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Build idzebra
name: Build idzebra
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: clone yaz
uses: actions/checkout@v4
with:
repository: indexdata/yaz
path: yaz
ref: master
- name: Update packages
run: sudo apt update
- name: Install required and optional dependencies
run: >
sudo apt install autoconf automake libtool gcc make bison
tclsh xsltproc docbook docbook-xml docbook-xsl librsvg2-bin
libexpat1-dev libbz2-dev tcl-dev zlib1g-dev
pkg-config libxslt1-dev libgnutls28-dev libicu-dev
- name: Run buildconf for YAZ
run: cd yaz && ./buildconf.sh
- name: Run configure for YAZ
run: >
cd yaz && ./configure --disable-shared --enable-static
- name: Run make for YAZ
run: cd yaz && make -j4
- name: Run buildconf for idzebra
run: ./buildconf.sh
- name: Run configure for idzebra
run: >
./configure --with-yaz=yaz --disable-shared --enable-static
- name: Run make check for idzebra
run: make -j4 check
- name: Run make dist for idzebra
run: make dist
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${default}",
"${workspaceFolder}/include",
"/usr/include/libxml2"
],
"defines": [
"HAVE_CONFIG_H=1"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c89",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"files.trimTrailingWhitespace": true
}
8 changes: 4 additions & 4 deletions IDMETA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEBIAN_DIST="bullseye buster stretch jessie"
UBUNTU_DIST="jammy impish hirsute focal bionic xenial trusty"
CENTOS_DIST=""
VERSION=2.2.4
DEBIAN_DIST="bookworm bullseye"
UBUNTU_DIST="noble jammy focal"
CENTOS_DIST="centos7 centos8 centos9"
VERSION=2.2.8
21 changes: 21 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
--- 2.2.8 2024/10/22

Fix implicit atoi/stdlib import

--- 2.2.7 2023/01/13

Fix Tcl not enabled by confiugre (#48)

Buffer overflow fixes and reformats (#47)

--- 2.2.6 2022/12/14

zebraidx: Mention -f option when skipping index lines #39

Fix result-sets not removed in some cases #38

--- 2.2.5 2022/06/22

Fix buffer overflow in dictionary insert handling. Could lead to
assert failures in some cases. All users should upgrade.

--- 2.2.4 2022/05/30

Upgrade configure.ac to version 2.69
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Zebra server, Copyright (C) 1994-2022 Index Data
# Zebra server, Copyright (C) 1994-2023 Index Data

## Introduction

32 changes: 16 additions & 16 deletions bfile/bfile.c
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ ZEBRA_RES bf_cache(BFiles bfs, const char *spec)
{
yaz_log(YLOG_LOG, "enabling shadow spec=%s", spec);
if (!bfs->commit_area)
bfs->commit_area = mf_init("shadow", spec, bfs->base, 1);
bfs->commit_area = mf_init("shadow", spec, bfs->base, 1);
if (bfs->commit_area)
{
bfs->cache_fname = xmalloc(strlen(bfs->commit_area->dirs->name)+
@@ -107,11 +107,11 @@ ZEBRA_RES bf_cache(BFiles bfs, const char *spec)
strcat(bfs->cache_fname, "/cache");
yaz_log(YLOG_LOG, "cache_fname = %s", bfs->cache_fname);
}
else
{
yaz_log(YLOG_WARN, "shadow could not be enabled");
return ZEBRA_FAIL;
}
else
{
yaz_log(YLOG_WARN, "shadow could not be enabled");
return ZEBRA_FAIL;
}
}
else
bfs->commit_area = 0;
@@ -220,11 +220,11 @@ int bf_read2(BFile bf, zint no, int offset, int nbytes, void *buf)
zebra_lock_rdwr_rlock(&bf->rdwr_lock);
if (bf->cf)
{
if ((ret = cf_read(bf->cf, no, offset, nbytes, buf)) == 0)
ret = mf_read(bf->mf, no, offset, nbytes, buf);
if ((ret = cf_read(bf->cf, no, offset, nbytes, buf)) == 0)
ret = mf_read(bf->mf, no, offset, nbytes, buf);
}
else
ret = mf_read(bf->mf, no, offset, nbytes, buf);
ret = mf_read(bf->mf, no, offset, nbytes, buf);
zebra_lock_rdwr_runlock(&bf->rdwr_lock);
return ret;
}
@@ -247,7 +247,7 @@ int bf_write2(BFile bf, zint no, int offset, int nbytes, const void *buf)
if (bf->cf)
r = cf_write(bf->cf, no, offset, nbytes, buf);
else
r = mf_write(bf->mf, no, offset, nbytes, buf);
r = mf_write(bf->mf, no, offset, nbytes, buf);
zebra_lock_rdwr_wunlock(&bf->rdwr_lock);
return r;
}
@@ -268,7 +268,7 @@ int bf_commitExists(BFiles bfs)
void bf_reset(BFiles bfs)
{
if (!bfs)
return;
return;
mf_reset(bfs->commit_area, 1);
mf_reset(bfs->register_area, 1);
unlink_cache(bfs);
@@ -336,20 +336,20 @@ void bf_commitClean(BFiles bfs, const char *spec)
}

int bfs_register_directory_stat(BFiles bfs, int no, const char **directory,
double *used_bytes, double *max_bytes)
double *used_bytes, double *max_bytes)
{
return mf_area_directory_stat(bfs->register_area, no, directory,
used_bytes, max_bytes);
used_bytes, max_bytes);
}


int bfs_shadow_directory_stat(BFiles bfs, int no, const char **directory,
double *used_bytes, double *max_bytes)
double *used_bytes, double *max_bytes)
{
if (!bfs->commit_area)
return 0;
return 0;
return mf_area_directory_stat(bfs->commit_area, no, directory,
used_bytes, max_bytes);
used_bytes, max_bytes);
}

/* unimplemented functions not in use, but kept to ensure ABI */
15 changes: 8 additions & 7 deletions bfile/cfile.c
Original file line number Diff line number Diff line change
@@ -24,8 +24,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdlib.h>
#include <string.h>

#include <idzebra/util.h>
#include <yaz/yaz-util.h>
#include <yaz/snprintf.h>
#include <idzebra/util.h>
#include "mfile.h"
#include "cfile.h"

@@ -112,13 +113,13 @@ CFile cf_open(MFile mf, MFile_area area, const char *fname,

zebra_mutex_init(&cf->mutex);

sprintf(path, "%s-b", fname);
yaz_snprintf(path, sizeof(path), "%s-b", fname);
if (!(cf->block_mf = mf_open(area, path, block_size, wflag)))
{
cf_close(cf);
return 0;
}
sprintf(path, "%s-i", fname);
yaz_snprintf(path, sizeof(path), "%s-i", fname);
if (!(cf->hash_mf = mf_open(area, path, HASH_BSIZE, wflag)))
{
cf_close(cf);
@@ -179,7 +180,7 @@ CFile cf_open(MFile mf, MFile_area area, const char *fname,
if (cf->head.state == CFILE_STATE_HASH)
{
cf->parray = (struct CFile_hash_bucket **)
xmalloc(cf->head.hash_size * sizeof(*cf->parray));
xmalloc(cf->head.hash_size * sizeof(*cf->parray));
for (i = 0; i<cf->head.hash_size; i++)
cf->parray[i] = NULL;
}
@@ -395,8 +396,8 @@ static int cf_moveto_flat(CFile cf)

yaz_log(YLOG_DEBUG, "cf: Moving to flat shadow: %s", cf->rmf->name);
yaz_log(YLOG_DEBUG, "cf: hits=%d miss=%d bucket_in_memory=" ZINT_FORMAT " total="
ZINT_FORMAT,
cf->no_hits, cf->no_miss, cf->bucket_in_memory,
ZINT_FORMAT,
cf->no_hits, cf->no_miss, cf->bucket_in_memory,
cf->head.next_bucket - cf->head.first_bucket);
assert(cf->head.state == CFILE_STATE_HASH);
if (flush_bucket(cf, -1))
@@ -616,7 +617,7 @@ int cf_close(CFile cf)
{
int ret = 0;
yaz_log(YLOG_DEBUG, "cf: close hits=%d miss=%d bucket_in_memory=" ZINT_FORMAT
" total=" ZINT_FORMAT,
" total=" ZINT_FORMAT,
cf->no_hits, cf->no_miss, cf->bucket_in_memory,
cf->head.next_bucket - cf->head.first_bucket);
if (flush_bucket(cf, -1))
4 changes: 2 additions & 2 deletions bfile/commit.c
Original file line number Diff line number Diff line change
@@ -203,8 +203,8 @@ static int cf_commit_flat(CFile cf)
fp = (zint *) xmalloc (HASH_BSIZE);
for (hno = cf->head.next_bucket; hno < cf->head.flat_bucket; hno++)
{
for (i = 0; i < (int) (HASH_BSIZE/sizeof(zint)); i++)
fp[i] = 0;
for (i = 0; i < (int) (HASH_BSIZE/sizeof(zint)); i++)
fp[i] = 0;
if (!mf_read (cf->hash_mf, hno, 0, 0, fp) &&
hno != cf->head.flat_bucket-1)
{
Loading