Browse Source

Plan 9 from Bell Labs 2006-05-16

David du Colombier 18 years ago
parent
commit
a5b3e406d7

+ 5 - 5
dist/replica/_plan9.db

@@ -20,7 +20,7 @@
 386/bin/9660srv - 775 sys sys 1144688906 104376
 386/bin/aan - 775 sys sys 1144688907 131393
 386/bin/acid - 775 sys sys 1144264731 401249
-386/bin/acme - 775 sys sys 1143777737 429841
+386/bin/acme - 775 sys sys 1147712341 432237
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1136656314 132873
 386/bin/ape/cc - 775 sys sys 1143777737 70737
@@ -552,7 +552,7 @@
 386/lib/libdisk.a - 664 sys sys 1143777861 42368
 386/lib/libdraw.a - 664 sys sys 1143777862 374146
 386/lib/libflate.a - 664 sys sys 1143777862 76726
-386/lib/libframe.a - 664 sys sys 1143777862 66118
+386/lib/libframe.a - 664 sys sys 1147712341 66398
 386/lib/libgeometry.a - 664 sys sys 1143777862 50470
 386/lib/libhtml.a - 664 sys sys 1143777863 229354
 386/lib/libhttpd.a - 664 sys sys 1143777863 99458
@@ -6005,7 +6005,7 @@ sys/include/draw.h - 664 sys sys 1108655526 16144
 sys/include/event.h - 664 sys sys 1014929063 1426
 sys/include/fcall.h - 664 sys sys 1137461445 3063
 sys/include/flate.h - 664 sys sys 1014929063 1245
-sys/include/frame.h - 664 sys sys 1014929063 2666
+sys/include/frame.h - 664 sys sys 1147706379 2682
 sys/include/geometry.h - 664 sys sys 1014929063 2632
 sys/include/html.h - 664 sys sys 1128662123 15232
 sys/include/httpd.h - 664 sys sys 1091904418 5771
@@ -15135,9 +15135,9 @@ sys/src/libflate/zlib.h - 664 sys sys 984709217 219
 sys/src/libframe - 20000000775 sys sys 944961726 0
 sys/src/libframe/frbox.c - 664 sys sys 1078466650 3028
 sys/src/libframe/frdelete.c - 664 sys sys 944961726 3079
-sys/src/libframe/frdraw.c - 664 sys sys 1136063243 3366
+sys/src/libframe/frdraw.c - 664 sys sys 1147706378 3447
 sys/src/libframe/frinit.c - 664 sys sys 1019498851 1761
-sys/src/libframe/frinsert.c - 664 sys sys 984709939 6700
+sys/src/libframe/frinsert.c - 664 sys sys 1147706378 6720
 sys/src/libframe/frptofchar.c - 664 sys sys 944961726 1995
 sys/src/libframe/frselect.c - 664 sys sys 1021580002 2623
 sys/src/libframe/frstr.c - 664 sys sys 944961726 646

+ 5 - 5
dist/replica/plan9.db

@@ -20,7 +20,7 @@
 386/bin/9660srv - 775 sys sys 1144688906 104376
 386/bin/aan - 775 sys sys 1144688907 131393
 386/bin/acid - 775 sys sys 1144264731 401249
-386/bin/acme - 775 sys sys 1143777737 429841
+386/bin/acme - 775 sys sys 1147712341 432237
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1136656314 132873
 386/bin/ape/cc - 775 sys sys 1143777737 70737
@@ -552,7 +552,7 @@
 386/lib/libdisk.a - 664 sys sys 1143777861 42368
 386/lib/libdraw.a - 664 sys sys 1143777862 374146
 386/lib/libflate.a - 664 sys sys 1143777862 76726
-386/lib/libframe.a - 664 sys sys 1143777862 66118
+386/lib/libframe.a - 664 sys sys 1147712341 66398
 386/lib/libgeometry.a - 664 sys sys 1143777862 50470
 386/lib/libhtml.a - 664 sys sys 1143777863 229354
 386/lib/libhttpd.a - 664 sys sys 1143777863 99458
@@ -6005,7 +6005,7 @@ sys/include/draw.h - 664 sys sys 1108655526 16144
 sys/include/event.h - 664 sys sys 1014929063 1426
 sys/include/fcall.h - 664 sys sys 1137461445 3063
 sys/include/flate.h - 664 sys sys 1014929063 1245
-sys/include/frame.h - 664 sys sys 1014929063 2666
+sys/include/frame.h - 664 sys sys 1147706379 2682
 sys/include/geometry.h - 664 sys sys 1014929063 2632
 sys/include/html.h - 664 sys sys 1128662123 15232
 sys/include/httpd.h - 664 sys sys 1091904418 5771
