projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed problem reading long string continuation records.
[pspp]
/
src
/
apply-dict.c
diff --git
a/src/apply-dict.c
b/src/apply-dict.c
index 9f6867cc4ea3da247a04a677dbd9b8733126edab..661628f1244ebfd835db645369c742ad661173ed 100644
(file)
--- a/
src/apply-dict.c
+++ b/
src/apply-dict.c
@@
-14,17
+14,18
@@
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 <stdlib.h>
#include "command.h"
#include <config.h>
#include <stdlib.h>
#include "command.h"
+#include "dictionary.h"
#include "error.h"
#include "file-handle.h"
#include "hash.h"
#include "lexer.h"
#include "error.h"
#include "file-handle.h"
#include "hash.h"
#include "lexer.h"
-#include "sfm.h"
+#include "sfm
-read
.h"
#include "str.h"
#include "value-labels.h"
#include "var.h"
#include "str.h"
#include "value-labels.h"
#include "var.h"
@@
-36,6
+37,7
@@
int
cmd_apply_dictionary (void)
{
struct file_handle *handle;
cmd_apply_dictionary (void)
{
struct file_handle *handle;
+ struct sfm_reader *reader;
struct dictionary *dict;
int n_matched = 0;
struct dictionary *dict;
int n_matched = 0;
@@
-44,13
+46,14
@@
cmd_apply_dictionary (void)
lex_match_id ("FROM");
lex_match ('=');
lex_match_id ("FROM");
lex_match ('=');
- handle = fh_parse
_file_handle
();
+ handle = fh_parse ();
if (!handle)
return CMD_FAILURE;
if (!handle)
return CMD_FAILURE;
-
dict = sfm_read_dictionary (handle
, NULL);
+
reader = sfm_open_reader (handle, &dict
, NULL);
if (dict == NULL)
return CMD_FAILURE;
if (dict == NULL)
return CMD_FAILURE;
+ sfm_close_reader (reader);
for (i = 0; i < dict_get_var_cnt (dict); i++)
{
for (i = 0; i < dict_get_var_cnt (dict); i++)
{
@@
-170,7
+173,7
@@
cmd_apply_dictionary (void)
dict_set_weight (default_dict, new_weight);
}
dict_set_weight (default_dict, new_weight);
}
- sfm_
maybe_close (handle
);
+ sfm_
close_reader (reader
);
return lex_end_of_command ();
}
return lex_end_of_command ();
}