/[pspp]/pspp/src/vars-atr.c
ViewVC logotype

Diff of /pspp/src/vars-atr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by jmd, Sat Jan 1 11:03:45 2005 UTC revision 1.15 by blp, Fri Feb 11 08:22:05 2005 UTC
# Line 233  is_user_missing (const union value *val, Line 233  is_user_missing (const union value *val,
233  /* A hsh_compare_func that orders variables A and B by their  /* A hsh_compare_func that orders variables A and B by their
234     names. */     names. */
235  int  int
236  compare_variables (const void *a_, const void *b_, void *foo UNUSED)  compare_var_names (const void *a_, const void *b_, void *foo UNUSED)
237  {  {
238    const struct variable *a = a_;    const struct variable *a = a_;
239    const struct variable *b = b_;    const struct variable *b = b_;
# Line 243  compare_variables (const void *a_, const Line 243  compare_variables (const void *a_, const
243    
244  /* A hsh_hash_func that hashes variable V based on its name. */  /* A hsh_hash_func that hashes variable V based on its name. */
245  unsigned  unsigned
246  hash_variable (const void *v_, void *foo UNUSED)  hash_var_name (const void *v_, void *foo UNUSED)
247  {  {
248    const struct variable *v = v_;    const struct variable *v = v_;
249    
250    return hsh_hash_string (v->name);    return hsh_hash_string (v->name);
251  }  }
252    
253    /* A hsh_compare_func that orders pointers to variables A and B
254       by their names. */
255    int
256    compare_var_ptr_names (const void *a_, const void *b_, void *foo UNUSED)
257    {
258      struct variable *const *a = a_;
259      struct variable *const *b = b_;
260    
261      return strcmp ((*a)->name, (*b)->name);
262    }
263    
264    /* A hsh_hash_func that hashes pointer to variable V based on its
265       name. */
266    unsigned
267    hash_var_ptr_name (const void *v_, void *foo UNUSED)
268    {
269      struct variable *const *v = v_;
270    
271      return hsh_hash_string ((*v)->name);
272    }

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26