/[emacs]/emacs/src/character.c
ViewVC logotype

Diff of /emacs/src/character.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.10 by fx, Tue Jul 30 11:32:52 2002 UTC revision 1.1.2.11 by handa, Wed Jul 31 07:06:36 2002 UTC
# Line 247  the current primary charset (value of `c Line 247  the current primary charset (value of `c
247    charset = CHARSET_FROM_ID (charset_primary);    charset = CHARSET_FROM_ID (charset_primary);
248    c = DECODE_CHAR (charset, c);    c = DECODE_CHAR (charset, c);
249    if (c < 0)    if (c < 0)
250      error ("Can't convert to multibyte character: %d", XINT (ch));      c = BYTE8_TO_CHAR (XFASTINT (ch));
251    return make_number (c);    return make_number (c);
252  }  }
253    
# Line 260  the current primary charset (value of `c Line 260  the current primary charset (value of `c
260       Lisp_Object ch;       Lisp_Object ch;
261  {  {
262    int c;    int c;
   unsigned code;  
263    struct charset *charset;    struct charset *charset;
264    
265    CHECK_CHARACTER (ch);    CHECK_CHARACTER (ch);
266    c = XFASTINT (ch);    c = XFASTINT (ch);
267    charset = CHARSET_FROM_ID (charset_primary);    c = CHAR_TO_BYTE8 (c);
268    code = ENCODE_CHAR (charset, c);    return make_number (c);
   if (code < CHARSET_MIN_CODE (charset)  
       || code > CHARSET_MAX_CODE (charset))  
     error ("Can't convert to unibyte character: %d", XINT (ch));  
   return make_number (code);  
269  }  }
270    
271  DEFUN ("char-bytes", Fchar_bytes, Schar_bytes, 1, 1, 0,  DEFUN ("char-bytes", Fchar_bytes, Schar_bytes, 1, 1, 0,

Legend:
Removed from v.1.1.2.10  
changed lines
  Added in v.1.1.2.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26