Enlightenment CVS committal
Author : mej
Project : eterm
Module : Eterm
Dir : eterm/Eterm/src
Modified Files:
screen.c screen.h term.c
Log Message:
Mon Jan 19 21:02:30 2004 Michael Jennings (mej)
Patch from David Lloyd <[EMAIL PROTECTED]> for overstrike support.
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- screen.c 26 Aug 2003 01:45:10 -0000 1.76
+++ screen.c 20 Jan 2004 02:04:04 -0000 1.77
@@ -3,7 +3,7 @@
*
*/
-static const char cvs_ident[] = "$Id: screen.c,v 1.76 2003/08/26 01:45:10 mej Exp $";
+static const char cvs_ident[] = "$Id: screen.c,v 1.77 2004/01/20 02:04:04 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -757,7 +757,7 @@
if (screen.row == screen.bscroll) {
scroll_text(screen.tscroll, screen.bscroll, 1, 0);
j = screen.bscroll + TermWin.saveLines;
- blank_screen_mem(screen.text, screen.rend, j, rstyle &
~RS_Uline);
+ blank_screen_mem(screen.text, screen.rend, j, rstyle &
~(RS_Uline|RS_Overscore));
} else if (screen.row < (TERM_WINDOW_GET_REPORTED_ROWS() - 1)) {
screen.row++;
row = screen.row + TermWin.saveLines;
@@ -786,7 +786,7 @@
j = screen.bscroll + TermWin.saveLines;
/* blank_line(screen.text[j], screen.rend[j], TermWin.ncol,
rstyle); Bug fix from John Ellison - need to reset rstyle */
- blank_screen_mem(screen.text, screen.rend, j, rstyle & ~RS_Uline);
+ blank_screen_mem(screen.text, screen.rend, j, rstyle &
~(RS_Uline|RS_Overscore));
} else if (screen.row < (TERM_WINDOW_GET_REPORTED_ROWS() - 1)) {
screen.row++;
row = screen.row + TermWin.saveLines;
@@ -1004,9 +1004,9 @@
default:
return;
}
- blank_line(&(screen.text[row][col]), &(screen.rend[row][col]), num, rstyle &
~RS_Uline);
+ blank_line(&(screen.text[row][col]), &(screen.rend[row][col]), num, rstyle &
~(RS_Uline|RS_Overscore));
} else {
- blank_screen_mem(screen.text, screen.rend, row, rstyle & ~RS_Uline);
+ blank_screen_mem(screen.text, screen.rend, row, rstyle &
~(RS_Uline|RS_Overscore));
}
}
@@ -1059,7 +1059,7 @@
}
if (row >= 0 && row <= TERM_WINDOW_GET_REPORTED_ROWS()) { /* check OOB */
UPPER_BOUND(num, (TERM_WINDOW_GET_REPORTED_ROWS() - row));
- if (rstyle & RS_RVid || rstyle & RS_Uline)
+ if (rstyle & RS_RVid || rstyle & RS_Uline || rstyle & RS_Overscore)
ren = -1;
else {
if (GET_BGCOLOR(rstyle) == bgColor) {
@@ -1076,7 +1076,7 @@
}
}
for (; num--; row++) {
- blank_screen_mem(screen.text, screen.rend, row + row_offset, rstyle &
~(RS_RVid | RS_Uline));
+ blank_screen_mem(screen.text, screen.rend, row + row_offset, rstyle &
~(RS_RVid | RS_Uline | RS_Overscore));
blank_screen_mem(drawn_text, drawn_rend, row, ren);
}
}
@@ -2059,6 +2059,15 @@
UPDATE_BOX(xpixel, ypixel - 1, xpixel + Width2Pixel(wlen) - 1,
ypixel - 1);
}
}
+ if (rend & RS_Overscore) {
+ if (ascent > 1) {
+ XDrawLine(Xdisplay, draw_buffer, TermWin.gc, xpixel, ypixel -
ascent, xpixel + Width2Pixel(wlen) - 1, ypixel - ascent);
+ UPDATE_BOX(xpixel, ypixel + 1, xpixel + Width2Pixel(wlen) - 1,
ypixel + 1);
+ } else {
+ XDrawLine(Xdisplay, draw_buffer, TermWin.gc, xpixel, ypixel - 1,
xpixel + Width2Pixel(wlen) - 1, ypixel - 1);
+ UPDATE_BOX(xpixel, ypixel - 1, xpixel + Width2Pixel(wlen) - 1,
ypixel - 1);
+ }
+ }
if (is_cursor == 1) {
#ifndef NO_CURSORCOLOR
if (PixColors[cursorColor] != PixColors[bgColor]) {
@@ -3338,6 +3347,14 @@
fprintf(stderr, "blink ");
if (rstyle & RS_Uline)
fprintf(stderr, "uline ");
+ if (rstyle & RS_Overscore)
+ fprintf(stderr, "overscore ");
+ if (rstyle & RS_Italic)
+ fprintf(stderr, "italic ");
+ if (rstyle & RS_Dim)
+ fprintf(stderr, "dim ");
+ if (rstyle & RS_Conceal)
+ fprintf(stderr, "conceal ");
fprintf(stderr, "): ");
color = GET_FGCOLOR(rstyle);
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/screen.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- screen.h 26 Aug 2003 01:45:11 -0000 1.29
+++ screen.h 20 Jan 2004 02:04:04 -0000 1.30
@@ -115,11 +115,15 @@
#define RS_multiMask (RS_multi0|RS_multi1) /* multibyte mask */
#endif
#define RS_fgMask 0x00001F00u /* 32 colors */
+#define RS_Overscore 0x00002000u /* overscore */
+#define RS_Italic 0x00004000u /* italic */
#define RS_Bold 0x00008000u /* bold */
#define RS_bgMask 0x001F0000u /* 32 colors */
+#define RS_Dim 0x00200000u /* dim (apply alpha) */
+#define RS_Conceal 0x00400000u /* conceal */
#define RS_Blink 0x00800000u /* blink */
-#define RS_attrMask (0xFF000000u|RS_Bold|RS_Blink)
+#define RS_attrMask
(0xFF000000u|RS_Overscore|RS_Italic|RS_Bold|RS_Dim|RS_Conceal|RS_Blink)
/* how to build & extract colors and attributes */
#define GET_FGCOLOR(r) (((r) & RS_fgMask)>>8)
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/term.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -3 -r1.100 -r1.101
--- term.c 11 Jan 2004 22:10:29 -0000 1.100
+++ term.c 20 Jan 2004 02:04:04 -0000 1.101
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-static const char cvs_ident[] = "$Id: term.c,v 1.100 2004/01/11 22:10:29 mej Exp $";
+static const char cvs_ident[] = "$Id: term.c,v 1.101 2004/01/20 02:04:04 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -1597,23 +1597,37 @@
case 1:
scr_rendition(1, RS_Bold);
break;
+ case 2:
+ scr_rendition(1, RS_Dim);
+ break;
+ case 3:
+ scr_rendition(1, RS_Italic);
+ break;
case 4:
scr_rendition(1, RS_Uline);
break;
case 5:
scr_rendition(1, RS_Blink);
break;
+ case 6:
+ scr_rendition(1, RS_Overscore);
+ break;
case 7:
scr_rendition(1, RS_RVid);
break;
+ case 8:
+ scr_rendition(1, RS_Conceal);
+ break;
case 22:
scr_rendition(0, RS_Bold);
+ scr_rendition(0, RS_Dim);
break;
case 24:
scr_rendition(0, RS_Uline);
break;
case 25:
scr_rendition(0, RS_Blink);
+ scr_rendition(0, RS_Overscore);
break;
case 27:
scr_rendition(0, RS_RVid);
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs