• Per Cederqvist's avatar
    Let dbfile_open_write() write the file header. Extract the code · 39b34b6a
    Per Cederqvist authored
    that changes the state to dbfile_change_magic().  Reduce code
    duplication by teaching foutput_header() to handle old file
    formats.
    * src/server/simple-cache.c (pre_sync): Adjusted to new API of
    dbfile_open_write(), including removing calls to foutput_header().
    (save_one_text): Extracted parts of the functionality to
    dbfile_change_magic().
    * src/server/ram-output.c (foutput_header): Moved support for file
    formats 0, 1 and 2 here from sync_output_header().
    * src/server/ram-io.c, src/server/ram-io.h
    (dbfile_open_write): New argument: magic.  Write a file header
    with the specified state.
    (dbfile_change_magic): New function, extracted from
    cache_sync_all() in dbck-cache.c and save_one_text().
    * src/server/dbck-cache.c (sync_output_header): Removed.
    The ability to emit old-style headers moved to foutput_header().
    (cache_sync_all): Adjusted to new API of dbfile_open_write,
    including removing calls to sync_output_header().  Use
    dbfile_change_magic() instead of rewind() and
    sync_output_header().
    * src/server/Makefile.am (libcheck_a_SOURCES): Added
    server-time.c.
    39b34b6a
Name
Last commit
Last update
db-crypt Loading commit data...
doc Loading commit data...
m4 Loading commit data...
run-support Loading commit data...
scripts Loading commit data...
src Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
ChangeLog.1 Loading commit data...
HACKING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.FSF Loading commit data...
TODO Loading commit data...
acinclude.m4 Loading commit data...
configure.in Loading commit data...
mkmi Loading commit data...
versions Loading commit data...