#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/include/ape /sys/include/ape # srcdir: /n/juke/plan_9/sys/include/ape # version: 821823421 # date: Tue Jan 16 15:17:01 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 821823421 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/include/ape 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 821823421 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 821823421 mkdir 821823421 target=821823421/assert.h echo -n '821823421/assert.h: ' if(! test -f $srcdir/assert.h || ! test -r $srcdir/assert.h){ echo $srcdir/assert.h unreadable exit unreadable } sum=`{sum < $srcdir/assert.h} if(! ~ ba972636290 $sum(1)^$sum(2)){ echo $srcdir/assert.h is not the original distribution file exit original } cp $srcdir/assert.h 821823421/assert.h ed 821823421/assert.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM assert.h' 11c extern void _assert(char *, unsigned); . wq //GO.SYSIN DD VADIM assert.h sum=`{sum < 821823421/assert.h} if(~ 91fe348f287 $sum(1)^$sum(2)) echo if not{ echo 821823421/assert.h checksum error creating updated file exit checksum } target=821823421/stdlib.h echo -n '821823421/stdlib.h: ' if(! test -f $srcdir/stdlib.h || ! test -r $srcdir/stdlib.h){ echo $srcdir/stdlib.h unreadable exit unreadable } sum=`{sum < $srcdir/stdlib.h} if(! ~ a7ec69a71685 $sum(1)^$sum(2)){ echo $srcdir/stdlib.h is not the original distribution file exit original } cp $srcdir/stdlib.h 821823421/stdlib.h ed 821823421/stdlib.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM stdlib.h' 33,41c extern void exit(int); extern char *getenv(const char *); extern int system(const char *); extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); extern int abs(int); extern div_t div(int, int); extern long int labs(long int); extern ldiv_t ldiv(long int, long int); . 26,30c extern void srand(unsigned int); extern void *calloc(size_t, size_t); extern void free(void *); extern void *malloc(size_t); extern void *realloc(void *, size_t); . 19,24c extern double atof(const char *); extern int atoi(const char *); extern long int atol(const char *); extern double strtod(const char *, char **); extern long int strtol(const char *, char **, int); extern unsigned long int strtoul(const char *, char **, int); . wq //GO.SYSIN DD VADIM stdlib.h sum=`{sum < 821823421/stdlib.h} if(~ 96c981d51511 $sum(1)^$sum(2)) echo if not{ echo 821823421/stdlib.h checksum error creating updated file exit checksum }