#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/include/fb.h /sys/include/fb.h # srcdir: /n/juke/plan_9/sys/include # version: 836403518 # date: Wed Jul 3 10:18:38 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 836403518 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/include 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 836403518 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 836403518 mkdir 836403518 target=836403518/fb.h echo -n '836403518/fb.h: ' if(! test -f $srcdir/fb.h || ! test -r $srcdir/fb.h){ echo $srcdir/fb.h unreadable exit unreadable } sum=`{sum < $srcdir/fb.h} if(! ~ bdc07d292232 $sum(1)^$sum(2)){ echo $srcdir/fb.h is not the original distribution file exit original } cp $srcdir/fb.h 836403518/fb.h ed 836403518/fb.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM fb.h' 80a typedef struct Bitmap Bitmap; . 54c int _PICcompressedheader(PICFILE *, char *); . 36c #define PIC_RECT(p) Rect((p)->x, (p)->y, (p)->x+(p)->width, (p)->y+(p)->height) /* needs */ . 23,26c int depth; /* TYPE=plan9, TYPE=compressed only */ unsigned char *buf, *ebuf, *bufp; . 3d wq //GO.SYSIN DD VADIM fb.h sum=`{sum < 836403518/fb.h} if(~ 98cc728c2252 $sum(1)^$sum(2)) echo if not{ echo 836403518/fb.h checksum error creating updated file exit checksum }