#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/9/pc/trap.c /sys/lib/pcdist/src/9/pc/trap.c # srcdir: /n/juke/plan_9/sys/src/9/pc # version: 841683154 # date: Mon Sep 2 12:52:34 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 841683154 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/9/pc 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 841683154 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 841683154 mkdir 841683154 target=841683154/trap.c echo -n '841683154/trap.c: ' if(! test -f $srcdir/trap.c || ! test -r $srcdir/trap.c){ echo $srcdir/trap.c unreadable exit unreadable } sum=`{sum < $srcdir/trap.c} if(! ~ 4df1897714709 $sum(1)^$sum(2)){ echo $srcdir/trap.c is not the original distribution file exit original } cp $srcdir/trap.c 841683154/trap.c ed 841683154/trap.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM trap.c' 426a m->syscall++; . 384c if(i == 8){ . 316a checkuser: . 281c goto checkuser; . 278a spllo(); . 272,274d 262a m->intr++; . wq //GO.SYSIN DD VADIM trap.c sum=`{sum < 841683154/trap.c} if(~ 3d4d89d014684 $sum(1)^$sum(2)) echo if not{ echo 841683154/trap.c checksum error creating updated file exit checksum }