From 123b247bed5b41d63090b317bed184dcc31503c4 Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 18 Oct 2009 13:45:35 +0000 Subject: [PATCH] correct __func__ usage for different compiler --- src/spicelib/parser/inpptree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index e41d2ac78..38fc29407 100644 --- a/src/spicelib/parser/inpptree.c +++ b/src/spicelib/parser/inpptree.c @@ -4,8 +4,6 @@ Author: 1987 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice.h" -#include -#include #include "ifsim.h" #include "iferrmsg.h" #include "inpdefs.h" @@ -33,7 +31,9 @@ static int numvalues; static void *circuit; static INPtables *tables; - +#if defined (_MSC_VER) +# define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ +#endif extern IFsimulator *ft_sim; /* XXX */ @@ -782,11 +782,11 @@ static INPparseNode *prepare_PTF_PWL(INPparseNode *p) int i; if (p->funcnum != PTF_PWL) { - fprintf(stderr, "MY-INFO: %s, very unexpected\n", __FUNCTION__); + fprintf(stderr, "PWL-INFO: %s, very unexpected\n", __func__); exit(1); } - fprintf(stderr, "MY-INFO: %s building a PTF_PWL\n", __FUNCTION__); + fprintf(stderr, "PWL-INFO: %s building a PTF_PWL\n", __func__); i = 0; for(w = p->left; w->type == PT_COMMA; w = w->left) @@ -810,7 +810,7 @@ static INPparseNode *prepare_PTF_PWL(INPparseNode *p) w->right->left->type == PT_CONSTANT) { data->vals[i] = - w->right->left->constant; } else { - fprintf(stderr, "MY-ERROR: %s, not a constant\n", __FUNCTION__); + fprintf(stderr, "PWL-ERROR: %s, not a constant\n", __func__); fprintf(stderr, " type = %d\n", w->right->type); //Breakpoint; fprintf(stderr, "Error: PWL(expr, points...) only *literal* points are supported\n");