Increased the diesel parser stringlength
This commit is contained in:
parent
7d2e269c05
commit
9f38169b56
@ -7,6 +7,9 @@ v0.71.2 16-Jan-2005
|
||||
Changed rfc-2045 name x-mac to mac. Changed x-ibmpc to cp437.
|
||||
This allows rfc mime headers to show official names.
|
||||
|
||||
libdiesel.a:
|
||||
Changed the maximum string length from 2560 to 4096 characters.
|
||||
|
||||
mbcico:
|
||||
Added protection during binkp receive for zero bytes compressed
|
||||
data frames, this will case uncompress error -5 because zero
|
||||
|
@ -24,7 +24,7 @@ int tracing = TRUE; /* Trace macro evalution */
|
||||
/* Local variables. */
|
||||
|
||||
#define MAXARGS 10 /* Maximum arguments to a macro */
|
||||
#define MAXSTR 2560 /* Maximum string length */
|
||||
#define MAXSTR 4096 /* Maximum string length */ /* Was 2560 */
|
||||
#define MAXDEPTH 32 /* Maximum recursion depth for eval */
|
||||
|
||||
#define MACROCHAR '@' /* Macro trigger character */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: MBSE BBS functions for TURBODIESEL
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2004
|
||||
* Copyright (C) 1997-2005
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -38,22 +38,18 @@ static int firstrandom = TRUE;
|
||||
|
||||
void MacroVars( const char *codes, const char *fmt, ...)
|
||||
{
|
||||
char *tmp1, *tmp2;
|
||||
char *tmp1, *tmp2, *vs, vc;
|
||||
va_list ap;
|
||||
int j;
|
||||
int dieselrc;
|
||||
char *vs;
|
||||
int vd;
|
||||
char vc;
|
||||
int j, dieselrc, vd;
|
||||
double vf;
|
||||
|
||||
tmp1=calloc(MAXSTR, sizeof(char));
|
||||
tmp2=calloc(MAXSTR, sizeof(char));
|
||||
tmp1 = calloc(MAXSTR, sizeof(char));
|
||||
tmp2 = calloc(MAXSTR, sizeof(char));
|
||||
|
||||
va_start(ap,fmt);
|
||||
for ( j=0; (codes[j] != '\0') && (fmt[j] != '\0') ; j++ ){
|
||||
tmp1[0]='\0';
|
||||
switch(fmt[j]) {
|
||||
for (j = 0; (codes[j] != '\0') && (fmt[j] != '\0') ; j++ ){
|
||||
tmp1[0] = '\0';
|
||||
switch (fmt[j]) {
|
||||
case 's': /* string */
|
||||
vs = va_arg(ap, char *);
|
||||
sprintf(tmp1,"@(setvar,%c,\"%s\")",codes[j],vs);
|
||||
@ -71,9 +67,13 @@ void MacroVars( const char *codes, const char *fmt, ...)
|
||||
sprintf(tmp1,"@(setvar,%c,%f)",codes[j],vf);
|
||||
break;
|
||||
}
|
||||
dieselrc=diesel(tmp1,tmp2);
|
||||
dieselrc = diesel(tmp1,tmp2);
|
||||
if (dieselrc) {
|
||||
Syslog('!', "MacroVars error %d argument %d, macro %c type %c", dieselrc, j, codes[j], fmt[j]);
|
||||
if (fmt[j] == 's')
|
||||
Syslogp('!', printable(va_arg(ap, char *), 0));
|
||||
Syslogp('!', printable(tmp1, 0));
|
||||
Syslogp('!', printable(tmp2, 0));
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
|
Reference in New Issue
Block a user