pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] Changes to pspp/src/list.q


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/list.q
Date: Mon, 02 May 2005 02:21:35 -0400

Index: pspp/src/list.q
diff -u pspp/src/list.q:1.14 pspp/src/list.q:1.15
--- pspp/src/list.q:1.14        Fri Apr 29 01:02:15 2005
+++ pspp/src/list.q     Mon May  2 06:21:20 2005
@@ -517,8 +517,9 @@
     {
       int column;      /* Current column. */
       int width;       /* Accumulated width. */
+      int height;       /* Height of vertical names. */
       int max_width;   /* Page width. */
-      
+
       struct list_ext *prc;
 
       if (d->class == &html_class)
@@ -557,14 +558,19 @@
        }
 
       /* Try layout #2. */
-      for (width = cmd.n_variables - 1, column = 0;
+      for (width = cmd.n_variables - 1, height = 0, column = 0;
           column < cmd.n_variables && width <= max_width;
-          column++)
-         width += cmd.v_variables[column]->print.w;
+          column++) 
+        {
+          struct variable *v = cmd.v_variables[column];
+          width += v->print.w;
+          if (strlen (v->name) > height)
+            height = strlen (v->name);
+        }
       
       /* If it fit then we need to determine how many labels can be
          written horizontally. */
-      if (width <= max_width)
+      if (width <= max_width && height <= SHORT_NAME_LEN)
        {
 #ifndef NDEBUG
          prc->n_vertical = -1;




reply via email to

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