#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/alef/port/tree.c /sys/src/alef/port # srcdir: /n/juke/plan_9/sys/src/alef/port # version: 815455834 # date: Fri Nov 3 22:30:34 EST 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 815455834 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/alef/port 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 815455834 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 815455834 mkdir 815455834 target=815455834/tree.c echo -n '815455834/tree.c: ' if(! test -f $srcdir/tree.c || ! test -r $srcdir/tree.c){ echo $srcdir/tree.c unreadable exit unreadable } sum=`{sum < $srcdir/tree.c} if(! ~ ee6dca5a8298 $sum(1)^$sum(2)){ echo $srcdir/tree.c is not the original distribution file exit original } cp $srcdir/tree.c 815455834/tree.c ed 815455834/tree.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM tree.c' 379a n1 = an(OLABEL, nil, nil); n1->sym = s; r = an(OLABEL, nil, nil); r->sym = s2; n->right = an(OLIST, n->right, r); n->right = an(OLIST, n1, n->right); . 376,377c s2 = mklab(); r = an(OGOTO, nil, nil); r->sym = s2; . 332a Sym *s, *s2; . 330d wq //GO.SYSIN DD VADIM tree.c sum=`{sum < 815455834/tree.c} if(~ bb27a7cf8488 $sum(1)^$sum(2)) echo if not{ echo 815455834/tree.c checksum error creating updated file exit checksum }