diff options
| author | Karoly Lorentey | 2006-02-12 00:15:44 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-02-12 00:15:44 +0000 |
| commit | 1913a2b35da45eeeb71ef851975be7d57c11de78 (patch) | |
| tree | 6cd59883fb931999da5b62c03b321ade6f77e66e /src/term.c | |
| parent | a5805c9d0240fab504f2a3e32db6449392005fb6 (diff) | |
| parent | a528b71e55b2b244a5dd35318713ccb20398cbbf (diff) | |
| download | emacs-1913a2b35da45eeeb71ef851975be7d57c11de78.tar.gz emacs-1913a2b35da45eeeb71ef851975be7d57c11de78.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-49
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-50
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-51
Make constrain-to-field notice overlays
* emacs@sv.gnu.org/emacs--devo--0--patch-52
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-53
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-54
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-55
Merge from erc--emacs--0
* emacs@sv.gnu.org/emacs--devo--0--patch-56
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-57
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-58
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-59
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-60
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-61
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-62
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-63
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-64
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-65
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-66
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-67
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-68
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-69
rcirc: Add flexible response formatting; Add nick abbrevs
* emacs@sv.gnu.org/emacs--devo--0--patch-70
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-71
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-72
Update from CVS: man/dired.texi (Tumme): More tumme documentation.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-18
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-19
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-20
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-21
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-22
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-23
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-24
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-25
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-26
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-27
Update from CVS: lisp/gnus.el: Remove bogus comment.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-28
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-29
Add sendmail.el and smptmail.el from Emacs tree to contrib/
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-508
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/src/term.c b/src/term.c index 899739de6ae..b1183ed9e2a 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Terminal control module for terminals described by TERMCAP | 1 | /* Terminal control module for terminals described by TERMCAP |
| 2 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001, | 2 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001, |
| 3 | 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1328,10 +1328,10 @@ static void produce_stretch_glyph P_ ((struct it *)); | |||
| 1328 | 1328 | ||
| 1329 | 1329 | ||
| 1330 | /* Append glyphs to IT's glyph_row. Called from produce_glyphs for | 1330 | /* Append glyphs to IT's glyph_row. Called from produce_glyphs for |
| 1331 | terminal frames if IT->glyph_row != NULL. IT->c is the character | 1331 | terminal frames if IT->glyph_row != NULL. IT->char_to_display is |
| 1332 | for which to produce glyphs; IT->face_id contains the character's | 1332 | the character for which to produce glyphs; IT->face_id contains the |
| 1333 | face. Padding glyphs are appended if IT->c has a IT->pixel_width > | 1333 | character's face. Padding glyphs are appended if IT->c has a |
| 1334 | 1. */ | 1334 | IT->pixel_width > 1. */ |
| 1335 | 1335 | ||
| 1336 | static void | 1336 | static void |
| 1337 | append_glyph (it) | 1337 | append_glyph (it) |
| @@ -1351,7 +1351,7 @@ append_glyph (it) | |||
| 1351 | { | 1351 | { |
| 1352 | glyph->type = CHAR_GLYPH; | 1352 | glyph->type = CHAR_GLYPH; |
| 1353 | glyph->pixel_width = 1; | 1353 | glyph->pixel_width = 1; |
| 1354 | glyph->u.ch = it->c; | 1354 | glyph->u.ch = it->char_to_display; |
| 1355 | glyph->face_id = it->face_id; | 1355 | glyph->face_id = it->face_id; |
| 1356 | glyph->padding_p = i > 0; | 1356 | glyph->padding_p = i > 0; |
| 1357 | glyph->charpos = CHARPOS (it->position); | 1357 | glyph->charpos = CHARPOS (it->position); |
| @@ -1402,6 +1402,9 @@ produce_glyphs (it) | |||
| 1402 | xassert (it->what == IT_CHARACTER | 1402 | xassert (it->what == IT_CHARACTER |
| 1403 | || it->what == IT_COMPOSITION); | 1403 | || it->what == IT_COMPOSITION); |
| 1404 | 1404 | ||
| 1405 | /* Maybe translate single-byte characters to multibyte. */ | ||
| 1406 | it->char_to_display = it->c; | ||
| 1407 | |||
| 1405 | if (it->c >= 040 && it->c < 0177) | 1408 | if (it->c >= 040 && it->c < 0177) |
| 1406 | { | 1409 | { |
| 1407 | it->pixel_width = it->nglyphs = 1; | 1410 | it->pixel_width = it->nglyphs = 1; |
| @@ -1431,13 +1434,11 @@ produce_glyphs (it) | |||
| 1431 | { | 1434 | { |
| 1432 | int n = nspaces; | 1435 | int n = nspaces; |
| 1433 | 1436 | ||
| 1434 | it->c = ' '; | 1437 | it->char_to_display = ' '; |
| 1435 | it->pixel_width = it->len = 1; | 1438 | it->pixel_width = it->len = 1; |
| 1436 | 1439 | ||
| 1437 | while (n--) | 1440 | while (n--) |
| 1438 | append_glyph (it); | 1441 | append_glyph (it); |
| 1439 | |||
| 1440 | it->c = '\t'; | ||
| 1441 | } | 1442 | } |
| 1442 | 1443 | ||
| 1443 | it->pixel_width = nspaces; | 1444 | it->pixel_width = nspaces; |
| @@ -1445,14 +1446,30 @@ produce_glyphs (it) | |||
| 1445 | } | 1446 | } |
| 1446 | else if (SINGLE_BYTE_CHAR_P (it->c)) | 1447 | else if (SINGLE_BYTE_CHAR_P (it->c)) |
| 1447 | { | 1448 | { |
| 1448 | /* Coming here means that it->c is from display table, thus we | 1449 | if (unibyte_display_via_language_environment |
| 1449 | must send the code as is to the terminal. Although there's | 1450 | && (it->c >= 0240 |
| 1450 | no way to know how many columns it occupies on a screen, it | 1451 | || !NILP (Vnonascii_translation_table))) |
| 1451 | is a good assumption that a single byte code has 1-column | 1452 | { |
| 1452 | width. */ | 1453 | int charset; |
| 1453 | it->pixel_width = it->nglyphs = 1; | 1454 | |
| 1454 | if (it->glyph_row) | 1455 | it->char_to_display = unibyte_char_to_multibyte (it->c); |
| 1455 | append_glyph (it); | 1456 | charset = CHAR_CHARSET (it->char_to_display); |
| 1457 | it->pixel_width = CHARSET_WIDTH (charset); | ||
| 1458 | it->nglyphs = it->pixel_width; | ||
| 1459 | if (it->glyph_row) | ||
| 1460 | append_glyph (it); | ||
| 1461 | } | ||
| 1462 | else | ||
| 1463 | { | ||
| 1464 | /* Coming here means that it->c is from display table, thus we | ||
| 1465 | must send the code as is to the terminal. Although there's | ||
| 1466 | no way to know how many columns it occupies on a screen, it | ||
| 1467 | is a good assumption that a single byte code has 1-column | ||
| 1468 | width. */ | ||
| 1469 | it->pixel_width = it->nglyphs = 1; | ||
| 1470 | if (it->glyph_row) | ||
| 1471 | append_glyph (it); | ||
| 1472 | } | ||
| 1456 | } | 1473 | } |
| 1457 | else | 1474 | else |
| 1458 | { | 1475 | { |
| @@ -1537,17 +1554,15 @@ produce_stretch_glyph (it) | |||
| 1537 | Lisp_Object o_object = it->object; | 1554 | Lisp_Object o_object = it->object; |
| 1538 | Lisp_Object object = it->stack[it->sp - 1].string; | 1555 | Lisp_Object object = it->stack[it->sp - 1].string; |
| 1539 | int n = width; | 1556 | int n = width; |
| 1540 | int c = it->c; | ||
| 1541 | 1557 | ||
| 1542 | if (!STRINGP (object)) | 1558 | if (!STRINGP (object)) |
| 1543 | object = it->w->buffer; | 1559 | object = it->w->buffer; |
| 1544 | it->object = object; | 1560 | it->object = object; |
| 1545 | it->c = ' '; | 1561 | it->char_to_display = ' '; |
| 1546 | it->pixel_width = it->len = 1; | 1562 | it->pixel_width = it->len = 1; |
| 1547 | while (n--) | 1563 | while (n--) |
| 1548 | append_glyph (it); | 1564 | append_glyph (it); |
| 1549 | it->object = o_object; | 1565 | it->object = o_object; |
| 1550 | it->c = c; | ||
| 1551 | } | 1566 | } |
| 1552 | it->pixel_width = width; | 1567 | it->pixel_width = width; |
| 1553 | it->nglyphs = width; | 1568 | it->nglyphs = width; |