Deleted Added
full compact
sym.c (2259) sym.c (8874)
1/* sym - symbol table routines */
2
3/*-
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Vern Paxson.
1/* sym - symbol table routines */
2
3/*-
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Vern Paxson.
9 *
9 *
10 * The United States Government has rights in this work pursuant
11 * to contract no. DE-AC03-76SF00098 between the United States
12 * Department of Energy and the University of California.
13 *
14 * Redistribution and use in source and binary forms are permitted provided
15 * that: (1) source distributions retain this entire copyright notice and
16 * comment, and (2) distributions including binaries display the following
17 * acknowledgement: ``This product includes software developed by the
18 * University of California, Berkeley and its contributors'' in the
19 * documentation or other materials provided with the distribution and in
20 * all advertising materials mentioning features or use of this software.
21 * Neither the name of the University nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
25 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27 */
28
10 * The United States Government has rights in this work pursuant
11 * to contract no. DE-AC03-76SF00098 between the United States
12 * Department of Energy and the University of California.
13 *
14 * Redistribution and use in source and binary forms are permitted provided
15 * that: (1) source distributions retain this entire copyright notice and
16 * comment, and (2) distributions including binaries display the following
17 * acknowledgement: ``This product includes software developed by the
18 * University of California, Berkeley and its contributors'' in the
19 * documentation or other materials provided with the distribution and in
20 * all advertising materials mentioning features or use of this software.
21 * Neither the name of the University nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
25 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27 */
28
29/* $Header: sym.c,v 1.2 94/01/04 14:33:06 vern Exp $ */
29/* $Header: /home/ncvs/src/usr.bin/lex/sym.c,v 1.1.1.1 1994/08/24 13:10:31 csgr Exp $ */
30
31#include "flexdef.h"
32
33
34/* declare functions that have forward references */
35
36int hashfunct PROTO((register char[], int));
37

--- 107 unchanged lines hidden (view full) ---

145 if ( ! strcmp( sym, sym_entry->name ) )
146 return sym_entry;
147 sym_entry = sym_entry->next;
148 }
149
150 return &empty_entry;
151 }
152
30
31#include "flexdef.h"
32
33
34/* declare functions that have forward references */
35
36int hashfunct PROTO((register char[], int));
37

--- 107 unchanged lines hidden (view full) ---

145 if ( ! strcmp( sym, sym_entry->name ) )
146 return sym_entry;
147 sym_entry = sym_entry->next;
148 }
149
150 return &empty_entry;
151 }
152
153
153
154/* hashfunct - compute the hash value for "str" and hash size "hash_size" */
155
156int hashfunct( str, hash_size )
157register char str[];
158int hash_size;
159 {
160 register int hashval;
161 register int locstr;

--- 101 unchanged lines hidden ---
154/* hashfunct - compute the hash value for "str" and hash size "hash_size" */
155
156int hashfunct( str, hash_size )
157register char str[];
158int hash_size;
159 {
160 register int hashval;
161 register int locstr;

--- 101 unchanged lines hidden ---