From a0fb4c5ee65814292d8fd908f9168ffed2eb6342 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sun, 19 Mar 2023 12:54:46 +0100 Subject: [PATCH] improve xschem check_symbols command --- src/scheduler.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/scheduler.c b/src/scheduler.c index c3cbf821..446022a9 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -325,6 +325,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg char sympath[PATH_MAX]; const char *name; struct stat buf; + char *res=NULL; for(i=0;isymbols; ++i) { name = xctx->sym[i].name; if(!strcmp(xctx->file_version, "1.0")) { @@ -334,14 +335,15 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } if(!stat(sympath, &buf)) { /* file exists */ if(xctx->time_last_modify < buf.st_mtime) { - dbg(0, "Warning: symbol %s is newer than schematic\n", sympath); + my_mstrcat(_ALLOC_ID_, &res, "Warning: symbol ", sympath, " is newer than schematic\n", NULL); } } else { /* not found */ - dbg(0, "Warning: symbol %s not found\n", sympath); + my_mstrcat(_ALLOC_ID_, &res, "Warning: symbol ", sympath, " not found\n", NULL); } - dbg(0, "symbol %d: %s\n", i, sympath); + my_mstrcat(_ALLOC_ID_, &res, "symbol ", my_itoa(i), " : ", sympath, "\n", NULL); } - Tcl_ResetResult(interp); + Tcl_SetResult(interp, res, TCL_VOLATILE); + my_free(_ALLOC_ID_, &res); } /* check_unique_names [1|0]