Browse Source

Plan 9 from Bell Labs 2004-02-15

David du Colombier 16 years ago
parent
commit
3614a931f7

+ 11 - 11
dist/replica/plan9.db

@@ -22,12 +22,12 @@
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/1c - 775 sys sys 1063639729 306762
 386/bin/8a - 775 sys sys 1068385789 113237
-386/bin/8c - 775 sys sys 1073851202 299443
+386/bin/8c - 775 sys sys 1076817071 299629
 386/bin/8l - 775 sys sys 1073851202 107501
 386/bin/9660srv - 775 sys sys 1064598019 104963
 386/bin/aan - 775 sys sys 1064598020 128816
 386/bin/acid - 775 sys sys 1073851203 379815
-386/bin/acme - 775 sys sys 1076385619 422401
+386/bin/acme - 775 sys sys 1076817072 422441
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1071245280 133877
 386/bin/ape/cc - 775 sys sys 1064598025 68790
@@ -370,7 +370,7 @@
 386/bin/replica/setupdirs - 775 sys sys 1020319083 44
 386/bin/replica/updatedb - 775 sys sys 1068558250 95126
 386/bin/resample - 775 sys sys 1064598294 120124
-386/bin/rio - 775 sys sys 1076385621 311170
+386/bin/rio - 775 sys sys 1076817073 311241
 386/bin/rm - 775 sys sys 1064598298 59786
 386/bin/rtstats - 775 sys sys 1071245345 177818
 386/bin/rx - 775 sys sys 1071245345 80158
@@ -528,7 +528,7 @@
 386/lib/libbin.a - 664 sys sys 1073851265 2556
 386/lib/libbio.a - 664 sys sys 1073851265 28338
 386/lib/libc.a - 664 sys sys 1073851266 504454
-386/lib/libcomplete.a - 664 sys sys 1076385623 6210
+386/lib/libcomplete.a - 664 sys sys 1076817073 6312
 386/lib/libcontrol.a - 664 sys sys 1073851267 242856
 386/lib/libdisk.a - 664 sys sys 1073851267 43536
 386/lib/libdraw.a - 664 sys sys 1073851268 372528
@@ -6674,7 +6674,7 @@ sys/src/cmd/8a/lex.c - 664 sys sys 1067725160 18023
 sys/src/cmd/8a/mkfile - 664 sys sys 1032101905 277
 sys/src/cmd/8c - 20000000775 sys sys 945035118 0
 sys/src/cmd/8c/8.out.h - 664 sys sys 944960730 4107
-sys/src/cmd/8c/cgen.c - 664 sys sys 1016938024 26295
+sys/src/cmd/8c/cgen.c - 664 sys sys 1076774954 26295
 sys/src/cmd/8c/enam.c - 664 sys sys 944960730 3215
 sys/src/cmd/8c/gc.h - 664 sys sys 1018556084 5708
 sys/src/cmd/8c/list.c - 664 sys sys 1067720660 3975
@@ -7219,15 +7219,15 @@ sys/src/cmd/cb/mkfile - 664 sys sys 1062860425 172
 sys/src/cmd/cc - 20000000775 sys sys 1018556175 0
 sys/src/cmd/cc/acid.c - 664 sys sys 944960808 5314
 sys/src/cmd/cc/bits.c - 664 sys sys 944960873 850
-sys/src/cmd/cc/cc.h - 664 sys sys 1067720645 11717
+sys/src/cmd/cc/cc.h - 664 sys sys 1076774919 11746
 sys/src/cmd/cc/cc.y - 664 sys sys 1014925177 15801
-sys/src/cmd/cc/com.c - 664 sys sys 985365310 18765
+sys/src/cmd/cc/com.c - 664 sys sys 1076774920 18843
 sys/src/cmd/cc/com64.c - 664 sys sys 944960808 9763
 sys/src/cmd/cc/compat - 664 sys sys 1014925177 684
 sys/src/cmd/cc/compat.c - 664 sys sys 944960869 266
 sys/src/cmd/cc/con.c - 664 sys sys 944960808 8349
 sys/src/cmd/cc/dcl.c - 664 sys sys 1039910271 25755
