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/intervals.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/intervals.c')
| -rw-r--r-- | src/intervals.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/intervals.c b/src/intervals.c index bec97d0b3e6..0129faa7877 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -80,8 +80,8 @@ create_root_interval (parent) | |||
| 80 | } | 80 | } |
| 81 | else if (STRINGP (parent)) | 81 | else if (STRINGP (parent)) |
| 82 | { | 82 | { |
| 83 | new->total_length = XSTRING (parent)->size; | 83 | new->total_length = SCHARS (parent); |
| 84 | XSTRING (parent)->intervals = new; | 84 | STRING_INTERVALS (parent) = new; |
| 85 | new->position = 0; | 85 | new->position = 0; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| @@ -452,7 +452,7 @@ balance_possible_root_interval (interval) | |||
| 452 | if (BUFFERP (parent)) | 452 | if (BUFFERP (parent)) |
| 453 | BUF_INTERVALS (XBUFFER (parent)) = interval; | 453 | BUF_INTERVALS (XBUFFER (parent)) = interval; |
| 454 | else if (STRINGP (parent)) | 454 | else if (STRINGP (parent)) |
| 455 | XSTRING (parent)->intervals = interval; | 455 | STRING_INTERVALS (parent) = interval; |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | return interval; | 458 | return interval; |
| @@ -1280,7 +1280,7 @@ delete_interval (i) | |||
| 1280 | if (BUFFERP (owner)) | 1280 | if (BUFFERP (owner)) |
| 1281 | BUF_INTERVALS (XBUFFER (owner)) = parent; | 1281 | BUF_INTERVALS (XBUFFER (owner)) = parent; |
| 1282 | else if (STRINGP (owner)) | 1282 | else if (STRINGP (owner)) |
| 1283 | XSTRING (owner)->intervals = parent; | 1283 | STRING_INTERVALS (owner) = parent; |
| 1284 | else | 1284 | else |
| 1285 | abort (); | 1285 | abort (); |
| 1286 | 1286 | ||
| @@ -2247,7 +2247,7 @@ get_property_and_range (pos, prop, val, start, end, object) | |||
| 2247 | else if (BUFFERP (object)) | 2247 | else if (BUFFERP (object)) |
| 2248 | i = find_interval (BUF_INTERVALS (XBUFFER (object)), pos); | 2248 | i = find_interval (BUF_INTERVALS (XBUFFER (object)), pos); |
| 2249 | else if (STRINGP (object)) | 2249 | else if (STRINGP (object)) |
| 2250 | i = find_interval (XSTRING (object)->intervals, pos); | 2250 | i = find_interval (STRING_INTERVALS (object), pos); |
| 2251 | else | 2251 | else |
| 2252 | abort (); | 2252 | abort (); |
| 2253 | 2253 | ||
| @@ -2384,7 +2384,7 @@ copy_intervals_to_string (string, buffer, position, length) | |||
| 2384 | return; | 2384 | return; |
| 2385 | 2385 | ||
| 2386 | SET_INTERVAL_OBJECT (interval_copy, string); | 2386 | SET_INTERVAL_OBJECT (interval_copy, string); |
| 2387 | XSTRING (string)->intervals = interval_copy; | 2387 | STRING_INTERVALS (string) = interval_copy; |
| 2388 | } | 2388 | } |
| 2389 | 2389 | ||
| 2390 | /* Return 1 if strings S1 and S2 have identical properties; 0 otherwise. | 2390 | /* Return 1 if strings S1 and S2 have identical properties; 0 otherwise. |
| @@ -2396,10 +2396,10 @@ compare_string_intervals (s1, s2) | |||
| 2396 | { | 2396 | { |
| 2397 | INTERVAL i1, i2; | 2397 | INTERVAL i1, i2; |
| 2398 | int pos = 0; | 2398 | int pos = 0; |
| 2399 | int end = XSTRING (s1)->size; | 2399 | int end = SCHARS (s1); |
| 2400 | 2400 | ||
| 2401 | i1 = find_interval (XSTRING (s1)->intervals, 0); | 2401 | i1 = find_interval (STRING_INTERVALS (s1), 0); |
| 2402 | i2 = find_interval (XSTRING (s2)->intervals, 0); | 2402 | i2 = find_interval (STRING_INTERVALS (s2), 0); |
| 2403 | 2403 | ||
| 2404 | while (pos < end) | 2404 | while (pos < end) |
| 2405 | { | 2405 | { |