windows lack regexp search--> use substring search
This commit is contained in:
parent
7ee2c1bbc9
commit
609d0d0fdf
|
|
@ -625,7 +625,8 @@ int search(const char *tok, const char *val, int sub, int sel)
|
|||
if( (!regexec(&re, str,0 , NULL, 0) && !sub) || /* 20071120 regex instead of strcmp */
|
||||
(!strcmp(str, val) && sub && !bus) || (strstr(str,val) && sub && bus))
|
||||
#else
|
||||
if ((!strcmp(str, val) && sub && !bus) || (strstr(str,val) && sub && bus))
|
||||
if( (strstr(str,val) && !sub) ||
|
||||
(!strcmp(str, val) && sub && !bus) || (strstr(str,val) && sub && bus))
|
||||
#endif
|
||||
{
|
||||
if(!sel) {
|
||||
|
|
|
|||
|
|
@ -2773,7 +2773,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
else if(!strcmp(argv[1],"wire"))
|
||||
{
|
||||
double x1,y1,x2,y2;
|
||||
int pos, save, sel = 0;
|
||||
int pos = -1, save, sel = 0;
|
||||
const char *prop=NULL;
|
||||
cmd_found = 1;
|
||||
if(argc>=6) {
|
||||
|
|
@ -2782,11 +2782,9 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
x2=atof(argv[4]);
|
||||
y2=atof(argv[5]);
|
||||
ORDER(x1,y1,x2,y2);
|
||||
pos=-1;
|
||||
if(argc >= 7) pos=atoi(argv[6]);
|
||||
if(argc >= 8) prop = argv[7];
|
||||
if(argc >= 9) sel = atoi(argv[8]);
|
||||
else prop = NULL;
|
||||
xctx->push_undo();
|
||||
storeobject(pos, x1,y1,x2,y2,WIRE,0,sel,prop);
|
||||
xctx->prep_hi_structs=0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue