projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added the ECHO command.
[pspp-builds.git]
/
src
/
numeric.c
diff --git
a/src/numeric.c
b/src/numeric.c
index 1619a99af342236c7ccc78b0fb7e8adaaf794d3d..ee8ec552ef60ebd29213ee8fd526802222c6f637 100644
(file)
--- a/
src/numeric.c
+++ b/
src/numeric.c
@@
-18,10
+18,10
@@
02111-1307, USA. */
#include <config.h>
02111-1307, USA. */
#include <config.h>
-#include
<assert.h>
+#include
"error.h"
#include <stdlib.h>
#include <stdlib.h>
-#include "cases.h"
#include "command.h"
#include "command.h"
+#include "dictionary.h"
#include "error.h"
#include "lexer.h"
#include "str.h"
#include "error.h"
#include "lexer.h"
#include "str.h"
@@
-43,7
+43,6
@@
cmd_numeric (void)
be used. */
struct fmt_spec f;
be used. */
struct fmt_spec f;
- lex_match_id ("NUMERIC");
do
{
if (!parse_DATA_LIST_vars (&v, &nv, PV_NONE))
do
{
if (!parse_DATA_LIST_vars (&v, &nv, PV_NONE))
@@
-80,7
+79,6
@@
cmd_numeric (void)
{
if (f.type != -1)
new_var->print = new_var->write = f;
{
if (f.type != -1)
new_var->print = new_var->write = f;
- envector (new_var);
}
}
}
}
@@
-118,7
+116,6
@@
cmd_string (void)
/* Width of variables to create. */
int width;
/* Width of variables to create. */
int width;
- lex_match_id ("STRING");
do
{
if (!parse_DATA_LIST_vars (&v, &nv, PV_NONE))
do
{
if (!parse_DATA_LIST_vars (&v, &nv, PV_NONE))
@@
-150,6
+147,7
@@
cmd_string (void)
break;
default:
assert (0);
break;
default:
assert (0);
+ abort ();
}
/* Create each variable. */
}
/* Create each variable. */
@@
-160,10
+158,7
@@
cmd_string (void)
if (!new_var)
msg (SE, _("There is already a variable named %s."), v[i]);
else
if (!new_var)
msg (SE, _("There is already a variable named %s."), v[i]);
else
- {
- new_var->print = new_var->write = f;
- envector (new_var);
- }
+ new_var->print = new_var->write = f;
}
/* Clean up. */
}
/* Clean up. */
@@
-193,16
+188,14
@@
cmd_leave (void)
int i;
int i;
- lex_match_id ("LEAVE");
if (!parse_variables (default_dict, &v, &nv, PV_NONE))
return CMD_FAILURE;
for (i = 0; i < nv; i++)
{
if (!parse_variables (default_dict, &v, &nv, PV_NONE))
return CMD_FAILURE;
for (i = 0; i < nv; i++)
{
- if (
v[i]->lef
t)
+ if (
!v[i]->reini
t)
continue;
continue;
- devector (v[i]);
- v[i]->left = 1;
- envector (v[i]);
+ v[i]->reinit = 0;
+ v[i]->init = 1;
}
free (v);
}
free (v);