#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/tweak.c /n/dump/1995/0717/sys/src/cmd # srcdir: /n/juke/plan_9/sys/src/cmd # version: 811705677 # date: Thu Sep 21 13:47:57 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 811705677 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd 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 811705677 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 811705677 mkdir 811705677 target=811705677/tweak.c echo -n '811705677/tweak.c: ' if(! test -f $srcdir/tweak.c || ! test -r $srcdir/tweak.c){ echo $srcdir/tweak.c unreadable exit unreadable } sum=`{sum < $srcdir/tweak.c} if(! ~ ee309dfd34711 $sum(1)^$sum(2)){ echo $srcdir/tweak.c is not the original distribution file exit original } cp $srcdir/tweak.c 811705677/tweak.c ed 811705677/tweak.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM tweak.c' 861a nt->s->info = 0; /* prevent it being freed */ . 858a bfree(b); . wq //GO.SYSIN DD VADIM tweak.c sum=`{sum < 811705677/tweak.c} if(~ 6444075f34776 $sum(1)^$sum(2)) echo if not{ echo 811705677/tweak.c checksum error creating updated file exit checksum }