Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhonghuaren
rexx-imc
rexx-imc-1.7-1.75.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rexx-imc-1.7-1.75.patch of Package rexx-imc
--- rexx-imc-1.7/HISTORY Wed Feb 10 22:06:15 1999 +++ /home/imc/rexx/HISTORY Fri Dec 31 16:32:22 1999 @@ -342,3 +342,26 @@ library dir. * Wrote man pages for rexx, rxque, rxstack. +REXX/imc-beta-1.7 4.00 31 Mar 1999 (bugfix release) + + * Fixed time('O') for glibc and SysV systems. + * Fixed segmentation fault on: rexx -tr -s "parse arg x" + * Fixed compilation errors on FreeBSD. + +REXX/imc-beta-1.75 4.00 1 Jan 2000 (unofficial bugfix release) + + * Fixed value length error in RexxVariablePool API function. + * Compiled on Red Hat 6 / glibc 2.1 (stderr not necessarily constant). + * Fixed memory corruption occuring rarely in DO loops. + * Fixed numeric comparison ('say 0 & -1<1' said -1 due to a spurious + stacked item when the signs differ - bug introduced in 8 Feb release). + * Fixed date('B',x) (returned wrong answer for x <= 31-Dec-1969). + * Fixed date(y,x,'B') (returned error for x < 719162). + * Doc fix: d2b and b2d are not standard functions. + * Fixed 'query exists' stream function (returned wrong result for + the file '/' or '/foo'). + * Symbol fixes: value(x) did not allow x to be a number in exponential + format; value(x,y) did allow x to be a constant symbol; symbol(x) no + 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-1.7/Make Tue Feb 9 17:33:17 1999 +++ /home/imc/rexx/Make Fri Dec 31 16:47:56 1999 @@ -51,9 +51,9 @@ # RXYEAR=`expr $RXYEAR + 0` # The date of this release -RXDAY=8 -RXMONTH=2 -RXYEAR=99 +RXDAY=1 +RXMONTH=1 +RXYEAR=100 ####################################################################### # Where will the binary and library eventually end up? @@ -382,6 +382,7 @@ CCFLAG="-DFSTAT_FOR_CHARS" ;; esac + egrep -q tm_gmtoff /usr/include/time.h && CCFLAG="$CCFLAG -DHAS_GMTOFF" ;; FreeBSD:*) REXXLIB="librexx.so" @@ -394,12 +395,12 @@ # Uncomment above line if you have problems with LD_LIBRARY_PATH case $CC in gcc) - CCFLAG="-DHAS_TTYCOM -D_REQUIRED" + CCFLAG="-DHAS_TTYCOM -D_REQUIRED -DRENAME_UNDELETE -DHAS_GMTOFF" PIC="-fPIC" ;; *) echo "Warning: I don't know the options for $CC"\ "- trying the gcc ones" >&2 - CCFLAG="-DHAS_TTYCOM -D_REQUIRED" + CCFLAG="-DHAS_TTYCOM -D_REQUIRED -DRENAME_UNDELETE -DHAS_GMTOFF" PIC="-fPIC" ;; esac --- rexx-imc-1.7/README.platforms Wed Feb 10 22:01:17 1999 +++ /home/imc/rexx/README.platforms Thu Dec 30 21:17:37 1999 @@ -11,11 +11,17 @@ Silicon G Power Challenge IRIX64 6.2 gcc 2.8.1, Ragnarok cc 6.2 [3] Silicon Graphics Octane IRIX64 6.5 gcc 2.8.1, MIPSpro cc 7.2.1 [4] +Third parties have reported successful compilation on the following platforms. + + Hardware Operating System Compiler + i386 architecture FreeBSD 2.2.7 gcc + Previous versions of REXX/imc have been compiled on the following platforms. It is hoped that they still work, but some twiddling may be required especially since these are unlikely to be current operating system versions. + Hardware Operating System Notes Intel i386 FreeBSD 2.0.5 IBM RS6000 AIX 3.2 [1] HP (various numbers) HP-UX 9.01 [1] --- rexx-imc-1.7/calc.c Sun Jan 10 21:07:08 1999 +++ /home/imc/rexx/calc.c Thu Dec 30 21:49:15 1999 @@ -716,8 +716,8 @@ } else { if (!n) { /* both numeric */ - if (!n && (m^m2)) z=0; /* different signs: */ - /* sign of result = sign of num1 */ + if (!n && (m^m2)) /* different signs: */ + {z=0; delete(&l);} /* sign of result = sign of num1 */ else { ecstackptr+=align(len2)+four;/* restack string2 */ i=precision,precision=fuzz, /* add fuzz */ --- rexx-imc-1.7/const.h Thu Jan 21 00:22:18 1999 +++ /home/imc/rexx/const.h Fri Dec 31 16:38:57 1999 @@ -3,7 +3,7 @@ #ifndef _const_h #define _const_h -#define VER "beta-1.7" +#define VER "beta-1.75" #define LEVEL "4.00" /* Language level supported */ /* A paranoid Solaris detector. */ --- rexx-imc-1.7/functions.h Thu Jan 21 00:28:22 1999 +++ /home/imc/rexx/functions.h Thu Dec 30 21:17:37 1999 @@ -89,6 +89,10 @@ # define getcwd(name,len) getwd(name) #endif +#ifdef RENAME_UNDELETE /* FreeBSD has undelete() defined in unistd.h so REXX/imc's will be renamed */ +# define undelete rx_undelete +#endif + /* in rexx.c */ int main Args((int argc, char *argv[])); char *allocm Args((unsigned size)); --- rexx-imc-1.7/globals.c Thu Jan 21 00:54:56 1999 +++ /home/imc/rexx/globals.c Thu Dec 30 21:18:55 1999 @@ -76,7 +76,7 @@ int rxstacksock; /* fd number of stack socket */ char *varnamebuf; /* workspace for evaluating variable names */ int varnamelen; /* amount of memory allocated for varnamebuff */ -FILE *traceout=stderr; /* Where to send trace output */ +FILE *traceout=0; /* Where to send trace output */ int lasterror=0; /* The last error which occurred on I/O */ int setrcflag=0; /* flag for "options setrc" */ int exposeflag=0; /* flag for "options expose" */ --- rexx-imc-1.7/interface.c Thu Jan 21 01:11:17 1999 +++ /home/imc/rexx/interface.c Thu Dec 30 21:18:55 1999 @@ -361,6 +361,7 @@ } /* Initialise all the global variables */ + if (traceout==0) traceout=stderr; if(rexxdepth==0){ stackinit(argv0); varstk=(int *)allocm(varstklen=256), @@ -885,9 +886,11 @@ break; } else request->shvvalue.strlength=request->shvvaluelen=vallen; + } else { + if(vallen>request->shvvaluelen) + vallen=request->shvvaluelen,request->shvret|=RXSHV_TRUNC; + request->shvvalue.strlength=vallen; } - if(vallen>request->shvvaluelen) - vallen=request->shvvaluelen,request->shvret|=RXSHV_TRUNC; memcpy(request->shvvalue.strptr,valptr,vallen); break; case RXSHV_NEXTV: --- rexx-imc-1.7/rexx.c Wed Feb 10 01:34:46 1999 +++ /home/imc/rexx/rexx.c Thu Dec 30 21:25:46 1999 @@ -527,7 +527,7 @@ else stack("1",1); stack(varref,reflen+1), /* variable name plus the '=' */ i=ecstackptr-tmpchr;/* i is the length of all that data */ - if dtest(pstackptr,pstacklen,i+30,i-pstacklen+30) + if dtest(pstackptr,pstacklen,epstackptr+i+30,i+300) entry+=mtest_diff; /* stack the data on the pstack */ memcpy((char*)&((struct minstack *)entry)->len,cstackptr+tmpchr,i), epstackptr+=i-2*four, /* now add the FOR num, the length, */ @@ -1573,6 +1573,7 @@ int varlen; /* The length of a variable name */ int ptr; if(!listlen)return; /* No names - nothing to do */ + if(!len)val=""; /* protect against NULL values (omitted arguments) */ while(listlen){ varname[0]=varlen=ptr=0; if(list[0]!='.') /* Get the next name, unless we are at "." */ @@ -2023,7 +2024,7 @@ else if (!strcmp(buffer,"stderr")) fp=stderr; else if(!(fp=fopen(buffer,"a")))perror(buffer); if (fp) { - if(traceout!=stderr && traceout!=stdout)fclose(traceout); + if(traceout && traceout!=stderr && traceout!=stdout)fclose(traceout); traceout=fp; printf("Writing trace output to %s\n",buffer); } --- rexx-imc-1.7/rexx.ref Mon Feb 8 22:52:18 1999 +++ /home/imc/rexx/rexx.ref Fri Dec 31 16:35:32 1999 @@ -780,7 +780,7 @@ bitwise-XOR of the nth character of string1 and the nth character of string2. -C2X, C2D, B2X, B2D, D2C, D2B, D2X, X2C, X2D +C2X, C2D, B2X, B2D, D2C, D2B, D2X, X2B, X2C, X2D Each of these is a function taking an argument and possibly a count and returning a conversion of that argument. Each function converts an @@ -794,6 +794,7 @@ BUG: Each of the conversion functions which deal with decimal numbers is restricted to inputs which have a value of less than 2**31 when converted to an unsigned integer. +LOCAL: B2D and D2B are not defined in standard REXX. Details of these functions are below: ......................................................................... @@ -952,7 +953,7 @@ 'L': s is lower case (containing only "a-z") 'M': s is mixed case (containing only "a-z" and "A-Z") 'N': s is a valid number - 'S': s contains characters valid in symbols (variables) + 'S': s is a valid REXX symbol (variable or constant) 'U': s is upper case (containing only "A-Z") 'W': s is a whole number 'X': s satisfies the rules for a hex constant (i.e. contains only @@ -1504,6 +1505,8 @@ If the newvalue parameter is provided, then this value is assigned to the symbol described above. The symbol's old value will be returned. +In this case the symbol must not be a constant symbol or an error will +result. If the selector is provided, then this indicates an alternative variable pool to use instead of the REXX variable pool (except that the --- rexx-imc-1.7/rexx.summary Mon Jan 18 22:03:49 1999 +++ /home/imc/rexx/rexx.summary Fri Dec 31 15:06:36 1999 @@ -26,7 +26,7 @@ * "END SELECT" * "PARSE VALUE" with multiple strings separated by commas * "PROCEDURE HIDE" - * The following functions: chdir getcwd getenv putenv system userid + * The following functions: b2d d2b chdir getcwd getenv putenv system userid rxfuncadd rxfuncdrop rxfuncquery plus these I/O functions: open close fdopen popen pclose fileno ftell * error messages 80-210, -1 and -3. --- rexx-imc-1.7/rxfn.c Wed Feb 10 01:34:18 1999 +++ /home/imc/rexx/rxfn.c Fri Dec 31 16:24:47 1999 @@ -434,9 +434,9 @@ break; case 'O': #ifdef HAS_GMTOFF - sprintf(ans,"%d",t2->tm_gmtoff); + sprintf(ans,"%ld",(long)(t2->tm_gmtoff)); #else - sprintf(ans,"%d",-timezone); + sprintf(ans,"%ld",-(long)timezone+3600*(t2->tm_isdst>0)); #endif break; case 'E': @@ -496,7 +496,7 @@ /* fall through */ case 'B': t-=719162L; - if (t > maxtime/86400 || t < -(int)(maxtime/86400)) + if (t > (long)(maxtime/86400) || t < -(long)(maxtime/86400)) return -1; return 86400*(time_t)t; case 'J': @@ -594,7 +594,10 @@ opt=arg[0]&0xdf; } switch(opt){ - case 'B':sprintf(ans,"%ld",time/86400+719162L); + case 'B': + if (time>=0) t=time/86400; + else t=-((-time-1)/86400)-1; /* make sure negative numbers round down */ + sprintf(ans,"%ld",t+719162L); break; case 'C': t=time/86400L+25568L; @@ -710,26 +713,47 @@ } char *rxgetname(nl,t) /* get a symbol (if compound symbol, substitute values - in tail). Afterwards, t=1 if valid, t=0 otherwise. */ + in tail). Afterwards, t=0 if invalid, otherwise: + 1 normal symbol, 2 constant symbol, 3 number. */ int *nl,*t; /* Return value is the name, nl is the length. The */ { /* result may contain garbage if the symbol was bad. */ static char name[maxvarname]; - int len,l; - char *arg=delete(&len); + int len,l,m,e,z; + char *arg; char *val; int p; int i=0; char c; int dot=0; - int constsym=rexxsymbol(uc(arg[0]))<=0; /* whether it is a constant symbol */ - (*t)=1; + int constsym; + if (num(&m,&e,&z,&l)>=0){ + /* Symbol is a number - must not contain spaces or a leading sign. + Uppercase any 'e' in the exponent. */ + (*t)=0; + arg=delete(&len); + if (len>=maxvarname-1) return name; + if (!rexxsymbol(arg[0])) return name; + if (!rexxsymbol(arg[len-1])) return name; + (*t)=3; + (*nl)=len; + memcpy(name,arg,len); + name[len]=0; + arg=strchr(name,'e'); + if (arg) arg[0]='E'; + return name; + } + arg=delete(&len); + if (len<=0) return *t=0,name; + constsym=rexxsymbol(uc(arg[0]))<=0; /* is it a constant symbol? */ + (*t)=1+constsym; if(len>=maxvarname-1)return *t=0,name; while(len&&arg[0]!='.') { /* Get the stem part */ name[i++]=c=uc((arg++)[0]), len--; if(!rexxsymbol(c))return *t=0,name; } - if(len==1&&arg[0]=='.')dot=1,len--; /* Delete final dot of a stem */ + if(len==1&&arg[0]=='.'&&!constsym) + dot=1,len--; /* Delete final dot of a stem */ while(len&&arg[0]=='.'){ /* Get each element of the tail */ dot=1; name[p= i++]='.', @@ -817,8 +841,9 @@ /* here add more "else if"s */ else if(strcasecmp(pool,"REXX"))die(Ecall); arg=rxgetname(&len,&t); /* Get the symbol name, then try to get its value */ - if(t&&(val=varget(arg,len,&l)))stack(val,l); - else if(t!=1)die(Ecall);/* die if it was bad */ + if (t>1) stack(arg,len); /* for constant symbol stack its name */ + else if(t&&(val=varget(arg,len,&l)))stack(val,l); + else if(t<1)die(Ecall);/* die if it was bad */ else { /* stack the variable's name */ oldlen=len; if((l=arg[0]&128)&&!memchr(arg,'.',len))arg[len++]='.'; @@ -826,7 +851,9 @@ arg[0]|=l; len=oldlen; } - if(new)varset(arg,len,new,newlen); + if(new) + if (t>1) die(Ecall); /* can't set a constant symbol */ + else varset(arg,len,new,newlen); } void rxdatatype(argc) @@ -873,10 +900,8 @@ case 'N':i=(num(&m,&e,&z,&l)>=0), delete(&len); break; - case 'S':arg=delete(&len); - if(!len){i=0;break;} - i=1; - while(len--)if((m=rexxsymboldot((arg++)[0]))==0)i=0; + case 'S':arg=rxgetname(&len,&l); + i = l>0; break; case 'U':arg=delete(&len); if(!len){i=0;break;} @@ -1803,21 +1828,12 @@ { char *arg; int len,good; - int m,e,z,l; + int l; if(argc!=1)die(Ecall); - if(num(&m,&e,&z,&l)>=0){ - delete(&l); - stack("LIT",3); /* (was NUM) All numbers are constant symbols */ - } - else{ - arg=rxgetname(&len,&good); - if(!len)good=0; -/* if(good==1&&rexxsymbol(arg[0]&0x7f)<1)good=0; */ -/* Constant symbols give "LIT"; uncomment the above to give "BAD" */ - if(good&&varget(arg,len,&l)) stack("VAR",3); - else if(!good)stack("BAD",3); - else stack("LIT",3); - } + arg=rxgetname(&len,&good); + if(good==1 && varget(arg,len,&l)) stack("VAR",3); + else if(!good)stack("BAD",3); + else stack("LIT",3); } void rxlate(argc) @@ -3328,8 +3344,9 @@ } else name=stream; /* use the supplied name */ /* since the stat worked the file exists so qualify and return it */ - if (getcwd(curdir,sizeof curdir) && curdir[0]=='/') { - cp=strrchr(name,'/'); + /* (files of form "/foo" don't need qualification) */ + if (getcwd(curdir,sizeof curdir) && curdir[0]=='/' && + (cp=strrchr(name,'/')) != name) { dir=curdir; if (cp && cp-name<sizeof tmp) { memcpy(tmp,name,cp-name);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor