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

Diff of /emacs/src/charset.c

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

revision 1.131 by raeburn, Mon Jul 15 00:00:35 2002 UTC revision 1.132 by raeburn, Tue Jul 16 19:47:56 2002 UTC
# Line 802  CHARSET should be defined by `defined-ch Line 802  CHARSET should be defined by `defined-ch
802    
803  int  int
804  find_charset_in_text (ptr, nchars, nbytes, charsets, table)  find_charset_in_text (ptr, nchars, nbytes, charsets, table)
805       unsigned char *ptr;       const unsigned char *ptr;
806       int nchars, nbytes, *charsets;       int nchars, nbytes, *charsets;
807       Lisp_Object table;       Lisp_Object table;
808  {  {
# Line 810  find_charset_in_text (ptr, nchars, nbyte Line 810  find_charset_in_text (ptr, nchars, nbyte
810      {      {
811        if (charsets && nbytes > 0)        if (charsets && nbytes > 0)
812          {          {
813            unsigned char *endp = ptr + nbytes;            const unsigned char *endp = ptr + nbytes;
814            int maskbits = 0;            int maskbits = 0;
815    
816            while (ptr < endp && maskbits != 7)            while (ptr < endp && maskbits != 7)
# Line 1271  strwidth (str, len) Line 1271  strwidth (str, len)
1271    
1272  int  int
1273  c_string_width (str, len, precision, nchars, nbytes)  c_string_width (str, len, precision, nchars, nbytes)
1274       unsigned char *str;       const unsigned char *str;
1275       int precision, *nchars, *nbytes;       int precision, *nchars, *nbytes;
1276  {  {
1277    int i = 0, i_byte = 0;    int i = 0, i_byte = 0;
# Line 1337  lisp_string_width (string, precision, nc Line 1337  lisp_string_width (string, precision, nc
1337  {  {
1338    int len = SCHARS (string);    int len = SCHARS (string);
1339    int len_byte = SBYTES (string);    int len_byte = SBYTES (string);
1340    unsigned char *str = SDATA (string);    const unsigned char *str = SDATA (string);
1341    int i = 0, i_byte = 0;    int i = 0, i_byte = 0;
1342    int width = 0;    int width = 0;
1343    struct Lisp_Char_Table *dp = buffer_display_table ();    struct Lisp_Char_Table *dp = buffer_display_table ();
# Line 1451  DEFUN ("chars-in-region", Fchars_in_regi Line 1451  DEFUN ("chars-in-region", Fchars_in_regi
1451    
1452  int  int
1453  chars_in_text (ptr, nbytes)  chars_in_text (ptr, nbytes)
1454       unsigned char *ptr;       const unsigned char *ptr;
1455       int nbytes;       int nbytes;
1456  {  {
1457    /* current_buffer is null at early stages of Emacs initialization.  */    /* current_buffer is null at early stages of Emacs initialization.  */
# Line 1468  chars_in_text (ptr, nbytes) Line 1468  chars_in_text (ptr, nbytes)
1468    
1469  int  int
1470  multibyte_chars_in_text (ptr, nbytes)  multibyte_chars_in_text (ptr, nbytes)
1471       unsigned char *ptr;       const unsigned char *ptr;
1472       int nbytes;       int nbytes;
1473  {  {
1474    unsigned char *endp;    const unsigned char *endp;
1475    int chars, bytes;    int chars, bytes;
1476    
1477    endp = ptr + nbytes;    endp = ptr + nbytes;
# Line 1493  multibyte_chars_in_text (ptr, nbytes) Line 1493  multibyte_chars_in_text (ptr, nbytes)
1493     0x80..0x9F are represented by 2 bytes in multibyte text.  */     0x80..0x9F are represented by 2 bytes in multibyte text.  */
1494  void  void
1495  parse_str_as_multibyte (str, len, nchars, nbytes)  parse_str_as_multibyte (str, len, nchars, nbytes)
1496       unsigned char *str;       const unsigned char *str;
1497       int len, *nchars, *nbytes;       int len, *nchars, *nbytes;
1498  {  {
1499    unsigned char *endp = str + len;    const unsigned char *endp = str + len;
1500    int n, chars = 0, bytes = 0;    int n, chars = 0, bytes = 0;
1501    
1502    while (str < endp)    while (str < endp)

Legend:
Removed from v.1.131  
changed lines
  Added in v.1.132

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