From 09868a0782be3e4a2294e34c9c784a6dc53120cb Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 6 Feb 2023 14:36:24 +0100 Subject: [PATCH] put a typedef in xschem.h to avoid duplicate declarations. add env tcl to global list in proc simulate --- XSchemWin/XSchemWix/doc.wxs | 28 ++ XSchemWin/XSchemWix/heat_doc.wxs | 662 ++++++++++++++++--------------- src/cairo_jpg.c | 1 + src/draw.c | 7 - src/psprint.c | 7 - src/xschem.h | 8 + src/xschem.tcl | 2 +- 7 files changed, 383 insertions(+), 332 deletions(-) diff --git a/XSchemWin/XSchemWix/doc.wxs b/XSchemWin/XSchemWix/doc.wxs index e6db2dd2..13d0226e 100644 --- a/XSchemWin/XSchemWix/doc.wxs +++ b/XSchemWin/XSchemWix/doc.wxs @@ -216,6 +216,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -1034,6 +1055,13 @@ + + + + + + + diff --git a/XSchemWin/XSchemWix/heat_doc.wxs b/XSchemWin/XSchemWix/heat_doc.wxs index 2433090a..f94be45e 100644 --- a/XSchemWin/XSchemWix/heat_doc.wxs +++ b/XSchemWin/XSchemWix/heat_doc.wxs @@ -3,958 +3,979 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1033,6 +1054,13 @@ + + + + + + + diff --git a/src/cairo_jpg.c b/src/cairo_jpg.c index d14d8807..81cbf253 100644 --- a/src/cairo_jpg.c +++ b/src/cairo_jpg.c @@ -44,6 +44,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#undef EXTERN #include #include "cairo_jpg.h" diff --git a/src/draw.c b/src/draw.c index 3a24bf2f..d155b02c 100644 --- a/src/draw.c +++ b/src/draw.c @@ -3055,13 +3055,6 @@ static void draw_graph_all(int flags) } #if HAS_CAIRO==1 -typedef struct -{ - unsigned char *buffer; - size_t pos; - size_t size; -} png_to_byte_closure_t; - cairo_status_t png_reader(void *in_closure, unsigned char *out_data, unsigned int length) { png_to_byte_closure_t *closure = (png_to_byte_closure_t *) in_closure; diff --git a/src/psprint.c b/src/psprint.c index 9677d00b..3e5e96ca 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -98,13 +98,6 @@ static Ps_color *ps_colors; static char ps_font_name[80] = "Helvetica"; /* Courier Times Helvetica Symbol */ static char ps_font_family[80] = "Helvetica"; /* Courier Times Helvetica Symbol */ -typedef struct -{ - unsigned char* buffer; - size_t pos; - size_t size; -} png_to_byte_closure_t; - void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2, int rot, int flip) { #if defined(HAS_LIBJPEG) && defined(HAS_CAIRO) diff --git a/src/xschem.h b/src/xschem.h index 9a599fb4..286df789 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -416,6 +416,14 @@ typedef struct } xLine; #if HAS_CAIRO==1 + +typedef struct +{ + unsigned char* buffer; + size_t pos; + size_t size; +} png_to_byte_closure_t; + typedef struct { cairo_surface_t *image; diff --git a/src/xschem.tcl b/src/xschem.tcl index 850b4cd7..026ecf0c 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -1397,7 +1397,7 @@ proc simulate {{callback {}}} { ## $S : schematic name full path (/home/schippes/.xschem/xschem_library/opamp.sch) ## $d : netlist directory - global netlist_dir terminal sim + global netlist_dir terminal sim env global execute XSCHEM_SHAREDIR has_x OS simuldir