emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102451: Use \uNNNN, \UNNNNNN, or \xN


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102451: Use \uNNNN, \UNNNNNN, or \xNNNNNN for hex-code display on a TTY.
Date: Sat, 20 Nov 2010 17:04:50 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102451
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2010-11-20 17:04:50 +0200
message:
  Use \uNNNN, \UNNNNNN, or \xNNNNNN for hex-code display on a TTY.
  
   term.c (produce_glyphless_glyph): Use \uNNNN, \UNNNNNN, or
   \xNNNNNN for hex-code display of glyphless characters.
modified:
  src/ChangeLog
  src/term.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-11-20 14:51:25 +0000
+++ b/src/ChangeLog     2010-11-20 15:04:50 +0000
@@ -1,3 +1,8 @@
+2010-11-20  Eli Zaretskii  <address@hidden>
+
+       * term.c (produce_glyphless_glyph): Use \uNNNN, \UNNNNNN, or
+       \xNNNNNN for hex-code display of glyphless characters.
+
 2010-11-20  Jan Djärv  <address@hidden>
 
        * gtkutil.c (xg_make_tool_item): Take vert_only as argument.

=== modified file 'src/term.c'
--- a/src/term.c        2010-11-15 06:10:35 +0000
+++ b/src/term.c        2010-11-20 15:04:50 +0000
@@ -1936,7 +1936,7 @@
 {
   int face_id;
   int len;
-  char buf[11], *str = "    ";
+  char buf[9], *str = "    ";
 
   /* Get a face ID for the glyph by utilizing a cache (the same way as
      done for `escape-glyph' in get_next_display_element).  */
@@ -1987,10 +1987,9 @@
       else
        {
          xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
-         len = (it->c < 0x100 ? sprintf (buf, "[U+%02X]", it->c)
-                : it->c < 0x10000 ? sprintf (buf, "[U+%04X]", it->c)
-                : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "[U+%06X]", it->c)
-                : sprintf (buf, "[E+%06X]", it->c));
+         len = (it->c < 0x10000 ? sprintf (buf, "\\u%04X", it->c)
+                : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "\\U%06X", it->c)
+                : sprintf (buf, "\\x%06X", it->c));
        }
       str = buf;
     }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]