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: sav-api~1991 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77e551d23575da6b89f866612ab39c2b0497c9be;p=pspp 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 6f1daa73bc..8502ffae60 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 cc3a3e4077..44fd7995f6 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 79c7042446..78668b7aed 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 d81dd0762e..cbfc04ceab 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 c4fec4b0ed..3f385223e5 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 c7c7dd2f21..98b7b76426 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 5f3e26bdb6..58a885ae4a 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 21b06139fe..5ba525cbfe 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 6cfbb6bba5..933c9134bf 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 db7fc3bf8d..6609e32b91 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 0a4baf6774..8d9dd2074d 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 052dbeabbb..78e91c3dde 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 06b6c38625..1fcf0f0963 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 b212efeb30..4e1f8a18c3 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 8dc3f00a92..4db8f90a61 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 6aaada8e73..217f0f8928 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 d6eb8bfbc1..79a6711ea3 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 3bcf24d3ad..fde8ba473c 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 4800ac8694..3e3d7651db 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 c1b6e1e7b8..e5e3e69fff 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 bc171a296e..acf5f054e5 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 72ce7addc9..ec369dbcb5 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 830ae37b1c..cf23006768 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 d6de30528a..8f1e42b430 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 375530bc85..5de38ad5f0 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 51644ac8a4..96c1d703e3 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 15e5a40498..d494e35e8e 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 fc463123d2..fd5bd5ec40 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 6e988a9d4f..40e57d6163 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 061b2195d0..0000000000 --- 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 4d64b32474..c20b809ace 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 8fd90a5e26..ff65e08453 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 a9fc3743a6..42361702b5 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 84cd2a6d56..69a7b12bc2 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);