#!/bin/rc # # command: /bin/boddle /usr/forsyth/cd/9/pc/devvga.c /sys/src/9/pc/devvga.c # srcdir: /usr/forsyth/cd/9/pc # version: 811554507 # date: Wed Sep 20 00:48:27 BST 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 811554507 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/usr/forsyth/cd/9/pc 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 811554507 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 811554507 mkdir 811554507 target=811554507/devvga.c echo -n '811554507/devvga.c: ' if(! test -f $srcdir/devvga.c || ! test -r $srcdir/devvga.c){ echo $srcdir/devvga.c unreadable exit unreadable } sum=`{sum < $srcdir/devvga.c} if(! ~ ea7d916f23360 $sum(1)^$sum(2)){ echo $srcdir/devvga.c is not the original distribution file exit original } cp $srcdir/devvga.c 811554507/devvga.c ed 811554507/devvga.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM devvga.c' 603d 599a if(conf.monitor) { /* set gscreen's dimensions to their eventual values, for bitreset */ gscreen.r.max.x = x = 640; gscreen.r.max.y = 480; gscreen.ldepth = 0; p = getconf("vgasize"); if(p && *p>='0' && *p<='9') { x = screendim(&p, 0, 2048); y = screendim(&p, 0, 1024); z = screendim(&p, 1, 8); if((conf.npage*BY2PG)/MB >= 8) { /* less greedy on small machines */ gscreen.r.max.x = x; gscreen.r.max.y = y; } for(; (1< ub) i = ub; if(**p == 'x') (*p)++; return i; } . wq //GO.SYSIN DD VADIM devvga.c sum=`{sum < 811554507/devvga.c} if(~ 28f457c324100 $sum(1)^$sum(2)) echo if not{ echo 811554507/devvga.c checksum error creating updated file exit checksum }