\f
int
-char_string_with_unification (c, p, advanced)
+char_string_with_unification (c, p)
int c;
- unsigned char *p, **advanced;
+ unsigned char *p;
{
int bytes;
p[4] = (0x80 | (c & 0x3F));
bytes = 5;
}
- if (advanced)
- *advanced = p + bytes;
+
return bytes;
}
unsigned char *p, **advanced;
int *len;
{
- int c, unified;
+ int c;
unsigned char *saved_p = p;
if (*p < 0x80 || ! (*p & 0x20) || ! (*p & 0x10))
return make_number (width);
}
-/* Return width of string STR of length LEN when displayed in the
- current buffer. The width is measured by how many columns it
- occupies on the screen. */
-
-int
-strwidth (str, len)
- unsigned char *str;
- int len;
-{
- return c_string_width (str, len, -1, NULL, NULL);
-}
-
/* Return width of string STR of length LEN when displayed in the
current buffer. The width is measured by how many columns it
occupies on the screen. If PRECISION > 0, return the width of
characters and bytes of the substring in *NCHARS and *NBYTES
respectively. */
+int
c_string_width (str, len, precision, nchars, nbytes)
unsigned char *str;
int precision, *nchars, *nbytes;
return width;
}
+/* Return width of string STR of length LEN when displayed in the
+ current buffer. The width is measured by how many columns it
+ occupies on the screen. */
+
+int
+strwidth (str, len)
+ unsigned char *str;
+ int len;
+{
+ return c_string_width (str, len, -1, NULL, NULL);
+}
+
/* Return width of Lisp string STRING when displayed in the current
buffer. The width is measured by how many columns it occupies on
the screen while paying attention to compositions. If PRECISION >
int precision, *nchars, *nbytes;
{
int len = XSTRING (string)->size;
- int len_byte = STRING_BYTES (XSTRING (string));
unsigned char *str = XSTRING (string)->data;
int i = 0, i_byte = 0;
int width = 0;
Lisp_Object string;
{
int multibyte = STRING_MULTIBYTE (string);
- int nchars = XSTRING (string)->size;
int nbytes = STRING_BYTES (XSTRING (string));
unsigned char *p = XSTRING (string)->data;
unsigned char *pend = p + nbytes;
{
c = STRING_CHAR_ADVANCE (src);
c = CHAR_TO_BYTE8 (c);
- sprintf (dst, "\\%03o", c);
+ sprintf ((char *) dst, "\\%03o", c);
dst += 4;
}
else
c = *src++;
if (c >= 0x80)
{
- sprintf (dst, "\\%03o", c);
+ sprintf ((char *) dst, "\\%03o", c);
dst += 4;
}
else