projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix broken expose callback in pspp-sheet-view
[pspp]
/
src
/
data
/
sys-file-reader.c
diff --git
a/src/data/sys-file-reader.c
b/src/data/sys-file-reader.c
index 4a7476ae04840dfadf31103bde26e0f3bf1edd7a..35f40d3dbc4755f3365b8549fd2966f121f1f259 100644
(file)
--- a/
src/data/sys-file-reader.c
+++ b/
src/data/sys-file-reader.c
@@
-50,6
+50,7
@@
#include "libpspp/str.h"
#include "libpspp/stringi-set.h"
#include "libpspp/str.h"
#include "libpspp/stringi-set.h"
+#include "gl/c-strtod.h"
#include "gl/c-ctype.h"
#include "gl/inttostr.h"
#include "gl/localcharset.h"
#include "gl/c-ctype.h"
#include "gl/inttostr.h"
#include "gl/localcharset.h"
@@
-1437,7
+1438,7
@@
parse_mrsets (struct sfm_reader *r, const struct sfm_extension_record *record,
mrset->width = width;
value_init (&mrset->counted, width);
if (width == 0)
mrset->width = width;
value_init (&mrset->counted, width);
if (width == 0)
- mrset->counted.f = strtod (counted, NULL);
+ mrset->counted.f =
c_
strtod (counted, NULL);
else
value_copy_str_rpad (&mrset->counted, width,
(const uint8_t *) counted, ' ');
else
value_copy_str_rpad (&mrset->counted, width,
(const uint8_t *) counted, ' ');
@@
-1572,7
+1573,8
@@
parse_long_var_name_map (struct sfm_reader *r,
if (record == NULL)
{
if (record == NULL)
{
- /* Convert variable names to lowercase. */
+ /* There are no long variable names. Use the short variable names,
+ converted to lowercase, as the long variable names. */
size_t i;
for (i = 0; i < dict_get_var_cnt (dict); i++)
size_t i;
for (i = 0; i < dict_get_var_cnt (dict); i++)
@@
-1580,11
+1582,8
@@
parse_long_var_name_map (struct sfm_reader *r,
struct variable *var = dict_get_var (dict, i);
char *new_name;
struct variable *var = dict_get_var (dict, i);
char *new_name;
- new_name = xstrdup (var_get_name (var));
- str_lowercase (new_name);
-
+ new_name = utf8_to_lower (var_get_name (var));
rename_var_and_save_short_names (dict, var, new_name);
rename_var_and_save_short_names (dict, var, new_name);
-
free (new_name);
}
free (new_name);
}
@@
-1609,7
+1608,7
@@
parse_long_var_name_map (struct sfm_reader *r,
}
/* Identify any duplicates. */
}
/* Identify any duplicates. */
- if (strcasecmp (var_get_short_name (var, 0), long_name)
+ if (
utf8_
strcasecmp (var_get_short_name (var, 0), long_name)
&& dict_lookup_var (dict, long_name) != NULL)
{
sys_warn (r, record->pos,
&& dict_lookup_var (dict, long_name) != NULL)
{
sys_warn (r, record->pos,