diff options
| author | Ken Raeburn | 2002-07-15 00:01:34 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2002-07-15 00:01:34 +0000 |
| commit | d5db40779d7505244d37476b4f046641f07eea2b (patch) | |
| tree | 5c8bf4dad41639287e722cb7cbdc0709e47a9e53 /src/syntax.c | |
| parent | 491c2516d32fa8b9ba9422ec142c8925dd82af00 (diff) | |
| download | emacs-d5db40779d7505244d37476b4f046641f07eea2b.tar.gz emacs-d5db40779d7505244d37476b4f046641f07eea2b.zip | |
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.
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/syntax.c b/src/syntax.c index 30b9eb1f4c4..8d6b052f14b 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -908,7 +908,7 @@ text property. */) | |||
| 908 | 908 | ||
| 909 | CHECK_STRING (string); | 909 | CHECK_STRING (string); |
| 910 | 910 | ||
| 911 | p = XSTRING (string)->data; | 911 | p = SDATA (string); |
| 912 | code = (enum syntaxcode) syntax_spec_code[*p++]; | 912 | code = (enum syntaxcode) syntax_spec_code[*p++]; |
| 913 | if (((int) code & 0377) == 0377) | 913 | if (((int) code & 0377) == 0377) |
| 914 | error ("invalid syntax description letter: %c", p[-1]); | 914 | error ("invalid syntax description letter: %c", p[-1]); |
| @@ -920,7 +920,7 @@ text property. */) | |||
| 920 | { | 920 | { |
| 921 | int len; | 921 | int len; |
| 922 | int character = (STRING_CHAR_AND_LENGTH | 922 | int character = (STRING_CHAR_AND_LENGTH |
| 923 | (p, STRING_BYTES (XSTRING (string)) - 1, len)); | 923 | (p, SBYTES (string) - 1, len)); |
| 924 | XSETINT (match, character); | 924 | XSETINT (match, character); |
| 925 | if (XFASTINT (match) == ' ') | 925 | if (XFASTINT (match) == ' ') |
| 926 | match = Qnil; | 926 | match = Qnil; |
| @@ -1369,10 +1369,10 @@ skip_chars (forwardp, syntaxp, string, lim) | |||
| 1369 | int len; | 1369 | int len; |
| 1370 | 1370 | ||
| 1371 | CHECK_STRING (string); | 1371 | CHECK_STRING (string); |
| 1372 | char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2); | 1372 | char_ranges = (int *) alloca (SCHARS (string) * (sizeof (int)) * 2); |
| 1373 | string_multibyte = STRING_MULTIBYTE (string); | 1373 | string_multibyte = STRING_MULTIBYTE (string); |
| 1374 | str = XSTRING (string)->data; | 1374 | str = SDATA (string); |
| 1375 | size_byte = STRING_BYTES (XSTRING (string)); | 1375 | size_byte = SBYTES (string); |
| 1376 | 1376 | ||
| 1377 | /* Adjust the multibyteness of the string to that of the buffer. */ | 1377 | /* Adjust the multibyteness of the string to that of the buffer. */ |
| 1378 | if (multibyte != string_multibyte) | 1378 | if (multibyte != string_multibyte) |
| @@ -1380,14 +1380,14 @@ skip_chars (forwardp, syntaxp, string, lim) | |||
| 1380 | int nbytes; | 1380 | int nbytes; |
| 1381 | 1381 | ||
| 1382 | if (multibyte) | 1382 | if (multibyte) |
| 1383 | nbytes = count_size_as_multibyte (XSTRING (string)->data, | 1383 | nbytes = count_size_as_multibyte (SDATA (string), |
| 1384 | XSTRING (string)->size); | 1384 | SCHARS (string)); |
| 1385 | else | 1385 | else |
| 1386 | nbytes = XSTRING (string)->size; | 1386 | nbytes = SCHARS (string); |
| 1387 | if (nbytes != size_byte) | 1387 | if (nbytes != size_byte) |
| 1388 | { | 1388 | { |
| 1389 | str = (unsigned char *) alloca (nbytes); | 1389 | str = (unsigned char *) alloca (nbytes); |
| 1390 | copy_text (XSTRING (string)->data, str, size_byte, | 1390 | copy_text (SDATA (string), str, size_byte, |
| 1391 | string_multibyte, multibyte); | 1391 | string_multibyte, multibyte); |
| 1392 | size_byte = nbytes; | 1392 | size_byte = nbytes; |
| 1393 | } | 1393 | } |
| @@ -1409,7 +1409,7 @@ skip_chars (forwardp, syntaxp, string, lim) | |||
| 1409 | i_byte = 0; | 1409 | i_byte = 0; |
| 1410 | 1410 | ||
| 1411 | if (i_byte < size_byte | 1411 | if (i_byte < size_byte |
| 1412 | && XSTRING (string)->data[0] == '^') | 1412 | && SREF (string, 0) == '^') |
| 1413 | { | 1413 | { |
| 1414 | negate = 1; i_byte++; | 1414 | negate = 1; i_byte++; |
| 1415 | } | 1415 | } |