#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/9/port /sys/lib/pcdist/9/port # srcdir: /n/juke/plan_9/sys/src/9/port # version: 810872359 # date: Mon Sep 11 22:19:19 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 810872359 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/9/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 810872359 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 810872359 mkdir 810872359 target=810872359/devfloppy.c echo -n '810872359/devfloppy.c: ' if(! test -f $srcdir/devfloppy.c || ! test -r $srcdir/devfloppy.c){ echo $srcdir/devfloppy.c unreadable exit unreadable } sum=`{sum < $srcdir/devfloppy.c} if(! ~ 3c640e0118744 $sum(1)^$sum(2)){ echo $srcdir/devfloppy.c is not the original distribution file exit original } cp $srcdir/devfloppy.c 810872359/devfloppy.c ed 810872359/devfloppy.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM devfloppy.c' 867c if((fl.stat[0]&Codemask)==Cmdexec && fl.stat[1]==Overrun){ DPRINT("DMA overrun: retry\n"); } else dp->confused = 1; . 846c floppyexec((char*)a, dp->len, cmd==Fread); . 833c fl.cmd[fl.ncmd++] = cmd | (dp->t->heads > 1 ? Fmulti : 0); . 831d 806c if(tries++ > 20) . 803c /* retry on error (until it gets rediculous) */ . wq //GO.SYSIN DD VADIM devfloppy.c sum=`{sum < 810872359/devfloppy.c} if(~ cbdacd6d18845 $sum(1)^$sum(2)) echo if not{ echo 810872359/devfloppy.c checksum error creating updated file exit checksum }