Ben Pfaff [Sun, 6 May 2007 22:05:21 +0000 (22:05 +0000)]
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.
* 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.
Ben Pfaff [Mon, 23 Apr 2007 01:35:34 +0000 (01:35 +0000)]
Patch #5884.
(ll_for_each_reverse): New macro.
(ll_for_each_reverse_continue): New macro.
(ll_for_each_reverse_safe): New macro.
(ll_for_each_safe_reverse_continue): New macro.
(ll_for_each_reverse_preremove): New macro.
(ll_for_each_reverse_postremove): New macro.
(ll_remove__): Removed (dead code).
(ll_tail__): New macro.
(ll_prev__): New macro.
Ben Pfaff [Mon, 23 Apr 2007 01:32:29 +0000 (01:32 +0000)]
Patch #5885.
(dict_set_split_vars): dict_destroy expects that
dict_clear will free most data related to the dictionary.
dict_clear does a decent job, except that dict_set_split_vars on
some systems won't actually free the dict's "split" member.
Instead, it'll allocate a 1-byte region. Fix this.
Ben Pfaff [Mon, 16 Apr 2007 03:06:50 +0000 (03:06 +0000)]
* compute-dialog.c (function_list_populate): Use new accessor
functions exported by language/expressions/public.h.
* parse.c (expr_get_function): New function.
(expr_get_function_cnt): New function.
(expr_operation_get_name): New function.
(expr_operation_get_prototype): New function.
(expr_operation_get_arg_cnt): New function.
Ben Pfaff [Mon, 16 Apr 2007 00:14:08 +0000 (00:14 +0000)]
* recode.c (enlarge_dst_widths): Source isn't null-terminated, so
don't pretend it is.
(var_is_num_missing): MISSING should include system-missing values
too.
Ben Pfaff [Mon, 19 Mar 2007 20:51:01 +0000 (20:51 +0000)]
* Makefile.am (AUTOMAKE_OPTIONS): Require Automake 1.10 (or
later), which works better with systems that have a non-empty
$(EXEEXT).
(SUBDIRS): Drop intl.
(DISTCLEANFILES): Drop intl/plural.c.
* Throughout Makefile.am and the automake.mk files: Change
mkinstalldirs to $(MKDIR_P), to support the corresponding Automake
change.
* Smake (GNULIB_MODULES): Use gettext-h instead of gettext module.
(all): Don't create intl directory.
(gettextize): Don't use --intl flag.
* configure.ac: Require Autoconf 2.60 or later. Use external
gettext. Drop intl/Makefile from config files.
Ben Pfaff [Thu, 1 Mar 2007 21:26:28 +0000 (21:26 +0000)]
Fix "make distcheck" by distributing doc/ni.texi,
even though it's generated. Reviewed by John Darrington.
(doc_pspp_TEXINFOS): Add doc/ni.texi.
(nodist_doc_pspp_TEXINFOS): Remove.
(am__TEXINFO_TEX_DIR) Removed (was just a kluge anyhow).
($(INFO_DEPS)): Removed.
($(HTML_DEPS)): Removed.
(CLEANFILES): Removed.
Ben Pfaff [Tue, 13 Feb 2007 00:28:52 +0000 (00:28 +0000)]
Make q2c link under mingw32, by eliminating the dependency on
localtime. Gnulib replaces localtime by a fixed version, but we don't
link q2c against gnulib. q2c only uses localtime to put the time of
processing into the output file, which I've never in practice found to
be useful, so the patch just drops this feature.
Ben Pfaff [Fri, 2 Feb 2007 00:57:32 +0000 (00:57 +0000)]
We are using a single member in struct file_handle, the "name"
field, for more than one purpose. When it begins with '"', it's a
file name; otherwise, it's a token that can be used to identify
it. When that assertion fires, it's because we searched for the
name case-sensitively as a file name (so that there was no match),
and then we try to insert it case-insensitively as a token, which
fails because duplicates aren't allowed.
Solution: break the two purposes into two separate fields. This
fixes the problem and likely makes the code easier to read too.
Fixes bug #18922. Thanks to John Darrington for bug report and
review.