projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bug causing pspp to crash when computed variables had no format
[pspp]
/
src
/
file-type.c
diff --git
a/src/file-type.c
b/src/file-type.c
index b0ed4607f06625071ff2941f30dee15ad6939e79..1e647ecbabbc8c9102475a83194442c87c832e6c 100644
(file)
--- a/
src/file-type.c
+++ b/
src/file-type.c
@@
-21,7
+21,6
@@
#include <assert.h>
#include <stdlib.h>
#include "alloc.h"
#include <assert.h>
#include <stdlib.h>
#include "alloc.h"
-#include "approx.h"
#include "command.h"
#include "data-in.h"
#include "dfm.h"
#include "command.h"
#include "data-in.h"
#include "dfm.h"
@@
-284,15
+283,13
@@
cmd_file_type (void)
static void
create_col_var (struct col_spec *c)
{
static void
create_col_var (struct col_spec *c)
{
- int type;
int width;
int width;
- type = (formats[c->fmt].cat & FCAT_STRING) ? ALPHA : NUMERIC;
- if (type == ALPHA)
+ if (formats[c->fmt].cat & FCAT_STRING)
width = c->nc;
else
width = 0;
width = c->nc;
else
width = 0;
- c->v =
force_create_variable (&default_dict, c->name, typ
e, width);
+ c->v =
dict_create_var (default_dict, c->nam
e, width);
}
/* Parses variable, column, type specifications for a variable. */
}
/* Parses variable, column, type specifications for a variable. */
@@
-612,7
+609,8
@@
cmd_end_file_type (void)
/* Reads any number of cases into temp_case and calls write_case() for
each one. Compare data-list.c:read_from_data_list. */
static void
/* Reads any number of cases into temp_case and calls write_case() for
each one. Compare data-list.c:read_from_data_list. */
static void
-file_type_source_read (void)
+file_type_source_read (write_case_func *write_case UNUSED,
+ write_case_data wc_data UNUSED)
{
char *line;
int len;
{
char *line;
int len;
@@
-673,7
+671,7
@@
file_type_source_read (void)
if (iter->flags & RCT_OTHER)
goto found;
for (i = 0; i < iter->nv; i++)
if (iter->flags & RCT_OTHER)
goto found;
for (i = 0; i < iter->nv; i++)
- if (
approx_eq (iter->v[i].f, v.f)
)
+ if (
iter->v[i].f == v.f
)
goto found;
}
if (fty.wild)
goto found;
}
if (fty.wild)