#!/bin/rc # # command: /bin/boddle /usr/forsyth/cd/cmd/2l 2l # srcdir: /usr/forsyth/cd/cmd/2l # version: 817134815 # date: Thu Nov 23 13:53:35 GMT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 817134815 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/usr/forsyth/cd/cmd/2l 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 817134815 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 817134815 mkdir 817134815 target=817134815/asm.c echo -n '817134815/asm.c: ' if(! test -f $srcdir/asm.c || ! test -r $srcdir/asm.c){ echo $srcdir/asm.c unreadable exit unreadable } sum=`{sum < $srcdir/asm.c} if(! ~ ba8a143028385 $sum(1)^$sum(2)){ echo $srcdir/asm.c is not the original distribution file exit original } cp $srcdir/asm.c 817134815/asm.c ed 817134815/asm.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM asm.c' 494a pmove4: op++; a = asmea(p, &p->from); opa[0] = 0xf000 | a; opa[1] = 0x4000 | (t<<10); return; . 492a if(mc68030) { t = 0x2; goto pmove4; } . 488a if(mc68030) { /* CRP */ t = 0x3; goto pmove4; } . 484a if(mc68030) { t = 0x8; goto pmove4; } . 451a case D_TT0: t = 0x0; goto pmove2; case D_TT1: t = 0x1; goto pmove2; pmove2: if(p->as != AMOVL) goto bad; op++; a = asmea(p, &p->from); opa[0] = 0xf000 | a; /* pmove Rn TT? */ opa[1] = 0x0900 | (t<<10); return; . 448a if(mc68030) { t = 0; goto pmove4; } . 371a pmove3: op++; a = asmea(p, &p->to); opa[0] = 0xf000 | a; /* pmove [TC|?RP] Rn */ opa[1] = 0x4200 | (t<<10); return; . 368a if(mc68030) { t = 0x2; goto pmove3; } . 364a if(mc68030) { /* CRP */ t = 0x3; goto pmove3; } . 360a if(mc68030) { t = 0x8; goto pmove3; } . 327a case D_TT0: t = 0x0; goto pmove1; case D_TT1: t = 0x1; pmove1: if(p->as != AMOVL) goto bad; op++; a = asmea(p, &p->to); opa[0] = 0xf000 | a; /* pmove TT? Rn */ opa[1] = 0x0b00 | (t<<10); return; . 324a if(mc68030) { t = 0; goto pmove3; } . wq //GO.SYSIN DD VADIM asm.c sum=`{sum < 817134815/asm.c} if(~ 676b0af829485 $sum(1)^$sum(2)) echo if not{ echo 817134815/asm.c checksum error creating updated file exit checksum } target=817134815/l.h echo -n '817134815/l.h: ' if(! test -f $srcdir/l.h || ! test -r $srcdir/l.h){ echo $srcdir/l.h unreadable exit unreadable } sum=`{sum < $srcdir/l.h} if(! ~ cec2e9083694 $sum(1)^$sum(2)){ echo $srcdir/l.h is not the original distribution file exit original } cp $srcdir/l.h 817134815/l.h ed 817134815/l.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM l.h' 155a int mc68030; . wq //GO.SYSIN DD VADIM l.h sum=`{sum < 817134815/l.h} if(~ 44173a313707 $sum(1)^$sum(2)) echo if not{ echo 817134815/l.h checksum error creating updated file exit checksum } target=817134815/list.c echo -n '817134815/list.c: ' if(! test -f $srcdir/list.c || ! test -r $srcdir/list.c){ echo $srcdir/list.c unreadable exit unreadable } sum=`{sum < $srcdir/list.c} if(! ~ 31c7bc845734 $sum(1)^$sum(2)){ echo $srcdir/list.c is not the original distribution file exit original } cp $srcdir/list.c 817134815/list.c ed 817134815/list.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM list.c' 311a case D_TT0: sprint(str, "TT0"); break; case D_TT1: sprint(str, "TT1"); break; . wq //GO.SYSIN DD VADIM list.c sum=`{sum < 817134815/list.c} if(~ 07e94f755824 $sum(1)^$sum(2)) echo if not{ echo 817134815/list.c checksum error creating updated file exit checksum } target=817134815/obj.c echo -n '817134815/obj.c: ' if(! test -f $srcdir/obj.c || ! test -r $srcdir/obj.c){ echo $srcdir/obj.c unreadable exit unreadable } sum=`{sum < $srcdir/obj.c} if(! ~ 2fad5d0124208 $sum(1)^$sum(2)){ echo $srcdir/obj.c is not the original distribution file exit original } cp $srcdir/obj.c 817134815/obj.c ed 817134815/obj.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM obj.c' 186a special[D_TT0] = 1; special[D_TT1] = 1; . 71a case '3': mc68030 = 1; /* use 68030 PMOVE instructions */ break; . 31a mc68030 = 0; . wq //GO.SYSIN DD VADIM obj.c sum=`{sum < 817134815/obj.c} if(~ 617e7d6724334 $sum(1)^$sum(2)) echo if not{ echo 817134815/obj.c checksum error creating updated file exit checksum } target=817134815/span.c echo -n '817134815/span.c: ' if(! test -f $srcdir/span.c || ! test -r $srcdir/span.c){ echo $srcdir/span.c unreadable exit unreadable } sum=`{sum < $srcdir/span.c} if(! ~ c3da4fb59599 $sum(1)^$sum(2)){ echo $srcdir/span.c is not the original distribution file exit original } cp $srcdir/span.c 817134815/span.c ed 817134815/span.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM span.c' 281a case D_TT0: case D_TT1: . wq //GO.SYSIN DD VADIM span.c sum=`{sum < 817134815/span.c} if(~ 42be582e9625 $sum(1)^$sum(2)) echo if not{ echo 817134815/span.c checksum error creating updated file exit checksum }