Browse Source

Plan 9 from Bell Labs 2007-06-22

David du Colombier 17 years ago
parent
commit
190a7ab3b7
6 changed files with 507 additions and 488 deletions
  1. 5 3
      dist/replica/_plan9.db
  2. 5 5
      dist/replica/plan9.db
  3. 6 0
      dist/replica/plan9.log
  4. 28 24
      sys/man/1/sed
  5. 110 114
      sys/src/cmd/aux/vga/nvidia.c
  6. 353 342
      sys/src/cmd/sed.c

+ 5 - 3
dist/replica/_plan9.db

@@ -7436,7 +7436,7 @@ sys/man/1/rm - 664 sys sys 944959673 515
 sys/man/1/rwd - 664 sys sys 1042469992 2958
 sys/man/1/sam - 664 sys sys 1113743327 18295
 sys/man/1/secstore - 664 sys sys 1181275322 3913
-sys/man/1/sed - 664 sys sys 944959674 6884
+sys/man/1/sed - 664 sys sys 1182458430 6921
 sys/man/1/seq - 664 sys sys 1063855680 1131
 sys/man/1/size - 664 sys sys 944959674 393
 sys/man/1/sleep - 664 sys sys 1167774352 420
@@ -9812,7 +9812,7 @@ sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1158594482 36898
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1115734903 927
 sys/src/cmd/aux/vga/neomagic.c - 664 sys sys 1104430499 8975
 sys/src/cmd/aux/vga/notes.txt - 664 sys sys 1028334647 14376
-sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1166796095 33178
+sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1182462658 32347
 sys/src/cmd/aux/vga/palette.c - 664 sys sys 1014925010 2201
 sys/src/cmd/aux/vga/pci.c - 664 sys sys 1014925011 8659
 sys/src/cmd/aux/vga/pci.h - 664 sys sys 1014925011 3290
@@ -13388,7 +13388,7 @@ sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1181436637 13594
 sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1181435455 6692
 sys/src/cmd/scuzz/scuzz.c - 664 sys sys 1181436627 38286
 sys/src/cmd/scuzz/sense.c - 664 sys sys 1177702138 5680
-sys/src/cmd/sed.c - 664 sys sys 1100962924 27001
+sys/src/cmd/sed.c - 664 sys sys 1182465504 26844
 sys/src/cmd/seq.c - 664 sys sys 1161442158 1691
 sys/src/cmd/sh.C - 664 sys sys 1055701754 10303
 sys/src/cmd/sha1sum.c - 664 sys sys 1014926229 1017
@@ -15844,3 +15844,5 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/sed - 775 sys sys 1182482483 90481
+386/bin/aux/vga - 775 sys sys 1182482483 334774

+ 5 - 5
dist/replica/plan9.db

@@ -150,7 +150,7 @@
 386/bin/aux/trampoline - 775 sys sys 1178568259 82677
 386/bin/aux/typepasswd - 775 sys sys 1168402288 69738
 386/bin/aux/usage - 775 sys sys 1168402288 59809
-386/bin/aux/vga - 775 sys sys 1178568260 334772
+386/bin/aux/vga - 775 sys sys 1182482483 334774
 386/bin/aux/vmmousepoll - 775 sys sys 1032480572 41434
 386/bin/aux/vmware - 775 sys sys 1049428256 453
 386/bin/aux/vmwarefs - 775 sys sys 1095563640 99117
@@ -400,7 +400,7 @@
 386/bin/scat - 775 sys sys 1182223286 284918
 386/bin/scp - 775 sys sys 1178568301 152318
 386/bin/scuzz - 775 sys sys 1181507269 115314
-386/bin/sed - 775 sys sys 1181507269 89946
+386/bin/sed - 775 sys sys 1182482483 90481
 386/bin/seq - 775 sys sys 1162241047 38441
 386/bin/sha1sum - 775 sys sys 1168402348 61366
 386/bin/size - 775 sys sys 1178939753 79772
@@ -7436,7 +7436,7 @@ sys/man/1/rm - 664 sys sys 944959673 515
 sys/man/1/rwd - 664 sys sys 1042469992 2958
 sys/man/1/sam - 664 sys sys 1113743327 18295
 sys/man/1/secstore - 664 sys sys 1181275322 3913
-sys/man/1/sed - 664 sys sys 944959674 6884
+sys/man/1/sed - 664 sys sys 1182458430 6921
 sys/man/1/seq - 664 sys sys 1063855680 1131
 sys/man/1/size - 664 sys sys 944959674 393
 sys/man/1/sleep - 664 sys sys 1167774352 420
