pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/expressions/parse.c


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/expressions/parse.c
Date: Mon, 02 May 2005 02:21:33 -0400

Index: pspp/src/expressions/parse.c
diff -u pspp/src/expressions/parse.c:1.9 pspp/src/expressions/parse.c:1.10
--- pspp/src/expressions/parse.c:1.9    Fri Apr 29 01:58:28 2005
+++ pspp/src/expressions/parse.c        Mon May  2 06:21:21 2005
@@ -881,14 +881,14 @@
   size_t name_len = strcspn (*name, ".");
   if (test_len == name_len) 
     {
-      if (memcmp (*test, *name, test_len))
+      if (mm_case_compare (*test, *name, test_len))
         return false;
     }
   else if (test_len < 3 || test_len > name_len)
     return false;
   else 
     {
-      if (memcmp (*test, *name, test_len))
+      if (mm_case_compare (*test, *name, test_len))
         return false;
     }
 
@@ -917,6 +917,12 @@
     }
 }
 
+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),
@@ -947,7 +953,7 @@
                  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));
 }
 
@@ -1273,7 +1279,7 @@
 
 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);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]