diff --git a/XSchemWin/XSchemWix/heat_xschem_library.wxs b/XSchemWin/XSchemWix/heat_xschem_library.wxs index 710f3811..198ee503 100644 --- a/XSchemWin/XSchemWix/heat_xschem_library.wxs +++ b/XSchemWin/XSchemWix/heat_xschem_library.wxs @@ -3,5231 +3,5249 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -5398,6 +5416,7 @@ + @@ -5419,6 +5438,10 @@ + + + + @@ -6905,6 +6928,7 @@ + diff --git a/XSchemWin/XSchemWix/xschem_library.wxs b/XSchemWin/XSchemWix/xschem_library.wxs index 795b2077..310ed3d9 100644 --- a/XSchemWin/XSchemWix/xschem_library.wxs +++ b/XSchemWin/XSchemWix/xschem_library.wxs @@ -494,6 +494,9 @@ + + + @@ -557,6 +560,18 @@ + + + + + + + + + + + + @@ -5027,6 +5042,9 @@ + + + @@ -5398,6 +5416,7 @@ + @@ -5419,6 +5438,10 @@ + + + + @@ -6905,6 +6928,7 @@ + diff --git a/src/editprop.c b/src/editprop.c index e06722e9..bec81511 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -1053,7 +1053,7 @@ void update_symbol(const char *result, int x) to use for inst name (from symbol template) */ prefix=0; sym_number = -1; - if(strcmp(symbol, xctx->inst[*ii].name)) { + if(xctx->x_strcmp(symbol, xctx->inst[*ii].name)) { set_modify(1); sym_number=match_symbol(symbol); /* check if exist */ if(sym_number>=0) { diff --git a/src/netlist.c b/src/netlist.c index 681483e0..fe424927 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -1201,7 +1201,7 @@ int sym_vs_sch_pins() statusmsg(str,2); tcleval("show_infotext"); /* critical error: force ERC window showing */ for(j = 0; j < xctx->instances; j++) { - if(!strcmp(xctx->inst[j].name, xctx->sym[i].name)) { + if(!xctx->x_strcmp(xctx->inst[j].name, xctx->sym[i].name)) { xctx->inst[i].color = -PINLAYER; xctx->hilight_nets=1; } @@ -1218,7 +1218,7 @@ int sym_vs_sch_pins() statusmsg(str,2); tcleval("show_infotext"); /* critical error: force ERC window showing */ for(j = 0; j < xctx->instances; j++) { - if(!strcmp(xctx->inst[j].name, xctx->sym[i].name)) { + if(!xctx->x_strcmp(xctx->inst[j].name, xctx->sym[i].name)) { xctx->inst[i].color = -PINLAYER; xctx->hilight_nets=1; } @@ -1252,7 +1252,7 @@ int sym_vs_sch_pins() statusmsg(str,2); tcleval("show_infotext"); /* critical error: force ERC window showing */ for(j = 0; j < xctx->instances; j++) { - if(!strcmp(xctx->inst[j].name, xctx->sym[i].name)) { + if(!xctx->x_strcmp(xctx->inst[j].name, xctx->sym[i].name)) { xctx->inst[i].color = -PINLAYER; xctx->hilight_nets=1; } @@ -1276,7 +1276,7 @@ int sym_vs_sch_pins() statusmsg(str,2); tcleval("show_infotext"); /* critical error: force ERC window showing */ for(k = 0; k < xctx->instances; k++) { - if(!strcmp(xctx->inst[k].name, xctx->sym[i].name)) { + if(!xctx->x_strcmp(xctx->inst[k].name, xctx->sym[i].name)) { xctx->inst[i].color = -PINLAYER; xctx->hilight_nets=1; } diff --git a/src/save.c b/src/save.c index acefbb18..258a0e54 100644 --- a/src/save.c +++ b/src/save.c @@ -1323,12 +1323,12 @@ void read_xschem_file(FILE *fd) dbg(1, "read_xschem_file(): sym[i].name=%s, name_embedded=%s\n", xctx->sym[i].name, name_embedded); dbg(1, "read_xschem_file(): inst[instances-1].name=%s\n", xctx->inst[xctx->instances-1].name); /* symbol has already been loaded: skip [..] */ - if(!strcmp(xctx->sym[i].name, xctx->inst[xctx->instances-1].name)) { + if(!xctx->x_strcmp(xctx->sym[i].name, xctx->inst[xctx->instances-1].name)) { found=1; break; } /* if loading file coming back from embedded symbol delete temporary file */ /* symbol from this temp file has already been loaded in go_back() */ - if(!strcmp(name_embedded, xctx->sym[i].name)) { + if(!xctx->x_strcmp(name_embedded, xctx->sym[i].name)) { my_strdup2(325, &xctx->sym[i].name, xctx->inst[xctx->instances-1].name); xunlink(name_embedded); found=1;break; @@ -1880,7 +1880,7 @@ static void get_sym_type(const char *symname, char **type, found=0; /* first look in already loaded symbols in xctx->sym[] array... */ for(i=0;isymbols;i++) { - if(strcmp(symname, xctx->sym[i].name) == 0) { + if(xctx->x_strcmp(symname, xctx->sym[i].name) == 0) { my_strdup2(316, type, xctx->sym[i].type); found = 1; break; diff --git a/src/scheduler.c b/src/scheduler.c index 11f4832f..e0a3a19a 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1072,7 +1072,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg return TCL_ERROR; } for(i=0; isymbols; i++) { - if(!strcmp(xctx->sym[i].name,argv[3])){ + if(!xctx->x_strcmp(xctx->sym[i].name,argv[3])){ found=1; break; } diff --git a/src/token.c b/src/token.c index 53ac2295..72c129ac 100644 --- a/src/token.c +++ b/src/token.c @@ -230,7 +230,7 @@ int match_symbol(const char *name) /* never returns -1, if symbol not found loa for(i=0;isymbols;i++) { /* dbg(1, "match_symbol(): name=%s, sym[i].name=%s\n",name, xctx->sym[i].name);*/ - if(strcmp(name, xctx->sym[i].name) == 0) + if(xctx->x_strcmp(name, xctx->sym[i].name) == 0) { dbg(1, "match_symbol(): found matching symbol:%s\n",name); found=1;break; diff --git a/src/vhdl_netlist.c b/src/vhdl_netlist.c index eb2a0b81..d6b75f03 100644 --- a/src/vhdl_netlist.c +++ b/src/vhdl_netlist.c @@ -556,7 +556,7 @@ void vhdl_block_netlist(FILE *fd, int i) if(!strcmp(get_tok_value( (xctx->inst[l].ptr+ xctx->sym)->prop_ptr, "vhdl_ignore",0 ), "true") ) { continue; } - if(!strcmp(xctx->sym[j].name,xctx->inst[l].name)) + if(!xctx->x_strcmp(xctx->sym[j].name,xctx->inst[l].name)) { found=1; break; } diff --git a/src/xinit.c b/src/xinit.c index 7b3be538..74c8f5c4 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2159,6 +2159,11 @@ int Tcl_AppInit(Tcl_Interp *inter) toggle_fullscreen("."); } + if(tclgetboolvar("case_insensitive")) { + xctx->case_insensitive = 1; + xctx->x_strcmp = my_strcasecmp; + } + /* */ /* START PROCESSING USER OPTIONS */ /* */ diff --git a/src/xschem.tcl b/src/xschem.tcl index b3e38a81..13a89ef3 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -5490,6 +5490,8 @@ set_ne undo_type disk ## show tab bar (tabbed interface) set_ne tabbed_interface 0 +## case insensitive symbol lookup (on case insensitive filesystems only!) +set_ne case_insensitive 0 ## remember edit_prop widget size set_ne edit_prop_size 80x12 diff --git a/src/xschemrc b/src/xschemrc index d1926193..dc3b893a 100644 --- a/src/xschemrc +++ b/src/xschemrc @@ -337,3 +337,16 @@ # default: not enabled. Interface can be changed runtime if only one window # or tab is open. # set tabbed_interface 1 + +########################################################################### +#### CASE INSENSITIVE SYMBOL LOOKUP +########################################################################### +## this option might be useful on filesystems that are case insensitive and +## on designs ported from windows where case of file names does not matter. +## if this option is set symbol lookup will be case insensitive, +## so a symbol reference 'AMPLI.SYM' will match with 'ampli.sym' or +## Amply.sym on disk. File system must be case insensitive for this to work, +## like FAT32 or NTFS. +## Do not set this option if you don't know what you are doing. +## Default: not enabled (0) +# set case_insensitive 1