projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed some vertical whitespace and added some horizontal
[pspp]
/
src
/
list.q
diff --git
a/src/list.q
b/src/list.q
index 45046a026d21731a6dd70f4c8ef6d668d84e4f2c..952283bc7b899c8f18f94589e39aabe12c380511 100644
(file)
--- a/
src/list.q
+++ b/
src/list.q
@@
-17,29
+17,13
@@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* AIX requires this to be the first thing in the file. */
#include <config.h>
#include <config.h>
-#if __GNUC__
-#define alloca __builtin_alloca
-#else
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#else
-#ifdef _AIX
-#pragma alloca
-#else
-#ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#endif
-#endif
-#endif
-#endif
-
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
+#include "devind.h"
#include "lexer.h"
#include "error.h"
#include "magic.h"
#include "lexer.h"
#include "error.h"
#include "magic.h"
@@
-47,12
+31,11
@@
char *alloca ();
#include "htmlP.h"
#include "output.h"
#include "som.h"
#include "htmlP.h"
#include "output.h"
#include "som.h"
+#include "tab.h"
#include "var.h"
#include "vfm.h"
#include "format.h"
#include "var.h"
#include "vfm.h"
#include "format.h"
-#undef DEBUGGING
-/*#define DEBUGGING 1*/
#include "debug-print.h"
#if DEBUGGING
#include "debug-print.h"
#if DEBUGGING
@@
-154,8
+137,8
@@
cmd_list (void)
if (cmd.last == NOT_LONG)
cmd.last = LONG_MAX;
if (!cmd.sbc_variables)
if (cmd.last == NOT_LONG)
cmd.last = LONG_MAX;
if (!cmd.sbc_variables)
-
fill_all_vars (
&cmd.v_variables, &cmd.n_variables,
-
FV_NO_SYSTEM | FV_NO_SCRATCH
);
+
dict_get_vars (default_dict,
&cmd.v_variables, &cmd.n_variables,
+
(1u << DC_SYSTEM) | (1u << DC_SCRATCH)
);
if (cmd.n_variables == 0)
{
msg (SE, _("No variables specified."));
if (cmd.n_variables == 0)
{
msg (SE, _("No variables specified."));
@@
-194,13
+177,12
@@
cmd_list (void)
/* Weighting variable. */
if (cmd.weight == LST_WEIGHT)
{
/* Weighting variable. */
if (cmd.weight == LST_WEIGHT)
{
- update_weighting (&default_dict);
- if (default_dict.weight_index != -1)
+ if (dict_get_weight (default_dict) != NULL)
{
int i;
for (i = 0; i < cmd.n_variables; i++)
{
int i;
for (i = 0; i < cmd.n_variables; i++)
- if (cmd.v_variables[i]
->index == default_dict.weight_index
)
+ if (cmd.v_variables[i]
== dict_get_weight (default_dict)
)
break;
if (i >= cmd.n_variables)
{
break;
if (i >= cmd.n_variables)
{
@@
-210,7
+192,7
@@
cmd_list (void)
(cmd.n_variables
* sizeof *cmd.v_variables));
cmd.v_variables[cmd.n_variables - 1]
(cmd.n_variables
* sizeof *cmd.v_variables));
cmd.v_variables[cmd.n_variables - 1]
-
= default_dict.var[default_dict.weight_index]
;
+
= dict_get_weight (default_dict)
;
}
}
else
}
}
else
@@
-271,7
+253,7
@@
write_all_headers (void)
{
struct html_driver_ext *x = d->ext;
{
struct html_driver_ext *x = d->ext;
- assert (d->driver_open
&& d->page_open
);
+ assert (d->driver_open);
if (x->sequence_no == 0 && !d->class->open_page (d))
{
msg (ME, _("Cannot open first page on HTML device %s."),
if (x->sequence_no == 0 && !d->class->open_page (d))
{
msg (ME, _("Cannot open first page on HTML device %s."),
@@
-291,6
+273,10
@@
write_all_headers (void)
fputs (" <TR>\n", x->file.file);
}
fputs (" <TR>\n", x->file.file);
}
+ else if (d->class == &devind_class)
+ {
+ /* FIXME */
+ }
else
assert (0);
}
else
assert (0);
}
@@
-409,6
+395,10
@@
clean_up (void)
fputs ("</TABLE>\n", x->file.file);
}
}
fputs ("</TABLE>\n", x->file.file);
}
}
+ else if (d->class == &devind_class)
+ {
+ /* FIXME */
+ }
else
assert (0);
else
assert (0);
@@
-540,6
+530,12
@@
determine_layout (void)
if (d->class == &html_class)
continue;
if (d->class == &html_class)
continue;
+ else if (d->class == &devind_class)
+ {
+ /* FIXME */
+ tab_output_text (TAT_NONE, "(devind not supported on LIST yet)");
+ continue;
+ }
assert (d->class->special == 0);
assert (d->class->special == 0);
@@
-729,6
+725,10
@@
list_cases (struct ccase *c)
fputs (" </TR>\n", x->file.file);
}
fputs (" </TR>\n", x->file.file);
}
+ else if (d->class == &devind_class)
+ {
+ /* FIXME */
+ }
else
assert (0);
else
assert (0);
@@
-753,20
+753,20
@@
debug_print (void)
fputs (cmd.v_variables[i]->name, stdout);
}
fputs (cmd.v_variables[i]->name, stdout);
}
- printf ("\n /CASES=FROM %ld TO %ld BY %ld\n",
first, last,
step);
+ printf ("\n /CASES=FROM %ld TO %ld BY %ld\n",
cmd.first, cmd.last, cmd.
step);
fputs (" /FORMAT=", stdout);
fputs (" /FORMAT=", stdout);
- if (
numbering ==
NUMBERED)
+ if (
cmd.numbering == LST_
NUMBERED)
fputs ("NUMBERED", stdout);
else
fputs ("UNNUMBERED", stdout);
putc (' ', stdout);
fputs ("NUMBERED", stdout);
else
fputs ("UNNUMBERED", stdout);
putc (' ', stdout);
- if (
wrap ==
WRAP)
+ if (
cmd.wrap == LST_
WRAP)
fputs ("WRAP", stdout);
else
fputs ("SINGLE", stdout);
putc (' ', stdout);
fputs ("WRAP", stdout);
else
fputs ("SINGLE", stdout);
putc (' ', stdout);
- if (
weight ==
WEIGHT)
+ if (
cmd.weight == LST_
WEIGHT)
fputs ("WEIGHT", stdout);
else
fputs ("NOWEIGHT", stdout);
fputs ("WEIGHT", stdout);
else
fputs ("NOWEIGHT", stdout);