@@ -9812,7 +9812,7 @@ sys/src/cmd/aux/vga/mga4xx.c - 664 sys sys 1158594482 36898
 sys/src/cmd/aux/vga/mkfile - 664 sys sys 1115734903 927
 sys/src/cmd/aux/vga/neomagic.c - 664 sys sys 1104430499 8975
 sys/src/cmd/aux/vga/notes.txt - 664 sys sys 1028334647 14376
-sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1166796095 33178
+sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1182462658 32347
 sys/src/cmd/aux/vga/palette.c - 664 sys sys 1014925010 2201
 sys/src/cmd/aux/vga/pci.c - 664 sys sys 1014925011 8659
 sys/src/cmd/aux/vga/pci.h - 664 sys sys 1014925011 3290
@@ -13388,7 +13388,7 @@ sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1181436637 13594
 sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1181435455 6692
 sys/src/cmd/scuzz/scuzz.c - 664 sys sys 1181436627 38286
 sys/src/cmd/scuzz/sense.c - 664 sys sys 1177702138 5680
-sys/src/cmd/sed.c - 664 sys sys 1100962924 27001
+sys/src/cmd/sed.c - 664 sys sys 1182465504 26844
 sys/src/cmd/seq.c - 664 sys sys 1161442158 1691
 sys/src/cmd/sh.C - 664 sys sys 1055701754 10303
 sys/src/cmd/sha1sum.c - 664 sys sys 1014926229 1017

+ 6 - 0
dist/replica/plan9.log

@@ -49279,3 +49279,9 @@
 1182317423 0 c sys/man/3/bridge - 664 sys sys 1182317237 3151
 1182319223 0 c sys/src/9/ip/ethermedium.c - 664 sys sys 1182317888 15596
 1182367845 0 c sys/man/3/vga - 664 sys sys 1182367669 4987
+1182457823 0 c sys/src/cmd/sed.c - 664 sys sys 1182457801 26875
+1182459624 0 c sys/man/1/sed - 664 sys sys 1182458430 6921
+1182463223 0 c sys/src/cmd/aux/vga/nvidia.c - 664 sys sys 1182462658 32347
+1182466823 0 c sys/src/cmd/sed.c - 664 sys sys 1182465504 26844
+1182483004 0 c 386/bin/sed - 775 sys sys 1182482483 90481
+1182483004 1 c 386/bin/aux/vga - 775 sys sys 1182482483 334774

+ 28 - 24
sys/man/1/sed

@@ -35,7 +35,7 @@ If there is just one
 .B -e
 option and no
 .BR -f 's,
-the flag
+the option
 .B -e
 may be omitted.
 The
@@ -48,14 +48,14 @@ causes all substitutions to be global, as if suffixed
 A script consists of editing commands, one per line,
 of the following form:
 .IP
-[\fIaddress\fR [\fL,\fI address\fR] ] \fIfunction\fR [\fIargument\fR ...]
+[\fIaddress\fR [\fL,\fI address\fR] ] \fIfunction\fR [\fIargument\fR ...] [\fL;\fP]
 .PP
 In normal operation
 .I sed
 cyclically copies a line of input into a
 .I pattern space
 (unless there is something left after
-a 
+a
 .L D
 command),
 applies in sequence
@@ -70,7 +70,7 @@ and deletes the pattern space.
 An
 .I address
 is either a decimal number that counts
-input lines cumulatively across files, a 
+input lines cumulatively across files, a
 .L $
 that
 addresses the last line of input, or a context address,
@@ -99,19 +99,19 @@ Thereafter the process is repeated, looking again for the
 first address.
 .PP
 Editing commands can be applied to non-selected pattern
-spaces by use of the negation function 
+spaces by use of the negation function
 .L !
 (below).
 .PP
 An argument denoted
 .I text
 consists of one or more lines,
-all but the last of which end with 
+all but the last of which end with
 .L \e
 to hide the
 newline.
 Backslashes in text are treated like backslashes
-in the replacement string of an 
+in the replacement string of an
 .L s
 command,
 and may be used to protect initial blanks and tabs
@@ -143,7 +143,7 @@ on the output before
 reading the next input line.
 .TP
 .BI b " label"
-Branch to the 
+Branch to the
 .B :
 command bearing the
 .IR label .
@@ -230,7 +230,7 @@ Substitute the
 string for instances of the
 .I regular-expression
 in the pattern space.
-Any character may be used instead of 
+Any character may be used instead of
 .LR / .
 For a fuller description see
 .IR regexp (6).
@@ -258,13 +258,13 @@ was made.
 .TP
 .BI t " label"
 Test.
