#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/8c/cgen.c /sys/src/cmd/8c/cgen.c # srcdir: /n/juke/plan_9/sys/src/cmd/8c # version: 816042167 # date: Fri Nov 10 17:22:47 EST 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 816042167 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/8c case 1 srcdir=$1 case * usage } if(! ~ $doextract yes){ echo This shell file contains a bundle of diffs representing changes echo to original source files in the Plan 9 distribution. It will run echo against the files in echo ' ' $srcdir echo '(unless overridden by the optional source directory argument)' echo and create a directory 816042167 containing the updated files. echo It will NOT automatically update the original files. echo echo Invoke with argument -X to perform the actual extraction. exit 0 } rm -rf 816042167 mkdir 816042167 target=816042167/cgen.c echo -n '816042167/cgen.c: ' if(! test -f $srcdir/cgen.c || ! test -r $srcdir/cgen.c){ echo $srcdir/cgen.c unreadable exit unreadable } sum=`{sum < $srcdir/cgen.c} if(! ~ adfe69fb24692 $sum(1)^$sum(2)){ echo $srcdir/cgen.c is not the original distribution file exit original } cp $srcdir/cgen.c 816042167/cgen.c ed 816042167/cgen.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM cgen.c' 28,30d 23,24c if(nn == Z) { if(o == OINDEX) nullwarn(l, r); return; } gmove(n, nn); . 21a l = n->left; r = n->right; o = n->op; . wq //GO.SYSIN DD VADIM cgen.c sum=`{sum < 816042167/cgen.c} if(~ db5b691e24747 $sum(1)^$sum(2)) echo if not{ echo 816042167/cgen.c checksum error creating updated file exit checksum }