diff --git a/XSchemWin/XSchemWin.vcxproj b/XSchemWin/XSchemWin.vcxproj index a601fc21..f630ae55 100644 --- a/XSchemWin/XSchemWin.vcxproj +++ b/XSchemWin/XSchemWin.vcxproj @@ -254,6 +254,7 @@ + @@ -261,6 +262,7 @@ + @@ -284,6 +286,11 @@ + + Document + bison -p kk -o eval_expr.c ..\src\eval_expr.y + eval_expr.c + diff --git a/XSchemWin/XSchemWin_cairo.vcxproj b/XSchemWin/XSchemWin_cairo.vcxproj index 793d0135..b4a64661 100644 --- a/XSchemWin/XSchemWin_cairo.vcxproj +++ b/XSchemWin/XSchemWin_cairo.vcxproj @@ -254,6 +254,7 @@ + @@ -261,6 +262,7 @@ + @@ -284,6 +286,11 @@ + + Document + bison -p kk -o eval_expr.c ..\src\eval_expr.y + eval_expr.c + diff --git a/XSchemWin/XSchemWix/Product.wxs b/XSchemWin/XSchemWix/Product.wxs index 8a036a35..2d3e9335 100644 --- a/XSchemWin/XSchemWix/Product.wxs +++ b/XSchemWin/XSchemWix/Product.wxs @@ -250,10 +250,7 @@ - - - - + @@ -374,7 +371,6 @@ - diff --git a/XSchemWin/XSchemWix/heat_xschem_library.wxs b/XSchemWin/XSchemWix/heat_xschem_library.wxs index 76fc66cb..08996ad1 100644 --- a/XSchemWin/XSchemWix/heat_xschem_library.wxs +++ b/XSchemWin/XSchemWix/heat_xschem_library.wxs @@ -3,5917 +3,5920 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -6026,6 +6029,7 @@ + diff --git a/XSchemWin/XSchemWix/xschem_library.wxs b/XSchemWin/XSchemWix/xschem_library.wxs index e39f2c4c..db02bb6c 100644 --- a/XSchemWin/XSchemWix/xschem_library.wxs +++ b/XSchemWin/XSchemWix/xschem_library.wxs @@ -293,6 +293,9 @@ + + + @@ -457,6 +460,7 @@ + diff --git a/XSchemWin/XSchemWix/xschemrc b/XSchemWin/XSchemWix/xschemrc index 94adef3a..a9081bb5 100644 --- a/XSchemWin/XSchemWix/xschemrc +++ b/XSchemWin/XSchemWix/xschemrc @@ -171,8 +171,14 @@ #### this is the default: # set initial_geometry {900x600} -#### initial geometry of load /save / insert component file selector -# set file_dialog_default_geometry 800x600 +#### initial size of the load_file_dialog (the file selector) dialog box +# set file_dialog_default_geometry 700x680+100+40 +#### load_file_dialog directory list (+ recent if shown) X width in pixels +# set file_dialog_sp0 350 +#### load_file_dialog recent components list X width in pixels +# set file_dialog_sp1 100 +#### load_file_dialog components list Y height in pixels +# set file_dialog_v_sp0 420 #### display full path (1) or only name (0) for component directories. Default: 1 # set load_file_dialog_fullpath 1 @@ -195,6 +201,11 @@ #### default: 0 # set persistent_command 1 +#### if set to 0 users must click a point after hitting a command key +#### like 'w(ire)', 'l(ine)' and so on. +#### default is 1 (hitting the command key sets also the first point). +# set infix_interface 0 + #### if set to 1 allow click & drag objects in the schematic #### to move them without keyboard commands ('m') #### default: enabled (1) @@ -256,8 +267,24 @@ #### enable drawing crosshairs at mouse coordinates. Default: disabled (0) # set draw_crosshair 1 -#### set crosshair layer; Default 3 (TEXTLAYER) -# set crosshair_layer 3 +#### set crosshair layer; Default 8 (Yellow) +# set crosshair_layer 8 + +#### set crosshair size; Default: 0 (full screen spanning crosshair) +# set crosshair_size 5 + +#### enable drawing a diamond-shaped cursor at the closest circuit endpoint. Default: disabled (0) +# set snap_cursor 1 + +#### set snap_cursor_size; Default: 6 (Diamond-shaped cursor that snaps to nearest circuit endpoint) +# set snap_cursor_size 6 + +#### set cadence_compat; Default: 0 (Cadence-style keybinds are not used by default) +# set cadence_compat 1 + +#### if set, then, when cursor (regardless of style) is on an object, and user clicks (though mouse pointer is not on the object), +#### the object is selected. Default: 0 +# set use_cursor_for_selection 1 #### enable to scale grid point size as done with lines at close zoom, default: 0 # set big_grid_points 0 @@ -510,7 +537,10 @@ set editor {notepad.exe} # } # } - +########################################################################### +#### TCL COMMANDS TO BE EXECUTED AFTER GENERATING NETLIST +########################################################################### +# set netlist_postprocess {textfile $netlist_dir/[xschem get netlist_name fallback]} ########################################################################### #### WEB URL DOWNLOAD HELPER APPLICATION @@ -553,6 +583,14 @@ set editor {notepad.exe} #### default: 0 (not set) # set show_hidden_texts 1 +########################################################################### +#### USE CTRL MODIFIER TO OPERATE ON GRAPHS WITH MOUSE & KEYBOARD +########################################################################### +#### if enabled forces to hold Control key pressed to operate on graphs +#### to prevent "graph event stealing to schematic" +#### Default: 0 (not set) +# set graph_use_ctrl_key 1 + ########################################################################### #### HIDE GRAPHS IF NO SPICE DATA LOADED ########################################################################### @@ -560,6 +598,16 @@ set editor {notepad.exe} #### default: not enabled (0) # set hide_empty_graphs 0 + +########################################################################### +#### ATTACH HOOK FUNCTION TO CURSOR 2 MOVEMENT +########################################################################### +#### if enabled whenever the cursor2 is moved the specified script is +#### executed. Examples: +#### set cursor_2_hook {conducting_devices 10e-3 nodraw} +#### set cursor_2_hook {hilight_high_nets 0 1.8 nodraw} +#### this can be used to add backannotation actions. + ########################################################################### #### LIVE BACKANNOTATION OF DATA AT CURSOR 2 (B) POSITION ########################################################################### @@ -591,3 +639,6 @@ set editor {notepad.exe} #### Default: not enabled (0) # set fix_mouse_coord 0 +#### redefine some variables to emulate Cadence UI / bindkeys +# source /home/schippes/share/xschem/cadence_style_rc + diff --git a/src/eval_expr.y b/src/eval_expr.y index 078ffa3b..f2bc525f 100644 --- a/src/eval_expr.y +++ b/src/eval_expr.y @@ -2,7 +2,6 @@ #include #include /* For math functions, cos(), sin(), etc. */ #include -#include #include #include #include "xschem.h" @@ -193,13 +192,15 @@ void eval_expr_init_table(void) /* puts arithmetic functions in table. */ void eval_expr_clear_table(void) { - symrec *ptr; - for (ptr = sym_table; ptr; ptr = ptr->next) { + symrec *ptr = sym_table; + while(ptr) { symrec *tmp = ptr; + ptr = ptr->next; my_free(_ALLOC_ID_, &(tmp->name)); my_free(_ALLOC_ID_, &tmp); } } + static int kklex() { diff --git a/src/hilight.c b/src/hilight.c index 19c18a34..fa7b8916 100644 --- a/src/hilight.c +++ b/src/hilight.c @@ -696,7 +696,7 @@ static int bus_search(const char*s) } #ifndef __unix__ -static int win_regexec(const char *options, const char *pattern, const char *name) +int win_regexec(const char *options, const char *pattern, const char *name) { if (options!=NULL) tclvareval("regexp {", options,"} {", pattern, "} {", name, "}", NULL); @@ -754,7 +754,7 @@ int search(const char *tok, const char *val, int sub, int sel, int match_case) if(regcomp(&re, val , cflags)) return TCL_ERROR; #else if(!match_case) { - regexp_options = "-nocase"; + my_strdup(_ALLOC_ID_, ®exp_options, "-nocase"); } #endif dbg(1, "search():val=%s\n", val); @@ -1014,6 +1014,8 @@ int search(const char *tok, const char *val, int sub, int sel, int match_case) } #ifdef __unix__ regfree(&re); +#else + my_free(_ALLOC_ID_, ®exp_options); #endif xctx->draw_window = save_draw; my_free(_ALLOC_ID_, &tmpname); diff --git a/src/token.c b/src/token.c index 5082c016..635d2a8f 100644 --- a/src/token.c +++ b/src/token.c @@ -4167,7 +4167,7 @@ const char *translate(int inst, const char* s) #ifdef __unix__ else if(!regexec(get_sp_cur, token, 0 , NULL, 0) ) # else - else if(0) /* FIXME: windows workaround for missing regex* functions */ + else if ((win_regexec(NULL/*options*/, "^@spice_get_(current|modelparam|modelvoltage)([_a-zA-Z][a-zA-Z0-9_]*)*\\(", token))) #endif { int start_level; /* hierarchy level where waves were loaded */ diff --git a/src/xschem.h b/src/xschem.h index 59802adf..a6f5007b 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -1764,4 +1764,5 @@ extern const char *create_tmpdir(char *prefix); extern FILE *open_tmpfile(char *prefix, char *suffix, char **filename); extern void create_ps(char** psfile, int what, int fullzoom, int eps); extern void MyXCopyArea(Display* display, Drawable src, Drawable dest, GC gc, int src_x, int src_y, unsigned int width, unsigned int height, int dest_x, int dest_y); +extern int win_regexec(const char *options, const char *pattern, const char *name); #endif /*CADGLOBALS */