[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs shell.c tty.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs shell.c tty.c |
Date: |
Mon, 14 Apr 2008 00:42:32 +0000 |
CVSROOT: /cvsroot/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 08/04/14 00:42:32
Modified files:
. : shell.c tty.c
Log message:
further kludges for linedraw in cygwin
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/shell.c?cvsroot=qemacs&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.46&r2=1.47
Patches:
Index: shell.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/shell.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- shell.c 13 Apr 2008 23:03:20 -0000 1.58
+++ shell.c 14 Apr 2008 00:42:32 -0000 1.59
@@ -519,10 +519,12 @@
break;
case 6: /* SCO light background */
case 8: /* enter_secure_mode */
+ case 9: /* cygwin dim mode */
case 10: /* SCO acs off */
- case 11: /* SCO acs on */
+ case 11: /* SCO acs on (CP437) */
case 12: /* SCO acs on, |0x80 */
case 28: /* exit_secure_mode */
+ break;
case 39: /* orig_pair(1) default-foreground */
TTY_SET_FG_COLOR(s->color, TTY_DEFFG);
break;
@@ -763,8 +765,24 @@
int c1, cur_len, len;
/* CG: assuming ISO-8859-1 characters */
/* CG: horrible kludge for alternate charset support */
- if (s->shifted && c >= 96 && c < 128)
+ if (s->shifted && c >= 96 && c < 128) {
+#if 0
+ /* Should actually use these tables: */
+ static const wchar_t unitab_xterm_std[32] = {
+ 0x2666, 0x2592, 0x2409, 0x240c,
+ 0x240d, 0x240a, 0x00b0, 0x00b1,
+ 0x2424, 0x240b, 0x2518, 0x2510,
+ 0x250c, 0x2514, 0x253c, 0x23ba,
+ 0x23bb, 0x2500, 0x23bc, 0x23bd,
+ 0x251c, 0x2524, 0x2534, 0x252c,
+ 0x2502, 0x2264, 0x2265, 0x03c0,
+ 0x2260, 0x00a3, 0x00b7, 0x0020
+ };
+ static const wchar_t unitab_xterm_poorman[32] =
+ "*#****o~**+++++-----++++|****L. ";
+#endif
c += 32;
+ }
/* write char (should factorize with do_char() code */
len = unicode_to_charset(buf1, c, s->b->charset);
c1 = eb_nextc(s->b, s->cur_offset, &offset);
Index: tty.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/tty.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- tty.c 13 Apr 2008 23:44:39 -0000 1.46
+++ tty.c 14 Apr 2008 00:42:32 -0000 1.47
@@ -1023,7 +1023,11 @@
TTYChar *ptr, *ptr1, *ptr2, *ptr3, *ptr4, cc, blankcc;
int y, shadow, ch, bgcolor, fgcolor, shifted;
- TTY_FPRINTF(s->STDOUT, "\033[H\033[0m\033(B");
+ TTY_FPUTS("\033[H\033[0m", s->STDOUT);
+
+ if (ts->term_code != TERM_CYGWIN) {
+ TTY_FPUTS("\033(B\033)0", s->STDOUT);
+ }
bgcolor = -1;
fgcolor = -1;
@@ -1178,12 +1182,19 @@
TTY_PUTC(ch, s->STDOUT);
} else
if (ch < 128 + 32) {
- /* Kludge for linedrawing chars */
+ /* Kludges for linedrawing chars */
+ if (ts->term_code == TERM_CYGWIN) {
+ static const char unitab_xterm_poorman[32] =
+ "*#****o~**+++++-----++++|****L. ";
+ TTY_PUTC(unitab_xterm_poorman[ch - 128],
+ s->STDOUT);
+ } else {
if (!shifted) {
TTY_FPUTS("\033(0", s->STDOUT);
shifted = 1;
}
TTY_PUTC(ch - 32, s->STDOUT);
+ }
} else {
u8 buf[10], *q;
int nc;