sources-request@mirror.UUCP (09/15/86)
Submitted by: john@monu1.oz (John Carey) Mod.sources: Volume 7, Issue 26 Archive-name: xlisp.patch Mod.sources: Volume 7, Issue 25 Archive-name: xlisp.patch I have modified xlsave in xleval.c so it works on a Pyramid 90x using <varargs.h>. John Carey. john%monu1.oz@seismo.ARPA -------------------------CUT HERE------------------------- #!/bin/sh # This is a shell archive. Remove anything before this line, # then unpack it by saving it in a file and typing "sh file". # Exit status; set to 1 on "wc" errors or if would overwrite. STATUS=0 # Contents: xlsave.c echo x - xlsave.c if test -f xlsave.c ; then echo xlsave.c exists, putting output in $$xlsave.c OUT=$$xlsave.c STATUS=1 else OUT=xlsave.c fi sed 's/^XX//' > $OUT <<'@//E*O*F xlsave.c//' XX/* xlsave - save nodes on the stack */ XX#include <varargs.h> XXNODE ***xlsave(va_alist) XX va_dcl XX{ XX va_list pvar; XX NODE ***oldstk,**nptr; XX /* save the old stack pointer */ XX oldstk = xlstack; XX /* save each node pointer */ XX va_start(pvar); XX for (nptr = va_arg(pvar, NODE **); XX nptr != (NODE **) NULL; nptr = va_arg(pvar, NODE **)) { XX if (xlstack <= xlstkbase) XX xlabort("evaluation stack overflow"); XX *--xlstack = nptr; XX *nptr = NIL; XX } XX va_end(pvar); XX /* return the old stack pointer */ XX return (oldstk); XX} @//E*O*F xlsave.c// chmod u=rw,g=rw,o=rw $OUT echo Inspecting for damage in transit... temp=/tmp/sharin$$; dtemp=/tmp/sharout$$ trap "rm -f $temp $dtemp; exit" 0 1 2 3 15 cat > $temp <<\!!! 25 78 542 xlsave.c !!! wc xlsave.c | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp if test -s $dtemp ; then echo "Ouch [diff of wc output]:" cat $dtemp STATUS=1 elif test $STATUS = 0 ; then echo "No problems found." else echo "WARNING -- PROBLEMS WERE FOUND..." fi exit $STATUS