projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an appropriate help page for the Variable Info dialog box
[pspp]
/
perl-module
/
PSPP.xs
diff --git
a/perl-module/PSPP.xs
b/perl-module/PSPP.xs
index 0895f641a8577570fe5aff2a011d356fc1cf72f8..dbdc73a106f0311ca6669b49927cca4000aa64fb 100644
(file)
--- a/
perl-module/PSPP.xs
+++ b/
perl-module/PSPP.xs
@@
-1,5
+1,5
@@
/* PSPP - computes sample statistics.
/* PSPP - computes sample statistics.
- Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013
, 2014
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
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@
-46,7
+46,6
@@
#include <data/identifier.h>
#include <data/settings.h>
#include <data/sys-file-writer.h>
#include <data/identifier.h>
#include <data/settings.h>
#include <data/sys-file-writer.h>
-#include <data/sys-file-reader.h>
#include <data/value.h>
#include <data/vardict.h>
#include <data/value-labels.h>
#include <data/value.h>
#include <data/vardict.h>
#include <data/value-labels.h>
@@
-78,7
+77,7
@@
struct syswriter_info
/* A thin wrapper around sfm_reader */
struct sysreader_info
{
/* A thin wrapper around sfm_reader */
struct sysreader_info
{
- struct
sfm
_read_info opts;
+ struct
any
_read_info opts;
/* A pointer to the reader. The reader is owned by the struct */
struct casereader *reader;
/* A pointer to the reader. The reader is owned by the struct */
struct casereader *reader;
@@
-424,7
+423,7
@@
set_label (var, label)
struct variable *var;
char *label
CODE:
struct variable *var;
char *label
CODE:
- var_set_label (var, label
, false
);
+ var_set_label (var, label);
void
void
@@
-632,12
+631,14
@@
INIT:
SV** version = hv_fetch(opt_h, "version", 7, 0);
opts.create_writeable = readonly ? ! SvIV (*readonly) : true;
SV** version = hv_fetch(opt_h, "version", 7, 0);
opts.create_writeable = readonly ? ! SvIV (*readonly) : true;
- opts.compress = compress ? SvIV (*compress) : false;
+ opts.compression = (compress && SvIV (*compress)
+ ? ANY_COMP_SIMPLE
+ : ANY_COMP_NONE);
opts.version = version ? SvIV (*version) : 3 ;
}
CODE:
struct file_handle *fh =
opts.version = version ? SvIV (*version) : 3 ;
}
CODE:
struct file_handle *fh =
-
fh_create_file (NULL, name
, fh_default_properties () );
+
fh_create_file (NULL, name, "UTF-8"
, fh_default_properties () );
struct syswriter_info *swi = xmalloc (sizeof (*swi));
swi->writer = sfm_open_writer (fh, dict->dict, opts);
swi->dict = dict;
struct syswriter_info *swi = xmalloc (sizeof (*swi));
swi->writer = sfm_open_writer (fh, dict->dict, opts);
swi->dict = dict;
@@
-751,13
+752,12
@@
CODE:
struct casereader *reader;
struct sysreader_info *sri = NULL;
struct file_handle *fh =
struct casereader *reader;
struct sysreader_info *sri = NULL;
struct file_handle *fh =
-
fh_create_file (NULL, name
, fh_default_properties () );
+
fh_create_file (NULL, name, "UTF-8"
, fh_default_properties () );
struct dictionary *dict;
sri = xmalloc (sizeof (*sri));
struct dictionary *dict;
sri = xmalloc (sizeof (*sri));
- sri->reader = sfm_open_reader (fh, NULL, &dict, &sri->opts);
-
- if ( sri->reader != NULL)
+ sri->reader = any_reader_open_and_decode (fh, NULL, &dict, &sri->opts);
+ if (sri->reader)
sri->dict = create_pspp_dict (dict);
else
{
sri->dict = create_pspp_dict (dict);
else
{