Updated version to go along with the merge of pull request #39

from Kamyar Mohajerani, with a few minor edits such as renaming
my_hash to hashcase, as a better counterpoint to "hashnocase".
This commit is contained in:
Tim Edwards 2021-11-17 12:05:01 -05:00
parent 879711def3
commit cfdc60104b
7 changed files with 9 additions and 9 deletions

View File

@ -1 +1 @@
1.5.209
1.5.210

View File

@ -187,7 +187,7 @@ char *ReadExt(char *fname, int doflat, int *fnum)
/* Make sure all .ext file reading is case sensitive */
matchfunc = match;
matchintfunc = matchfile;
hashfunc = my_hash;
hashfunc = hashcase;
if (LookupCellFile(fname, filenum) != NULL) {
Printf("Error: Duplicate cell name \"%s\"!\n", fname);
@ -653,7 +653,7 @@ char *ReadSim(char *fname, int *fnum)
/* Make sure all .sim file reading is case sensitive */
matchfunc = match;
matchintfunc = matchfile;
hashfunc = my_hash;
hashfunc = hashcase;
CellDef(fname, filenum);

View File

@ -148,7 +148,7 @@ unsigned long hashnocase(char *s, int hashsize)
return (hashsize == 0) ? hashval : (hashval % hashsize);
}
unsigned long my_hash(char *s, int hashsize)
unsigned long hashcase(char *s, int hashsize)
{
unsigned long hashval;

View File

@ -48,7 +48,7 @@ extern void *HashFirst(struct hashdict *dict);
extern void *HashNext(struct hashdict *dict);
extern unsigned long hashnocase(char *s, int hashsize);
extern unsigned long my_hash(char *s, int hashsize);
extern unsigned long hashcase(char *s, int hashsize);
extern int (*matchfunc)(char *, char *);
/* matchintfunc() compares based on the name and the first */

View File

@ -37,7 +37,6 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef TCL_NETGEN
#include <tcl.h>
int check_interrupt();
#endif
#include "netgen.h"
@ -54,6 +53,7 @@ int check_interrupt();
int InterruptPending = 0;
void (*oldinthandler)() = SIG_DFL;
extern Tcl_Interp *netgeninterp;
extern int check_interrupt();
#endif
/* define the following to debug core allocation */
@ -3761,7 +3761,7 @@ void CreateTwoLists(char *name1, int file1, char *name2, int file2, int dolist)
/* determine if matching will be case sensitive or case insensitive */
matchfunc = match;
matchintfunc = matchfile;
hashfunc = my_hash;
hashfunc = hashcase;
if (tc1 != NULL && tc2 != NULL) {
if ((tc1->flags & CELL_NOCASE) && (tc2->flags & CELL_NOCASE)) {
matchfunc = matchnocase;

View File

@ -289,7 +289,7 @@ static struct hashdict cell_dict;
void InitCellHashTable(void)
{
hashfunc = my_hash;
hashfunc = hashcase;
matchfunc = NULL;
matchintfunc = matchfile;
InitializeHashTable(&cell_dict, CELLHASHSIZE);

View File

@ -2239,7 +2239,7 @@ char *ReadVerilogTop(char *fname, int *fnum, int blackbox)
else {
matchfunc = match;
matchintfunc = matchfile;
hashfunc = my_hash;
hashfunc = hashcase;
}
InitializeHashTable(&verilogparams, OBJHASHSIZE);