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