-sys/src/cmd/cc/dpchk.c - 664 sys sys 1067720645 6738
+sys/src/cmd/cc/dpchk.c - 664 sys sys 1076774921 6738
 sys/src/cmd/cc/funct.c - 664 sys sys 984718510 6167
 sys/src/cmd/cc/lex.c - 664 sys sys 1067720645 23769
 sys/src/cmd/cc/lexbody - 664 sys sys 1067725942 8953
@@ -7235,7 +7235,7 @@ sys/src/cmd/cc/mac.c - 664 sys sys 944960808 36
 sys/src/cmd/cc/macbody - 664 sys sys 1067720644 11182
 sys/src/cmd/cc/mkfile - 664 sys sys 984718516 564
 sys/src/cmd/cc/pickle.c - 664 sys sys 1063855374 4829
-sys/src/cmd/cc/sub.c - 664 sys sys 1018556165 30856
+sys/src/cmd/cc/sub.c - 664 sys sys 1076774922 30940
 sys/src/cmd/cdfs - 20000000775 sys sys 959922196 0
 sys/src/cmd/cdfs/buf.c - 664 sys sys 964456822 1848
 sys/src/cmd/cdfs/dat.h - 664 sys sys 1014925665 2334
@@ -10223,7 +10223,7 @@ sys/src/cmd/rio/data.c - 664 sys sys 1014926356 6169
 sys/src/cmd/rio/fns.h - 664 sys sys 1039133251 1065
 sys/src/cmd/rio/fsys.c - 664 sys sys 1019678647 13259
 sys/src/cmd/rio/mkfile - 664 sys sys 1039133251 454
-sys/src/cmd/rio/rio.c - 664 sys sys 1039133252 21381
+sys/src/cmd/rio/rio.c - 664 sys sys 1076777377 21415
 sys/src/cmd/rio/scrl.c - 664 sys sys 1014926357 3245
 sys/src/cmd/rio/time.c - 664 sys sys 1014926357 1829
 sys/src/cmd/rio/util.c - 664 sys sys 1014926357 2061
@@ -11767,7 +11767,7 @@ sys/src/libc/sparc/tas.s - 664 sys sys 944961721 67
 sys/src/libc/sparc/vlop.s - 664 sys sys 944961720 2423
 sys/src/libc/sparc/vlrt.c - 664 sys sys 1067723054 9066
 sys/src/libcomplete - 20000000775 sys sys 1072904881 0
-sys/src/libcomplete/complete.c - 664 sys sys 1076276513 2697
+sys/src/libcomplete/complete.c - 664 sys sys 1076789202 2726
 sys/src/libcomplete/mkfile - 664 sys sys 1072904881 208
 sys/src/libcontrol - 20000000775 sys sys 1016857569 0
 sys/src/libcontrol/box.c - 664 sys sys 1015095043 3276

+ 11 - 0
dist/replica/plan9.log

@@ -13840,3 +13840,14 @@
 1076689810 16 a sys/src/cmd/qi/symbols.c - 644 sys sys 1076688569 1741
 1076689810 17 a sys/src/cmd/qi/syscall.c - 644 sys sys 1076688569 14402
 1076689810 18 a sys/src/cmd/qi/timing - 644 sys sys 1076688570 641
+1076776223 0 c sys/src/cmd/8c/cgen.c - 664 sys sys 1076774954 26295
+1076776223 1 c sys/src/cmd/cc/cc.h - 664 sys sys 1076774919 11746
+1076776223 2 c sys/src/cmd/cc/com.c - 664 sys sys 1076774920 18843
+1076776223 3 c sys/src/cmd/cc/dpchk.c - 664 sys sys 1076774921 6738
+1076776223 4 c sys/src/cmd/cc/sub.c - 664 sys sys 1076774922 30940
+1076778023 0 c sys/src/cmd/rio/rio.c - 664 sys sys 1076777377 21415
+1076790626 0 c sys/src/libcomplete/complete.c - 664 sys sys 1076789202 2726
+1076817630 0 c 386/bin/8c - 775 sys sys 1076817071 299629
+1076817630 1 c 386/bin/acme - 775 sys sys 1076817072 422441
+1076817630 2 c 386/bin/rio - 775 sys sys 1076817073 311241
+1076817630 3 c 386/lib/libcomplete.a - 664 sys sys 1076817073 6312

