projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug 12931
[pspp-builds.git]
/
src
/
expressions
/
parse.c
diff --git
a/src/expressions/parse.c
b/src/expressions/parse.c
index 7af90feb9b530c40634ae845e3411c89ac2cd7d8..15efe00bed59f56a8bddeeee0b3ef6fe374fb8cd 100644
(file)
--- a/
src/expressions/parse.c
+++ b/
src/expressions/parse.c
@@
-881,14
+881,14
@@
word_matches (const char **test, const char **name)
size_t name_len = strcspn (*name, ".");
if (test_len == name_len)
{
size_t name_len = strcspn (*name, ".");
if (test_len == name_len)
{
- if (m
emcmp
(*test, *name, test_len))
+ if (m
m_case_compare
(*test, *name, test_len))
return false;
}
else if (test_len < 3 || test_len > name_len)
return false;
else
{
return false;
}
else if (test_len < 3 || test_len > name_len)
return false;
else
{
- if (m
emcmp
(*test, *name, test_len))
+ if (m
m_case_compare
(*test, *name, test_len))
return false;
}
return false;
}
@@
-917,6
+917,12
@@
compare_names (const char *test, const char *name)
}
}
}
}
+static int
+compare_strings (const char *test, const char *name)
+{
+ return strcasecmp (test, name);
+}
+
static bool
lookup_function_helper (const char *name,
int (*compare) (const char *test, const char *name),
static bool
lookup_function_helper (const char *name,
int (*compare) (const char *test, const char *name),
@@
-947,7
+953,7
@@
lookup_function (const char *name,
const struct operation **last)
{
*first = *last = NULL;
const struct operation **last)
{
*first = *last = NULL;
- return (lookup_function_helper (name,
strcmp
, first, last)
+ return (lookup_function_helper (name,
compare_strings
, first, last)
|| lookup_function_helper (name, compare_names, first, last));
}
|| lookup_function_helper (name, compare_names, first, last));
}
@@
-1273,7
+1279,7
@@
expr_allocate_nullary (struct expression *e, operation_type op)
union any_node *
expr_allocate_unary (struct expression *e, operation_type op,
union any_node *
expr_allocate_unary (struct expression *e, operation_type op,
-union any_node *arg0)
+
union any_node *arg0)
{
return expr_allocate_composite (e, op, &arg0, 1);
}
{
return expr_allocate_composite (e, op, &arg0, 1);
}