Commit Graph

352 Commits

Author SHA1 Message Date
Stefan Frederik cd7eb3ab54 update license info 2022-06-24 00:36:12 +02:00
Stefan Frederik d0b273c2c5 add "--command" command line option to execute commands after initialization (whereas "--tcl" executes commands before initialization) 2022-05-06 23:19:41 +02:00
Stefan Frederik f882918931 more conversion warnings suppressed 2022-04-28 10:12:16 +02:00
Stefan Frederik 23102433c2 fixed lot of conversion warnings/ bugs (int/double/size_t) 2022-04-27 13:18:45 +02:00
Stefan Frederik d57f8e60ee do not allow switching tabs if some editing operation ongoing to avoid incosistent states 2022-04-23 13:43:12 +02:00
Stefan Frederik 069017e07c recursively resolve parameter passing throughout hierarchy and show resolved value in leaf cells if possible 2022-03-07 01:42:53 +01:00
Stefan Frederik 00de54c582 Honor hide attribute for texts in ps/pdf and svg exports 2022-03-01 19:36:08 +01:00
Stefan Frederik d457565c2d declared more functions static where possible and appropriate 2022-02-19 14:31:55 +01:00
Stefan Frederik 1d8fe237ce add test_extracted_netlist circuit example 2022-02-18 15:11:44 +01:00
Stefan Frederik 13aca67a4d find_nth() generalized to accept multiple separators 2022-02-13 11:24:38 +01:00
Stefan Frederik d6d932e730 fix save simconf (thanks mkk). put template code for custom function plots 2022-02-05 00:28:06 +01:00
Stefan Frederik d7b45bfbf9 cleanup raw_query sub command, added "values" opcode, speedup some "xschem" subcommands 2022-02-04 17:35:07 +01:00
Stefan Frederik 6fb20b8c5e (only) on fat32 or similar case insensitive FS and if case_insensitive is set to 1 in xschemrc do not consider case in symbol lookup 2022-02-04 02:56:11 +01:00
Stefan Frederik 008b289e4f ac analysis in graphs (mag + phase, log axis) 2022-02-02 18:33:16 +01:00
Stefan Frederik a8e1a6c047 fix regression (tcl context was not saved/restored correctly) 2022-02-02 00:11:46 +01:00
Stefan Frederik 200f4210d0 renamed struct member function pointer to x_strcmp 2022-02-01 18:31:23 +01:00
Stefan Frederik 7e78f0994e fixes in fullscreen code 2022-01-31 02:42:52 +01:00
Stefan Frederik 4ec5d2ce9e send selected nets to last selected graph if graph configure dialog not open 2022-01-29 12:27:54 +01:00
Stefan Frederik c083491738 probe nodes from xschem into its own wave viewer 2022-01-29 02:36:54 +01:00
Stefan Frederik 0b0e749801 Graph UI improvements. Persistent bold waves. Graph UI bug fixes 2022-01-28 04:44:07 +01:00
Stefan Frederik f5fd1ef352 use cairo png export if Xrender extensions present (alpha), editprop code for graph node list 2022-01-26 15:20:00 +01:00
Stefan Frederik 6fcdd46022 reordering of some function calls to prevent memory leaks 2022-01-20 01:57:53 +01:00
Stefan Frederik 1fb23208bc remove all xrender and all xcb code, remove detection as well. Fix a couple of potentially uninitialized variables 2022-01-19 00:49:46 +01:00
Stefan Frederik 12f9af62b8 reverted xcb since text quality is slightly better 2022-01-18 02:49:28 +01:00
Stefan Frederik 2d6a0fea52 remove XCB code (HAS_XCB=1 macro), align find_gl_fb_attachment() prototype declaration to match other functions, avoiding warning in dep_add() 2022-01-17 17:40:07 +01:00
Stefan Frederik c44673b2ac refactored some global var names, used only in command option processing 2022-01-16 01:12:43 +01:00
Stefan Frederik abce61655f do noop if a switch context into itself is called 2022-01-16 00:51:12 +01:00
Stefan Frederik c7b9e8206f various checks to prevent multiple file loading if no X or -x option used, put xpm header in icon.c so it can be opened by image viewers 2022-01-15 23:35:37 +01:00
Stefan Frederik 3f017074be load multiple files from command line, in tabbed or foating windows mode 2022-01-15 13:19:06 +01:00
Stefan Frederik 158186a9c4 better WM_DELETE_WINDOW protocol handler in case of multiple windows 2022-01-14 19:37:01 +01:00
Stefan Frederik acae16d106 left anchor window title in tab buttons 2022-01-13 15:40:20 +01:00
Stefan Frederik c3ad08fdd4 sourcing of user specified tcl scripts in xschemrc done after all graphics setup complete so we can autoload multiple tabs on startup, among other funny things 2022-01-13 02:08:36 +01:00
Stefan Frederik 54f3211d51 show modify status (*) in tab names, master tab has red foreground 2022-01-13 00:58:00 +01:00
Stefan Frederik 772a6c9f39 button press on a tab, hold button and drag onto another tab --> swap tabs 2022-01-12 23:55:46 +01:00
Stefan Frederik 88945158e2 button press on a tab, hold button and drag onto another tab --> swap tabs 2022-01-12 23:44:52 +01:00
Stefan Frederik d273d5131e doc updates 2022-01-11 12:17:15 +01:00
Stefan Frederik 659217148d fix error if tabbed_interface variable set in xschemrc 2022-01-11 02:01:11 +01:00
Stefan Frederik 7d3c19441d cleanup in tabbed/multi-context code, remoevd redundant functions, more tests in xschemtest 2022-01-11 01:09:56 +01:00
Stefan Frederik d6b513e1e2 issue warning if opening same circuit in different tabs, if tabbed if is active edit sch/sym in new window will do in a new tab 2022-01-10 18:54:07 +01:00
Stefan Frederik a19bdc01a6 followup of previous commit: better set window title when swicthing context 2022-01-10 03:07:57 +01:00
Stefan Frederik 19398e8162 update window title/icon title when switching in tabbed interface 2022-01-10 03:00:33 +01:00
Stefan Frederik 1360641d75 Tabbed windows interface option added 2022-01-09 22:19:58 +01:00
Stefan Frederik 84662451ae tabbed interface almost done 2022-01-09 14:58:45 +01:00
Stefan Frederik e238f571b0 code added for tabbed window interface 2022-01-09 05:14:25 +01:00
Stefan Frederik 5707b18aba wave view: added cursors for delay/time measurements 2021-12-30 15:45:38 +01:00
Stefan Frederik d6c197d108 fix BadDrawable regression in free_rawfile(): after deleting data a draw() was called, but since this function is called also in exit handler all windows are already closed. Added digital waveforms and bussed signal display 2021-12-29 05:11:39 +01:00
Stefan Frederik a0e057a52d added typedefs on used structs, updated xschemtest with new hashes 2021-12-28 01:33:01 +01:00
Stefan Frederik 547097f176 graph UI refinement and various fixes. Zoom in/out keeps value under mouse fixed 2021-12-27 05:22:19 +01:00
Stefan Frederik 0d6a6c488b handle spice simulation files with multiple datasets 2021-12-25 05:15:52 +01:00
Stefan Frederik 70adb61410 Better axis label placement, smooth waves move/zoom with mouse, compile option to store sim data as floats instead of doubles, option for axis scaling (p,n,u,m,k,M,G), load waveforms command is a toggle (load / free) 2021-12-24 12:17:00 +01:00
Stefan Frederik 76b537a587 [experimental] add waveform display of ngspice simulation data directly in xschem drawing area 2021-12-22 04:39:23 +01:00
Stefan Frederik ead63f5c39 Fix regression: in load_file_dialog make "Current file dir" button work again 2021-12-18 13:11:21 +01:00
Stefan Frederik fa25edabec fix 3 potential (small) memory leaks 2021-12-08 00:38:19 +01:00
Stefan Frederik 5503786979 translate(): recognize @@ and @# token patterns to avoid useless get_tok_value() calls 2021-12-07 19:43:57 +01:00
Stefan Frederik 19f0fd3c6e optimizations in calc_drawing_bbox() (less get_tok_value() calls), optimizations in bus_hilight_hash_lookup() (less expandlabel() calls) 2021-12-07 02:18:23 +01:00
Stefan Frederik 506d9683d5 no newline print on exit 2021-12-05 22:32:56 +01:00
Stefan Frederik de1db1e87a main.c do not spawn a child closing std file descriptors if -b option is given, just start xschem without interactive tcl shell, handle error condition in setup_tcp_gaw 2021-12-05 15:31:26 +01:00
Stefan Frederik e449543805 tclvareval() wrapper 2021-12-05 12:39:05 +01:00
Stefan Frederik 8832830d91 implement option `-b` for `x` hot key (to open a new xschem`s process) on Windows. (Joannne) 2021-12-04 01:50:05 +01:00
Stefan Frederik e3ab569f35 fix: xctx->inst_redraw_table can not be static, must be dinamically allocated. 2021-12-04 01:45:26 +01:00
Stefan Frederik a7277acfda some more brace protected filenames in C tcl calls 2021-12-03 23:59:46 +01:00
Stefan Frederik 954979e200 brace filenames (to protect spaces) in Tcl_VarEval() calls from C as per Joanne findings. 2021-12-03 19:37:59 +01:00
Stefan Frederik 629917cfcd new find_inst_to_be_redrawn() implementation to recalculate area to be redrawn with/without show net names on symbol pins, simplified new_window() call in callback `x` command, code formatting in globals.c, added xschem get [xy]origin commands 2021-12-03 19:15:07 +01:00
Stefan Frederik 02173373cb some little optimizations, redundant code removed, better formatting in globals.c 2021-12-02 13:28:40 +01:00
Stefan Frederik d98c855135 remove calls to ngspice::resetdata in C code, done in ngspice annotator when reading a new file and in xinit.c when exiting the program. Some File menu item reordering 2021-12-01 00:35:52 +01:00
Stefan Frederik fe549c0f5c readable function pointer call syntax 2021-11-29 11:52:32 +01:00
Stefan Frederik 2442a3dfc0 runtime menu option to set undo stack on disk or in memory 2021-11-29 02:47:37 +01:00
Stefan Frederik 03f973e203 use undo function pointers 2021-11-28 14:35:55 +01:00
Stefan Frederik 88b00fd546 add undo function pointers 2021-11-28 13:29:13 +01:00
Stefan Frederik 01b3401e43 in memory undo now saves / restores all symbol definitions, so no re-link to instances operation is needed 2021-11-28 13:16:01 +01:00
Stefan Frederik 551bbcec0c Windows does not recognize XPending, fix typo for verilog_format`s port name: g instead of f 2021-11-26 13:16:52 +01:00
Stefan Frederik f67ec47f82 added some comments, commented out xctx->prep_* = 0 in save_schematic() 2021-11-24 13:52:59 +01:00
Stefan Frederik 364c2f1f3a moved functions containing X calls: now only callback.c, xinit.c and draw.c contain xorg-specific function calls. 2021-11-24 01:07:33 +01:00
Stefan Frederik e77b72df9c old_winpath[] removed from globals, put as static string into callback(), fix ngspice::annotate netlist_dir fetching. 2021-11-23 23:20:10 +01:00
Stefan Frederik 78934d363f removed duplicate netlist_dir global var in C code, use tcl netlist_dir variable, some widgets now display on top of current schematic window instead of xschem`s master window (use [xschem get topwindow] instead of ".") 2021-11-23 17:02:36 +01:00
Stefan Frederik d03147dce1 more consistent naming convention for hash table functions 2021-11-23 15:03:51 +01:00
Stefan Frederik 10114ec838 add missing braces in update recent file submenu, fix file selector improperly setting main window title, added logic/test_mos_verilog.sch depletion mode verilog example 2021-11-20 23:44:19 +01:00
Stefan Frederik a495ada2ed When saving a schematic issue a warning if disk file has been changed since opening 2021-11-20 13:33:40 +01:00
Stefan Frederik 83746efbe9 some other static data eliminated from functions (edit symbol_property), in_memory undo structure moved into schematic context 2021-11-19 23:22:54 +01:00
Stefan Frederik bbba3b9c02 check for max number of subwindows, better way to set icons for windows 2021-11-18 03:01:28 +01:00
Stefan Frederik d1a922643d Bunch of function static variables moved into xctx struct for safety 2021-11-18 01:55:01 +01:00
Stefan Frederik eecc81437c flat_netlist and only_probes moved into xctx struct 2021-11-17 23:12:17 +01:00
Stefan Frederik daf90b0645 fix icon pixmap on child schematic windows 2021-11-17 22:15:36 +01:00
Stefan Frederik dcae02e8c4 remove dbg messages 2021-11-17 17:56:32 +01:00
Stefan Frederik e27c5dc21a separate pack_widgets and set_bindings 2021-11-17 17:53:18 +01:00
Stefan Frederik 043e83e18f fix correct drawing of new schematic window if schematic not found 2021-11-17 13:32:32 +01:00
Stefan Frederik bd626427fd fix status bar info correctly swicthing when focusing multiple xschem child windows; multiple schematic window handling within one xschem instance is now working 2021-11-17 01:12:55 +01:00
Stefan Frederik ad05513838 some parameter checks in xschem commands, global var removal in simulation help window - No use for production yet 2021-11-16 22:28:10 +01:00
Stefan Frederik dfb4821ef8 2 more global window declarations removed 2021-11-10 14:11:27 +01:00
Stefan Frederik 59198f2dda removed a whole bunch of global UI-related variables and tcl/C redundancies 2021-11-10 13:43:08 +01:00
Stefan Frederik c3c1b39cb5 (2) full widget creation for xschem new windows, code cleanup, removed old stuff 2021-11-09 19:05:56 +01:00
Stefan Frederik 3ec3add6c0 redundant code elimination in new_schematic(), fixed a memory leak in update_symbol() 2021-11-03 00:31:08 +01:00
Stefan Frederik 6dbd952910 code cleanup in new_schematic(), error checks to make new window creation safe and simpler (proc new_window what path filename) 2021-11-02 02:23:45 +01:00
Stefan Frederik 8dbe8b7771 simplified simdata struct 2021-10-28 10:36:23 +02:00
Stefan Frederik e7d28947c1 removed redundant "valid" member in simdata struct 2021-10-27 22:56:33 +02:00
Stefan Frederik fe5d2efc59 fix false positive in double-free detection, reported by updated track_memory.awk; fix missing free on allocated string 2021-10-26 01:18:16 +02:00
Stefan Frederik 04e670b3cf fine tuning of previous commit 2021-10-26 00:04:13 +02:00
Stefan Frederik b81325ea00 code cleanup, comments, more globals in Xctx context structure 2021-10-25 17:05:43 +02:00
Stefan Frederik 95c0ad1572 better identify commented pieces of code 2021-10-17 22:05:55 +02:00
Stefan Frederik 04eee411f3 better implementation of prevous commit 2021-10-10 00:44:01 +02:00
Stefan Frederik 86dcb4cafa Do the update (process pending X events) only if a filename is given on cmdline, to avoid losing an Expose event if no file given 2021-10-09 13:30:44 +02:00
Stefan Frederik 4f8120cd2d add "update" after binding creation in xinit.c, to avoid incomplete initialization of event binding if xschem called with non-existent file 2021-10-09 10:25:24 +02:00
Stefan Frederik 434e0f012b Any attribute embedded in a tcleval(....) construct will be passed by get_tok_value() down to tcl for evaluation. This generalizes what was done for the "schematic" attribute in 20210617 2021-09-20 00:55:33 +02:00
Stefan Frederik 00311e7ff1 update license info 2021-07-27 16:42:54 +02:00
Stefan Frederik e5208e2d99 refactoring: "plotfile[]" global moved into xctx struct 2021-07-14 01:43:29 +02:00
Stefan Frederik 5880e23f94 added hierarchical ps/pdf export (File menu) 2021-06-13 23:55:17 +02:00
Stefan Frederik 500feade8d Joanne fixes for potential crash in align_sch_pins_with_sym() if there is a sym/sch pin number mismatch. Moved box declaration to beginning of scope block for C89 compatibility 2021-03-07 00:15:16 +01:00
Stefan Frederik 238c9f592d fix -N option for output netlist filename 2021-02-09 17:19:37 +01:00
Stefan Frederik 934e16ab87 uniquify __UNCONNECTED_NODE__ by appending a unique number to avoid shorting multiple missing connecting nodes 2021-01-14 18:12:02 +01:00
Stefan Frederik b25bd1d06d saving to file made 4x faster, this implies less latency due to undo buffer savings on freaking big schematics. 2021-01-06 03:01:14 +01:00
Stefan Frederik 6cac6f2291 cleanups in sample xschemrc comments 2021-01-04 15:19:08 +01:00
Stefan Frederik 94cd0d0c7d hash_hi() made faster by caching sch_path_hash[] 2021-01-02 01:55:01 +01:00
Stefan Frederik a9d7d93e40 caching simulation data into "simdata" struct for performance 2020-12-31 03:08:24 +01:00
Stefan Frederik bcf8986314 Some more global state into Xctx 2020-12-28 13:44:10 +01:00
Stefan Frederik 41d9e17527 option for transparent background in svg export; added ngspice backannotation tutorial 2020-12-28 02:52:44 +01:00
Stefan Frederik 5917cd9717 added flip-flop simulation capabilities. added examples: merry xmas greeter and 7 segment display driver and counter. 2020-12-27 19:20:24 +01:00
Stefan Frederik 9b4534d6b0 A change_linewidth(-1.0) is added after resetwin() creates a new pixmap (example: after a window resize) . This sets colors, backgrounds fill styles for the new pixmap. 2020-12-26 22:29:45 +01:00
Stefan Frederik 582863f825 added menu option to load most recent file: ctrl-shift-o, fix menu entry "unhilight selected nets" (did unhilight all); removed a wire[].node clear in hash_wire() that caused broken connectivity. this data is cleared in delete_netlist_structs when needed. 2020-12-25 04:37:53 +01:00
Stefan Frederik 779c789100 better "xschem print" command accepting viewport and image dimensions, better zoom_full (with margin), good for embedding in script and do automatic export generation 2020-12-22 00:13:25 +01:00
Stefan Frederik 4ddc9654e8 add xschem commands for specifying image size for png and pdf: xschem print svg file.svg 800 600; svg background color taken from svg_colors variable so it can be changed like any other color 2020-12-21 04:38:57 +01:00
Stefan Frederik dfa58a0a08 spaghetti code removal, more reused code 2020-12-20 15:56:29 +01:00
Stefan Frederik 821ebf06f2 optimizations in instance (connected to wires/net labels) highlights 2020-12-18 19:22:08 +01:00
Stefan Frederik e46033f0bb fix regression due to r1395, updated Changelog, fix set initial window size when doing ps/pdf export from cli 2020-12-17 03:48:34 +01:00
Stefan Frederik 5b4d6ab640 postscript fonts in ps/pdf export 2020-12-16 18:30:33 +01:00
Stefan Frederik f22f7a26f5 allow to specify fixed, user defined line width (does not change on zoom) and allow specify if grid points should be same size as line width 2020-12-14 19:11:24 +01:00
Stefan Frederik fc5b1a9616 code formatting 2020-12-12 20:50:06 +01:00
Stefan Frederik a3e1564c48 option for variable-width grid points for better visibility on hyper-resolution monitors 2020-12-12 13:36:39 +01:00
Stefan Frederik bb64297b6e better #if/#endif configuration of various xrender/xcb/cairo combinations 2020-12-07 20:04:57 +01:00
Stefan Frederik e80896dbf9 added render_format assignment that got deleted after xinit code refactoring 2020-12-07 18:51:15 +01:00
Stefan Frederik c5c729fc89 tcl code indentation fixes, cleanup, some global vars removed 2020-12-07 15:46:20 +01:00
Stefan Frederik 4d56fcc72d indentation cleanups 2020-12-06 22:07:33 +01:00
Stefan Frederik c3ba3112e0 remove some redundant warnings in memory allocations, since all alloc calls have an ID and wrapper issues warnings in case of failures. Use some Tk wrapper functions to get X11 related data since all windows are already opened by tcl-tk. 2020-12-06 20:52:35 +01:00
Stefan Frederik 17124c761c each schematic windows has its own "current later" (rectcolor) 2020-12-06 16:40:08 +01:00
Stefan Frederik 4d26ce66a8 more state variables into xctx: move / create new objects 2020-12-06 16:10:22 +01:00
Stefan Frederik e7e5ad190b more schematic context in xctx: cairo surfaces and context, save buffer graphic context (GC), hilight hash tables and data, node name hash tables. Refactoring of resetwin , resetcairo routines (also used in xinit to avoid code duplication), switching schematics seems almost complete now 2020-12-06 02:10:53 +01:00
Stefan Frederik f138db5aba fix linewidth when done with preview, also avoid to destroy & create main pixmap since it was saved 2020-12-05 04:12:56 +01:00
Stefan Frederik 780b994aeb use short data type for small integer data: rot, flip, dash, bus etc... 2020-12-05 03:16:01 +01:00
Stefan Frederik 29d8b0c3a8 resetwin(1,1,1) instead of resetwin(1,1,0) in preview_window so save_pixmap is reset to correct size when switching back to main window 2020-12-04 02:27:35 +01:00
Stefan Frederik 1268a6faae removed redundant XSetTile in preview_window() 2020-12-04 01:38:48 +01:00
Stefan Frederik 76ef664757 undo data structures into xctx context 2020-12-04 00:30:13 +01:00
Stefan Frederik 2b7e31e0d6 add utility functions to create new schematic window 2020-12-03 23:17:13 +01:00
Stefan Frederik 3732bd8d01 put cairo save surface and context into xctx, faster and smoother preview (avoid unload/load if no filename change) 2020-12-03 18:21:23 +01:00
Stefan Frederik 66a73e4e99 cleanup in preview code 2020-12-03 11:49:29 +01:00
Stefan Frederik 4322101f9b cleanup in preview code 2020-12-03 11:46:00 +01:00
Stefan Frederik 9588a859da cleanup in preview code 2020-12-03 11:42:06 +01:00
Stefan Frederik a64d69ed7a some code refactoring, more globals in xctx context, fixed unnoticed shift-reduce conflict in expandlabel 2020-12-03 04:20:05 +01:00
Stefan Frederik 8902f3b56b more state in xctx context 2020-12-02 19:35:42 +01:00
Stefan Frederik e279262f00 more globals into xctx context struct 2020-12-02 15:10:47 +01:00
Stefan Frederik 08e179e588 better cmdline filename path parsing 2020-12-01 13:25:00 +01:00
Stefan Frederik eda64b7ee1 removed event_reporting feature 2020-11-29 03:27:45 +01:00
Stefan Frederik d93826f61c wrap long lines in source code, set default direction of pins to "B"(idirectional) if not specified in spice netlist (no *.PININFO information) 2020-11-22 00:51:24 +01:00
Stefan Frederik 0d59d01170 allow to pass down to tcl evaluation (via tcleval( ....) wrap) instance parameters: example of a mos transistor : name=m1 w=2 l=0.13 model=net ad="tcleval([expr @W * 0.29])" --> in netlist: m1 d g s b nfet w=2 l=0.13 ... ad=0.58 2020-11-20 18:46:27 +01:00
Stefan Schippers 71fd1bcb68 comments about color handling in source code, set_cairo_color() function 2020-11-19 15:08:40 +01:00
Stefan Schippers bf183f0d20 Option (default now) to export svg images using the svg <text> element. This makes generated SVGs much smaller and in most cases faster to render. 2020-11-18 18:29:14 +01:00
Stefan Schippers 78a82a9bc0 fix regression: ps and svg exports were broken due to enable_layer[] used for enabling selections 2020-11-17 02:17:34 +01:00
Stefan Schippers 61dd4e99b0 better xschem icon: added shapemask for "transparent" background 2020-11-10 13:17:25 +01:00
Stefan Schippers 24dd02b713 Fixed Windows Xschem running from VS2019 without installing Xschem to find (Root)/xschem_library/devices as XSCHEM_LIBRARY_PATH, so that viewing schematics through VS2019 will find all symbols in xschem_library/devices. Moved doc and xschem_library XML files to its own *.wxs. Cleaned up Product.wxs by taking out doc and xschem_library files; fixed spacings in License.rtf; added condition that proper version of Active TCL is required to install 2020-11-07 10:52:50 +01:00
Stefan Schippers 73bab32aa9 __unix__: do simple tilde subst ( ~/ --> /home/user) just in case this was not done by the shell 2020-10-27 22:56:53 +01:00
Stefan Schippers 5706b12ad9 do not execute tcl proc "build_windows" in xinit.c if no X or -x option given 2020-10-27 12:00:34 +01:00
Stefan Schippers b4681b22af aligned linux code to windows: check if preview pixmap != main pixmap before destroying. probably not needed but good practice 2020-10-20 23:34:40 +02:00
Stefan Schippers 7e845db5df exampels/poweramp.sch and examples/cmos_example.sch show how to use dynamuc ngspice simulation data backannotation, optimized fix of previous bbox bug 2020-10-20 19:48:59 +02:00
Stefan Schippers 3e3c1ea671 uniquify malloc IDs 2020-10-17 22:39:52 +02:00
Stefan Schippers 632dbd8931 allow dim background color in "View -> Dim oclors" 2020-10-17 03:47:32 +02:00
Stefan Schippers 8a45e319c9 if xschem is started with -n (netlist) load_schematic will not call tcl proc is_xschem_file to determine if sch or sym type, since command line option has higher priority. reverted back possibility in update_symbol() to have double quotes around name attribute (name="My strange name"). This has toooo many implications everywhere. name attribute must be wihout double quotes, xschem will strip them off if any. 2020-10-17 02:54:42 +02:00
Stefan Schippers 55723e9429 line width is related to the schematic, so it is moved under xctx; removed all integer versions (lw, bus_width) that needed to be kept in sync, created two macros to get the integer values from xctx->lw. main window save_pixmap is preserved when doing a schematic preview in file open dialog, so no need to regenerate its content (with a draw() call) after preview. 2020-10-17 00:53:19 +02:00
Stefan Schippers 9e38fbd173 fix wrong const declaration in save.c 2020-10-16 23:19:20 +02:00
Stefan Schippers f0e6559324 fix: restore modified state (set_modify() ) was done before swicthing back xctx to current schematic 2020-10-16 19:36:21 +02:00
Stefan Schippers 7c757f9803 removed unused set_fill() function 2020-10-16 19:27:19 +02:00
Stefan Schippers aa2a47c5b9 grouping X11 specific global declarations 2020-10-16 19:16:03 +02:00
Stefan Schippers f0f1f9c2f0 optimization in preview function: no un-needed redraw of current schematic; no window title change when previewing xschem files 2020-10-16 18:24:06 +02:00
Stefan Schippers 1c294ce31d preview function now does no more need to save whole schematic on the undo stack, it is just a matter of pointer switching 2020-10-15 18:08:14 +02:00
Stefan Schippers e7928727d6 all xctx context is now a dynamically allocated structure; no observable performace impact 2020-10-15 17:39:21 +02:00
Stefan Schippers 0eb706a67e removed changes in strings due to variable refactoring 2020-10-15 17:05:30 +02:00
Stefan Schippers 6d96c8bd61 move xctx.sch_path free under free_xschem_data() 2020-10-15 16:32:09 +02:00
Stefan Schippers c70aa9b06d update_symbol() do not throw away quotes in name attrs (name="some thing") 2020-10-14 16:02:05 +02:00
Stefan Schippers 5d26115bd2 refactored token.c, differentiate between windows and unix in absolute filename construction in xinit.c 2020-10-14 01:38:51 +02:00
Stefan Schippers 1c2bbc609f added "xschem samefile" command to verify if 2 files are the same entity by comparing inodes, pwd_dir set in xinit.c to $env(PWD) if PWD var is defined as it does not dereference symlinks 2020-10-13 17:51:14 +02:00
Stefan Schippers 8ea275013e updated print_spice_subckt() to reflect updates done in print_spice_element(); abs_sym_path recognize ././././, ./., other strange paths., use $env(PWD) for current_dirname on startup instead of getcwd() if possible, to avoid dereferencing symlinks 2020-10-13 16:23:48 +02:00
Stefan Schippers 6f80fdbf76 fix once again an issue when working in symlinked directories and giving a relative .sch file path on cmdline; clean up print_spice_element(). JL to check if tclgetvar("env(PWD)") works on windows (xinit.c:1435) 2020-10-13 01:07:28 +02:00
Stefan Schippers 64c0abc58e code refactoring (global context in Xschem_ctx), "New Schematic" or "New Symbol" will set netlist_type to "spice" or "symbol" respectively 2020-10-12 13:13:31 +02:00
Stefan Schippers 4d0a3d8f7c allow probing to gaw current in voltage sources in addition to ammeters 2020-10-09 22:19:54 +02:00
Stefan Schippers 644641ed23 Preserve existing text (notably license info) in xschem files under version "v" tag; some code refactoring, removed obsoleted comments 2020-10-09 17:29:04 +02:00
Stefan Schippers 0f61e0fe0f JL fix regression for path resolution on windows, Esc resets manhattan_lines setting 2020-10-07 16:12:33 +02:00
Stefan Schippers a10cb2c429 added warnings (Options -> Show info window) if components are missing a name=... attribute / if symbols are missing a type=... attribute; eliminated usage of tcl "file normalize..." statements to avoid symlink dereferencing (if using symlinked libraries), aligned version/file_version tags in support awk scripts 2020-10-06 16:19:52 +02:00
Stefan Schippers 051b20c014 code formating, use some intermediate variables for code readability, line length limited to 124 chars 2020-10-04 23:55:43 +02:00
Stefan Schippers 3060217aec simplified complex logical expressions on symbol type by using macros 2020-10-04 19:53:09 +02:00
Stefan Schippers 12f74b1265 split a couple of xinit.c functions 2020-10-04 12:51:34 +02:00
Stefan Schippers 3cf9d53182 comments in code 2020-10-04 11:19:50 +02:00
Stefan Schippers d706e45987 set max width of .c files <=130 chars; Fix netlist regression: if no "lab=value" is given in instance attributes get lab from symbol "template=" string. This was commented out recently and now reverted back. "View->Enable show net names on symbol pins" global menu added: if unset no symbol pin net names will be shown regardless of instance/symbol "net_name=true" and pin @#n:net_name attributes. 2020-09-30 23:55:07 +02:00
Stefan Schippers 392e7f9b57 "@#n:net_name" attribute (n = pin name or number) in symbols translates to net name attached to pin. "lab_show.sym" component that shows (does not assign) net name. "highlight=true" attribute can be given on instances in addition to symbols. Set filename in recent history also when given on command line. 2020-09-30 00:55:34 +02:00
Stefan Schippers f699d187e6 save embedded components not only on first embeded instance but on all of them. This makes reloading easier and the overall thing much simpler. In LCC schematic allow get_sym_type() to read symbol data from folowing embedded tags "[...]" if any. Fix potential segfault in preview_window() 2020-09-29 11:17:10 +02:00
Stefan Schippers 79a56a99f5 allow to launch xschem in fullscreen mode with --tcl "set fullscreen 1"; doc updates for bus, dash, fill attributes 2020-09-07 15:20:22 +02:00
Stefan Schippers 30335ce30a make Alt-KeyPress (hopefully) work on windows by manually building the Mask values 2020-09-07 09:34:41 +02:00
Stefan Schippers 3107c5b12a added "dash=n" (n=integer) attribute for lines, polygons, rectangles to set dashed line style. n is the dash length in pixels. 2020-09-02 18:28:20 +02:00
Stefan Schippers 61df74b50b fix svg export if colorscheme changed via menu; allow monochrome svg export via menu Options -> Color Postscript/SVG 2020-08-31 23:11:20 +02:00
Stefan Schippers 60791062ac added -b/--batch cmd option (__unix__ only) to detach xschem completely from console 2020-08-31 21:24:03 +02:00
Stefan Schippers 08bf7cb962 defer tk windows/menu/widgets creation and Xevent binding setup after xinit.c completes X initialization. This avoids theoretical race condidions if a ConfigureNotify or Expose event is delivered before all Xlib initialization completed. 2020-08-31 13:54:37 +02:00
Stefan Schippers 7ce7654748 fix some race conditions (xevents) when doing a png export from cmdline options; fix svg light colorscheme background (was always black) 2020-08-30 23:58:51 +02:00
Stefan Schippers 4e48908902 svg and pdf exports use custom layer colors as set in ~/.xschem/colors file if any. 2020-08-30 12:01:48 +02:00
schippes 9570439e16 made edit_symbol_property and tcl edit_prop procedure much simpler when user clicks another instance while edit_prop dialog still open 2020-08-16 03:34:45 +02:00