From dee7afbfcc2712f7885a9046272606b09669bd09 Mon Sep 17 00:00:00 2001 From: pnenzi Date: Sun, 2 Dec 2001 20:12:56 +0000 Subject: [PATCH] Added --enable-ftedebug option to configure, fixed a bug in configure.in, now HAVE_ASPRINTF gets defined when the function exists, added a comment in postcoms.c --- acconfig.h | 3 +++ configure.in | 14 +++++++++++--- src/frontend/postcoms.c | 3 ++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/acconfig.h b/acconfig.h index 0c89ece34..4be35ef4d 100644 --- a/acconfig.h +++ b/acconfig.h @@ -37,3 +37,6 @@ /* Define if we don't have GETOPT in the library */ #undef HAVE_GETOPT + +/* We do not want spurios debug info into non-developer code */ +#undef FTEDEBUG diff --git a/configure.in b/configure.in index d997fc76e..88df83fde 100644 --- a/configure.in +++ b/configure.in @@ -5,9 +5,12 @@ dnl Create a configuration header AM_CONFIG_HEADER(config.h) dnl Initialize automake stuff -AM_INIT_AUTOMAKE(ng-spice-rework,14) - +AM_INIT_AUTOMAKE(ng-spice-rework,14pre4) +dnl --enable-ftedebug : enable frontend debug macros +AC_ARG_ENABLE(ftedebug, + [ --enable-ftedebug Enable ngspice frontend debug]) + dnl --enable-ansi : try to force --ansi option to the compiler AC_ARG_ENABLE(ansi, [ --enable-ansi Force --ansi option for compilation]) @@ -174,7 +177,7 @@ dnl Check for the garbage collector: AC_CHECK_LIB(gc,GC_malloc,AC_DEFINE(HAVE_LIBGC) LIBS="$LIBS -lgc") dnl Check for the asprintf function: -AC_CHECK_FUNC(asprintf) +AC_CHECK_FUNCS(asprintf) AC_CHECK_FUNC(getopt_long, getopt_long=true) @@ -215,6 +218,11 @@ if test "$enable_experimental" = "yes"; then AC_MSG_RESULT(EXPERIMENTAL_CODE enabled) fi +if test "$enable_ftedebug" = "yes"; then + AC_DEFINE(FTEDEBUG) + AC_MSG_RESULT(WARNING: Frontend debug is enabled) +fi + if test "$enable_ekv" = "yes"; then AC_MSG_RESULT(Model EKV included) diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index fea0ad4f9..15ee068f4 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -74,11 +74,12 @@ com_print(wordlist *wl) bool col = TRUE, nobreak = FALSE, noprintscale, plotnames = FALSE; bool optgiven = FALSE; char *s, buf[BSIZE_SP], buf2[BSIZE_SP]; - char numbuf[BSIZE_SP], numbuf2[BSIZE_SP]; + char numbuf[BSIZE_SP], numbuf2[BSIZE_SP]; /* Printnum buffers */ int ngood; if (wl == NULL) return; + if (eq(wl->wl_word, "col")) { col = TRUE; optgiven = TRUE;