From f78fc5494d3b2f579bab97f6f79cf88913588798 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Thu, 8 Sep 2022 20:58:12 +0200 Subject: [PATCH] set_text_custom_font xctx->cairo_ctx can be NULL when netlisting without X with 0_examples_top.sch; net_name(..) doesnt work on duplicate pin for test_doublepin.sch so added back the condition in rev 2243; added HAS_CAIRO directive to compile on Windows that dont have CAIRO turned on. remove some old unused variables --- src/draw.c | 2 +- src/token.c | 3 +++ src/xinit.c | 2 ++ src/xschem.tcl | 10 +++------- src/xschemrc | 6 ------ 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/draw.c b/src/draw.c index a7df3906..dae1694a 100644 --- a/src/draw.c +++ b/src/draw.c @@ -169,7 +169,7 @@ static void set_cairo_color(int layer) int set_text_custom_font(xText *txt) /* 20171122 for correct text_bbox calculation */ { const char *textfont; - + if (xctx->cairo_ctx==NULL) return 0; textfont = txt->font; if((textfont && textfont[0]) || (txt->flags & (TEXT_BOLD | TEXT_OBLIQUE | TEXT_ITALIC))) { cairo_font_slant_t slant; diff --git a/src/token.c b/src/token.c index f74faf3e..4243e608 100644 --- a/src/token.c +++ b/src/token.c @@ -2673,6 +2673,9 @@ const char *net_name(int i, int j, int *multip, int hash_prefix_unnamed_net, int break; } } + } + if(xctx->inst[i].node && xctx->inst[i].node[j] == NULL) + { expandlabel(pinname, multip); if(pinname) my_free(1511, &pinname); if(erc) { diff --git a/src/xinit.c b/src/xinit.c index 895d4c1e..71c7c3c8 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -735,8 +735,10 @@ int compare_schematics(const char *f) xctx->xrect[0].height = save_xctx->xrect[0].height; xctx->save_pixmap = save_xctx->save_pixmap; xctx->gctiled = save_xctx->gctiled; +#if HAS_CAIRO==1 xctx->cairo_ctx = save_xctx->cairo_ctx; xctx->cairo_save_ctx = save_xctx->cairo_save_ctx; +#endif /* set identical viewport */ xctx->zoom = save_xctx->zoom; diff --git a/src/xschem.tcl b/src/xschem.tcl index 3685bc04..bce92839 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -546,11 +546,10 @@ proc edit_file {filename} { ## ## Other global vars: ## netlist_dir -## computerfarm ## terminal ## netlist_type can be obtained with [xschem get netlist_type] proc save_sim_defaults {f} { - global sim netlist_dir computerfarm terminal + global sim netlist_dir terminal set a [catch {open $f w} fd] if { $a } { @@ -1144,7 +1143,7 @@ proc simulate {{callback {}}} { ## $S : schematic name full path (/home/schippes/.xschem/xschem_library/opamp.sch) ## $d : netlist directory - global netlist_dir computerfarm terminal sim + global netlist_dir terminal sim global execute XSCHEM_SHAREDIR has_x OS simuldir @@ -1272,7 +1271,7 @@ proc waves {} { ## $S : schematic name full path (/home/schippes/.xschem/xschem_library/opamp.sch) ## $d : netlist directory - global netlist_dir computerfarm terminal sim XSCHEM_SHAREDIR has_x + global netlist_dir terminal sim XSCHEM_SHAREDIR has_x global bespice_listen_port env simuldir @@ -5685,9 +5684,6 @@ set_ne edit_prop_size 80x12 set_ne text_line_default_geometry 80x12 set_ne terminal xterm -# set_ne analog_viewer waveview -set_ne computerfarm {} ;# 20151007 - # xschem tcp port number (listen to port and execute commands from there if set) # set a port number in xschemrc if you want accept remote connections. set_ne xschem_listen_port {} diff --git a/src/xschemrc b/src/xschemrc index 18e819b1..85045be0 100644 --- a/src/xschemrc +++ b/src/xschemrc @@ -306,12 +306,6 @@ # set show_infowindow 0 ########################################################################### -#### CONFIGURE COMPUTER FARM JOB REDIRECTORS FOR SIMULATIONS -########################################################################### -#### RTDA NC -# set computerfarm {nc run -Il} -#### LSF BSUB -# set computerfarm {bsub -Is} ########################################################################### #### TCP CONNECTION WITH GAW