-Branch to the 
+Branch to the
 .L :
 command bearing the
 .I label
 if any
 substitutions have been made since the most recent
-reading of an input line or execution of a 
+reading of an input line or execution of a
 .LR t .
 If
 .I label
@@ -299,18 +299,22 @@ Apply the
 .I function
 (or group, if
 .I function
-is 
+is
 .LR { )
 only to lines
 .I not
 selected by the address(es).
 .TP
+.B #
+Comment.
+Ignore the rest of the line.
+.TP
 .BI : " label"
 This command does nothing; it bears a
 .I label
-for 
+for
 .B b
-and 
+and
 .B t
 commands to branch to.
 .TP
@@ -318,7 +322,7 @@ commands to branch to.
 Place the current line number on the standard output as a line.
 .TP
 .B {
-Execute the following commands through a matching 
+Execute the following commands through a matching
 .L }
 only when the pattern space is selected.
 .TP
@@ -334,21 +338,21 @@ Print the first 10 lines of the file.
 Delete empty lines from standard input.
 .TP
 .B sed 's/UNIX/& system/g'
-Replace every instance of 
+Replace every instance of
 .L UNIX
 by
 .LR "UNIX system" .
 .PP
 .EX
 sed 's/ *$//	\fRdrop trailing blanks\fP
-/^$/d			\fRdrop empty lines\fP
+/^$/d		\fRdrop empty lines\fP
 s/  */\e		\fRreplace blanks by newlines\fP
 /g
 /^$/d' chapter*
 .EE
 .ns
 .IP
-Print the files 
+Print the files
 .BR chapter1 ,
 .BR chapter2 ,
 etc. one word to a line.
@@ -356,7 +360,7 @@ etc. one word to a line.
 .EX
 nroff -ms manuscript | sed '
 ${
-	/^$/p		\fRif last line of file is empty, print it\fP
+	/^$/p	\fRif last line of file is empty, print it\fP
 }
 //N			\fRif current line is empty, append next line\fP
 /^\en$/D'		\fRif two lines are empty, delete the first\fP
@@ -368,10 +372,10 @@ formatted manuscript.
 .SH SOURCE
 .B /sys/src/cmd/sed.c
 .SH SEE ALSO
-.IR ed (1), 
-.IR grep (1), 
-.IR awk (1), 
-.IR lex (1), 
+.IR ed (1),
+.IR grep (1),
+.IR awk (1),
+.IR lex (1),
 .IR sam (1),
 .IR regexp (6)
 .br
@@ -380,6 +384,6 @@ L. E. McMahon,
 Unix Research System Programmer's Manual, Volume 2.
 .SH BUGS
 If input is from a pipe, buffering may consume
-characters beyond a line on which a 
+characters beyond a line on which a
 .L q
 command is executed.

+ 110 - 114
sys/src/cmd/aux/vga/nvidia.c

@@ -1,4 +1,3 @@
-
 /* Portions of this file derived from work with the following copyright */
 
  /***************************************************************************\
@@ -158,7 +157,7 @@ snarf(Vga* vga, Ctlr* ctlr)
 		nv->pfb = mmio+0x00100000/4;
 		nv->pramdac = mmio+0x00680000/4;
 		nv->pextdev = mmio+0x00101000/4;
-		nv->pmc = mmio+0x00000000/4;
+		nv->pmc = mmio;
 		nv->ptimer = mmio+0x00009000/4;
 		nv->pfifo = mmio+0x00002000/4;
 		nv->pramin = mmio+0x00710000/4;
@@ -197,15 +196,16 @@ snarf(Vga* vga, Ctlr* ctlr)
 			nv->arch = 30;
 			break;
 		case 0x0040:
+		case 0x0090:
 		case 0x00C0:
 		case 0x0120:
 		case 0x0130:
 		case 0x0140:	/* GeForce 6600 */
 		case 0x0160:
 		case 0x01D0:
-		case 0x0090:
 		case 0x0210:
-		case 0x0290:	/* nvidia 7950*/
+		case 0x0290:	/* nvidia 7950 */
+		case 0x0390:
 			nv->arch = 40;
 			break;
 		default:
@@ -222,7 +222,7 @@ snarf(Vga* vga, Ctlr* ctlr)
 	 */
 	vgaxo(Crtx, 0x1F, 0x57);
 
-	if (nv->pextdev[0x00000000] & 0x00000040)
+	if (nv->pextdev[0] & 0x40)
 		nv->crystalfreq = RefFreq;
 	else
 		nv->crystalfreq = 13500000;
@@ -231,7 +231,7 @@ snarf(Vga* vga, Ctlr* ctlr)
 	    (implementation == 0x0180) ||
 	    (implementation == 0x01F0) ||
 	    (implementation >= 0x0250))
