X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fcontrol%2Frepeat.c;h=b2c2bb413e501bda41721c95b8ded972fd02950b;hb=ab90b7f68c2151df4caaf376c7200443d1cf9f5e;hp=4f63ec69bade5f437538dc30515b3e225545fb64;hpb=8e9c78dba65f3605c4e6d483b0f9e8c63342fee4;p=pspp diff --git a/src/language/control/repeat.c b/src/language/control/repeat.c index 4f63ec69ba..b2c2bb413e 100644 --- a/src/language/control/repeat.c +++ b/src/language/control/repeat.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2007, 2009-2012 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 @@ -30,8 +30,10 @@ #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" +#include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" +#include "libpspp/misc.h" #include "gl/ftoastr.h" #include "gl/minmax.h" @@ -77,7 +79,7 @@ cmd_do_repeat (struct lexer *lexer, struct dataset *ds) static unsigned int hash_dummy (const char *name, size_t name_len) { - return hash_case_bytes (name, name_len, 0); + return utf8_hash_case_bytes (name, name_len, 0); } static const struct dummy_var * @@ -87,7 +89,7 @@ find_dummy_var (struct hmap *hmap, const char *name, size_t name_len) HMAP_FOR_EACH_WITH_HASH (dv, struct dummy_var, hmap_node, hash_dummy (name, name_len), hmap) - if (strcasecmp (dv->name, name)) + if (utf8_strcasecmp (dv->name, name)) return dv; return NULL; @@ -249,7 +251,6 @@ parse_commands (struct lexer *lexer, struct hmap *dummies) enum segmenter_mode mode; struct string *outputs; struct string input; - size_t input_len; size_t n_values; char *file_name; int line_number; @@ -272,7 +273,6 @@ parse_commands (struct lexer *lexer, struct hmap *dummies) if (ds_is_empty (&input)) ds_put_byte (&input, '\n'); ds_put_byte (&input, '\0'); - input_len = ds_length (&input); n_values = count_values (dummies); outputs = xmalloc (n_values * sizeof *outputs); @@ -401,7 +401,7 @@ parse_numbers (struct lexer *lexer, struct dummy_var *dv) { char s[DBL_BUFSIZE_BOUND]; - dtoastr (s, sizeof s, 0, 0, lex_number (lexer)); + c_dtoastr (s, sizeof s, 0, 0, lex_number (lexer)); add_replacement (dv, xstrdup (s), &allocated); lex_get (lexer); }