#!/bin/rc # # command: /bin/boddle /usr/forsyth/cd/libc/port/dial.c /sys/src/libc/port/dial.c # srcdir: /usr/forsyth/cd/libc/port # version: 844879055 # date: Wed Oct 9 17:37:35 BST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 844879055 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/usr/forsyth/cd/libc/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 844879055 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 844879055 mkdir 844879055 target=844879055/dial.c echo -n '844879055/dial.c: ' if(! test -f $srcdir/dial.c || ! test -r $srcdir/dial.c){ echo $srcdir/dial.c unreadable exit unreadable } sum=`{sum < $srcdir/dial.c} if(! ~ f3812c033665 $sum(1)^$sum(2)){ echo $srcdir/dial.c is not the original distribution file exit original } cp $srcdir/dial.c 844879055/dial.c ed 844879055/dial.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM dial.c' 127c errstr(err); . 125c errstr(besterr); . 117a err[0] = 0; . 105a snprint(err, sizeof(err), "%s: can't translate address", buf); . 95c snprint(buf, sizeof(buf), "%s!%s", ds->proto, ds->rem); . 67c errstr(alterr); . 65c errstr(err); . 62a alterr[0] = 0; . 54c errstr(err); . 51a err[0] = 0; . wq //GO.SYSIN DD VADIM dial.c sum=`{sum < 844879055/dial.c} if(~ a5a92f5d3781 $sum(1)^$sum(2)) echo if not{ echo 844879055/dial.c checksum error creating updated file exit checksum }