From 140b5d5e28e69c1bd23ffc123523a44b197b767e Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 25 Nov 2007 20:00:30 +0000 Subject: [PATCH] pow function included --- src/frontend/numparam/general.h | 2 +- src/frontend/numparam/mystring.c | 15 ++------------- src/frontend/numparam/numparam.h | 2 +- src/frontend/numparam/spicenum.c | 8 ++------ src/frontend/numparam/xpressn.c | 19 ++++++++++--------- 5 files changed, 16 insertions(+), 30 deletions(-) diff --git a/src/frontend/numparam/general.h b/src/frontend/numparam/general.h index aac98f6cc..e449bffc4 100644 --- a/src/frontend/numparam/general.h +++ b/src/frontend/numparam/general.h @@ -136,7 +136,7 @@ Type(Pchar, char AT) #define Str(n,a) char a[n+3]={0,0,(char)n} /* n<255 ! */ #define Sini(s) sini(s,sizeof(s)-4) -Cconst(Maxstr,15000) /* was 255, string maxlen, may be up to 32000 or so */ +Cconst(Maxstr,25004) /* was 255, string maxlen, may be up to 32000 or so */ typedef char string[258]; diff --git a/src/frontend/numparam/mystring.c b/src/frontend/numparam/mystring.c index 47aa64395..5da3fb641 100644 --- a/src/frontend/numparam/mystring.c +++ b/src/frontend/numparam/mystring.c @@ -5,15 +5,11 @@ * $Id$ */ -#ifdef __TURBOC__ -extern unsigned _stklen= 32000; /* Turbo C default was only 4 K */ -#endif - #include #include #include #include -/* #include -- ceil floor */ +#include /* -- ceil floor */ #include "config.h" #ifdef HAS_WINDOWS #include "wstdio.h" @@ -593,13 +589,7 @@ Begin If sz<=0 Then return Null Else -#ifdef __TURBOC__ - /* truncate to 64 K ! */ - If sz> 0xffff Then sz= 0xffff EndIf - p= malloc((Word)sz); -#else p= malloc(sz); -#endif If p==Null Then /* fatal error */ ws(" new() failure. Program halted.\n"); exit(1); @@ -738,8 +728,7 @@ Begin Done return ok EndFunc - -Intern + Func int posi(Pchar sub, Pchar s, int opt) /* find position of substring in s */ Begin diff --git a/src/frontend/numparam/numparam.h b/src/frontend/numparam/numparam.h index 786124313..a720973ee 100644 --- a/src/frontend/numparam/numparam.h +++ b/src/frontend/numparam/numparam.h @@ -28,7 +28,7 @@ Cconst(Llen,15000) typedef char str50 [54]; typedef char str80 [84]; -Cconst(Maxline, 40000) /* size of initial unexpanded circuit code */ +Cconst(Maxline, 20000) /* size of initial unexpanded circuit code */ Cconst(Maxckt, 40000) /* size of expanded circuit code */ diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index b750950d7..dea0188f4 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -25,10 +25,6 @@ Todo: #include #include #include -#ifdef __TURBOC__ -#include /* exit() */ -#endif - #include "general.h" #include "numparam.h" #include "ngspice.h" @@ -36,7 +32,7 @@ Todo: extern void txfree(void *ptr); /* Uncomment this line to allow debug tracing */ -/*#define TRACE_NUMPARAMS*/ +/* #define TRACE_NUMPARAMS */ /* the nupa_signal arguments sent from Spice: @@ -225,7 +221,7 @@ Begin While alfanum(s[j]) Do cadd(name, upcase(s[j])); Inc(j) Done - found= (getidtype(dico, name) == 'U'); + found = (getidtype(dico, name) == 'U'); EndIf Done If found And (h