projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Makefile.am: Add pspp-mode.el to EXTRA_DIST.
[pspp]
/
src
/
list.q
diff --git
a/src/list.q
b/src/list.q
index 0ab9188955cdc91bbf9c94b811bfd008ffcd5ebd..97f5372d02584e96bdcf77867ce470e45c7f592a 100644
(file)
--- a/
src/list.q
+++ b/
src/list.q
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include <config.h>
#include "error.h"
#include <config.h>
#include "error.h"
@@
-25,6
+25,7
@@
#include "case.h"
#include "command.h"
#include "devind.h"
#include "case.h"
#include "command.h"
#include "devind.h"
+#include "dictionary.h"
#include "lexer.h"
#include "error.h"
#include "magic.h"
#include "lexer.h"
#include "error.h"
#include "magic.h"
@@
-36,6
+37,7
@@
#include "var.h"
#include "vfm.h"
#include "format.h"
#include "var.h"
#include "vfm.h"
#include "format.h"
+/* (headers) */
#include "debug-print.h"
#include "debug-print.h"
@@
-202,9
+204,9
@@
cmd_list (void)
strcpy (casenum_var.name, "Case#");
casenum_var.type = NUMERIC;
casenum_var.fv = -1;
strcpy (casenum_var.name, "Case#");
casenum_var.type = NUMERIC;
casenum_var.fv = -1;
- casenum_var.print
.type = FMT_F;
- casenum_var.print.w = (cmd.last == LONG_MAX ? 5 : intlog10 (cmd.last));
-
casenum_var.print.d = 0
;
+ casenum_var.print
= make_output_format (FMT_F,
+ (cmd.last == LONG_MAX
+
? 5 : intlog10 (cmd.last)), 0)
;
/* Add the weight variable at the beginning of the variable list. */
cmd.n_variables++;
/* Add the weight variable at the beginning of the variable list. */
cmd.n_variables++;
@@
-515,8
+517,9
@@
determine_layout (void)
{
int column; /* Current column. */
int width; /* Accumulated width. */
{
int column; /* Current column. */
int width; /* Accumulated width. */
+ int height; /* Height of vertical names. */
int max_width; /* Page width. */
int max_width; /* Page width. */
-
+
struct list_ext *prc;
if (d->class == &html_class)
struct list_ext *prc;
if (d->class == &html_class)
@@
-555,14
+558,19
@@
determine_layout (void)
}
/* Try layout #2. */
}
/* 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 < 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 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;
{
#ifndef NDEBUG
prc->n_vertical = -1;