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

Diff of /emacs/src/syntax.c

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

revision 1.152 by monnier, Mon Nov 26 23:37:01 2001 UTC revision 1.153 by raeburn, Mon Jul 15 00:00:37 2002 UTC
# Line 908  text property.  */) Line 908  text property.  */)
908    
909    CHECK_STRING (string);    CHECK_STRING (string);
910    
911    p = XSTRING (string)->data;    p = SDATA (string);
912    code = (enum syntaxcode) syntax_spec_code[*p++];    code = (enum syntaxcode) syntax_spec_code[*p++];
913    if (((int) code & 0377) == 0377)    if (((int) code & 0377) == 0377)
914      error ("invalid syntax description letter: %c", p[-1]);      error ("invalid syntax description letter: %c", p[-1]);
# Line 920  text property.  */) Line 920  text property.  */)
920      {      {
921        int len;        int len;
922        int character = (STRING_CHAR_AND_LENGTH        int character = (STRING_CHAR_AND_LENGTH
923                         (p, STRING_BYTES (XSTRING (string)) - 1, len));                         (p, SBYTES (string) - 1, len));
924        XSETINT (match, character);        XSETINT (match, character);
925        if (XFASTINT (match) == ' ')        if (XFASTINT (match) == ' ')
926          match = Qnil;          match = Qnil;
# Line 1369  skip_chars (forwardp, syntaxp, string, l Line 1369  skip_chars (forwardp, syntaxp, string, l
1369    int len;    int len;
1370    
1371    CHECK_STRING (string);    CHECK_STRING (string);
1372    char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2);    char_ranges = (int *) alloca (SCHARS (string) * (sizeof (int)) * 2);
1373    string_multibyte = STRING_MULTIBYTE (string);    string_multibyte = STRING_MULTIBYTE (string);
1374    str = XSTRING (string)->data;    str = SDATA (string);
1375    size_byte = STRING_BYTES (XSTRING (string));    size_byte = SBYTES (string);
1376    
1377    /* Adjust the multibyteness of the string to that of the buffer.  */    /* Adjust the multibyteness of the string to that of the buffer.  */
1378    if (multibyte != string_multibyte)    if (multibyte != string_multibyte)
# Line 1380  skip_chars (forwardp, syntaxp, string, l Line 1380  skip_chars (forwardp, syntaxp, string, l
1380        int nbytes;        int nbytes;
1381    
1382        if (multibyte)        if (multibyte)
1383          nbytes = count_size_as_multibyte (XSTRING (string)->data,          nbytes = count_size_as_multibyte (SDATA (string),
1384                                            XSTRING (string)->size);                                            SCHARS (string));
1385        else        else
1386          nbytes = XSTRING (string)->size;          nbytes = SCHARS (string);
1387        if (nbytes != size_byte)        if (nbytes != size_byte)
1388          {          {
1389            str = (unsigned char *) alloca (nbytes);            str = (unsigned char *) alloca (nbytes);
1390            copy_text (XSTRING (string)->data, str, size_byte,            copy_text (SDATA (string), str, size_byte,
1391                       string_multibyte, multibyte);                       string_multibyte, multibyte);
1392            size_byte = nbytes;            size_byte = nbytes;
1393          }          }
# Line 1409  skip_chars (forwardp, syntaxp, string, l Line 1409  skip_chars (forwardp, syntaxp, string, l
1409    i_byte = 0;    i_byte = 0;
1410    
1411    if (i_byte < size_byte    if (i_byte < size_byte
1412        && XSTRING (string)->data[0] == '^')        && SREF (string, 0) == '^')
1413      {      {
1414        negate = 1; i_byte++;        negate = 1; i_byte++;
1415      }      }

Legend:
Removed from v.1.152  
changed lines
  Added in v.1.153

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