Implement new DBM dump format.
The new format, called "C", allows programmers to create input data for use by mu load using conventional means. It represents both key and content as C strings (hence its name), with usual C (literal and octal) escapes to represent non-printable characters. * mu/dbm.c (IOBUF_REREAD,IOBUF_EOF): New constants. (iobuf) <state>: New member. (input_eof): New macro. (input_getline): Use iobuf.state to detect EOF. (input_ungetline): Reset state only if it is 0. (format_tab): New format "C". (write_quoted_string,C_writer,C_read_datum) (C_reader): New functions to implement the C dump format. * libmailutils/tests/testsuite.at: Minor change.
Showing
2 changed files
with
188 additions
and
15 deletions
-
Please register or sign in to post a comment