#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/sam /sys/src/cmd/sam # srcdir: /n/juke/plan_9/sys/src/cmd/sam # version: 829146783 # date: Wed Apr 10 10:33:03 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 829146783 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/sam 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 829146783 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 829146783 mkdir 829146783 target=829146783/cmd.c echo -n '829146783/cmd.c: ' if(! test -f $srcdir/cmd.c || ! test -r $srcdir/cmd.c){ echo $srcdir/cmd.c unreadable exit unreadable } sum=`{sum < $srcdir/cmd.c} if(! ~ 15789b5510276 $sum(1)^$sum(2)){ echo $srcdir/cmd.c is not the original distribution file exit original } cp $srcdir/cmd.c 829146783/cmd.c ed 829146783/cmd.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM cmd.c' 220a /* don't allow type ahead on files that aren't bound */ if(downloaded && curfile && curfile->rasp == 0) terminp = termoutp; . wq //GO.SYSIN DD VADIM cmd.c sum=`{sum < 829146783/cmd.c} if(~ b7054a8f10408 $sum(1)^$sum(2)) echo if not{ echo 829146783/cmd.c checksum error creating updated file exit checksum } target=829146783/mesg.c echo -n '829146783/mesg.c: ' if(! test -f $srcdir/mesg.c || ! test -r $srcdir/mesg.c){ echo $srcdir/mesg.c unreadable exit unreadable } sum=`{sum < $srcdir/mesg.c} if(! ~ 133df85a12732 $sum(1)^$sum(2)){ echo $srcdir/mesg.c is not the original distribution file exit original } cp $srcdir/mesg.c 829146783/mesg.c ed 829146783/mesg.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM mesg.c' 450,451c Bread(snarfbuf, rp, m, 0); c = Strtoc(tmprstr(rp, m)); . 448c m = snarfbuf->nrunes; if(m > 32000) { /* tmprstr stores len in a short */ m = 32000; dprint("?warning: snarf buffer truncated\n"); } rp = malloc(m*sizeof(Rune)); . 265d 257a termlocked++; . wq //GO.SYSIN DD VADIM mesg.c sum=`{sum < 829146783/mesg.c} if(~ 3d679ff612831 $sum(1)^$sum(2)) echo if not{ echo 829146783/mesg.c checksum error creating updated file exit checksum } target=829146783/sam.c echo -n '829146783/sam.c: ' if(! test -f $srcdir/sam.c || ! test -r $srcdir/sam.c){ echo $srcdir/sam.c unreadable exit unreadable } sum=`{sum < $srcdir/sam.c} if(! ~ 8858b96111626 $sum(1)^$sum(2)){ echo $srcdir/sam.c is not the original distribution file exit original } cp $srcdir/sam.c 829146783/sam.c ed 829146783/sam.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM sam.c' 293a continue; } . 292c if(f->deleted) { . wq //GO.SYSIN DD VADIM sam.c sum=`{sum < 829146783/sam.c} if(~ db9d093e11645 $sum(1)^$sum(2)) echo if not{ echo 829146783/sam.c checksum error creating updated file exit checksum } target=829146783/xec.c echo -n '829146783/xec.c: ' if(! test -f $srcdir/xec.c || ! test -r $srcdir/xec.c){ echo $srcdir/xec.c unreadable exit unreadable } sum=`{sum < $srcdir/xec.c} if(! ~ b7b712b68170 $sum(1)^$sum(2)){ echo $srcdir/xec.c is not the original distribution file exit original } cp $srcdir/xec.c 829146783/xec.c ed 829146783/xec.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM xec.c' 33c if(i >= 0 && cmdtab[i].defaddr != aNo){ . 29c !utfrune("bBnqUXY!", cp->cmdc) && . wq //GO.SYSIN DD VADIM xec.c sum=`{sum < 829146783/xec.c} if(~ 841055c48179 $sum(1)^$sum(2)) echo if not{ echo 829146783/xec.c checksum error creating updated file exit checksum }