From: John Darrington Date: Tue, 3 May 2005 08:26:20 +0000 (+0000) Subject: Fixed bug 12931 X-Git-Tag: v0.4.0~95 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1195caf0c998e80d3e7195a0452a14e7b4194077;p=pspp-builds.git Fixed bug 12931 AutoGenerate the manual's list of unimplemented commands from command.def --- diff --git a/doc/ChangeLog b/doc/ChangeLog index 54f85c32..fb5abf90 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +Tue May 3 16:22:29 WST 2005 John Darrington + + * get-commands.pl: New file to generate ni.texi + + * not-implemented.texi Makefile.am: List of not implemented commands + now generated from src/command.def + Sun May 1 23:20:42 2005 Ben Pfaff * language.texi: Revised lots of text to catch up with changes diff --git a/doc/Makefile.am b/doc/Makefile.am index 9eaee015..cc4295d6 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -26,7 +26,8 @@ pspp_TEXINFOS = version.texi \ transformation.texi \ utilities.texi \ variables.texi \ - fdl.texi + fdl.texi \ + ni.texi EXTRA_DIST = pspp.man \ $(pspp_TEXINFOS) @@ -35,3 +36,6 @@ EXTRA_DIST = pspp.man \ CLEANFILES = pspp.info pspp.info-* MAINTAINERCLEANFILES=Makefile.in +ni.texi: @top_srcdir@/src/command.def @srcdir@/get-commands.pl + @PERL@ @srcdir@/get-commands.pl $< > $@ + diff --git a/doc/get-commands.pl b/doc/get-commands.pl new file mode 100755 index 00000000..c5cd1631 --- /dev/null +++ b/doc/get-commands.pl @@ -0,0 +1,28 @@ + +# +# Creates Texinfo documentation from the source + +$file = $ARGV[0]; +open(INFO, $file) || die "Cannot open \"$file\"\n" ; +print "\@table \@asis\n"; +while ($line = ) +{ + if ( $line =~ /^UNIMPL/ ) + { + @fields = split(/,/,$line); + $_ = $fields[0]; + s/^UNIMPL//; + s/ *\(\"// ; + s/\"//; + $command = $_; + $_=$fields[5]; + s/\"//; + s/\"\)//; + s/^ *//; + chomp; + $description = $_; + print "\@item $command\n$description\n\n"; + } +} +print "\@end table\n"; +close(INFO); # Close the file diff --git a/doc/not-implemented.texi b/doc/not-implemented.texi index 20e0bc1e..b38a1e5a 100644 --- a/doc/not-implemented.texi +++ b/doc/not-implemented.texi @@ -4,112 +4,6 @@ This chapter lists parts of the PSPP language that are not yet implemented. -The following transformations and utilities are not yet implemented, but -they will be supported in a later release. - -@table @asis -@item ALSCAL -Multidimensional scaling - -@item ANOVA -Factorial analysis of variance - -@item BOX-JENKINS -Time series analysis - -@item CLUSTER -Agglomerative hierarchical clustering - -@item CORRELATIONS -Pearson correlations - -@item DISCRIMINANT -Discriminant analysis - -@item FACTOR -Factor analysis - -@item HILOGLINEAR -Hierarchical loglinear analysis - -@item LOGLINEAR -Loglinear analysis - -@item MANOVA -General linear analysis - -@item MEANS -Subpopulation means - -@item MULT RESPONSE -Multiple response tables - -@item NONPAR CORR -Nonparametric correlations - -@item NPAR TESTS -Nonparametric tests - -@item PARTIAL CORR -Partial correlations - -@item PLOT -Scattergram, regression & contour plots - -@item PROBIT -Fitting probit & logit models - -@item PROXIMITIES -Distance, dissimilarity & similarity matrices - -@item QUICK CLUSTER -Efficient clustering for large numbers of cases - -@item REGRESSION -Multiple regression analysis - -@item RELIABILITY -Item analysis - -@item SURVIVAL -Life tables anlysis - -@end table -The following transformations and utilities are not implemented. There -are no plans to support them in future releases. Contributions to -implement them will still be accepted. - -@itemize @bullet - -@item EDIT - -@item GET DATABASE - -@item GET OSIRIS - -@item GET SCSS - -@item GSET - -@item HELP - -@item INFO - -@item INPUT MATRIX - -@item KEYED DATA LIST - -@item NUMBERED and UNNUMBERED - -@item OPTIONS - -@item REVIEW - -@item SAVE SCSS - -@item SPSS MANAGER - -@item STATISTICS -@end itemize +@include ni.texi @setfilename ignored diff --git a/po/en_GB.po b/po/en_GB.po index 9850c2eb..d70a7a6f 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.3.1\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2005-05-01 15:18+0800\n" +"POT-Creation-Date: 2005-05-02 07:37+0800\n" "PO-Revision-Date: 2004-01-23 13:04+0800\n" "Last-Translator: John Darrington \n" "Language-Team: John Darrington \n" @@ -265,32 +265,32 @@ msgstr "" msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15." msgstr "" -#: src/casefile.c:190 +#: src/casefile.c:192 #, c-format msgid "%s: Removing temporary file: %s." msgstr "" -#: src/casefile.c:337 +#: src/casefile.c:339 #, c-format msgid "Error writing temporary file: %s." msgstr "" -#: src/casefile.c:479 +#: src/casefile.c:481 #, c-format msgid "%s: Opening temporary file: %s." msgstr "" -#: src/casefile.c:505 +#: src/casefile.c:507 #, c-format msgid "%s: Seeking temporary file: %s." msgstr "" -#: src/casefile.c:521 +#: src/casefile.c:523 #, c-format msgid "%s: Reading temporary file: %s." msgstr "" -#: src/casefile.c:524 +#: src/casefile.c:526 #, c-format msgid "%s: Temporary file ended unexpectedly." msgstr "" diff --git a/po/pspp.pot b/po/pspp.pot index 37fcf551..ad8e2544 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2005-05-01 15:18+0800\n" +"POT-Creation-Date: 2005-05-02 07:37+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -266,32 +266,32 @@ msgstr "" msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15." msgstr "" -#: src/casefile.c:190 +#: src/casefile.c:192 #, c-format msgid "%s: Removing temporary file: %s." msgstr "" -#: src/casefile.c:337 +#: src/casefile.c:339 #, c-format msgid "Error writing temporary file: %s." msgstr "" -#: src/casefile.c:479 +#: src/casefile.c:481 #, c-format msgid "%s: Opening temporary file: %s." msgstr "" -#: src/casefile.c:505 +#: src/casefile.c:507 #, c-format msgid "%s: Seeking temporary file: %s." msgstr "" -#: src/casefile.c:521 +#: src/casefile.c:523 #, c-format msgid "%s: Reading temporary file: %s." msgstr "" -#: src/casefile.c:524 +#: src/casefile.c:526 #, c-format msgid "%s: Temporary file ended unexpectedly." msgstr "" diff --git a/src/ChangeLog b/src/ChangeLog index f5c79c77..cf63cd2e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +Tue May 3 16:20:31 WST 2005 John Darrington + + * command.c command.def: Added description string for unimplemented commands. + + * oneway.q: Sorted the hash tables before shipping out the results. Closes + bug [#12931]. + Mon May 2 23:45:01 2005 Ben Pfaff Code improvements. diff --git a/src/command.c b/src/command.c index 95151fd5..0e5d9d63 100644 --- a/src/command.c +++ b/src/command.c @@ -74,7 +74,7 @@ struct command {NAME, {T1, T2, T3, T4}, FUNC, 1, 1}, #define SPCCMD(NAME, T1, T2, T3, T4, FUNC) \ {NAME, {T1, T2, T3, T4}, FUNC, 0, 0}, -#define UNIMPL(NAME, T1, T2, T3, T4) \ +#define UNIMPL(NAME, T1, T2, T3, T4, DESC) \ {NAME, {T1, T2, T3, T4}, NULL, 1, 0}, static const struct command commands[] = { diff --git a/src/command.def b/src/command.def index 89c73a23..681fe5b6 100644 --- a/src/command.def +++ b/src/command.def @@ -24,46 +24,44 @@ #define PROC STATE_PROC #define ERRO STATE_ERROR -UNIMPL ("ACF", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("ADD FILES", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("ACF", ERRO, ERRO, ERRO, ERRO, "Autocorrelation function") +UNIMPL ("ADD FILES", ERRO, ERRO, ERRO, ERRO, "Add files to dictionary") DEFCMD ("ADD VALUE LABELS", ERRO, INPU, TRAN, TRAN, cmd_add_value_labels) DEFCMD ("AGGREGATE", ERRO, ERRO, PROC, TRAN, cmd_aggregate) -UNIMPL ("ANOVA", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("ALSCAL", ERRO, ERRO, ERRO, ERRO, "Multidimensional scaling") +UNIMPL ("ANOVA", ERRO, ERRO, ERRO, ERRO, "Factorial analysis of variance") DEFCMD ("APPLY DICTIONARY", ERRO, ERRO, TRAN, TRAN, cmd_apply_dictionary) -UNIMPL ("AREG", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("ARIMA", ERRO, ERRO, ERRO, ERRO) DEFCMD ("AUTORECODE", ERRO, ERRO, PROC, PROC, cmd_autorecode) SPCCMD ("BEGIN DATA", ERRO, ERRO, PROC, PROC, cmd_begin_data) DEFCMD ("BREAK", ERRO, INPU, TRAN, TRAN, cmd_break) -UNIMPL ("CASEPLOT", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("CASESTOVARS", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("CCF", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("CASEPLOT", ERRO, ERRO, ERRO, ERRO, "Plot time series") +UNIMPL ("CASESTOVARS", ERRO, ERRO, ERRO, ERRO, "Restructure complex data") +UNIMPL ("CCF", ERRO, ERRO, ERRO, ERRO, "Time series cross correlation") DEFCMD ("CLEAR TRANSFORMATIONS", ERRO, INPU, TRAN, TRAN, cmd_clear_transformations) -UNIMPL ("CLUSTER", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("CLUSTER", ERRO, ERRO, ERRO, ERRO, "Hierachial clustering") DEFCMD ("COMPUTE", ERRO, INPU, TRAN, TRAN, cmd_compute) -UNIMPL ("CONJOINT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("CONJOINT", ERRO, ERRO, ERRO, ERRO, "Analyse full concept data") DEFCMD ("CORRELATIONS", ERRO, ERRO, PROC, PROC, cmd_correlations) -UNIMPL ("COXREG", ERRO, ERRO, ERRO, ERRO) DEFCMD ("COUNT", ERRO, INPU, TRAN, TRAN, cmd_count) -UNIMPL ("CREATE", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("COXREG", ERRO, ERRO, ERRO, ERRO, "Cox proportional hazards regression") +UNIMPL ("CREATE", ERRO, ERRO, ERRO, ERRO, "Create time series data") DEFCMD ("CROSSTABS", ERRO, ERRO, PROC, PROC, cmd_crosstabs) -UNIMPL ("CURVEFIT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("CURVEFIT", ERRO, ERRO, ERRO, ERRO, "Fit curve to line plot") DEFCMD ("DATA LIST", TRAN, INPU, TRAN, TRAN, cmd_data_list) -UNIMPL ("DATE", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("DATE", ERRO, ERRO, ERRO, ERRO, "Create time series data") DBGCMD ("DEBUG CASEFILE", INIT, INPU, TRAN, PROC, cmd_debug_casefile) DBGCMD ("DEBUG EVALUATE", INIT, INPU, TRAN, PROC, cmd_debug_evaluate) DBGCMD ("DEBUG MOMENTS", INIT, INPU, TRAN, PROC, cmd_debug_moments) DBGCMD ("DEBUG POOL", INIT, INPU, TRAN, PROC, cmd_debug_pool) -UNIMPL ("DELETE VARIABLES", ERRO, ERRO, ERRO, ERRO) DEFCMD ("DESCRIPTIVES", ERRO, ERRO, PROC, PROC, cmd_descriptives) -UNIMPL ("DISCRIMINANT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("DISCRIMINANT", ERRO, ERRO, ERRO, ERRO, "Linear discriminant analysis") DEFCMD ("DISPLAY", ERRO, INPU, TRAN, PROC, cmd_display) SPCCMD ("DOCUMENT", ERRO, INPU, TRAN, TRAN, cmd_document) DEFCMD ("DO IF", ERRO, INPU, TRAN, TRAN, cmd_do_if) DEFCMD ("DO REPEAT", ERRO, INPU, TRAN, TRAN, cmd_do_repeat) DEFCMD ("DROP DOCUMENTS", INIT, INPU, TRAN, PROC, cmd_drop_documents) DEFCMD ("ECHO", INIT, INPU, TRAN, PROC, cmd_echo) -UNIMPL ("EDIT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("EDIT", ERRO, ERRO, ERRO, ERRO, "obsolete") DEFCMD ("ELSE", ERRO, INPU, TRAN, TRAN, cmd_else) DEFCMD ("ELSE IF", ERRO, INPU, TRAN, TRAN, cmd_else_if) DEFCMD ("END CASE", ERRO, INPU, ERRO, ERRO, cmd_end_case) @@ -78,120 +76,115 @@ DEFCMD ("EXAMINE", ERRO, ERRO, PROC, PROC, cmd_examine) DEFCMD ("EXECUTE", ERRO, ERRO, PROC, PROC, cmd_execute) DEFCMD ("EXIT", INIT, INPU, TRAN, PROC, cmd_exit) DEFCMD ("EXPORT", ERRO, ERRO, PROC, PROC, cmd_export) -UNIMPL ("FACTOR", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("FACTOR", ERRO, ERRO, ERRO, ERRO, "Factor analysis") DEFCMD ("FILE HANDLE", INIT, INPU, TRAN, PROC, cmd_file_handle) SPCCMD ("FILE LABEL", INIT, INPU, TRAN, PROC, cmd_file_label) DEFCMD ("FILE TYPE", INPU, ERRO, INPU, INPU, cmd_file_type) DEFCMD ("FILTER", ERRO, ERRO, TRAN, TRAN, cmd_filter) DEFCMD ("FINISH", INIT, INPU, TRAN, PROC, cmd_finish) -UNIMPL ("FIT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("FIT", ERRO, ERRO, ERRO, ERRO, "Goodness of Fit") DEFCMD ("FLIP", ERRO, ERRO, PROC, PROC, cmd_flip) DEFCMD ("FORMATS", INIT, INPU, TRAN, PROC, cmd_formats) DEFCMD ("FREQUENCIES", ERRO, ERRO, PROC, PROC, cmd_frequencies) -UNIMPL ("GENLOG", ERRO, ERRO, ERRO, ERRO) DEFCMD ("GET", TRAN, ERRO, TRAN, TRAN, cmd_get) -UNIMPL ("GET TRANSLATE", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("GLM", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("GRAPH", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("HILOGLINEAR", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("GET TRANSLATE", ERRO, ERRO, ERRO, ERRO, "Read other file formats") +UNIMPL ("GLM", ERRO, ERRO, ERRO, ERRO, "General Linear Model") +UNIMPL ("GRAPH", ERRO, ERRO, ERRO, ERRO, "Draw graphs") DEFCMD ("HOST", INIT, INPU, TRAN, PROC, cmd_host) DEFCMD ("IF", ERRO, INPU, TRAN, TRAN, cmd_if) -UNIMPL ("IGRAPH", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("IGRAPH", ERRO, ERRO, ERRO, ERRO, "Interactive graphs") DEFCMD ("IMPORT", TRAN, ERRO, TRAN, TRAN, cmd_import) DEFCMD ("INCLUDE", INIT, INPU, TRAN, PROC, cmd_include) -UNIMPL ("INFO", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("INPUT MATRIX", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("INFO", ERRO, ERRO, ERRO, ERRO, "Local Documentation") DEFCMD ("INPUT PROGRAM", INPU, ERRO, INPU, INPU, cmd_input_program) -UNIMPL ("KEYED DATA LIST", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("KEYED DATA LIST", ERRO, ERRO, ERRO, ERRO, "Read nonsequential data") +UNIMPL ("KM", ERRO, ERRO, ERRO, ERRO, "Kaplan-Meier") DEFCMD ("LEAVE", ERRO, INPU, TRAN, TRAN, cmd_leave) DEFCMD ("LIST", ERRO, ERRO, PROC, PROC, cmd_list) -UNIMPL ("LOGLINEAR", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("LOGISITIC REGRESSION", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("LOGISTIC REGRESSION", ERRO, ERRO, ERRO, ERRO, "Regression Analysis") DEFCMD ("LOOP", ERRO, INPU, TRAN, TRAN, cmd_loop) DEFCMD ("MATCH FILES", TRAN, ERRO, TRAN, PROC, cmd_match_files) DEFCMD ("MATRIX DATA", TRAN, ERRO, TRAN, TRAN, cmd_matrix_data) -UNIMPL ("MCONVERT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("MCONVERT", ERRO, ERRO, ERRO, ERRO, "Convert covariance/correlation matrices") DEFCMD ("MEANS", ERRO, ERRO, PROC, PROC, cmd_means) DEFCMD ("MISSING VALUES", ERRO, INPU, TRAN, TRAN, cmd_missing_values) DEFCMD ("MODIFY VARS", ERRO, ERRO, TRAN, PROC, cmd_modify_vars) -UNIMPL ("MULT RESPONSE", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("MVA", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("MULT RESPONSE", ERRO, ERRO, ERRO, ERRO, "Multiple reponse analysis") +UNIMPL ("MVA", ERRO, ERRO, ERRO, ERRO, "Missing value analysis") DEFCMD ("NEW FILE", INIT, ERRO, INIT, INIT, cmd_new_file) DEFCMD ("N", INIT, INPU, TRAN, TRAN, cmd_n_of_cases) DEFCMD ("N OF CASES", INIT, INPU, TRAN, TRAN, cmd_n_of_cases) -UNIMPL ("NLR", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("NONPAR CORR", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("NPAR TESTS", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("NUMBERED", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("NLR", ERRO, ERRO, ERRO, ERRO, "Non Linear Regression") +UNIMPL ("NONPAR CORR", ERRO, ERRO, ERRO, ERRO, "Nonparametric correlation") +UNIMPL ("NPAR TESTS", ERRO, ERRO, ERRO, ERRO, "Nonparametric tests") +UNIMPL ("NUMBERED", ERRO, ERRO, ERRO, ERRO, "") DEFCMD ("NUMERIC", ERRO, INPU, TRAN, TRAN, cmd_numeric) -UNIMPL ("OLAP CUBES", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("OMS", ERRO, ERRO, ERRO, ERRO) DEFCMD ("ONEWAY", ERRO, ERRO, PROC, PROC, cmd_oneway) -UNIMPL ("ORTHOPLAN", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("PACF", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("PARTIAL CORR", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("PACF", ERRO, ERRO, ERRO, ERRO, "Partial autocorrelation") +UNIMPL ("PARTIAL CORR", ERRO, ERRO, ERRO, ERRO, "Partial correlation") DEFCMD ("PEARSON CORRELATIONS", ERRO, ERRO, PROC, PROC, cmd_correlations) DEFCMD ("PERMISSIONS", INIT, INPU, TRAN, PROC, cmd_permissions) -UNIMPL ("PLOT", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("POINT", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("PPLOT", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("PREDICT", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("PRESERVE", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("POINT", ERRO, ERRO, ERRO, ERRO, "Marker in keyed file") +UNIMPL ("PPLOT", ERRO, ERRO, ERRO, ERRO, "Plot time series variables") +UNIMPL ("PREDICT", ERRO, ERRO, ERRO, ERRO, "Specify forecast period") +UNIMPL ("PRESERVE", ERRO, ERRO, ERRO, ERRO, "Push settings") DEFCMD ("PRINT EJECT", ERRO, INPU, TRAN, TRAN, cmd_print_eject) DEFCMD ("PRINT", ERRO, INPU, TRAN, TRAN, cmd_print) DEFCMD ("PRINT FORMATS", ERRO, INPU, TRAN, TRAN, cmd_print_formats) DEFCMD ("PRINT SPACE", ERRO, INPU, TRAN, TRAN, cmd_print_space) -UNIMPL ("PROCEDURE OUTPUT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("PROCEDURE OUTPUT", ERRO, ERRO, ERRO, ERRO, "Specify output file") +UNIMPL ("PROBIT", ERRO, ERRO, ERRO, ERRO, "Probit analysis") DEFCMD ("PROCESS IF", ERRO, ERRO, TRAN, TRAN, cmd_process_if) -UNIMPL ("PROXIMITIES", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("PROXIMITIES", ERRO, ERRO, ERRO, ERRO, "Pairwise similarity") DEFCMD ("Q", INIT, INPU, TRAN, PROC, cmd_exit) -UNIMPL ("QUICK CLUSTER", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("QUICK CLUSTER", ERRO, ERRO, ERRO, ERRO, "Fast clustering") DEFCMD ("QUIT", INIT, INPU, TRAN, PROC, cmd_exit) -UNIMPL ("RANK", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("RANK", ERRO, ERRO, ERRO, ERRO, "Create rank scores") DEFCMD ("RECODE", ERRO, INPU, TRAN, TRAN, cmd_recode) DEFCMD ("RECORD TYPE", ERRO, INPU, ERRO, ERRO, cmd_record_type) -UNIMPL ("REFORMAT", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("REGRESSION", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("REFORMAT", ERRO, ERRO, ERRO, ERRO, "Read obsolete files") +UNIMPL ("REGRESSION", ERRO, ERRO, ERRO, ERRO, "Compute regression coefficients") DEFCMD ("RENAME VARIABLES", ERRO, INPU, TRAN, PROC, cmd_rename_variables) DEFCMD ("REPEATING DATA", ERRO, INPU, ERRO, ERRO, cmd_repeating_data) -UNIMPL ("REPORT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("REPORT", ERRO, ERRO, ERRO, ERRO, "Pretty print working file") DEFCMD ("REREAD", ERRO, INPU, ERRO, ERRO, cmd_reread) -UNIMPL ("RESTORE", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("RMV", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("RESTORE", ERRO, ERRO, ERRO, ERRO, "Restore settings") +UNIMPL ("ROC", ERRO, ERRO, ERRO, ERRO, "Receiver operating characteristic") +UNIMPL ("RMV", ERRO, ERRO, ERRO, ERRO, "Replace missing values") DEFCMD ("SAMPLE", ERRO, ERRO, TRAN, TRAN, cmd_sample) DEFCMD ("SAVE", ERRO, ERRO, PROC, PROC, cmd_save) -UNIMPL ("SAVE TRANSLATE", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("SCRIPT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("SAVE TRANSLATE", ERRO, ERRO, ERRO, ERRO, "Save to foriegn format") +UNIMPL ("SCRIPT", ERRO, ERRO, ERRO, ERRO, "Run script file") DEFCMD ("SELECT IF", ERRO, ERRO, TRAN, TRAN, cmd_select_if) DEFCMD ("SET", INIT, INPU, TRAN, PROC, cmd_set) DEFCMD ("SHOW", INIT, INPU, TRAN, PROC, cmd_show) DEFCMD ("SORT CASES", ERRO, ERRO, PROC, PROC, cmd_sort_cases) DEFCMD ("SORT", ERRO, ERRO, PROC, PROC, cmd_sort_cases) -UNIMPL ("SPCHART", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("SPCHART", ERRO, ERRO, ERRO, ERRO, "Plot control charts") DEFCMD ("SPLIT FILE", ERRO, INPU, TRAN, TRAN, cmd_split_file) DEFCMD ("STRING", ERRO, INPU, TRAN, TRAN, cmd_string) SPCCMD ("SUBTITLE", INIT, INPU, TRAN, PROC, cmd_subtitle) -UNIMPL ("SUMMARIZE", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("SURVIVAL", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("SUMMARIZE", ERRO, ERRO, ERRO, ERRO, "Univariate statistics") +UNIMPL ("SURVIVAL", ERRO, ERRO, ERRO, ERRO, "Survival analysis") DEFCMD ("SYSFILE INFO", INIT, INPU, TRAN, PROC, cmd_sysfile_info) DEFCMD ("TEMPORARY", ERRO, ERRO, TRAN, TRAN, cmd_temporary) SPCCMD ("TITLE", INIT, INPU, TRAN, PROC, cmd_title) -UNIMPL ("TSET", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("TSHOW", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("TSPLOT", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("TSET", ERRO, ERRO, ERRO, ERRO, "Set time sequence variables") +UNIMPL ("TSHOW", ERRO, ERRO, ERRO, ERRO, "Show time sequence variables") +UNIMPL ("TSPLOT", ERRO, ERRO, ERRO, ERRO, "Plot time sequence variables") DEFCMD ("T-TEST", ERRO, ERRO, PROC, PROC, cmd_t_test) -UNIMPL ("UNIANOVA", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("UNNUMBERED", ERRO, ERRO, ERRO, ERRO) -UNIMPL ("UPDATE", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("UNIANOVA", ERRO, ERRO, ERRO, ERRO, "Univariate analysis") +UNIMPL ("UNNUMBERED", ERRO, ERRO, ERRO, ERRO, "obsolete") +UNIMPL ("UPDATE", ERRO, ERRO, ERRO, ERRO, "Update working file") DEFCMD ("USE", ERRO, ERRO, TRAN, TRAN, cmd_use) DEFCMD ("VALUE LABELS", ERRO, INPU, TRAN, TRAN, cmd_value_labels) -DEFCMD ("VARIABLE ALIGNMENT", ERRO, INPU, TRAN, TRAN, cmd_variable_alignment) DEFCMD ("VARIABLE LABELS", ERRO, INPU, TRAN, TRAN, cmd_variable_labels) +DEFCMD ("VARIABLE ALIGNMENT", ERRO, INPU, TRAN, TRAN, cmd_variable_alignment) DEFCMD ("VARIABLE LEVEL", ERRO, INPU, TRAN, TRAN, cmd_variable_level) DEFCMD ("VARIABLE WIDTH", ERRO, INPU, TRAN, TRAN, cmd_variable_width) -UNIMPL ("VARSTOCASES", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("VARSTOCASES", ERRO, ERRO, ERRO, ERRO, "Restructure complex data") DEFCMD ("VECTOR", ERRO, INPU, TRAN, TRAN, cmd_vector) -UNIMPL ("VERIFY", ERRO, ERRO, ERRO, ERRO) +UNIMPL ("VERIFY", ERRO, ERRO, ERRO, ERRO, "Report time series") DEFCMD ("WEIGHT", ERRO, INPU, TRAN, TRAN, cmd_weight) DEFCMD ("WRITE", ERRO, INPU, TRAN, TRAN, cmd_write) DEFCMD ("WRITE FORMATS", ERRO, INPU, TRAN, TRAN, cmd_write_formats) diff --git a/src/command.h b/src/command.h index 1de5a251..43478ef4 100644 --- a/src/command.h +++ b/src/command.h @@ -56,7 +56,7 @@ int cmd_parse (void); int FUNC (void); #define DBGCMD(NAME, T1, T2, T3, T4, FUNC) \ int FUNC (void); -#define UNIMPL(NAME, T1, T2, T3, T4) +#define UNIMPL(NAME, T1, T2, T3, T4, DESC) #include "command.def" #undef DEFCMD #undef SPCCMD diff --git a/src/oneway.q b/src/oneway.q index 565ba61b..71f5f087 100644 --- a/src/oneway.q +++ b/src/oneway.q @@ -373,8 +373,6 @@ show_descriptives(void) int n_rows = 2 ; - - for ( v = 0 ; v < n_vars ; ++v ) n_rows += group_proc_get (vars[v])->n_groups + 1; @@ -422,25 +420,22 @@ show_descriptives(void) struct group_proc *gp = group_proc_get (vars[v]); - struct hsh_iterator g; struct group_statistics *gs; struct group_statistics *totals = &gp->ugs; - int count = 0 ; const char *s = var_to_string(vars[v]); - struct hsh_table *group_hash = gp->group_hash; - + struct group_statistics **gs_array = hsh_sort(gp->group_hash); + int count = 0; tab_text (t, 0, row, TAB_LEFT | TAT_TITLE, s); if ( v > 0) tab_hline(t, TAL_1, 0, n_cols - 1 , row); - - for (gs = hsh_first (group_hash,&g); - gs != 0; - gs = hsh_next(group_hash,&g)) + for (count = 0 ; count < hsh_count(gp->group_hash) ; ++count) { + gs = gs_array[count]; + tab_text (t, 1, row + count, TAB_LEFT | TAT_TITLE ,value_to_string(&gs->id,indep_var)); @@ -471,7 +466,6 @@ show_descriptives(void) tab_float(t, 8, row + count, 0, gs->minimum, 8, 2); tab_float(t, 9, row + count, 0, gs->maximum, 8, 2); - count++ ; } tab_text (t, 1, row + count, @@ -580,14 +574,12 @@ show_contrast_coeffs(short *bad_contrast) { int n_cols = 2 + ostensible_number_of_groups; int n_rows = 2 + cmd.sbc_contrast; - struct hsh_iterator g; union value *group_value; int count = 0 ; - + void **group_values ; struct tab_table *t; - t = tab_create (n_cols,n_rows,0); tab_headers (t, 2, 0, 2, 0); tab_dim (t, tab_natural_dimensions); @@ -599,7 +591,6 @@ show_contrast_coeffs(short *bad_contrast) 0, 0, n_cols - 1, n_rows - 1); - tab_box (t, -1,-1, TAL_0, TAL_0, @@ -612,50 +603,44 @@ show_contrast_coeffs(short *bad_contrast) 0,0, 1,1); - tab_hline(t, TAL_1, 2, n_cols - 1, 1); - - tab_hline(t, TAL_2, 0, n_cols - 1, 2); - tab_vline(t, TAL_2, 2, 0, n_rows - 1); + tab_vline(t, TAL_2, 2, 0, n_rows - 1); tab_title (t, 0, _("Contrast Coefficients")); tab_text (t, 0, 2, TAB_LEFT | TAT_TITLE, _("Contrast")); - tab_joint_text (t, 2, 0, n_cols - 1, 0, TAB_CENTER | TAT_TITLE, var_to_string(indep_var)); - for (group_value = hsh_first (global_group_hash,&g); - group_value != 0; - group_value = hsh_next(global_group_hash,&g)) + group_values = hsh_sort(global_group_hash); + for (count = 0 ; + count < hsh_count(global_group_hash) ; + ++count) { int i; + group_value = group_values[count]; tab_text (t, count + 2, 1, TAB_CENTER | TAT_TITLE, - value_to_string(group_value,indep_var)); + value_to_string(group_value, indep_var)); for (i = 0 ; i < cmd.sbc_contrast ; ++i ) { - tab_text(t, 1, i + 2, TAB_CENTER | TAT_PRINTF, "%d", i + 1); if ( bad_contrast[i] ) tab_text(t, count + 2, i + 2, TAB_RIGHT, "?" ); else tab_text(t, count + 2, i + 2, TAB_RIGHT | TAT_PRINTF, "%g", - subc_list_double_at(&cmd.dl_contrast[i],count) + subc_list_double_at(&cmd.dl_contrast[i], count) ); } - - count++ ; } - + tab_submit (t); - } @@ -715,8 +700,8 @@ show_contrast_tests(short *bad_contrast) double coef_msq = 0.0; struct group_proc *grp_data = group_proc_get (vars[v]); struct hsh_table *group_hash = grp_data->group_hash; - struct hsh_iterator g; struct group_statistics *gs; + void **group_stat_array; double T; double std_error_contrast ; @@ -724,8 +709,8 @@ show_contrast_tests(short *bad_contrast) double sec_vneq=0.0; - /* Note: The calculation of the degrees of freedom in the variances - not equal case is painfull!! + /* Note: The calculation of the degrees of freedom in the + "variances not equal" case is painfull!! The following formula may help to understand it: \frac{\left(\sum_{i=1}^k{c_i^2\frac{s_i^2}{n_i}}\right)^2} { @@ -737,8 +722,6 @@ show_contrast_tests(short *bad_contrast) double df_denominator = 0.0; double df_numerator = 0.0; - - if ( i == 0 ) { tab_text (t, 1, (v * lines_per_variable) + i + 1, @@ -761,14 +744,12 @@ show_contrast_tests(short *bad_contrast) if ( bad_contrast[i]) continue; - /* FIXME: Potential danger here. - We're ASSUMING THE array is in the order corresponding to the - hash order. */ - for (ci = 0, gs = hsh_first (group_hash,&g); - gs != 0; - ++ci, gs = hsh_next(group_hash,&g)) + group_stat_array = hsh_sort(group_hash); + + for (ci = 0 ; ci < hsh_count(group_hash) ; ++ci) { - + gs = group_stat_array[ci]; + const double coef = subc_list_double_at(&cmd.dl_contrast[i],ci); const double winv = (gs->std_dev * gs->std_dev) / gs->n; @@ -780,7 +761,6 @@ show_contrast_tests(short *bad_contrast) df_numerator += (coef * coef) * winv; df_denominator += pow2((coef * coef) * winv) / (gs->n - 1); - } sec_vneq = sqrt(sec_vneq); diff --git a/tests/command/oneway-with-splits.sh b/tests/command/oneway-with-splits.sh index 6b510bfc..3075467c 100755 --- a/tests/command/oneway-with-splits.sh +++ b/tests/command/oneway-with-splits.sh @@ -16,7 +16,11 @@ export STAT_CONFIG_PATH=$top_srcdir/config cleanup() { - rm -rf $TEMPDIR + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo Not cleaning $TEMPDIR; + return ; + fi + rm -rf $TEMPDIR } diff --git a/tests/command/oneway.sh b/tests/command/oneway.sh index 22e88456..6245ec8f 100755 --- a/tests/command/oneway.sh +++ b/tests/command/oneway.sh @@ -15,7 +15,11 @@ export STAT_CONFIG_PATH=$top_srcdir/config cleanup() { - rm -rf $TEMPDIR + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo Not cleaning $TEMPDIR; + return ; + fi + rm -rf $TEMPDIR }