projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made var_is_valid_name more permissive.
[pspp]
/
src
/
data
/
sys-file-reader.c
diff --git
a/src/data/sys-file-reader.c
b/src/data/sys-file-reader.c
index c80bd5f557246cead2e3cc0feeb743834a48d0f5..84d7f83c4c422a502272ec47039aeb3bb5889b18 100644
(file)
--- a/
src/data/sys-file-reader.c
+++ b/
src/data/sys-file-reader.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2007
, 2009
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-744,7
+744,11
@@
read_extension_record (struct sfm_reader *r, struct dictionary *dict,
break;
case 7:
break;
case 7:
- /* Unknown purpose. */
+ /* Used by the MRSETS command. */
+ break;
+
+ case 8:
+ /* Used by the SPSS Data Entry software. */
break;
case 11:
break;
case 11:
@@
-784,7
+788,8
@@
read_extension_record (struct sfm_reader *r, struct dictionary *dict,
break;
default:
break;
default:
- sys_warn (r, _("Unrecognized record type 7, subtype %d."), subtype);
+ sys_warn (r, _("Unrecognized record type 7, subtype %d. Please send a copy of this file, and the syntax which created it to %s"),
+ subtype, PACKAGE_BUGREPORT);
break;
}
break;
}
@@
-1304,24
+1309,24
@@
static bool read_compressed_string (struct sfm_reader *, char *);
static bool read_whole_strings (struct sfm_reader *, char *, size_t);
static bool skip_whole_strings (struct sfm_reader *, size_t);
static bool read_whole_strings (struct sfm_reader *, char *, size_t);
static bool skip_whole_strings (struct sfm_reader *, size_t);
-/* Reads one case from READER's file into C. Returns true only
- if successful. */
-static bool
-sys_file_casereader_read (struct casereader *reader, void *r_,
- struct ccase *c)
+/* Reads and returns one case from READER's file. Returns a null
+ pointer if not successful. */
+static struct ccase *
+sys_file_casereader_read (struct casereader *reader, void *r_)
{
struct sfm_reader *r = r_;
{
struct sfm_reader *r = r_;
+ struct ccase *volatile c;
int i;
if (r->error)
int i;
if (r->error)
- return
false
;
+ return
NULL
;
- c
ase_create (c,
r->value_cnt);
+ c
= case_create (
r->value_cnt);
if (setjmp (r->bail_out))
{
casereader_force_error (reader);
if (setjmp (r->bail_out))
{
casereader_force_error (reader);
- case_
destroy
(c);
- return
false
;
+ case_
unref
(c);
+ return
NULL
;
}
for (i = 0; i < r->sfm_var_cnt; i++)
}
for (i = 0; i < r->sfm_var_cnt; i++)
@@
-1342,15
+1347,15
@@
sys_file_casereader_read (struct casereader *reader, void *r_,
partial_record (r);
}
}
partial_record (r);
}
}
- return
true
;
+ return
c
;
eof:
eof:
- case_
destroy
(c);
+ case_
unref
(c);
if (i != 0)
partial_record (r);
if (r->case_cnt != -1)
read_error (reader, r);
if (i != 0)
partial_record (r);
if (r->case_cnt != -1)
read_error (reader, r);
- return
false
;
+ return
NULL
;
}
/* Issues an error that R ends in a partial record. */
}
/* Issues an error that R ends in a partial record. */