pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/print.c


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/print.c
Date: Sun, 23 Oct 2005 22:52:11 -0400

Index: pspp/src/print.c
diff -u pspp/src/print.c:1.21 pspp/src/print.c:1.22
--- pspp/src/print.c:1.21       Sun Jul 31 21:42:46 2005
+++ pspp/src/print.c    Mon Oct 24 02:51:32 2005
@@ -249,8 +249,8 @@
 static struct
   {
     struct variable **v;               /* variable list */
-    int nv;                    /* number of variables in list */
-    int cv;                    /* number of variables from list used up so far
+    size_t nv;                 /* number of variables in list */
+    size_t cv;                 /* number of variables from list used up so far
                                   by the FORTRAN-like format specifiers */
 
     int recno;                 /* current 1-based record number */
@@ -452,7 +452,7 @@
   else
     {
       /* User wants dictionary format specifiers. */
-      int i;
+      size_t i;
 
       lex_match ('*');
       for (i = 0; i < fx.nv; i++)
@@ -500,9 +500,9 @@
 static int
 fixed_parse_compatible (void)
 {
-  int dividend;
+  int individual_var_width;
   int type;
-  int i;
+  size_t i;
 
   type = fx.v[0]->type;
   for (i = 1; i < fx.nv; i++)
@@ -610,13 +610,14 @@
 
   if ((fx.lc - fx.fc + 1) % fx.nv)
     {
-      msg (SE, _("The %d columns %d-%d can't be evenly divided into %d "
-                "fields."), fx.lc - fx.fc + 1, fx.fc + 1, fx.lc + 1, fx.nv);
+      msg (SE, _("The %d columns %d-%d can't be evenly divided into %u "
+                "fields."),
+           fx.lc - fx.fc + 1, fx.fc + 1, fx.lc + 1, (unsigned) fx.nv);
       return 0;
     }
 
-  dividend = (fx.lc - fx.fc + 1) / fx.nv;
-  fx.spec.u.v.f.w = dividend;
+  individual_var_width = (fx.lc - fx.fc + 1) / fx.nv;
+  fx.spec.u.v.f.w = individual_var_width;
   if (!check_output_specifier (&fx.spec.u.v.f, true)
       || !check_specifier_type (&fx.spec.u.v.f, type, true))
     return 0;
@@ -630,7 +631,7 @@
   fx.spec.type = PRT_VAR;
   for (i = 0; i < fx.nv; i++)
     {
-      fx.spec.fc = fx.fc + dividend * i;
+      fx.spec.fc = fx.fc + individual_var_width * i;
       fx.spec.u.v.v = fx.v[i];
       append_var_spec (&fx.spec);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]