Remove "Written by Ben Pfaff <blp@gnu.org>" lines everywhere.
[pspp-builds.git] / src / language / data-io / print.c
index f15bcdcb7d7cb4b1d3afccacdc0c0b0bc29b47f9..91a3f27bfd5ca76b98a34b9f1eabca16056b2adb 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -334,7 +333,9 @@ parse_variable_argument (struct lexer *lexer, const struct dictionary *dict,
       for (i = 0; i < var_cnt; i++) 
         {
           struct variable *v = vars[i];
-          formats[i] = which_formats == PRINT ? v->print : v->write; 
+          formats[i] = (which_formats == PRINT
+                        ? *var_get_print_format (v)
+                        : *var_get_write_format (v));
         }
       add_space = which_formats == PRINT;
     }
@@ -347,7 +348,7 @@ parse_variable_argument (struct lexer *lexer, const struct dictionary *dict,
         struct prt_out_spec *spec;
 
         var = vars[var_idx++];
-        if (!fmt_check_width_compat (f, var->width))
+        if (!fmt_check_width_compat (f, var_get_width (var)))
           return false;
 
         spec = pool_alloc (trns->pool, sizeof *spec);
@@ -363,7 +364,7 @@ parse_variable_argument (struct lexer *lexer, const struct dictionary *dict,
            filled with spaces, instead of using the normal format
            that usually contains a period. */ 
         spec->sysmis_as_spaces = (which_formats == WRITE
-                                  && var->type == NUMERIC
+                                  && var_is_numeric (var)
                                   && (fmt_get_category (spec->format.type)
                                       != FMT_CAT_BINARY));
 
@@ -410,7 +411,7 @@ dump_table (struct print_trns *trns, const struct file_handle *fh)
           width = ds_length (&spec->string);
           break;
         case PRT_VAR:
-          tab_text (t, 0, row, TAB_LEFT, spec->var->name);
+          tab_text (t, 0, row, TAB_LEFT, var_get_name (spec->var));
           tab_text (t, 3, row, TAB_LEFT | TAB_FIX,
                     fmt_to_string (&spec->format, fmt_string));
           width = spec->format.w;
@@ -458,7 +459,7 @@ print_trns_proc (void *trns_, struct ccase *c, casenumber case_num UNUSED)
       ds_set_length (&trns->line, spec->first_column, ' ');
       if (spec->type == PRT_VAR)
         {
-          const union value *input = case_data (c, spec->var->fv);
+          const union value *input = case_data (c, spec->var);
           char *output = ds_put_uninit (&trns->line, spec->format.w);
           if (!spec->sysmis_as_spaces || input->f != SYSMIS)
             data_out (input, &spec->format, output);