#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/scuzz /sys/src/cmd/scuzz # srcdir: /n/juke/plan_9/sys/src/cmd/scuzz # version: 817701209 # date: Wed Nov 29 22:13:29 EST 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 817701209 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/scuzz 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 817701209 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 817701209 mkdir 817701209 target=817701209/scsireq.c echo -n '817701209/scsireq.c: ' if(! test -f $srcdir/scsireq.c || ! test -r $srcdir/scsireq.c){ echo $srcdir/scsireq.c unreadable exit unreadable } sum=`{sum < $srcdir/scsireq.c} if(! ~ e9bac77912324 $sum(1)^$sum(2)){ echo $srcdir/scsireq.c is not the original distribution file exit original } cp $srcdir/scsireq.c 817701209/scsireq.c ed 817701209/scsireq.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM scsireq.c' 613a } . 612c else{ rp->flags |= Fbfixed; . 233d 226,231c if(offset <= 0x1fffff){ cmd[0] = ScmdSeek; cmd[1] = (offset>>16) & 0x1F; cmd[2] = offset>>8; cmd[3] = offset; cmd[4] = 0; cmd[5] = 0; rp->cmd.count = 6; }else{ cmd[0] = ScmdExtseek; cmd[1] = 0; cmd[2] = offset>>24; cmd[3] = offset>>16; cmd[4] = offset>>8; cmd[5] = offset; cmd[6] = 0; cmd[7] = 0; cmd[8] = 0; cmd[9] = 0; rp->cmd.count = 10; } . 209c uchar cmd[10]; . 183d 181c rp->cmd.count = dirdevrw(rp, cmd, nbytes); . 179c rp->cmd.count = seqdevrw(rp, cmd, nbytes); . 170c uchar cmd[10]; . 142d 140c rp->cmd.count = dirdevrw(rp, cmd, nbytes); . 138c rp->cmd.count = seqdevrw(rp, cmd, nbytes); . 129c uchar cmd[10]; . 123a return 6; . 118c cmd[1] = rp->flags&Fbfixed? 0x01: 0x00; . 113c static int . 105,110c n = nbytes/rp->lbsize; if(rp->offset <= 0x1fffff && n <= 256){ cmd[1] = rp->offset>>16; cmd[2] = rp->offset>>8; cmd[3] = rp->offset; cmd[4] = n; cmd[5] = 0; return 6; } cmd[0] |= ScmdExtread; cmd[1] = 0; cmd[2] = rp->offset>>24; cmd[3] = rp->offset>>16; cmd[4] = rp->offset>>8; cmd[5] = rp->offset; cmd[6] = 0; cmd[7] = n>>8; cmd[8] = n; cmd[9] = 0; return 10; . 100c static int . wq //GO.SYSIN DD VADIM scsireq.c sum=`{sum < 817701209/scsireq.c} if(~ 1084e37012902 $sum(1)^$sum(2)) echo if not{ echo 817701209/scsireq.c checksum error creating updated file exit checksum } target=817701209/scsireq.h echo -n '817701209/scsireq.h: ' if(! test -f $srcdir/scsireq.h || ! test -r $srcdir/scsireq.h){ echo $srcdir/scsireq.h unreadable exit unreadable } sum=`{sum < $srcdir/scsireq.h} if(! ~ e1d4a1be3510 $sum(1)^$sum(2)){ echo $srcdir/scsireq.h is not the original distribution file exit original } cp $srcdir/scsireq.h 817701209/scsireq.h ed 817701209/scsireq.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM scsireq.h' 64a ScmdExtread = 0x28, /* extended read */ ScmdExtwrite = 0x2A, /* extended write */ ScmdExtseek = 0x2B, /* extended seek */ . 34a Fbfixed = 0x40, /* fixed block size */ . wq //GO.SYSIN DD VADIM scsireq.h sum=`{sum < 817701209/scsireq.h} if(~ c5fdcd9c3680 $sum(1)^$sum(2)) echo if not{ echo 817701209/scsireq.h checksum error creating updated file exit checksum } target=817701209/scuzz.c echo -n '817701209/scuzz.c: ' if(! test -f $srcdir/scuzz.c || ! test -r $srcdir/scuzz.c){ echo $srcdir/scuzz.c unreadable exit unreadable } sum=`{sum < $srcdir/scuzz.c} if(! ~ 7f35436c19707 $sum(1)^$sum(2)){ echo $srcdir/scuzz.c is not the original distribution file exit original } cp $srcdir/scuzz.c 817701209/scuzz.c ed 817701209/scuzz.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM scuzz.c' 801c Bprint(&bout, "%sblock size: %ld\n", rp->flags&Fbfixed? "fixed ": "", rp->lbsize); . 309,310c if(argc && ((howmany = strtol(argv[0], &p, 0)) == 0 && p == argv[0])){ . 86a close(fd[1]); . wq //GO.SYSIN DD VADIM scuzz.c sum=`{sum < 817701209/scuzz.c} if(~ aae93aeb19745 $sum(1)^$sum(2)) echo if not{ echo 817701209/scuzz.c checksum error creating updated file exit checksum }