#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/ape/lib/ap/plan9 /sys/src/ape/lib/ap/plan9 # srcdir: /n/juke/plan_9/sys/src/ape/lib/ap/plan9 # version: 822686339 # date: Fri Jan 26 14:58:59 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 822686339 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/ape/lib/ap/plan9 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 822686339 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 822686339 mkdir 822686339 target=822686339/_buf.c echo -n '822686339/_buf.c: ' if(! test -f $srcdir/_buf.c || ! test -r $srcdir/_buf.c){ echo $srcdir/_buf.c unreadable exit unreadable } sum=`{sum < $srcdir/_buf.c} if(! ~ 246136669607 $sum(1)^$sum(2)){ echo $srcdir/_buf.c is not the original distribution file exit original } cp $srcdir/_buf.c 822686339/_buf.c ed 822686339/_buf.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM _buf.c' 59c _RFORK(RFNAMEG); /* ideally RFREND */ . wq //GO.SYSIN DD VADIM _buf.c sum=`{sum < 822686339/_buf.c} if(~ ad63ea449629 $sum(1)^$sum(2)) echo if not{ echo 822686339/_buf.c checksum error creating updated file exit checksum } target=822686339/rename.c echo -n '822686339/rename.c: ' if(! test -f $srcdir/rename.c || ! test -r $srcdir/rename.c){ echo $srcdir/rename.c unreadable exit unreadable } sum=`{sum < $srcdir/rename.c} if(! ~ 6deb875a1249 $sum(1)^$sum(2)){ echo $srcdir/rename.c is not the original distribution file exit original } cp $srcdir/rename.c 822686339/rename.c ed 822686339/rename.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM rename.c' 63c while(n>=0 && (n = _READ(ffd, buf, 8192)) > 0) . wq //GO.SYSIN DD VADIM rename.c sum=`{sum < 822686339/rename.c} if(~ c29a2ec41249 $sum(1)^$sum(2)) echo if not{ echo 822686339/rename.c checksum error creating updated file exit checksum } target=822686339/sys9.h echo -n '822686339/sys9.h: ' if(! test -f $srcdir/sys9.h || ! test -r $srcdir/sys9.h){ echo $srcdir/sys9.h unreadable exit unreadable } sum=`{sum < $srcdir/sys9.h} if(! ~ bb8a63a72942 $sum(1)^$sum(2)){ echo $srcdir/sys9.h is not the original distribution file exit original } cp $srcdir/sys9.h 822686339/sys9.h ed 822686339/sys9.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM sys9.h' 79c extern int _WSTAT(const char*, char*); . 76c extern int _STAT(const char*, char*); . 66c extern int _REMOVE(const char*); . 63c extern int _OPEN(const char*, int); . 60c extern int _MOUNT(int, const char*, int, const char*); . 49,50c extern int _BIND(const char*, const char*, int); extern int _CHDIR(const char*); . wq //GO.SYSIN DD VADIM sys9.h sum=`{sum < 822686339/sys9.h} if(~ 3cf5140c2996 $sum(1)^$sum(2)) echo if not{ echo 822686339/sys9.h checksum error creating updated file exit checksum } target=822686339/unlink.c echo -n '822686339/unlink.c: ' if(! test -f $srcdir/unlink.c || ! test -r $srcdir/unlink.c){ echo $srcdir/unlink.c unreadable exit unreadable } sum=`{sum < $srcdir/unlink.c} if(! ~ e7a7fae01324 $sum(1)^$sum(2)){ echo $srcdir/unlink.c is not the original distribution file exit original } cp $srcdir/unlink.c 822686339/unlink.c ed 822686339/unlink.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM unlink.c' 53c if(n < 0) . 50c /* reopen remove on close */ fd = _OPEN(p, 64|(f->oflags)); if(fd < 0) . 46,48c p = strrchr(path, '/'); if(p == 0) p = db2.name; else { *p = '\0'; sprintf(newname, "%s/%.8x", path, db2.qid.path); p = newname; } . 40,44c p = (char*)path; . wq //GO.SYSIN DD VADIM unlink.c sum=`{sum < 822686339/unlink.c} if(~ a1f055e21342 $sum(1)^$sum(2)) echo if not{ echo 822686339/unlink.c checksum error creating updated file exit checksum }