Abstract the documents within a dictionary a little better. Thanks to
John Darrington for suggestion, initial version, and review. Patch
#5917.
* command/file-label.sh: Update to match new DOCUMENT behavior.
* title.c (add_document_line): Removed.
(add_document_trailer): New function.
(cmd_document): Rewrite to yield SPSS-like output and to use the
updated document API.
(cmd_add_documents): Ditto.
* lexer.c (lex_entire_line): Add const to parameter.
(lex_entire_line_ds): Ditto.
(lex_rest_of_line): Drop end_dot parameter. Update all callers to
use lex_end_dot instead.
(lex_end_dot): New function.
* get.c (mtf_merge_dictionary): Simplify creating merged document.
* dictionary.c (struct dictionary): Change `documents' member from
char * to struct string.
(dict_clear): Destroy struct string.
(dict_get_documents): Convert struct string to char *.
(dict_set_documents): Set struct string. Pad to 80-character
multiple.
(dict_clear_documents): New function.
(dict_add_document_line): New function.
(dict_get_document_line_cnt): New function.
(dict_get_document_line): New function.
* dictionary.h (macro DOC_LINE_LENGTH): New macro.
* sys-file-reader.c (read_documents): Use new document functions.
18 files changed: