summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/rexx-imc/files/patch-rexx.c42
-rw-r--r--lang/rexx-imc/files/patch-util.c20
2 files changed, 62 insertions, 0 deletions
diff --git a/lang/rexx-imc/files/patch-rexx.c b/lang/rexx-imc/files/patch-rexx.c
new file mode 100644
index 000000000000..8d66b43ec373
--- /dev/null
+++ b/lang/rexx-imc/files/patch-rexx.c
@@ -0,0 +1,42 @@
+--- rexx.c.upper Tue Feb 26 12:29:20 2002
++++ rexx.c Thu Jun 20 16:33:44 2002
+@@ -1366,6 +1366,39 @@
+ if(write(rxstacksock,pull,8)<8||
+ (len>0&&write(rxstacksock,exp,len)<len)) die(Esys);
+ break;
++ case UPPER: /* go along the list, find each variable and uppercase it */
++ while (*lineptr) {
++ tmpchr = *lineptr==' ';
++ getvarname(lineptr,&tmpchr,varname,&varlen,maxvarname);
++ lineptr+=tmpchr;
++ if(!varname[0])die(Enosymbol);
++ exp=varget(varname,varlen,&len);
++ if (exp) { /* variable has a value - uppercase in place */
++ int j;
++ for(j=0; j<len; j++)
++ exp[j]=uc(exp[j]);
++ } else { /* novalue */
++ /* make a copy of the variable's value, i.e., its name */
++ len=varlen;
++ mtest(workptr, worklen, len+2, len+2-worklen);
++ memcpy(workptr, varname, len);
++ /* undo the special rules for compound symbols */
++ if (workptr[0]&128 && !memchr(workptr, '.', len))
++ workptr[len++]='.';
++ workptr[0] &= 127;
++ /* trap a novalue error */
++ if(sgstack[interplev].bits&(1<<Inovalue)) {
++ workptr[len]=0;
++ errordata=workptr;
++ die(Enovalue);
++ }
++ /* if trap wasn't caught, set the variable */
++ /* (it might not be in upper case if it was a compound) */
++ for (i=0; i<len; i++) workptr[i]=uc(workptr[i]);
++ varset(varname, varlen, workptr, len);
++ }
++ }
++ break;
+ /* Anything else is a syntax error. However, under normal
+ circumstances we should never get here. */
+ default:die(Esyntax);
diff --git a/lang/rexx-imc/files/patch-util.c b/lang/rexx-imc/files/patch-util.c
new file mode 100644
index 000000000000..aec63e831648
--- /dev/null
+++ b/lang/rexx-imc/files/patch-util.c
@@ -0,0 +1,20 @@
+--- util.c Tue Feb 26 12:29:20 2002
++++ util.c.new Thu Jun 20 14:50:03 2002
+@@ -1404,7 +1404,7 @@
+ else token=0;
+ }
+ else if(token>=Command&&start){ /* at the start must be a "command" */
+- if(token==THEN); /* except THEN, PULL and ARG */
++ if(token==THEN||token==UPPER); /* except THEN, UPPER, PULL and ARG */
+ else if(token==ARG||token==PULL)
+ prgptr++[0]=PARSE,
+ prgptr++[0]=UPPER,
+@@ -1415,7 +1415,7 @@
+ if(!token); /* no need to check if there is no token */
+ else if(token==VALUE)if(last==ADDRESS||last==FORM||last==TRACE
+ ||last==PARSE||last==SIGNAL);else token=0;
+- else if(token==UPPER)if(last==PARSE);else token=0;
++ else if(token==UPPER)if(start||last==PARSE);else token=0;
+ else if(token>=PULL&&token<=LINEIN)if(last==PARSE);else token=0;
+ else if(token==WITH)if(first==VALUE);else token=0;
+ else if(token==ON||token==OFF)if(last==SIGNAL||last==CALL)