diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/intervals.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip | |
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 158 |
1 files changed, 43 insertions, 115 deletions
diff --git a/src/intervals.c b/src/intervals.c index 4f12d711bf5..3a7a0bf8c96 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -52,7 +52,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | 52 | ||
| 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) | 53 | #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) |
| 54 | 54 | ||
| 55 | Lisp_Object merge_properties_sticky (); | 55 | Lisp_Object merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright); |
| 56 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); | 56 | static INTERVAL reproduce_tree (INTERVAL, INTERVAL); |
| 57 | static INTERVAL reproduce_tree_obj (INTERVAL, Lisp_Object); | 57 | static INTERVAL reproduce_tree_obj (INTERVAL, Lisp_Object); |
| 58 | 58 | ||
| @@ -62,8 +62,7 @@ static INTERVAL reproduce_tree_obj (INTERVAL, Lisp_Object); | |||
| 62 | /* Create the root interval of some object, a buffer or string. */ | 62 | /* Create the root interval of some object, a buffer or string. */ |
| 63 | 63 | ||
| 64 | INTERVAL | 64 | INTERVAL |
| 65 | create_root_interval (parent) | 65 | create_root_interval (Lisp_Object parent) |
| 66 | Lisp_Object parent; | ||
| 67 | { | 66 | { |
| 68 | INTERVAL new; | 67 | INTERVAL new; |
| 69 | 68 | ||
| @@ -95,8 +94,7 @@ create_root_interval (parent) | |||
| 95 | /* Make the interval TARGET have exactly the properties of SOURCE */ | 94 | /* Make the interval TARGET have exactly the properties of SOURCE */ |
| 96 | 95 | ||
| 97 | void | 96 | void |
| 98 | copy_properties (source, target) | 97 | copy_properties (register INTERVAL source, register INTERVAL target) |
| 99 | register INTERVAL source, target; | ||
| 100 | { | 98 | { |
| 101 | if (DEFAULT_INTERVAL_P (source) && DEFAULT_INTERVAL_P (target)) | 99 | if (DEFAULT_INTERVAL_P (source) && DEFAULT_INTERVAL_P (target)) |
| 102 | return; | 100 | return; |
| @@ -110,8 +108,7 @@ copy_properties (source, target) | |||
| 110 | is added to TARGET if TARGET has no such property as yet. */ | 108 | is added to TARGET if TARGET has no such property as yet. */ |
| 111 | 109 | ||
| 112 | static void | 110 | static void |
| 113 | merge_properties (source, target) | 111 | merge_properties (register INTERVAL source, register INTERVAL target) |
| 114 | register INTERVAL source, target; | ||
| 115 | { | 112 | { |
| 116 | register Lisp_Object o, sym, val; | 113 | register Lisp_Object o, sym, val; |
| 117 | 114 | ||
| @@ -149,8 +146,7 @@ merge_properties (source, target) | |||
| 149 | 0 otherwise. */ | 146 | 0 otherwise. */ |
| 150 | 147 | ||
| 151 | int | 148 | int |
| 152 | intervals_equal (i0, i1) | 149 | intervals_equal (INTERVAL i0, INTERVAL i1) |
| 153 | INTERVAL i0, i1; | ||
| 154 | { | 150 | { |
| 155 | register Lisp_Object i0_cdr, i0_sym; | 151 | register Lisp_Object i0_cdr, i0_sym; |
| 156 | register Lisp_Object i1_cdr, i1_val; | 152 | register Lisp_Object i1_cdr, i1_val; |
| @@ -206,10 +202,7 @@ intervals_equal (i0, i1) | |||
| 206 | Pass FUNCTION two args: an interval, and ARG. */ | 202 | Pass FUNCTION two args: an interval, and ARG. */ |
| 207 | 203 | ||
| 208 | void | 204 | void |
| 209 | traverse_intervals_noorder (tree, function, arg) | 205 | traverse_intervals_noorder (INTERVAL tree, void (*function) (INTERVAL, Lisp_Object), Lisp_Object arg) |
| 210 | INTERVAL tree; | ||
| 211 | void (* function) (INTERVAL, Lisp_Object); | ||
| 212 | Lisp_Object arg; | ||
| 213 | { | 206 | { |
| 214 | /* Minimize stack usage. */ | 207 | /* Minimize stack usage. */ |
| 215 | while (!NULL_INTERVAL_P (tree)) | 208 | while (!NULL_INTERVAL_P (tree)) |
| @@ -229,11 +222,7 @@ traverse_intervals_noorder (tree, function, arg) | |||
| 229 | Pass FUNCTION two args: an interval, and ARG. */ | 222 | Pass FUNCTION two args: an interval, and ARG. */ |
| 230 | 223 | ||
| 231 | void | 224 | void |
| 232 | traverse_intervals (tree, position, function, arg) | 225 | traverse_intervals (INTERVAL tree, int position, void (*function) (INTERVAL, Lisp_Object), Lisp_Object arg) |
| 233 | INTERVAL tree; | ||
| 234 | int position; | ||
| 235 | void (* function) (INTERVAL, Lisp_Object); | ||
| 236 | Lisp_Object arg; | ||
| 237 | { | 226 | { |
| 238 | while (!NULL_INTERVAL_P (tree)) | 227 | while (!NULL_INTERVAL_P (tree)) |
| 239 | { | 228 | { |
| @@ -323,8 +312,7 @@ root_interval (interval) | |||
| 323 | */ | 312 | */ |
| 324 | 313 | ||
| 325 | static INLINE INTERVAL | 314 | static INLINE INTERVAL |
| 326 | rotate_right (interval) | 315 | rotate_right (INTERVAL interval) |
| 327 | INTERVAL interval; | ||
| 328 | { | 316 | { |
| 329 | INTERVAL i; | 317 | INTERVAL i; |
| 330 | INTERVAL B = interval->left; | 318 | INTERVAL B = interval->left; |
| @@ -371,8 +359,7 @@ rotate_right (interval) | |||
| 371 | */ | 359 | */ |
| 372 | 360 | ||
| 373 | static INLINE INTERVAL | 361 | static INLINE INTERVAL |
| 374 | rotate_left (interval) | 362 | rotate_left (INTERVAL interval) |
| 375 | INTERVAL interval; | ||
| 376 | { | 363 | { |
| 377 | INTERVAL i; | 364 | INTERVAL i; |
| 378 | INTERVAL B = interval->right; | 365 | INTERVAL B = interval->right; |
| @@ -413,8 +400,7 @@ rotate_left (interval) | |||
| 413 | themselves are already balanced. */ | 400 | themselves are already balanced. */ |
| 414 | 401 | ||
| 415 | static INTERVAL | 402 | static INTERVAL |
| 416 | balance_an_interval (i) | 403 | balance_an_interval (INTERVAL i) |
| 417 | INTERVAL i; | ||
| 418 | { | 404 | { |
| 419 | register int old_diff, new_diff; | 405 | register int old_diff, new_diff; |
| 420 | 406 | ||
| @@ -451,8 +437,7 @@ balance_an_interval (i) | |||
| 451 | Lisp Object. */ | 437 | Lisp Object. */ |
| 452 | 438 | ||
| 453 | static INLINE INTERVAL | 439 | static INLINE INTERVAL |
| 454 | balance_possible_root_interval (interval) | 440 | balance_possible_root_interval (register INTERVAL interval) |
| 455 | register INTERVAL interval; | ||
| 456 | { | 441 | { |
| 457 | Lisp_Object parent; | 442 | Lisp_Object parent; |
| 458 | int have_parent = 0; | 443 | int have_parent = 0; |
| @@ -482,8 +467,7 @@ balance_possible_root_interval (interval) | |||
| 482 | (the amount of text). */ | 467 | (the amount of text). */ |
| 483 | 468 | ||
| 484 | static INTERVAL | 469 | static INTERVAL |
| 485 | balance_intervals_internal (tree) | 470 | balance_intervals_internal (register INTERVAL tree) |
| 486 | register INTERVAL tree; | ||
| 487 | { | 471 | { |
| 488 | /* Balance within each side. */ | 472 | /* Balance within each side. */ |
| 489 | if (tree->left) | 473 | if (tree->left) |
| @@ -496,8 +480,7 @@ balance_intervals_internal (tree) | |||
| 496 | /* Advertised interface to balance intervals. */ | 480 | /* Advertised interface to balance intervals. */ |
| 497 | 481 | ||
| 498 | INTERVAL | 482 | INTERVAL |
| 499 | balance_intervals (tree) | 483 | balance_intervals (INTERVAL tree) |
| 500 | INTERVAL tree; | ||
| 501 | { | 484 | { |
| 502 | if (tree == NULL_INTERVAL) | 485 | if (tree == NULL_INTERVAL) |
| 503 | return NULL_INTERVAL; | 486 | return NULL_INTERVAL; |
| @@ -519,9 +502,7 @@ balance_intervals (tree) | |||
| 519 | it is still a root after this operation. */ | 502 | it is still a root after this operation. */ |
| 520 | 503 | ||
| 521 | INTERVAL | 504 | INTERVAL |
| 522 | split_interval_right (interval, offset) | 505 | split_interval_right (INTERVAL interval, int offset) |
| 523 | INTERVAL interval; | ||
| 524 | int offset; | ||
| 525 | { | 506 | { |
| 526 | INTERVAL new = make_interval (); | 507 | INTERVAL new = make_interval (); |
| 527 | int position = interval->position; | 508 | int position = interval->position; |
| @@ -566,9 +547,7 @@ split_interval_right (interval, offset) | |||
| 566 | it is still a root after this operation. */ | 547 | it is still a root after this operation. */ |
| 567 | 548 | ||
| 568 | INTERVAL | 549 | INTERVAL |
| 569 | split_interval_left (interval, offset) | 550 | split_interval_left (INTERVAL interval, int offset) |
| 570 | INTERVAL interval; | ||
| 571 | int offset; | ||
| 572 | { | 551 | { |
| 573 | INTERVAL new = make_interval (); | 552 | INTERVAL new = make_interval (); |
| 574 | int new_length = offset; | 553 | int new_length = offset; |
| @@ -608,8 +587,7 @@ split_interval_left (interval, offset) | |||
| 608 | of another interval! */ | 587 | of another interval! */ |
| 609 | 588 | ||
| 610 | int | 589 | int |
| 611 | interval_start_pos (source) | 590 | interval_start_pos (INTERVAL source) |
| 612 | INTERVAL source; | ||
| 613 | { | 591 | { |
| 614 | Lisp_Object parent; | 592 | Lisp_Object parent; |
| 615 | 593 | ||
| @@ -635,9 +613,7 @@ interval_start_pos (source) | |||
| 635 | will update this cache based on the result of find_interval. */ | 613 | will update this cache based on the result of find_interval. */ |
| 636 | 614 | ||
| 637 | INTERVAL | 615 | INTERVAL |
| 638 | find_interval (tree, position) | 616 | find_interval (register INTERVAL tree, register int position) |
| 639 | register INTERVAL tree; | ||
| 640 | register int position; | ||
| 641 | { | 617 | { |
| 642 | /* The distance from the left edge of the subtree at TREE | 618 | /* The distance from the left edge of the subtree at TREE |
| 643 | to POSITION. */ | 619 | to POSITION. */ |
| @@ -691,8 +667,7 @@ find_interval (tree, position) | |||
| 691 | find_interval). */ | 667 | find_interval). */ |
| 692 | 668 | ||
| 693 | INTERVAL | 669 | INTERVAL |
| 694 | next_interval (interval) | 670 | next_interval (register INTERVAL interval) |
| 695 | register INTERVAL interval; | ||
| 696 | { | 671 | { |
| 697 | register INTERVAL i = interval; | 672 | register INTERVAL i = interval; |
| 698 | register int next_position; | 673 | register int next_position; |
| @@ -731,8 +706,7 @@ next_interval (interval) | |||
| 731 | find_interval). */ | 706 | find_interval). */ |
| 732 | 707 | ||
| 733 | INTERVAL | 708 | INTERVAL |
| 734 | previous_interval (interval) | 709 | previous_interval (register INTERVAL interval) |
| 735 | register INTERVAL interval; | ||
| 736 | { | 710 | { |
| 737 | register INTERVAL i; | 711 | register INTERVAL i; |
| 738 | 712 | ||
| @@ -771,9 +745,7 @@ previous_interval (interval) | |||
| 771 | To speed up the process, we assume that the ->position of | 745 | To speed up the process, we assume that the ->position of |
| 772 | I and all its parents is already uptodate. */ | 746 | I and all its parents is already uptodate. */ |
| 773 | INTERVAL | 747 | INTERVAL |
| 774 | update_interval (i, pos) | 748 | update_interval (register INTERVAL i, int pos) |
| 775 | register INTERVAL i; | ||
| 776 | int pos; | ||
| 777 | { | 749 | { |
| 778 | if (NULL_INTERVAL_P (i)) | 750 | if (NULL_INTERVAL_P (i)) |
| 779 | return NULL_INTERVAL; | 751 | return NULL_INTERVAL; |
| @@ -892,9 +864,7 @@ adjust_intervals_for_insertion (tree, position, length) | |||
| 892 | this text, and make it have the merged properties of both ends. */ | 864 | this text, and make it have the merged properties of both ends. */ |
| 893 | 865 | ||
| 894 | static INTERVAL | 866 | static INTERVAL |
| 895 | adjust_intervals_for_insertion (tree, position, length) | 867 | adjust_intervals_for_insertion (INTERVAL tree, int position, int length) |
| 896 | INTERVAL tree; | ||
| 897 | int position, length; | ||
| 898 | { | 868 | { |
| 899 | register INTERVAL i; | 869 | register INTERVAL i; |
| 900 | register INTERVAL temp; | 870 | register INTERVAL temp; |
| @@ -1119,8 +1089,7 @@ FR 8 9 A B | |||
| 1119 | */ | 1089 | */ |
| 1120 | 1090 | ||
| 1121 | Lisp_Object | 1091 | Lisp_Object |
| 1122 | merge_properties_sticky (pleft, pright) | 1092 | merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright) |
| 1123 | Lisp_Object pleft, pright; | ||
| 1124 | { | 1093 | { |
| 1125 | register Lisp_Object props, front, rear; | 1094 | register Lisp_Object props, front, rear; |
| 1126 | Lisp_Object lfront, lrear, rfront, rrear; | 1095 | Lisp_Object lfront, lrear, rfront, rrear; |
| @@ -1256,8 +1225,7 @@ merge_properties_sticky (pleft, pright) | |||
| 1256 | storing the resulting subtree into its parent. */ | 1225 | storing the resulting subtree into its parent. */ |
| 1257 | 1226 | ||
| 1258 | static INTERVAL | 1227 | static INTERVAL |
| 1259 | delete_node (i) | 1228 | delete_node (register INTERVAL i) |
| 1260 | register INTERVAL i; | ||
| 1261 | { | 1229 | { |
| 1262 | register INTERVAL migrate, this; | 1230 | register INTERVAL migrate, this; |
| 1263 | register int migrate_amt; | 1231 | register int migrate_amt; |
| @@ -1290,8 +1258,7 @@ delete_node (i) | |||
| 1290 | for the length of I. */ | 1258 | for the length of I. */ |
| 1291 | 1259 | ||
| 1292 | void | 1260 | void |
| 1293 | delete_interval (i) | 1261 | delete_interval (register INTERVAL i) |
| 1294 | register INTERVAL i; | ||
| 1295 | { | 1262 | { |
| 1296 | register INTERVAL parent; | 1263 | register INTERVAL parent; |
| 1297 | int amt = LENGTH (i); | 1264 | int amt = LENGTH (i); |
| @@ -1345,9 +1312,7 @@ delete_interval (i) | |||
| 1345 | deleting the appropriate amount of text. */ | 1312 | deleting the appropriate amount of text. */ |
| 1346 | 1313 | ||
| 1347 | static int | 1314 | static int |
| 1348 | interval_deletion_adjustment (tree, from, amount) | 1315 | interval_deletion_adjustment (register INTERVAL tree, register int from, register int amount) |
| 1349 | register INTERVAL tree; | ||
| 1350 | register int from, amount; | ||
| 1351 | { | 1316 | { |
| 1352 | register int relative_position = from; | 1317 | register int relative_position = from; |
| 1353 | 1318 | ||
| @@ -1407,9 +1372,7 @@ interval_deletion_adjustment (tree, from, amount) | |||
| 1407 | buffer position, i.e. origin 1). */ | 1372 | buffer position, i.e. origin 1). */ |
| 1408 | 1373 | ||
| 1409 | static void | 1374 | static void |
| 1410 | adjust_intervals_for_deletion (buffer, start, length) | 1375 | adjust_intervals_for_deletion (struct buffer *buffer, int start, int length) |
| 1411 | struct buffer *buffer; | ||
| 1412 | int start, length; | ||
| 1413 | { | 1376 | { |
| 1414 | register int left_to_delete = length; | 1377 | register int left_to_delete = length; |
| 1415 | register INTERVAL tree = BUF_INTERVALS (buffer); | 1378 | register INTERVAL tree = BUF_INTERVALS (buffer); |
| @@ -1460,9 +1423,7 @@ adjust_intervals_for_deletion (buffer, start, length) | |||
| 1460 | of LENGTH. */ | 1423 | of LENGTH. */ |
| 1461 | 1424 | ||
| 1462 | INLINE void | 1425 | INLINE void |
| 1463 | offset_intervals (buffer, start, length) | 1426 | offset_intervals (struct buffer *buffer, int start, int length) |
| 1464 | struct buffer *buffer; | ||
| 1465 | int start, length; | ||
| 1466 | { | 1427 | { |
| 1467 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) | 1428 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) |
| 1468 | return; | 1429 | return; |
| @@ -1483,8 +1444,7 @@ offset_intervals (buffer, start, length) | |||
| 1483 | interval. */ | 1444 | interval. */ |
| 1484 | 1445 | ||
| 1485 | INTERVAL | 1446 | INTERVAL |
| 1486 | merge_interval_right (i) | 1447 | merge_interval_right (register INTERVAL i) |
| 1487 | register INTERVAL i; | ||
| 1488 | { | 1448 | { |
| 1489 | register int absorb = LENGTH (i); | 1449 | register int absorb = LENGTH (i); |
| 1490 | register INTERVAL successor; | 1450 | register INTERVAL successor; |
| @@ -1540,8 +1500,7 @@ merge_interval_right (i) | |||
| 1540 | The caller must verify that this is not the first (leftmost) interval. */ | 1500 | The caller must verify that this is not the first (leftmost) interval. */ |
| 1541 | 1501 | ||
| 1542 | INTERVAL | 1502 | INTERVAL |
| 1543 | merge_interval_left (i) | 1503 | merge_interval_left (register INTERVAL i) |
| 1544 | register INTERVAL i; | ||
| 1545 | { | 1504 | { |
| 1546 | register int absorb = LENGTH (i); | 1505 | register int absorb = LENGTH (i); |
| 1547 | register INTERVAL predecessor; | 1506 | register INTERVAL predecessor; |
| @@ -1595,8 +1554,7 @@ merge_interval_left (i) | |||
| 1595 | the pointers of the copy. */ | 1554 | the pointers of the copy. */ |
| 1596 | 1555 | ||
| 1597 | static INTERVAL | 1556 | static INTERVAL |
| 1598 | reproduce_tree (source, parent) | 1557 | reproduce_tree (INTERVAL source, INTERVAL parent) |
| 1599 | INTERVAL source, parent; | ||
| 1600 | { | 1558 | { |
| 1601 | register INTERVAL t = make_interval (); | 1559 | register INTERVAL t = make_interval (); |
| 1602 | 1560 | ||
| @@ -1612,9 +1570,7 @@ reproduce_tree (source, parent) | |||
| 1612 | } | 1570 | } |
| 1613 | 1571 | ||
| 1614 | static INTERVAL | 1572 | static INTERVAL |
| 1615 | reproduce_tree_obj (source, parent) | 1573 | reproduce_tree_obj (INTERVAL source, Lisp_Object parent) |
| 1616 | INTERVAL source; | ||
| 1617 | Lisp_Object parent; | ||
| 1618 | { | 1574 | { |
| 1619 | register INTERVAL t = make_interval (); | 1575 | register INTERVAL t = make_interval (); |
| 1620 | 1576 | ||
| @@ -1714,11 +1670,7 @@ make_new_interval (intervals, start, length) | |||
| 1714 | text... */ | 1670 | text... */ |
| 1715 | 1671 | ||
| 1716 | void | 1672 | void |
| 1717 | graft_intervals_into_buffer (source, position, length, buffer, inherit) | 1673 | graft_intervals_into_buffer (INTERVAL source, int position, int length, struct buffer *buffer, int inherit) |
| 1718 | INTERVAL source; | ||
| 1719 | int position, length; | ||
| 1720 | struct buffer *buffer; | ||
| 1721 | int inherit; | ||
| 1722 | { | 1674 | { |
| 1723 | register INTERVAL under, over, this, prev; | 1675 | register INTERVAL under, over, this, prev; |
| 1724 | register INTERVAL tree; | 1676 | register INTERVAL tree; |
| @@ -1876,18 +1828,13 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit) | |||
| 1876 | and for PROP appearing on the default-text-properties list. */ | 1828 | and for PROP appearing on the default-text-properties list. */ |
| 1877 | 1829 | ||
| 1878 | Lisp_Object | 1830 | Lisp_Object |
| 1879 | textget (plist, prop) | 1831 | textget (Lisp_Object plist, register Lisp_Object prop) |
| 1880 | Lisp_Object plist; | ||
| 1881 | register Lisp_Object prop; | ||
| 1882 | { | 1832 | { |
| 1883 | return lookup_char_property (plist, prop, 1); | 1833 | return lookup_char_property (plist, prop, 1); |
| 1884 | } | 1834 | } |
| 1885 | 1835 | ||
| 1886 | Lisp_Object | 1836 | Lisp_Object |
| 1887 | lookup_char_property (plist, prop, textprop) | 1837 | lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop) |
| 1888 | Lisp_Object plist; | ||
| 1889 | register Lisp_Object prop; | ||
| 1890 | int textprop; | ||
| 1891 | { | 1838 | { |
| 1892 | register Lisp_Object tail, fallback = Qnil; | 1839 | register Lisp_Object tail, fallback = Qnil; |
| 1893 | 1840 | ||
| @@ -1974,8 +1921,7 @@ set_point (EMACS_INT charpos) | |||
| 1974 | if the invisible property comes from an overlay. */ | 1921 | if the invisible property comes from an overlay. */ |
| 1975 | 1922 | ||
| 1976 | static int | 1923 | static int |
| 1977 | adjust_for_invis_intang (pos, test_offs, adj, test_intang) | 1924 | adjust_for_invis_intang (int pos, int test_offs, int adj, int test_intang) |
| 1978 | int pos, test_offs, adj, test_intang; | ||
| 1979 | { | 1925 | { |
| 1980 | Lisp_Object invis_propval, invis_overlay; | 1926 | Lisp_Object invis_propval, invis_overlay; |
| 1981 | Lisp_Object test_pos; | 1927 | Lisp_Object test_pos; |
| @@ -2237,8 +2183,7 @@ set_point_both (EMACS_INT charpos, EMACS_INT bytepos) | |||
| 2237 | segment that reaches all the way to point. */ | 2183 | segment that reaches all the way to point. */ |
| 2238 | 2184 | ||
| 2239 | void | 2185 | void |
| 2240 | move_if_not_intangible (position) | 2186 | move_if_not_intangible (int position) |
| 2241 | int position; | ||
| 2242 | { | 2187 | { |
| 2243 | Lisp_Object pos; | 2188 | Lisp_Object pos; |
| 2244 | Lisp_Object intangible_propval; | 2189 | Lisp_Object intangible_propval; |
| @@ -2301,11 +2246,7 @@ move_if_not_intangible (position) | |||
| 2301 | nil means the current buffer. */ | 2246 | nil means the current buffer. */ |
| 2302 | 2247 | ||
| 2303 | int | 2248 | int |
| 2304 | get_property_and_range (pos, prop, val, start, end, object) | 2249 | get_property_and_range (int pos, Lisp_Object prop, Lisp_Object *val, EMACS_INT *start, EMACS_INT *end, Lisp_Object object) |
| 2305 | int pos; | ||
| 2306 | Lisp_Object prop, *val; | ||
| 2307 | EMACS_INT *start, *end; | ||
| 2308 | Lisp_Object object; | ||
| 2309 | { | 2250 | { |
| 2310 | INTERVAL i, prev, next; | 2251 | INTERVAL i, prev, next; |
| 2311 | 2252 | ||
| @@ -2348,10 +2289,7 @@ get_property_and_range (pos, prop, val, start, end, object) | |||
| 2348 | POSITION must be in the accessible part of BUFFER. */ | 2289 | POSITION must be in the accessible part of BUFFER. */ |
| 2349 | 2290 | ||
| 2350 | Lisp_Object | 2291 | Lisp_Object |
| 2351 | get_local_map (position, buffer, type) | 2292 | get_local_map (register int position, register struct buffer *buffer, Lisp_Object type) |
| 2352 | register int position; | ||
| 2353 | register struct buffer *buffer; | ||
| 2354 | Lisp_Object type; | ||
| 2355 | { | 2293 | { |
| 2356 | Lisp_Object prop, lispy_position, lispy_buffer; | 2294 | Lisp_Object prop, lispy_position, lispy_buffer; |
| 2357 | int old_begv, old_zv, old_begv_byte, old_zv_byte; | 2295 | int old_begv, old_zv, old_begv_byte, old_zv_byte; |
| @@ -2404,9 +2342,7 @@ get_local_map (position, buffer, type) | |||
| 2404 | The new interval tree has no parent and has a starting-position of 0. */ | 2342 | The new interval tree has no parent and has a starting-position of 0. */ |
| 2405 | 2343 | ||
| 2406 | INTERVAL | 2344 | INTERVAL |
| 2407 | copy_intervals (tree, start, length) | 2345 | copy_intervals (INTERVAL tree, int start, int length) |
| 2408 | INTERVAL tree; | ||
| 2409 | int start, length; | ||
| 2410 | { | 2346 | { |
| 2411 | register INTERVAL i, new, t; | 2347 | register INTERVAL i, new, t; |
| 2412 | register int got, prevlen; | 2348 | register int got, prevlen; |
| @@ -2447,10 +2383,7 @@ copy_intervals (tree, start, length) | |||
| 2447 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ | 2383 | /* Give STRING the properties of BUFFER from POSITION to LENGTH. */ |
| 2448 | 2384 | ||
| 2449 | INLINE void | 2385 | INLINE void |
| 2450 | copy_intervals_to_string (string, buffer, position, length) | 2386 | copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, int position, int length) |
| 2451 | Lisp_Object string; | ||
| 2452 | struct buffer *buffer; | ||
| 2453 | int position, length; | ||
| 2454 | { | 2387 | { |
| 2455 | INTERVAL interval_copy = copy_intervals (BUF_INTERVALS (buffer), | 2388 | INTERVAL interval_copy = copy_intervals (BUF_INTERVALS (buffer), |
| 2456 | position, length); | 2389 | position, length); |
| @@ -2465,8 +2398,7 @@ copy_intervals_to_string (string, buffer, position, length) | |||
| 2465 | Assume they have identical characters. */ | 2398 | Assume they have identical characters. */ |
| 2466 | 2399 | ||
| 2467 | int | 2400 | int |
| 2468 | compare_string_intervals (s1, s2) | 2401 | compare_string_intervals (Lisp_Object s1, Lisp_Object s2) |
| 2469 | Lisp_Object s1, s2; | ||
| 2470 | { | 2402 | { |
| 2471 | INTERVAL i1, i2; | 2403 | INTERVAL i1, i2; |
| 2472 | int pos = 0; | 2404 | int pos = 0; |
| @@ -2504,10 +2436,7 @@ compare_string_intervals (s1, s2) | |||
| 2504 | START_BYTE ... END_BYTE in bytes. */ | 2436 | START_BYTE ... END_BYTE in bytes. */ |
| 2505 | 2437 | ||
| 2506 | static void | 2438 | static void |
| 2507 | set_intervals_multibyte_1 (i, multi_flag, start, start_byte, end, end_byte) | 2439 | set_intervals_multibyte_1 (INTERVAL i, int multi_flag, int start, int start_byte, int end, int end_byte) |
| 2508 | INTERVAL i; | ||
| 2509 | int multi_flag; | ||
| 2510 | int start, start_byte, end, end_byte; | ||
| 2511 | { | 2440 | { |
| 2512 | /* Fix the length of this interval. */ | 2441 | /* Fix the length of this interval. */ |
| 2513 | if (multi_flag) | 2442 | if (multi_flag) |
| @@ -2617,8 +2546,7 @@ set_intervals_multibyte_1 (i, multi_flag, start, start_byte, end, end_byte) | |||
| 2617 | or to fit them as non-multibyte (if MULTI_FLAG is 0). */ | 2546 | or to fit them as non-multibyte (if MULTI_FLAG is 0). */ |
| 2618 | 2547 | ||
| 2619 | void | 2548 | void |
| 2620 | set_intervals_multibyte (multi_flag) | 2549 | set_intervals_multibyte (int multi_flag) |
| 2621 | int multi_flag; | ||
| 2622 | { | 2550 | { |
| 2623 | if (BUF_INTERVALS (current_buffer)) | 2551 | if (BUF_INTERVALS (current_buffer)) |
| 2624 | set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag, | 2552 | set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag, |