From 31203ce2ab0dfb63da5b15b5885040eebdfc0ce2 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Thu, 11 Feb 2010 22:32:10 +0000 Subject: [PATCH] macro ERROR -> MERROR --- ChangeLog | 2 ++ src/include/macros.h | 2 +- src/maths/ni/nipzmeth.c | 2 +- src/spicelib/analysis/cktpzstr.c | 4 ++-- src/spicelib/analysis/pzan.c | 10 +++++----- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd677699c..dd0d2fc8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-02-11 Holger Vogt * terminal.h, cpextern.h: use format (__printf__, 1, 2) + * pzan.c, nipzmeth.c, cktpzstr.c, macros.h: remove conflicting macro definition + (MS Visual Studio) ERROR -> MERROR 2010-02-08 Holger Vogt * com_sysinfo.c: 64 bit support enabled diff --git a/src/include/macros.h b/src/include/macros.h index 9c90efe42..c007dfd19 100644 --- a/src/include/macros.h +++ b/src/include/macros.h @@ -43,7 +43,7 @@ #define NIL(type) ((type *)0) #define ABORT() fflush(stderr);fflush(stdout);abort(); -#define ERROR(CODE,MESSAGE) { \ +#define MERROR(CODE,MESSAGE) { \ errMsg = (char *) tmalloc(strlen(MESSAGE) + 1); \ strcpy(errMsg, (MESSAGE)); \ return (CODE); \ diff --git a/src/maths/ni/nipzmeth.c b/src/maths/ni/nipzmeth.c index ad1023723..a413bf11e 100644 --- a/src/maths/ni/nipzmeth.c +++ b/src/maths/ni/nipzmeth.c @@ -406,7 +406,7 @@ NIpzSym2(PZtrial **set, PZtrial *new) new->s.real = (set[1]->s.real + b) / 2.0; } } else - ERROR(E_PANIC,"Lost numerical stability"); + MERROR(E_PANIC,"Lost numerical stability"); } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ take second (c)\n"); diff --git a/src/spicelib/analysis/cktpzstr.c b/src/spicelib/analysis/cktpzstr.c index e52027962..27bb0e4b5 100644 --- a/src/spicelib/analysis/cktpzstr.c +++ b/src/spicelib/analysis/cktpzstr.c @@ -210,7 +210,7 @@ CKTpzFindZeros(CKTcircuit *ckt, PZtrial **rootinfo, int *rootcount) clear_trials(ISAROOT); *rootinfo = NULL; *rootcount = 0; - ERROR(E_SHORT, "The input signal is shorted on the way to the output"); + MERROR(E_SHORT, "The input signal is shorted on the way to the output"); } else clear_trials(0); @@ -396,7 +396,7 @@ PZeval(int strat, PZtrial **set, PZtrial **new_trial_p) break; default: - ERROR(E_PANIC, "Step type unkown"); + MERROR(E_PANIC, "Step type unkown"); break; } diff --git a/src/spicelib/analysis/pzan.c b/src/spicelib/analysis/pzan.c index 92d38c3e9..7c7c43a1b 100644 --- a/src/spicelib/analysis/pzan.c +++ b/src/spicelib/analysis/pzan.c @@ -89,7 +89,7 @@ PZinit(CKTcircuit *ckt) i = CKTtypelook("LTRA"); } if (i != -1 && ckt->CKThead[i] != NULL) - ERROR(E_XMISSIONLINE, "Transmission lines not supported") + MERROR(E_XMISSIONLINE, "Transmission lines not supported") pzan->PZpoleList = (PZtrial *) NULL; pzan->PZzeroList = (PZtrial *) NULL; @@ -97,19 +97,19 @@ PZinit(CKTcircuit *ckt) pzan->PZnZeros = 0; if (pzan->PZin_pos == pzan->PZin_neg) - ERROR(E_SHORT, "Input is shorted") + MERROR(E_SHORT, "Input is shorted") if (pzan->PZout_pos == pzan->PZout_neg) - ERROR(E_SHORT, "Output is shorted") + MERROR(E_SHORT, "Output is shorted") if (pzan->PZin_pos == pzan->PZout_pos && pzan->PZin_neg == pzan->PZout_neg && pzan->PZinput_type == PZ_IN_VOL) - ERROR(E_INISOUT, "Transfer function is unity") + MERROR(E_INISOUT, "Transfer function is unity") else if (pzan->PZin_pos == pzan->PZout_neg && pzan->PZin_neg == pzan->PZout_pos && pzan->PZinput_type == PZ_IN_VOL) - ERROR(E_INISOUT, "Transfer function is -1") + MERROR(E_INISOUT, "Transfer function is -1") return(OK); }