/[bison]/bison/src/muscle_tab.c
ViewVC logotype

Diff of /bison/src/muscle_tab.c

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

revision 1.7 by marc, Wed Nov 28 20:32:53 2001 UTC revision 1.8 by akim, Mon Dec 10 09:05:47 2001 UTC
# Line 1  Line 1 
1  /* Macro table manager for Bison,  /* Macro table manager for Bison,
2     Copyright 1984, 1989, 2000 Free Software Foundation, Inc.     Copyright 2001 Free Software Foundation, Inc.
3    
4     This file is part of Bison, the GNU Compiler Compiler.     This file is part of Bison, the GNU Compiler Compiler.
5    
# Line 32  struct hash_table muscle_table; Line 32  struct hash_table muscle_table;
32  static unsigned long  static unsigned long
33  mhash1 (const void *item)  mhash1 (const void *item)
34  {  {
35    return_STRING_HASH_1 (((muscle_entry_t *) item)->key);    return_STRING_HASH_1 (((const muscle_entry_t *) item)->key);
36  }  }
37    
38  static unsigned long  static unsigned long
39  mhash2 (const void *item)  mhash2 (const void *item)
40  {  {
41    return_STRING_HASH_2 (((muscle_entry_t *) item)->key);    return_STRING_HASH_2 (((const muscle_entry_t *) item)->key);
42  }  }
43    
44  static int  static int
45  mcmp (const void *x, const void *y)  mcmp (const void *x, const void *y)
46  {  {
47    return strcmp (((muscle_entry_t*) x)->key, ((muscle_entry_t *) y)->key);    return strcmp (((const muscle_entry_t*) x)->key,
48                     ((const muscle_entry_t *) y)->key);
49  }  }
50    
51  void  void
# Line 105  muscle_init (void) Line 106  muscle_init (void)
106    muscle_insert ("name", "Parser");    muscle_insert ("name", "Parser");
107  }  }
108    
109  void  void
110  muscle_insert (const char *key, const char *value)  muscle_insert (const char *key, const char *value)
111  {  {
112    muscle_entry_t *pair = XMALLOC (muscle_entry_t, 1);    muscle_entry_t *pair = XMALLOC (muscle_entry_t, 1);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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