-		if(nv->pextdev[0x00000000] & (1 << 22))
+		if(nv->pextdev[0] & (1 << 22))
 			nv->crystalfreq = 27000000;
 
 	nv->twoheads = (nv->arch >= 10) &&
@@ -241,11 +241,10 @@ snarf(Vga* vga, Ctlr* ctlr)
 			(implementation != 0x0200);
 
 	nv->twostagepll = (implementation == 0x0310) ||
-				(implementation == 0x0340) ||
-				(nv->arch >= 40);
+			(implementation == 0x0340) || (nv->arch >= 40);
 
 	if (nv->twoheads && (implementation != 0x0110))
-		if(nv->pextdev[0x00000000] & (1 << 22))
+		if(nv->pextdev[0] & (1 << 22))
 			nv->crystalfreq = 27000000;
 
 	/* laptop chips */
@@ -292,15 +291,13 @@ snarf(Vga* vga, Ctlr* ctlr)
 	case 0x0148:
 		nv->islcd = 1;
 		break;
-	default:
-		break;
 	}
 
 	if (nv->arch == 4) {
-		tmp = nv->pfb[0x00000000];
-		if (tmp & 0x0100) {
-			vga->vmz = ((tmp >> 12) & 0x0F) * 1024 + 1024 * 2;
-		} else {
+		tmp = nv->pfb[0];
+		if (tmp & 0x0100)
+			vga->vmz = ((tmp >> 12) & 0x0F)*1024 + 2*1024;
+		else {
 			tmp &= 0x03;
 			if (tmp)
 				vga->vmz = (1024*1024*2) << tmp;
@@ -324,7 +321,7 @@ snarf(Vga* vga, Ctlr* ctlr)
 				break;
 		}
 		tmp = pcicfgr32(p, 0x84);
-		vga->vmz = (((tmp >> 4) & 127) + 1) * 1024 * 1024;
+		vga->vmz = (((tmp >> 4) & 127) + 1) * 1024*1024;
 	} else {
 		tmp = (nv->pfb[0x0000020C/4] >> 20) & 0xFFF;
 		if (tmp == 0)
@@ -342,21 +339,20 @@ snarf(Vga* vga, Ctlr* ctlr)
 	nv->cursor2 = vgaxi(Crtx, 0x2F);
 	nv->interlace = vgaxi(Crtx, 0x39);
 
-	nv->vpll = nv->pramdac[0x00000508/4];
+	nv->vpll = nv->pramdac[0x508/4];
 	if (nv->twoheads)
-		nv->vpll2 = nv->pramdac[0x00000520/4];
+		nv->vpll2  = nv->pramdac[0x520/4];
 	if (nv->twostagepll) {
-		nv->vpllB = nv->pramdac[0x00000578/4];
-		nv->vpll2B = nv->pramdac[0x0000057C/4];
+		nv->vpllB  = nv->pramdac[0x578/4];
+		nv->vpll2B = nv->pramdac[0x57C/4];
 	}
-	nv->pllsel = nv->pramdac[0x0000050C/4];
-	nv->general = nv->pramdac[0x00000600/4];
-	nv->scale = nv->pramdac[0x00000848/4];
-	nv->config = nv->pfb[0x00000200/4];
+	nv->pllsel  = nv->pramdac[0x50C/4];
+	nv->general = nv->pramdac[0x600/4];
+	nv->scale   = nv->pramdac[0x848/4];
+	nv->config = nv->pfb[0x200/4];
 
-	if (nv->pixel & 0x80){
+	if (nv->pixel & 0x80)
 		nv->islcd = 1;
-	}
 
 	if (nv->arch >= 10) {
 		if (nv->twoheads) {
@@ -376,7 +372,7 @@ snarf(Vga* vga, Ctlr* ctlr)
 	 * DFP.
 	 */
 	if (nv->islcd) {
-		nv->fpwidth = nv->pramdac[0x0820/4] + 1;
+		nv->fpwidth  = nv->pramdac[0x0820/4] + 1;
 		nv->fpheight = nv->pramdac[0x0800/4] + 1;
 		nv->crtcsync = nv->pramdac[0x0828/4];
 	}
@@ -483,7 +479,7 @@ init(Vga* vga, Ctlr* ctlr)
 	}
 
 	if(nv->arch == 4) {
-		nv->cursor0 = 0x00;
+		nv->cursor0 = 0;
 		nv->cursor1 = 0xBC;
 		nv->cursor2 = 0;
 		nv->config = 0x00001114;
@@ -511,7 +507,7 @@ init(Vga* vga, Ctlr* ctlr)
 
 	vga->attribute[0x10] &= ~0x40;
 	vga->attribute[0x11] = Pblack;
-	vga->crt[0x14] = 0x00;
+	vga->crt[0x14] = 0;
 
 	/* set vert blanking to cover full overscan */
 
@@ -531,7 +527,7 @@ init(Vga* vga, Ctlr* ctlr)
 	/* set horiz blanking to cover full overscan */
 
 	vga->crt[0x02] = vga->crt[0x01];
-	tmp = vga->crt[0x00] + 4;
+	tmp = vga->crt[0] + 4;
 	vga->crt[0x03] = 0x80 | (tmp & 0x1F);
 	if (tmp & 0x20)
 		vga->crt[0x05] |= 0x80;
@@ -540,7 +536,7 @@ init(Vga* vga, Ctlr* ctlr)
 	if (tmp & 0x40)
 		nv->screen = 0x10;
 	else
-		nv->screen = 0x00;
+		nv->screen = 0;
 
 	/* overflow bits */
 
@@ -569,10 +565,10 @@ init(Vga* vga, Ctlr* ctlr)
 		else
 			vga->crt[0x09] &= ~0x20;
 
-		vga->crt[0x04] = vga->crt[0x00] - 5;
+		vga->crt[0x04] = vga->crt[0] - 5;
 
 		vga->crt[0x05] &= ~0x1F;
-		vga->crt[0x05] |= (0x1F & (vga->crt[0x00] - 2));
+		vga->crt[0x05] |= (0x1F & (vga->crt[0] - 2));
 	}
 
 	nv->repaint0 = (vga->crt[0x13] & 0x0700) >> 3;
@@ -600,8 +596,8 @@ init(Vga* vga, Ctlr* ctlr)
 	if (vga->crt[0x13] & 0x800)
 		nv->screen |= 0x20;
 
-	nv->horiz = 0x00;
-	if (vga->crt[0x00] & 0x100)
+	nv->horiz = 0;
+	if (vga->crt[0] & 0x100)
 		nv->horiz = 0x01;
 	if(vga->crt[0x01] & 0x100)
 		nv->horiz |= 0x02;
@@ -610,7 +606,7 @@ init(Vga* vga, Ctlr* ctlr)
 	if(vga->crt[0x04] & 0x100)
 		nv->horiz |= 0x08;
 
-	nv->extra = 0x00;
+	nv->extra = 0;
 	if (vga->crt[0x06] & 0x800)
 		nv->extra |= 0x01;
 	if (vga->crt[0x12] & 0x800)
@@ -654,13 +650,13 @@ load(Vga* vga, Ctlr* ctlr)
 	 */
 	vgaxo(Crtx, 0x1F, 0x57);
 
- 	nv->pmc[0x0140/4] = 0x00000000;
+ 	nv->pmc[0x0140/4] = 0;
  	nv->pmc[0x0200/4] = 0xFFFF00FF;
  	nv->pmc[0x0200/4] = 0xFFFFFFFF;
 
- 	nv->ptimer[0x0200] = 0x00000008;
- 	nv->ptimer[0x0210] = 0x00000003;
- 	nv->ptimer[0x0140] = 0x00000000;
+ 	nv->ptimer[0x0200] = 8;
+ 	nv->ptimer[0x0210] = 3;
+ 	nv->ptimer[0x0140] = 0;
  	nv->ptimer[0x0100] = 0xFFFFFFFF;
 
 	if (nv->arch == 4)
@@ -687,7 +683,7 @@ load(Vga* vga, Ctlr* ctlr)
 	}
 
 	if (nv->arch >= 40) {
-		nv->pramin[0x0000] = 0x80000010;
+		nv->pramin[0]      = 0x80000010;
 		nv->pramin[0x0001] = 0x00101202;
 		nv->pramin[0x0002] = 0x80000011;
 		nv->pramin[0x0003] = 0x00101204;
@@ -707,56 +703,56 @@ load(Vga* vga, Ctlr* ctlr)
 		nv->pramin[0x0801] = vga->vmz - 1;
 		nv->pramin[0x0802] = 0x00000002;
 		nv->pramin[0x0808] = 0x02080062;
-		nv->pramin[0x0809] = 0x00000000;
+		nv->pramin[0x0809] = 0;
 		nv->pramin[0x080A] = 0x00001200;
 		nv->pramin[0x080B] = 0x00001200;
-		nv->pramin[0x080C] = 0x00000000;
-		nv->pramin[0x080D] = 0x00000000;
+		nv->pramin[0x080C] = 0;
+		nv->pramin[0x080D] = 0;
 		nv->pramin[0x0810] = 0x02080043;
-		nv->pramin[0x0811] = 0x00000000;
-		nv->pramin[0x0812] = 0x00000000;
-		nv->pramin[0x0813] = 0x00000000;
-		nv->pramin[0x0814] = 0x00000000;
-		nv->pramin[0x0815] = 0x00000000;
+		nv->pramin[0x0811] = 0;
+		nv->pramin[0x0812] = 0;
+		nv->pramin[0x0813] = 0;
+		nv->pramin[0x0814] = 0;
+		nv->pramin[0x0815] = 0;
 		nv->pramin[0x0818] = 0x02080044;
 		nv->pramin[0x0819] = 0x02000000;
-		nv->pramin[0x081A] = 0x00000000;
-		nv->pramin[0x081B] = 0x00000000;
-		nv->pramin[0x081C] = 0x00000000;
-		nv->pramin[0x081D] = 0x00000000;
+		nv->pramin[0x081A] = 0;
+		nv->pramin[0x081B] = 0;
+		nv->pramin[0x081C] = 0;
+		nv->pramin[0x081D] = 0;
 		nv->pramin[0x0820] = 0x02080019;
-		nv->pramin[0x0821] = 0x00000000;
-		nv->pramin[0x0822] = 0x00000000;
-		nv->pramin[0x0823] = 0x00000000;
-		nv->pramin[0x0824] = 0x00000000;
-		nv->pramin[0x0825] = 0x00000000;
+		nv->pramin[0x0821] = 0;
+		nv->pramin[0x0822] = 0;
+		nv->pramin[0x0823] = 0;
+		nv->pramin[0x0824] = 0;
+		nv->pramin[0x0825] = 0;
 		nv->pramin[0x0828] = 0x020A005C;
-		nv->pramin[0x0829] = 0x00000000;
-		nv->pramin[0x082A] = 0x00000000;
-		nv->pramin[0x082B] = 0x00000000;
-		nv->pramin[0x082C] = 0x00000000;
-		nv->pramin[0x082D] = 0x00000000;
+		nv->pramin[0x0829] = 0;
+		nv->pramin[0x082A] = 0;
+		nv->pramin[0x082B] = 0;
+		nv->pramin[0x082C] = 0;
+		nv->pramin[0x082D] = 0;
 		nv->pramin[0x0830] = 0x0208009F;
-		nv->pramin[0x0831] = 0x00000000;
+		nv->pramin[0x0831] = 0;
 		nv->pramin[0x0832] = 0x00001200;
 		nv->pramin[0x0833] = 0x00001200;
-		nv->pramin[0x0834] = 0x00000000;
-		nv->pramin[0x0835] = 0x00000000;
+		nv->pramin[0x0834] = 0;
+		nv->pramin[0x0835] = 0;
 		nv->pramin[0x0838] = 0x0208004A;
 		nv->pramin[0x0839] = 0x02000000;
-		nv->pramin[0x083A] = 0x00000000;
-		nv->pramin[0x083B] = 0x00000000;
-		nv->pramin[0x083C] = 0x00000000;
-		nv->pramin[0x083D] = 0x00000000;
+		nv->pramin[0x083A] = 0;
+		nv->pramin[0x083B] = 0;
+		nv->pramin[0x083C] = 0;
+		nv->pramin[0x083D] = 0;
 		nv->pramin[0x0840] = 0x02080077;
-		nv->pramin[0x0841] = 0x00000000;
+		nv->pramin[0x0841] = 0;
 		nv->pramin[0x0842] = 0x00001200;
 		nv->pramin[0x0843] = 0x00001200;
-		nv->pramin[0x0844] = 0x00000000;
-		nv->pramin[0x0845] = 0x00000000;
+		nv->pramin[0x0844] = 0;
+		nv->pramin[0x0845] = 0;
 		nv->pramin[0x084C] = 0x00003002;
 		nv->pramin[0x084D] = 0x00007FFF;
-		nv->pramin[0x084E] = (vga->vmz - 128 * 1024) | 0x00000002;
+		nv->pramin[0x084E] = (vga->vmz - 128*1024) | 2;
 	} else {
 		nv->pramin[0x0000] = 0x80000010;
 		nv->pramin[0x0001] = 0x80011201;
@@ -782,40 +778,40 @@ load(Vga* vga, Ctlr* ctlr)
 			nv->pramin[0x0804] = 0x01008062;
 		else
 			nv->pramin[0x0804] = 0x01008042;
-		nv->pramin[0x0805] = 0x00000000;
+		nv->pramin[0x0805] = 0;
 		nv->pramin[0x0806] = 0x12001200;
-		nv->pramin[0x0807] = 0x00000000;
+		nv->pramin[0x0807] = 0;
 		nv->pramin[0x0808] = 0x01008043;
-		nv->pramin[0x0809] = 0x00000000;
-		nv->pramin[0x080A] = 0x00000000;
-		nv->pramin[0x080B] = 0x00000000;
+		nv->pramin[0x0809] = 0;
+		nv->pramin[0x080A] = 0;
+		nv->pramin[0x080B] = 0;
 		nv->pramin[0x080C] = 0x01008044;
 		nv->pramin[0x080D] = 0x00000002;
-		nv->pramin[0x080E] = 0x00000000;
-		nv->pramin[0x080F] = 0x00000000;
+		nv->pramin[0x080E] = 0;
+		nv->pramin[0x080F] = 0;
 		nv->pramin[0x0810] = 0x01008019;
-		nv->pramin[0x0811] = 0x00000000;
-		nv->pramin[0x0812] = 0x00000000;
-		nv->pramin[0x0813] = 0x00000000;
+		nv->pramin[0x0811] = 0;
+		nv->pramin[0x0812] = 0;
+		nv->pramin[0x0813] = 0;
 		nv->pramin[0x0814] = 0x0100A05C;
-		nv->pramin[0x0815] = 0x00000000;
-		nv->pramin[0x0816] = 0x00000000;
-		nv->pramin[0x0817] = 0x00000000;
+		nv->pramin[0x0815] = 0;
+		nv->pramin[0x0816] = 0;
+		nv->pramin[0x0817] = 0;
 		nv->pramin[0x0818] = 0x0100805F;
-		nv->pramin[0x0819] = 0x00000000;
+		nv->pramin[0x0819] = 0;
 		nv->pramin[0x081A] = 0x12001200;
-		nv->pramin[0x081B] = 0x00000000;
+		nv->pramin[0x081B] = 0;
 		nv->pramin[0x081C] = 0x0100804A;
 		nv->pramin[0x081D] = 0x00000002;
-		nv->pramin[0x081E] = 0x00000000;
-		nv->pramin[0x081F] = 0x00000000;
+		nv->pramin[0x081E] = 0;
+		nv->pramin[0x081F] = 0;
 		nv->pramin[0x0820] = 0x01018077;
-		nv->pramin[0x0821] = 0x00000000;
+		nv->pramin[0x0821] = 0;
 		nv->pramin[0x0822] = 0x01201200;
-		nv->pramin[0x0823] = 0x00000000;
+		nv->pramin[0x0823] = 0;
 		nv->pramin[0x0824] = 0x00003002;
 		nv->pramin[0x0825] = 0x00007FFF;
-		nv->pramin[0x0826] = (vga->vmz - 128 * 1024) | 0x00000002;
+		nv->pramin[0x0826] = (vga->vmz - 128*1024) | 2;
 		nv->pramin[0x0827] = 0x00000002;
 	}
 	if (nv->arch < 10) {
@@ -830,23 +826,23 @@ load(Vga* vga, Ctlr* ctlr)
 		nv->pgraph[0x008C/4] = 0x0004FF31;
 		nv->pgraph[0x008C/4] = 0x4004FF31;
 
-		nv->pgraph[0x0140/4] = 0x00000000;
+		nv->pgraph[0x0140/4] = 0;
 		nv->pgraph[0x0100/4] = 0xFFFFFFFF;
 		nv->pgraph[0x0170/4] = 0x10010100;
 		nv->pgraph[0x0710/4] = 0xFFFFFFFF;
-		nv->pgraph[0x0720/4] = 0x00000001;
+		nv->pgraph[0x0720/4] = 1;
 
-		nv->pgraph[0x0810/4] = 0x00000000;
+		nv->pgraph[0x0810/4] = 0;
 		nv->pgraph[0x0608/4] = 0xFFFFFFFF;
 	} else {
 		nv->pgraph[0x0080/4] = 0xFFFFFFFF;
-		nv->pgraph[0x0080/4] = 0x00000000;
+		nv->pgraph[0x0080/4] = 0;
 
-		nv->pgraph[0x0140/4] = 0x00000000;
+		nv->pgraph[0x0140/4] = 0;
 		nv->pgraph[0x0100/4] = 0xFFFFFFFF;
 		nv->pgraph[0x0144/4] = 0x10010100;
 		nv->pgraph[0x0714/4] = 0xFFFFFFFF;
-		nv->pgraph[0x0720/4] = 0x00000001;
+		nv->pgraph[0x0720/4] = 1;
 		nv->pgraph[0x0710/4] &= 0x0007ff00;
 		nv->pgraph[0x0710/4] |= 0x00020100;
 
@@ -856,14 +852,14 @@ load(Vga* vga, Ctlr* ctlr)
 			nv->pgraph[0x008C/4] = 0x55DE0030;
 
 			for(i = 0; i < 32; i++)
-				nv->pgraph[(0x0B00/4) + i] = nv->pfb[(0x0240/4) + i];
+				nv->pgraph[0x0B00/4 + i] = nv->pfb[0x0240/4 + i];
 
 			nv->pgraph[0x640/4] = 0;
 			nv->pgraph[0x644/4] = 0;
 			nv->pgraph[0x684/4] = vga->vmz - 1;
 			nv->pgraph[0x688/4] = vga->vmz - 1;
 
-			nv->pgraph[0x0810/4] = 0x00000000;
+			nv->pgraph[0x0810/4] = 0;
 			nv->pgraph[0x0608/4] = 0xFFFFFFFF;
 		} else {
 			if (nv->arch >= 40) {
@@ -943,7 +939,7 @@ load(Vga* vga, Ctlr* ctlr)
 			} else {
 				nv->pgraph[0x0084/4] = 0x00118700;
 				nv->pgraph[0x008C/4] = 0xF20E0431;
-				nv->pgraph[0x0090/4] = 0x00000000;
+				nv->pgraph[0x0090/4] = 0;
 				nv->pgraph[0x009C/4] = 0x00000040;
 
 				if((nv->did & 0x0ff0) >= 0x0250) {
@@ -1029,7 +1025,7 @@ load(Vga* vga, Ctlr* ctlr)
 				nv->pgraph[0x0868/4] = vga->vmz - 1;
 			}
 
-			nv->pgraph[0x0B20/4] = 0x00000000;
+			nv->pgraph[0x0B20/4] = 0;
 			nv->pgraph[0x0B04/4] = 0xFFFFFFFF;
 		}
 	}
@@ -1039,32 +1035,32 @@ load(Vga* vga, Ctlr* ctlr)
 	nv->pgraph[0x0544/4] = 0x00007FFF;
 	nv->pgraph[0x0548/4] = 0x00007FFF;
 
-	nv->pfifo[0x0140] = 0x00000000;
+	nv->pfifo[0x0140] = 0;
 	nv->pfifo[0x0141] = 0x00000001;
-	nv->pfifo[0x0480] = 0x00000000;
-	nv->pfifo[0x0494] = 0x00000000;
+	nv->pfifo[0x0480] = 0;
+	nv->pfifo[0x0494] = 0;
 	if (nv->arch >= 40)
 		nv->pfifo[0x0481] = 0x00010000;
 	else
 		nv->pfifo[0x0481] = 0x00000100;
-	nv->pfifo[0x0490] = 0x00000000;
-	nv->pfifo[0x0491] = 0x00000000;
+	nv->pfifo[0x0490] = 0;
+	nv->pfifo[0x0491] = 0;
 	if (nv->arch >= 40)
 		nv->pfifo[0x048B] = 0x00001213;
 	else
 		nv->pfifo[0x048B] = 0x00001209;
-	nv->pfifo[0x0400] = 0x00000000;
-	nv->pfifo[0x0414] = 0x00000000;
+	nv->pfifo[0x0400] = 0;
+	nv->pfifo[0x0414] = 0;
 	nv->pfifo[0x0084] = 0x03000100;
 	nv->pfifo[0x0085] = 0x00000110;
 	nv->pfifo[0x0086] = 0x00000112;
 	nv->pfifo[0x0143] = 0x0000FFFF;
 	nv->pfifo[0x0496] = 0x0000FFFF;
-	nv->pfifo[0x0050] = 0x00000000;
+	nv->pfifo[0x0050] = 0;
 	nv->pfifo[0x0040] = 0xFFFFFFFF;
 	nv->pfifo[0x0415] = 0x00000001;
-	nv->pfifo[0x048C] = 0x00000000;
-	nv->pfifo[0x04A0] = 0x00000000;
+	nv->pfifo[0x048C] = 0;
+	nv->pfifo[0x04A0] = 0;
 	nv->pfifo[0x0489] = 0x000F0078;
 	nv->pfifo[0x0488] = 0x00000001;
 	nv->pfifo[0x0480] = 0x00000001;

File diff suppressed because it is too large
+ 353 - 342
sys/src/cmd/sed.c


Some files were not shown because too many files changed in this diff