=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/m4/look.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/m4/look.c 2009/10/14 17:23:17 1.21 --- src/usr.bin/m4/look.c 2010/09/07 19:58:09 1.22 *************** *** 1,4 **** ! /* $OpenBSD: look.c,v 1.21 2009/10/14 17:23:17 sthen Exp $ */ /* * Copyright (c) 1989, 1993 --- 1,4 ---- ! /* $OpenBSD: look.c,v 1.22 2010/09/07 19:58:09 marco Exp $ */ /* * Copyright (c) 1989, 1993 *************** *** 51,57 **** static void *hash_alloc(size_t, void *); static void hash_free(void *, size_t, void *); static void *element_alloc(size_t, void *); ! static void setup_definition(struct macro_definition *, const char *, const char *); static struct ohash_info macro_info = { --- 51,57 ---- static void *hash_alloc(size_t, void *); static void hash_free(void *, size_t, void *); static void *element_alloc(size_t, void *); ! static void setup_definition(struct macro_definition *, const char *, const char *); static struct ohash_info macro_info = { *************** *** 64,70 **** void * hash_alloc(s, u) size_t s; ! void *u UNUSED; { void *storage = xalloc(s, "hash alloc"); if (storage) --- 64,70 ---- void * hash_alloc(s, u) size_t s; ! void *u UNUSED; { void *storage = xalloc(s, "hash alloc"); if (storage) *************** *** 76,82 **** hash_free(p, s, u) void *p; size_t s UNUSED; ! void *u UNUSED; { free(p); } --- 76,82 ---- hash_free(p, s, u) void *p; size_t s UNUSED; ! void *u UNUSED; { free(p); } *************** *** 84,90 **** void * element_alloc(s, u) size_t s; ! void *u UNUSED; { return xalloc(s, "element alloc"); } --- 84,90 ---- void * element_alloc(s, u) size_t s; ! void *u UNUSED; { return xalloc(s, "element alloc"); } *************** *** 98,104 **** /* * find name in the hash table */ ! ndptr lookup(const char *name) { return ohash_find(¯os, ohash_qlookup(¯os, name)); --- 98,104 ---- /* * find name in the hash table */ ! ndptr lookup(const char *name) { return ohash_find(¯os, ohash_qlookup(¯os, name)); *************** *** 116,122 **** return NULL; } ! static void setup_definition(struct macro_definition *d, const char *defn, const char *name) { ndptr p; --- 116,122 ---- return NULL; } ! static void setup_definition(struct macro_definition *d, const char *defn, const char *name) { ndptr p; *************** *** 174,180 **** { ndptr n; struct macro_definition *d; ! n = create_entry(name); d = xalloc(sizeof(struct macro_definition), NULL); d->next = n->d; --- 174,180 ---- { ndptr n; struct macro_definition *d; ! n = create_entry(name); d = xalloc(sizeof(struct macro_definition), NULL); d->next = n->d; *************** *** 221,233 **** ndptr n; unsigned int i; ! for (n = ohash_first(¯os, &i); n != NULL; n = ohash_next(¯os, &i)) if (n->d != NULL) f(n->name, n->d); } ! void setup_builtin(const char *name, unsigned int type) { ndptr n; --- 221,233 ---- ndptr n; unsigned int i; ! for (n = ohash_first(¯os, &i); n != NULL; n = ohash_next(¯os, &i)) if (n->d != NULL) f(n->name, n->d); } ! void setup_builtin(const char *name, unsigned int type) { ndptr n; *************** *** 259,274 **** trace_flags |= TRACE_ALL; else trace_flags &= ~TRACE_ALL; ! for (p = ohash_first(¯os, &i); p != NULL; p = ohash_next(¯os, &i)) ! p->trace_flags = FLAG_NO_TRACE; } else { p = create_entry(name); p->trace_flags = on; } } ! ndptr macro_getbuiltin(const char *name) { ndptr p; --- 259,274 ---- trace_flags |= TRACE_ALL; else trace_flags &= ~TRACE_ALL; ! for (p = ohash_first(¯os, &i); p != NULL; p = ohash_next(¯os, &i)) ! p->trace_flags = FLAG_NO_TRACE; } else { p = create_entry(name); p->trace_flags = on; } } ! ndptr macro_getbuiltin(const char *name) { ndptr p; *************** *** 279,282 **** else return p; } - --- 279,281 ----