@@ -15135,9 +15135,9 @@ sys/src/libflate/zlib.h - 664 sys sys 984709217 219
 sys/src/libframe - 20000000775 sys sys 944961726 0
 sys/src/libframe/frbox.c - 664 sys sys 1078466650 3028
 sys/src/libframe/frdelete.c - 664 sys sys 944961726 3079
-sys/src/libframe/frdraw.c - 664 sys sys 1136063243 3366
+sys/src/libframe/frdraw.c - 664 sys sys 1147706378 3447
 sys/src/libframe/frinit.c - 664 sys sys 1019498851 1761
-sys/src/libframe/frinsert.c - 664 sys sys 984709939 6700
+sys/src/libframe/frinsert.c - 664 sys sys 1147706378 6720
 sys/src/libframe/frptofchar.c - 664 sys sys 944961726 1995
 sys/src/libframe/frselect.c - 664 sys sys 1021580002 2623
 sys/src/libframe/frstr.c - 664 sys sys 944961726 646

+ 5 - 0
dist/replica/plan9.log

@@ -29664,3 +29664,8 @@
 1147453245 0 c 386/bin/faces - 775 sys sys 1147453006 194589
 1147453245 1 c 386/bin/auth/cron - 775 sys sys 1147453006 144614
 1147532469 0 c sys/games/lib/fortunes - 664 sys sys 1147531044 259119
+1147707122 0 c sys/include/frame.h - 664 sys sys 1147706379 2682
+1147707122 1 c sys/src/libframe/frdraw.c - 664 sys sys 1147706378 3447
+1147707122 2 c sys/src/libframe/frinsert.c - 664 sys sys 1147706378 6720
+1147712524 0 c 386/bin/acme - 775 sys sys 1147712341 432237
+1147712524 1 c 386/lib/libframe.a - 664 sys sys 1147712341 66398

+ 1 - 1
sys/include/frame.h

@@ -80,7 +80,7 @@ void	_fradvance(Frame*, Point*, Frbox*);
 int	_frnewwid(Frame*, Point, Frbox*);
 int	_frnewwid0(Frame*, Point, Frbox*);
 void	_frclean(Frame*, Point, int, int);
-void	_frredraw(Frame*, Point);
+void	_frredraw(Frame*, Point, Image*, Image*);
 void	_fraddbox(Frame*, int, int);
 Point	_frptofcharptb(Frame*, ulong, Point, int);
 Point	_frptofcharnb(Frame*, ulong, int);

+ 4 - 3
sys/src/libframe/frdraw.c

@@ -6,7 +6,7 @@
 #include <frame.h>
 
 void
-_frredraw(Frame *f, Point pt)
+_frredraw(Frame *f, Point pt, Image *text, Image *back)
 {
 	Frbox *b;
 	int nb;
@@ -15,7 +15,7 @@ _frredraw(Frame *f, Point pt)
 	for(nb=0,b=f->box; nb<f->nbox; nb++, b++){
 		_frcklinewrap(f, &pt, b);
 		if(b->nrune >= 0){
-			string(f->b, pt, f->cols[TEXT], ZP, f->font, (char *)b->ptr);
+			stringbg(f->b, pt, text, ZP, f->font, (char *)b->ptr, back, ZP);
 		}
 		pt.x += b->wid;
 	}
@@ -78,6 +78,7 @@ frdrawsel0(Frame *f, Point pt, ulong p0, ulong p1, Image *back, Image *text)
 		if(p >= p0){
 			qt = pt;
 			_frcklinewrap(f, &pt, b);
+			// fill in the end of a wrapped line
 			if(pt.y > qt.y)
 				draw(f->b, Rect(qt.x, qt.y, f->r.max.x, pt.y), back, nil, qt);
 		}
@@ -101,7 +102,7 @@ frdrawsel0(Frame *f, Point pt, ulong p0, ulong p1, Image *back, Image *text)
 			x = f->r.max.x;
 		draw(f->b, Rect(pt.x, pt.y, x, pt.y+f->font->height), back, nil, pt);
 		if(b->nrune >= 0)
-			stringn(f->b, pt, text, ZP, f->font, ptr, nr);
+			stringnbg(f->b, pt, text, ZP, f->font, ptr, nr, back, ZP);
 		pt.x += w;
 	    Continue:
 		b++;

+ 1 - 1
sys/src/libframe/frinsert.c

@@ -262,7 +262,7 @@ frinsert(Frame *f, Rune *sp, Rune *ep, ulong p0)
 	else
 		col = f->cols[BACK];
 	frselectpaint(f, ppt0, ppt1, col);
-	_frredraw(&frame, ppt0);
+	_frredraw(&frame, ppt0, f->cols[TEXT], col);
 	_fraddbox(f, nn0, frame.nbox);
 	for(n=0; n<frame.nbox; n++)
 		f->box[nn0+n] = frame.box[n];