+ 1 - 1
sys/src/cmd/8c/cgen.c

@@ -439,7 +439,7 @@ cgen(Node *n, Node *nn)
 	case OASMOD:
 		if(l->op == OBIT)
 			goto asbitop;
-		if(typefd[n->type->etype])
+		if(typefd[r->type->etype])
 			goto asfop;
 		if(o == OASMUL && r->op == OCONST) {
 			if(hardleft)

+ 1 - 0
sys/src/cmd/cc/cc.h

@@ -636,6 +636,7 @@ void	gethunk(void);
 Node*	invert(Node*);
 int	bitno(long);
 void	makedot(Node*, Type*, long);
+int	mixedasop(Type*, Type*);
 Node*	new(int, Node*, Node*);
 Node*	new1(int, Node*, Node*);
 int	nilcast(Type*, Type*);

+ 3 - 3
sys/src/cmd/cc/com.c

@@ -165,7 +165,7 @@ tcomo(Node *n, int f)
 		arith(n, 0);
 		while(n->left->op == OCAST)
 			n->left = n->left->left;
-		if(!sametype(t, n->type)) {
+		if(!sametype(t, n->type) && !mixedasop(t, n->type)) {
 			r = new1(OCAST, n->right, Z);
 			r->type = t;
 			n->right = r;
@@ -192,7 +192,7 @@ tcomo(Node *n, int f)
 		arith(n, 0);
 		while(n->left->op == OCAST)
 			n->left = n->left->left;
-		if(!sametype(t, n->type)) {
+		if(!sametype(t, n->type) && !mixedasop(t, n->type)) {
 			r = new1(OCAST, n->right, Z);
 			r->type = t;
 			n->right = r;
@@ -243,7 +243,7 @@ tcomo(Node *n, int f)
 		arith(n, 0);
 		while(n->left->op == OCAST)
 			n->left = n->left->left;
-		if(!sametype(t, n->type)) {
+		if(!sametype(t, n->type) && !mixedasop(t, n->type)) {
 			r = new1(OCAST, n->right, Z);
 			r->type = t;
 			n->right = r;

+ 1 - 1
sys/src/cmd/cc/dpchk.c

@@ -428,7 +428,7 @@ pragprofile(void)
 		profileflg = atoi(s->name+1);
 		if(strcmp(s->name, "on") == 0 ||
 		   strcmp(s->name, "yes") == 0)
-			fproundflg = 1;
+			profileflg = 1;
 	}
 	while(getnsc() != '\n')
 		;

+ 6 - 0
sys/src/cmd/cc/sub.c

@@ -1818,3 +1818,9 @@ deadheads(Node *c)
 {
 	return deadhead(c->left, 0) && deadhead(c->right, 0);
 }
+
+int
+mixedasop(Type *l, Type *r)
+{
+	return !typefd[l->etype] && typefd[r->etype];
+}

+ 2 - 0
sys/src/cmd/rio/rio.c

@@ -1109,6 +1109,8 @@ new(Image *i, int hideit, int scrollit, int pid, char *dir, char *cmd, char **ar
 	}
 	wsetpid(w, pid, 1);
 	wsetname(w);
+	if(dir)
+		w->dir = estrdup(dir);
 	chanfree(cpid);
 	return w;
 }

+ 4 - 1
sys/src/libcomplete/complete.c

@@ -58,8 +58,10 @@ complete(char *dir, char *s)
 		return nil;
 
 	n = dirreadall(fd, &dirp);
-	if(n <= 0)
+	if(n <= 0){
+		close(fd);
 		return nil;
+	}
 
 	/* find longest string, for allocation */
 	len = 0;
@@ -137,5 +139,6 @@ complete(char *dir, char *s)
 	free(name);
 	free(mode);
 	free(dirp);
+	close(fd);
 	return c;
 }