[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/vars-atr.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] Changes to pspp/src/vars-atr.c |
Date: |
Fri, 11 Feb 2005 03:22:06 -0500 |
Index: pspp/src/vars-atr.c
diff -u pspp/src/vars-atr.c:1.14 pspp/src/vars-atr.c:1.15
--- pspp/src/vars-atr.c:1.14 Sat Jan 1 11:03:45 2005
+++ pspp/src/vars-atr.c Fri Feb 11 08:22:05 2005
@@ -233,7 +233,7 @@
/* A hsh_compare_func that orders variables A and B by their
names. */
int
-compare_variables (const void *a_, const void *b_, void *foo UNUSED)
+compare_var_names (const void *a_, const void *b_, void *foo UNUSED)
{
const struct variable *a = a_;
const struct variable *b = b_;
@@ -243,9 +243,30 @@
/* A hsh_hash_func that hashes variable V based on its name. */
unsigned
-hash_variable (const void *v_, void *foo UNUSED)
+hash_var_name (const void *v_, void *foo UNUSED)
{
const struct variable *v = v_;
return hsh_hash_string (v->name);
}
+
+/* A hsh_compare_func that orders pointers to variables A and B
+ by their names. */
+int
+compare_var_ptr_names (const void *a_, const void *b_, void *foo UNUSED)
+{
+ struct variable *const *a = a_;
+ struct variable *const *b = b_;
+
+ return strcmp ((*a)->name, (*b)->name);
+}
+
+/* A hsh_hash_func that hashes pointer to variable V based on its
+ name. */
+unsigned
+hash_var_ptr_name (const void *v_, void *foo UNUSED)
+{
+ struct variable *const *v = v_;
+
+ return hsh_hash_string ((*v)->name);
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] Changes to pspp/src/vars-atr.c,
Ben Pfaff <=