Mercurial > emacs
diff src/charset.c @ 46370:40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Mon, 15 Jul 2002 00:00:41 +0000 |
parents | 7042e479b30f |
children | 876356a4a4ca |
line wrap: on
line diff
--- a/src/charset.c Sun Jul 14 23:54:05 2002 +0000 +++ b/src/charset.c Mon Jul 15 00:00:41 2002 +0000 @@ -700,14 +700,14 @@ || !STRINGP (vec[7]) || !STRINGP (vec[8])) error ("Invalid info-vector argument for defining charset %s", - XSTRING (SYMBOL_NAME (charset_symbol))->data); + SDATA (SYMBOL_NAME (charset_symbol))); if (NILP (charset_id)) { charset_id = get_new_private_charset_id (XINT (vec[0]), XINT (vec[2])); if (XINT (charset_id) == 0) error ("There's no room for a new private charset %s", - XSTRING (SYMBOL_NAME (charset_symbol))->data); + SDATA (SYMBOL_NAME (charset_symbol))); } update_charset_table (charset_id, vec[0], vec[1], vec[2], vec[3], @@ -779,7 +779,7 @@ if (XINT (final_char) < '0' || XFASTINT (final_char) > '~') error ("Invalid FINAL-CHAR %c, it should be `0'..`~'", XINT (chars)); if ((charset = get_charset_id (charset_symbol)) < 0) - error ("Invalid charset %s", XSTRING (SYMBOL_NAME (charset_symbol))->data); + error ("Invalid charset %s", SDATA (SYMBOL_NAME (charset_symbol))); ISO_CHARSET_TABLE (dimension, chars, final_char) = charset; return Qnil; @@ -943,8 +943,8 @@ CHECK_STRING (str); bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); - find_charset_in_text (XSTRING (str)->data, XSTRING (str)->size, - STRING_BYTES (XSTRING (str)), charsets, table); + find_charset_in_text (SDATA (str), SCHARS (str), + SBYTES (str), charsets, table); val = Qnil; if (charsets[1]) @@ -1335,9 +1335,9 @@ Lisp_Object string; int precision, *nchars, *nbytes; { - int len = XSTRING (string)->size; - int len_byte = STRING_BYTES (XSTRING (string)); - unsigned char *str = XSTRING (string)->data; + int len = SCHARS (string); + int len_byte = SBYTES (string); + unsigned char *str = SDATA (string); int i = 0, i_byte = 0; int width = 0; struct Lisp_Char_Table *dp = buffer_display_table ();