diff -ur rexx-imc-1.75/HISTORY rexx-imc-1.76/HISTORY --- rexx-imc-1.75/HISTORY Mon Feb 25 22:37:30 2002 +++ rexx-imc-1.76/HISTORY Mon Feb 25 23:15:50 2002 @@ -365,3 +365,16 @@ longer allows x to contain a leading sign or leading and trailing spaces; datatype(x,'S') changed to test x against the syntax of a symbol instead of just testing the individual characters of x. + +REXX/imc-beta-1.76 4.00 25 Feb 2002 (another unofficial bugfix release) + + * set LD=gcc in the Make file for Linux (fixes bad crash with glibc>=2.1). + * clear workspace in main interpreter loop (fixes potential memory leak). + * fix off-by-1 memory allocation in signal condition (causes occasional + bad crashes). + * fix invalid array access in rare case of traceput called with + an empty string. + * fix rare PARSE VALUE bug which corrupts the expression being parsed. + * PARSE bug with arbitrary expressions in template documented. + * assignments during parse traced with >=> tag. + * sign() function documented. diff -ur rexx-imc-1.75/Make rexx-imc-1.76/Make --- rexx-imc-1.75/Make Mon Feb 25 22:37:30 2002 +++ rexx-imc-1.76/Make Mon Feb 25 23:17:26 2002 @@ -51,9 +51,9 @@ # RXYEAR=`expr $RXYEAR + 0` # The date of this release -RXDAY=1 -RXMONTH=1 -RXYEAR=100 +RXDAY=25 +RXMONTH=2 +RXYEAR=102 ####################################################################### # Where will the binary and library eventually end up? @@ -376,10 +376,12 @@ case $CC in gcc) CCFLAG="-DFSTAT_FOR_CHARS" + LD=gcc ;; *) echo "Warning: I don't know the options for $CC"\ "- trying the gcc ones" >&2 CCFLAG="-DFSTAT_FOR_CHARS" + LD=$CC ;; esac egrep -q tm_gmtoff /usr/include/time.h && CCFLAG="$CCFLAG -DHAS_GMTOFF" diff -ur rexx-imc-1.75/rexx.c rexx-imc-1.76/rexx.c --- rexx-imc-1.75/rexx.c Mon Feb 25 22:37:30 2002 +++ rexx-imc-1.76/rexx.c Mon Feb 25 23:11:05 2002 @@ -406,6 +406,7 @@ while(ppc':'.'); + what[1]=(varname[0]?'=':'.'); if(!(up&&len))traceline(what,val,len); else{ sp=allocm((unsigned)len); diff -ur rexx-imc-1.75/rexx.ref rexx-imc-1.76/rexx.ref --- rexx-imc-1.75/rexx.ref Mon Feb 25 22:37:30 2002 +++ rexx-imc-1.76/rexx.ref Mon Feb 25 23:15:08 2002 @@ -1315,6 +1315,12 @@ As with RXFUNCDROP, this function will return zero if the name is registered either verbatim or in upper case. +SIGN(num) + +This function returns the sign of the given number. The result is 1 if +num is positive and -1 if num is negative. If num=0 then zero is +returned. + SOURCELINE([i]) If i is omitted, then the result is the number of lines in the program. @@ -2227,7 +2233,10 @@ an instruction: symbol = token NOTE: Most versions of REXX allow only a symbol name between parentheses - where this version allows an arbitrary expression. + where this version allows an arbitrary expression. However, this + is not well tested and some bugs may remain. In any case, if + the arbitrary expression contains a function call which itself + uses PARSE, this may overwrite the original string being parsed. The one case in which the presence of a varlist may affect the translation from position indicators to column numbers is when one or diff -ur rexx-imc-1.75/rexx.summary rexx-imc-1.76/rexx.summary --- rexx-imc-1.75/rexx.summary Mon Feb 25 22:37:30 2002 +++ rexx-imc-1.76/rexx.summary Mon Feb 25 22:58:07 2002 @@ -229,6 +229,7 @@ RXFUNCADD(rexxname,module,sysname) - load an external function RXFUNCDROP(function) - drop an external function RXFUNCQUERY(function) - query whether a function is loaded +SIGN(num) - return the sign of the number SOURCELINE([i]) - return a line of the source program SPACE(s[,[n][,pad]]) - evenly space words in a sentence STRIP(string[,[opt][,char]]) - remove leading/trailing spaces diff -ur rexx-imc-1.75/util.c rexx-imc-1.76/util.c --- rexx-imc-1.75/util.c Fri Jan 22 00:12:10 1999 +++ rexx-imc-1.76/util.c Mon Feb 25 22:51:12 2002 @@ -130,7 +130,7 @@ if(rc && type==Enotready)lasterror=rc; /* save an I/O error */ if(call||catch){ if(sigdata[bit])free(sigdata[bit]); - strcpy(sigdata[bit]=allocm(strlen(desc)),desc); + strcpy(sigdata[bit]=allocm(1+strlen(desc)),desc); } if(call)delayed[bit]=1; else if(catch)die(type); @@ -1070,9 +1070,9 @@ { char c; static RXSIOTRC_PARM sio; - int cr=str[len-1]=='\n'; + int cr; if(!len)return; - if(cr)len--; + if((cr=str[len-1]=='\n'))len--; while(len--) if(tracepos