From: Ben Pfaff Date: Sun, 16 Apr 2006 04:46:41 +0000 (+0000) Subject: Get rid of src/libpspp/debug-print.h and all its users. (There were X-Git-Tag: v0.6.0~983 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77e551d23575da6b89f866612ab39c2b0497c9be;p=pspp-builds.git Get rid of src/libpspp/debug-print.h and all its users. (There were few real users, but many inclusions of its header file.) --- diff --git a/ChangeLog b/ChangeLog index 6f1daa73..8502ffae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Apr 15 21:45:40 2006 Ben Pfaff + + Get rid of src/libpspp/debug-print.h and all its users. (There + were few real users, but many inclusions of its header file.) + Sat Apr 15 19:51:22 2006 Ben Pfaff Get rid of our own int32 type in favor of the standard int32_t diff --git a/src/data/data-in.c b/src/data/data-in.c index cc3a3e40..44fd7995 100644 --- a/src/data/data-in.c +++ b/src/data/data-in.c @@ -39,8 +39,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) - -#include /* Specialized error routine. */ diff --git a/src/data/data-out.c b/src/data/data-out.c index 79c70424..78668b7a 100644 --- a/src/data/data-out.c +++ b/src/data/data-out.c @@ -36,8 +36,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) - -#include /* Public functions. */ diff --git a/src/data/filename.c b/src/data/filename.c index d81dd076..cbfc04ce 100644 --- a/src/data/filename.c +++ b/src/data/filename.c @@ -35,8 +35,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* PORTME: Everything in this file is system dependent. */ #ifdef unix diff --git a/src/data/por-file-reader.c b/src/data/por-file-reader.c index c4fec4b0..3f385223 100644 --- a/src/data/por-file-reader.c +++ b/src/data/por-file-reader.c @@ -47,8 +47,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* portable_to_local[PORTABLE] translates the given portable character into the local character set. */ static const char portable_to_local[256] = diff --git a/src/data/por-file-writer.c b/src/data/por-file-writer.c index c7c7dd2f..98b7b764 100644 --- a/src/data/por-file-writer.c +++ b/src/data/por-file-writer.c @@ -47,8 +47,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Portable file writer. */ struct pfm_writer { diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 5f3e26bd..58a885ae 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -44,8 +44,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* System file reader. */ struct sfm_reader { diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index 21b06139..5ba525cb 100644 --- a/src/data/sys-file-writer.c +++ b/src/data/sys-file-writer.c @@ -46,8 +46,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Compression bias used by PSPP. Values between (1 - COMPRESSION_BIAS) and (251 - COMPRESSION_BIAS) inclusive can be compressed. */ diff --git a/src/language/control/repeat.c b/src/language/control/repeat.c index 6cfbb6bb..933c9134 100644 --- a/src/language/control/repeat.c +++ b/src/language/control/repeat.c @@ -39,8 +39,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Defines a list of lines used by DO REPEAT. */ struct line_list { diff --git a/src/language/data-io/data-list.c b/src/language/data-io/data-list.c index db7fc3bf..6609e32b 100644 --- a/src/language/data-io/data-list.c +++ b/src/language/data-io/data-list.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/language/data-io/data-reader.c b/src/language/data-io/data-reader.c index 0a4baf67..8d9dd207 100644 --- a/src/language/data-io/data-reader.c +++ b/src/language/data-io/data-reader.c @@ -37,8 +37,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Flags for DFM readers. */ enum dfm_reader_flags { diff --git a/src/language/data-io/get.c b/src/language/data-io/get.c index 052dbeab..78e91c3d 100644 --- a/src/language/data-io/get.c +++ b/src/language/data-io/get.c @@ -43,8 +43,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Rearranging and reducing a dictionary. */ static void start_case_map (struct dictionary *); static struct case_map *finish_case_map (struct dictionary *); @@ -735,8 +733,6 @@ keep_variables (struct dictionary *dict) /* MATCH FILES. */ -#include - /* File types. */ enum { diff --git a/src/language/data-io/inpt-pgm.c b/src/language/data-io/inpt-pgm.c index 06b6c386..1fcf0f09 100644 --- a/src/language/data-io/inpt-pgm.c +++ b/src/language/data-io/inpt-pgm.c @@ -40,8 +40,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Indicates how a `union value' should be initialized. */ enum value_init_type { diff --git a/src/language/data-io/list.q b/src/language/data-io/list.q index b212efeb..4e1f8a18 100644 --- a/src/language/data-io/list.q +++ b/src/language/data-io/list.q @@ -45,8 +45,6 @@ /* (headers) */ -#include - /* (specification) list (lst_): *variables=varlist("PV_NO_SCRATCH"); diff --git a/src/language/data-io/matrix-data.c b/src/language/data-io/matrix-data.c index 8dc3f00a..4db8f90a 100644 --- a/src/language/data-io/matrix-data.c +++ b/src/language/data-io/matrix-data.c @@ -42,8 +42,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* FIXME: /N subcommand not implemented. It should be pretty simple, too. */ @@ -1123,7 +1121,6 @@ nr_read_data_lines (struct nr_aux_data *nr, if (mx->fmt != FREE && !force_eol (mx->reader, content_names[content])) return 0; - debug_printf (("\n")); } if (mx->section == LOWER) @@ -1419,11 +1416,8 @@ nr_output_data (struct nr_aux_data *nr, struct ccase *c, size_t factor; for (factor = 0; factor < mx->n_factors; factor++) - { - case_data_rw (c, mx->factors[factor]->fv)->f - = nr->factor_values[factor + cell * mx->n_factors]; - debug_printf (("f:%s ", mx->factors[factor]->name)); - } + case_data_rw (c, mx->factors[factor]->fv)->f + = nr->factor_values[factor + cell * mx->n_factors]; } { @@ -1973,8 +1967,6 @@ wr_read_indeps (struct wr_aux_data *wr) } c->n_rows[wr->content]++; - debug_printf ((" (c=%p,r=%d,n=%d)", c, n_rows + 1, n_cols)); - /* Read N_COLS items at CP. */ { int j; @@ -1997,7 +1989,6 @@ wr_read_indeps (struct wr_aux_data *wr) if (mx->fmt != FREE && !force_eol (mx->reader, content_names[wr->content])) return 0; - debug_printf (("\n")); } return 1; diff --git a/src/language/dictionary/apply-dictionary.c b/src/language/dictionary/apply-dictionary.c index 6aaada8e..217f0f89 100644 --- a/src/language/dictionary/apply-dictionary.c +++ b/src/language/dictionary/apply-dictionary.c @@ -34,8 +34,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Parses and executes APPLY DICTIONARY. */ int cmd_apply_dictionary (void) diff --git a/src/language/dictionary/formats.c b/src/language/dictionary/formats.c index d6eb8bfb..79a6711e 100644 --- a/src/language/dictionary/formats.c +++ b/src/language/dictionary/formats.c @@ -31,8 +31,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - enum { FORMATS_PRINT = 001, diff --git a/src/language/dictionary/missing-values.c b/src/language/dictionary/missing-values.c index 3bcf24d3..fde8ba47 100644 --- a/src/language/dictionary/missing-values.c +++ b/src/language/dictionary/missing-values.c @@ -32,8 +32,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - int cmd_missing_values (void) { diff --git a/src/language/dictionary/numeric.c b/src/language/dictionary/numeric.c index 4800ac86..3e3d7651 100644 --- a/src/language/dictionary/numeric.c +++ b/src/language/dictionary/numeric.c @@ -30,8 +30,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* Parses the NUMERIC command. */ int cmd_numeric (void) diff --git a/src/language/dictionary/variable-display.c b/src/language/dictionary/variable-display.c index c1b6e1e7..e5e3e69f 100644 --- a/src/language/dictionary/variable-display.c +++ b/src/language/dictionary/variable-display.c @@ -27,8 +27,6 @@ #include #include -#include - /* Set variables' alignment This is the alignment for GUI display only. It affects nothing but GUIs diff --git a/src/language/dictionary/variable-label.c b/src/language/dictionary/variable-label.c index bc171a29..acf5f054 100644 --- a/src/language/dictionary/variable-label.c +++ b/src/language/dictionary/variable-label.c @@ -30,8 +30,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - int cmd_variable_labels (void) { diff --git a/src/language/lexer/q2c.c b/src/language/lexer/q2c.c index 72ce7add..ec369dbc 100644 --- a/src/language/lexer/q2c.c +++ b/src/language/lexer/q2c.c @@ -41,8 +41,6 @@ #endif -#include - /* Max length of an input line. */ #define MAX_LINE_LEN 1024 diff --git a/src/language/stats/correlations.q b/src/language/stats/correlations.q index 830ae37b..cf230067 100644 --- a/src/language/stats/correlations.q +++ b/src/language/stats/correlations.q @@ -29,8 +29,6 @@ #include /* (headers) */ -#include - struct cor_set { struct cor_set *next; diff --git a/src/language/stats/crosstabs.q b/src/language/stats/crosstabs.q index d6de3052..8f1e42b4 100644 --- a/src/language/stats/crosstabs.q +++ b/src/language/stats/crosstabs.q @@ -60,8 +60,6 @@ /* (headers) */ -#include - /* (specification) crosstabs (crs_): *^tables=custom; diff --git a/src/language/stats/frequencies.q b/src/language/stats/frequencies.q index 375530bc..5de38ad5 100644 --- a/src/language/stats/frequencies.q +++ b/src/language/stats/frequencies.q @@ -62,8 +62,6 @@ /* (headers) */ -#include - /* (specification) FREQUENCIES (frq_): *variables=custom; diff --git a/src/language/stats/means.q b/src/language/stats/means.q index 51644ac8..96c1d703 100644 --- a/src/language/stats/means.q +++ b/src/language/stats/means.q @@ -35,8 +35,6 @@ /* (headers) */ -#include - /* (specification) means (mns_): *tables=custom; diff --git a/src/language/utilities/title.c b/src/language/utilities/title.c index 15e5a404..d494e35e 100644 --- a/src/language/utilities/title.c +++ b/src/language/utilities/title.c @@ -34,8 +34,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - static int get_title (const char *cmd, char **title); int @@ -56,7 +54,6 @@ get_title (const char *cmd, char **title) int c; c = lex_look_ahead (); - debug_printf ((_("%s before: %s\n"), cmd, *title ? *title : _(""))); if (c == '"' || c == '\'') { lex_get (); @@ -84,7 +81,6 @@ get_title (const char *cmd, char **title) *cp = toupper ((unsigned char) (*cp)); token = '.'; } - debug_printf ((_("%s after: %s\n"), cmd, *title)); return CMD_SUCCESS; } diff --git a/src/language/xforms/sample.c b/src/language/xforms/sample.c index fc463123..fd5bd5ec 100644 --- a/src/language/xforms/sample.c +++ b/src/language/xforms/sample.c @@ -34,8 +34,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* The two different types of samples. */ enum { diff --git a/src/libpspp/automake.mk b/src/libpspp/automake.mk index 6e988a9d..40e57d61 100644 --- a/src/libpspp/automake.mk +++ b/src/libpspp/automake.mk @@ -12,7 +12,6 @@ src_libpspp_libpspp_a_SOURCES = \ src/libpspp/copyleft.c \ src/libpspp/copyleft.h \ src/libpspp/compiler.h \ - src/libpspp/debug-print.h \ src/libpspp/freaderror.c \ src/libpspp/freaderror.h \ src/libpspp/hash.c \ diff --git a/src/libpspp/debug-print.h b/src/libpspp/debug-print.h deleted file mode 100644 index 061b2195..00000000 --- a/src/libpspp/debug-print.h +++ /dev/null @@ -1,54 +0,0 @@ -/* This file can be included multiple times. It redeclares its macros - appropriately each time, like assert.h. */ - -#undef debug_printf -#undef debug_puts -#undef debug_putc - -#if DEBUGGING - -#define debug_printf(args) \ - do \ - { \ - printf args; \ - fflush (stdout); \ - } \ - while (0) - -#define debug_puts(string) \ - do \ - { \ - puts (string); \ - fflush (stdout); \ - } \ - while (0) - -#define debug_putc(char, stream) \ - do \ - { \ - putc (char, stream); \ - fflush (stdout); \ - } \ - while (0) - -#else /* !DEBUGGING */ - -#define debug_printf(args) \ - do \ - { \ - } \ - while (0) - -#define debug_puts(string) \ - do \ - { \ - } \ - while (0) - -#define debug_putc(char, stream) \ - do \ - { \ - } \ - while (0) - -#endif /* !DEBUGGING */ diff --git a/src/math/sort.c b/src/math/sort.c index 4d64b324..c20b809a 100644 --- a/src/math/sort.c +++ b/src/math/sort.c @@ -41,8 +41,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* These should only be changed for testing purposes. */ int min_buffers = 64; int max_buffers = INT_MAX; diff --git a/src/output/manager.c b/src/output/manager.c index 8fd90a5e..ff65e084 100644 --- a/src/output/manager.c +++ b/src/output/manager.c @@ -23,7 +23,6 @@ #include #include #include "output.h" -#include /* Table. */ int table_num = 1; diff --git a/src/output/table.c b/src/output/table.c index a9fc3743..42361702 100644 --- a/src/output/table.c +++ b/src/output/table.c @@ -37,8 +37,6 @@ #include "gettext.h" #define _(msgid) gettext (msgid) - -#include struct som_table_class tab_table_class; static char *command_name; diff --git a/src/ui/terminal/main.c b/src/ui/terminal/main.c index 84cd2a6d..69a7b12b 100644 --- a/src/ui/terminal/main.c +++ b/src/ui/terminal/main.c @@ -55,8 +55,6 @@ #include -#include - static void i18n_init (void); static void fpu_init (void); static void handle_error (int code);