From d3b5e999f47b08a2b0249117f13502fcf4423f5a Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 25 Apr 2025 01:36:29 +0200 Subject: [PATCH] ps_embedded_graph(): variable declaration guarded inside if defined(HAS_LIBJPEG); xschem.h: avoid including ../config.h if manual Makefile used --- src/psprint.c | 2 +- src/xschem.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/psprint.c b/src/psprint.c index 1fdd6bca..05ae9686 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -252,8 +252,8 @@ static int ps_embedded_image(xRect* r, double x1, double y1, double x2, double y static int ps_embedded_graph(int i, double rx1, double ry1, double rx2, double ry2) { - xRect *r = &xctx->rect[GRIDLAYER][i]; #if defined(HAS_LIBJPEG) && HAS_CAIRO==1 + xRect *r = &xctx->rect[GRIDLAYER][i]; Zoom_info zi; double rw, rh, scale; cairo_surface_t* png_sfc; diff --git a/src/xschem.h b/src/xschem.h index 7c052f3d..fb40adf5 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -47,7 +47,9 @@ #define XSCH_PI 3.14159265358979323846264338327950288419716939937 #ifdef __unix__ +#ifndef NO_SCCONFIG #include "../config.h" +#endif #else #include "../XSchemWin/config.h" #endif