#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/9/port/tcpif.c /sys/src/9/port/tcpif.c # srcdir: /n/juke/plan_9/sys/src/9/port # version: 838680967 # date: Mon Jul 29 18:56:07 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 838680967 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 838680967 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 838680967 mkdir 838680967 target=838680967/tcpif.c echo -n '838680967/tcpif.c: ' if(! test -f $srcdir/tcpif.c || ! test -r $srcdir/tcpif.c){ echo $srcdir/tcpif.c unreadable exit unreadable } sum=`{sum < $srcdir/tcpif.c} if(! ~ 065d21342064 $sum(1)^$sum(2)){ echo $srcdir/tcpif.c is not the original distribution file exit original } cp $srcdir/tcpif.c 838680967/tcpif.c ed 838680967/tcpif.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM tcpif.c' 42c if(newstate == Closed) bp->type = M_HANGUP; else bp->type = M_RHANGUP; . 35c memmove((char *)bp->wptr, s->err, len); . wq //GO.SYSIN DD VADIM tcpif.c sum=`{sum < 838680967/tcpif.c} if(~ 21d164e72128 $sum(1)^$sum(2)) echo if not{ echo 838680967/tcpif.c checksum error creating updated file exit checksum }