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 | |
| 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.
| -rw-r--r-- | src/ChangeLog | 78 | ||||
| -rw-r--r-- | src/alloc.c | 301 | ||||
| -rw-r--r-- | src/atimer.c | 39 | ||||
| -rw-r--r-- | src/bidi.c | 2 | ||||
| -rw-r--r-- | src/bytecode.c | 6 | ||||
| -rw-r--r-- | src/callint.c | 14 | ||||
| -rw-r--r-- | src/callproc.c | 45 | ||||
| -rw-r--r-- | src/casefiddle.c | 16 | ||||
| -rw-r--r-- | src/casetab.c | 28 | ||||
| -rw-r--r-- | src/category.c | 27 | ||||
| -rw-r--r-- | src/ccl.c | 22 | ||||
| -rw-r--r-- | src/character.c | 75 | ||||
| -rw-r--r-- | src/charset.c | 64 | ||||
| -rw-r--r-- | src/chartab.c | 67 | ||||
| -rw-r--r-- | src/cmds.c | 8 | ||||
| -rw-r--r-- | src/coding.c | 255 | ||||
| -rw-r--r-- | src/composite.c | 81 | ||||
| -rw-r--r-- | src/data.c | 88 | ||||
| -rw-r--r-- | src/dbusbind.c | 40 | ||||
| -rw-r--r-- | src/dired.c | 31 | ||||
| -rw-r--r-- | src/dispnew.c | 336 | ||||
| -rw-r--r-- | src/doc.c | 21 | ||||
| -rw-r--r-- | src/doprnt.c | 8 | ||||
| -rw-r--r-- | src/ecrt0.c | 8 | ||||
| -rw-r--r-- | src/editfns.c | 89 | ||||
| -rw-r--r-- | src/fileio.c | 96 | ||||
| -rw-r--r-- | src/filelock.c | 42 | ||||
| -rw-r--r-- | src/filemode.c | 27 | ||||
| -rw-r--r-- | src/fns.c | 184 | ||||
| -rw-r--r-- | src/font.c | 289 | ||||
| -rw-r--r-- | src/fontset.c | 97 | ||||
| -rw-r--r-- | src/frame.c | 210 | ||||
| -rw-r--r-- | src/fringe.c | 58 | ||||
| -rw-r--r-- | src/ftfont.c | 77 | ||||
| -rw-r--r-- | src/ftxfont.c | 46 | ||||
| -rw-r--r-- | src/gtkutil.c | 320 | ||||
| -rw-r--r-- | src/indent.c | 48 | ||||
| -rw-r--r-- | src/insdel.c | 12 | ||||
| -rw-r--r-- | src/intervals.c | 158 | ||||
| -rw-r--r-- | src/keymap.c | 122 | ||||
| -rw-r--r-- | src/lread.c | 164 | ||||
| -rw-r--r-- | src/macros.c | 16 | ||||
| -rw-r--r-- | src/marker.c | 49 | ||||
| -rw-r--r-- | src/md5.c | 30 | ||||
| -rw-r--r-- | src/menu.c | 64 | ||||
| -rw-r--r-- | src/minibuf.c | 28 | ||||
| -rw-r--r-- | src/prefix-args.c | 4 | ||||
| -rw-r--r-- | src/print.c | 94 | ||||
| -rw-r--r-- | src/ralloc.c | 68 | ||||
| -rw-r--r-- | src/regex.c | 125 | ||||
| -rw-r--r-- | src/region-cache.c | 59 | ||||
| -rw-r--r-- | src/scroll.c | 21 | ||||
| -rw-r--r-- | src/search.c | 107 | ||||
| -rw-r--r-- | src/sound.c | 99 | ||||
| -rw-r--r-- | src/strftime.c | 23 | ||||
| -rw-r--r-- | src/syntax.c | 51 | ||||
| -rw-r--r-- | src/sysdep.c | 94 | ||||
| -rw-r--r-- | src/termcap.c | 51 | ||||
| -rw-r--r-- | src/terminal.c | 11 | ||||
| -rw-r--r-- | src/terminfo.c | 7 | ||||
| -rw-r--r-- | src/textprop.c | 85 | ||||
| -rw-r--r-- | src/tparam.c | 19 | ||||
| -rw-r--r-- | src/undo.c | 28 | ||||
| -rw-r--r-- | src/unexelf.c | 15 | ||||
| -rw-r--r-- | src/window.c | 240 | ||||
| -rw-r--r-- | src/xfaces.c | 322 | ||||
| -rw-r--r-- | src/xfns.c | 247 | ||||
| -rw-r--r-- | src/xfont.c | 53 | ||||
| -rw-r--r-- | src/xftfont.c | 71 | ||||
| -rw-r--r-- | src/xgselect.c | 9 | ||||
| -rw-r--r-- | src/xmenu.c | 83 | ||||
| -rw-r--r-- | src/xrdb.c | 55 | ||||
| -rw-r--r-- | src/xselect.c | 137 | ||||
| -rw-r--r-- | src/xsettings.c | 49 | ||||
| -rw-r--r-- | src/xsmfns.c | 43 | ||||
| -rw-r--r-- | src/xterm.c | 597 |
76 files changed, 1932 insertions, 4821 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 63bd31f5c83..eeb6e30d66c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,81 @@ | |||
| 1 | 2010-07-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * alloc.c: Convert function definitions to standard C. | ||
| 4 | * atimer.c: | ||
| 5 | * bidi.c: | ||
| 6 | * bytecode.c: | ||
| 7 | * callint.c: | ||
| 8 | * callproc.c: | ||
| 9 | * casefiddle.c: | ||
| 10 | * casetab.c: | ||
| 11 | * category.c: | ||
| 12 | * ccl.c: | ||
| 13 | * character.c: | ||
| 14 | * charset.c: | ||
| 15 | * chartab.c: | ||
| 16 | * cmds.c: | ||
| 17 | * coding.c: | ||
| 18 | * composite.c: | ||
| 19 | * data.c: | ||
| 20 | * dbusbind.c: | ||
| 21 | * dired.c: | ||
| 22 | * dispnew.c: | ||
| 23 | * doc.c: | ||
| 24 | * doprnt.c: | ||
| 25 | * ecrt0.c: | ||
| 26 | * editfns.c: | ||
| 27 | * fileio.c: | ||
| 28 | * filelock.c: | ||
| 29 | * filemode.c: | ||
| 30 | * fns.c: | ||
| 31 | * font.c: | ||
| 32 | * fontset.c: | ||
| 33 | * frame.c: | ||
| 34 | * fringe.c: | ||
| 35 | * ftfont.c: | ||
| 36 | * ftxfont.c: | ||
| 37 | * gtkutil.c: | ||
| 38 | * indent.c: | ||
| 39 | * insdel.c: | ||
| 40 | * intervals.c: | ||
| 41 | * keymap.c: | ||
| 42 | * lread.c: | ||
| 43 | * macros.c: | ||
| 44 | * marker.c: | ||
| 45 | * md5.c: | ||
| 46 | * menu.c: | ||
| 47 | * minibuf.c: | ||
| 48 | * prefix-args.c: | ||
| 49 | * print.c: | ||
| 50 | * ralloc.c: | ||
| 51 | * regex.c: | ||
| 52 | * region-cache.c: | ||
| 53 | * scroll.c: | ||
| 54 | * search.c: | ||
| 55 | * sound.c: | ||
| 56 | * strftime.c: | ||
| 57 | * syntax.c: | ||
| 58 | * sysdep.c: | ||
| 59 | * termcap.c: | ||
| 60 | * terminal.c: | ||
| 61 | * terminfo.c: | ||
| 62 | * textprop.c: | ||
| 63 | * tparam.c: | ||
| 64 | * undo.c: | ||
| 65 | * unexelf.c: | ||
| 66 | * window.c: | ||
| 67 | * xfaces.c: | ||
| 68 | * xfns.c: | ||
| 69 | * xfont.c: | ||
| 70 | * xftfont.c: | ||
| 71 | * xgselect.c: | ||
| 72 | * xmenu.c: | ||
| 73 | * xrdb.c: | ||
| 74 | * xselect.c: | ||
| 75 | * xsettings.c: | ||
| 76 | * xsmfns.c: | ||
| 77 | * xterm.c: Likewise. | ||
| 78 | |||
| 1 | 2010-07-03 Eli Zaretskii <eliz@gnu.org> | 79 | 2010-07-03 Eli Zaretskii <eliz@gnu.org> |
| 2 | 80 | ||
| 3 | * msdos.c (IT_set_frame_parameters): Fix setting of colors in | 81 | * msdos.c (IT_set_frame_parameters): Fix setting of colors in |
diff --git a/src/alloc.c b/src/alloc.c index 84b9007cdd5..0f81c943ad3 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -371,7 +371,7 @@ enum mem_type | |||
| 371 | 371 | ||
| 372 | static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type); | 372 | static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type); |
| 373 | static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); | 373 | static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); |
| 374 | void refill_memory_reserve (); | 374 | void refill_memory_reserve (void); |
| 375 | 375 | ||
| 376 | 376 | ||
| 377 | #if GC_MARK_STACK || defined GC_MALLOC_CHECK | 377 | #if GC_MARK_STACK || defined GC_MALLOC_CHECK |
| @@ -514,8 +514,7 @@ static POINTER_TYPE *pure_alloc (size_t, int); | |||
| 514 | /* Function malloc calls this if it finds we are near exhausting storage. */ | 514 | /* Function malloc calls this if it finds we are near exhausting storage. */ |
| 515 | 515 | ||
| 516 | void | 516 | void |
| 517 | malloc_warning (str) | 517 | malloc_warning (char *str) |
| 518 | char *str; | ||
| 519 | { | 518 | { |
| 520 | pending_malloc_warning = str; | 519 | pending_malloc_warning = str; |
| 521 | } | 520 | } |
| @@ -524,7 +523,7 @@ malloc_warning (str) | |||
| 524 | /* Display an already-pending malloc warning. */ | 523 | /* Display an already-pending malloc warning. */ |
| 525 | 524 | ||
| 526 | void | 525 | void |
| 527 | display_malloc_warning () | 526 | display_malloc_warning (void) |
| 528 | { | 527 | { |
| 529 | call3 (intern ("display-warning"), | 528 | call3 (intern ("display-warning"), |
| 530 | intern ("alloc"), | 529 | intern ("alloc"), |
| @@ -543,7 +542,7 @@ display_malloc_warning () | |||
| 543 | /* Called if we can't allocate relocatable space for a buffer. */ | 542 | /* Called if we can't allocate relocatable space for a buffer. */ |
| 544 | 543 | ||
| 545 | void | 544 | void |
| 546 | buffer_memory_full () | 545 | buffer_memory_full (void) |
| 547 | { | 546 | { |
| 548 | /* If buffers use the relocating allocator, no need to free | 547 | /* If buffers use the relocating allocator, no need to free |
| 549 | spare_memory, because we may have plenty of malloc space left | 548 | spare_memory, because we may have plenty of malloc space left |
| @@ -742,8 +741,7 @@ overrun_check_free (block) | |||
| 742 | /* Like malloc but check for no memory and block interrupt input.. */ | 741 | /* Like malloc but check for no memory and block interrupt input.. */ |
| 743 | 742 | ||
| 744 | POINTER_TYPE * | 743 | POINTER_TYPE * |
| 745 | xmalloc (size) | 744 | xmalloc (size_t size) |
| 746 | size_t size; | ||
| 747 | { | 745 | { |
| 748 | register POINTER_TYPE *val; | 746 | register POINTER_TYPE *val; |
| 749 | 747 | ||
| @@ -760,9 +758,7 @@ xmalloc (size) | |||
| 760 | /* Like realloc but check for no memory and block interrupt input.. */ | 758 | /* Like realloc but check for no memory and block interrupt input.. */ |
| 761 | 759 | ||
| 762 | POINTER_TYPE * | 760 | POINTER_TYPE * |
| 763 | xrealloc (block, size) | 761 | xrealloc (POINTER_TYPE *block, size_t size) |
| 764 | POINTER_TYPE *block; | ||
| 765 | size_t size; | ||
| 766 | { | 762 | { |
| 767 | register POINTER_TYPE *val; | 763 | register POINTER_TYPE *val; |
| 768 | 764 | ||
| @@ -783,8 +779,7 @@ xrealloc (block, size) | |||
| 783 | /* Like free but block interrupt input. */ | 779 | /* Like free but block interrupt input. */ |
| 784 | 780 | ||
| 785 | void | 781 | void |
| 786 | xfree (block) | 782 | xfree (POINTER_TYPE *block) |
| 787 | POINTER_TYPE *block; | ||
| 788 | { | 783 | { |
| 789 | if (!block) | 784 | if (!block) |
| 790 | return; | 785 | return; |
| @@ -800,8 +795,7 @@ xfree (block) | |||
| 800 | /* Like strdup, but uses xmalloc. */ | 795 | /* Like strdup, but uses xmalloc. */ |
| 801 | 796 | ||
| 802 | char * | 797 | char * |
| 803 | xstrdup (s) | 798 | xstrdup (const char *s) |
| 804 | const char *s; | ||
| 805 | { | 799 | { |
| 806 | size_t len = strlen (s) + 1; | 800 | size_t len = strlen (s) + 1; |
| 807 | char *p = (char *) xmalloc (len); | 801 | char *p = (char *) xmalloc (len); |
| @@ -813,8 +807,7 @@ xstrdup (s) | |||
| 813 | /* Unwind for SAFE_ALLOCA */ | 807 | /* Unwind for SAFE_ALLOCA */ |
| 814 | 808 | ||
| 815 | Lisp_Object | 809 | Lisp_Object |
| 816 | safe_alloca_unwind (arg) | 810 | safe_alloca_unwind (Lisp_Object arg) |
| 817 | Lisp_Object arg; | ||
| 818 | { | 811 | { |
| 819 | register struct Lisp_Save_Value *p = XSAVE_VALUE (arg); | 812 | register struct Lisp_Save_Value *p = XSAVE_VALUE (arg); |
| 820 | 813 | ||
| @@ -835,9 +828,7 @@ static void *lisp_malloc_loser; | |||
| 835 | #endif | 828 | #endif |
| 836 | 829 | ||
| 837 | static POINTER_TYPE * | 830 | static POINTER_TYPE * |
| 838 | lisp_malloc (nbytes, type) | 831 | lisp_malloc (size_t nbytes, enum mem_type type) |
| 839 | size_t nbytes; | ||
| 840 | enum mem_type type; | ||
| 841 | { | 832 | { |
| 842 | register void *val; | 833 | register void *val; |
| 843 | 834 | ||
| @@ -881,8 +872,7 @@ lisp_malloc (nbytes, type) | |||
| 881 | call to lisp_malloc. */ | 872 | call to lisp_malloc. */ |
| 882 | 873 | ||
| 883 | static void | 874 | static void |
| 884 | lisp_free (block) | 875 | lisp_free (POINTER_TYPE *block) |
| 885 | POINTER_TYPE *block; | ||
| 886 | { | 876 | { |
| 887 | MALLOC_BLOCK_INPUT; | 877 | MALLOC_BLOCK_INPUT; |
| 888 | free (block); | 878 | free (block); |
| @@ -981,9 +971,7 @@ static struct ablock *free_ablock; | |||
| 981 | Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be | 971 | Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be |
| 982 | smaller or equal to BLOCK_BYTES. */ | 972 | smaller or equal to BLOCK_BYTES. */ |
| 983 | static POINTER_TYPE * | 973 | static POINTER_TYPE * |
| 984 | lisp_align_malloc (nbytes, type) | 974 | lisp_align_malloc (size_t nbytes, enum mem_type type) |
| 985 | size_t nbytes; | ||
| 986 | enum mem_type type; | ||
| 987 | { | 975 | { |
| 988 | void *base, *val; | 976 | void *base, *val; |
| 989 | struct ablocks *abase; | 977 | struct ablocks *abase; |
| @@ -1090,8 +1078,7 @@ lisp_align_malloc (nbytes, type) | |||
| 1090 | } | 1078 | } |
| 1091 | 1079 | ||
| 1092 | static void | 1080 | static void |
| 1093 | lisp_align_free (block) | 1081 | lisp_align_free (POINTER_TYPE *block) |
| 1094 | POINTER_TYPE *block; | ||
| 1095 | { | 1082 | { |
| 1096 | struct ablock *ablock = block; | 1083 | struct ablock *ablock = block; |
| 1097 | struct ablocks *abase = ABLOCK_ABASE (ablock); | 1084 | struct ablocks *abase = ABLOCK_ABASE (ablock); |
| @@ -1136,7 +1123,7 @@ lisp_align_free (block) | |||
| 1136 | a call to lisp_malloc. */ | 1123 | a call to lisp_malloc. */ |
| 1137 | 1124 | ||
| 1138 | struct buffer * | 1125 | struct buffer * |
| 1139 | allocate_buffer () | 1126 | allocate_buffer (void) |
| 1140 | { | 1127 | { |
| 1141 | struct buffer *b | 1128 | struct buffer *b |
| 1142 | = (struct buffer *) lisp_malloc (sizeof (struct buffer), | 1129 | = (struct buffer *) lisp_malloc (sizeof (struct buffer), |
| @@ -1434,7 +1421,7 @@ static int n_interval_blocks; | |||
| 1434 | /* Initialize interval allocation. */ | 1421 | /* Initialize interval allocation. */ |
| 1435 | 1422 | ||
| 1436 | static void | 1423 | static void |
| 1437 | init_intervals () | 1424 | init_intervals (void) |
| 1438 | { | 1425 | { |
| 1439 | interval_block = NULL; | 1426 | interval_block = NULL; |
| 1440 | interval_block_index = INTERVAL_BLOCK_SIZE; | 1427 | interval_block_index = INTERVAL_BLOCK_SIZE; |
| @@ -1446,7 +1433,7 @@ init_intervals () | |||
| 1446 | /* Return a new interval. */ | 1433 | /* Return a new interval. */ |
| 1447 | 1434 | ||
| 1448 | INTERVAL | 1435 | INTERVAL |
| 1449 | make_interval () | 1436 | make_interval (void) |
| 1450 | { | 1437 | { |
| 1451 | INTERVAL val; | 1438 | INTERVAL val; |
| 1452 | 1439 | ||
| @@ -1489,9 +1476,7 @@ make_interval () | |||
| 1489 | /* Mark Lisp objects in interval I. */ | 1476 | /* Mark Lisp objects in interval I. */ |
| 1490 | 1477 | ||
| 1491 | static void | 1478 | static void |
| 1492 | mark_interval (i, dummy) | 1479 | mark_interval (register INTERVAL i, Lisp_Object dummy) |
| 1493 | register INTERVAL i; | ||
| 1494 | Lisp_Object dummy; | ||
| 1495 | { | 1480 | { |
| 1496 | eassert (!i->gcmarkbit); /* Intervals are never shared. */ | 1481 | eassert (!i->gcmarkbit); /* Intervals are never shared. */ |
| 1497 | i->gcmarkbit = 1; | 1482 | i->gcmarkbit = 1; |
| @@ -1503,8 +1488,7 @@ mark_interval (i, dummy) | |||
| 1503 | use the macro MARK_INTERVAL_TREE instead. */ | 1488 | use the macro MARK_INTERVAL_TREE instead. */ |
| 1504 | 1489 | ||
| 1505 | static void | 1490 | static void |
| 1506 | mark_interval_tree (tree) | 1491 | mark_interval_tree (register INTERVAL tree) |
| 1507 | register INTERVAL tree; | ||
| 1508 | { | 1492 | { |
| 1509 | /* No need to test if this tree has been marked already; this | 1493 | /* No need to test if this tree has been marked already; this |
| 1510 | function is always called through the MARK_INTERVAL_TREE macro, | 1494 | function is always called through the MARK_INTERVAL_TREE macro, |
| @@ -1751,7 +1735,7 @@ static char string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] = | |||
| 1751 | /* Initialize string allocation. Called from init_alloc_once. */ | 1735 | /* Initialize string allocation. Called from init_alloc_once. */ |
| 1752 | 1736 | ||
| 1753 | static void | 1737 | static void |
| 1754 | init_strings () | 1738 | init_strings (void) |
| 1755 | { | 1739 | { |
| 1756 | total_strings = total_free_strings = total_string_size = 0; | 1740 | total_strings = total_free_strings = total_string_size = 0; |
| 1757 | oldest_sblock = current_sblock = large_sblocks = NULL; | 1741 | oldest_sblock = current_sblock = large_sblocks = NULL; |
| @@ -1873,7 +1857,7 @@ check_string_free_list () | |||
| 1873 | /* Return a new Lisp_String. */ | 1857 | /* Return a new Lisp_String. */ |
| 1874 | 1858 | ||
| 1875 | static struct Lisp_String * | 1859 | static struct Lisp_String * |
| 1876 | allocate_string () | 1860 | allocate_string (void) |
| 1877 | { | 1861 | { |
| 1878 | struct Lisp_String *s; | 1862 | struct Lisp_String *s; |
| 1879 | 1863 | ||
| @@ -1944,9 +1928,7 @@ allocate_string () | |||
| 1944 | S->data if it was initially non-null. */ | 1928 | S->data if it was initially non-null. */ |
| 1945 | 1929 | ||
| 1946 | void | 1930 | void |
| 1947 | allocate_string_data (s, nchars, nbytes) | 1931 | allocate_string_data (struct Lisp_String *s, int nchars, int nbytes) |
| 1948 | struct Lisp_String *s; | ||
| 1949 | int nchars, nbytes; | ||
| 1950 | { | 1932 | { |
| 1951 | struct sdata *data, *old_data; | 1933 | struct sdata *data, *old_data; |
| 1952 | struct sblock *b; | 1934 | struct sblock *b; |
| @@ -2043,7 +2025,7 @@ allocate_string_data (s, nchars, nbytes) | |||
| 2043 | /* Sweep and compact strings. */ | 2025 | /* Sweep and compact strings. */ |
| 2044 | 2026 | ||
| 2045 | static void | 2027 | static void |
| 2046 | sweep_strings () | 2028 | sweep_strings (void) |
| 2047 | { | 2029 | { |
| 2048 | struct string_block *b, *next; | 2030 | struct string_block *b, *next; |
| 2049 | struct string_block *live_blocks = NULL; | 2031 | struct string_block *live_blocks = NULL; |
| @@ -2143,7 +2125,7 @@ sweep_strings () | |||
| 2143 | /* Free dead large strings. */ | 2125 | /* Free dead large strings. */ |
| 2144 | 2126 | ||
| 2145 | static void | 2127 | static void |
| 2146 | free_large_strings () | 2128 | free_large_strings (void) |
| 2147 | { | 2129 | { |
| 2148 | struct sblock *b, *next; | 2130 | struct sblock *b, *next; |
| 2149 | struct sblock *live_blocks = NULL; | 2131 | struct sblock *live_blocks = NULL; |
| @@ -2169,7 +2151,7 @@ free_large_strings () | |||
| 2169 | data of live strings after compaction. */ | 2151 | data of live strings after compaction. */ |
| 2170 | 2152 | ||
| 2171 | static void | 2153 | static void |
| 2172 | compact_small_strings () | 2154 | compact_small_strings (void) |
| 2173 | { | 2155 | { |
| 2174 | struct sblock *b, *tb, *next; | 2156 | struct sblock *b, *tb, *next; |
| 2175 | struct sdata *from, *to, *end, *tb_end; | 2157 | struct sdata *from, *to, *end, *tb_end; |
| @@ -2357,9 +2339,7 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */) | |||
| 2357 | multibyte, depending on the contents. */ | 2339 | multibyte, depending on the contents. */ |
| 2358 | 2340 | ||
| 2359 | Lisp_Object | 2341 | Lisp_Object |
| 2360 | make_string (contents, nbytes) | 2342 | make_string (const char *contents, int nbytes) |
| 2361 | const char *contents; | ||
| 2362 | int nbytes; | ||
| 2363 | { | 2343 | { |
| 2364 | register Lisp_Object val; | 2344 | register Lisp_Object val; |
| 2365 | int nchars, multibyte_nbytes; | 2345 | int nchars, multibyte_nbytes; |
| @@ -2378,9 +2358,7 @@ make_string (contents, nbytes) | |||
| 2378 | /* Make an unibyte string from LENGTH bytes at CONTENTS. */ | 2358 | /* Make an unibyte string from LENGTH bytes at CONTENTS. */ |
| 2379 | 2359 | ||
| 2380 | Lisp_Object | 2360 | Lisp_Object |
| 2381 | make_unibyte_string (contents, length) | 2361 | make_unibyte_string (const char *contents, int length) |
| 2382 | const char *contents; | ||
| 2383 | int length; | ||
| 2384 | { | 2362 | { |
| 2385 | register Lisp_Object val; | 2363 | register Lisp_Object val; |
| 2386 | val = make_uninit_string (length); | 2364 | val = make_uninit_string (length); |
| @@ -2394,9 +2372,7 @@ make_unibyte_string (contents, length) | |||
| 2394 | bytes at CONTENTS. */ | 2372 | bytes at CONTENTS. */ |
| 2395 | 2373 | ||
| 2396 | Lisp_Object | 2374 | Lisp_Object |
| 2397 | make_multibyte_string (contents, nchars, nbytes) | 2375 | make_multibyte_string (const char *contents, int nchars, int nbytes) |
| 2398 | const char *contents; | ||
| 2399 | int nchars, nbytes; | ||
| 2400 | { | 2376 | { |
| 2401 | register Lisp_Object val; | 2377 | register Lisp_Object val; |
| 2402 | val = make_uninit_multibyte_string (nchars, nbytes); | 2378 | val = make_uninit_multibyte_string (nchars, nbytes); |
| @@ -2409,9 +2385,7 @@ make_multibyte_string (contents, nchars, nbytes) | |||
| 2409 | CONTENTS. It is a multibyte string if NBYTES != NCHARS. */ | 2385 | CONTENTS. It is a multibyte string if NBYTES != NCHARS. */ |
| 2410 | 2386 | ||
| 2411 | Lisp_Object | 2387 | Lisp_Object |
| 2412 | make_string_from_bytes (contents, nchars, nbytes) | 2388 | make_string_from_bytes (const char *contents, int nchars, int nbytes) |
| 2413 | const char *contents; | ||
| 2414 | int nchars, nbytes; | ||
| 2415 | { | 2389 | { |
| 2416 | register Lisp_Object val; | 2390 | register Lisp_Object val; |
| 2417 | val = make_uninit_multibyte_string (nchars, nbytes); | 2391 | val = make_uninit_multibyte_string (nchars, nbytes); |
| @@ -2428,10 +2402,7 @@ make_string_from_bytes (contents, nchars, nbytes) | |||
| 2428 | characters by itself. */ | 2402 | characters by itself. */ |
| 2429 | 2403 | ||
| 2430 | Lisp_Object | 2404 | Lisp_Object |
| 2431 | make_specified_string (contents, nchars, nbytes, multibyte) | 2405 | make_specified_string (const char *contents, int nchars, int nbytes, int multibyte) |
| 2432 | const char *contents; | ||
| 2433 | int nchars, nbytes; | ||
| 2434 | int multibyte; | ||
| 2435 | { | 2406 | { |
| 2436 | register Lisp_Object val; | 2407 | register Lisp_Object val; |
| 2437 | 2408 | ||
| @@ -2454,8 +2425,7 @@ make_specified_string (contents, nchars, nbytes, multibyte) | |||
| 2454 | data warrants. */ | 2425 | data warrants. */ |
| 2455 | 2426 | ||
| 2456 | Lisp_Object | 2427 | Lisp_Object |
| 2457 | build_string (str) | 2428 | build_string (const char *str) |
| 2458 | const char *str; | ||
| 2459 | { | 2429 | { |
| 2460 | return make_string (str, strlen (str)); | 2430 | return make_string (str, strlen (str)); |
| 2461 | } | 2431 | } |
| @@ -2465,8 +2435,7 @@ build_string (str) | |||
| 2465 | occupying LENGTH bytes. */ | 2435 | occupying LENGTH bytes. */ |
| 2466 | 2436 | ||
| 2467 | Lisp_Object | 2437 | Lisp_Object |
| 2468 | make_uninit_string (length) | 2438 | make_uninit_string (int length) |
| 2469 | int length; | ||
| 2470 | { | 2439 | { |
| 2471 | Lisp_Object val; | 2440 | Lisp_Object val; |
| 2472 | 2441 | ||
| @@ -2482,8 +2451,7 @@ make_uninit_string (length) | |||
| 2482 | which occupy NBYTES bytes. */ | 2451 | which occupy NBYTES bytes. */ |
| 2483 | 2452 | ||
| 2484 | Lisp_Object | 2453 | Lisp_Object |
| 2485 | make_uninit_multibyte_string (nchars, nbytes) | 2454 | make_uninit_multibyte_string (int nchars, int nbytes) |
| 2486 | int nchars, nbytes; | ||
| 2487 | { | 2455 | { |
| 2488 | Lisp_Object string; | 2456 | Lisp_Object string; |
| 2489 | struct Lisp_String *s; | 2457 | struct Lisp_String *s; |
| @@ -2573,7 +2541,7 @@ struct Lisp_Float *float_free_list; | |||
| 2573 | /* Initialize float allocation. */ | 2541 | /* Initialize float allocation. */ |
| 2574 | 2542 | ||
| 2575 | static void | 2543 | static void |
| 2576 | init_float () | 2544 | init_float (void) |
| 2577 | { | 2545 | { |
| 2578 | float_block = NULL; | 2546 | float_block = NULL; |
| 2579 | float_block_index = FLOAT_BLOCK_SIZE; /* Force alloc of new float_block. */ | 2547 | float_block_index = FLOAT_BLOCK_SIZE; /* Force alloc of new float_block. */ |
| @@ -2585,8 +2553,7 @@ init_float () | |||
| 2585 | /* Explicitly free a float cell by putting it on the free-list. */ | 2553 | /* Explicitly free a float cell by putting it on the free-list. */ |
| 2586 | 2554 | ||
| 2587 | static void | 2555 | static void |
| 2588 | free_float (ptr) | 2556 | free_float (struct Lisp_Float *ptr) |
| 2589 | struct Lisp_Float *ptr; | ||
| 2590 | { | 2557 | { |
| 2591 | ptr->u.chain = float_free_list; | 2558 | ptr->u.chain = float_free_list; |
| 2592 | float_free_list = ptr; | 2559 | float_free_list = ptr; |
| @@ -2596,8 +2563,7 @@ free_float (ptr) | |||
| 2596 | /* Return a new float object with value FLOAT_VALUE. */ | 2563 | /* Return a new float object with value FLOAT_VALUE. */ |
| 2597 | 2564 | ||
| 2598 | Lisp_Object | 2565 | Lisp_Object |
| 2599 | make_float (float_value) | 2566 | make_float (double float_value) |
| 2600 | double float_value; | ||
| 2601 | { | 2567 | { |
| 2602 | register Lisp_Object val; | 2568 | register Lisp_Object val; |
| 2603 | 2569 | ||
| @@ -2697,7 +2663,7 @@ static int n_cons_blocks; | |||
| 2697 | /* Initialize cons allocation. */ | 2663 | /* Initialize cons allocation. */ |
| 2698 | 2664 | ||
| 2699 | static void | 2665 | static void |
| 2700 | init_cons () | 2666 | init_cons (void) |
| 2701 | { | 2667 | { |
| 2702 | cons_block = NULL; | 2668 | cons_block = NULL; |
| 2703 | cons_block_index = CONS_BLOCK_SIZE; /* Force alloc of new cons_block. */ | 2669 | cons_block_index = CONS_BLOCK_SIZE; /* Force alloc of new cons_block. */ |
| @@ -2709,8 +2675,7 @@ init_cons () | |||
| 2709 | /* Explicitly free a cons cell by putting it on the free-list. */ | 2675 | /* Explicitly free a cons cell by putting it on the free-list. */ |
| 2710 | 2676 | ||
| 2711 | void | 2677 | void |
| 2712 | free_cons (ptr) | 2678 | free_cons (struct Lisp_Cons *ptr) |
| 2713 | struct Lisp_Cons *ptr; | ||
| 2714 | { | 2679 | { |
| 2715 | ptr->u.chain = cons_free_list; | 2680 | ptr->u.chain = cons_free_list; |
| 2716 | #if GC_MARK_STACK | 2681 | #if GC_MARK_STACK |
| @@ -2766,7 +2731,7 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2766 | 2731 | ||
| 2767 | /* Get an error now if there's any junk in the cons free list. */ | 2732 | /* Get an error now if there's any junk in the cons free list. */ |
| 2768 | void | 2733 | void |
| 2769 | check_cons_list () | 2734 | check_cons_list (void) |
| 2770 | { | 2735 | { |
| 2771 | #ifdef GC_CHECK_CONS_LIST | 2736 | #ifdef GC_CHECK_CONS_LIST |
| 2772 | struct Lisp_Cons *tail = cons_free_list; | 2737 | struct Lisp_Cons *tail = cons_free_list; |
| @@ -2779,39 +2744,34 @@ check_cons_list () | |||
| 2779 | /* Make a list of 1, 2, 3, 4 or 5 specified objects. */ | 2744 | /* Make a list of 1, 2, 3, 4 or 5 specified objects. */ |
| 2780 | 2745 | ||
| 2781 | Lisp_Object | 2746 | Lisp_Object |
| 2782 | list1 (arg1) | 2747 | list1 (Lisp_Object arg1) |
| 2783 | Lisp_Object arg1; | ||
| 2784 | { | 2748 | { |
| 2785 | return Fcons (arg1, Qnil); | 2749 | return Fcons (arg1, Qnil); |
| 2786 | } | 2750 | } |
| 2787 | 2751 | ||
| 2788 | Lisp_Object | 2752 | Lisp_Object |
| 2789 | list2 (arg1, arg2) | 2753 | list2 (Lisp_Object arg1, Lisp_Object arg2) |
| 2790 | Lisp_Object arg1, arg2; | ||
| 2791 | { | 2754 | { |
| 2792 | return Fcons (arg1, Fcons (arg2, Qnil)); | 2755 | return Fcons (arg1, Fcons (arg2, Qnil)); |
| 2793 | } | 2756 | } |
| 2794 | 2757 | ||
| 2795 | 2758 | ||
| 2796 | Lisp_Object | 2759 | Lisp_Object |
| 2797 | list3 (arg1, arg2, arg3) | 2760 | list3 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| 2798 | Lisp_Object arg1, arg2, arg3; | ||
| 2799 | { | 2761 | { |
| 2800 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil))); | 2762 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil))); |
| 2801 | } | 2763 | } |
| 2802 | 2764 | ||
| 2803 | 2765 | ||
| 2804 | Lisp_Object | 2766 | Lisp_Object |
| 2805 | list4 (arg1, arg2, arg3, arg4) | 2767 | list4 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4) |
| 2806 | Lisp_Object arg1, arg2, arg3, arg4; | ||
| 2807 | { | 2768 | { |
| 2808 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil)))); | 2769 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil)))); |
| 2809 | } | 2770 | } |
| 2810 | 2771 | ||
| 2811 | 2772 | ||
| 2812 | Lisp_Object | 2773 | Lisp_Object |
| 2813 | list5 (arg1, arg2, arg3, arg4, arg5) | 2774 | list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, Lisp_Object arg5) |
| 2814 | Lisp_Object arg1, arg2, arg3, arg4, arg5; | ||
| 2815 | { | 2775 | { |
| 2816 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, | 2776 | return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, |
| 2817 | Fcons (arg5, Qnil))))); | 2777 | Fcons (arg5, Qnil))))); |
| @@ -2904,8 +2864,7 @@ static int n_vectors; | |||
| 2904 | with room for LEN Lisp_Objects. */ | 2864 | with room for LEN Lisp_Objects. */ |
| 2905 | 2865 | ||
| 2906 | static struct Lisp_Vector * | 2866 | static struct Lisp_Vector * |
| 2907 | allocate_vectorlike (len) | 2867 | allocate_vectorlike (EMACS_INT len) |
| 2908 | EMACS_INT len; | ||
| 2909 | { | 2868 | { |
| 2910 | struct Lisp_Vector *p; | 2869 | struct Lisp_Vector *p; |
| 2911 | size_t nbytes; | 2870 | size_t nbytes; |
| @@ -2946,8 +2905,7 @@ allocate_vectorlike (len) | |||
| 2946 | /* Allocate a vector with NSLOTS slots. */ | 2905 | /* Allocate a vector with NSLOTS slots. */ |
| 2947 | 2906 | ||
| 2948 | struct Lisp_Vector * | 2907 | struct Lisp_Vector * |
| 2949 | allocate_vector (nslots) | 2908 | allocate_vector (EMACS_INT nslots) |
| 2950 | EMACS_INT nslots; | ||
| 2951 | { | 2909 | { |
| 2952 | struct Lisp_Vector *v = allocate_vectorlike (nslots); | 2910 | struct Lisp_Vector *v = allocate_vectorlike (nslots); |
| 2953 | v->size = nslots; | 2911 | v->size = nslots; |
| @@ -2958,9 +2916,7 @@ allocate_vector (nslots) | |||
| 2958 | /* Allocate other vector-like structures. */ | 2916 | /* Allocate other vector-like structures. */ |
| 2959 | 2917 | ||
| 2960 | struct Lisp_Vector * | 2918 | struct Lisp_Vector * |
| 2961 | allocate_pseudovector (memlen, lisplen, tag) | 2919 | allocate_pseudovector (int memlen, int lisplen, EMACS_INT tag) |
| 2962 | int memlen, lisplen; | ||
| 2963 | EMACS_INT tag; | ||
| 2964 | { | 2920 | { |
| 2965 | struct Lisp_Vector *v = allocate_vectorlike (memlen); | 2921 | struct Lisp_Vector *v = allocate_vectorlike (memlen); |
| 2966 | EMACS_INT i; | 2922 | EMACS_INT i; |
| @@ -2982,14 +2938,14 @@ allocate_hash_table (void) | |||
| 2982 | 2938 | ||
| 2983 | 2939 | ||
| 2984 | struct window * | 2940 | struct window * |
| 2985 | allocate_window () | 2941 | allocate_window (void) |
| 2986 | { | 2942 | { |
| 2987 | return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW); | 2943 | return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW); |
| 2988 | } | 2944 | } |
| 2989 | 2945 | ||
| 2990 | 2946 | ||
| 2991 | struct terminal * | 2947 | struct terminal * |
| 2992 | allocate_terminal () | 2948 | allocate_terminal (void) |
| 2993 | { | 2949 | { |
| 2994 | struct terminal *t = ALLOCATE_PSEUDOVECTOR (struct terminal, | 2950 | struct terminal *t = ALLOCATE_PSEUDOVECTOR (struct terminal, |
| 2995 | next_terminal, PVEC_TERMINAL); | 2951 | next_terminal, PVEC_TERMINAL); |
| @@ -3001,7 +2957,7 @@ allocate_terminal () | |||
| 3001 | } | 2957 | } |
| 3002 | 2958 | ||
| 3003 | struct frame * | 2959 | struct frame * |
| 3004 | allocate_frame () | 2960 | allocate_frame (void) |
| 3005 | { | 2961 | { |
| 3006 | struct frame *f = ALLOCATE_PSEUDOVECTOR (struct frame, | 2962 | struct frame *f = ALLOCATE_PSEUDOVECTOR (struct frame, |
| 3007 | face_cache, PVEC_FRAME); | 2963 | face_cache, PVEC_FRAME); |
| @@ -3013,7 +2969,7 @@ allocate_frame () | |||
| 3013 | 2969 | ||
| 3014 | 2970 | ||
| 3015 | struct Lisp_Process * | 2971 | struct Lisp_Process * |
| 3016 | allocate_process () | 2972 | allocate_process (void) |
| 3017 | { | 2973 | { |
| 3018 | return ALLOCATE_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS); | 2974 | return ALLOCATE_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS); |
| 3019 | } | 2975 | } |
| @@ -3142,7 +3098,7 @@ static int n_symbol_blocks; | |||
| 3142 | /* Initialize symbol allocation. */ | 3098 | /* Initialize symbol allocation. */ |
| 3143 | 3099 | ||
| 3144 | static void | 3100 | static void |
| 3145 | init_symbol () | 3101 | init_symbol (void) |
| 3146 | { | 3102 | { |
| 3147 | symbol_block = NULL; | 3103 | symbol_block = NULL; |
| 3148 | symbol_block_index = SYMBOL_BLOCK_SIZE; | 3104 | symbol_block_index = SYMBOL_BLOCK_SIZE; |
| @@ -3233,7 +3189,7 @@ static union Lisp_Misc *marker_free_list; | |||
| 3233 | static int n_marker_blocks; | 3189 | static int n_marker_blocks; |
| 3234 | 3190 | ||
| 3235 | static void | 3191 | static void |
| 3236 | init_marker () | 3192 | init_marker (void) |
| 3237 | { | 3193 | { |
| 3238 | marker_block = NULL; | 3194 | marker_block = NULL; |
| 3239 | marker_block_index = MARKER_BLOCK_SIZE; | 3195 | marker_block_index = MARKER_BLOCK_SIZE; |
| @@ -3244,7 +3200,7 @@ init_marker () | |||
| 3244 | /* Return a newly allocated Lisp_Misc object, with no substructure. */ | 3200 | /* Return a newly allocated Lisp_Misc object, with no substructure. */ |
| 3245 | 3201 | ||
| 3246 | Lisp_Object | 3202 | Lisp_Object |
| 3247 | allocate_misc () | 3203 | allocate_misc (void) |
| 3248 | { | 3204 | { |
| 3249 | Lisp_Object val; | 3205 | Lisp_Object val; |
| 3250 | 3206 | ||
| @@ -3286,8 +3242,7 @@ allocate_misc () | |||
| 3286 | /* Free a Lisp_Misc object */ | 3242 | /* Free a Lisp_Misc object */ |
| 3287 | 3243 | ||
| 3288 | void | 3244 | void |
| 3289 | free_misc (misc) | 3245 | free_misc (Lisp_Object misc) |
| 3290 | Lisp_Object misc; | ||
| 3291 | { | 3246 | { |
| 3292 | XMISCTYPE (misc) = Lisp_Misc_Free; | 3247 | XMISCTYPE (misc) = Lisp_Misc_Free; |
| 3293 | XMISC (misc)->u_free.chain = marker_free_list; | 3248 | XMISC (misc)->u_free.chain = marker_free_list; |
| @@ -3301,9 +3256,7 @@ free_misc (misc) | |||
| 3301 | The unwind function can get the C values back using XSAVE_VALUE. */ | 3256 | The unwind function can get the C values back using XSAVE_VALUE. */ |
| 3302 | 3257 | ||
| 3303 | Lisp_Object | 3258 | Lisp_Object |
| 3304 | make_save_value (pointer, integer) | 3259 | make_save_value (void *pointer, int integer) |
| 3305 | void *pointer; | ||
| 3306 | int integer; | ||
| 3307 | { | 3260 | { |
| 3308 | register Lisp_Object val; | 3261 | register Lisp_Object val; |
| 3309 | register struct Lisp_Save_Value *p; | 3262 | register struct Lisp_Save_Value *p; |
| @@ -3338,8 +3291,7 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, | |||
| 3338 | /* Put MARKER back on the free list after using it temporarily. */ | 3291 | /* Put MARKER back on the free list after using it temporarily. */ |
| 3339 | 3292 | ||
| 3340 | void | 3293 | void |
| 3341 | free_marker (marker) | 3294 | free_marker (Lisp_Object marker) |
| 3342 | Lisp_Object marker; | ||
| 3343 | { | 3295 | { |
| 3344 | unchain_marker (XMARKER (marker)); | 3296 | unchain_marker (XMARKER (marker)); |
| 3345 | free_misc (marker); | 3297 | free_misc (marker); |
| @@ -3353,9 +3305,7 @@ free_marker (marker) | |||
| 3353 | Any number of arguments, even zero arguments, are allowed. */ | 3305 | Any number of arguments, even zero arguments, are allowed. */ |
| 3354 | 3306 | ||
| 3355 | Lisp_Object | 3307 | Lisp_Object |
| 3356 | make_event_array (nargs, args) | 3308 | make_event_array (register int nargs, Lisp_Object *args) |
| 3357 | register int nargs; | ||
| 3358 | Lisp_Object *args; | ||
| 3359 | { | 3309 | { |
| 3360 | int i; | 3310 | int i; |
| 3361 | 3311 | ||
| @@ -3395,7 +3345,7 @@ make_event_array (nargs, args) | |||
| 3395 | /* Called if malloc returns zero. */ | 3345 | /* Called if malloc returns zero. */ |
| 3396 | 3346 | ||
| 3397 | void | 3347 | void |
| 3398 | memory_full () | 3348 | memory_full (void) |
| 3399 | { | 3349 | { |
| 3400 | int i; | 3350 | int i; |
| 3401 | 3351 | ||
| @@ -3435,7 +3385,7 @@ memory_full () | |||
| 3435 | and also directly from this file, in case we're not using ralloc.c. */ | 3385 | and also directly from this file, in case we're not using ralloc.c. */ |
| 3436 | 3386 | ||
| 3437 | void | 3387 | void |
| 3438 | refill_memory_reserve () | 3388 | refill_memory_reserve (void) |
| 3439 | { | 3389 | { |
| 3440 | #ifndef SYSTEM_MALLOC | 3390 | #ifndef SYSTEM_MALLOC |
| 3441 | if (spare_memory[0] == 0) | 3391 | if (spare_memory[0] == 0) |
| @@ -3483,7 +3433,7 @@ refill_memory_reserve () | |||
| 3483 | /* Initialize this part of alloc.c. */ | 3433 | /* Initialize this part of alloc.c. */ |
| 3484 | 3434 | ||
| 3485 | static void | 3435 | static void |
| 3486 | mem_init () | 3436 | mem_init (void) |
| 3487 | { | 3437 | { |
| 3488 | mem_z.left = mem_z.right = MEM_NIL; | 3438 | mem_z.left = mem_z.right = MEM_NIL; |
| 3489 | mem_z.parent = NULL; | 3439 | mem_z.parent = NULL; |
| @@ -3497,8 +3447,7 @@ mem_init () | |||
| 3497 | MEM_NIL if there is no node in the tree containing START. */ | 3447 | MEM_NIL if there is no node in the tree containing START. */ |
| 3498 | 3448 | ||
| 3499 | static INLINE struct mem_node * | 3449 | static INLINE struct mem_node * |
| 3500 | mem_find (start) | 3450 | mem_find (void *start) |
| 3501 | void *start; | ||
| 3502 | { | 3451 | { |
| 3503 | struct mem_node *p; | 3452 | struct mem_node *p; |
| 3504 | 3453 | ||
| @@ -3521,9 +3470,7 @@ mem_find (start) | |||
| 3521 | pointer to the node that was inserted. */ | 3470 | pointer to the node that was inserted. */ |
| 3522 | 3471 | ||
| 3523 | static struct mem_node * | 3472 | static struct mem_node * |
| 3524 | mem_insert (start, end, type) | 3473 | mem_insert (void *start, void *end, enum mem_type type) |
| 3525 | void *start, *end; | ||
| 3526 | enum mem_type type; | ||
| 3527 | { | 3474 | { |
| 3528 | struct mem_node *c, *parent, *x; | 3475 | struct mem_node *c, *parent, *x; |
| 3529 | 3476 | ||
| @@ -3595,8 +3542,7 @@ mem_insert (start, end, type) | |||
| 3595 | balance the tree, after node X has been inserted; X is always red. */ | 3542 | balance the tree, after node X has been inserted; X is always red. */ |
| 3596 | 3543 | ||
| 3597 | static void | 3544 | static void |
| 3598 | mem_insert_fixup (x) | 3545 | mem_insert_fixup (struct mem_node *x) |
| 3599 | struct mem_node *x; | ||
| 3600 | { | 3546 | { |
| 3601 | while (x != mem_root && x->parent->color == MEM_RED) | 3547 | while (x != mem_root && x->parent->color == MEM_RED) |
| 3602 | { | 3548 | { |
| @@ -3674,8 +3620,7 @@ mem_insert_fixup (x) | |||
| 3674 | b c a b */ | 3620 | b c a b */ |
| 3675 | 3621 | ||
| 3676 | static void | 3622 | static void |
| 3677 | mem_rotate_left (x) | 3623 | mem_rotate_left (struct mem_node *x) |
| 3678 | struct mem_node *x; | ||
| 3679 | { | 3624 | { |
| 3680 | struct mem_node *y; | 3625 | struct mem_node *y; |
| 3681 | 3626 | ||
| @@ -3714,8 +3659,7 @@ mem_rotate_left (x) | |||
| 3714 | a b b c */ | 3659 | a b b c */ |
| 3715 | 3660 | ||
| 3716 | static void | 3661 | static void |
| 3717 | mem_rotate_right (x) | 3662 | mem_rotate_right (struct mem_node *x) |
| 3718 | struct mem_node *x; | ||
| 3719 | { | 3663 | { |
| 3720 | struct mem_node *y = x->left; | 3664 | struct mem_node *y = x->left; |
| 3721 | 3665 | ||
| @@ -3744,8 +3688,7 @@ mem_rotate_right (x) | |||
| 3744 | /* Delete node Z from the tree. If Z is null or MEM_NIL, do nothing. */ | 3688 | /* Delete node Z from the tree. If Z is null or MEM_NIL, do nothing. */ |
| 3745 | 3689 | ||
| 3746 | static void | 3690 | static void |
| 3747 | mem_delete (z) | 3691 | mem_delete (struct mem_node *z) |
| 3748 | struct mem_node *z; | ||
| 3749 | { | 3692 | { |
| 3750 | struct mem_node *x, *y; | 3693 | struct mem_node *x, *y; |
| 3751 | 3694 | ||
| @@ -3799,8 +3742,7 @@ mem_delete (z) | |||
| 3799 | deletion. */ | 3742 | deletion. */ |
| 3800 | 3743 | ||
| 3801 | static void | 3744 | static void |
| 3802 | mem_delete_fixup (x) | 3745 | mem_delete_fixup (struct mem_node *x) |
| 3803 | struct mem_node *x; | ||
| 3804 | { | 3746 | { |
| 3805 | while (x != mem_root && x->color == MEM_BLACK) | 3747 | while (x != mem_root && x->color == MEM_BLACK) |
| 3806 | { | 3748 | { |
| @@ -3881,9 +3823,7 @@ mem_delete_fixup (x) | |||
| 3881 | the heap. M is a pointer to the mem_block for P. */ | 3823 | the heap. M is a pointer to the mem_block for P. */ |
| 3882 | 3824 | ||
| 3883 | static INLINE int | 3825 | static INLINE int |
| 3884 | live_string_p (m, p) | 3826 | live_string_p (struct mem_node *m, void *p) |
| 3885 | struct mem_node *m; | ||
| 3886 | void *p; | ||
| 3887 | { | 3827 | { |
| 3888 | if (m->type == MEM_TYPE_STRING) | 3828 | if (m->type == MEM_TYPE_STRING) |
| 3889 | { | 3829 | { |
| @@ -3906,9 +3846,7 @@ live_string_p (m, p) | |||
| 3906 | the heap. M is a pointer to the mem_block for P. */ | 3846 | the heap. M is a pointer to the mem_block for P. */ |
| 3907 | 3847 | ||
| 3908 | static INLINE int | 3848 | static INLINE int |
| 3909 | live_cons_p (m, p) | 3849 | live_cons_p (struct mem_node *m, void *p) |
| 3910 | struct mem_node *m; | ||
| 3911 | void *p; | ||
| 3912 | { | 3850 | { |
| 3913 | if (m->type == MEM_TYPE_CONS) | 3851 | if (m->type == MEM_TYPE_CONS) |
| 3914 | { | 3852 | { |
| @@ -3934,9 +3872,7 @@ live_cons_p (m, p) | |||
| 3934 | the heap. M is a pointer to the mem_block for P. */ | 3872 | the heap. M is a pointer to the mem_block for P. */ |
| 3935 | 3873 | ||
| 3936 | static INLINE int | 3874 | static INLINE int |
| 3937 | live_symbol_p (m, p) | 3875 | live_symbol_p (struct mem_node *m, void *p) |
| 3938 | struct mem_node *m; | ||
| 3939 | void *p; | ||
| 3940 | { | 3876 | { |
| 3941 | if (m->type == MEM_TYPE_SYMBOL) | 3877 | if (m->type == MEM_TYPE_SYMBOL) |
| 3942 | { | 3878 | { |
| @@ -3962,9 +3898,7 @@ live_symbol_p (m, p) | |||
| 3962 | the heap. M is a pointer to the mem_block for P. */ | 3898 | the heap. M is a pointer to the mem_block for P. */ |
| 3963 | 3899 | ||
| 3964 | static INLINE int | 3900 | static INLINE int |
| 3965 | live_float_p (m, p) | 3901 | live_float_p (struct mem_node *m, void *p) |
| 3966 | struct mem_node *m; | ||
| 3967 | void *p; | ||
| 3968 | { | 3902 | { |
| 3969 | if (m->type == MEM_TYPE_FLOAT) | 3903 | if (m->type == MEM_TYPE_FLOAT) |
| 3970 | { | 3904 | { |
| @@ -3988,9 +3922,7 @@ live_float_p (m, p) | |||
| 3988 | the heap. M is a pointer to the mem_block for P. */ | 3922 | the heap. M is a pointer to the mem_block for P. */ |
| 3989 | 3923 | ||
| 3990 | static INLINE int | 3924 | static INLINE int |
| 3991 | live_misc_p (m, p) | 3925 | live_misc_p (struct mem_node *m, void *p) |
| 3992 | struct mem_node *m; | ||
| 3993 | void *p; | ||
| 3994 | { | 3926 | { |
| 3995 | if (m->type == MEM_TYPE_MISC) | 3927 | if (m->type == MEM_TYPE_MISC) |
| 3996 | { | 3928 | { |
| @@ -4016,9 +3948,7 @@ live_misc_p (m, p) | |||
| 4016 | M is a pointer to the mem_block for P. */ | 3948 | M is a pointer to the mem_block for P. */ |
| 4017 | 3949 | ||
| 4018 | static INLINE int | 3950 | static INLINE int |
| 4019 | live_vector_p (m, p) | 3951 | live_vector_p (struct mem_node *m, void *p) |
| 4020 | struct mem_node *m; | ||
| 4021 | void *p; | ||
| 4022 | { | 3952 | { |
| 4023 | return (p == m->start && m->type == MEM_TYPE_VECTORLIKE); | 3953 | return (p == m->start && m->type == MEM_TYPE_VECTORLIKE); |
| 4024 | } | 3954 | } |
| @@ -4028,9 +3958,7 @@ live_vector_p (m, p) | |||
| 4028 | pointer to the mem_block for P. */ | 3958 | pointer to the mem_block for P. */ |
| 4029 | 3959 | ||
| 4030 | static INLINE int | 3960 | static INLINE int |
| 4031 | live_buffer_p (m, p) | 3961 | live_buffer_p (struct mem_node *m, void *p) |
| 4032 | struct mem_node *m; | ||
| 4033 | void *p; | ||
| 4034 | { | 3962 | { |
| 4035 | /* P must point to the start of the block, and the buffer | 3963 | /* P must point to the start of the block, and the buffer |
| 4036 | must not have been killed. */ | 3964 | must not have been killed. */ |
| @@ -4096,8 +4024,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", | |||
| 4096 | /* Mark OBJ if we can prove it's a Lisp_Object. */ | 4024 | /* Mark OBJ if we can prove it's a Lisp_Object. */ |
| 4097 | 4025 | ||
| 4098 | static INLINE void | 4026 | static INLINE void |
| 4099 | mark_maybe_object (obj) | 4027 | mark_maybe_object (Lisp_Object obj) |
| 4100 | Lisp_Object obj; | ||
| 4101 | { | 4028 | { |
| 4102 | void *po = (void *) XPNTR (obj); | 4029 | void *po = (void *) XPNTR (obj); |
| 4103 | struct mem_node *m = mem_find (po); | 4030 | struct mem_node *m = mem_find (po); |
| @@ -4160,8 +4087,7 @@ mark_maybe_object (obj) | |||
| 4160 | marked. */ | 4087 | marked. */ |
| 4161 | 4088 | ||
| 4162 | static INLINE void | 4089 | static INLINE void |
| 4163 | mark_maybe_pointer (p) | 4090 | mark_maybe_pointer (void *p) |
| 4164 | void *p; | ||
| 4165 | { | 4091 | { |
| 4166 | struct mem_node *m; | 4092 | struct mem_node *m; |
| 4167 | 4093 | ||
| @@ -4241,9 +4167,7 @@ mark_maybe_pointer (p) | |||
| 4241 | or END+OFFSET..START. */ | 4167 | or END+OFFSET..START. */ |
| 4242 | 4168 | ||
| 4243 | static void | 4169 | static void |
| 4244 | mark_memory (start, end, offset) | 4170 | mark_memory (void *start, void *end, int offset) |
| 4245 | void *start, *end; | ||
| 4246 | int offset; | ||
| 4247 | { | 4171 | { |
| 4248 | Lisp_Object *p; | 4172 | Lisp_Object *p; |
| 4249 | void **pp; | 4173 | void **pp; |
| @@ -4459,7 +4383,7 @@ dump_zombies () | |||
| 4459 | equally on the stack. */ | 4383 | equally on the stack. */ |
| 4460 | 4384 | ||
| 4461 | static void | 4385 | static void |
| 4462 | mark_stack () | 4386 | mark_stack (void) |
| 4463 | { | 4387 | { |
| 4464 | int i; | 4388 | int i; |
| 4465 | /* jmp_buf may not be aligned enough on darwin-ppc64 */ | 4389 | /* jmp_buf may not be aligned enough on darwin-ppc64 */ |
| @@ -4534,8 +4458,7 @@ mark_stack () | |||
| 4534 | 4458 | ||
| 4535 | /* Determine whether it is safe to access memory at address P. */ | 4459 | /* Determine whether it is safe to access memory at address P. */ |
| 4536 | static int | 4460 | static int |
| 4537 | valid_pointer_p (p) | 4461 | valid_pointer_p (void *p) |
| 4538 | void *p; | ||
| 4539 | { | 4462 | { |
| 4540 | #ifdef WINDOWSNT | 4463 | #ifdef WINDOWSNT |
| 4541 | return w32_valid_pointer_p (p, 16); | 4464 | return w32_valid_pointer_p (p, 16); |
| @@ -4566,8 +4489,7 @@ valid_pointer_p (p) | |||
| 4566 | so it should only be used in code for manual debugging. */ | 4489 | so it should only be used in code for manual debugging. */ |
| 4567 | 4490 | ||
| 4568 | int | 4491 | int |
| 4569 | valid_lisp_object_p (obj) | 4492 | valid_lisp_object_p (Lisp_Object obj) |
| 4570 | Lisp_Object obj; | ||
| 4571 | { | 4493 | { |
| 4572 | void *p; | 4494 | void *p; |
| 4573 | #if GC_MARK_STACK | 4495 | #if GC_MARK_STACK |
| @@ -4645,9 +4567,7 @@ valid_lisp_object_p (obj) | |||
| 4645 | allocated. TYPE < 0 means it's not used for a Lisp object. */ | 4567 | allocated. TYPE < 0 means it's not used for a Lisp object. */ |
| 4646 | 4568 | ||
| 4647 | static POINTER_TYPE * | 4569 | static POINTER_TYPE * |
| 4648 | pure_alloc (size, type) | 4570 | pure_alloc (size_t size, int type) |
| 4649 | size_t size; | ||
| 4650 | int type; | ||
| 4651 | { | 4571 | { |
| 4652 | POINTER_TYPE *result; | 4572 | POINTER_TYPE *result; |
| 4653 | #ifdef USE_LSB_TAG | 4573 | #ifdef USE_LSB_TAG |
| @@ -4701,7 +4621,7 @@ pure_alloc (size, type) | |||
| 4701 | /* Print a warning if PURESIZE is too small. */ | 4621 | /* Print a warning if PURESIZE is too small. */ |
| 4702 | 4622 | ||
| 4703 | void | 4623 | void |
| 4704 | check_pure_size () | 4624 | check_pure_size (void) |
| 4705 | { | 4625 | { |
| 4706 | if (pure_bytes_used_before_overflow) | 4626 | if (pure_bytes_used_before_overflow) |
| 4707 | message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)", | 4627 | message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)", |
| @@ -4714,9 +4634,7 @@ check_pure_size () | |||
| 4714 | address. Return NULL if not found. */ | 4634 | address. Return NULL if not found. */ |
| 4715 | 4635 | ||
| 4716 | static char * | 4636 | static char * |
| 4717 | find_string_data_in_pure (data, nbytes) | 4637 | find_string_data_in_pure (const char *data, int nbytes) |
| 4718 | const char *data; | ||
| 4719 | int nbytes; | ||
| 4720 | { | 4638 | { |
| 4721 | int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; | 4639 | int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; |
| 4722 | const unsigned char *p; | 4640 | const unsigned char *p; |
| @@ -4785,10 +4703,7 @@ find_string_data_in_pure (data, nbytes) | |||
| 4785 | string; then the string is not protected from gc. */ | 4703 | string; then the string is not protected from gc. */ |
| 4786 | 4704 | ||
| 4787 | Lisp_Object | 4705 | Lisp_Object |
| 4788 | make_pure_string (data, nchars, nbytes, multibyte) | 4706 | make_pure_string (const char *data, int nchars, int nbytes, int multibyte) |
| 4789 | const char *data; | ||
| 4790 | int nchars, nbytes; | ||
| 4791 | int multibyte; | ||
| 4792 | { | 4707 | { |
| 4793 | Lisp_Object string; | 4708 | Lisp_Object string; |
| 4794 | struct Lisp_String *s; | 4709 | struct Lisp_String *s; |
| @@ -4831,8 +4746,7 @@ make_pure_c_string (const char *data) | |||
| 4831 | of CAR as car and CDR as cdr. */ | 4746 | of CAR as car and CDR as cdr. */ |
| 4832 | 4747 | ||
| 4833 | Lisp_Object | 4748 | Lisp_Object |
| 4834 | pure_cons (car, cdr) | 4749 | pure_cons (Lisp_Object car, Lisp_Object cdr) |
| 4835 | Lisp_Object car, cdr; | ||
| 4836 | { | 4750 | { |
| 4837 | register Lisp_Object new; | 4751 | register Lisp_Object new; |
| 4838 | struct Lisp_Cons *p; | 4752 | struct Lisp_Cons *p; |
| @@ -4848,8 +4762,7 @@ pure_cons (car, cdr) | |||
| 4848 | /* Value is a float object with value NUM allocated from pure space. */ | 4762 | /* Value is a float object with value NUM allocated from pure space. */ |
| 4849 | 4763 | ||
| 4850 | static Lisp_Object | 4764 | static Lisp_Object |
| 4851 | make_pure_float (num) | 4765 | make_pure_float (double num) |
| 4852 | double num; | ||
| 4853 | { | 4766 | { |
| 4854 | register Lisp_Object new; | 4767 | register Lisp_Object new; |
| 4855 | struct Lisp_Float *p; | 4768 | struct Lisp_Float *p; |
| @@ -4865,8 +4778,7 @@ make_pure_float (num) | |||
| 4865 | pure space. */ | 4778 | pure space. */ |
| 4866 | 4779 | ||
| 4867 | Lisp_Object | 4780 | Lisp_Object |
| 4868 | make_pure_vector (len) | 4781 | make_pure_vector (EMACS_INT len) |
| 4869 | EMACS_INT len; | ||
| 4870 | { | 4782 | { |
| 4871 | Lisp_Object new; | 4783 | Lisp_Object new; |
| 4872 | struct Lisp_Vector *p; | 4784 | struct Lisp_Vector *p; |
| @@ -4949,8 +4861,7 @@ Does not copy symbols. Copies strings without text properties. */) | |||
| 4949 | VARADDRESS. */ | 4861 | VARADDRESS. */ |
| 4950 | 4862 | ||
| 4951 | void | 4863 | void |
| 4952 | staticpro (varaddress) | 4864 | staticpro (Lisp_Object *varaddress) |
| 4953 | Lisp_Object *varaddress; | ||
| 4954 | { | 4865 | { |
| 4955 | staticvec[staticidx++] = varaddress; | 4866 | staticvec[staticidx++] = varaddress; |
| 4956 | if (staticidx >= NSTATICS) | 4867 | if (staticidx >= NSTATICS) |
| @@ -4965,7 +4876,7 @@ staticpro (varaddress) | |||
| 4965 | /* Temporarily prevent garbage collection. */ | 4876 | /* Temporarily prevent garbage collection. */ |
| 4966 | 4877 | ||
| 4967 | int | 4878 | int |
| 4968 | inhibit_garbage_collection () | 4879 | inhibit_garbage_collection (void) |
| 4969 | { | 4880 | { |
| 4970 | int count = SPECPDL_INDEX (); | 4881 | int count = SPECPDL_INDEX (); |
| 4971 | int nbits = min (VALBITS, BITS_PER_INT); | 4882 | int nbits = min (VALBITS, BITS_PER_INT); |
| @@ -5297,8 +5208,7 @@ returns nil, because real GC can't be done. */) | |||
| 5297 | only interesting objects referenced from glyphs are strings. */ | 5208 | only interesting objects referenced from glyphs are strings. */ |
| 5298 | 5209 | ||
| 5299 | static void | 5210 | static void |
| 5300 | mark_glyph_matrix (matrix) | 5211 | mark_glyph_matrix (struct glyph_matrix *matrix) |
| 5301 | struct glyph_matrix *matrix; | ||
| 5302 | { | 5212 | { |
| 5303 | struct glyph_row *row = matrix->rows; | 5213 | struct glyph_row *row = matrix->rows; |
| 5304 | struct glyph_row *end = row + matrix->nrows; | 5214 | struct glyph_row *end = row + matrix->nrows; |
| @@ -5324,8 +5234,7 @@ mark_glyph_matrix (matrix) | |||
| 5324 | /* Mark Lisp faces in the face cache C. */ | 5234 | /* Mark Lisp faces in the face cache C. */ |
| 5325 | 5235 | ||
| 5326 | static void | 5236 | static void |
| 5327 | mark_face_cache (c) | 5237 | mark_face_cache (struct face_cache *c) |
| 5328 | struct face_cache *c; | ||
| 5329 | { | 5238 | { |
| 5330 | if (c) | 5239 | if (c) |
| 5331 | { | 5240 | { |
| @@ -5360,8 +5269,7 @@ int last_marked_index; | |||
| 5360 | static int mark_object_loop_halt; | 5269 | static int mark_object_loop_halt; |
| 5361 | 5270 | ||
| 5362 | static void | 5271 | static void |
| 5363 | mark_vectorlike (ptr) | 5272 | mark_vectorlike (struct Lisp_Vector *ptr) |
| 5364 | struct Lisp_Vector *ptr; | ||
| 5365 | { | 5273 | { |
| 5366 | register EMACS_INT size = ptr->size; | 5274 | register EMACS_INT size = ptr->size; |
| 5367 | register int i; | 5275 | register int i; |
| @@ -5384,8 +5292,7 @@ mark_vectorlike (ptr) | |||
| 5384 | symbols. */ | 5292 | symbols. */ |
| 5385 | 5293 | ||
| 5386 | static void | 5294 | static void |
| 5387 | mark_char_table (ptr) | 5295 | mark_char_table (struct Lisp_Vector *ptr) |
| 5388 | struct Lisp_Vector *ptr; | ||
| 5389 | { | 5296 | { |
| 5390 | register EMACS_INT size = ptr->size & PSEUDOVECTOR_SIZE_MASK; | 5297 | register EMACS_INT size = ptr->size & PSEUDOVECTOR_SIZE_MASK; |
| 5391 | register int i; | 5298 | register int i; |
| @@ -5409,8 +5316,7 @@ mark_char_table (ptr) | |||
| 5409 | } | 5316 | } |
| 5410 | 5317 | ||
| 5411 | void | 5318 | void |
| 5412 | mark_object (arg) | 5319 | mark_object (Lisp_Object arg) |
| 5413 | Lisp_Object arg; | ||
| 5414 | { | 5320 | { |
| 5415 | register Lisp_Object obj = arg; | 5321 | register Lisp_Object obj = arg; |
| 5416 | #ifdef GC_CHECK_MARKED_OBJECTS | 5322 | #ifdef GC_CHECK_MARKED_OBJECTS |
| @@ -5719,8 +5625,7 @@ mark_object (arg) | |||
| 5719 | /* Mark the pointers in a buffer structure. */ | 5625 | /* Mark the pointers in a buffer structure. */ |
| 5720 | 5626 | ||
| 5721 | static void | 5627 | static void |
| 5722 | mark_buffer (buf) | 5628 | mark_buffer (Lisp_Object buf) |
| 5723 | Lisp_Object buf; | ||
| 5724 | { | 5629 | { |
| 5725 | register struct buffer *buffer = XBUFFER (buf); | 5630 | register struct buffer *buffer = XBUFFER (buf); |
| 5726 | register Lisp_Object *ptr, tmp; | 5631 | register Lisp_Object *ptr, tmp; |
| @@ -5787,8 +5692,7 @@ mark_terminals (void) | |||
| 5787 | either marked or does not need to be marked to survive. */ | 5692 | either marked or does not need to be marked to survive. */ |
| 5788 | 5693 | ||
| 5789 | int | 5694 | int |
| 5790 | survives_gc_p (obj) | 5695 | survives_gc_p (Lisp_Object obj) |
| 5791 | Lisp_Object obj; | ||
| 5792 | { | 5696 | { |
| 5793 | int survives_p; | 5697 | int survives_p; |
| 5794 | 5698 | ||
| @@ -5834,7 +5738,7 @@ survives_gc_p (obj) | |||
| 5834 | /* Sweep: find all structures not marked, and free them. */ | 5738 | /* Sweep: find all structures not marked, and free them. */ |
| 5835 | 5739 | ||
| 5836 | static void | 5740 | static void |
| 5837 | gc_sweep () | 5741 | gc_sweep (void) |
| 5838 | { | 5742 | { |
| 5839 | /* Remove or mark entries in weak hash tables. | 5743 | /* Remove or mark entries in weak hash tables. |
| 5840 | This must be done before any object is unmarked. */ | 5744 | This must be done before any object is unmarked. */ |
| @@ -6251,10 +6155,7 @@ Frames, windows, buffers, and subprocesses count as vectors | |||
| 6251 | int suppress_checking; | 6155 | int suppress_checking; |
| 6252 | 6156 | ||
| 6253 | void | 6157 | void |
| 6254 | die (msg, file, line) | 6158 | die (const char *msg, const char *file, int line) |
| 6255 | const char *msg; | ||
| 6256 | const char *file; | ||
| 6257 | int line; | ||
| 6258 | { | 6159 | { |
| 6259 | fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", | 6160 | fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", |
| 6260 | file, line, msg); | 6161 | file, line, msg); |
| @@ -6264,7 +6165,7 @@ die (msg, file, line) | |||
| 6264 | /* Initialization */ | 6165 | /* Initialization */ |
| 6265 | 6166 | ||
| 6266 | void | 6167 | void |
| 6267 | init_alloc_once () | 6168 | init_alloc_once (void) |
| 6268 | { | 6169 | { |
| 6269 | /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ | 6170 | /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ |
| 6270 | purebeg = PUREBEG; | 6171 | purebeg = PUREBEG; |
| @@ -6319,7 +6220,7 @@ init_alloc_once () | |||
| 6319 | } | 6220 | } |
| 6320 | 6221 | ||
| 6321 | void | 6222 | void |
| 6322 | init_alloc () | 6223 | init_alloc (void) |
| 6323 | { | 6224 | { |
| 6324 | gcprolist = 0; | 6225 | gcprolist = 0; |
| 6325 | byte_stack_list = 0; | 6226 | byte_stack_list = 0; |
| @@ -6333,7 +6234,7 @@ init_alloc () | |||
| 6333 | } | 6234 | } |
| 6334 | 6235 | ||
| 6335 | void | 6236 | void |
| 6336 | syms_of_alloc () | 6237 | syms_of_alloc (void) |
| 6337 | { | 6238 | { |
| 6338 | DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold, | 6239 | DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold, |
| 6339 | doc: /* *Number of bytes of consing between garbage collections. | 6240 | doc: /* *Number of bytes of consing between garbage collections. |
diff --git a/src/atimer.c b/src/atimer.c index 3ef51522c31..46c333a9106 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -68,7 +68,7 @@ static void set_alarm (void); | |||
| 68 | static void schedule_atimer (struct atimer *); | 68 | static void schedule_atimer (struct atimer *); |
| 69 | static struct atimer *append_atimer_lists (struct atimer *, | 69 | static struct atimer *append_atimer_lists (struct atimer *, |
| 70 | struct atimer *); | 70 | struct atimer *); |
| 71 | SIGTYPE alarm_signal_handler (); | 71 | SIGTYPE alarm_signal_handler (int signo); |
| 72 | 72 | ||
| 73 | 73 | ||
| 74 | /* Start a new atimer of type TYPE. TIME specifies when the timer is | 74 | /* Start a new atimer of type TYPE. TIME specifies when the timer is |
| @@ -90,11 +90,7 @@ SIGTYPE alarm_signal_handler (); | |||
| 90 | to cancel_atimer; don't free it yourself. */ | 90 | to cancel_atimer; don't free it yourself. */ |
| 91 | 91 | ||
| 92 | struct atimer * | 92 | struct atimer * |
| 93 | start_atimer (type, time, fn, client_data) | 93 | start_atimer (enum atimer_type type, struct timeval time, atimer_callback fn, void *client_data) |
| 94 | enum atimer_type type; | ||
| 95 | EMACS_TIME time; | ||
| 96 | atimer_callback fn; | ||
| 97 | void *client_data; | ||
| 98 | { | 94 | { |
| 99 | struct atimer *t; | 95 | struct atimer *t; |
| 100 | 96 | ||
| @@ -159,8 +155,7 @@ start_atimer (type, time, fn, client_data) | |||
| 159 | /* Cancel and free atimer TIMER. */ | 155 | /* Cancel and free atimer TIMER. */ |
| 160 | 156 | ||
| 161 | void | 157 | void |
| 162 | cancel_atimer (timer) | 158 | cancel_atimer (struct atimer *timer) |
| 163 | struct atimer *timer; | ||
| 164 | { | 159 | { |
| 165 | int i; | 160 | int i; |
| 166 | 161 | ||
| @@ -199,8 +194,7 @@ cancel_atimer (timer) | |||
| 199 | result list. */ | 194 | result list. */ |
| 200 | 195 | ||
| 201 | static struct atimer * | 196 | static struct atimer * |
| 202 | append_atimer_lists (list1, list2) | 197 | append_atimer_lists (struct atimer *list1, struct atimer *list2) |
| 203 | struct atimer *list1, *list2; | ||
| 204 | { | 198 | { |
| 205 | if (list1 == NULL) | 199 | if (list1 == NULL) |
| 206 | return list2; | 200 | return list2; |
| @@ -221,8 +215,7 @@ append_atimer_lists (list1, list2) | |||
| 221 | /* Stop all timers except timer T. T null means stop all timers. */ | 215 | /* Stop all timers except timer T. T null means stop all timers. */ |
| 222 | 216 | ||
| 223 | void | 217 | void |
| 224 | stop_other_atimers (t) | 218 | stop_other_atimers (struct atimer *t) |
| 225 | struct atimer *t; | ||
| 226 | { | 219 | { |
| 227 | BLOCK_ATIMERS; | 220 | BLOCK_ATIMERS; |
| 228 | 221 | ||
| @@ -257,7 +250,7 @@ stop_other_atimers (t) | |||
| 257 | stop_other_atimers. */ | 250 | stop_other_atimers. */ |
| 258 | 251 | ||
| 259 | void | 252 | void |
| 260 | run_all_atimers () | 253 | run_all_atimers (void) |
| 261 | { | 254 | { |
| 262 | if (stopped_atimers) | 255 | if (stopped_atimers) |
| 263 | { | 256 | { |
| @@ -283,8 +276,7 @@ run_all_atimers () | |||
| 283 | /* A version of run_all_timers suitable for a record_unwind_protect. */ | 276 | /* A version of run_all_timers suitable for a record_unwind_protect. */ |
| 284 | 277 | ||
| 285 | Lisp_Object | 278 | Lisp_Object |
| 286 | unwind_stop_other_atimers (dummy) | 279 | unwind_stop_other_atimers (Lisp_Object dummy) |
| 287 | Lisp_Object dummy; | ||
| 288 | { | 280 | { |
| 289 | run_all_atimers (); | 281 | run_all_atimers (); |
| 290 | return Qnil; | 282 | return Qnil; |
| @@ -294,7 +286,7 @@ unwind_stop_other_atimers (dummy) | |||
| 294 | /* Arrange for a SIGALRM to arrive when the next timer is ripe. */ | 286 | /* Arrange for a SIGALRM to arrive when the next timer is ripe. */ |
| 295 | 287 | ||
| 296 | static void | 288 | static void |
| 297 | set_alarm () | 289 | set_alarm (void) |
| 298 | { | 290 | { |
| 299 | if (atimers) | 291 | if (atimers) |
| 300 | { | 292 | { |
| @@ -330,8 +322,7 @@ set_alarm () | |||
| 330 | already. */ | 322 | already. */ |
| 331 | 323 | ||
| 332 | static void | 324 | static void |
| 333 | schedule_atimer (t) | 325 | schedule_atimer (struct atimer *t) |
| 334 | struct atimer *t; | ||
| 335 | { | 326 | { |
| 336 | struct atimer *a = atimers, *prev = NULL; | 327 | struct atimer *a = atimers, *prev = NULL; |
| 337 | 328 | ||
| @@ -349,7 +340,7 @@ schedule_atimer (t) | |||
| 349 | } | 340 | } |
| 350 | 341 | ||
| 351 | static void | 342 | static void |
| 352 | run_timers () | 343 | run_timers (void) |
| 353 | { | 344 | { |
| 354 | EMACS_TIME now; | 345 | EMACS_TIME now; |
| 355 | 346 | ||
| @@ -401,8 +392,7 @@ run_timers () | |||
| 401 | SIGALRM. */ | 392 | SIGALRM. */ |
| 402 | 393 | ||
| 403 | SIGTYPE | 394 | SIGTYPE |
| 404 | alarm_signal_handler (signo) | 395 | alarm_signal_handler (int signo) |
| 405 | int signo; | ||
| 406 | { | 396 | { |
| 407 | #ifndef SYNC_INPUT | 397 | #ifndef SYNC_INPUT |
| 408 | SIGNAL_THREAD_CHECK (signo); | 398 | SIGNAL_THREAD_CHECK (signo); |
| @@ -420,7 +410,7 @@ alarm_signal_handler (signo) | |||
| 420 | /* Call alarm_signal_handler for pending timers. */ | 410 | /* Call alarm_signal_handler for pending timers. */ |
| 421 | 411 | ||
| 422 | void | 412 | void |
| 423 | do_pending_atimers () | 413 | do_pending_atimers (void) |
| 424 | { | 414 | { |
| 425 | if (pending_atimers) | 415 | if (pending_atimers) |
| 426 | { | 416 | { |
| @@ -435,8 +425,7 @@ do_pending_atimers () | |||
| 435 | some systems like HPUX (see process.c). */ | 425 | some systems like HPUX (see process.c). */ |
| 436 | 426 | ||
| 437 | void | 427 | void |
| 438 | turn_on_atimers (on) | 428 | turn_on_atimers (int on) |
| 439 | int on; | ||
| 440 | { | 429 | { |
| 441 | if (on) | 430 | if (on) |
| 442 | { | 431 | { |
| @@ -449,7 +438,7 @@ turn_on_atimers (on) | |||
| 449 | 438 | ||
| 450 | 439 | ||
| 451 | void | 440 | void |
| 452 | init_atimer () | 441 | init_atimer (void) |
| 453 | { | 442 | { |
| 454 | free_atimers = stopped_atimers = atimers = NULL; | 443 | free_atimers = stopped_atimers = atimers = NULL; |
| 455 | pending_atimers = 0; | 444 | pending_atimers = 0; |
diff --git a/src/bidi.c b/src/bidi.c index bca32cf110e..d47fe9b7d33 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -106,7 +106,7 @@ static Lisp_Object paragraph_start_re, paragraph_separate_re; | |||
| 106 | static Lisp_Object Qparagraph_start, Qparagraph_separate; | 106 | static Lisp_Object Qparagraph_start, Qparagraph_separate; |
| 107 | 107 | ||
| 108 | static void | 108 | static void |
| 109 | bidi_initialize () | 109 | bidi_initialize (void) |
| 110 | { | 110 | { |
| 111 | 111 | ||
| 112 | #include "biditype.h" | 112 | #include "biditype.h" |
diff --git a/src/bytecode.c b/src/bytecode.c index c53c5acdbb3..679fc60a1a7 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -272,7 +272,7 @@ struct byte_stack *byte_stack_list; | |||
| 272 | /* Mark objects on byte_stack_list. Called during GC. */ | 272 | /* Mark objects on byte_stack_list. Called during GC. */ |
| 273 | 273 | ||
| 274 | void | 274 | void |
| 275 | mark_byte_stack () | 275 | mark_byte_stack (void) |
| 276 | { | 276 | { |
| 277 | struct byte_stack *stack; | 277 | struct byte_stack *stack; |
| 278 | Lisp_Object *obj; | 278 | Lisp_Object *obj; |
| @@ -301,7 +301,7 @@ mark_byte_stack () | |||
| 301 | counters. Called when GC has completed. */ | 301 | counters. Called when GC has completed. */ |
| 302 | 302 | ||
| 303 | void | 303 | void |
| 304 | unmark_byte_stack () | 304 | unmark_byte_stack (void) |
| 305 | { | 305 | { |
| 306 | struct byte_stack *stack; | 306 | struct byte_stack *stack; |
| 307 | 307 | ||
| @@ -1678,7 +1678,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1678 | } | 1678 | } |
| 1679 | 1679 | ||
| 1680 | void | 1680 | void |
| 1681 | syms_of_bytecode () | 1681 | syms_of_bytecode (void) |
| 1682 | { | 1682 | { |
| 1683 | Qbytecode = intern_c_string ("byte-code"); | 1683 | Qbytecode = intern_c_string ("byte-code"); |
| 1684 | staticpro (&Qbytecode); | 1684 | staticpro (&Qbytecode); |
diff --git a/src/callint.c b/src/callint.c index 45e5bd9ed9b..5716a6fdd47 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -140,8 +140,7 @@ usage: (interactive &optional ARGS) */) | |||
| 140 | /* Quotify EXP: if EXP is constant, return it. | 140 | /* Quotify EXP: if EXP is constant, return it. |
| 141 | If EXP is not constant, return (quote EXP). */ | 141 | If EXP is not constant, return (quote EXP). */ |
| 142 | Lisp_Object | 142 | Lisp_Object |
| 143 | quotify_arg (exp) | 143 | quotify_arg (register Lisp_Object exp) |
| 144 | register Lisp_Object exp; | ||
| 145 | { | 144 | { |
| 146 | if (!INTEGERP (exp) && !STRINGP (exp) | 145 | if (!INTEGERP (exp) && !STRINGP (exp) |
| 147 | && !NILP (exp) && !EQ (exp, Qt)) | 146 | && !NILP (exp) && !EQ (exp, Qt)) |
| @@ -152,8 +151,7 @@ quotify_arg (exp) | |||
| 152 | 151 | ||
| 153 | /* Modify EXP by quotifying each element (except the first). */ | 152 | /* Modify EXP by quotifying each element (except the first). */ |
| 154 | Lisp_Object | 153 | Lisp_Object |
| 155 | quotify_args (exp) | 154 | quotify_args (Lisp_Object exp) |
| 156 | Lisp_Object exp; | ||
| 157 | { | 155 | { |
| 158 | register Lisp_Object tail; | 156 | register Lisp_Object tail; |
| 159 | Lisp_Object next; | 157 | Lisp_Object next; |
| @@ -169,8 +167,7 @@ char *callint_argfuns[] | |||
| 169 | = {"", "point", "mark", "region-beginning", "region-end"}; | 167 | = {"", "point", "mark", "region-beginning", "region-end"}; |
| 170 | 168 | ||
| 171 | static void | 169 | static void |
| 172 | check_mark (for_region) | 170 | check_mark (int for_region) |
| 173 | int for_region; | ||
| 174 | { | 171 | { |
| 175 | Lisp_Object tem; | 172 | Lisp_Object tem; |
| 176 | tem = Fmarker_buffer (current_buffer->mark); | 173 | tem = Fmarker_buffer (current_buffer->mark); |
| @@ -191,8 +188,7 @@ check_mark (for_region) | |||
| 191 | of VALUES to do its job. */ | 188 | of VALUES to do its job. */ |
| 192 | 189 | ||
| 193 | static void | 190 | static void |
| 194 | fix_command (input, values) | 191 | fix_command (Lisp_Object input, Lisp_Object values) |
| 195 | Lisp_Object input, values; | ||
| 196 | { | 192 | { |
| 197 | if (CONSP (input)) | 193 | if (CONSP (input)) |
| 198 | { | 194 | { |
| @@ -897,7 +893,7 @@ Its numeric meaning is what you would get from `(interactive "p")'. */) | |||
| 897 | } | 893 | } |
| 898 | 894 | ||
| 899 | void | 895 | void |
| 900 | syms_of_callint () | 896 | syms_of_callint (void) |
| 901 | { | 897 | { |
| 902 | point_marker = Fmake_marker (); | 898 | point_marker = Fmake_marker (); |
| 903 | staticpro (&point_marker); | 899 | staticpro (&point_marker); |
diff --git a/src/callproc.c b/src/callproc.c index cd06ad5c2e8..34748c71c1c 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -137,8 +137,7 @@ static int call_process_exited; | |||
| 137 | EXFUN (Fgetenv_internal, 2); | 137 | EXFUN (Fgetenv_internal, 2); |
| 138 | 138 | ||
| 139 | static Lisp_Object | 139 | static Lisp_Object |
| 140 | call_process_kill (fdpid) | 140 | call_process_kill (Lisp_Object fdpid) |
| 141 | Lisp_Object fdpid; | ||
| 142 | { | 141 | { |
| 143 | emacs_close (XFASTINT (Fcar (fdpid))); | 142 | emacs_close (XFASTINT (Fcar (fdpid))); |
| 144 | EMACS_KILLPG (XFASTINT (Fcdr (fdpid)), SIGKILL); | 143 | EMACS_KILLPG (XFASTINT (Fcdr (fdpid)), SIGKILL); |
| @@ -147,8 +146,7 @@ call_process_kill (fdpid) | |||
| 147 | } | 146 | } |
| 148 | 147 | ||
| 149 | Lisp_Object | 148 | Lisp_Object |
| 150 | call_process_cleanup (arg) | 149 | call_process_cleanup (Lisp_Object arg) |
| 151 | Lisp_Object arg; | ||
| 152 | { | 150 | { |
| 153 | Lisp_Object fdpid = Fcdr (arg); | 151 | Lisp_Object fdpid = Fcdr (arg); |
| 154 | #if defined (MSDOS) | 152 | #if defined (MSDOS) |
| @@ -848,8 +846,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 848 | } | 846 | } |
| 849 | 847 | ||
| 850 | static Lisp_Object | 848 | static Lisp_Object |
| 851 | delete_temp_file (name) | 849 | delete_temp_file (Lisp_Object name) |
| 852 | Lisp_Object name; | ||
| 853 | { | 850 | { |
| 854 | /* Suppress jka-compr handling, etc. */ | 851 | /* Suppress jka-compr handling, etc. */ |
| 855 | int count = SPECPDL_INDEX (); | 852 | int count = SPECPDL_INDEX (); |
| @@ -997,7 +994,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 997 | RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args))); | 994 | RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args))); |
| 998 | } | 995 | } |
| 999 | 996 | ||
| 1000 | static int relocate_fd (); | 997 | static int relocate_fd (int fd, int minfd); |
| 1001 | 998 | ||
| 1002 | static char ** | 999 | static char ** |
| 1003 | add_env (char **env, char **new_env, char *string) | 1000 | add_env (char **env, char **new_env, char *string) |
| @@ -1052,11 +1049,7 @@ add_env (char **env, char **new_env, char *string) | |||
| 1052 | executable directory by the parent. */ | 1049 | executable directory by the parent. */ |
| 1053 | 1050 | ||
| 1054 | int | 1051 | int |
| 1055 | child_setup (in, out, err, new_argv, set_pgrp, current_dir) | 1052 | child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, Lisp_Object current_dir) |
| 1056 | int in, out, err; | ||
| 1057 | register char **new_argv; | ||
| 1058 | int set_pgrp; | ||
| 1059 | Lisp_Object current_dir; | ||
| 1060 | { | 1053 | { |
| 1061 | char **env; | 1054 | char **env; |
| 1062 | char *pwd_var; | 1055 | char *pwd_var; |
| @@ -1295,8 +1288,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) | |||
| 1295 | /* Move the file descriptor FD so that its number is not less than MINFD. | 1288 | /* Move the file descriptor FD so that its number is not less than MINFD. |
| 1296 | If the file descriptor is moved at all, the original is freed. */ | 1289 | If the file descriptor is moved at all, the original is freed. */ |
| 1297 | static int | 1290 | static int |
| 1298 | relocate_fd (fd, minfd) | 1291 | relocate_fd (int fd, int minfd) |
| 1299 | int fd, minfd; | ||
| 1300 | { | 1292 | { |
| 1301 | if (fd >= minfd) | 1293 | if (fd >= minfd) |
| 1302 | return fd; | 1294 | return fd; |
| @@ -1322,12 +1314,7 @@ relocate_fd (fd, minfd) | |||
| 1322 | } | 1314 | } |
| 1323 | 1315 | ||
| 1324 | static int | 1316 | static int |
| 1325 | getenv_internal_1 (var, varlen, value, valuelen, env) | 1317 | getenv_internal_1 (char *var, int varlen, char **value, int *valuelen, Lisp_Object env) |
| 1326 | char *var; | ||
| 1327 | int varlen; | ||
| 1328 | char **value; | ||
| 1329 | int *valuelen; | ||
| 1330 | Lisp_Object env; | ||
| 1331 | { | 1318 | { |
| 1332 | for (; CONSP (env); env = XCDR (env)) | 1319 | for (; CONSP (env); env = XCDR (env)) |
| 1333 | { | 1320 | { |
| @@ -1361,12 +1348,7 @@ getenv_internal_1 (var, varlen, value, valuelen, env) | |||
| 1361 | } | 1348 | } |
| 1362 | 1349 | ||
| 1363 | static int | 1350 | static int |
| 1364 | getenv_internal (var, varlen, value, valuelen, frame) | 1351 | getenv_internal (char *var, int varlen, char **value, int *valuelen, Lisp_Object frame) |
| 1365 | char *var; | ||
| 1366 | int varlen; | ||
| 1367 | char **value; | ||
| 1368 | int *valuelen; | ||
| 1369 | Lisp_Object frame; | ||
| 1370 | { | 1352 | { |
| 1371 | /* Try to find VAR in Vprocess_environment first. */ | 1353 | /* Try to find VAR in Vprocess_environment first. */ |
| 1372 | if (getenv_internal_1 (var, varlen, value, valuelen, | 1354 | if (getenv_internal_1 (var, varlen, value, valuelen, |
| @@ -1428,8 +1410,7 @@ If optional parameter ENV is a list, then search this list instead of | |||
| 1428 | /* A version of getenv that consults the Lisp environment lists, | 1410 | /* A version of getenv that consults the Lisp environment lists, |
| 1429 | easily callable from C. */ | 1411 | easily callable from C. */ |
| 1430 | char * | 1412 | char * |
| 1431 | egetenv (var) | 1413 | egetenv (char *var) |
| 1432 | char *var; | ||
| 1433 | { | 1414 | { |
| 1434 | char *value; | 1415 | char *value; |
| 1435 | int valuelen; | 1416 | int valuelen; |
| @@ -1444,7 +1425,7 @@ egetenv (var) | |||
| 1444 | /* This is run before init_cmdargs. */ | 1425 | /* This is run before init_cmdargs. */ |
| 1445 | 1426 | ||
| 1446 | void | 1427 | void |
| 1447 | init_callproc_1 () | 1428 | init_callproc_1 (void) |
| 1448 | { | 1429 | { |
| 1449 | char *data_dir = egetenv ("EMACSDATA"); | 1430 | char *data_dir = egetenv ("EMACSDATA"); |
| 1450 | char *doc_dir = egetenv ("EMACSDOC"); | 1431 | char *doc_dir = egetenv ("EMACSDOC"); |
| @@ -1466,7 +1447,7 @@ init_callproc_1 () | |||
| 1466 | /* This is run after init_cmdargs, when Vinstallation_directory is valid. */ | 1447 | /* This is run after init_cmdargs, when Vinstallation_directory is valid. */ |
| 1467 | 1448 | ||
| 1468 | void | 1449 | void |
| 1469 | init_callproc () | 1450 | init_callproc (void) |
| 1470 | { | 1451 | { |
| 1471 | char *data_dir = egetenv ("EMACSDATA"); | 1452 | char *data_dir = egetenv ("EMACSDATA"); |
| 1472 | 1453 | ||
| @@ -1555,7 +1536,7 @@ init_callproc () | |||
| 1555 | } | 1536 | } |
| 1556 | 1537 | ||
| 1557 | void | 1538 | void |
| 1558 | set_initial_environment () | 1539 | set_initial_environment (void) |
| 1559 | { | 1540 | { |
| 1560 | register char **envp; | 1541 | register char **envp; |
| 1561 | #ifndef CANNOT_DUMP | 1542 | #ifndef CANNOT_DUMP |
| @@ -1575,7 +1556,7 @@ set_initial_environment () | |||
| 1575 | } | 1556 | } |
| 1576 | 1557 | ||
| 1577 | void | 1558 | void |
| 1578 | syms_of_callproc () | 1559 | syms_of_callproc (void) |
| 1579 | { | 1560 | { |
| 1580 | #ifdef DOS_NT | 1561 | #ifdef DOS_NT |
| 1581 | Qbuffer_file_type = intern ("buffer-file-type"); | 1562 | Qbuffer_file_type = intern ("buffer-file-type"); |
diff --git a/src/casefiddle.c b/src/casefiddle.c index 30bb457b17d..36715848941 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -33,9 +33,7 @@ enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP}; | |||
| 33 | Lisp_Object Qidentity; | 33 | Lisp_Object Qidentity; |
| 34 | 34 | ||
| 35 | Lisp_Object | 35 | Lisp_Object |
| 36 | casify_object (flag, obj) | 36 | casify_object (enum case_action flag, Lisp_Object obj) |
| 37 | enum case_action flag; | ||
| 38 | Lisp_Object obj; | ||
| 39 | { | 37 | { |
| 40 | register int c, c1; | 38 | register int c, c1; |
| 41 | register int inword = flag == CASE_DOWN; | 39 | register int inword = flag == CASE_DOWN; |
| @@ -200,9 +198,7 @@ The argument object is not altered--the value is a copy. */) | |||
| 200 | b and e specify range of buffer to operate on. */ | 198 | b and e specify range of buffer to operate on. */ |
| 201 | 199 | ||
| 202 | void | 200 | void |
| 203 | casify_region (flag, b, e) | 201 | casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) |
| 204 | enum case_action flag; | ||
| 205 | Lisp_Object b, e; | ||
| 206 | { | 202 | { |
| 207 | register int c; | 203 | register int c; |
| 208 | register int inword = flag == CASE_DOWN; | 204 | register int inword = flag == CASE_DOWN; |
| @@ -358,9 +354,7 @@ character positions to operate on. */) | |||
| 358 | } | 354 | } |
| 359 | 355 | ||
| 360 | static Lisp_Object | 356 | static Lisp_Object |
| 361 | operate_on_word (arg, newpoint) | 357 | operate_on_word (Lisp_Object arg, EMACS_INT *newpoint) |
| 362 | Lisp_Object arg; | ||
| 363 | EMACS_INT *newpoint; | ||
| 364 | { | 358 | { |
| 365 | Lisp_Object val; | 359 | Lisp_Object val; |
| 366 | int farend; | 360 | int farend; |
| @@ -427,7 +421,7 @@ With negative argument, capitalize previous words but do not move. */) | |||
| 427 | } | 421 | } |
| 428 | 422 | ||
| 429 | void | 423 | void |
| 430 | syms_of_casefiddle () | 424 | syms_of_casefiddle (void) |
| 431 | { | 425 | { |
| 432 | Qidentity = intern_c_string ("identity"); | 426 | Qidentity = intern_c_string ("identity"); |
| 433 | staticpro (&Qidentity); | 427 | staticpro (&Qidentity); |
| @@ -445,7 +439,7 @@ syms_of_casefiddle () | |||
| 445 | } | 439 | } |
| 446 | 440 | ||
| 447 | void | 441 | void |
| 448 | keys_of_casefiddle () | 442 | keys_of_casefiddle (void) |
| 449 | { | 443 | { |
| 450 | initial_define_key (control_x_map, Ctl('U'), "upcase-region"); | 444 | initial_define_key (control_x_map, Ctl('U'), "upcase-region"); |
| 451 | Fput (intern ("upcase-region"), Qdisabled, Qt); | 445 | Fput (intern ("upcase-region"), Qdisabled, Qt); |
diff --git a/src/casetab.c b/src/casetab.c index e0a9ec49157..fc7e32e6462 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -34,9 +34,9 @@ Lisp_Object Vascii_canon_table, Vascii_eqv_table; | |||
| 34 | int case_temp1; | 34 | int case_temp1; |
| 35 | Lisp_Object case_temp2; | 35 | Lisp_Object case_temp2; |
| 36 | 36 | ||
| 37 | static void set_canon (); | 37 | static void set_canon (Lisp_Object case_table, Lisp_Object range, Lisp_Object elt); |
| 38 | static void set_identity (); | 38 | static void set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt); |
| 39 | static void shuffle (); | 39 | static void shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt); |
| 40 | 40 | ||
| 41 | DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, | 41 | DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, |
| 42 | doc: /* Return t if OBJECT is a case table. | 42 | doc: /* Return t if OBJECT is a case table. |
| @@ -63,8 +63,7 @@ See `set-case-table' for more information on these data structures. */) | |||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | static Lisp_Object | 65 | static Lisp_Object |
| 66 | check_case_table (obj) | 66 | check_case_table (Lisp_Object obj) |
| 67 | Lisp_Object obj; | ||
| 68 | { | 67 | { |
| 69 | CHECK_TYPE (!NILP (Fcase_table_p (obj)), Qcase_table_p, obj); | 68 | CHECK_TYPE (!NILP (Fcase_table_p (obj)), Qcase_table_p, obj); |
| 70 | return (obj); | 69 | return (obj); |
| @@ -85,7 +84,7 @@ This is the one used for new buffers. */) | |||
| 85 | return Vascii_downcase_table; | 84 | return Vascii_downcase_table; |
| 86 | } | 85 | } |
| 87 | 86 | ||
| 88 | static Lisp_Object set_case_table (); | 87 | static Lisp_Object set_case_table (Lisp_Object table, int standard); |
| 89 | 88 | ||
| 90 | DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, | 89 | DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, |
| 91 | doc: /* Select a new case table for the current buffer. | 90 | doc: /* Select a new case table for the current buffer. |
| @@ -120,9 +119,7 @@ See `set-case-table' for more info on case tables. */) | |||
| 120 | } | 119 | } |
| 121 | 120 | ||
| 122 | static Lisp_Object | 121 | static Lisp_Object |
| 123 | set_case_table (table, standard) | 122 | set_case_table (Lisp_Object table, int standard) |
| 124 | Lisp_Object table; | ||
| 125 | int standard; | ||
| 126 | { | 123 | { |
| 127 | Lisp_Object up, canon, eqv; | 124 | Lisp_Object up, canon, eqv; |
| 128 | 125 | ||
| @@ -184,8 +181,7 @@ set_case_table (table, standard) | |||
| 184 | CASE_TABLE. */ | 181 | CASE_TABLE. */ |
| 185 | 182 | ||
| 186 | static void | 183 | static void |
| 187 | set_canon (case_table, range, elt) | 184 | set_canon (Lisp_Object case_table, Lisp_Object range, Lisp_Object elt) |
| 188 | Lisp_Object case_table, range, elt; | ||
| 189 | { | 185 | { |
| 190 | Lisp_Object up = XCHAR_TABLE (case_table)->extras[0]; | 186 | Lisp_Object up = XCHAR_TABLE (case_table)->extras[0]; |
| 191 | Lisp_Object canon = XCHAR_TABLE (case_table)->extras[1]; | 187 | Lisp_Object canon = XCHAR_TABLE (case_table)->extras[1]; |
| @@ -200,8 +196,7 @@ set_canon (case_table, range, elt) | |||
| 200 | character. This is called in map_char_table. */ | 196 | character. This is called in map_char_table. */ |
| 201 | 197 | ||
| 202 | static void | 198 | static void |
| 203 | set_identity (table, c, elt) | 199 | set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt) |
| 204 | Lisp_Object table, c, elt; | ||
| 205 | { | 200 | { |
| 206 | if (NATNUMP (elt)) | 201 | if (NATNUMP (elt)) |
| 207 | { | 202 | { |
| @@ -225,8 +220,7 @@ set_identity (table, c, elt) | |||
| 225 | operated. */ | 220 | operated. */ |
| 226 | 221 | ||
| 227 | static void | 222 | static void |
| 228 | shuffle (table, c, elt) | 223 | shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt) |
| 229 | Lisp_Object table, c, elt; | ||
| 230 | { | 224 | { |
| 231 | if (NATNUMP (elt)) | 225 | if (NATNUMP (elt)) |
| 232 | { | 226 | { |
| @@ -250,7 +244,7 @@ shuffle (table, c, elt) | |||
| 250 | } | 244 | } |
| 251 | 245 | ||
| 252 | void | 246 | void |
| 253 | init_casetab_once () | 247 | init_casetab_once (void) |
| 254 | { | 248 | { |
| 255 | register int i; | 249 | register int i; |
| 256 | Lisp_Object down, up; | 250 | Lisp_Object down, up; |
| @@ -296,7 +290,7 @@ init_casetab_once () | |||
| 296 | } | 290 | } |
| 297 | 291 | ||
| 298 | void | 292 | void |
| 299 | syms_of_casetab () | 293 | syms_of_casetab (void) |
| 300 | { | 294 | { |
| 301 | Qcase_table_p = intern_c_string ("case-table-p"); | 295 | Qcase_table_p = intern_c_string ("case-table-p"); |
| 302 | staticpro (&Qcase_table_p); | 296 | staticpro (&Qcase_table_p); |
diff --git a/src/category.c b/src/category.c index 610df686dab..ead142da008 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -62,8 +62,7 @@ Lisp_Object _temp_category_set; | |||
| 62 | static Lisp_Object hash_get_category_set (Lisp_Object, Lisp_Object); | 62 | static Lisp_Object hash_get_category_set (Lisp_Object, Lisp_Object); |
| 63 | 63 | ||
| 64 | static Lisp_Object | 64 | static Lisp_Object |
| 65 | hash_get_category_set (table, category_set) | 65 | hash_get_category_set (Lisp_Object table, Lisp_Object category_set) |
| 66 | Lisp_Object table, category_set; | ||
| 67 | { | 66 | { |
| 68 | Lisp_Object val; | 67 | Lisp_Object val; |
| 69 | struct Lisp_Hash_Table *h; | 68 | struct Lisp_Hash_Table *h; |
| @@ -117,7 +116,7 @@ those categories. */) | |||
| 117 | 116 | ||
| 118 | /* Category staff. */ | 117 | /* Category staff. */ |
| 119 | 118 | ||
| 120 | Lisp_Object check_category_table (); | 119 | Lisp_Object check_category_table (Lisp_Object table); |
| 121 | 120 | ||
| 122 | DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0, | 121 | DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0, |
| 123 | doc: /* Define CATEGORY as a category which is described by DOCSTRING. | 122 | doc: /* Define CATEGORY as a category which is described by DOCSTRING. |
| @@ -196,8 +195,7 @@ DEFUN ("category-table-p", Fcategory_table_p, Scategory_table_p, 1, 1, 0, | |||
| 196 | wrong-type-argument. */ | 195 | wrong-type-argument. */ |
| 197 | 196 | ||
| 198 | Lisp_Object | 197 | Lisp_Object |
| 199 | check_category_table (table) | 198 | check_category_table (Lisp_Object table) |
| 200 | Lisp_Object table; | ||
| 201 | { | 199 | { |
| 202 | if (NILP (table)) | 200 | if (NILP (table)) |
| 203 | return current_buffer->category_table; | 201 | return current_buffer->category_table; |
| @@ -224,8 +222,7 @@ This is the one used for new buffers. */) | |||
| 224 | 222 | ||
| 225 | 223 | ||
| 226 | static void | 224 | static void |
| 227 | copy_category_entry (table, c, val) | 225 | copy_category_entry (Lisp_Object table, Lisp_Object c, Lisp_Object val) |
| 228 | Lisp_Object table, c, val; | ||
| 229 | { | 226 | { |
| 230 | val = Fcopy_sequence (val); | 227 | val = Fcopy_sequence (val); |
| 231 | if (CONSP (c)) | 228 | if (CONSP (c)) |
| @@ -240,8 +237,7 @@ copy_category_entry (table, c, val) | |||
| 240 | binding TABLE to a sub char table. */ | 237 | binding TABLE to a sub char table. */ |
| 241 | 238 | ||
| 242 | Lisp_Object | 239 | Lisp_Object |
| 243 | copy_category_table (table) | 240 | copy_category_table (Lisp_Object table) |
| 244 | Lisp_Object table; | ||
| 245 | { | 241 | { |
| 246 | table = copy_char_table (table); | 242 | table = copy_char_table (table); |
| 247 | 243 | ||
| @@ -304,8 +300,7 @@ Return TABLE. */) | |||
| 304 | 300 | ||
| 305 | 301 | ||
| 306 | Lisp_Object | 302 | Lisp_Object |
| 307 | char_category_set (c) | 303 | char_category_set (int c) |
| 308 | int c; | ||
| 309 | { | 304 | { |
| 310 | return CHAR_TABLE_REF (current_buffer->category_table, c); | 305 | return CHAR_TABLE_REF (current_buffer->category_table, c); |
| 311 | } | 306 | } |
| @@ -344,8 +339,7 @@ The return value is a string containing those same categories. */) | |||
| 344 | } | 339 | } |
| 345 | 340 | ||
| 346 | void | 341 | void |
| 347 | set_category_set (category_set, category, val) | 342 | set_category_set (Lisp_Object category_set, Lisp_Object category, Lisp_Object val) |
| 348 | Lisp_Object category_set, category, val; | ||
| 349 | { | 343 | { |
| 350 | do { | 344 | do { |
| 351 | int idx = XINT (category) / 8; | 345 | int idx = XINT (category) / 8; |
| @@ -420,8 +414,7 @@ then delete CATEGORY from the category set instead of adding it. */) | |||
| 420 | directly. */ | 414 | directly. */ |
| 421 | 415 | ||
| 422 | int | 416 | int |
| 423 | word_boundary_p (c1, c2) | 417 | word_boundary_p (int c1, int c2) |
| 424 | int c1, c2; | ||
| 425 | { | 418 | { |
| 426 | Lisp_Object category_set1, category_set2; | 419 | Lisp_Object category_set1, category_set2; |
| 427 | Lisp_Object tail; | 420 | Lisp_Object tail; |
| @@ -466,7 +459,7 @@ word_boundary_p (c1, c2) | |||
| 466 | 459 | ||
| 467 | 460 | ||
| 468 | void | 461 | void |
| 469 | init_category_once () | 462 | init_category_once (void) |
| 470 | { | 463 | { |
| 471 | /* This has to be done here, before we call Fmake_char_table. */ | 464 | /* This has to be done here, before we call Fmake_char_table. */ |
| 472 | Qcategory_table = intern_c_string ("category-table"); | 465 | Qcategory_table = intern_c_string ("category-table"); |
| @@ -489,7 +482,7 @@ init_category_once () | |||
| 489 | } | 482 | } |
| 490 | 483 | ||
| 491 | void | 484 | void |
| 492 | syms_of_category () | 485 | syms_of_category (void) |
| 493 | { | 486 | { |
| 494 | Qcategoryp = intern_c_string ("categoryp"); | 487 | Qcategoryp = intern_c_string ("categoryp"); |
| 495 | staticpro (&Qcategoryp); | 488 | staticpro (&Qcategoryp); |
| @@ -862,11 +862,7 @@ struct ccl_prog_stack | |||
| 862 | static struct ccl_prog_stack ccl_prog_stack_struct[256]; | 862 | static struct ccl_prog_stack ccl_prog_stack_struct[256]; |
| 863 | 863 | ||
| 864 | void | 864 | void |
| 865 | ccl_driver (ccl, source, destination, src_size, dst_size, charset_list) | 865 | ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size, int dst_size, Lisp_Object charset_list) |
| 866 | struct ccl_program *ccl; | ||
| 867 | int *source, *destination; | ||
| 868 | int src_size, dst_size; | ||
| 869 | Lisp_Object charset_list; | ||
| 870 | { | 866 | { |
| 871 | register int *reg = ccl->reg; | 867 | register int *reg = ccl->reg; |
| 872 | register int ic = ccl->ic; | 868 | register int ic = ccl->ic; |
| @@ -1795,8 +1791,7 @@ ccl_driver (ccl, source, destination, src_size, dst_size, charset_list) | |||
| 1795 | or nil if CCL contains invalid data. */ | 1791 | or nil if CCL contains invalid data. */ |
| 1796 | 1792 | ||
| 1797 | static Lisp_Object | 1793 | static Lisp_Object |
| 1798 | resolve_symbol_ccl_program (ccl) | 1794 | resolve_symbol_ccl_program (Lisp_Object ccl) |
| 1799 | Lisp_Object ccl; | ||
| 1800 | { | 1795 | { |
| 1801 | int i, veclen, unresolved = 0; | 1796 | int i, veclen, unresolved = 0; |
| 1802 | Lisp_Object result, contents, val; | 1797 | Lisp_Object result, contents, val; |
| @@ -1867,9 +1862,7 @@ resolve_symbol_ccl_program (ccl) | |||
| 1867 | symbols, return Qnil. */ | 1862 | symbols, return Qnil. */ |
| 1868 | 1863 | ||
| 1869 | static Lisp_Object | 1864 | static Lisp_Object |
| 1870 | ccl_get_compiled_code (ccl_prog, idx) | 1865 | ccl_get_compiled_code (Lisp_Object ccl_prog, int *idx) |
| 1871 | Lisp_Object ccl_prog; | ||
| 1872 | int *idx; | ||
| 1873 | { | 1866 | { |
| 1874 | Lisp_Object val, slot; | 1867 | Lisp_Object val, slot; |
| 1875 | 1868 | ||
| @@ -1910,9 +1903,7 @@ ccl_get_compiled_code (ccl_prog, idx) | |||
| 1910 | 1903 | ||
| 1911 | If CCL_PROG is nil, we just reset the structure pointed by CCL. */ | 1904 | If CCL_PROG is nil, we just reset the structure pointed by CCL. */ |
| 1912 | int | 1905 | int |
| 1913 | setup_ccl_program (ccl, ccl_prog) | 1906 | setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) |
| 1914 | struct ccl_program *ccl; | ||
| 1915 | Lisp_Object ccl_prog; | ||
| 1916 | { | 1907 | { |
| 1917 | int i; | 1908 | int i; |
| 1918 | 1909 | ||
| @@ -1953,8 +1944,7 @@ setup_ccl_program (ccl, ccl_prog) | |||
| 1953 | /* Check if CCL is updated or not. If not, re-setup members of CCL. */ | 1944 | /* Check if CCL is updated or not. If not, re-setup members of CCL. */ |
| 1954 | 1945 | ||
| 1955 | int | 1946 | int |
| 1956 | check_ccl_update (ccl) | 1947 | check_ccl_update (struct ccl_program *ccl) |
| 1957 | struct ccl_program *ccl; | ||
| 1958 | { | 1948 | { |
| 1959 | Lisp_Object slot, ccl_prog; | 1949 | Lisp_Object slot, ccl_prog; |
| 1960 | 1950 | ||
| @@ -2315,7 +2305,7 @@ Return index number of the registered map. */) | |||
| 2315 | 2305 | ||
| 2316 | 2306 | ||
| 2317 | void | 2307 | void |
| 2318 | syms_of_ccl () | 2308 | syms_of_ccl (void) |
| 2319 | { | 2309 | { |
| 2320 | staticpro (&Vccl_program_table); | 2310 | staticpro (&Vccl_program_table); |
| 2321 | Vccl_program_table = Fmake_vector (make_number (32), Qnil); | 2311 | Vccl_program_table = Fmake_vector (make_number (32), Qnil); |
diff --git a/src/character.c b/src/character.c index 7cd1eedcef4..a6c38df9e85 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -93,8 +93,7 @@ Lisp_Object Vunicode_category_table; | |||
| 93 | character code if possible. Return the resulting code. */ | 93 | character code if possible. Return the resulting code. */ |
| 94 | 94 | ||
| 95 | int | 95 | int |
| 96 | char_resolve_modifier_mask (c) | 96 | char_resolve_modifier_mask (int c) |
| 97 | int c; | ||
| 98 | { | 97 | { |
| 99 | /* A non-ASCII character can't reflect modifier bits to the code. */ | 98 | /* A non-ASCII character can't reflect modifier bits to the code. */ |
| 100 | if (! ASCII_CHAR_P ((c & ~CHAR_MODIFIER_MASK))) | 99 | if (! ASCII_CHAR_P ((c & ~CHAR_MODIFIER_MASK))) |
| @@ -143,9 +142,7 @@ char_resolve_modifier_mask (c) | |||
| 143 | handle them appropriately. */ | 142 | handle them appropriately. */ |
| 144 | 143 | ||
| 145 | int | 144 | int |
| 146 | char_string (c, p) | 145 | char_string (unsigned int c, unsigned char *p) |
| 147 | unsigned c; | ||
| 148 | unsigned char *p; | ||
| 149 | { | 146 | { |
| 150 | int bytes; | 147 | int bytes; |
| 151 | 148 | ||
| @@ -199,10 +196,7 @@ char_string (c, p) | |||
| 199 | character) of the multibyte form. */ | 196 | character) of the multibyte form. */ |
| 200 | 197 | ||
| 201 | int | 198 | int |
| 202 | string_char (p, advanced, len) | 199 | string_char (const unsigned char *p, const unsigned char **advanced, int *len) |
| 203 | const unsigned char *p; | ||
| 204 | const unsigned char **advanced; | ||
| 205 | int *len; | ||
| 206 | { | 200 | { |
| 207 | int c; | 201 | int c; |
| 208 | const unsigned char *saved_p = p; | 202 | const unsigned char *saved_p = p; |
| @@ -245,9 +239,7 @@ string_char (p, advanced, len) | |||
| 245 | case, translace C by all tables. */ | 239 | case, translace C by all tables. */ |
| 246 | 240 | ||
| 247 | int | 241 | int |
| 248 | translate_char (table, c) | 242 | translate_char (Lisp_Object table, int c) |
| 249 | Lisp_Object table; | ||
| 250 | int c; | ||
| 251 | { | 243 | { |
| 252 | if (CHAR_TABLE_P (table)) | 244 | if (CHAR_TABLE_P (table)) |
| 253 | { | 245 | { |
| @@ -272,9 +264,7 @@ translate_char (table, c) | |||
| 272 | future. */ | 264 | future. */ |
| 273 | 265 | ||
| 274 | int | 266 | int |
| 275 | multibyte_char_to_unibyte (c, rev_tbl) | 267 | multibyte_char_to_unibyte (int c, Lisp_Object rev_tbl) |
| 276 | int c; | ||
| 277 | Lisp_Object rev_tbl; | ||
| 278 | { | 268 | { |
| 279 | if (c < 0x80) | 269 | if (c < 0x80) |
| 280 | return c; | 270 | return c; |
| @@ -287,8 +277,7 @@ multibyte_char_to_unibyte (c, rev_tbl) | |||
| 287 | by charset_unibyte. */ | 277 | by charset_unibyte. */ |
| 288 | 278 | ||
| 289 | int | 279 | int |
| 290 | multibyte_char_to_unibyte_safe (c) | 280 | multibyte_char_to_unibyte_safe (int c) |
| 291 | int c; | ||
| 292 | { | 281 | { |
| 293 | if (c < 0x80) | 282 | if (c < 0x80) |
| 294 | return c; | 283 | return c; |
| @@ -446,9 +435,7 @@ c_string_width (const unsigned char *str, int len, int precision, int *nchars, i | |||
| 446 | occupies on the screen. */ | 435 | occupies on the screen. */ |
| 447 | 436 | ||
| 448 | int | 437 | int |
| 449 | strwidth (str, len) | 438 | strwidth (unsigned char *str, int len) |
| 450 | unsigned char *str; | ||
| 451 | int len; | ||
| 452 | { | 439 | { |
| 453 | return c_string_width (str, len, -1, NULL, NULL); | 440 | return c_string_width (str, len, -1, NULL, NULL); |
| 454 | } | 441 | } |
| @@ -461,9 +448,7 @@ strwidth (str, len) | |||
| 461 | in *NCHARS and *NBYTES respectively. */ | 448 | in *NCHARS and *NBYTES respectively. */ |
| 462 | 449 | ||
| 463 | int | 450 | int |
| 464 | lisp_string_width (string, precision, nchars, nbytes) | 451 | lisp_string_width (Lisp_Object string, int precision, int *nchars, int *nbytes) |
| 465 | Lisp_Object string; | ||
| 466 | int precision, *nchars, *nbytes; | ||
| 467 | { | 452 | { |
| 468 | int len = SCHARS (string); | 453 | int len = SCHARS (string); |
| 469 | /* This set multibyte to 0 even if STRING is multibyte when it | 454 | /* This set multibyte to 0 even if STRING is multibyte when it |
| @@ -573,9 +558,7 @@ usage: (char-direction CHAR) */) | |||
| 573 | nil, we treat each byte as a character. */ | 558 | nil, we treat each byte as a character. */ |
| 574 | 559 | ||
| 575 | EMACS_INT | 560 | EMACS_INT |
| 576 | chars_in_text (ptr, nbytes) | 561 | chars_in_text (const unsigned char *ptr, EMACS_INT nbytes) |
| 577 | const unsigned char *ptr; | ||
| 578 | EMACS_INT nbytes; | ||
| 579 | { | 562 | { |
| 580 | /* current_buffer is null at early stages of Emacs initialization. */ | 563 | /* current_buffer is null at early stages of Emacs initialization. */ |
| 581 | if (current_buffer == 0 | 564 | if (current_buffer == 0 |
| @@ -591,9 +574,7 @@ chars_in_text (ptr, nbytes) | |||
| 591 | ignores enable-multibyte-characters. */ | 574 | ignores enable-multibyte-characters. */ |
| 592 | 575 | ||
| 593 | EMACS_INT | 576 | EMACS_INT |
| 594 | multibyte_chars_in_text (ptr, nbytes) | 577 | multibyte_chars_in_text (const unsigned char *ptr, EMACS_INT nbytes) |
| 595 | const unsigned char *ptr; | ||
| 596 | EMACS_INT nbytes; | ||
| 597 | { | 578 | { |
| 598 | const unsigned char *endp = ptr + nbytes; | 579 | const unsigned char *endp = ptr + nbytes; |
| 599 | int chars = 0; | 580 | int chars = 0; |
| @@ -618,9 +599,7 @@ multibyte_chars_in_text (ptr, nbytes) | |||
| 618 | represented by 2-byte in a multibyte text. */ | 599 | represented by 2-byte in a multibyte text. */ |
| 619 | 600 | ||
| 620 | void | 601 | void |
| 621 | parse_str_as_multibyte (str, len, nchars, nbytes) | 602 | parse_str_as_multibyte (const unsigned char *str, int len, int *nchars, int *nbytes) |
| 622 | const unsigned char *str; | ||
| 623 | int len, *nchars, *nbytes; | ||
| 624 | { | 603 | { |
| 625 | const unsigned char *endp = str + len; | 604 | const unsigned char *endp = str + len; |
| 626 | int n, chars = 0, bytes = 0; | 605 | int n, chars = 0, bytes = 0; |
| @@ -662,9 +641,7 @@ parse_str_as_multibyte (str, len, nchars, nbytes) | |||
| 662 | resulting text. */ | 641 | resulting text. */ |
| 663 | 642 | ||
| 664 | int | 643 | int |
| 665 | str_as_multibyte (str, len, nbytes, nchars) | 644 | str_as_multibyte (unsigned char *str, int len, int nbytes, int *nchars) |
| 666 | unsigned char *str; | ||
| 667 | int len, nbytes, *nchars; | ||
| 668 | { | 645 | { |
| 669 | unsigned char *p = str, *endp = str + nbytes; | 646 | unsigned char *p = str, *endp = str + nbytes; |
| 670 | unsigned char *to; | 647 | unsigned char *to; |
| @@ -740,9 +717,7 @@ str_as_multibyte (str, len, nbytes, nchars) | |||
| 740 | `str_to_multibyte'. */ | 717 | `str_to_multibyte'. */ |
| 741 | 718 | ||
| 742 | int | 719 | int |
| 743 | parse_str_to_multibyte (str, len) | 720 | parse_str_to_multibyte (unsigned char *str, int len) |
| 744 | unsigned char *str; | ||
| 745 | int len; | ||
| 746 | { | 721 | { |
| 747 | unsigned char *endp = str + len; | 722 | unsigned char *endp = str + len; |
| 748 | int bytes; | 723 | int bytes; |
| @@ -760,9 +735,7 @@ parse_str_to_multibyte (str, len) | |||
| 760 | enough. */ | 735 | enough. */ |
| 761 | 736 | ||
| 762 | int | 737 | int |
| 763 | str_to_multibyte (str, len, bytes) | 738 | str_to_multibyte (unsigned char *str, int len, int bytes) |
| 764 | unsigned char *str; | ||
| 765 | int len, bytes; | ||
| 766 | { | 739 | { |
| 767 | unsigned char *p = str, *endp = str + bytes; | 740 | unsigned char *p = str, *endp = str + bytes; |
| 768 | unsigned char *to; | 741 | unsigned char *to; |
| @@ -791,9 +764,7 @@ str_to_multibyte (str, len, bytes) | |||
| 791 | unibyte. */ | 764 | unibyte. */ |
| 792 | 765 | ||
| 793 | int | 766 | int |
| 794 | str_as_unibyte (str, bytes) | 767 | str_as_unibyte (unsigned char *str, int bytes) |
| 795 | unsigned char *str; | ||
| 796 | int bytes; | ||
| 797 | { | 768 | { |
| 798 | const unsigned char *p = str, *endp = str + bytes; | 769 | const unsigned char *p = str, *endp = str + bytes; |
| 799 | unsigned char *to; | 770 | unsigned char *to; |
| @@ -835,11 +806,7 @@ str_as_unibyte (str, bytes) | |||
| 835 | Note: Currently the arg ACCEPT_LATIN_1 is not used. */ | 806 | Note: Currently the arg ACCEPT_LATIN_1 is not used. */ |
| 836 | 807 | ||
| 837 | EMACS_INT | 808 | EMACS_INT |
| 838 | str_to_unibyte (src, dst, chars, accept_latin_1) | 809 | str_to_unibyte (const unsigned char *src, unsigned char *dst, EMACS_INT chars, int accept_latin_1) |
| 839 | const unsigned char *src; | ||
| 840 | unsigned char *dst; | ||
| 841 | EMACS_INT chars; | ||
| 842 | int accept_latin_1; | ||
| 843 | { | 810 | { |
| 844 | EMACS_INT i; | 811 | EMACS_INT i; |
| 845 | 812 | ||
| @@ -859,8 +826,7 @@ str_to_unibyte (src, dst, chars, accept_latin_1) | |||
| 859 | 826 | ||
| 860 | 827 | ||
| 861 | int | 828 | int |
| 862 | string_count_byte8 (string) | 829 | string_count_byte8 (Lisp_Object string) |
| 863 | Lisp_Object string; | ||
| 864 | { | 830 | { |
| 865 | int multibyte = STRING_MULTIBYTE (string); | 831 | int multibyte = STRING_MULTIBYTE (string); |
| 866 | int nbytes = SBYTES (string); | 832 | int nbytes = SBYTES (string); |
| @@ -890,8 +856,7 @@ string_count_byte8 (string) | |||
| 890 | 856 | ||
| 891 | 857 | ||
| 892 | Lisp_Object | 858 | Lisp_Object |
| 893 | string_escape_byte8 (string) | 859 | string_escape_byte8 (Lisp_Object string) |
| 894 | Lisp_Object string; | ||
| 895 | { | 860 | { |
| 896 | int nchars = SCHARS (string); | 861 | int nchars = SCHARS (string); |
| 897 | int nbytes = SBYTES (string); | 862 | int nbytes = SBYTES (string); |
| @@ -1088,14 +1053,14 @@ character is not ASCII nor 8-bit character, an error is signalled. */) | |||
| 1088 | 1053 | ||
| 1089 | 1054 | ||
| 1090 | void | 1055 | void |
| 1091 | init_character_once () | 1056 | init_character_once (void) |
| 1092 | { | 1057 | { |
| 1093 | } | 1058 | } |
| 1094 | 1059 | ||
| 1095 | #ifdef emacs | 1060 | #ifdef emacs |
| 1096 | 1061 | ||
| 1097 | void | 1062 | void |
| 1098 | syms_of_character () | 1063 | syms_of_character (void) |
| 1099 | { | 1064 | { |
| 1100 | DEFSYM (Qcharacterp, "characterp"); | 1065 | DEFSYM (Qcharacterp, "characterp"); |
| 1101 | DEFSYM (Qauto_fill_chars, "auto-fill-chars"); | 1066 | DEFSYM (Qauto_fill_chars, "auto-fill-chars"); |
diff --git a/src/charset.c b/src/charset.c index 787d000d99a..40214ea3817 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -267,11 +267,7 @@ struct charset_map_entries | |||
| 267 | */ | 267 | */ |
| 268 | 268 | ||
| 269 | static void | 269 | static void |
| 270 | load_charset_map (charset, entries, n_entries, control_flag) | 270 | load_charset_map (struct charset *charset, struct charset_map_entries *entries, int n_entries, int control_flag) |
| 271 | struct charset *charset; | ||
| 272 | struct charset_map_entries *entries; | ||
| 273 | int n_entries; | ||
| 274 | int control_flag; | ||
| 275 | { | 271 | { |
| 276 | Lisp_Object vec, table; | 272 | Lisp_Object vec, table; |
| 277 | unsigned max_code = CHARSET_MAX_CODE (charset); | 273 | unsigned max_code = CHARSET_MAX_CODE (charset); |
| @@ -440,9 +436,7 @@ load_charset_map (charset, entries, n_entries, control_flag) | |||
| 440 | paying attention to comment charcter '#'. */ | 436 | paying attention to comment charcter '#'. */ |
| 441 | 437 | ||
| 442 | static INLINE unsigned | 438 | static INLINE unsigned |
| 443 | read_hex (fp, eof) | 439 | read_hex (FILE *fp, int *eof) |
| 444 | FILE *fp; | ||
| 445 | int *eof; | ||
| 446 | { | 440 | { |
| 447 | int c; | 441 | int c; |
| 448 | unsigned n; | 442 | unsigned n; |
| @@ -500,10 +494,7 @@ extern Lisp_Object Qfile_name_handler_alist; | |||
| 500 | extern void add_to_log (char *, Lisp_Object, Lisp_Object); | 494 | extern void add_to_log (char *, Lisp_Object, Lisp_Object); |
| 501 | 495 | ||
| 502 | static void | 496 | static void |
| 503 | load_charset_map_from_file (charset, mapfile, control_flag) | 497 | load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int control_flag) |
| 504 | struct charset *charset; | ||
| 505 | Lisp_Object mapfile; | ||
| 506 | int control_flag; | ||
| 507 | { | 498 | { |
| 508 | unsigned min_code = CHARSET_MIN_CODE (charset); | 499 | unsigned min_code = CHARSET_MIN_CODE (charset); |
| 509 | unsigned max_code = CHARSET_MAX_CODE (charset); | 500 | unsigned max_code = CHARSET_MAX_CODE (charset); |
| @@ -573,10 +564,7 @@ load_charset_map_from_file (charset, mapfile, control_flag) | |||
| 573 | } | 564 | } |
| 574 | 565 | ||
| 575 | static void | 566 | static void |
| 576 | load_charset_map_from_vector (charset, vec, control_flag) | 567 | load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int control_flag) |
| 577 | struct charset *charset; | ||
| 578 | Lisp_Object vec; | ||
| 579 | int control_flag; | ||
| 580 | { | 568 | { |
| 581 | unsigned min_code = CHARSET_MIN_CODE (charset); | 569 | unsigned min_code = CHARSET_MIN_CODE (charset); |
| 582 | unsigned max_code = CHARSET_MAX_CODE (charset); | 570 | unsigned max_code = CHARSET_MAX_CODE (charset); |
| @@ -652,9 +640,7 @@ load_charset_map_from_vector (charset, vec, control_flag) | |||
| 652 | map it is (see the comment of load_charset_map for the detail). */ | 640 | map it is (see the comment of load_charset_map for the detail). */ |
| 653 | 641 | ||
| 654 | static void | 642 | static void |
| 655 | load_charset (charset, control_flag) | 643 | load_charset (struct charset *charset, int control_flag) |
| 656 | struct charset *charset; | ||
| 657 | int control_flag; | ||
| 658 | { | 644 | { |
| 659 | Lisp_Object map; | 645 | Lisp_Object map; |
| 660 | 646 | ||
| @@ -689,10 +675,7 @@ void map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), | |||
| 689 | unsigned from, unsigned to); | 675 | unsigned from, unsigned to); |
| 690 | 676 | ||
| 691 | void | 677 | void |
| 692 | map_charset_for_dump (c_function, function, arg, from, to) | 678 | map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object arg, unsigned int from, unsigned int to) |
| 693 | void (*c_function) (Lisp_Object, Lisp_Object); | ||
| 694 | Lisp_Object function, arg; | ||
| 695 | unsigned from, to; | ||
| 696 | { | 679 | { |
| 697 | int from_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, from); | 680 | int from_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, from); |
| 698 | int to_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, to); | 681 | int to_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, to); |
| @@ -1484,8 +1467,7 @@ return nil. */) | |||
| 1484 | } | 1467 | } |
| 1485 | 1468 | ||
| 1486 | static void | 1469 | static void |
| 1487 | check_iso_charset_parameter (dimension, chars, final_char) | 1470 | check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char) |
| 1488 | Lisp_Object dimension, chars, final_char; | ||
| 1489 | { | 1471 | { |
| 1490 | CHECK_NATNUM (dimension); | 1472 | CHECK_NATNUM (dimension); |
| 1491 | CHECK_NATNUM (chars); | 1473 | CHECK_NATNUM (chars); |
| @@ -1535,8 +1517,7 @@ if CHARSET is designated instead. */) | |||
| 1535 | */ | 1517 | */ |
| 1536 | 1518 | ||
| 1537 | int | 1519 | int |
| 1538 | string_xstring_p (string) | 1520 | string_xstring_p (Lisp_Object string) |
| 1539 | Lisp_Object string; | ||
| 1540 | { | 1521 | { |
| 1541 | const unsigned char *p = SDATA (string); | 1522 | const unsigned char *p = SDATA (string); |
| 1542 | const unsigned char *endp = p + SBYTES (string); | 1523 | const unsigned char *endp = p + SBYTES (string); |
| @@ -1563,11 +1544,7 @@ string_xstring_p (string) | |||
| 1563 | It may lookup a translation table TABLE if supplied. */ | 1544 | It may lookup a translation table TABLE if supplied. */ |
| 1564 | 1545 | ||
| 1565 | static void | 1546 | static void |
| 1566 | find_charsets_in_text (ptr, nchars, nbytes, charsets, table, multibyte) | 1547 | find_charsets_in_text (const unsigned char *ptr, EMACS_INT nchars, EMACS_INT nbytes, Lisp_Object charsets, Lisp_Object table, int multibyte) |
| 1567 | const unsigned char *ptr; | ||
| 1568 | EMACS_INT nchars, nbytes; | ||
| 1569 | Lisp_Object charsets, table; | ||
| 1570 | int multibyte; | ||
| 1571 | { | 1548 | { |
| 1572 | const unsigned char *pend = ptr + nbytes; | 1549 | const unsigned char *pend = ptr + nbytes; |
| 1573 | 1550 | ||
| @@ -1689,9 +1666,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) | |||
| 1689 | value of Vchar_unify_table for C; i.e. it is nil, an integer, or a | 1666 | value of Vchar_unify_table for C; i.e. it is nil, an integer, or a |
| 1690 | charset symbol. */ | 1667 | charset symbol. */ |
| 1691 | int | 1668 | int |
| 1692 | maybe_unify_char (c, val) | 1669 | maybe_unify_char (int c, Lisp_Object val) |
| 1693 | int c; | ||
| 1694 | Lisp_Object val; | ||
| 1695 | { | 1670 | { |
| 1696 | struct charset *charset; | 1671 | struct charset *charset; |
| 1697 | 1672 | ||
| @@ -1724,9 +1699,7 @@ maybe_unify_char (c, val) | |||
| 1724 | CHARSET. */ | 1699 | CHARSET. */ |
| 1725 | 1700 | ||
| 1726 | int | 1701 | int |
| 1727 | decode_char (charset, code) | 1702 | decode_char (struct charset *charset, unsigned int code) |
| 1728 | struct charset *charset; | ||
| 1729 | unsigned code; | ||
| 1730 | { | 1703 | { |
| 1731 | int c, char_index; | 1704 | int c, char_index; |
| 1732 | enum charset_method method = CHARSET_METHOD (charset); | 1705 | enum charset_method method = CHARSET_METHOD (charset); |
| @@ -1805,9 +1778,7 @@ Lisp_Object charset_work; | |||
| 1805 | use CHARSET's strict_max_char instead of max_char. */ | 1778 | use CHARSET's strict_max_char instead of max_char. */ |
| 1806 | 1779 | ||
| 1807 | unsigned | 1780 | unsigned |
| 1808 | encode_char (charset, c) | 1781 | encode_char (struct charset *charset, int c) |
| 1809 | struct charset *charset; | ||
| 1810 | int c; | ||
| 1811 | { | 1782 | { |
| 1812 | unsigned code; | 1783 | unsigned code; |
| 1813 | enum charset_method method = CHARSET_METHOD (charset); | 1784 | enum charset_method method = CHARSET_METHOD (charset); |
| @@ -2057,10 +2028,7 @@ is specified. */) | |||
| 2057 | Vcharset_ordered_list. */ | 2028 | Vcharset_ordered_list. */ |
| 2058 | 2029 | ||
| 2059 | struct charset * | 2030 | struct charset * |
| 2060 | char_charset (c, charset_list, code_return) | 2031 | char_charset (int c, Lisp_Object charset_list, unsigned int *code_return) |
| 2061 | int c; | ||
| 2062 | Lisp_Object charset_list; | ||
| 2063 | unsigned *code_return; | ||
| 2064 | { | 2032 | { |
| 2065 | int maybe_null = 0; | 2033 | int maybe_null = 0; |
| 2066 | 2034 | ||
| @@ -2314,7 +2282,7 @@ Return charset identification number of CHARSET. */) | |||
| 2314 | 2282 | ||
| 2315 | 2283 | ||
| 2316 | void | 2284 | void |
| 2317 | init_charset () | 2285 | init_charset (void) |
| 2318 | { | 2286 | { |
| 2319 | Lisp_Object tempdir; | 2287 | Lisp_Object tempdir; |
| 2320 | tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory); | 2288 | tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory); |
| @@ -2332,7 +2300,7 @@ Please check your installation!\n", | |||
| 2332 | 2300 | ||
| 2333 | 2301 | ||
| 2334 | void | 2302 | void |
| 2335 | init_charset_once () | 2303 | init_charset_once (void) |
| 2336 | { | 2304 | { |
| 2337 | int i, j, k; | 2305 | int i, j, k; |
| 2338 | 2306 | ||
| @@ -2353,7 +2321,7 @@ init_charset_once () | |||
| 2353 | #ifdef emacs | 2321 | #ifdef emacs |
| 2354 | 2322 | ||
| 2355 | void | 2323 | void |
| 2356 | syms_of_charset () | 2324 | syms_of_charset (void) |
| 2357 | { | 2325 | { |
| 2358 | DEFSYM (Qcharsetp, "charsetp"); | 2326 | DEFSYM (Qcharsetp, "charsetp"); |
| 2359 | 2327 | ||
diff --git a/src/chartab.c b/src/chartab.c index 90ec660d671..a95e3ac6dca 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -92,9 +92,7 @@ the char-table has no extra slot. */) | |||
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static Lisp_Object | 94 | static Lisp_Object |
| 95 | make_sub_char_table (depth, min_char, defalt) | 95 | make_sub_char_table (int depth, int min_char, Lisp_Object defalt) |
| 96 | int depth, min_char; | ||
| 97 | Lisp_Object defalt; | ||
| 98 | { | 96 | { |
| 99 | Lisp_Object table; | 97 | Lisp_Object table; |
| 100 | int size = VECSIZE (struct Lisp_Sub_Char_Table) - 1 + chartab_size[depth]; | 98 | int size = VECSIZE (struct Lisp_Sub_Char_Table) - 1 + chartab_size[depth]; |
| @@ -108,8 +106,7 @@ make_sub_char_table (depth, min_char, defalt) | |||
| 108 | } | 106 | } |
| 109 | 107 | ||
| 110 | static Lisp_Object | 108 | static Lisp_Object |
| 111 | char_table_ascii (table) | 109 | char_table_ascii (Lisp_Object table) |
| 112 | Lisp_Object table; | ||
| 113 | { | 110 | { |
| 114 | Lisp_Object sub; | 111 | Lisp_Object sub; |
| 115 | 112 | ||
| @@ -123,8 +120,7 @@ char_table_ascii (table) | |||
| 123 | } | 120 | } |
| 124 | 121 | ||
| 125 | Lisp_Object | 122 | Lisp_Object |
| 126 | copy_sub_char_table (table) | 123 | copy_sub_char_table (Lisp_Object table) |
| 127 | Lisp_Object table; | ||
| 128 | { | 124 | { |
| 129 | Lisp_Object copy; | 125 | Lisp_Object copy; |
| 130 | int depth = XINT (XSUB_CHAR_TABLE (table)->depth); | 126 | int depth = XINT (XSUB_CHAR_TABLE (table)->depth); |
| @@ -148,8 +144,7 @@ copy_sub_char_table (table) | |||
| 148 | 144 | ||
| 149 | 145 | ||
| 150 | Lisp_Object | 146 | Lisp_Object |
| 151 | copy_char_table (table) | 147 | copy_char_table (Lisp_Object table) |
| 152 | Lisp_Object table; | ||
| 153 | { | 148 | { |
| 154 | Lisp_Object copy; | 149 | Lisp_Object copy; |
| 155 | int size = XCHAR_TABLE (table)->size & PSEUDOVECTOR_SIZE_MASK; | 150 | int size = XCHAR_TABLE (table)->size & PSEUDOVECTOR_SIZE_MASK; |
| @@ -175,9 +170,7 @@ copy_char_table (table) | |||
| 175 | } | 170 | } |
| 176 | 171 | ||
| 177 | Lisp_Object | 172 | Lisp_Object |
| 178 | sub_char_table_ref (table, c) | 173 | sub_char_table_ref (Lisp_Object table, int c) |
| 179 | Lisp_Object table; | ||
| 180 | int c; | ||
| 181 | { | 174 | { |
| 182 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 175 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 183 | int depth = XINT (tbl->depth); | 176 | int depth = XINT (tbl->depth); |
| @@ -191,9 +184,7 @@ sub_char_table_ref (table, c) | |||
| 191 | } | 184 | } |
| 192 | 185 | ||
| 193 | Lisp_Object | 186 | Lisp_Object |
| 194 | char_table_ref (table, c) | 187 | char_table_ref (Lisp_Object table, int c) |
| 195 | Lisp_Object table; | ||
| 196 | int c; | ||
| 197 | { | 188 | { |
| 198 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); | 189 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); |
| 199 | Lisp_Object val; | 190 | Lisp_Object val; |
| @@ -220,11 +211,7 @@ char_table_ref (table, c) | |||
| 220 | } | 211 | } |
| 221 | 212 | ||
| 222 | static Lisp_Object | 213 | static Lisp_Object |
| 223 | sub_char_table_ref_and_range (table, c, from, to, defalt) | 214 | sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp_Object defalt) |
| 224 | Lisp_Object table; | ||
| 225 | int c; | ||
| 226 | int *from, *to; | ||
| 227 | Lisp_Object defalt; | ||
| 228 | { | 215 | { |
| 229 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 216 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 230 | int depth = XINT (tbl->depth); | 217 | int depth = XINT (tbl->depth); |
| @@ -286,10 +273,7 @@ sub_char_table_ref_and_range (table, c, from, to, defalt) | |||
| 286 | 1) are different from that of C. */ | 273 | 1) are different from that of C. */ |
| 287 | 274 | ||
| 288 | Lisp_Object | 275 | Lisp_Object |
| 289 | char_table_ref_and_range (table, c, from, to) | 276 | char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) |
| 290 | Lisp_Object table; | ||
| 291 | int c; | ||
| 292 | int *from, *to; | ||
| 293 | { | 277 | { |
| 294 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); | 278 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); |
| 295 | int index = CHARTAB_IDX (c, 0, 0), idx; | 279 | int index = CHARTAB_IDX (c, 0, 0), idx; |
| @@ -363,10 +347,7 @@ char_table_ref_and_range (table, c, from, to) | |||
| 363 | 347 | ||
| 364 | 348 | ||
| 365 | static void | 349 | static void |
| 366 | sub_char_table_set (table, c, val) | 350 | sub_char_table_set (Lisp_Object table, int c, Lisp_Object val) |
| 367 | Lisp_Object table; | ||
| 368 | int c; | ||
| 369 | Lisp_Object val; | ||
| 370 | { | 351 | { |
| 371 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 352 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 372 | int depth = XINT ((tbl)->depth); | 353 | int depth = XINT ((tbl)->depth); |
| @@ -390,10 +371,7 @@ sub_char_table_set (table, c, val) | |||
| 390 | } | 371 | } |
| 391 | 372 | ||
| 392 | Lisp_Object | 373 | Lisp_Object |
| 393 | char_table_set (table, c, val) | 374 | char_table_set (Lisp_Object table, int c, Lisp_Object val) |
| 394 | Lisp_Object table; | ||
| 395 | int c; | ||
| 396 | Lisp_Object val; | ||
| 397 | { | 375 | { |
| 398 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); | 376 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); |
| 399 | 377 | ||
| @@ -421,12 +399,7 @@ char_table_set (table, c, val) | |||
| 421 | } | 399 | } |
| 422 | 400 | ||
| 423 | static void | 401 | static void |
| 424 | sub_char_table_set_range (table, depth, min_char, from, to, val) | 402 | sub_char_table_set_range (Lisp_Object *table, int depth, int min_char, int from, int to, Lisp_Object val) |
| 425 | Lisp_Object *table; | ||
| 426 | int depth; | ||
| 427 | int min_char; | ||
| 428 | int from, to; | ||
| 429 | Lisp_Object val; | ||
| 430 | { | 403 | { |
| 431 | int max_char = min_char + chartab_chars[depth] - 1; | 404 | int max_char = min_char + chartab_chars[depth] - 1; |
| 432 | 405 | ||
| @@ -454,10 +427,7 @@ sub_char_table_set_range (table, depth, min_char, from, to, val) | |||
| 454 | 427 | ||
| 455 | 428 | ||
| 456 | Lisp_Object | 429 | Lisp_Object |
| 457 | char_table_set_range (table, from, to, val) | 430 | char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val) |
| 458 | Lisp_Object table; | ||
| 459 | int from, to; | ||
| 460 | Lisp_Object val; | ||
| 461 | { | 431 | { |
| 462 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); | 432 | struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); |
| 463 | Lisp_Object *contents = tbl->contents; | 433 | Lisp_Object *contents = tbl->contents; |
| @@ -640,9 +610,7 @@ This function is obsolete and has no effect. */) | |||
| 640 | integer. If the element is not a character, return CH itself. */ | 610 | integer. If the element is not a character, return CH itself. */ |
| 641 | 611 | ||
| 642 | int | 612 | int |
| 643 | char_table_translate (table, ch) | 613 | char_table_translate (Lisp_Object table, int ch) |
| 644 | Lisp_Object table; | ||
| 645 | int ch; | ||
| 646 | { | 614 | { |
| 647 | Lisp_Object value; | 615 | Lisp_Object value; |
| 648 | value = Faref (table, make_number (ch)); | 616 | value = Faref (table, make_number (ch)); |
| @@ -652,8 +620,7 @@ char_table_translate (table, ch) | |||
| 652 | } | 620 | } |
| 653 | 621 | ||
| 654 | static Lisp_Object | 622 | static Lisp_Object |
| 655 | optimize_sub_char_table (table, test) | 623 | optimize_sub_char_table (Lisp_Object table, Lisp_Object test) |
| 656 | Lisp_Object table, test; | ||
| 657 | { | 624 | { |
| 658 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 625 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 659 | int depth = XINT (tbl->depth); | 626 | int depth = XINT (tbl->depth); |
| @@ -840,9 +807,7 @@ map_sub_char_table (c_function, function, table, arg, val, range, | |||
| 840 | ARG is passed to C_FUNCTION when that is called. */ | 807 | ARG is passed to C_FUNCTION when that is called. */ |
| 841 | 808 | ||
| 842 | void | 809 | void |
| 843 | map_char_table (c_function, function, table, arg) | 810 | map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object table, Lisp_Object arg) |
| 844 | void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object); | ||
| 845 | Lisp_Object function, table, arg; | ||
| 846 | { | 811 | { |
| 847 | Lisp_Object range, val; | 812 | Lisp_Object range, val; |
| 848 | struct gcpro gcpro1, gcpro2, gcpro3; | 813 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -1049,7 +1014,7 @@ map_char_table_for_charset (c_function, function, table, arg, | |||
| 1049 | 1014 | ||
| 1050 | 1015 | ||
| 1051 | void | 1016 | void |
| 1052 | syms_of_chartab () | 1017 | syms_of_chartab (void) |
| 1053 | { | 1018 | { |
| 1054 | defsubr (&Smake_char_table); | 1019 | defsubr (&Smake_char_table); |
| 1055 | defsubr (&Schar_table_parent); | 1020 | defsubr (&Schar_table_parent); |
diff --git a/src/cmds.c b/src/cmds.c index 465fce18a4b..2bea5a6f10c 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -356,9 +356,7 @@ After insertion, the value of `auto-fill-function' is called if the | |||
| 356 | static Lisp_Object Qexpand_abbrev; | 356 | static Lisp_Object Qexpand_abbrev; |
| 357 | 357 | ||
| 358 | int | 358 | int |
| 359 | internal_self_insert (c, noautofill) | 359 | internal_self_insert (int c, int noautofill) |
| 360 | int c; | ||
| 361 | int noautofill; | ||
| 362 | { | 360 | { |
| 363 | int hairy = 0; | 361 | int hairy = 0; |
| 364 | Lisp_Object tem; | 362 | Lisp_Object tem; |
| @@ -546,7 +544,7 @@ internal_self_insert (c, noautofill) | |||
| 546 | /* module initialization */ | 544 | /* module initialization */ |
| 547 | 545 | ||
| 548 | void | 546 | void |
| 549 | syms_of_cmds () | 547 | syms_of_cmds (void) |
| 550 | { | 548 | { |
| 551 | Qkill_backward_chars = intern_c_string ("kill-backward-chars"); | 549 | Qkill_backward_chars = intern_c_string ("kill-backward-chars"); |
| 552 | staticpro (&Qkill_backward_chars); | 550 | staticpro (&Qkill_backward_chars); |
| @@ -587,7 +585,7 @@ More precisely, a char with closeparen syntax is self-inserted. */); | |||
| 587 | } | 585 | } |
| 588 | 586 | ||
| 589 | void | 587 | void |
| 590 | keys_of_cmds () | 588 | keys_of_cmds (void) |
| 591 | { | 589 | { |
| 592 | int n; | 590 | int n; |
| 593 | 591 | ||
diff --git a/src/coding.c b/src/coding.c index 1730468ade9..8c6fc0aeadf 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1106,8 +1106,7 @@ record_conversion_result (struct coding_system *coding, | |||
| 1106 | 1106 | ||
| 1107 | 1107 | ||
| 1108 | static void | 1108 | static void |
| 1109 | coding_set_source (coding) | 1109 | coding_set_source (struct coding_system *coding) |
| 1110 | struct coding_system *coding; | ||
| 1111 | { | 1110 | { |
| 1112 | if (BUFFERP (coding->src_object)) | 1111 | if (BUFFERP (coding->src_object)) |
| 1113 | { | 1112 | { |
| @@ -1129,8 +1128,7 @@ coding_set_source (coding) | |||
| 1129 | } | 1128 | } |
| 1130 | 1129 | ||
| 1131 | static void | 1130 | static void |
| 1132 | coding_set_destination (coding) | 1131 | coding_set_destination (struct coding_system *coding) |
| 1133 | struct coding_system *coding; | ||
| 1134 | { | 1132 | { |
| 1135 | if (BUFFERP (coding->dst_object)) | 1133 | if (BUFFERP (coding->dst_object)) |
| 1136 | { | 1134 | { |
| @@ -1159,9 +1157,7 @@ coding_set_destination (coding) | |||
| 1159 | 1157 | ||
| 1160 | 1158 | ||
| 1161 | static void | 1159 | static void |
| 1162 | coding_alloc_by_realloc (coding, bytes) | 1160 | coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes) |
| 1163 | struct coding_system *coding; | ||
| 1164 | EMACS_INT bytes; | ||
| 1165 | { | 1161 | { |
| 1166 | coding->destination = (unsigned char *) xrealloc (coding->destination, | 1162 | coding->destination = (unsigned char *) xrealloc (coding->destination, |
| 1167 | coding->dst_bytes + bytes); | 1163 | coding->dst_bytes + bytes); |
| @@ -1169,9 +1165,7 @@ coding_alloc_by_realloc (coding, bytes) | |||
| 1169 | } | 1165 | } |
| 1170 | 1166 | ||
| 1171 | static void | 1167 | static void |
| 1172 | coding_alloc_by_making_gap (coding, gap_head_used, bytes) | 1168 | coding_alloc_by_making_gap (struct coding_system *coding, EMACS_INT gap_head_used, EMACS_INT bytes) |
| 1173 | struct coding_system *coding; | ||
| 1174 | EMACS_INT gap_head_used, bytes; | ||
| 1175 | { | 1169 | { |
| 1176 | if (EQ (coding->src_object, coding->dst_object)) | 1170 | if (EQ (coding->src_object, coding->dst_object)) |
| 1177 | { | 1171 | { |
| @@ -1200,10 +1194,7 @@ coding_alloc_by_making_gap (coding, gap_head_used, bytes) | |||
| 1200 | 1194 | ||
| 1201 | 1195 | ||
| 1202 | static unsigned char * | 1196 | static unsigned char * |
| 1203 | alloc_destination (coding, nbytes, dst) | 1197 | alloc_destination (struct coding_system *coding, EMACS_INT nbytes, unsigned char *dst) |
| 1204 | struct coding_system *coding; | ||
| 1205 | EMACS_INT nbytes; | ||
| 1206 | unsigned char *dst; | ||
| 1207 | { | 1198 | { |
| 1208 | EMACS_INT offset = dst - coding->destination; | 1199 | EMACS_INT offset = dst - coding->destination; |
| 1209 | 1200 | ||
| @@ -1301,9 +1292,7 @@ alloc_destination (coding, nbytes, dst) | |||
| 1301 | #define UTF_8_BOM_3 0xBF | 1292 | #define UTF_8_BOM_3 0xBF |
| 1302 | 1293 | ||
| 1303 | static int | 1294 | static int |
| 1304 | detect_coding_utf_8 (coding, detect_info) | 1295 | detect_coding_utf_8 (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 1305 | struct coding_system *coding; | ||
| 1306 | struct coding_detection_info *detect_info; | ||
| 1307 | { | 1296 | { |
| 1308 | const unsigned char *src = coding->source, *src_base; | 1297 | const unsigned char *src = coding->source, *src_base; |
| 1309 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1298 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -1386,8 +1375,7 @@ detect_coding_utf_8 (coding, detect_info) | |||
| 1386 | 1375 | ||
| 1387 | 1376 | ||
| 1388 | static void | 1377 | static void |
| 1389 | decode_coding_utf_8 (coding) | 1378 | decode_coding_utf_8 (struct coding_system *coding) |
| 1390 | struct coding_system *coding; | ||
| 1391 | { | 1379 | { |
| 1392 | const unsigned char *src = coding->source + coding->consumed; | 1380 | const unsigned char *src = coding->source + coding->consumed; |
| 1393 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1381 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -1543,8 +1531,7 @@ decode_coding_utf_8 (coding) | |||
| 1543 | 1531 | ||
| 1544 | 1532 | ||
| 1545 | static int | 1533 | static int |
| 1546 | encode_coding_utf_8 (coding) | 1534 | encode_coding_utf_8 (struct coding_system *coding) |
| 1547 | struct coding_system *coding; | ||
| 1548 | { | 1535 | { |
| 1549 | int multibytep = coding->dst_multibyte; | 1536 | int multibytep = coding->dst_multibyte; |
| 1550 | int *charbuf = coding->charbuf; | 1537 | int *charbuf = coding->charbuf; |
| @@ -1623,9 +1610,7 @@ encode_coding_utf_8 (coding) | |||
| 1623 | 1610 | ||
| 1624 | 1611 | ||
| 1625 | static int | 1612 | static int |
| 1626 | detect_coding_utf_16 (coding, detect_info) | 1613 | detect_coding_utf_16 (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 1627 | struct coding_system *coding; | ||
| 1628 | struct coding_detection_info *detect_info; | ||
| 1629 | { | 1614 | { |
| 1630 | const unsigned char *src = coding->source, *src_base = src; | 1615 | const unsigned char *src = coding->source, *src_base = src; |
| 1631 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1616 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -1708,8 +1693,7 @@ detect_coding_utf_16 (coding, detect_info) | |||
| 1708 | } | 1693 | } |
| 1709 | 1694 | ||
| 1710 | static void | 1695 | static void |
| 1711 | decode_coding_utf_16 (coding) | 1696 | decode_coding_utf_16 (struct coding_system *coding) |
| 1712 | struct coding_system *coding; | ||
| 1713 | { | 1697 | { |
| 1714 | const unsigned char *src = coding->source + coding->consumed; | 1698 | const unsigned char *src = coding->source + coding->consumed; |
| 1715 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1699 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -1837,8 +1821,7 @@ decode_coding_utf_16 (coding) | |||
| 1837 | } | 1821 | } |
| 1838 | 1822 | ||
| 1839 | static int | 1823 | static int |
| 1840 | encode_coding_utf_16 (coding) | 1824 | encode_coding_utf_16 (struct coding_system *coding) |
| 1841 | struct coding_system *coding; | ||
| 1842 | { | 1825 | { |
| 1843 | int multibytep = coding->dst_multibyte; | 1826 | int multibytep = coding->dst_multibyte; |
| 1844 | int *charbuf = coding->charbuf; | 1827 | int *charbuf = coding->charbuf; |
| @@ -1979,9 +1962,7 @@ char emacs_mule_bytes[256]; | |||
| 1979 | else return 0. */ | 1962 | else return 0. */ |
| 1980 | 1963 | ||
| 1981 | static int | 1964 | static int |
| 1982 | detect_coding_emacs_mule (coding, detect_info) | 1965 | detect_coding_emacs_mule (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 1983 | struct coding_system *coding; | ||
| 1984 | struct coding_detection_info *detect_info; | ||
| 1985 | { | 1966 | { |
| 1986 | const unsigned char *src = coding->source, *src_base; | 1967 | const unsigned char *src = coding->source, *src_base; |
| 1987 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1968 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -2069,11 +2050,7 @@ detect_coding_emacs_mule (coding, detect_info) | |||
| 2069 | -1. If SRC is too short, return -2. */ | 2050 | -1. If SRC is too short, return -2. */ |
| 2070 | 2051 | ||
| 2071 | int | 2052 | int |
| 2072 | emacs_mule_char (coding, src, nbytes, nchars, id, cmp_status) | 2053 | emacs_mule_char (struct coding_system *coding, const unsigned char *src, int *nbytes, int *nchars, int *id, struct composition_status *cmp_status) |
| 2073 | struct coding_system *coding; | ||
| 2074 | const unsigned char *src; | ||
| 2075 | int *nbytes, *nchars, *id; | ||
| 2076 | struct composition_status *cmp_status; | ||
| 2077 | { | 2054 | { |
| 2078 | const unsigned char *src_end = coding->source + coding->src_bytes; | 2055 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 2079 | const unsigned char *src_base = src; | 2056 | const unsigned char *src_base = src; |
| @@ -2391,9 +2368,7 @@ emacs_mule_char (coding, src, nbytes, nchars, id, cmp_status) | |||
| 2391 | 2368 | ||
| 2392 | 2369 | ||
| 2393 | static int | 2370 | static int |
| 2394 | emacs_mule_finish_composition (charbuf, cmp_status) | 2371 | emacs_mule_finish_composition (int *charbuf, struct composition_status *cmp_status) |
| 2395 | int *charbuf; | ||
| 2396 | struct composition_status *cmp_status; | ||
| 2397 | { | 2372 | { |
| 2398 | int idx = - cmp_status->length; | 2373 | int idx = - cmp_status->length; |
| 2399 | int new_chars; | 2374 | int new_chars; |
| @@ -2448,8 +2423,7 @@ emacs_mule_finish_composition (charbuf, cmp_status) | |||
| 2448 | 2423 | ||
| 2449 | 2424 | ||
| 2450 | static void | 2425 | static void |
| 2451 | decode_coding_emacs_mule (coding) | 2426 | decode_coding_emacs_mule (struct coding_system *coding) |
| 2452 | struct coding_system *coding; | ||
| 2453 | { | 2427 | { |
| 2454 | const unsigned char *src = coding->source + coding->consumed; | 2428 | const unsigned char *src = coding->source + coding->consumed; |
| 2455 | const unsigned char *src_end = coding->source + coding->src_bytes; | 2429 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -2713,8 +2687,7 @@ decode_coding_emacs_mule (coding) | |||
| 2713 | 2687 | ||
| 2714 | 2688 | ||
| 2715 | static int | 2689 | static int |
| 2716 | encode_coding_emacs_mule (coding) | 2690 | encode_coding_emacs_mule (struct coding_system *coding) |
| 2717 | struct coding_system *coding; | ||
| 2718 | { | 2691 | { |
| 2719 | int multibytep = coding->dst_multibyte; | 2692 | int multibytep = coding->dst_multibyte; |
| 2720 | int *charbuf = coding->charbuf; | 2693 | int *charbuf = coding->charbuf; |
| @@ -3007,8 +2980,7 @@ enum iso_code_class_type iso_code_class[256]; | |||
| 3007 | (CODING_ISO_INITIAL (&coding_categories[category], 1) >= 0) | 2980 | (CODING_ISO_INITIAL (&coding_categories[category], 1) >= 0) |
| 3008 | 2981 | ||
| 3009 | static void | 2982 | static void |
| 3010 | setup_iso_safe_charsets (attrs) | 2983 | setup_iso_safe_charsets (Lisp_Object attrs) |
| 3011 | Lisp_Object attrs; | ||
| 3012 | { | 2984 | { |
| 3013 | Lisp_Object charset_list, safe_charsets; | 2985 | Lisp_Object charset_list, safe_charsets; |
| 3014 | Lisp_Object request; | 2986 | Lisp_Object request; |
| @@ -3076,9 +3048,7 @@ setup_iso_safe_charsets (attrs) | |||
| 3076 | If it is, return 1, else return 0. */ | 3048 | If it is, return 1, else return 0. */ |
| 3077 | 3049 | ||
| 3078 | static int | 3050 | static int |
| 3079 | detect_coding_iso_2022 (coding, detect_info) | 3051 | detect_coding_iso_2022 (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 3080 | struct coding_system *coding; | ||
| 3081 | struct coding_detection_info *detect_info; | ||
| 3082 | { | 3052 | { |
| 3083 | const unsigned char *src = coding->source, *src_base = src; | 3053 | const unsigned char *src = coding->source, *src_base = src; |
| 3084 | const unsigned char *src_end = coding->source + coding->src_bytes; | 3054 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -3445,9 +3415,7 @@ detect_coding_iso_2022 (coding, detect_info) | |||
| 3445 | static int finish_composition (int *, struct composition_status *); | 3415 | static int finish_composition (int *, struct composition_status *); |
| 3446 | 3416 | ||
| 3447 | static int | 3417 | static int |
| 3448 | finish_composition (charbuf, cmp_status) | 3418 | finish_composition (int *charbuf, struct composition_status *cmp_status) |
| 3449 | int *charbuf; | ||
| 3450 | struct composition_status *cmp_status; | ||
| 3451 | { | 3419 | { |
| 3452 | int idx = - cmp_status->length; | 3420 | int idx = - cmp_status->length; |
| 3453 | int new_chars; | 3421 | int new_chars; |
| @@ -3584,8 +3552,7 @@ finish_composition (charbuf, cmp_status) | |||
| 3584 | /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions". */ | 3552 | /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions". */ |
| 3585 | 3553 | ||
| 3586 | static void | 3554 | static void |
| 3587 | decode_coding_iso_2022 (coding) | 3555 | decode_coding_iso_2022 (struct coding_system *coding) |
| 3588 | struct coding_system *coding; | ||
| 3589 | { | 3556 | { |
| 3590 | const unsigned char *src = coding->source + coding->consumed; | 3557 | const unsigned char *src = coding->source + coding->consumed; |
| 3591 | const unsigned char *src_end = coding->source + coding->src_bytes; | 3558 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -4331,11 +4298,7 @@ decode_coding_iso_2022 (coding) | |||
| 4331 | Return new DST. */ | 4298 | Return new DST. */ |
| 4332 | 4299 | ||
| 4333 | unsigned char * | 4300 | unsigned char * |
| 4334 | encode_invocation_designation (charset, coding, dst, p_nchars) | 4301 | encode_invocation_designation (struct charset *charset, struct coding_system *coding, unsigned char *dst, int *p_nchars) |
| 4335 | struct charset *charset; | ||
| 4336 | struct coding_system *coding; | ||
| 4337 | unsigned char *dst; | ||
| 4338 | int *p_nchars; | ||
| 4339 | { | 4302 | { |
| 4340 | int multibytep = coding->dst_multibyte; | 4303 | int multibytep = coding->dst_multibyte; |
| 4341 | int produced_chars = *p_nchars; | 4304 | int produced_chars = *p_nchars; |
| @@ -4447,10 +4410,7 @@ encode_invocation_designation (charset, coding, dst, p_nchars) | |||
| 4447 | find all the necessary designations. */ | 4410 | find all the necessary designations. */ |
| 4448 | 4411 | ||
| 4449 | static unsigned char * | 4412 | static unsigned char * |
| 4450 | encode_designation_at_bol (coding, charbuf, charbuf_end, dst) | 4413 | encode_designation_at_bol (struct coding_system *coding, int *charbuf, int *charbuf_end, unsigned char *dst) |
| 4451 | struct coding_system *coding; | ||
| 4452 | int *charbuf, *charbuf_end; | ||
| 4453 | unsigned char *dst; | ||
| 4454 | { | 4414 | { |
| 4455 | struct charset *charset; | 4415 | struct charset *charset; |
| 4456 | /* Table of charsets to be designated to each graphic register. */ | 4416 | /* Table of charsets to be designated to each graphic register. */ |
| @@ -4500,8 +4460,7 @@ encode_designation_at_bol (coding, charbuf, charbuf_end, dst) | |||
| 4500 | /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ | 4460 | /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ |
| 4501 | 4461 | ||
| 4502 | static int | 4462 | static int |
| 4503 | encode_coding_iso_2022 (coding) | 4463 | encode_coding_iso_2022 (struct coding_system *coding) |
| 4504 | struct coding_system *coding; | ||
| 4505 | { | 4464 | { |
| 4506 | int multibytep = coding->dst_multibyte; | 4465 | int multibytep = coding->dst_multibyte; |
| 4507 | int *charbuf = coding->charbuf; | 4466 | int *charbuf = coding->charbuf; |
| @@ -4691,9 +4650,7 @@ encode_coding_iso_2022 (coding) | |||
| 4691 | CATEGORY_MASK_SJIS, else return 0. */ | 4650 | CATEGORY_MASK_SJIS, else return 0. */ |
| 4692 | 4651 | ||
| 4693 | static int | 4652 | static int |
| 4694 | detect_coding_sjis (coding, detect_info) | 4653 | detect_coding_sjis (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 4695 | struct coding_system *coding; | ||
| 4696 | struct coding_detection_info *detect_info; | ||
| 4697 | { | 4654 | { |
| 4698 | const unsigned char *src = coding->source, *src_base; | 4655 | const unsigned char *src = coding->source, *src_base; |
| 4699 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4656 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -4749,9 +4706,7 @@ detect_coding_sjis (coding, detect_info) | |||
| 4749 | CATEGORY_MASK_BIG5, else return 0. */ | 4706 | CATEGORY_MASK_BIG5, else return 0. */ |
| 4750 | 4707 | ||
| 4751 | static int | 4708 | static int |
| 4752 | detect_coding_big5 (coding, detect_info) | 4709 | detect_coding_big5 (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 4753 | struct coding_system *coding; | ||
| 4754 | struct coding_detection_info *detect_info; | ||
| 4755 | { | 4710 | { |
| 4756 | const unsigned char *src = coding->source, *src_base; | 4711 | const unsigned char *src = coding->source, *src_base; |
| 4757 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4712 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -4797,8 +4752,7 @@ detect_coding_big5 (coding, detect_info) | |||
| 4797 | If SJIS_P is 1, decode SJIS text, else decode BIG5 test. */ | 4752 | If SJIS_P is 1, decode SJIS text, else decode BIG5 test. */ |
| 4798 | 4753 | ||
| 4799 | static void | 4754 | static void |
| 4800 | decode_coding_sjis (coding) | 4755 | decode_coding_sjis (struct coding_system *coding) |
| 4801 | struct coding_system *coding; | ||
| 4802 | { | 4756 | { |
| 4803 | const unsigned char *src = coding->source + coding->consumed; | 4757 | const unsigned char *src = coding->source + coding->consumed; |
| 4804 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4758 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -4916,8 +4870,7 @@ decode_coding_sjis (coding) | |||
| 4916 | } | 4870 | } |
| 4917 | 4871 | ||
| 4918 | static void | 4872 | static void |
| 4919 | decode_coding_big5 (coding) | 4873 | decode_coding_big5 (struct coding_system *coding) |
| 4920 | struct coding_system *coding; | ||
| 4921 | { | 4874 | { |
| 4922 | const unsigned char *src = coding->source + coding->consumed; | 4875 | const unsigned char *src = coding->source + coding->consumed; |
| 4923 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4876 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -5021,8 +4974,7 @@ decode_coding_big5 (coding) | |||
| 5021 | SJIS text, else encode BIG5 text. */ | 4974 | SJIS text, else encode BIG5 text. */ |
| 5022 | 4975 | ||
| 5023 | static int | 4976 | static int |
| 5024 | encode_coding_sjis (coding) | 4977 | encode_coding_sjis (struct coding_system *coding) |
| 5025 | struct coding_system *coding; | ||
| 5026 | { | 4978 | { |
| 5027 | int multibytep = coding->dst_multibyte; | 4979 | int multibytep = coding->dst_multibyte; |
| 5028 | int *charbuf = coding->charbuf; | 4980 | int *charbuf = coding->charbuf; |
| @@ -5114,8 +5066,7 @@ encode_coding_sjis (coding) | |||
| 5114 | } | 5066 | } |
| 5115 | 5067 | ||
| 5116 | static int | 5068 | static int |
| 5117 | encode_coding_big5 (coding) | 5069 | encode_coding_big5 (struct coding_system *coding) |
| 5118 | struct coding_system *coding; | ||
| 5119 | { | 5070 | { |
| 5120 | int multibytep = coding->dst_multibyte; | 5071 | int multibytep = coding->dst_multibyte; |
| 5121 | int *charbuf = coding->charbuf; | 5072 | int *charbuf = coding->charbuf; |
| @@ -5193,9 +5144,7 @@ encode_coding_big5 (coding) | |||
| 5193 | CATEGORY_MASK_CCL, else return 0. */ | 5144 | CATEGORY_MASK_CCL, else return 0. */ |
| 5194 | 5145 | ||
| 5195 | static int | 5146 | static int |
| 5196 | detect_coding_ccl (coding, detect_info) | 5147 | detect_coding_ccl (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 5197 | struct coding_system *coding; | ||
| 5198 | struct coding_detection_info *detect_info; | ||
| 5199 | { | 5148 | { |
| 5200 | const unsigned char *src = coding->source, *src_base; | 5149 | const unsigned char *src = coding->source, *src_base; |
| 5201 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5150 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -5234,8 +5183,7 @@ detect_coding_ccl (coding, detect_info) | |||
| 5234 | } | 5183 | } |
| 5235 | 5184 | ||
| 5236 | static void | 5185 | static void |
| 5237 | decode_coding_ccl (coding) | 5186 | decode_coding_ccl (struct coding_system *coding) |
| 5238 | struct coding_system *coding; | ||
| 5239 | { | 5187 | { |
| 5240 | const unsigned char *src = coding->source + coding->consumed; | 5188 | const unsigned char *src = coding->source + coding->consumed; |
| 5241 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5189 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -5304,8 +5252,7 @@ decode_coding_ccl (coding) | |||
| 5304 | } | 5252 | } |
| 5305 | 5253 | ||
| 5306 | static int | 5254 | static int |
| 5307 | encode_coding_ccl (coding) | 5255 | encode_coding_ccl (struct coding_system *coding) |
| 5308 | struct coding_system *coding; | ||
| 5309 | { | 5256 | { |
| 5310 | struct ccl_program *ccl = &coding->spec.ccl->ccl; | 5257 | struct ccl_program *ccl = &coding->spec.ccl->ccl; |
| 5311 | int multibytep = coding->dst_multibyte; | 5258 | int multibytep = coding->dst_multibyte; |
| @@ -5374,8 +5321,7 @@ encode_coding_ccl (coding) | |||
| 5374 | /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions". */ | 5321 | /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions". */ |
| 5375 | 5322 | ||
| 5376 | static void | 5323 | static void |
| 5377 | decode_coding_raw_text (coding) | 5324 | decode_coding_raw_text (struct coding_system *coding) |
| 5378 | struct coding_system *coding; | ||
| 5379 | { | 5325 | { |
| 5380 | int eol_crlf = | 5326 | int eol_crlf = |
| 5381 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 5327 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| @@ -5394,8 +5340,7 @@ decode_coding_raw_text (coding) | |||
| 5394 | } | 5340 | } |
| 5395 | 5341 | ||
| 5396 | static int | 5342 | static int |
| 5397 | encode_coding_raw_text (coding) | 5343 | encode_coding_raw_text (struct coding_system *coding) |
| 5398 | struct coding_system *coding; | ||
| 5399 | { | 5344 | { |
| 5400 | int multibytep = coding->dst_multibyte; | 5345 | int multibytep = coding->dst_multibyte; |
| 5401 | int *charbuf = coding->charbuf; | 5346 | int *charbuf = coding->charbuf; |
| @@ -5478,9 +5423,7 @@ encode_coding_raw_text (coding) | |||
| 5478 | is, return 1, else return 0. */ | 5423 | is, return 1, else return 0. */ |
| 5479 | 5424 | ||
| 5480 | static int | 5425 | static int |
| 5481 | detect_coding_charset (coding, detect_info) | 5426 | detect_coding_charset (struct coding_system *coding, struct coding_detection_info *detect_info) |
| 5482 | struct coding_system *coding; | ||
| 5483 | struct coding_detection_info *detect_info; | ||
| 5484 | { | 5427 | { |
| 5485 | const unsigned char *src = coding->source, *src_base; | 5428 | const unsigned char *src = coding->source, *src_base; |
| 5486 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5429 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -5582,8 +5525,7 @@ detect_coding_charset (coding, detect_info) | |||
| 5582 | } | 5525 | } |
| 5583 | 5526 | ||
| 5584 | static void | 5527 | static void |
| 5585 | decode_coding_charset (coding) | 5528 | decode_coding_charset (struct coding_system *coding) |
| 5586 | struct coding_system *coding; | ||
| 5587 | { | 5529 | { |
| 5588 | const unsigned char *src = coding->source + coding->consumed; | 5530 | const unsigned char *src = coding->source + coding->consumed; |
| 5589 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5531 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| @@ -5711,8 +5653,7 @@ decode_coding_charset (coding) | |||
| 5711 | } | 5653 | } |
| 5712 | 5654 | ||
| 5713 | static int | 5655 | static int |
| 5714 | encode_coding_charset (coding) | 5656 | encode_coding_charset (struct coding_system *coding) |
| 5715 | struct coding_system *coding; | ||
| 5716 | { | 5657 | { |
| 5717 | int multibytep = coding->dst_multibyte; | 5658 | int multibytep = coding->dst_multibyte; |
| 5718 | int *charbuf = coding->charbuf; | 5659 | int *charbuf = coding->charbuf; |
| @@ -5782,9 +5723,7 @@ encode_coding_charset (coding) | |||
| 5782 | CODING_SYSTEM is invalid, signal an error. */ | 5723 | CODING_SYSTEM is invalid, signal an error. */ |
| 5783 | 5724 | ||
| 5784 | void | 5725 | void |
| 5785 | setup_coding_system (coding_system, coding) | 5726 | setup_coding_system (Lisp_Object coding_system, struct coding_system *coding) |
| 5786 | Lisp_Object coding_system; | ||
| 5787 | struct coding_system *coding; | ||
| 5788 | { | 5727 | { |
| 5789 | Lisp_Object attrs; | 5728 | Lisp_Object attrs; |
| 5790 | Lisp_Object eol_type; | 5729 | Lisp_Object eol_type; |
| @@ -5987,8 +5926,7 @@ setup_coding_system (coding_system, coding) | |||
| 5987 | /* Return a list of charsets supported by CODING. */ | 5926 | /* Return a list of charsets supported by CODING. */ |
| 5988 | 5927 | ||
| 5989 | Lisp_Object | 5928 | Lisp_Object |
| 5990 | coding_charset_list (coding) | 5929 | coding_charset_list (struct coding_system *coding) |
| 5991 | struct coding_system *coding; | ||
| 5992 | { | 5930 | { |
| 5993 | Lisp_Object attrs, charset_list; | 5931 | Lisp_Object attrs, charset_list; |
| 5994 | 5932 | ||
| @@ -6011,8 +5949,7 @@ coding_charset_list (coding) | |||
| 6011 | /* Return a list of charsets supported by CODING-SYSTEM. */ | 5949 | /* Return a list of charsets supported by CODING-SYSTEM. */ |
| 6012 | 5950 | ||
| 6013 | Lisp_Object | 5951 | Lisp_Object |
| 6014 | coding_system_charset_list (coding_system) | 5952 | coding_system_charset_list (Lisp_Object coding_system) |
| 6015 | Lisp_Object coding_system; | ||
| 6016 | { | 5953 | { |
| 6017 | int id; | 5954 | int id; |
| 6018 | Lisp_Object attrs, charset_list; | 5955 | Lisp_Object attrs, charset_list; |
| @@ -6045,8 +5982,7 @@ coding_system_charset_list (coding_system) | |||
| 6045 | eol_type as CODING-SYSTEM. */ | 5982 | eol_type as CODING-SYSTEM. */ |
| 6046 | 5983 | ||
| 6047 | Lisp_Object | 5984 | Lisp_Object |
| 6048 | raw_text_coding_system (coding_system) | 5985 | raw_text_coding_system (Lisp_Object coding_system) |
| 6049 | Lisp_Object coding_system; | ||
| 6050 | { | 5986 | { |
| 6051 | Lisp_Object spec, attrs; | 5987 | Lisp_Object spec, attrs; |
| 6052 | Lisp_Object eol_type, raw_text_eol_type; | 5988 | Lisp_Object eol_type, raw_text_eol_type; |
| @@ -6077,8 +6013,7 @@ raw_text_coding_system (coding_system) | |||
| 6077 | (system_eol_type). */ | 6013 | (system_eol_type). */ |
| 6078 | 6014 | ||
| 6079 | Lisp_Object | 6015 | Lisp_Object |
| 6080 | coding_inherit_eol_type (coding_system, parent) | 6016 | coding_inherit_eol_type (Lisp_Object coding_system, Lisp_Object parent) |
| 6081 | Lisp_Object coding_system, parent; | ||
| 6082 | { | 6017 | { |
| 6083 | Lisp_Object spec, eol_type; | 6018 | Lisp_Object spec, eol_type; |
| 6084 | 6019 | ||
| @@ -6233,10 +6168,7 @@ coding_inherit_eol_type (coding_system, parent) | |||
| 6233 | #define MAX_EOL_CHECK_COUNT 3 | 6168 | #define MAX_EOL_CHECK_COUNT 3 |
| 6234 | 6169 | ||
| 6235 | static int | 6170 | static int |
| 6236 | detect_eol (source, src_bytes, category) | 6171 | detect_eol (const unsigned char *source, EMACS_INT src_bytes, enum coding_category category) |
| 6237 | const unsigned char *source; | ||
| 6238 | EMACS_INT src_bytes; | ||
| 6239 | enum coding_category category; | ||
| 6240 | { | 6172 | { |
| 6241 | const unsigned char *src = source, *src_end = src + src_bytes; | 6173 | const unsigned char *src = source, *src_end = src + src_bytes; |
| 6242 | unsigned char c; | 6174 | unsigned char c; |
| @@ -6334,9 +6266,7 @@ detect_eol (source, src_bytes, category) | |||
| 6334 | 6266 | ||
| 6335 | 6267 | ||
| 6336 | static Lisp_Object | 6268 | static Lisp_Object |
| 6337 | adjust_coding_eol_type (coding, eol_seen) | 6269 | adjust_coding_eol_type (struct coding_system *coding, int eol_seen) |
| 6338 | struct coding_system *coding; | ||
| 6339 | int eol_seen; | ||
| 6340 | { | 6270 | { |
| 6341 | Lisp_Object eol_type; | 6271 | Lisp_Object eol_type; |
| 6342 | 6272 | ||
| @@ -6364,8 +6294,7 @@ adjust_coding_eol_type (coding, eol_seen) | |||
| 6364 | system. */ | 6294 | system. */ |
| 6365 | 6295 | ||
| 6366 | void | 6296 | void |
| 6367 | detect_coding (coding) | 6297 | detect_coding (struct coding_system *coding) |
| 6368 | struct coding_system *coding; | ||
| 6369 | { | 6298 | { |
| 6370 | const unsigned char *src, *src_end; | 6299 | const unsigned char *src, *src_end; |
| 6371 | int saved_mode = coding->mode; | 6300 | int saved_mode = coding->mode; |
| @@ -6544,8 +6473,7 @@ detect_coding (coding) | |||
| 6544 | 6473 | ||
| 6545 | 6474 | ||
| 6546 | static void | 6475 | static void |
| 6547 | decode_eol (coding) | 6476 | decode_eol (struct coding_system *coding) |
| 6548 | struct coding_system *coding; | ||
| 6549 | { | 6477 | { |
| 6550 | Lisp_Object eol_type; | 6478 | Lisp_Object eol_type; |
| 6551 | unsigned char *p, *pbeg, *pend; | 6479 | unsigned char *p, *pbeg, *pend; |
| @@ -6647,9 +6575,7 @@ decode_eol (coding) | |||
| 6647 | decoding (ENCODEP is zero). */ | 6575 | decoding (ENCODEP is zero). */ |
| 6648 | 6576 | ||
| 6649 | static Lisp_Object | 6577 | static Lisp_Object |
| 6650 | get_translation_table (attrs, encodep, max_lookup) | 6578 | get_translation_table (Lisp_Object attrs, int encodep, int *max_lookup) |
| 6651 | Lisp_Object attrs; | ||
| 6652 | int encodep, *max_lookup; | ||
| 6653 | { | 6579 | { |
| 6654 | Lisp_Object standard, translation_table; | 6580 | Lisp_Object standard, translation_table; |
| 6655 | Lisp_Object val; | 6581 | Lisp_Object val; |
| @@ -6751,9 +6677,7 @@ get_translation_table (attrs, encodep, max_lookup) | |||
| 6751 | If BUF is too short to lookup characters in FROM, return Qt. */ | 6677 | If BUF is too short to lookup characters in FROM, return Qt. */ |
| 6752 | 6678 | ||
| 6753 | static Lisp_Object | 6679 | static Lisp_Object |
| 6754 | get_translation (trans, buf, buf_end) | 6680 | get_translation (Lisp_Object trans, int *buf, int *buf_end) |
| 6755 | Lisp_Object trans; | ||
| 6756 | int *buf, *buf_end; | ||
| 6757 | { | 6681 | { |
| 6758 | 6682 | ||
| 6759 | if (INTEGERP (trans)) | 6683 | if (INTEGERP (trans)) |
| @@ -6780,10 +6704,7 @@ get_translation (trans, buf, buf_end) | |||
| 6780 | 6704 | ||
| 6781 | 6705 | ||
| 6782 | static int | 6706 | static int |
| 6783 | produce_chars (coding, translation_table, last_block) | 6707 | produce_chars (struct coding_system *coding, Lisp_Object translation_table, int last_block) |
| 6784 | struct coding_system *coding; | ||
| 6785 | Lisp_Object translation_table; | ||
| 6786 | int last_block; | ||
| 6787 | { | 6708 | { |
| 6788 | unsigned char *dst = coding->destination + coding->produced; | 6709 | unsigned char *dst = coding->destination + coding->produced; |
| 6789 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 6710 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| @@ -6981,10 +6902,7 @@ produce_chars (coding, translation_table, last_block) | |||
| 6981 | */ | 6902 | */ |
| 6982 | 6903 | ||
| 6983 | static INLINE void | 6904 | static INLINE void |
| 6984 | produce_composition (coding, charbuf, pos) | 6905 | produce_composition (struct coding_system *coding, int *charbuf, EMACS_INT pos) |
| 6985 | struct coding_system *coding; | ||
| 6986 | int *charbuf; | ||
| 6987 | EMACS_INT pos; | ||
| 6988 | { | 6906 | { |
| 6989 | int len; | 6907 | int len; |
| 6990 | EMACS_INT to; | 6908 | EMACS_INT to; |
| @@ -7028,10 +6946,7 @@ produce_composition (coding, charbuf, pos) | |||
| 7028 | */ | 6946 | */ |
| 7029 | 6947 | ||
| 7030 | static INLINE void | 6948 | static INLINE void |
| 7031 | produce_charset (coding, charbuf, pos) | 6949 | produce_charset (struct coding_system *coding, int *charbuf, EMACS_INT pos) |
| 7032 | struct coding_system *coding; | ||
| 7033 | int *charbuf; | ||
| 7034 | EMACS_INT pos; | ||
| 7035 | { | 6950 | { |
| 7036 | EMACS_INT from = pos - charbuf[2]; | 6951 | EMACS_INT from = pos - charbuf[2]; |
| 7037 | struct charset *charset = CHARSET_FROM_ID (charbuf[3]); | 6952 | struct charset *charset = CHARSET_FROM_ID (charbuf[3]); |
| @@ -7066,9 +6981,7 @@ produce_charset (coding, charbuf, pos) | |||
| 7066 | 6981 | ||
| 7067 | 6982 | ||
| 7068 | static void | 6983 | static void |
| 7069 | produce_annotation (coding, pos) | 6984 | produce_annotation (struct coding_system *coding, EMACS_INT pos) |
| 7070 | struct coding_system *coding; | ||
| 7071 | EMACS_INT pos; | ||
| 7072 | { | 6985 | { |
| 7073 | int *charbuf = coding->charbuf; | 6986 | int *charbuf = coding->charbuf; |
| 7074 | int *charbuf_end = charbuf + coding->charbuf_used; | 6987 | int *charbuf_end = charbuf + coding->charbuf_used; |
| @@ -7123,8 +7036,7 @@ produce_annotation (coding, pos) | |||
| 7123 | */ | 7036 | */ |
| 7124 | 7037 | ||
| 7125 | static int | 7038 | static int |
| 7126 | decode_coding (coding) | 7039 | decode_coding (struct coding_system *coding) |
| 7127 | struct coding_system *coding; | ||
| 7128 | { | 7040 | { |
| 7129 | Lisp_Object attrs; | 7041 | Lisp_Object attrs; |
| 7130 | Lisp_Object undo_list; | 7042 | Lisp_Object undo_list; |
| @@ -7262,11 +7174,7 @@ decode_coding (coding) | |||
| 7262 | return BUF. */ | 7174 | return BUF. */ |
| 7263 | 7175 | ||
| 7264 | static INLINE int * | 7176 | static INLINE int * |
| 7265 | handle_composition_annotation (pos, limit, coding, buf, stop) | 7177 | handle_composition_annotation (EMACS_INT pos, EMACS_INT limit, struct coding_system *coding, int *buf, EMACS_INT *stop) |
| 7266 | EMACS_INT pos, limit; | ||
| 7267 | struct coding_system *coding; | ||
| 7268 | int *buf; | ||
| 7269 | EMACS_INT *stop; | ||
| 7270 | { | 7178 | { |
| 7271 | EMACS_INT start, end; | 7179 | EMACS_INT start, end; |
| 7272 | Lisp_Object prop; | 7180 | Lisp_Object prop; |
| @@ -7347,11 +7255,7 @@ handle_composition_annotation (pos, limit, coding, buf, stop) | |||
| 7347 | property value is non-nil (limiting by LIMIT), and return BUF. */ | 7255 | property value is non-nil (limiting by LIMIT), and return BUF. */ |
| 7348 | 7256 | ||
| 7349 | static INLINE int * | 7257 | static INLINE int * |
| 7350 | handle_charset_annotation (pos, limit, coding, buf, stop) | 7258 | handle_charset_annotation (EMACS_INT pos, EMACS_INT limit, struct coding_system *coding, int *buf, EMACS_INT *stop) |
| 7351 | EMACS_INT pos, limit; | ||
| 7352 | struct coding_system *coding; | ||
| 7353 | int *buf; | ||
| 7354 | EMACS_INT *stop; | ||
| 7355 | { | 7259 | { |
| 7356 | Lisp_Object val, next; | 7260 | Lisp_Object val, next; |
| 7357 | int id; | 7261 | int id; |
| @@ -7371,10 +7275,7 @@ handle_charset_annotation (pos, limit, coding, buf, stop) | |||
| 7371 | 7275 | ||
| 7372 | 7276 | ||
| 7373 | static void | 7277 | static void |
| 7374 | consume_chars (coding, translation_table, max_lookup) | 7278 | consume_chars (struct coding_system *coding, Lisp_Object translation_table, int max_lookup) |
| 7375 | struct coding_system *coding; | ||
| 7376 | Lisp_Object translation_table; | ||
| 7377 | int max_lookup; | ||
| 7378 | { | 7279 | { |
| 7379 | int *buf = coding->charbuf; | 7280 | int *buf = coding->charbuf; |
| 7380 | int *buf_end = coding->charbuf + coding->charbuf_size; | 7281 | int *buf_end = coding->charbuf + coding->charbuf_size; |
| @@ -7530,8 +7431,7 @@ consume_chars (coding, translation_table, max_lookup) | |||
| 7530 | memory area specified by CODING->destination. */ | 7431 | memory area specified by CODING->destination. */ |
| 7531 | 7432 | ||
| 7532 | static int | 7433 | static int |
| 7533 | encode_coding (coding) | 7434 | encode_coding (struct coding_system *coding) |
| 7534 | struct coding_system *coding; | ||
| 7535 | { | 7435 | { |
| 7536 | Lisp_Object attrs; | 7436 | Lisp_Object attrs; |
| 7537 | Lisp_Object translation_table; | 7437 | Lisp_Object translation_table; |
| @@ -7595,8 +7495,7 @@ static int reused_workbuf_in_use; | |||
| 7595 | multibyteness of returning buffer. */ | 7495 | multibyteness of returning buffer. */ |
| 7596 | 7496 | ||
| 7597 | static Lisp_Object | 7497 | static Lisp_Object |
| 7598 | make_conversion_work_buffer (multibyte) | 7498 | make_conversion_work_buffer (int multibyte) |
| 7599 | int multibyte; | ||
| 7600 | { | 7499 | { |
| 7601 | Lisp_Object name, workbuf; | 7500 | Lisp_Object name, workbuf; |
| 7602 | struct buffer *current; | 7501 | struct buffer *current; |
| @@ -7628,8 +7527,7 @@ make_conversion_work_buffer (multibyte) | |||
| 7628 | 7527 | ||
| 7629 | 7528 | ||
| 7630 | static Lisp_Object | 7529 | static Lisp_Object |
| 7631 | code_conversion_restore (arg) | 7530 | code_conversion_restore (Lisp_Object arg) |
| 7632 | Lisp_Object arg; | ||
| 7633 | { | 7531 | { |
| 7634 | Lisp_Object current, workbuf; | 7532 | Lisp_Object current, workbuf; |
| 7635 | struct gcpro gcpro1; | 7533 | struct gcpro gcpro1; |
| @@ -7650,8 +7548,7 @@ code_conversion_restore (arg) | |||
| 7650 | } | 7548 | } |
| 7651 | 7549 | ||
| 7652 | Lisp_Object | 7550 | Lisp_Object |
| 7653 | code_conversion_save (with_work_buf, multibyte) | 7551 | code_conversion_save (int with_work_buf, int multibyte) |
| 7654 | int with_work_buf, multibyte; | ||
| 7655 | { | 7552 | { |
| 7656 | Lisp_Object workbuf = Qnil; | 7553 | Lisp_Object workbuf = Qnil; |
| 7657 | 7554 | ||
| @@ -7663,9 +7560,7 @@ code_conversion_save (with_work_buf, multibyte) | |||
| 7663 | } | 7560 | } |
| 7664 | 7561 | ||
| 7665 | int | 7562 | int |
| 7666 | decode_coding_gap (coding, chars, bytes) | 7563 | decode_coding_gap (struct coding_system *coding, EMACS_INT chars, EMACS_INT bytes) |
| 7667 | struct coding_system *coding; | ||
| 7668 | EMACS_INT chars, bytes; | ||
| 7669 | { | 7564 | { |
| 7670 | int count = specpdl_ptr - specpdl; | 7565 | int count = specpdl_ptr - specpdl; |
| 7671 | Lisp_Object attrs; | 7566 | Lisp_Object attrs; |
| @@ -7710,9 +7605,7 @@ decode_coding_gap (coding, chars, bytes) | |||
| 7710 | } | 7605 | } |
| 7711 | 7606 | ||
| 7712 | int | 7607 | int |
| 7713 | encode_coding_gap (coding, chars, bytes) | 7608 | encode_coding_gap (struct coding_system *coding, EMACS_INT chars, EMACS_INT bytes) |
| 7714 | struct coding_system *coding; | ||
| 7715 | EMACS_INT chars, bytes; | ||
| 7716 | { | 7609 | { |
| 7717 | int count = specpdl_ptr - specpdl; | 7610 | int count = specpdl_ptr - specpdl; |
| 7718 | 7611 | ||
| @@ -8165,7 +8058,7 @@ encode_coding_object (coding, src_object, from, from_byte, to, to_byte, | |||
| 8165 | 8058 | ||
| 8166 | 8059 | ||
| 8167 | Lisp_Object | 8060 | Lisp_Object |
| 8168 | preferred_coding_system () | 8061 | preferred_coding_system (void) |
| 8169 | { | 8062 | { |
| 8170 | int id = coding_categories[coding_priorities[0]].id; | 8063 | int id = coding_categories[coding_priorities[0]].id; |
| 8171 | 8064 | ||
| @@ -8643,9 +8536,7 @@ highest priority. */) | |||
| 8643 | 8536 | ||
| 8644 | 8537 | ||
| 8645 | static INLINE int | 8538 | static INLINE int |
| 8646 | char_encodable_p (c, attrs) | 8539 | char_encodable_p (int c, Lisp_Object attrs) |
| 8647 | int c; | ||
| 8648 | Lisp_Object attrs; | ||
| 8649 | { | 8540 | { |
| 8650 | Lisp_Object tail; | 8541 | Lisp_Object tail; |
| 8651 | struct charset *charset; | 8542 | struct charset *charset; |
| @@ -9031,9 +8922,7 @@ is nil. */) | |||
| 9031 | 8922 | ||
| 9032 | 8923 | ||
| 9033 | Lisp_Object | 8924 | Lisp_Object |
| 9034 | code_convert_region (start, end, coding_system, dst_object, encodep, norecord) | 8925 | code_convert_region (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object dst_object, int encodep, int norecord) |
| 9035 | Lisp_Object start, end, coding_system, dst_object; | ||
| 9036 | int encodep, norecord; | ||
| 9037 | { | 8926 | { |
| 9038 | struct coding_system coding; | 8927 | struct coding_system coding; |
| 9039 | EMACS_INT from, from_byte, to, to_byte; | 8928 | EMACS_INT from, from_byte, to, to_byte; |
| @@ -9172,9 +9061,7 @@ code_convert_string (string, coding_system, dst_object, | |||
| 9172 | ENCODE_FILE, thus we ignore character composition. */ | 9061 | ENCODE_FILE, thus we ignore character composition. */ |
| 9173 | 9062 | ||
| 9174 | Lisp_Object | 9063 | Lisp_Object |
| 9175 | code_convert_string_norecord (string, coding_system, encodep) | 9064 | code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system, int encodep) |
| 9176 | Lisp_Object string, coding_system; | ||
| 9177 | int encodep; | ||
| 9178 | { | 9065 | { |
| 9179 | return code_convert_string (string, coding_system, Qt, encodep, 0, 1); | 9066 | return code_convert_string (string, coding_system, Qt, encodep, 0, 1); |
| 9180 | } | 9067 | } |
| @@ -9656,8 +9543,7 @@ HIGHESTP non-nil means just return the highest priority one. */) | |||
| 9656 | static const char *const suffixes[] = { "-unix", "-dos", "-mac" }; | 9543 | static const char *const suffixes[] = { "-unix", "-dos", "-mac" }; |
| 9657 | 9544 | ||
| 9658 | static Lisp_Object | 9545 | static Lisp_Object |
| 9659 | make_subsidiaries (base) | 9546 | make_subsidiaries (Lisp_Object base) |
| 9660 | Lisp_Object base; | ||
| 9661 | { | 9547 | { |
| 9662 | Lisp_Object subsidiaries; | 9548 | Lisp_Object subsidiaries; |
| 9663 | int base_name_len = SBYTES (SYMBOL_NAME (base)); | 9549 | int base_name_len = SBYTES (SYMBOL_NAME (base)); |
| @@ -10385,7 +10271,7 @@ coding system whose eol-type is N. */) | |||
| 10385 | /*** 9. Post-amble ***/ | 10271 | /*** 9. Post-amble ***/ |
| 10386 | 10272 | ||
| 10387 | void | 10273 | void |
| 10388 | init_coding_once () | 10274 | init_coding_once (void) |
| 10389 | { | 10275 | { |
| 10390 | int i; | 10276 | int i; |
| 10391 | 10277 | ||
| @@ -10427,7 +10313,7 @@ init_coding_once () | |||
| 10427 | #ifdef emacs | 10313 | #ifdef emacs |
| 10428 | 10314 | ||
| 10429 | void | 10315 | void |
| 10430 | syms_of_coding () | 10316 | syms_of_coding (void) |
| 10431 | { | 10317 | { |
| 10432 | staticpro (&Vcoding_system_hash_table); | 10318 | staticpro (&Vcoding_system_hash_table); |
| 10433 | { | 10319 | { |
| @@ -10977,8 +10863,7 @@ character."); | |||
| 10977 | } | 10863 | } |
| 10978 | 10864 | ||
| 10979 | char * | 10865 | char * |
| 10980 | emacs_strerror (error_number) | 10866 | emacs_strerror (int error_number) |
| 10981 | int error_number; | ||
| 10982 | { | 10867 | { |
| 10983 | char *str; | 10868 | char *str; |
| 10984 | 10869 | ||
diff --git a/src/composite.c b/src/composite.c index 6b2fe6a6522..f7b0211ecb8 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -180,9 +180,7 @@ Lisp_Object composition_temp; | |||
| 180 | If the composition is invalid, return -1. */ | 180 | If the composition is invalid, return -1. */ |
| 181 | 181 | ||
| 182 | int | 182 | int |
| 183 | get_composition_id (charpos, bytepos, nchars, prop, string) | 183 | get_composition_id (int charpos, int bytepos, int nchars, Lisp_Object prop, Lisp_Object string) |
| 184 | int charpos, bytepos, nchars; | ||
| 185 | Lisp_Object prop, string; | ||
| 186 | { | 184 | { |
| 187 | Lisp_Object id, length, components, key, *key_contents; | 185 | Lisp_Object id, length, components, key, *key_contents; |
| 188 | int glyph_len; | 186 | int glyph_len; |
| @@ -429,10 +427,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string) | |||
| 429 | This doesn't check the validity of composition. */ | 427 | This doesn't check the validity of composition. */ |
| 430 | 428 | ||
| 431 | int | 429 | int |
| 432 | find_composition (pos, limit, start, end, prop, object) | 430 | find_composition (int pos, int limit, EMACS_INT *start, EMACS_INT *end, Lisp_Object *prop, Lisp_Object object) |
| 433 | int pos, limit; | ||
| 434 | EMACS_INT *start, *end; | ||
| 435 | Lisp_Object *prop, object; | ||
| 436 | { | 431 | { |
| 437 | Lisp_Object val; | 432 | Lisp_Object val; |
| 438 | 433 | ||
| @@ -470,9 +465,7 @@ find_composition (pos, limit, start, end, prop, object) | |||
| 470 | FROM and TO with property PROP. */ | 465 | FROM and TO with property PROP. */ |
| 471 | 466 | ||
| 472 | static void | 467 | static void |
| 473 | run_composition_function (from, to, prop) | 468 | run_composition_function (int from, int to, Lisp_Object prop) |
| 474 | int from, to; | ||
| 475 | Lisp_Object prop; | ||
| 476 | { | 469 | { |
| 477 | Lisp_Object func; | 470 | Lisp_Object func; |
| 478 | EMACS_INT start, end; | 471 | EMACS_INT start, end; |
| @@ -504,9 +497,7 @@ run_composition_function (from, to, prop) | |||
| 504 | change is deletion, FROM == TO. Otherwise, FROM < TO. */ | 497 | change is deletion, FROM == TO. Otherwise, FROM < TO. */ |
| 505 | 498 | ||
| 506 | void | 499 | void |
| 507 | update_compositions (from, to, check_mask) | 500 | update_compositions (EMACS_INT from, EMACS_INT to, int check_mask) |
| 508 | EMACS_INT from, to; | ||
| 509 | int check_mask; | ||
| 510 | { | 501 | { |
| 511 | Lisp_Object prop; | 502 | Lisp_Object prop; |
| 512 | EMACS_INT start, end; | 503 | EMACS_INT start, end; |
| @@ -612,8 +603,7 @@ update_compositions (from, to, check_mask) | |||
| 612 | top-level copies of them so that none of them are `eq'. */ | 603 | top-level copies of them so that none of them are `eq'. */ |
| 613 | 604 | ||
| 614 | void | 605 | void |
| 615 | make_composition_value_copy (list) | 606 | make_composition_value_copy (Lisp_Object list) |
| 616 | Lisp_Object list; | ||
| 617 | { | 607 | { |
| 618 | Lisp_Object plist, val; | 608 | Lisp_Object plist, val; |
| 619 | 609 | ||
| @@ -638,9 +628,7 @@ make_composition_value_copy (list) | |||
| 638 | indices START and END in STRING. */ | 628 | indices START and END in STRING. */ |
| 639 | 629 | ||
| 640 | void | 630 | void |
| 641 | compose_text (start, end, components, modification_func, string) | 631 | compose_text (int start, int end, Lisp_Object components, Lisp_Object modification_func, Lisp_Object string) |
| 642 | int start, end; | ||
| 643 | Lisp_Object components, modification_func, string; | ||
| 644 | { | 632 | { |
| 645 | Lisp_Object prop; | 633 | Lisp_Object prop; |
| 646 | 634 | ||
| @@ -667,8 +655,7 @@ static Lisp_Object gstring_hash_table; | |||
| 667 | static Lisp_Object gstring_lookup_cache (Lisp_Object); | 655 | static Lisp_Object gstring_lookup_cache (Lisp_Object); |
| 668 | 656 | ||
| 669 | static Lisp_Object | 657 | static Lisp_Object |
| 670 | gstring_lookup_cache (header) | 658 | gstring_lookup_cache (Lisp_Object header) |
| 671 | Lisp_Object header; | ||
| 672 | { | 659 | { |
| 673 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); | 660 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); |
| 674 | int i = hash_lookup (h, header, NULL); | 661 | int i = hash_lookup (h, header, NULL); |
| @@ -677,9 +664,7 @@ gstring_lookup_cache (header) | |||
| 677 | } | 664 | } |
| 678 | 665 | ||
| 679 | Lisp_Object | 666 | Lisp_Object |
| 680 | composition_gstring_put_cache (gstring, len) | 667 | composition_gstring_put_cache (Lisp_Object gstring, int len) |
| 681 | Lisp_Object gstring; | ||
| 682 | int len; | ||
| 683 | { | 668 | { |
| 684 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); | 669 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); |
| 685 | unsigned hash; | 670 | unsigned hash; |
| @@ -707,8 +692,7 @@ composition_gstring_put_cache (gstring, len) | |||
| 707 | } | 692 | } |
| 708 | 693 | ||
| 709 | Lisp_Object | 694 | Lisp_Object |
| 710 | composition_gstring_from_id (id) | 695 | composition_gstring_from_id (int id) |
| 711 | int id; | ||
| 712 | { | 696 | { |
| 713 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); | 697 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); |
| 714 | 698 | ||
| @@ -720,8 +704,7 @@ static Lisp_Object fill_gstring_header (Lisp_Object, Lisp_Object, | |||
| 720 | Lisp_Object); | 704 | Lisp_Object); |
| 721 | 705 | ||
| 722 | int | 706 | int |
| 723 | composition_gstring_p (gstring) | 707 | composition_gstring_p (Lisp_Object gstring) |
| 724 | Lisp_Object gstring; | ||
| 725 | { | 708 | { |
| 726 | Lisp_Object header; | 709 | Lisp_Object header; |
| 727 | int i; | 710 | int i; |
| @@ -752,10 +735,7 @@ composition_gstring_p (gstring) | |||
| 752 | } | 735 | } |
| 753 | 736 | ||
| 754 | int | 737 | int |
| 755 | composition_gstring_width (gstring, from, to, metrics) | 738 | composition_gstring_width (Lisp_Object gstring, int from, int to, struct font_metrics *metrics) |
| 756 | Lisp_Object gstring; | ||
| 757 | int from, to; | ||
| 758 | struct font_metrics *metrics; | ||
| 759 | { | 739 | { |
| 760 | Lisp_Object *glyph; | 740 | Lisp_Object *glyph; |
| 761 | int width = 0; | 741 | int width = 0; |
| @@ -811,8 +791,7 @@ static Lisp_Object gstring_work; | |||
| 811 | static Lisp_Object gstring_work_headers; | 791 | static Lisp_Object gstring_work_headers; |
| 812 | 792 | ||
| 813 | static Lisp_Object | 793 | static Lisp_Object |
| 814 | fill_gstring_header (header, start, end, font_object, string) | 794 | fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lisp_Object font_object, Lisp_Object string) |
| 815 | Lisp_Object header, start, end, font_object, string; | ||
| 816 | { | 795 | { |
| 817 | EMACS_INT from, to, from_byte; | 796 | EMACS_INT from, to, from_byte; |
| 818 | EMACS_INT len, i; | 797 | EMACS_INT len, i; |
| @@ -872,8 +851,7 @@ fill_gstring_header (header, start, end, font_object, string) | |||
| 872 | extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object); | 851 | extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object); |
| 873 | 852 | ||
| 874 | static void | 853 | static void |
| 875 | fill_gstring_body (gstring) | 854 | fill_gstring_body (Lisp_Object gstring) |
| 876 | Lisp_Object gstring; | ||
| 877 | { | 855 | { |
| 878 | Lisp_Object font_object = LGSTRING_FONT (gstring); | 856 | Lisp_Object font_object = LGSTRING_FONT (gstring); |
| 879 | Lisp_Object header = AREF (gstring, 0); | 857 | Lisp_Object header = AREF (gstring, 0); |
| @@ -923,12 +901,7 @@ fill_gstring_body (gstring) | |||
| 923 | object. Otherwise return nil. */ | 901 | object. Otherwise return nil. */ |
| 924 | 902 | ||
| 925 | static Lisp_Object | 903 | static Lisp_Object |
| 926 | autocmp_chars (rule, charpos, bytepos, limit, win, face, string) | 904 | autocmp_chars (Lisp_Object rule, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT limit, struct window *win, struct face *face, Lisp_Object string) |
| 927 | Lisp_Object rule; | ||
| 928 | EMACS_INT charpos, bytepos, limit; | ||
| 929 | struct window *win; | ||
| 930 | struct face *face; | ||
| 931 | Lisp_Object string; | ||
| 932 | { | 905 | { |
| 933 | int count = SPECPDL_INDEX (); | 906 | int count = SPECPDL_INDEX (); |
| 934 | FRAME_PTR f = XFRAME (win->frame); | 907 | FRAME_PTR f = XFRAME (win->frame); |
| @@ -1020,10 +993,7 @@ static int _work_char; | |||
| 1020 | composition. */ | 993 | composition. */ |
| 1021 | 994 | ||
| 1022 | void | 995 | void |
| 1023 | composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) | 996 | composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, Lisp_Object string) |
| 1024 | struct composition_it *cmp_it; | ||
| 1025 | EMACS_INT charpos, bytepos, endpos; | ||
| 1026 | Lisp_Object string; | ||
| 1027 | { | 997 | { |
| 1028 | EMACS_INT start, end, c; | 998 | EMACS_INT start, end, c; |
| 1029 | Lisp_Object prop, val; | 999 | Lisp_Object prop, val; |
| @@ -1253,12 +1223,7 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) | |||
| 1253 | CMP_IT->stop_pos, and return 0. */ | 1223 | CMP_IT->stop_pos, and return 0. */ |
| 1254 | 1224 | ||
| 1255 | int | 1225 | int |
| 1256 | composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string) | 1226 | composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, struct window *w, struct face *face, Lisp_Object string) |
| 1257 | struct composition_it *cmp_it; | ||
| 1258 | EMACS_INT charpos, bytepos, endpos; | ||
| 1259 | struct window *w; | ||
| 1260 | struct face *face; | ||
| 1261 | Lisp_Object string; | ||
| 1262 | { | 1227 | { |
| 1263 | if (endpos <= charpos) | 1228 | if (endpos <= charpos) |
| 1264 | { | 1229 | { |
| @@ -1417,10 +1382,7 @@ composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string) | |||
| 1417 | the cluster, or -1 if the composition is somehow broken. */ | 1382 | the cluster, or -1 if the composition is somehow broken. */ |
| 1418 | 1383 | ||
| 1419 | int | 1384 | int |
| 1420 | composition_update_it (cmp_it, charpos, bytepos, string) | 1385 | composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, Lisp_Object string) |
| 1421 | struct composition_it *cmp_it; | ||
| 1422 | EMACS_INT charpos, bytepos; | ||
| 1423 | Lisp_Object string; | ||
| 1424 | { | 1386 | { |
| 1425 | int i, c; | 1387 | int i, c; |
| 1426 | 1388 | ||
| @@ -1543,9 +1505,7 @@ struct position_record | |||
| 1543 | the composition, and return 1. Otherwise, return 0. */ | 1505 | the composition, and return 1. Otherwise, return 0. */ |
| 1544 | 1506 | ||
| 1545 | static int | 1507 | static int |
| 1546 | find_automatic_composition (pos, limit, start, end, gstring, string) | 1508 | find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EMACS_INT *end, Lisp_Object *gstring, Lisp_Object string) |
| 1547 | EMACS_INT pos, limit, *start, *end; | ||
| 1548 | Lisp_Object *gstring, string; | ||
| 1549 | { | 1509 | { |
| 1550 | EMACS_INT head, tail, stop; | 1510 | EMACS_INT head, tail, stop; |
| 1551 | /* Limit to check a composition after POS. */ | 1511 | /* Limit to check a composition after POS. */ |
| @@ -1716,8 +1676,7 @@ find_automatic_composition (pos, limit, start, end, gstring, string) | |||
| 1716 | to NEW_PT. */ | 1676 | to NEW_PT. */ |
| 1717 | 1677 | ||
| 1718 | int | 1678 | int |
| 1719 | composition_adjust_point (last_pt, new_pt) | 1679 | composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) |
| 1720 | EMACS_INT last_pt, new_pt; | ||
| 1721 | { | 1680 | { |
| 1722 | EMACS_INT charpos, bytepos, startpos, beg, end, pos; | 1681 | EMACS_INT charpos, bytepos, startpos, beg, end, pos; |
| 1723 | Lisp_Object val; | 1682 | Lisp_Object val; |
| @@ -1974,7 +1933,7 @@ See `find-composition' for more details. */) | |||
| 1974 | 1933 | ||
| 1975 | 1934 | ||
| 1976 | void | 1935 | void |
| 1977 | syms_of_composite () | 1936 | syms_of_composite (void) |
| 1978 | { | 1937 | { |
| 1979 | int i; | 1938 | int i; |
| 1980 | 1939 | ||
diff --git a/src/data.c b/src/data.c index d44176d9b01..156c900933f 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -50,7 +50,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 50 | #include <math.h> | 50 | #include <math.h> |
| 51 | 51 | ||
| 52 | #if !defined (atof) | 52 | #if !defined (atof) |
| 53 | extern double atof (); | 53 | extern double atof (const char *); |
| 54 | #endif /* !atof */ | 54 | #endif /* !atof */ |
| 55 | 55 | ||
| 56 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; | 56 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; |
| @@ -97,16 +97,14 @@ Lisp_Object Vmost_positive_fixnum, Vmost_negative_fixnum; | |||
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | void | 99 | void |
| 100 | circular_list_error (list) | 100 | circular_list_error (Lisp_Object list) |
| 101 | Lisp_Object list; | ||
| 102 | { | 101 | { |
| 103 | xsignal (Qcircular_list, list); | 102 | xsignal (Qcircular_list, list); |
| 104 | } | 103 | } |
| 105 | 104 | ||
| 106 | 105 | ||
| 107 | Lisp_Object | 106 | Lisp_Object |
| 108 | wrong_type_argument (predicate, value) | 107 | wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) |
| 109 | register Lisp_Object predicate, value; | ||
| 110 | { | 108 | { |
| 111 | /* If VALUE is not even a valid Lisp object, we'd want to abort here | 109 | /* If VALUE is not even a valid Lisp object, we'd want to abort here |
| 112 | where we can get a backtrace showing where it came from. We used | 110 | where we can get a backtrace showing where it came from. We used |
| @@ -119,21 +117,19 @@ wrong_type_argument (predicate, value) | |||
| 119 | } | 117 | } |
| 120 | 118 | ||
| 121 | void | 119 | void |
| 122 | pure_write_error () | 120 | pure_write_error (void) |
| 123 | { | 121 | { |
| 124 | error ("Attempt to modify read-only object"); | 122 | error ("Attempt to modify read-only object"); |
| 125 | } | 123 | } |
| 126 | 124 | ||
| 127 | void | 125 | void |
| 128 | args_out_of_range (a1, a2) | 126 | args_out_of_range (Lisp_Object a1, Lisp_Object a2) |
| 129 | Lisp_Object a1, a2; | ||
| 130 | { | 127 | { |
| 131 | xsignal2 (Qargs_out_of_range, a1, a2); | 128 | xsignal2 (Qargs_out_of_range, a1, a2); |
| 132 | } | 129 | } |
| 133 | 130 | ||
| 134 | void | 131 | void |
| 135 | args_out_of_range_3 (a1, a2, a3) | 132 | args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3) |
| 136 | Lisp_Object a1, a2, a3; | ||
| 137 | { | 133 | { |
| 138 | xsignal3 (Qargs_out_of_range, a1, a2, a3); | 134 | xsignal3 (Qargs_out_of_range, a1, a2, a3); |
| 139 | } | 135 | } |
| @@ -146,8 +142,7 @@ int sign_extend_temp; | |||
| 146 | /* On a few machines, XINT can only be done by calling this. */ | 142 | /* On a few machines, XINT can only be done by calling this. */ |
| 147 | 143 | ||
| 148 | int | 144 | int |
| 149 | sign_extend_lisp_int (num) | 145 | sign_extend_lisp_int (EMACS_INT num) |
| 150 | EMACS_INT num; | ||
| 151 | { | 146 | { |
| 152 | if (num & (((EMACS_INT) 1) << (VALBITS - 1))) | 147 | if (num & (((EMACS_INT) 1) << (VALBITS - 1))) |
| 153 | return num | (((EMACS_INT) (-1)) << VALBITS); | 148 | return num | (((EMACS_INT) (-1)) << VALBITS); |
| @@ -840,8 +835,7 @@ Value, if non-nil, is a list \(interactive SPEC). */) | |||
| 840 | indirections contains a loop. */ | 835 | indirections contains a loop. */ |
| 841 | 836 | ||
| 842 | struct Lisp_Symbol * | 837 | struct Lisp_Symbol * |
| 843 | indirect_variable (symbol) | 838 | indirect_variable (struct Lisp_Symbol *symbol) |
| 844 | struct Lisp_Symbol *symbol; | ||
| 845 | { | 839 | { |
| 846 | struct Lisp_Symbol *tortoise, *hare; | 840 | struct Lisp_Symbol *tortoise, *hare; |
| 847 | 841 | ||
| @@ -892,8 +886,7 @@ variable chain of symbols. */) | |||
| 892 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) | 886 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) |
| 893 | 887 | ||
| 894 | Lisp_Object | 888 | Lisp_Object |
| 895 | do_symval_forwarding (valcontents) | 889 | do_symval_forwarding (register union Lisp_Fwd *valcontents) |
| 896 | register union Lisp_Fwd *valcontents; | ||
| 897 | { | 890 | { |
| 898 | register Lisp_Object val; | 891 | register Lisp_Object val; |
| 899 | switch (XFWDTYPE (valcontents)) | 892 | switch (XFWDTYPE (valcontents)) |
| @@ -947,11 +940,11 @@ do_symval_forwarding (valcontents) | |||
| 947 | } while (0) | 940 | } while (0) |
| 948 | 941 | ||
| 949 | static void | 942 | static void |
| 950 | store_symval_forwarding (/* symbol, */ valcontents, newval, buf) | 943 | store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf) |
| 951 | /* struct Lisp_Symbol *symbol; */ | 944 | /* struct Lisp_Symbol *symbol; */ |
| 952 | union Lisp_Fwd *valcontents; | 945 | |
| 953 | register Lisp_Object newval; | 946 | |
| 954 | struct buffer *buf; | 947 | |
| 955 | { | 948 | { |
| 956 | switch (XFWDTYPE (valcontents)) | 949 | switch (XFWDTYPE (valcontents)) |
| 957 | { | 950 | { |
| @@ -1032,8 +1025,7 @@ store_symval_forwarding (/* symbol, */ valcontents, newval, buf) | |||
| 1032 | This makes it safe to alter the status of other bindings. */ | 1025 | This makes it safe to alter the status of other bindings. */ |
| 1033 | 1026 | ||
| 1034 | void | 1027 | void |
| 1035 | swap_in_global_binding (symbol) | 1028 | swap_in_global_binding (struct Lisp_Symbol *symbol) |
| 1036 | struct Lisp_Symbol *symbol; | ||
| 1037 | { | 1029 | { |
| 1038 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); | 1030 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); |
| 1039 | 1031 | ||
| @@ -1059,9 +1051,7 @@ swap_in_global_binding (symbol) | |||
| 1059 | This could be another forwarding pointer. */ | 1051 | This could be another forwarding pointer. */ |
| 1060 | 1052 | ||
| 1061 | static void | 1053 | static void |
| 1062 | swap_in_symval_forwarding (symbol, blv) | 1054 | swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_Value *blv) |
| 1063 | struct Lisp_Symbol *symbol; | ||
| 1064 | struct Lisp_Buffer_Local_Value *blv; | ||
| 1065 | { | 1055 | { |
| 1066 | register Lisp_Object tem1; | 1056 | register Lisp_Object tem1; |
| 1067 | 1057 | ||
| @@ -1111,8 +1101,7 @@ swap_in_symval_forwarding (symbol, blv) | |||
| 1111 | within this function. Great care is required for this. */ | 1101 | within this function. Great care is required for this. */ |
| 1112 | 1102 | ||
| 1113 | Lisp_Object | 1103 | Lisp_Object |
| 1114 | find_symbol_value (symbol) | 1104 | find_symbol_value (Lisp_Object symbol) |
| 1115 | Lisp_Object symbol; | ||
| 1116 | { | 1105 | { |
| 1117 | struct Lisp_Symbol *sym; | 1106 | struct Lisp_Symbol *sym; |
| 1118 | 1107 | ||
| @@ -1183,8 +1172,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | |||
| 1183 | } | 1172 | } |
| 1184 | 1173 | ||
| 1185 | static int | 1174 | static int |
| 1186 | let_shadows_global_binding_p (symbol) | 1175 | let_shadows_global_binding_p (Lisp_Object symbol) |
| 1187 | Lisp_Object symbol; | ||
| 1188 | { | 1176 | { |
| 1189 | struct specbinding *p; | 1177 | struct specbinding *p; |
| 1190 | 1178 | ||
| @@ -1204,9 +1192,7 @@ let_shadows_global_binding_p (symbol) | |||
| 1204 | If BINDFLAG is nonzero, we don't do that. */ | 1192 | If BINDFLAG is nonzero, we don't do that. */ |
| 1205 | 1193 | ||
| 1206 | void | 1194 | void |
| 1207 | set_internal (symbol, newval, where, bindflag) | 1195 | set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag) |
| 1208 | register Lisp_Object symbol, newval, where; | ||
| 1209 | int bindflag; | ||
| 1210 | { | 1196 | { |
| 1211 | int voide = EQ (newval, Qunbound); | 1197 | int voide = EQ (newval, Qunbound); |
| 1212 | struct Lisp_Symbol *sym; | 1198 | struct Lisp_Symbol *sym; |
| @@ -1357,8 +1343,7 @@ set_internal (symbol, newval, where, bindflag) | |||
| 1357 | Return Qunbound if it is void. */ | 1343 | Return Qunbound if it is void. */ |
| 1358 | 1344 | ||
| 1359 | Lisp_Object | 1345 | Lisp_Object |
| 1360 | default_value (symbol) | 1346 | default_value (Lisp_Object symbol) |
| 1361 | Lisp_Object symbol; | ||
| 1362 | { | 1347 | { |
| 1363 | struct Lisp_Symbol *sym; | 1348 | struct Lisp_Symbol *sym; |
| 1364 | 1349 | ||
| @@ -2109,8 +2094,7 @@ selected frame's terminal device). */) | |||
| 2109 | This is like Findirect_function, except that it doesn't signal an | 2094 | This is like Findirect_function, except that it doesn't signal an |
| 2110 | error if the chain ends up unbound. */ | 2095 | error if the chain ends up unbound. */ |
| 2111 | Lisp_Object | 2096 | Lisp_Object |
| 2112 | indirect_function (object) | 2097 | indirect_function (register Lisp_Object object) |
| 2113 | register Lisp_Object object; | ||
| 2114 | { | 2098 | { |
| 2115 | Lisp_Object tortoise, hare; | 2099 | Lisp_Object tortoise, hare; |
| 2116 | 2100 | ||
| @@ -2326,9 +2310,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2326 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; | 2310 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; |
| 2327 | 2311 | ||
| 2328 | Lisp_Object | 2312 | Lisp_Object |
| 2329 | arithcompare (num1, num2, comparison) | 2313 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) |
| 2330 | Lisp_Object num1, num2; | ||
| 2331 | enum comparison comparison; | ||
| 2332 | { | 2314 | { |
| 2333 | double f1 = 0, f2 = 0; | 2315 | double f1 = 0, f2 = 0; |
| 2334 | int floatp = 0; | 2316 | int floatp = 0; |
| @@ -2454,8 +2436,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | |||
| 2454 | when the value fits in one. */ | 2436 | when the value fits in one. */ |
| 2455 | 2437 | ||
| 2456 | Lisp_Object | 2438 | Lisp_Object |
| 2457 | long_to_cons (i) | 2439 | long_to_cons (long unsigned int i) |
| 2458 | unsigned long i; | ||
| 2459 | { | 2440 | { |
| 2460 | unsigned long top = i >> 16; | 2441 | unsigned long top = i >> 16; |
| 2461 | unsigned int bot = i & 0xFFFF; | 2442 | unsigned int bot = i & 0xFFFF; |
| @@ -2467,8 +2448,7 @@ long_to_cons (i) | |||
| 2467 | } | 2448 | } |
| 2468 | 2449 | ||
| 2469 | unsigned long | 2450 | unsigned long |
| 2470 | cons_to_long (c) | 2451 | cons_to_long (Lisp_Object c) |
| 2471 | Lisp_Object c; | ||
| 2472 | { | 2452 | { |
| 2473 | Lisp_Object top, bot; | 2453 | Lisp_Object top, bot; |
| 2474 | if (INTEGERP (c)) | 2454 | if (INTEGERP (c)) |
| @@ -2509,8 +2489,7 @@ NUMBER may be an integer or a floating point number. */) | |||
| 2509 | } | 2489 | } |
| 2510 | 2490 | ||
| 2511 | INLINE static int | 2491 | INLINE static int |
| 2512 | digit_to_number (character, base) | 2492 | digit_to_number (int character, int base) |
| 2513 | int character, base; | ||
| 2514 | { | 2493 | { |
| 2515 | int digit; | 2494 | int digit; |
| 2516 | 2495 | ||
| @@ -2610,10 +2589,7 @@ static Lisp_Object float_arith_driver (double, int, enum arithop, | |||
| 2610 | extern Lisp_Object fmod_float (); | 2589 | extern Lisp_Object fmod_float (); |
| 2611 | 2590 | ||
| 2612 | Lisp_Object | 2591 | Lisp_Object |
| 2613 | arith_driver (code, nargs, args) | 2592 | arith_driver (enum arithop code, int nargs, register Lisp_Object *args) |
| 2614 | enum arithop code; | ||
| 2615 | int nargs; | ||
| 2616 | register Lisp_Object *args; | ||
| 2617 | { | 2593 | { |
| 2618 | register Lisp_Object val; | 2594 | register Lisp_Object val; |
| 2619 | register int argnum; | 2595 | register int argnum; |
| @@ -2698,12 +2674,7 @@ arith_driver (code, nargs, args) | |||
| 2698 | #define isnan(x) ((x) != (x)) | 2674 | #define isnan(x) ((x) != (x)) |
| 2699 | 2675 | ||
| 2700 | static Lisp_Object | 2676 | static Lisp_Object |
| 2701 | float_arith_driver (accum, argnum, code, nargs, args) | 2677 | float_arith_driver (double accum, register int argnum, enum arithop code, int nargs, register Lisp_Object *args) |
| 2702 | double accum; | ||
| 2703 | register int argnum; | ||
| 2704 | enum arithop code; | ||
| 2705 | int nargs; | ||
| 2706 | register Lisp_Object *args; | ||
| 2707 | { | 2678 | { |
| 2708 | register Lisp_Object val; | 2679 | register Lisp_Object val; |
| 2709 | double next; | 2680 | double next; |
| @@ -3038,7 +3009,7 @@ lowercase l) for small endian machines. */) | |||
| 3038 | 3009 | ||
| 3039 | 3010 | ||
| 3040 | void | 3011 | void |
| 3041 | syms_of_data () | 3012 | syms_of_data (void) |
| 3042 | { | 3013 | { |
| 3043 | Lisp_Object error_tail, arith_tail; | 3014 | Lisp_Object error_tail, arith_tail; |
| 3044 | 3015 | ||
| @@ -3467,8 +3438,7 @@ syms_of_data () | |||
| 3467 | } | 3438 | } |
| 3468 | 3439 | ||
| 3469 | SIGTYPE | 3440 | SIGTYPE |
| 3470 | arith_error (signo) | 3441 | arith_error (int signo) |
| 3471 | int signo; | ||
| 3472 | { | 3442 | { |
| 3473 | sigsetmask (SIGEMPTYMASK); | 3443 | sigsetmask (SIGEMPTYMASK); |
| 3474 | 3444 | ||
| @@ -3477,7 +3447,7 @@ arith_error (signo) | |||
| 3477 | } | 3447 | } |
| 3478 | 3448 | ||
| 3479 | void | 3449 | void |
| 3480 | init_data () | 3450 | init_data (void) |
| 3481 | { | 3451 | { |
| 3482 | /* Don't do this if just dumping out. | 3452 | /* Don't do this if just dumping out. |
| 3483 | We don't want to call `signal' in this case | 3453 | We don't want to call `signal' in this case |
diff --git a/src/dbusbind.c b/src/dbusbind.c index e813d0b5ad8..7edda947c0d 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -163,8 +163,7 @@ int xd_in_read_queued_messages = 0; | |||
| 163 | /* Determine the DBusType of a given Lisp symbol. OBJECT must be one | 163 | /* Determine the DBusType of a given Lisp symbol. OBJECT must be one |
| 164 | of the predefined D-Bus type symbols. */ | 164 | of the predefined D-Bus type symbols. */ |
| 165 | static int | 165 | static int |
| 166 | xd_symbol_to_dbus_type (object) | 166 | xd_symbol_to_dbus_type (Lisp_Object object) |
| 167 | Lisp_Object object; | ||
| 168 | { | 167 | { |
| 169 | return | 168 | return |
| 170 | ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE | 169 | ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE |
| @@ -221,10 +220,7 @@ xd_symbol_to_dbus_type (object) | |||
| 221 | signature is embedded, or DBUS_TYPE_INVALID. It is needed for the | 220 | signature is embedded, or DBUS_TYPE_INVALID. It is needed for the |
| 222 | check that DBUS_TYPE_DICT_ENTRY occurs only as array element. */ | 221 | check that DBUS_TYPE_DICT_ENTRY occurs only as array element. */ |
| 223 | static void | 222 | static void |
| 224 | xd_signature (signature, dtype, parent_type, object) | 223 | xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lisp_Object object) |
| 225 | char *signature; | ||
| 226 | unsigned int dtype, parent_type; | ||
| 227 | Lisp_Object object; | ||
| 228 | { | 224 | { |
| 229 | unsigned int subtype; | 225 | unsigned int subtype; |
| 230 | Lisp_Object elt; | 226 | Lisp_Object elt; |
| @@ -393,10 +389,7 @@ xd_signature (signature, dtype, parent_type, object) | |||
| 393 | `dbus-send-signal', into corresponding C values appended as | 389 | `dbus-send-signal', into corresponding C values appended as |
| 394 | arguments to a D-Bus message. */ | 390 | arguments to a D-Bus message. */ |
| 395 | static void | 391 | static void |
| 396 | xd_append_arg (dtype, object, iter) | 392 | xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter) |
| 397 | unsigned int dtype; | ||
| 398 | Lisp_Object object; | ||
| 399 | DBusMessageIter *iter; | ||
| 400 | { | 393 | { |
| 401 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 394 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 402 | DBusMessageIter subiter; | 395 | DBusMessageIter subiter; |
| @@ -604,9 +597,7 @@ xd_append_arg (dtype, object, iter) | |||
| 604 | D-Bus message must be a valid DBusType. Compound D-Bus types | 597 | D-Bus message must be a valid DBusType. Compound D-Bus types |
| 605 | result always in a Lisp list. */ | 598 | result always in a Lisp list. */ |
| 606 | static Lisp_Object | 599 | static Lisp_Object |
| 607 | xd_retrieve_arg (dtype, iter) | 600 | xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter) |
| 608 | unsigned int dtype; | ||
| 609 | DBusMessageIter *iter; | ||
| 610 | { | 601 | { |
| 611 | 602 | ||
| 612 | switch (dtype) | 603 | switch (dtype) |
| @@ -725,8 +716,7 @@ xd_retrieve_arg (dtype, iter) | |||
| 725 | /* Initialize D-Bus connection. BUS is a Lisp symbol, either :system | 716 | /* Initialize D-Bus connection. BUS is a Lisp symbol, either :system |
| 726 | or :session. It tells which D-Bus to be initialized. */ | 717 | or :session. It tells which D-Bus to be initialized. */ |
| 727 | static DBusConnection * | 718 | static DBusConnection * |
| 728 | xd_initialize (bus) | 719 | xd_initialize (Lisp_Object bus) |
| 729 | Lisp_Object bus; | ||
| 730 | { | 720 | { |
| 731 | DBusConnection *connection; | 721 | DBusConnection *connection; |
| 732 | DBusError derror; | 722 | DBusError derror; |
| @@ -766,9 +756,7 @@ xd_initialize (bus) | |||
| 766 | /* Add connection file descriptor to input_wait_mask, in order to | 756 | /* Add connection file descriptor to input_wait_mask, in order to |
| 767 | let select() detect, whether a new message has been arrived. */ | 757 | let select() detect, whether a new message has been arrived. */ |
| 768 | dbus_bool_t | 758 | dbus_bool_t |
| 769 | xd_add_watch (watch, data) | 759 | xd_add_watch (DBusWatch *watch, void *data) |
| 770 | DBusWatch *watch; | ||
| 771 | void *data; | ||
| 772 | { | 760 | { |
| 773 | /* We check only for incoming data. */ | 761 | /* We check only for incoming data. */ |
| 774 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 762 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| @@ -797,9 +785,7 @@ xd_add_watch (watch, data) | |||
| 797 | /* Remove connection file descriptor from input_wait_mask. DATA is | 785 | /* Remove connection file descriptor from input_wait_mask. DATA is |
| 798 | the used bus, either QCdbus_system_bus or QCdbus_session_bus. */ | 786 | the used bus, either QCdbus_system_bus or QCdbus_session_bus. */ |
| 799 | void | 787 | void |
| 800 | xd_remove_watch (watch, data) | 788 | xd_remove_watch (DBusWatch *watch, void *data) |
| 801 | DBusWatch *watch; | ||
| 802 | void *data; | ||
| 803 | { | 789 | { |
| 804 | /* We check only for incoming data. */ | 790 | /* We check only for incoming data. */ |
| 805 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 791 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| @@ -1569,8 +1555,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1569 | /* Check, whether there is pending input in the message queue of the | 1555 | /* Check, whether there is pending input in the message queue of the |
| 1570 | D-Bus BUS. BUS is a Lisp symbol, either :system or :session. */ | 1556 | D-Bus BUS. BUS is a Lisp symbol, either :system or :session. */ |
| 1571 | int | 1557 | int |
| 1572 | xd_get_dispatch_status (bus) | 1558 | xd_get_dispatch_status (Lisp_Object bus) |
| 1573 | Lisp_Object bus; | ||
| 1574 | { | 1559 | { |
| 1575 | DBusConnection *connection; | 1560 | DBusConnection *connection; |
| 1576 | 1561 | ||
| @@ -1589,7 +1574,7 @@ xd_get_dispatch_status (bus) | |||
| 1589 | 1574 | ||
| 1590 | /* Check for queued incoming messages from the system and session buses. */ | 1575 | /* Check for queued incoming messages from the system and session buses. */ |
| 1591 | int | 1576 | int |
| 1592 | xd_pending_messages () | 1577 | xd_pending_messages (void) |
| 1593 | { | 1578 | { |
| 1594 | 1579 | ||
| 1595 | /* Vdbus_registered_objects_table will be initialized as hash table | 1580 | /* Vdbus_registered_objects_table will be initialized as hash table |
| @@ -1606,8 +1591,7 @@ xd_pending_messages () | |||
| 1606 | /* Read queued incoming message of the D-Bus BUS. BUS is a Lisp | 1591 | /* Read queued incoming message of the D-Bus BUS. BUS is a Lisp |
| 1607 | symbol, either :system or :session. */ | 1592 | symbol, either :system or :session. */ |
| 1608 | static Lisp_Object | 1593 | static Lisp_Object |
| 1609 | xd_read_message (bus) | 1594 | xd_read_message (Lisp_Object bus) |
| 1610 | Lisp_Object bus; | ||
| 1611 | { | 1595 | { |
| 1612 | Lisp_Object args, key, value; | 1596 | Lisp_Object args, key, value; |
| 1613 | struct gcpro gcpro1; | 1597 | struct gcpro gcpro1; |
| @@ -1764,7 +1748,7 @@ xd_read_message (bus) | |||
| 1764 | 1748 | ||
| 1765 | /* Read queued incoming messages from the system and session buses. */ | 1749 | /* Read queued incoming messages from the system and session buses. */ |
| 1766 | void | 1750 | void |
| 1767 | xd_read_queued_messages () | 1751 | xd_read_queued_messages (void) |
| 1768 | { | 1752 | { |
| 1769 | 1753 | ||
| 1770 | /* Vdbus_registered_objects_table will be initialized as hash table | 1754 | /* Vdbus_registered_objects_table will be initialized as hash table |
| @@ -1990,7 +1974,7 @@ used for composing the returning D-Bus message. */) | |||
| 1990 | 1974 | ||
| 1991 | 1975 | ||
| 1992 | void | 1976 | void |
| 1993 | syms_of_dbusbind () | 1977 | syms_of_dbusbind (void) |
| 1994 | { | 1978 | { |
| 1995 | 1979 | ||
| 1996 | Qdbus_init_bus = intern_c_string ("dbus-init-bus"); | 1980 | Qdbus_init_bus = intern_c_string ("dbus-init-bus"); |
diff --git a/src/dired.c b/src/dired.c index c2090aeda0c..b5ee1546306 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -127,8 +127,7 @@ directory_files_internal_w32_unwind (Lisp_Object arg) | |||
| 127 | #endif | 127 | #endif |
| 128 | 128 | ||
| 129 | Lisp_Object | 129 | Lisp_Object |
| 130 | directory_files_internal_unwind (dh) | 130 | directory_files_internal_unwind (Lisp_Object dh) |
| 131 | Lisp_Object dh; | ||
| 132 | { | 131 | { |
| 133 | DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer; | 132 | DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer; |
| 134 | BLOCK_INPUT; | 133 | BLOCK_INPUT; |
| @@ -143,10 +142,7 @@ directory_files_internal_unwind (dh) | |||
| 143 | In the latter case, ID_FORMAT is passed to Ffile_attributes. */ | 142 | In the latter case, ID_FORMAT is passed to Ffile_attributes. */ |
| 144 | 143 | ||
| 145 | Lisp_Object | 144 | Lisp_Object |
| 146 | directory_files_internal (directory, full, match, nosort, attrs, id_format) | 145 | directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object match, Lisp_Object nosort, int attrs, Lisp_Object id_format) |
| 147 | Lisp_Object directory, full, match, nosort; | ||
| 148 | int attrs; | ||
| 149 | Lisp_Object id_format; | ||
| 150 | { | 146 | { |
| 151 | DIR *d; | 147 | DIR *d; |
| 152 | int directory_nbytes; | 148 | int directory_nbytes; |
| @@ -417,7 +413,7 @@ which see. */) | |||
| 417 | } | 413 | } |
| 418 | 414 | ||
| 419 | 415 | ||
| 420 | Lisp_Object file_name_completion (); | 416 | Lisp_Object file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate); |
| 421 | 417 | ||
| 422 | DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, | 418 | DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, |
| 423 | 2, 3, 0, | 419 | 2, 3, 0, |
| @@ -476,14 +472,11 @@ These are all file names in directory DIRECTORY which begin with FILE. */) | |||
| 476 | return file_name_completion (file, directory, 1, 0, Qnil); | 472 | return file_name_completion (file, directory, 1, 0, Qnil); |
| 477 | } | 473 | } |
| 478 | 474 | ||
| 479 | static int file_name_completion_stat (); | 475 | static int file_name_completion_stat (Lisp_Object dirname, struct dirent *dp, struct stat *st_addr); |
| 480 | Lisp_Object Qdefault_directory; | 476 | Lisp_Object Qdefault_directory; |
| 481 | 477 | ||
| 482 | Lisp_Object | 478 | Lisp_Object |
| 483 | file_name_completion (file, dirname, all_flag, ver_flag, predicate) | 479 | file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate) |
| 484 | Lisp_Object file, dirname; | ||
| 485 | int all_flag, ver_flag; | ||
| 486 | Lisp_Object predicate; | ||
| 487 | { | 480 | { |
| 488 | DIR *d; | 481 | DIR *d; |
| 489 | int bestmatchsize = 0; | 482 | int bestmatchsize = 0; |
| @@ -825,9 +818,7 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate) | |||
| 825 | else number of chars that match at the beginning. */ | 818 | else number of chars that match at the beginning. */ |
| 826 | 819 | ||
| 827 | static int | 820 | static int |
| 828 | scmp (s1, s2, len) | 821 | scmp (register unsigned char *s1, register unsigned char *s2, int len) |
| 829 | register unsigned char *s1, *s2; | ||
| 830 | int len; | ||
| 831 | { | 822 | { |
| 832 | register int l = len; | 823 | register int l = len; |
| 833 | 824 | ||
| @@ -848,10 +839,7 @@ scmp (s1, s2, len) | |||
| 848 | } | 839 | } |
| 849 | 840 | ||
| 850 | static int | 841 | static int |
| 851 | file_name_completion_stat (dirname, dp, st_addr) | 842 | file_name_completion_stat (Lisp_Object dirname, struct dirent *dp, struct stat *st_addr) |
| 852 | Lisp_Object dirname; | ||
| 853 | DIRENTRY *dp; | ||
| 854 | struct stat *st_addr; | ||
| 855 | { | 843 | { |
| 856 | int len = NAMLEN (dp); | 844 | int len = NAMLEN (dp); |
| 857 | int pos = SCHARS (dirname); | 845 | int pos = SCHARS (dirname); |
| @@ -893,8 +881,7 @@ file_name_completion_stat (dirname, dp, st_addr) | |||
| 893 | } | 881 | } |
| 894 | 882 | ||
| 895 | Lisp_Object | 883 | Lisp_Object |
| 896 | make_time (time) | 884 | make_time (time_t time) |
| 897 | time_t time; | ||
| 898 | { | 885 | { |
| 899 | return Fcons (make_number (time >> 16), | 886 | return Fcons (make_number (time >> 16), |
| 900 | Fcons (make_number (time & 0177777), Qnil)); | 887 | Fcons (make_number (time & 0177777), Qnil)); |
| @@ -1103,7 +1090,7 @@ Comparison is in lexicographic order and case is significant. */) | |||
| 1103 | } | 1090 | } |
| 1104 | 1091 | ||
| 1105 | void | 1092 | void |
| 1106 | syms_of_dired () | 1093 | syms_of_dired (void) |
| 1107 | { | 1094 | { |
| 1108 | Qdirectory_files = intern_c_string ("directory-files"); | 1095 | Qdirectory_files = intern_c_string ("directory-files"); |
| 1109 | Qdirectory_files_and_attributes = intern_c_string ("directory-files-and-attributes"); | 1096 | Qdirectory_files_and_attributes = intern_c_string ("directory-files-and-attributes"); |
diff --git a/src/dispnew.c b/src/dispnew.c index 74c41dfcd44..2bfec21f3f2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -441,10 +441,7 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history, | |||
| 441 | address of this function is used. */ | 441 | address of this function is used. */ |
| 442 | 442 | ||
| 443 | void | 443 | void |
| 444 | safe_bcopy (from, to, size) | 444 | safe_bcopy (const char *from, char *to, int size) |
| 445 | const char *from; | ||
| 446 | char *to; | ||
| 447 | int size; | ||
| 448 | { | 445 | { |
| 449 | if (size <= 0 || from == to) | 446 | if (size <= 0 || from == to) |
| 450 | return; | 447 | return; |
| @@ -507,8 +504,7 @@ safe_bcopy (from, to, size) | |||
| 507 | POOL, the structure is otherwise zeroed. */ | 504 | POOL, the structure is otherwise zeroed. */ |
| 508 | 505 | ||
| 509 | struct glyph_matrix * | 506 | struct glyph_matrix * |
| 510 | new_glyph_matrix (pool) | 507 | new_glyph_matrix (struct glyph_pool *pool) |
| 511 | struct glyph_pool *pool; | ||
| 512 | { | 508 | { |
| 513 | struct glyph_matrix *result; | 509 | struct glyph_matrix *result; |
| 514 | 510 | ||
| @@ -538,8 +534,7 @@ new_glyph_matrix (pool) | |||
| 538 | matrix also frees the glyph memory in this case. */ | 534 | matrix also frees the glyph memory in this case. */ |
| 539 | 535 | ||
| 540 | static void | 536 | static void |
| 541 | free_glyph_matrix (matrix) | 537 | free_glyph_matrix (struct glyph_matrix *matrix) |
| 542 | struct glyph_matrix *matrix; | ||
| 543 | { | 538 | { |
| 544 | if (matrix) | 539 | if (matrix) |
| 545 | { | 540 | { |
| @@ -569,10 +564,7 @@ free_glyph_matrix (matrix) | |||
| 569 | or a float. */ | 564 | or a float. */ |
| 570 | 565 | ||
| 571 | static int | 566 | static int |
| 572 | margin_glyphs_to_reserve (w, total_glyphs, margin) | 567 | margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin) |
| 573 | struct window *w; | ||
| 574 | int total_glyphs; | ||
| 575 | Lisp_Object margin; | ||
| 576 | { | 568 | { |
| 577 | int n; | 569 | int n; |
| 578 | 570 | ||
| @@ -613,11 +605,7 @@ margin_glyphs_to_reserve (w, total_glyphs, margin) | |||
| 613 | leads to screen flickering. */ | 605 | leads to screen flickering. */ |
| 614 | 606 | ||
| 615 | static void | 607 | static void |
| 616 | adjust_glyph_matrix (w, matrix, x, y, dim) | 608 | adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y, struct dim dim) |
| 617 | struct window *w; | ||
| 618 | struct glyph_matrix *matrix; | ||
| 619 | int x, y; | ||
| 620 | struct dim dim; | ||
| 621 | { | 609 | { |
| 622 | int i; | 610 | int i; |
| 623 | int new_rows; | 611 | int new_rows; |
| @@ -860,9 +848,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim) | |||
| 860 | below). */ | 848 | below). */ |
| 861 | 849 | ||
| 862 | static void | 850 | static void |
| 863 | reverse_rows (matrix, start, end) | 851 | reverse_rows (struct glyph_matrix *matrix, int start, int end) |
| 864 | struct glyph_matrix *matrix; | ||
| 865 | int start, end; | ||
| 866 | { | 852 | { |
| 867 | int i, j; | 853 | int i, j; |
| 868 | 854 | ||
| @@ -891,9 +877,7 @@ reverse_rows (matrix, start, end) | |||
| 891 | rotating right. */ | 877 | rotating right. */ |
| 892 | 878 | ||
| 893 | void | 879 | void |
| 894 | rotate_matrix (matrix, first, last, by) | 880 | rotate_matrix (struct glyph_matrix *matrix, int first, int last, int by) |
| 895 | struct glyph_matrix *matrix; | ||
| 896 | int first, last, by; | ||
| 897 | { | 881 | { |
| 898 | if (by < 0) | 882 | if (by < 0) |
| 899 | { | 883 | { |
| @@ -918,9 +902,7 @@ rotate_matrix (matrix, first, last, by) | |||
| 918 | DELTA_BYTES. */ | 902 | DELTA_BYTES. */ |
| 919 | 903 | ||
| 920 | void | 904 | void |
| 921 | increment_matrix_positions (matrix, start, end, delta, delta_bytes) | 905 | increment_matrix_positions (struct glyph_matrix *matrix, int start, int end, int delta, int delta_bytes) |
| 922 | struct glyph_matrix *matrix; | ||
| 923 | int start, end, delta, delta_bytes; | ||
| 924 | { | 906 | { |
| 925 | /* Check that START and END are reasonable values. */ | 907 | /* Check that START and END are reasonable values. */ |
| 926 | xassert (start >= 0 && start <= matrix->nrows); | 908 | xassert (start >= 0 && start <= matrix->nrows); |
| @@ -937,10 +919,7 @@ increment_matrix_positions (matrix, start, end, delta, delta_bytes) | |||
| 937 | ENABLED_P is non-zero, enabled_p flags in rows will be set to 1. */ | 919 | ENABLED_P is non-zero, enabled_p flags in rows will be set to 1. */ |
| 938 | 920 | ||
| 939 | void | 921 | void |
| 940 | enable_glyph_matrix_rows (matrix, start, end, enabled_p) | 922 | enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p) |
| 941 | struct glyph_matrix *matrix; | ||
| 942 | int start, end; | ||
| 943 | int enabled_p; | ||
| 944 | { | 923 | { |
| 945 | xassert (start <= end); | 924 | xassert (start <= end); |
| 946 | xassert (start >= 0 && start < matrix->nrows); | 925 | xassert (start >= 0 && start < matrix->nrows); |
| @@ -962,8 +941,7 @@ enable_glyph_matrix_rows (matrix, start, end, enabled_p) | |||
| 962 | currently present is the flag MATRIX->no_scrolling_p. */ | 941 | currently present is the flag MATRIX->no_scrolling_p. */ |
| 963 | 942 | ||
| 964 | void | 943 | void |
| 965 | clear_glyph_matrix (matrix) | 944 | clear_glyph_matrix (struct glyph_matrix *matrix) |
| 966 | struct glyph_matrix *matrix; | ||
| 967 | { | 945 | { |
| 968 | if (matrix) | 946 | if (matrix) |
| 969 | { | 947 | { |
| @@ -978,10 +956,7 @@ clear_glyph_matrix (matrix) | |||
| 978 | and recompute their visible height. */ | 956 | and recompute their visible height. */ |
| 979 | 957 | ||
| 980 | void | 958 | void |
| 981 | shift_glyph_matrix (w, matrix, start, end, dy) | 959 | shift_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int start, int end, int dy) |
| 982 | struct window *w; | ||
| 983 | struct glyph_matrix *matrix; | ||
| 984 | int start, end, dy; | ||
| 985 | { | 960 | { |
| 986 | int min_y, max_y; | 961 | int min_y, max_y; |
| 987 | 962 | ||
| @@ -1012,8 +987,7 @@ shift_glyph_matrix (w, matrix, start, end, dy) | |||
| 1012 | current matrix. */ | 987 | current matrix. */ |
| 1013 | 988 | ||
| 1014 | void | 989 | void |
| 1015 | clear_current_matrices (f) | 990 | clear_current_matrices (register struct frame *f) |
| 1016 | register struct frame *f; | ||
| 1017 | { | 991 | { |
| 1018 | /* Clear frame current matrix, if we have one. */ | 992 | /* Clear frame current matrix, if we have one. */ |
| 1019 | if (f->current_matrix) | 993 | if (f->current_matrix) |
| @@ -1038,8 +1012,7 @@ clear_current_matrices (f) | |||
| 1038 | /* Clear out all display lines of F for a coming redisplay. */ | 1012 | /* Clear out all display lines of F for a coming redisplay. */ |
| 1039 | 1013 | ||
| 1040 | void | 1014 | void |
| 1041 | clear_desired_matrices (f) | 1015 | clear_desired_matrices (register struct frame *f) |
| 1042 | register struct frame *f; | ||
| 1043 | { | 1016 | { |
| 1044 | if (f->desired_matrix) | 1017 | if (f->desired_matrix) |
| 1045 | clear_glyph_matrix (f->desired_matrix); | 1018 | clear_glyph_matrix (f->desired_matrix); |
| @@ -1060,9 +1033,7 @@ clear_desired_matrices (f) | |||
| 1060 | non-zero clear desired matrices, otherwise clear current matrices. */ | 1033 | non-zero clear desired matrices, otherwise clear current matrices. */ |
| 1061 | 1034 | ||
| 1062 | static void | 1035 | static void |
| 1063 | clear_window_matrices (w, desired_p) | 1036 | clear_window_matrices (struct window *w, int desired_p) |
| 1064 | struct window *w; | ||
| 1065 | int desired_p; | ||
| 1066 | { | 1037 | { |
| 1067 | while (w) | 1038 | while (w) |
| 1068 | { | 1039 | { |
| @@ -1106,8 +1077,7 @@ clear_window_matrices (w, desired_p) | |||
| 1106 | static struct glyph_row null_row; | 1077 | static struct glyph_row null_row; |
| 1107 | 1078 | ||
| 1108 | void | 1079 | void |
| 1109 | clear_glyph_row (row) | 1080 | clear_glyph_row (struct glyph_row *row) |
| 1110 | struct glyph_row *row; | ||
| 1111 | { | 1081 | { |
| 1112 | struct glyph *p[1 + LAST_AREA]; | 1082 | struct glyph *p[1 + LAST_AREA]; |
| 1113 | 1083 | ||
| @@ -1142,10 +1112,7 @@ clear_glyph_row (row) | |||
| 1142 | in window W starting at y-position Y. */ | 1112 | in window W starting at y-position Y. */ |
| 1143 | 1113 | ||
| 1144 | void | 1114 | void |
| 1145 | blank_row (w, row, y) | 1115 | blank_row (struct window *w, struct glyph_row *row, int y) |
| 1146 | struct window *w; | ||
| 1147 | struct glyph_row *row; | ||
| 1148 | int y; | ||
| 1149 | { | 1116 | { |
| 1150 | int min_y, max_y; | 1117 | int min_y, max_y; |
| 1151 | 1118 | ||
| @@ -1174,9 +1141,7 @@ blank_row (w, row, y) | |||
| 1174 | ends. */ | 1141 | ends. */ |
| 1175 | 1142 | ||
| 1176 | void | 1143 | void |
| 1177 | increment_row_positions (row, delta, delta_bytes) | 1144 | increment_row_positions (struct glyph_row *row, int delta, int delta_bytes) |
| 1178 | struct glyph_row *row; | ||
| 1179 | int delta, delta_bytes; | ||
| 1180 | { | 1145 | { |
| 1181 | int area, i; | 1146 | int area, i; |
| 1182 | 1147 | ||
| @@ -1251,8 +1216,7 @@ swap_glyphs_in_rows (a, b) | |||
| 1251 | /* Exchange pointers to glyph memory between glyph rows A and B. */ | 1216 | /* Exchange pointers to glyph memory between glyph rows A and B. */ |
| 1252 | 1217 | ||
| 1253 | static INLINE void | 1218 | static INLINE void |
| 1254 | swap_glyph_pointers (a, b) | 1219 | swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b) |
| 1255 | struct glyph_row *a, *b; | ||
| 1256 | { | 1220 | { |
| 1257 | int i; | 1221 | int i; |
| 1258 | for (i = 0; i < LAST_AREA + 1; ++i) | 1222 | for (i = 0; i < LAST_AREA + 1; ++i) |
| @@ -1268,8 +1232,7 @@ swap_glyph_pointers (a, b) | |||
| 1268 | that glyph pointers in the structures are left unchanged. */ | 1232 | that glyph pointers in the structures are left unchanged. */ |
| 1269 | 1233 | ||
| 1270 | INLINE void | 1234 | INLINE void |
| 1271 | copy_row_except_pointers (to, from) | 1235 | copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from) |
| 1272 | struct glyph_row *to, *from; | ||
| 1273 | { | 1236 | { |
| 1274 | struct glyph *pointers[1 + LAST_AREA]; | 1237 | struct glyph *pointers[1 + LAST_AREA]; |
| 1275 | 1238 | ||
| @@ -1290,9 +1253,7 @@ copy_row_except_pointers (to, from) | |||
| 1290 | positions in row TO by DELTA/ DELTA_BYTES. */ | 1253 | positions in row TO by DELTA/ DELTA_BYTES. */ |
| 1291 | 1254 | ||
| 1292 | void | 1255 | void |
| 1293 | copy_glyph_row_contents (to, from, delta, delta_bytes) | 1256 | copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from, int delta, int delta_bytes) |
| 1294 | struct glyph_row *to, *from; | ||
| 1295 | int delta, delta_bytes; | ||
| 1296 | { | 1257 | { |
| 1297 | int area; | 1258 | int area; |
| 1298 | 1259 | ||
| @@ -1317,8 +1278,7 @@ copy_glyph_row_contents (to, from, delta, delta_bytes) | |||
| 1317 | a memory leak. */ | 1278 | a memory leak. */ |
| 1318 | 1279 | ||
| 1319 | static INLINE void | 1280 | static INLINE void |
| 1320 | assign_row (to, from) | 1281 | assign_row (struct glyph_row *to, struct glyph_row *from) |
| 1321 | struct glyph_row *to, *from; | ||
| 1322 | { | 1282 | { |
| 1323 | swap_glyph_pointers (to, from); | 1283 | swap_glyph_pointers (to, from); |
| 1324 | copy_row_except_pointers (to, from); | 1284 | copy_row_except_pointers (to, from); |
| @@ -1378,8 +1338,7 @@ find_glyph_row_slice (window_matrix, frame_matrix, row) | |||
| 1378 | call to this function really clears it. */ | 1338 | call to this function really clears it. */ |
| 1379 | 1339 | ||
| 1380 | void | 1340 | void |
| 1381 | prepare_desired_row (row) | 1341 | prepare_desired_row (struct glyph_row *row) |
| 1382 | struct glyph_row *row; | ||
| 1383 | { | 1342 | { |
| 1384 | if (!row->enabled_p) | 1343 | if (!row->enabled_p) |
| 1385 | { | 1344 | { |
| @@ -1395,8 +1354,7 @@ prepare_desired_row (row) | |||
| 1395 | /* Return a hash code for glyph row ROW. */ | 1354 | /* Return a hash code for glyph row ROW. */ |
| 1396 | 1355 | ||
| 1397 | int | 1356 | int |
| 1398 | line_hash_code (row) | 1357 | line_hash_code (struct glyph_row *row) |
| 1399 | struct glyph_row *row; | ||
| 1400 | { | 1358 | { |
| 1401 | int hash = 0; | 1359 | int hash = 0; |
| 1402 | 1360 | ||
| @@ -1429,9 +1387,7 @@ line_hash_code (row) | |||
| 1429 | zero, leading and trailing spaces are ignored. */ | 1387 | zero, leading and trailing spaces are ignored. */ |
| 1430 | 1388 | ||
| 1431 | static unsigned int | 1389 | static unsigned int |
| 1432 | line_draw_cost (matrix, vpos) | 1390 | line_draw_cost (struct glyph_matrix *matrix, int vpos) |
| 1433 | struct glyph_matrix *matrix; | ||
| 1434 | int vpos; | ||
| 1435 | { | 1391 | { |
| 1436 | struct glyph_row *row = matrix->rows + vpos; | 1392 | struct glyph_row *row = matrix->rows + vpos; |
| 1437 | struct glyph *beg = row->glyphs[TEXT_AREA]; | 1393 | struct glyph *beg = row->glyphs[TEXT_AREA]; |
| @@ -1492,10 +1448,7 @@ line_draw_cost (matrix, vpos) | |||
| 1492 | flags of A and B, too. */ | 1448 | flags of A and B, too. */ |
| 1493 | 1449 | ||
| 1494 | static INLINE int | 1450 | static INLINE int |
| 1495 | row_equal_p (w, a, b, mouse_face_p) | 1451 | row_equal_p (struct window *w, struct glyph_row *a, struct glyph_row *b, int mouse_face_p) |
| 1496 | struct window *w; | ||
| 1497 | struct glyph_row *a, *b; | ||
| 1498 | int mouse_face_p; | ||
| 1499 | { | 1452 | { |
| 1500 | if (a == b) | 1453 | if (a == b) |
| 1501 | return 1; | 1454 | return 1; |
| @@ -1565,7 +1518,7 @@ row_equal_p (w, a, b, mouse_face_p) | |||
| 1565 | incremented for each pool allocated. */ | 1518 | incremented for each pool allocated. */ |
| 1566 | 1519 | ||
| 1567 | static struct glyph_pool * | 1520 | static struct glyph_pool * |
| 1568 | new_glyph_pool () | 1521 | new_glyph_pool (void) |
| 1569 | { | 1522 | { |
| 1570 | struct glyph_pool *result; | 1523 | struct glyph_pool *result; |
| 1571 | 1524 | ||
| @@ -1588,8 +1541,7 @@ new_glyph_pool () | |||
| 1588 | was passed to free_glyph_pool. */ | 1541 | was passed to free_glyph_pool. */ |
| 1589 | 1542 | ||
| 1590 | static void | 1543 | static void |
| 1591 | free_glyph_pool (pool) | 1544 | free_glyph_pool (struct glyph_pool *pool) |
| 1592 | struct glyph_pool *pool; | ||
| 1593 | { | 1545 | { |
| 1594 | if (pool) | 1546 | if (pool) |
| 1595 | { | 1547 | { |
| @@ -1613,9 +1565,7 @@ free_glyph_pool (pool) | |||
| 1613 | re-adjusting window glyph matrices necessary. */ | 1565 | re-adjusting window glyph matrices necessary. */ |
| 1614 | 1566 | ||
| 1615 | static int | 1567 | static int |
| 1616 | realloc_glyph_pool (pool, matrix_dim) | 1568 | realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim) |
| 1617 | struct glyph_pool *pool; | ||
| 1618 | struct dim matrix_dim; | ||
| 1619 | { | 1569 | { |
| 1620 | int needed; | 1570 | int needed; |
| 1621 | int changed_p; | 1571 | int changed_p; |
| @@ -1994,8 +1944,7 @@ allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p, | |||
| 1994 | /* Return the required height of glyph matrices for window W. */ | 1944 | /* Return the required height of glyph matrices for window W. */ |
| 1995 | 1945 | ||
| 1996 | int | 1946 | int |
| 1997 | required_matrix_height (w) | 1947 | required_matrix_height (struct window *w) |
| 1998 | struct window *w; | ||
| 1999 | { | 1948 | { |
| 2000 | #ifdef HAVE_WINDOW_SYSTEM | 1949 | #ifdef HAVE_WINDOW_SYSTEM |
| 2001 | struct frame *f = XFRAME (w->frame); | 1950 | struct frame *f = XFRAME (w->frame); |
| @@ -2021,8 +1970,7 @@ required_matrix_height (w) | |||
| 2021 | /* Return the required width of glyph matrices for window W. */ | 1970 | /* Return the required width of glyph matrices for window W. */ |
| 2022 | 1971 | ||
| 2023 | int | 1972 | int |
| 2024 | required_matrix_width (w) | 1973 | required_matrix_width (struct window *w) |
| 2025 | struct window *w; | ||
| 2026 | { | 1974 | { |
| 2027 | #ifdef HAVE_WINDOW_SYSTEM | 1975 | #ifdef HAVE_WINDOW_SYSTEM |
| 2028 | struct frame *f = XFRAME (w->frame); | 1976 | struct frame *f = XFRAME (w->frame); |
| @@ -2050,8 +1998,7 @@ required_matrix_width (w) | |||
| 2050 | window whose matrices must be allocated/reallocated. */ | 1998 | window whose matrices must be allocated/reallocated. */ |
| 2051 | 1999 | ||
| 2052 | static void | 2000 | static void |
| 2053 | allocate_matrices_for_window_redisplay (w) | 2001 | allocate_matrices_for_window_redisplay (struct window *w) |
| 2054 | struct window *w; | ||
| 2055 | { | 2002 | { |
| 2056 | while (w) | 2003 | while (w) |
| 2057 | { | 2004 | { |
| @@ -2088,8 +2035,7 @@ allocate_matrices_for_window_redisplay (w) | |||
| 2088 | changes, or its window configuration changes. */ | 2035 | changes, or its window configuration changes. */ |
| 2089 | 2036 | ||
| 2090 | void | 2037 | void |
| 2091 | adjust_glyphs (f) | 2038 | adjust_glyphs (struct frame *f) |
| 2092 | struct frame *f; | ||
| 2093 | { | 2039 | { |
| 2094 | /* Block input so that expose events and other events that access | 2040 | /* Block input so that expose events and other events that access |
| 2095 | glyph matrices are not processed while we are changing them. */ | 2041 | glyph matrices are not processed while we are changing them. */ |
| @@ -2121,7 +2067,7 @@ adjust_glyphs (f) | |||
| 2121 | windows to estimated values. */ | 2067 | windows to estimated values. */ |
| 2122 | 2068 | ||
| 2123 | static void | 2069 | static void |
| 2124 | adjust_frame_glyphs_initially () | 2070 | adjust_frame_glyphs_initially (void) |
| 2125 | { | 2071 | { |
| 2126 | struct frame *sf = SELECTED_FRAME (); | 2072 | struct frame *sf = SELECTED_FRAME (); |
| 2127 | struct window *root = XWINDOW (sf->root_window); | 2073 | struct window *root = XWINDOW (sf->root_window); |
| @@ -2148,8 +2094,7 @@ adjust_frame_glyphs_initially () | |||
| 2148 | /* Allocate/reallocate glyph matrices of a single frame F. */ | 2094 | /* Allocate/reallocate glyph matrices of a single frame F. */ |
| 2149 | 2095 | ||
| 2150 | static void | 2096 | static void |
| 2151 | adjust_frame_glyphs (f) | 2097 | adjust_frame_glyphs (struct frame *f) |
| 2152 | struct frame *f; | ||
| 2153 | { | 2098 | { |
| 2154 | if (FRAME_WINDOW_P (f)) | 2099 | if (FRAME_WINDOW_P (f)) |
| 2155 | adjust_frame_glyphs_for_window_redisplay (f); | 2100 | adjust_frame_glyphs_for_window_redisplay (f); |
| @@ -2167,8 +2112,7 @@ adjust_frame_glyphs (f) | |||
| 2167 | /* Return 1 if any window in the tree has nonzero window margins. See | 2112 | /* Return 1 if any window in the tree has nonzero window margins. See |
| 2168 | the hack at the end of adjust_frame_glyphs_for_frame_redisplay. */ | 2113 | the hack at the end of adjust_frame_glyphs_for_frame_redisplay. */ |
| 2169 | static int | 2114 | static int |
| 2170 | showing_window_margins_p (w) | 2115 | showing_window_margins_p (struct window *w) |
| 2171 | struct window *w; | ||
| 2172 | { | 2116 | { |
| 2173 | while (w) | 2117 | while (w) |
| 2174 | { | 2118 | { |
| @@ -2196,8 +2140,7 @@ showing_window_margins_p (w) | |||
| 2196 | windows from the frame's current matrix. */ | 2140 | windows from the frame's current matrix. */ |
| 2197 | 2141 | ||
| 2198 | static void | 2142 | static void |
| 2199 | fake_current_matrices (window) | 2143 | fake_current_matrices (Lisp_Object window) |
| 2200 | Lisp_Object window; | ||
| 2201 | { | 2144 | { |
| 2202 | struct window *w; | 2145 | struct window *w; |
| 2203 | 2146 | ||
| @@ -2247,8 +2190,7 @@ fake_current_matrices (window) | |||
| 2247 | a glyph matrix holding the contents of F's current frame matrix. */ | 2190 | a glyph matrix holding the contents of F's current frame matrix. */ |
| 2248 | 2191 | ||
| 2249 | static struct glyph_matrix * | 2192 | static struct glyph_matrix * |
| 2250 | save_current_matrix (f) | 2193 | save_current_matrix (struct frame *f) |
| 2251 | struct frame *f; | ||
| 2252 | { | 2194 | { |
| 2253 | int i; | 2195 | int i; |
| 2254 | struct glyph_matrix *saved; | 2196 | struct glyph_matrix *saved; |
| @@ -2278,9 +2220,7 @@ save_current_matrix (f) | |||
| 2278 | and free memory associated with SAVED. */ | 2220 | and free memory associated with SAVED. */ |
| 2279 | 2221 | ||
| 2280 | static void | 2222 | static void |
| 2281 | restore_current_matrix (f, saved) | 2223 | restore_current_matrix (struct frame *f, struct glyph_matrix *saved) |
| 2282 | struct frame *f; | ||
| 2283 | struct glyph_matrix *saved; | ||
| 2284 | { | 2224 | { |
| 2285 | int i; | 2225 | int i; |
| 2286 | 2226 | ||
| @@ -2304,8 +2244,7 @@ restore_current_matrix (f, saved) | |||
| 2304 | frame-based redisplay. */ | 2244 | frame-based redisplay. */ |
| 2305 | 2245 | ||
| 2306 | static void | 2246 | static void |
| 2307 | adjust_frame_glyphs_for_frame_redisplay (f) | 2247 | adjust_frame_glyphs_for_frame_redisplay (struct frame *f) |
| 2308 | struct frame *f; | ||
| 2309 | { | 2248 | { |
| 2310 | struct dim matrix_dim; | 2249 | struct dim matrix_dim; |
| 2311 | int pool_changed_p; | 2250 | int pool_changed_p; |
| @@ -2405,8 +2344,7 @@ adjust_frame_glyphs_for_frame_redisplay (f) | |||
| 2405 | window-based redisplay. */ | 2344 | window-based redisplay. */ |
| 2406 | 2345 | ||
| 2407 | static void | 2346 | static void |
| 2408 | adjust_frame_glyphs_for_window_redisplay (f) | 2347 | adjust_frame_glyphs_for_window_redisplay (struct frame *f) |
| 2409 | struct frame *f; | ||
| 2410 | { | 2348 | { |
| 2411 | struct window *w; | 2349 | struct window *w; |
| 2412 | 2350 | ||
| @@ -2474,8 +2412,7 @@ adjust_frame_glyphs_for_window_redisplay (f) | |||
| 2474 | eventually without causing trouble). */ | 2412 | eventually without causing trouble). */ |
| 2475 | 2413 | ||
| 2476 | static void | 2414 | static void |
| 2477 | adjust_frame_message_buffer (f) | 2415 | adjust_frame_message_buffer (struct frame *f) |
| 2478 | struct frame *f; | ||
| 2479 | { | 2416 | { |
| 2480 | int size = FRAME_MESSAGE_BUF_SIZE (f) + 1; | 2417 | int size = FRAME_MESSAGE_BUF_SIZE (f) + 1; |
| 2481 | 2418 | ||
| @@ -2493,8 +2430,7 @@ adjust_frame_message_buffer (f) | |||
| 2493 | /* Re-allocate buffer for decode_mode_spec on frame F. */ | 2430 | /* Re-allocate buffer for decode_mode_spec on frame F. */ |
| 2494 | 2431 | ||
| 2495 | static void | 2432 | static void |
| 2496 | adjust_decode_mode_spec_buffer (f) | 2433 | adjust_decode_mode_spec_buffer (struct frame *f) |
| 2497 | struct frame *f; | ||
| 2498 | { | 2434 | { |
| 2499 | f->decode_mode_spec_buffer | 2435 | f->decode_mode_spec_buffer |
| 2500 | = (char *) xrealloc (f->decode_mode_spec_buffer, | 2436 | = (char *) xrealloc (f->decode_mode_spec_buffer, |
| @@ -2513,8 +2449,7 @@ adjust_decode_mode_spec_buffer (f) | |||
| 2513 | the function is called when F is destroyed. */ | 2449 | the function is called when F is destroyed. */ |
| 2514 | 2450 | ||
| 2515 | void | 2451 | void |
| 2516 | free_glyphs (f) | 2452 | free_glyphs (struct frame *f) |
| 2517 | struct frame *f; | ||
| 2518 | { | 2453 | { |
| 2519 | if (f && f->glyphs_initialized_p) | 2454 | if (f && f->glyphs_initialized_p) |
| 2520 | { | 2455 | { |
| @@ -2575,8 +2510,7 @@ free_glyphs (f) | |||
| 2575 | the same tree more than once. */ | 2510 | the same tree more than once. */ |
| 2576 | 2511 | ||
| 2577 | void | 2512 | void |
| 2578 | free_window_matrices (w) | 2513 | free_window_matrices (struct window *w) |
| 2579 | struct window *w; | ||
| 2580 | { | 2514 | { |
| 2581 | while (w) | 2515 | while (w) |
| 2582 | { | 2516 | { |
| @@ -2606,7 +2540,7 @@ free_window_matrices (w) | |||
| 2606 | explicitly and check that nothing is left allocated. */ | 2540 | explicitly and check that nothing is left allocated. */ |
| 2607 | 2541 | ||
| 2608 | void | 2542 | void |
| 2609 | check_glyph_memory () | 2543 | check_glyph_memory (void) |
| 2610 | { | 2544 | { |
| 2611 | Lisp_Object tail, frame; | 2545 | Lisp_Object tail, frame; |
| 2612 | 2546 | ||
| @@ -2690,8 +2624,7 @@ check_glyph_memory () | |||
| 2690 | sure not to touch them in this function. */ | 2624 | sure not to touch them in this function. */ |
| 2691 | 2625 | ||
| 2692 | static void | 2626 | static void |
| 2693 | build_frame_matrix (f) | 2627 | build_frame_matrix (struct frame *f) |
| 2694 | struct frame *f; | ||
| 2695 | { | 2628 | { |
| 2696 | int i; | 2629 | int i; |
| 2697 | 2630 | ||
| @@ -2713,9 +2646,7 @@ build_frame_matrix (f) | |||
| 2713 | matrices. W is the root of a window tree. */ | 2646 | matrices. W is the root of a window tree. */ |
| 2714 | 2647 | ||
| 2715 | static void | 2648 | static void |
| 2716 | build_frame_matrix_from_window_tree (matrix, w) | 2649 | build_frame_matrix_from_window_tree (struct glyph_matrix *matrix, struct window *w) |
| 2717 | struct glyph_matrix *matrix; | ||
| 2718 | struct window *w; | ||
| 2719 | { | 2650 | { |
| 2720 | while (w) | 2651 | while (w) |
| 2721 | { | 2652 | { |
| @@ -2743,9 +2674,7 @@ build_frame_matrix_from_window_tree (matrix, w) | |||
| 2743 | preserve_other_columns in the old redisplay. */ | 2674 | preserve_other_columns in the old redisplay. */ |
| 2744 | 2675 | ||
| 2745 | static void | 2676 | static void |
| 2746 | build_frame_matrix_from_leaf_window (frame_matrix, w) | 2677 | build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct window *w) |
| 2747 | struct glyph_matrix *frame_matrix; | ||
| 2748 | struct window *w; | ||
| 2749 | { | 2678 | { |
| 2750 | struct glyph_matrix *window_matrix; | 2679 | struct glyph_matrix *window_matrix; |
| 2751 | int window_y, frame_y; | 2680 | int window_y, frame_y; |
| @@ -2862,9 +2791,7 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) | |||
| 2862 | for instance, vertical separators, truncation markers, etc. */ | 2791 | for instance, vertical separators, truncation markers, etc. */ |
| 2863 | 2792 | ||
| 2864 | void | 2793 | void |
| 2865 | spec_glyph_lookup_face (w, glyph) | 2794 | spec_glyph_lookup_face (struct window *w, GLYPH *glyph) |
| 2866 | struct window *w; | ||
| 2867 | GLYPH *glyph; | ||
| 2868 | { | 2795 | { |
| 2869 | int lface_id = GLYPH_FACE (*glyph); | 2796 | int lface_id = GLYPH_FACE (*glyph); |
| 2870 | /* Convert the glyph's specified face to a realized (cache) face. */ | 2797 | /* Convert the glyph's specified face to a realized (cache) face. */ |
| @@ -2893,8 +2820,7 @@ spec_glyph_lookup_face (w, glyph) | |||
| 2893 | To be called for frame-based redisplay, only. */ | 2820 | To be called for frame-based redisplay, only. */ |
| 2894 | 2821 | ||
| 2895 | static void | 2822 | static void |
| 2896 | fill_up_glyph_row_with_spaces (row) | 2823 | fill_up_glyph_row_with_spaces (struct glyph_row *row) |
| 2897 | struct glyph_row *row; | ||
| 2898 | { | 2824 | { |
| 2899 | fill_up_glyph_row_area_with_spaces (row, LEFT_MARGIN_AREA); | 2825 | fill_up_glyph_row_area_with_spaces (row, LEFT_MARGIN_AREA); |
| 2900 | fill_up_glyph_row_area_with_spaces (row, TEXT_AREA); | 2826 | fill_up_glyph_row_area_with_spaces (row, TEXT_AREA); |
| @@ -2906,9 +2832,7 @@ fill_up_glyph_row_with_spaces (row) | |||
| 2906 | frame-based redisplay only. */ | 2832 | frame-based redisplay only. */ |
| 2907 | 2833 | ||
| 2908 | static void | 2834 | static void |
| 2909 | fill_up_glyph_row_area_with_spaces (row, area) | 2835 | fill_up_glyph_row_area_with_spaces (struct glyph_row *row, int area) |
| 2910 | struct glyph_row *row; | ||
| 2911 | int area; | ||
| 2912 | { | 2836 | { |
| 2913 | if (row->glyphs[area] < row->glyphs[area + 1]) | 2837 | if (row->glyphs[area] < row->glyphs[area + 1]) |
| 2914 | { | 2838 | { |
| @@ -2926,9 +2850,7 @@ fill_up_glyph_row_area_with_spaces (row, area) | |||
| 2926 | reached. In frame matrices only one area, TEXT_AREA, is used. */ | 2850 | reached. In frame matrices only one area, TEXT_AREA, is used. */ |
| 2927 | 2851 | ||
| 2928 | static void | 2852 | static void |
| 2929 | fill_up_frame_row_with_spaces (row, upto) | 2853 | fill_up_frame_row_with_spaces (struct glyph_row *row, int upto) |
| 2930 | struct glyph_row *row; | ||
| 2931 | int upto; | ||
| 2932 | { | 2854 | { |
| 2933 | int i = row->used[TEXT_AREA]; | 2855 | int i = row->used[TEXT_AREA]; |
| 2934 | struct glyph *glyph = row->glyphs[TEXT_AREA]; | 2856 | struct glyph *glyph = row->glyphs[TEXT_AREA]; |
| @@ -2950,8 +2872,7 @@ fill_up_frame_row_with_spaces (row, upto) | |||
| 2950 | working on frame matrices or not. */ | 2872 | working on frame matrices or not. */ |
| 2951 | 2873 | ||
| 2952 | static INLINE void | 2874 | static INLINE void |
| 2953 | set_frame_matrix_frame (f) | 2875 | set_frame_matrix_frame (struct frame *f) |
| 2954 | struct frame *f; | ||
| 2955 | { | 2876 | { |
| 2956 | frame_matrix_frame = f; | 2877 | frame_matrix_frame = f; |
| 2957 | } | 2878 | } |
| @@ -2966,9 +2887,7 @@ set_frame_matrix_frame (f) | |||
| 2966 | operations in window matrices of frame_matrix_frame. */ | 2887 | operations in window matrices of frame_matrix_frame. */ |
| 2967 | 2888 | ||
| 2968 | static INLINE void | 2889 | static INLINE void |
| 2969 | make_current (desired_matrix, current_matrix, row) | 2890 | make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_matrix, int row) |
| 2970 | struct glyph_matrix *desired_matrix, *current_matrix; | ||
| 2971 | int row; | ||
| 2972 | { | 2891 | { |
| 2973 | struct glyph_row *current_row = MATRIX_ROW (current_matrix, row); | 2892 | struct glyph_row *current_row = MATRIX_ROW (current_matrix, row); |
| 2974 | struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row); | 2893 | struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row); |
| @@ -2995,9 +2914,7 @@ make_current (desired_matrix, current_matrix, row) | |||
| 2995 | matrices of leaf windows in the window tree rooted at W. */ | 2914 | matrices of leaf windows in the window tree rooted at W. */ |
| 2996 | 2915 | ||
| 2997 | static void | 2916 | static void |
| 2998 | mirror_make_current (w, frame_row) | 2917 | mirror_make_current (struct window *w, int frame_row) |
| 2999 | struct window *w; | ||
| 3000 | int frame_row; | ||
| 3001 | { | 2918 | { |
| 3002 | while (w) | 2919 | while (w) |
| 3003 | { | 2920 | { |
| @@ -3090,8 +3007,7 @@ mirrored_line_dance (matrix, unchanged_at_top, nlines, copy_from, | |||
| 3090 | the current frame matrix. */ | 3007 | the current frame matrix. */ |
| 3091 | 3008 | ||
| 3092 | static void | 3009 | static void |
| 3093 | sync_window_with_frame_matrix_rows (w) | 3010 | sync_window_with_frame_matrix_rows (struct window *w) |
| 3094 | struct window *w; | ||
| 3095 | { | 3011 | { |
| 3096 | struct frame *f = XFRAME (w->frame); | 3012 | struct frame *f = XFRAME (w->frame); |
| 3097 | struct glyph_row *window_row, *window_row_end, *frame_row; | 3013 | struct glyph_row *window_row, *window_row_end, *frame_row; |
| @@ -3128,9 +3044,7 @@ sync_window_with_frame_matrix_rows (w) | |||
| 3128 | row ROW. Value is null if none is found. */ | 3044 | row ROW. Value is null if none is found. */ |
| 3129 | 3045 | ||
| 3130 | struct window * | 3046 | struct window * |
| 3131 | frame_row_to_window (w, row) | 3047 | frame_row_to_window (struct window *w, int row) |
| 3132 | struct window *w; | ||
| 3133 | int row; | ||
| 3134 | { | 3048 | { |
| 3135 | struct window *found = NULL; | 3049 | struct window *found = NULL; |
| 3136 | 3050 | ||
| @@ -3163,11 +3077,7 @@ frame_row_to_window (w, row) | |||
| 3163 | which is empty. */ | 3077 | which is empty. */ |
| 3164 | 3078 | ||
| 3165 | static void | 3079 | static void |
| 3166 | mirror_line_dance (w, unchanged_at_top, nlines, copy_from, retained_p) | 3080 | mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy_from, char *retained_p) |
| 3167 | struct window *w; | ||
| 3168 | int unchanged_at_top, nlines; | ||
| 3169 | int *copy_from; | ||
| 3170 | char *retained_p; | ||
| 3171 | { | 3081 | { |
| 3172 | while (w) | 3082 | while (w) |
| 3173 | { | 3083 | { |
| @@ -3419,8 +3329,7 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, | |||
| 3419 | function redraw-frame. */ | 3329 | function redraw-frame. */ |
| 3420 | 3330 | ||
| 3421 | void | 3331 | void |
| 3422 | redraw_frame (f) | 3332 | redraw_frame (struct frame *f) |
| 3423 | struct frame *f; | ||
| 3424 | { | 3333 | { |
| 3425 | Lisp_Object frame; | 3334 | Lisp_Object frame; |
| 3426 | XSETFRAME (frame, f); | 3335 | XSETFRAME (frame, f); |
| @@ -3446,7 +3355,7 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", | |||
| 3446 | visible frames marked as garbaged. */ | 3355 | visible frames marked as garbaged. */ |
| 3447 | 3356 | ||
| 3448 | void | 3357 | void |
| 3449 | redraw_garbaged_frames () | 3358 | redraw_garbaged_frames (void) |
| 3450 | { | 3359 | { |
| 3451 | Lisp_Object tail, frame; | 3360 | Lisp_Object tail, frame; |
| 3452 | 3361 | ||
| @@ -3471,10 +3380,7 @@ redraw_garbaged_frames () | |||
| 3471 | Value is non-zero if redisplay was stopped due to pending input. */ | 3380 | Value is non-zero if redisplay was stopped due to pending input. */ |
| 3472 | 3381 | ||
| 3473 | int | 3382 | int |
| 3474 | update_frame (f, force_p, inhibit_hairy_id_p) | 3383 | update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p) |
| 3475 | struct frame *f; | ||
| 3476 | int force_p; | ||
| 3477 | int inhibit_hairy_id_p; | ||
| 3478 | { | 3384 | { |
| 3479 | /* 1 means display has been paused because of pending input. */ | 3385 | /* 1 means display has been paused because of pending input. */ |
| 3480 | int paused_p; | 3386 | int paused_p; |
| @@ -3606,9 +3512,7 @@ update_frame (f, force_p, inhibit_hairy_id_p) | |||
| 3606 | don't stop updating when input is pending. */ | 3512 | don't stop updating when input is pending. */ |
| 3607 | 3513 | ||
| 3608 | static int | 3514 | static int |
| 3609 | update_window_tree (w, force_p) | 3515 | update_window_tree (struct window *w, int force_p) |
| 3610 | struct window *w; | ||
| 3611 | int force_p; | ||
| 3612 | { | 3516 | { |
| 3613 | int paused_p = 0; | 3517 | int paused_p = 0; |
| 3614 | 3518 | ||
| @@ -3632,9 +3536,7 @@ update_window_tree (w, force_p) | |||
| 3632 | FORCE_P is non-zero, don't stop updating if input is pending. */ | 3536 | FORCE_P is non-zero, don't stop updating if input is pending. */ |
| 3633 | 3537 | ||
| 3634 | void | 3538 | void |
| 3635 | update_single_window (w, force_p) | 3539 | update_single_window (struct window *w, int force_p) |
| 3636 | struct window *w; | ||
| 3637 | int force_p; | ||
| 3638 | { | 3540 | { |
| 3639 | if (w->must_be_updated_p) | 3541 | if (w->must_be_updated_p) |
| 3640 | { | 3542 | { |
| @@ -3679,9 +3581,7 @@ update_single_window (w, force_p) | |||
| 3679 | overlapped by other rows. YB is bottom-most y-position in W. */ | 3581 | overlapped by other rows. YB is bottom-most y-position in W. */ |
| 3680 | 3582 | ||
| 3681 | static void | 3583 | static void |
| 3682 | redraw_overlapped_rows (w, yb) | 3584 | redraw_overlapped_rows (struct window *w, int yb) |
| 3683 | struct window *w; | ||
| 3684 | int yb; | ||
| 3685 | { | 3585 | { |
| 3686 | int i; | 3586 | int i; |
| 3687 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 3587 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| @@ -3729,9 +3629,7 @@ redraw_overlapped_rows (w, yb) | |||
| 3729 | others. YB is bottom-most y-position in W. */ | 3629 | others. YB is bottom-most y-position in W. */ |
| 3730 | 3630 | ||
| 3731 | static void | 3631 | static void |
| 3732 | redraw_overlapping_rows (w, yb) | 3632 | redraw_overlapping_rows (struct window *w, int yb) |
| 3733 | struct window *w; | ||
| 3734 | int yb; | ||
| 3735 | { | 3633 | { |
| 3736 | int i, bottom_y; | 3634 | int i, bottom_y; |
| 3737 | struct glyph_row *row; | 3635 | struct glyph_row *row; |
| @@ -3793,8 +3691,7 @@ redraw_overlapping_rows (w, yb) | |||
| 3793 | which is below what's displayed in the window. */ | 3691 | which is below what's displayed in the window. */ |
| 3794 | 3692 | ||
| 3795 | void | 3693 | void |
| 3796 | check_current_matrix_flags (w) | 3694 | check_current_matrix_flags (struct window *w) |
| 3797 | struct window *w; | ||
| 3798 | { | 3695 | { |
| 3799 | int last_seen_p = 0; | 3696 | int last_seen_p = 0; |
| 3800 | int i, yb = window_text_bottom_y (w); | 3697 | int i, yb = window_text_bottom_y (w); |
| @@ -3816,9 +3713,7 @@ check_current_matrix_flags (w) | |||
| 3816 | not stop when detecting pending input. */ | 3713 | not stop when detecting pending input. */ |
| 3817 | 3714 | ||
| 3818 | static int | 3715 | static int |
| 3819 | update_window (w, force_p) | 3716 | update_window (struct window *w, int force_p) |
| 3820 | struct window *w; | ||
| 3821 | int force_p; | ||
| 3822 | { | 3717 | { |
| 3823 | struct glyph_matrix *desired_matrix = w->desired_matrix; | 3718 | struct glyph_matrix *desired_matrix = w->desired_matrix; |
| 3824 | int paused_p; | 3719 | int paused_p; |
| @@ -4010,9 +3905,7 @@ update_window (w, force_p) | |||
| 4010 | AREA can be either LEFT_MARGIN_AREA or RIGHT_MARGIN_AREA. */ | 3905 | AREA can be either LEFT_MARGIN_AREA or RIGHT_MARGIN_AREA. */ |
| 4011 | 3906 | ||
| 4012 | static void | 3907 | static void |
| 4013 | update_marginal_area (w, area, vpos) | 3908 | update_marginal_area (struct window *w, int area, int vpos) |
| 4014 | struct window *w; | ||
| 4015 | int area, vpos; | ||
| 4016 | { | 3909 | { |
| 4017 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); | 3910 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); |
| 4018 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); | 3911 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); |
| @@ -4035,9 +3928,7 @@ update_marginal_area (w, area, vpos) | |||
| 4035 | Value is non-zero if display has changed. */ | 3928 | Value is non-zero if display has changed. */ |
| 4036 | 3929 | ||
| 4037 | static int | 3930 | static int |
| 4038 | update_text_area (w, vpos) | 3931 | update_text_area (struct window *w, int vpos) |
| 4039 | struct window *w; | ||
| 4040 | int vpos; | ||
| 4041 | { | 3932 | { |
| 4042 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); | 3933 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); |
| 4043 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); | 3934 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); |
| @@ -4282,9 +4173,7 @@ update_text_area (w, vpos) | |||
| 4282 | changed. */ | 4173 | changed. */ |
| 4283 | 4174 | ||
| 4284 | static int | 4175 | static int |
| 4285 | update_window_line (w, vpos, mouse_face_overwritten_p) | 4176 | update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p) |
| 4286 | struct window *w; | ||
| 4287 | int vpos, *mouse_face_overwritten_p; | ||
| 4288 | { | 4177 | { |
| 4289 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); | 4178 | struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos); |
| 4290 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); | 4179 | struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos); |
| @@ -4353,8 +4242,7 @@ update_window_line (w, vpos, mouse_face_overwritten_p) | |||
| 4353 | be called from update_window. */ | 4242 | be called from update_window. */ |
| 4354 | 4243 | ||
| 4355 | static void | 4244 | static void |
| 4356 | set_window_cursor_after_update (w) | 4245 | set_window_cursor_after_update (struct window *w) |
| 4357 | struct window *w; | ||
| 4358 | { | 4246 | { |
| 4359 | struct frame *f = XFRAME (w->frame); | 4247 | struct frame *f = XFRAME (w->frame); |
| 4360 | struct redisplay_interface *rif = FRAME_RIF (f); | 4248 | struct redisplay_interface *rif = FRAME_RIF (f); |
| @@ -4438,9 +4326,7 @@ set_window_cursor_after_update (w) | |||
| 4438 | tree rooted at W. */ | 4326 | tree rooted at W. */ |
| 4439 | 4327 | ||
| 4440 | void | 4328 | void |
| 4441 | set_window_update_flags (w, on_p) | 4329 | set_window_update_flags (struct window *w, int on_p) |
| 4442 | struct window *w; | ||
| 4443 | int on_p; | ||
| 4444 | { | 4330 | { |
| 4445 | while (w) | 4331 | while (w) |
| 4446 | { | 4332 | { |
| @@ -4518,9 +4404,7 @@ static struct run **runs; | |||
| 4518 | of window W. */ | 4404 | of window W. */ |
| 4519 | 4405 | ||
| 4520 | static INLINE struct row_entry * | 4406 | static INLINE struct row_entry * |
| 4521 | add_row_entry (w, row) | 4407 | add_row_entry (struct window *w, struct glyph_row *row) |
| 4522 | struct window *w; | ||
| 4523 | struct glyph_row *row; | ||
| 4524 | { | 4408 | { |
| 4525 | struct row_entry *entry; | 4409 | struct row_entry *entry; |
| 4526 | int i = row->hash % row_table_size; | 4410 | int i = row->hash % row_table_size; |
| @@ -4571,9 +4455,7 @@ add_row_entry (w, row) | |||
| 4571 | 1 if we did scroll. */ | 4455 | 1 if we did scroll. */ |
| 4572 | 4456 | ||
| 4573 | static int | 4457 | static int |
| 4574 | scrolling_window (w, header_line_p) | 4458 | scrolling_window (struct window *w, int header_line_p) |
| 4575 | struct window *w; | ||
| 4576 | int header_line_p; | ||
| 4577 | { | 4459 | { |
| 4578 | struct glyph_matrix *desired_matrix = w->desired_matrix; | 4460 | struct glyph_matrix *desired_matrix = w->desired_matrix; |
| 4579 | struct glyph_matrix *current_matrix = w->current_matrix; | 4461 | struct glyph_matrix *current_matrix = w->current_matrix; |
| @@ -4876,10 +4758,7 @@ scrolling_window (w, header_line_p) | |||
| 4876 | Value is non-zero if update was stopped due to pending input. */ | 4758 | Value is non-zero if update was stopped due to pending input. */ |
| 4877 | 4759 | ||
| 4878 | static int | 4760 | static int |
| 4879 | update_frame_1 (f, force_p, inhibit_id_p) | 4761 | update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) |
| 4880 | struct frame *f; | ||
| 4881 | int force_p; | ||
| 4882 | int inhibit_id_p; | ||
| 4883 | { | 4762 | { |
| 4884 | /* Frame matrices to work on. */ | 4763 | /* Frame matrices to work on. */ |
| 4885 | struct glyph_matrix *current_matrix = f->current_matrix; | 4764 | struct glyph_matrix *current_matrix = f->current_matrix; |
| @@ -5089,8 +4968,7 @@ update_frame_1 (f, force_p, inhibit_id_p) | |||
| 5089 | /* Do line insertions/deletions on frame F for frame-based redisplay. */ | 4968 | /* Do line insertions/deletions on frame F for frame-based redisplay. */ |
| 5090 | 4969 | ||
| 5091 | int | 4970 | int |
| 5092 | scrolling (frame) | 4971 | scrolling (struct frame *frame) |
| 5093 | struct frame *frame; | ||
| 5094 | { | 4972 | { |
| 5095 | int unchanged_at_top, unchanged_at_bottom; | 4973 | int unchanged_at_top, unchanged_at_bottom; |
| 5096 | int window_size; | 4974 | int window_size; |
| @@ -5184,9 +5062,7 @@ scrolling (frame) | |||
| 5184 | which is LEN glyphs long. */ | 5062 | which is LEN glyphs long. */ |
| 5185 | 5063 | ||
| 5186 | static int | 5064 | static int |
| 5187 | count_blanks (r, len) | 5065 | count_blanks (struct glyph *r, int len) |
| 5188 | struct glyph *r; | ||
| 5189 | int len; | ||
| 5190 | { | 5066 | { |
| 5191 | int i; | 5067 | int i; |
| 5192 | 5068 | ||
| @@ -5203,8 +5079,7 @@ count_blanks (r, len) | |||
| 5203 | of STR2. Value is the number of equal glyphs equal at the start. */ | 5079 | of STR2. Value is the number of equal glyphs equal at the start. */ |
| 5204 | 5080 | ||
| 5205 | static int | 5081 | static int |
| 5206 | count_match (str1, end1, str2, end2) | 5082 | count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct glyph *end2) |
| 5207 | struct glyph *str1, *end1, *str2, *end2; | ||
| 5208 | { | 5083 | { |
| 5209 | struct glyph *p1 = str1; | 5084 | struct glyph *p1 = str1; |
| 5210 | struct glyph *p2 = str2; | 5085 | struct glyph *p2 = str2; |
| @@ -5227,9 +5102,7 @@ extern int *char_ins_del_vector; | |||
| 5227 | /* Perform a frame-based update on line VPOS in frame FRAME. */ | 5102 | /* Perform a frame-based update on line VPOS in frame FRAME. */ |
| 5228 | 5103 | ||
| 5229 | static void | 5104 | static void |
| 5230 | update_frame_line (f, vpos) | 5105 | update_frame_line (struct frame *f, int vpos) |
| 5231 | struct frame *f; | ||
| 5232 | int vpos; | ||
| 5233 | { | 5106 | { |
| 5234 | struct glyph *obody, *nbody, *op1, *op2, *np1, *nend; | 5107 | struct glyph *obody, *nbody, *op1, *op2, *np1, *nend; |
| 5235 | int tem; | 5108 | int tem; |
| @@ -5545,13 +5418,7 @@ update_frame_line (f, vpos) | |||
| 5545 | Adjust *X and *Y to character positions. */ | 5418 | Adjust *X and *Y to character positions. */ |
| 5546 | 5419 | ||
| 5547 | Lisp_Object | 5420 | Lisp_Object |
| 5548 | buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height) | 5421 | buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *pos, Lisp_Object *object, int *dx, int *dy, int *width, int *height) |
| 5549 | struct window *w; | ||
| 5550 | int *x, *y; | ||
| 5551 | struct display_pos *pos; | ||
| 5552 | Lisp_Object *object; | ||
| 5553 | int *dx, *dy; | ||
| 5554 | int *width, *height; | ||
| 5555 | { | 5422 | { |
| 5556 | struct it it; | 5423 | struct it it; |
| 5557 | Lisp_Object old_current_buffer = Fcurrent_buffer (); | 5424 | Lisp_Object old_current_buffer = Fcurrent_buffer (); |
| @@ -5646,14 +5513,7 @@ buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height) | |||
| 5646 | *CHARPOS is set to the position in the string returned. */ | 5513 | *CHARPOS is set to the position in the string returned. */ |
| 5647 | 5514 | ||
| 5648 | Lisp_Object | 5515 | Lisp_Object |
| 5649 | mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height) | 5516 | mode_line_string (struct window *w, enum window_part part, int *x, int *y, int *charpos, Lisp_Object *object, int *dx, int *dy, int *width, int *height) |
| 5650 | struct window *w; | ||
| 5651 | enum window_part part; | ||
| 5652 | int *x, *y; | ||
| 5653 | int *charpos; | ||
| 5654 | Lisp_Object *object; | ||
| 5655 | int *dx, *dy; | ||
| 5656 | int *width, *height; | ||
| 5657 | { | 5517 | { |
| 5658 | struct glyph_row *row; | 5518 | struct glyph_row *row; |
| 5659 | struct glyph *glyph, *end; | 5519 | struct glyph *glyph, *end; |
| @@ -5720,14 +5580,7 @@ mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height) | |||
| 5720 | the string returned. */ | 5580 | the string returned. */ |
| 5721 | 5581 | ||
| 5722 | Lisp_Object | 5582 | Lisp_Object |
| 5723 | marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height) | 5583 | marginal_area_string (struct window *w, enum window_part part, int *x, int *y, int *charpos, Lisp_Object *object, int *dx, int *dy, int *width, int *height) |
| 5724 | struct window *w; | ||
| 5725 | enum window_part part; | ||
| 5726 | int *x, *y; | ||
| 5727 | int *charpos; | ||
| 5728 | Lisp_Object *object; | ||
| 5729 | int *dx, *dy; | ||
| 5730 | int *width, *height; | ||
| 5731 | { | 5584 | { |
| 5732 | struct glyph_row *row = w->current_matrix->rows; | 5585 | struct glyph_row *row = w->current_matrix->rows; |
| 5733 | struct glyph *glyph, *end; | 5586 | struct glyph *glyph, *end; |
| @@ -5816,8 +5669,8 @@ marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height) | |||
| 5816 | #ifdef SIGWINCH | 5669 | #ifdef SIGWINCH |
| 5817 | 5670 | ||
| 5818 | SIGTYPE | 5671 | SIGTYPE |
| 5819 | window_change_signal (signalnum) /* If we don't have an argument, */ | 5672 | window_change_signal (int signalnum) /* If we don't have an argument, */ |
| 5820 | int signalnum; /* some compilers complain in signal calls. */ | 5673 | /* some compilers complain in signal calls. */ |
| 5821 | { | 5674 | { |
| 5822 | int width, height; | 5675 | int width, height; |
| 5823 | int old_errno = errno; | 5676 | int old_errno = errno; |
| @@ -5865,8 +5718,7 @@ window_change_signal (signalnum) /* If we don't have an argument, */ | |||
| 5865 | safe to change frame sizes while a redisplay is in progress. */ | 5718 | safe to change frame sizes while a redisplay is in progress. */ |
| 5866 | 5719 | ||
| 5867 | void | 5720 | void |
| 5868 | do_pending_window_change (safe) | 5721 | do_pending_window_change (int safe) |
| 5869 | int safe; | ||
| 5870 | { | 5722 | { |
| 5871 | /* If window_change_signal should have run before, run it now. */ | 5723 | /* If window_change_signal should have run before, run it now. */ |
| 5872 | if (redisplaying_p && !safe) | 5724 | if (redisplaying_p && !safe) |
| @@ -5902,9 +5754,7 @@ do_pending_window_change (safe) | |||
| 5902 | safe to change frame sizes while a redisplay is in progress. */ | 5754 | safe to change frame sizes while a redisplay is in progress. */ |
| 5903 | 5755 | ||
| 5904 | void | 5756 | void |
| 5905 | change_frame_size (f, newheight, newwidth, pretend, delay, safe) | 5757 | change_frame_size (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe) |
| 5906 | register struct frame *f; | ||
| 5907 | int newheight, newwidth, pretend, delay, safe; | ||
| 5908 | { | 5758 | { |
| 5909 | Lisp_Object tail, frame; | 5759 | Lisp_Object tail, frame; |
| 5910 | 5760 | ||
| @@ -5923,9 +5773,7 @@ change_frame_size (f, newheight, newwidth, pretend, delay, safe) | |||
| 5923 | } | 5773 | } |
| 5924 | 5774 | ||
| 5925 | static void | 5775 | static void |
| 5926 | change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) | 5776 | change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe) |
| 5927 | register struct frame *f; | ||
| 5928 | int newheight, newwidth, pretend, delay, safe; | ||
| 5929 | { | 5777 | { |
| 5930 | int new_frame_total_cols; | 5778 | int new_frame_total_cols; |
| 5931 | int count = SPECPDL_INDEX (); | 5779 | int count = SPECPDL_INDEX (); |
| @@ -6153,7 +6001,7 @@ terminate any keyboard macro currently executing. */) | |||
| 6153 | } | 6001 | } |
| 6154 | 6002 | ||
| 6155 | void | 6003 | void |
| 6156 | bitch_at_user () | 6004 | bitch_at_user (void) |
| 6157 | { | 6005 | { |
| 6158 | if (noninteractive) | 6006 | if (noninteractive) |
| 6159 | putchar (07); | 6007 | putchar (07); |
| @@ -6230,9 +6078,7 @@ Emacs was built without floating point support. | |||
| 6230 | */ | 6078 | */ |
| 6231 | 6079 | ||
| 6232 | Lisp_Object | 6080 | Lisp_Object |
| 6233 | sit_for (timeout, reading, do_display) | 6081 | sit_for (Lisp_Object timeout, int reading, int do_display) |
| 6234 | Lisp_Object timeout; | ||
| 6235 | int reading, do_display; | ||
| 6236 | { | 6082 | { |
| 6237 | int sec, usec; | 6083 | int sec, usec; |
| 6238 | 6084 | ||
| @@ -6448,7 +6294,7 @@ pass nil for VARIABLE. */) | |||
| 6448 | decoding routine to set up variables in the terminal package. */ | 6294 | decoding routine to set up variables in the terminal package. */ |
| 6449 | 6295 | ||
| 6450 | void | 6296 | void |
| 6451 | init_display () | 6297 | init_display (void) |
| 6452 | { | 6298 | { |
| 6453 | char *terminal_type; | 6299 | char *terminal_type; |
| 6454 | 6300 | ||
| @@ -6710,7 +6556,7 @@ DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame, | |||
| 6710 | ***********************************************************************/ | 6556 | ***********************************************************************/ |
| 6711 | 6557 | ||
| 6712 | void | 6558 | void |
| 6713 | syms_of_display () | 6559 | syms_of_display (void) |
| 6714 | { | 6560 | { |
| 6715 | defsubr (&Sredraw_frame); | 6561 | defsubr (&Sredraw_frame); |
| 6716 | defsubr (&Sredraw_display); | 6562 | defsubr (&Sredraw_display); |
| @@ -71,8 +71,7 @@ Lisp_Object Fsnarf_documentation (Lisp_Object); | |||
| 71 | If UNREADFLAG is 1, we unread a byte. */ | 71 | If UNREADFLAG is 1, we unread a byte. */ |
| 72 | 72 | ||
| 73 | int | 73 | int |
| 74 | read_bytecode_char (unreadflag) | 74 | read_bytecode_char (int unreadflag) |
| 75 | int unreadflag; | ||
| 76 | { | 75 | { |
| 77 | if (unreadflag) | 76 | if (unreadflag) |
| 78 | { | 77 | { |
| @@ -102,9 +101,7 @@ read_bytecode_char (unreadflag) | |||
| 102 | and return a cons cell. */ | 101 | and return a cons cell. */ |
| 103 | 102 | ||
| 104 | Lisp_Object | 103 | Lisp_Object |
| 105 | get_doc_string (filepos, unibyte, definition) | 104 | get_doc_string (Lisp_Object filepos, int unibyte, int definition) |
| 106 | Lisp_Object filepos; | ||
| 107 | int unibyte, definition; | ||
| 108 | { | 105 | { |
| 109 | char *from, *to; | 106 | char *from, *to; |
| 110 | register int fd; | 107 | register int fd; |
| @@ -311,15 +308,13 @@ get_doc_string (filepos, unibyte, definition) | |||
| 311 | of a compiled function from the .elc file. */ | 308 | of a compiled function from the .elc file. */ |
| 312 | 309 | ||
| 313 | Lisp_Object | 310 | Lisp_Object |
| 314 | read_doc_string (filepos) | 311 | read_doc_string (Lisp_Object filepos) |
| 315 | Lisp_Object filepos; | ||
| 316 | { | 312 | { |
| 317 | return get_doc_string (filepos, 0, 1); | 313 | return get_doc_string (filepos, 0, 1); |
| 318 | } | 314 | } |
| 319 | 315 | ||
| 320 | static int | 316 | static int |
| 321 | reread_doc_file (file) | 317 | reread_doc_file (Lisp_Object file) |
| 322 | Lisp_Object file; | ||
| 323 | { | 318 | { |
| 324 | #if 0 | 319 | #if 0 |
| 325 | Lisp_Object reply, prompt[3]; | 320 | Lisp_Object reply, prompt[3]; |
| @@ -515,10 +510,10 @@ aren't strings. */) | |||
| 515 | /* Scanning the DOC files and placing docstring offsets into functions. */ | 510 | /* Scanning the DOC files and placing docstring offsets into functions. */ |
| 516 | 511 | ||
| 517 | static void | 512 | static void |
| 518 | store_function_docstring (fun, offset) | 513 | store_function_docstring (Lisp_Object fun, EMACS_INT offset) |
| 519 | Lisp_Object fun; | 514 | |
| 520 | /* Use EMACS_INT because we get this from pointer subtraction. */ | 515 | /* Use EMACS_INT because we get this from pointer subtraction. */ |
| 521 | EMACS_INT offset; | 516 | |
| 522 | { | 517 | { |
| 523 | fun = indirect_function (fun); | 518 | fun = indirect_function (fun); |
| 524 | 519 | ||
| @@ -951,7 +946,7 @@ a new string, without any text properties, is returned. */) | |||
| 951 | } | 946 | } |
| 952 | 947 | ||
| 953 | void | 948 | void |
| 954 | syms_of_doc () | 949 | syms_of_doc (void) |
| 955 | { | 950 | { |
| 956 | Qfunction_documentation = intern_c_string ("function-documentation"); | 951 | Qfunction_documentation = intern_c_string ("function-documentation"); |
| 957 | staticpro (&Qfunction_documentation); | 952 | staticpro (&Qfunction_documentation); |
diff --git a/src/doprnt.c b/src/doprnt.c index cf8a9280863..774fb131c45 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -61,13 +61,7 @@ static int doprnt1 (); | |||
| 61 | Integers are passed as C integers. */ | 61 | Integers are passed as C integers. */ |
| 62 | 62 | ||
| 63 | int | 63 | int |
| 64 | doprnt (buffer, bufsize, format, format_end, nargs, args) | 64 | doprnt (char *buffer, register int bufsize, char *format, char *format_end, int nargs, char **args) |
| 65 | char *buffer; | ||
| 66 | register int bufsize; | ||
| 67 | char *format; | ||
| 68 | char *format_end; | ||
| 69 | int nargs; | ||
| 70 | char **args; | ||
| 71 | { | 65 | { |
| 72 | int cnt = 0; /* Number of arg to gobble next */ | 66 | int cnt = 0; /* Number of arg to gobble next */ |
| 73 | register char *fmt = format; /* Pointer into format string */ | 67 | register char *fmt = format; /* Pointer into format string */ |
diff --git a/src/ecrt0.c b/src/ecrt0.c index 458771319c7..98aac151862 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c | |||
| @@ -61,23 +61,21 @@ int data_start = 0; | |||
| 61 | 61 | ||
| 62 | char **environ; | 62 | char **environ; |
| 63 | 63 | ||
| 64 | static start1 (); | 64 | static start1 (int bogus_fp, int argc, char *xargv); |
| 65 | 65 | ||
| 66 | /* Define symbol "start": here; some systems want that symbol. */ | 66 | /* Define symbol "start": here; some systems want that symbol. */ |
| 67 | asm(" .text "); | 67 | asm(" .text "); |
| 68 | asm(" .globl start "); | 68 | asm(" .globl start "); |
| 69 | asm(" start: "); | 69 | asm(" start: "); |
| 70 | 70 | ||
| 71 | _start () | 71 | _start (void) |
| 72 | { | 72 | { |
| 73 | /* On vax, nothing is pushed here */ | 73 | /* On vax, nothing is pushed here */ |
| 74 | start1 (); | 74 | start1 (); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | static | 77 | static |
| 78 | start1 (bogus_fp, argc, xargv) | 78 | start1 (int bogus_fp, int argc, char *xargv) |
| 79 | int argc; | ||
| 80 | char *xargv; | ||
| 81 | { | 79 | { |
| 82 | register char **argv = &xargv; | 80 | register char **argv = &xargv; |
| 83 | environ = argv + argc + 1; | 81 | environ = argv + argc + 1; |
diff --git a/src/editfns.c b/src/editfns.c index ac1d152ccdb..f318705d2cd 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -141,7 +141,7 @@ Lisp_Object Qboundary; | |||
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | void | 143 | void |
| 144 | init_editfns () | 144 | init_editfns (void) |
| 145 | { | 145 | { |
| 146 | char *user_name; | 146 | char *user_name; |
| 147 | register unsigned char *p; | 147 | register unsigned char *p; |
| @@ -253,8 +253,7 @@ A multibyte character is handled correctly. */) | |||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | static Lisp_Object | 255 | static Lisp_Object |
| 256 | buildmark (charpos, bytepos) | 256 | buildmark (int charpos, int bytepos) |
| 257 | int charpos, bytepos; | ||
| 258 | { | 257 | { |
| 259 | register Lisp_Object mark; | 258 | register Lisp_Object mark; |
| 260 | mark = Fmake_marker (); | 259 | mark = Fmake_marker (); |
| @@ -280,8 +279,7 @@ DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, | |||
| 280 | } | 279 | } |
| 281 | 280 | ||
| 282 | int | 281 | int |
| 283 | clip_to_bounds (lower, num, upper) | 282 | clip_to_bounds (int lower, int num, int upper) |
| 284 | int lower, num, upper; | ||
| 285 | { | 283 | { |
| 286 | if (num < lower) | 284 | if (num < lower) |
| 287 | return lower; | 285 | return lower; |
| @@ -328,8 +326,7 @@ The return value is POSITION. */) | |||
| 328 | If there is no region active, signal an error. */ | 326 | If there is no region active, signal an error. */ |
| 329 | 327 | ||
| 330 | static Lisp_Object | 328 | static Lisp_Object |
| 331 | region_limit (beginningp) | 329 | region_limit (int beginningp) |
| 332 | int beginningp; | ||
| 333 | { | 330 | { |
| 334 | extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */ | 331 | extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */ |
| 335 | Lisp_Object m; | 332 | Lisp_Object m; |
| @@ -377,10 +374,7 @@ If you set the marker not to point anywhere, the buffer will have no mark. */) | |||
| 377 | of length LEN. */ | 374 | of length LEN. */ |
| 378 | 375 | ||
| 379 | static int | 376 | static int |
| 380 | overlays_around (pos, vec, len) | 377 | overlays_around (int pos, Lisp_Object *vec, int len) |
| 381 | int pos; | ||
| 382 | Lisp_Object *vec; | ||
| 383 | int len; | ||
| 384 | { | 378 | { |
| 385 | Lisp_Object overlay, start, end; | 379 | Lisp_Object overlay, start, end; |
| 386 | struct Lisp_Overlay *tail; | 380 | struct Lisp_Overlay *tail; |
| @@ -436,9 +430,7 @@ overlays_around (pos, vec, len) | |||
| 436 | window-specific overlays are considered only if they are associated | 430 | window-specific overlays are considered only if they are associated |
| 437 | with OBJECT. */ | 431 | with OBJECT. */ |
| 438 | Lisp_Object | 432 | Lisp_Object |
| 439 | get_pos_property (position, prop, object) | 433 | get_pos_property (Lisp_Object position, register Lisp_Object prop, Lisp_Object object) |
| 440 | Lisp_Object position, object; | ||
| 441 | register Lisp_Object prop; | ||
| 442 | { | 434 | { |
| 443 | CHECK_NUMBER_COERCE_MARKER (position); | 435 | CHECK_NUMBER_COERCE_MARKER (position); |
| 444 | 436 | ||
| @@ -533,11 +525,7 @@ get_pos_property (position, prop, object) | |||
| 533 | is not stored. */ | 525 | is not stored. */ |
| 534 | 526 | ||
| 535 | static void | 527 | static void |
| 536 | find_field (pos, merge_at_boundary, beg_limit, beg, end_limit, end) | 528 | find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, Lisp_Object beg_limit, int *beg, Lisp_Object end_limit, int *end) |
| 537 | Lisp_Object pos; | ||
| 538 | Lisp_Object merge_at_boundary; | ||
| 539 | Lisp_Object beg_limit, end_limit; | ||
| 540 | int *beg, *end; | ||
| 541 | { | 529 | { |
| 542 | /* Fields right before and after the point. */ | 530 | /* Fields right before and after the point. */ |
| 543 | Lisp_Object before_field, after_field; | 531 | Lisp_Object before_field, after_field; |
| @@ -900,7 +888,7 @@ This function does not move point. */) | |||
| 900 | 888 | ||
| 901 | 889 | ||
| 902 | Lisp_Object | 890 | Lisp_Object |
| 903 | save_excursion_save () | 891 | save_excursion_save (void) |
| 904 | { | 892 | { |
| 905 | int visible = (XBUFFER (XWINDOW (selected_window)->buffer) | 893 | int visible = (XBUFFER (XWINDOW (selected_window)->buffer) |
| 906 | == current_buffer); | 894 | == current_buffer); |
| @@ -913,8 +901,7 @@ save_excursion_save () | |||
| 913 | } | 901 | } |
| 914 | 902 | ||
| 915 | Lisp_Object | 903 | Lisp_Object |
| 916 | save_excursion_restore (info) | 904 | save_excursion_restore (Lisp_Object info) |
| 917 | Lisp_Object info; | ||
| 918 | { | 905 | { |
| 919 | Lisp_Object tem, tem1, omark, nmark; | 906 | Lisp_Object tem, tem1, omark, nmark; |
| 920 | struct gcpro gcpro1, gcpro2, gcpro3; | 907 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -1440,7 +1427,7 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, | |||
| 1440 | /* For the benefit of callers who don't want to include lisp.h */ | 1427 | /* For the benefit of callers who don't want to include lisp.h */ |
| 1441 | 1428 | ||
| 1442 | char * | 1429 | char * |
| 1443 | get_system_name () | 1430 | get_system_name (void) |
| 1444 | { | 1431 | { |
| 1445 | if (STRINGP (Vsystem_name)) | 1432 | if (STRINGP (Vsystem_name)) |
| 1446 | return (char *) SDATA (Vsystem_name); | 1433 | return (char *) SDATA (Vsystem_name); |
| @@ -1449,7 +1436,7 @@ get_system_name () | |||
| 1449 | } | 1436 | } |
| 1450 | 1437 | ||
| 1451 | char * | 1438 | char * |
| 1452 | get_operating_system_release() | 1439 | get_operating_system_release(void) |
| 1453 | { | 1440 | { |
| 1454 | if (STRINGP (Voperating_system_release)) | 1441 | if (STRINGP (Voperating_system_release)) |
| 1455 | return (char *) SDATA (Voperating_system_release); | 1442 | return (char *) SDATA (Voperating_system_release); |
| @@ -1527,10 +1514,7 @@ on systems that do not provide resolution finer than a second. */) | |||
| 1527 | 1514 | ||
| 1528 | 1515 | ||
| 1529 | int | 1516 | int |
| 1530 | lisp_time_argument (specified_time, result, usec) | 1517 | lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec) |
| 1531 | Lisp_Object specified_time; | ||
| 1532 | time_t *result; | ||
| 1533 | int *usec; | ||
| 1534 | { | 1518 | { |
| 1535 | if (NILP (specified_time)) | 1519 | if (NILP (specified_time)) |
| 1536 | { | 1520 | { |
| @@ -1611,13 +1595,7 @@ or (if you need time as a string) `format-time-string'. */) | |||
| 1611 | This function behaves like emacs_strftimeu, except it allows null | 1595 | This function behaves like emacs_strftimeu, except it allows null |
| 1612 | bytes in FORMAT. */ | 1596 | bytes in FORMAT. */ |
| 1613 | static size_t | 1597 | static size_t |
| 1614 | emacs_memftimeu (s, maxsize, format, format_len, tp, ut) | 1598 | emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, const struct tm *tp, int ut) |
| 1615 | char *s; | ||
| 1616 | size_t maxsize; | ||
| 1617 | const char *format; | ||
| 1618 | size_t format_len; | ||
| 1619 | const struct tm *tp; | ||
| 1620 | int ut; | ||
| 1621 | { | 1599 | { |
| 1622 | size_t total = 0; | 1600 | size_t total = 0; |
| 1623 | 1601 | ||
| @@ -1950,8 +1928,7 @@ but this is considered obsolete. */) | |||
| 1950 | /* Yield A - B, measured in seconds. | 1928 | /* Yield A - B, measured in seconds. |
| 1951 | This function is copied from the GNU C Library. */ | 1929 | This function is copied from the GNU C Library. */ |
| 1952 | static int | 1930 | static int |
| 1953 | tm_diff (a, b) | 1931 | tm_diff (struct tm *a, struct tm *b) |
| 1954 | struct tm *a, *b; | ||
| 1955 | { | 1932 | { |
| 1956 | /* Compute intervening leap days correctly even if year is negative. | 1933 | /* Compute intervening leap days correctly even if year is negative. |
| 1957 | Take care to avoid int overflow in leap day calculations, | 1934 | Take care to avoid int overflow in leap day calculations, |
| @@ -2098,8 +2075,7 @@ static char set_time_zone_rule_tz2[] = "TZ=GMT+1"; | |||
| 2098 | responsibility to free. */ | 2075 | responsibility to free. */ |
| 2099 | 2076 | ||
| 2100 | void | 2077 | void |
| 2101 | set_time_zone_rule (tzstring) | 2078 | set_time_zone_rule (char *tzstring) |
| 2102 | char *tzstring; | ||
| 2103 | { | 2079 | { |
| 2104 | int envptrs; | 2080 | int envptrs; |
| 2105 | char **from, **to, **newenv; | 2081 | char **from, **to, **newenv; |
| @@ -2221,8 +2197,7 @@ general_insert_function (void (*insert_func) | |||
| 2221 | } | 2197 | } |
| 2222 | 2198 | ||
| 2223 | void | 2199 | void |
| 2224 | insert1 (arg) | 2200 | insert1 (Lisp_Object arg) |
| 2225 | Lisp_Object arg; | ||
| 2226 | { | 2201 | { |
| 2227 | Finsert (1, &arg); | 2202 | Finsert (1, &arg); |
| 2228 | } | 2203 | } |
| @@ -2408,9 +2383,7 @@ from adjoining text, if those properties are sticky. */) | |||
| 2408 | buffer substrings. */ | 2383 | buffer substrings. */ |
| 2409 | 2384 | ||
| 2410 | Lisp_Object | 2385 | Lisp_Object |
| 2411 | make_buffer_string (start, end, props) | 2386 | make_buffer_string (int start, int end, int props) |
| 2412 | int start, end; | ||
| 2413 | int props; | ||
| 2414 | { | 2387 | { |
| 2415 | int start_byte = CHAR_TO_BYTE (start); | 2388 | int start_byte = CHAR_TO_BYTE (start); |
| 2416 | int end_byte = CHAR_TO_BYTE (end); | 2389 | int end_byte = CHAR_TO_BYTE (end); |
| @@ -2434,9 +2407,7 @@ make_buffer_string (start, end, props) | |||
| 2434 | buffer substrings. */ | 2407 | buffer substrings. */ |
| 2435 | 2408 | ||
| 2436 | Lisp_Object | 2409 | Lisp_Object |
| 2437 | make_buffer_string_both (start, start_byte, end, end_byte, props) | 2410 | make_buffer_string_both (int start, int start_byte, int end, int end_byte, int props) |
| 2438 | int start, start_byte, end, end_byte; | ||
| 2439 | int props; | ||
| 2440 | { | 2411 | { |
| 2441 | Lisp_Object result, tem, tem1; | 2412 | Lisp_Object result, tem, tem1; |
| 2442 | 2413 | ||
| @@ -2470,8 +2441,7 @@ make_buffer_string_both (start, start_byte, end, end_byte, props) | |||
| 2470 | in the current buffer, if necessary. */ | 2441 | in the current buffer, if necessary. */ |
| 2471 | 2442 | ||
| 2472 | static void | 2443 | static void |
| 2473 | update_buffer_properties (start, end) | 2444 | update_buffer_properties (int start, int end) |
| 2474 | int start, end; | ||
| 2475 | { | 2445 | { |
| 2476 | /* If this buffer has some access functions, | 2446 | /* If this buffer has some access functions, |
| 2477 | call them, specifying the range of the buffer being accessed. */ | 2447 | call them, specifying the range of the buffer being accessed. */ |
| @@ -2757,15 +2727,13 @@ determines whether case is significant or ignored. */) | |||
| 2757 | } | 2727 | } |
| 2758 | 2728 | ||
| 2759 | static Lisp_Object | 2729 | static Lisp_Object |
| 2760 | subst_char_in_region_unwind (arg) | 2730 | subst_char_in_region_unwind (Lisp_Object arg) |
| 2761 | Lisp_Object arg; | ||
| 2762 | { | 2731 | { |
| 2763 | return current_buffer->undo_list = arg; | 2732 | return current_buffer->undo_list = arg; |
| 2764 | } | 2733 | } |
| 2765 | 2734 | ||
| 2766 | static Lisp_Object | 2735 | static Lisp_Object |
| 2767 | subst_char_in_region_unwind_1 (arg) | 2736 | subst_char_in_region_unwind_1 (Lisp_Object arg) |
| 2768 | Lisp_Object arg; | ||
| 2769 | { | 2737 | { |
| 2770 | return current_buffer->filename = arg; | 2738 | return current_buffer->filename = arg; |
| 2771 | } | 2739 | } |
| @@ -2962,9 +2930,7 @@ static Lisp_Object check_translation (int, int, int, Lisp_Object); | |||
| 2962 | element is found, return it. Otherwise return Qnil. */ | 2930 | element is found, return it. Otherwise return Qnil. */ |
| 2963 | 2931 | ||
| 2964 | static Lisp_Object | 2932 | static Lisp_Object |
| 2965 | check_translation (pos, pos_byte, end, val) | 2933 | check_translation (int pos, int pos_byte, int end, Lisp_Object val) |
| 2966 | int pos, pos_byte, end; | ||
| 2967 | Lisp_Object val; | ||
| 2968 | { | 2934 | { |
| 2969 | int buf_size = 16, buf_used = 0; | 2935 | int buf_size = 16, buf_used = 0; |
| 2970 | int *buf = alloca (sizeof (int) * buf_size); | 2936 | int *buf = alloca (sizeof (int) * buf_size); |
| @@ -3263,7 +3229,7 @@ or markers) bounding the text that should remain visible. */) | |||
| 3263 | } | 3229 | } |
| 3264 | 3230 | ||
| 3265 | Lisp_Object | 3231 | Lisp_Object |
| 3266 | save_restriction_save () | 3232 | save_restriction_save (void) |
| 3267 | { | 3233 | { |
| 3268 | if (BEGV == BEG && ZV == Z) | 3234 | if (BEGV == BEG && ZV == Z) |
| 3269 | /* The common case that the buffer isn't narrowed. | 3235 | /* The common case that the buffer isn't narrowed. |
| @@ -3287,8 +3253,7 @@ save_restriction_save () | |||
| 3287 | } | 3253 | } |
| 3288 | 3254 | ||
| 3289 | Lisp_Object | 3255 | Lisp_Object |
| 3290 | save_restriction_restore (data) | 3256 | save_restriction_restore (Lisp_Object data) |
| 3291 | Lisp_Object data; | ||
| 3292 | { | 3257 | { |
| 3293 | struct buffer *cur = NULL; | 3258 | struct buffer *cur = NULL; |
| 3294 | struct buffer *buf = (CONSP (data) | 3259 | struct buffer *buf = (CONSP (data) |
| @@ -4209,9 +4174,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 4209 | } | 4174 | } |
| 4210 | 4175 | ||
| 4211 | Lisp_Object | 4176 | Lisp_Object |
| 4212 | format2 (string1, arg0, arg1) | 4177 | format2 (char *string1, Lisp_Object arg0, Lisp_Object arg1) |
| 4213 | char *string1; | ||
| 4214 | Lisp_Object arg0, arg1; | ||
| 4215 | { | 4178 | { |
| 4216 | Lisp_Object args[3]; | 4179 | Lisp_Object args[3]; |
| 4217 | args[0] = build_string (string1); | 4180 | args[0] = build_string (string1); |
| @@ -4639,7 +4602,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4639 | 4602 | ||
| 4640 | 4603 | ||
| 4641 | void | 4604 | void |
| 4642 | syms_of_editfns () | 4605 | syms_of_editfns (void) |
| 4643 | { | 4606 | { |
| 4644 | environbuf = 0; | 4607 | environbuf = 0; |
| 4645 | initial_tz = 0; | 4608 | initial_tz = 0; |
diff --git a/src/fileio.c b/src/fileio.c index af477792ec8..c81dc6705c7 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -246,9 +246,7 @@ static int e_write (int, Lisp_Object, int, int, struct coding_system *); | |||
| 246 | 246 | ||
| 247 | 247 | ||
| 248 | void | 248 | void |
| 249 | report_file_error (string, data) | 249 | report_file_error (const char *string, Lisp_Object data) |
| 250 | const char *string; | ||
| 251 | Lisp_Object data; | ||
| 252 | { | 250 | { |
| 253 | Lisp_Object errstring; | 251 | Lisp_Object errstring; |
| 254 | int errorno = errno; | 252 | int errorno = errno; |
| @@ -286,8 +284,7 @@ report_file_error (string, data) | |||
| 286 | } | 284 | } |
| 287 | 285 | ||
| 288 | Lisp_Object | 286 | Lisp_Object |
| 289 | close_file_unwind (fd) | 287 | close_file_unwind (Lisp_Object fd) |
| 290 | Lisp_Object fd; | ||
| 291 | { | 288 | { |
| 292 | emacs_close (XFASTINT (fd)); | 289 | emacs_close (XFASTINT (fd)); |
| 293 | return Qnil; | 290 | return Qnil; |
| @@ -296,8 +293,7 @@ close_file_unwind (fd) | |||
| 296 | /* Restore point, having saved it as a marker. */ | 293 | /* Restore point, having saved it as a marker. */ |
| 297 | 294 | ||
| 298 | Lisp_Object | 295 | Lisp_Object |
| 299 | restore_point_unwind (location) | 296 | restore_point_unwind (Lisp_Object location) |
| 300 | Lisp_Object location; | ||
| 301 | { | 297 | { |
| 302 | Fgoto_char (location); | 298 | Fgoto_char (location); |
| 303 | Fset_marker (location, Qnil, Qnil); | 299 | Fset_marker (location, Qnil, Qnil); |
| @@ -539,8 +535,7 @@ get a current directory to run processes in. */) | |||
| 539 | 535 | ||
| 540 | 536 | ||
| 541 | char * | 537 | char * |
| 542 | file_name_as_directory (out, in) | 538 | file_name_as_directory (char *out, char *in) |
| 543 | char *out, *in; | ||
| 544 | { | 539 | { |
| 545 | int size = strlen (in) - 1; | 540 | int size = strlen (in) - 1; |
| 546 | 541 | ||
| @@ -604,8 +599,7 @@ For a Unix-syntax file name, just appends a slash. */) | |||
| 604 | */ | 599 | */ |
| 605 | 600 | ||
| 606 | int | 601 | int |
| 607 | directory_file_name (src, dst) | 602 | directory_file_name (char *src, char *dst) |
| 608 | char *src, *dst; | ||
| 609 | { | 603 | { |
| 610 | long slen; | 604 | long slen; |
| 611 | 605 | ||
| @@ -688,9 +682,7 @@ static unsigned make_temp_name_count, make_temp_name_count_initialized_p; | |||
| 688 | generated. */ | 682 | generated. */ |
| 689 | 683 | ||
| 690 | Lisp_Object | 684 | Lisp_Object |
| 691 | make_temp_name (prefix, base64_p) | 685 | make_temp_name (Lisp_Object prefix, int base64_p) |
| 692 | Lisp_Object prefix; | ||
| 693 | int base64_p; | ||
| 694 | { | 686 | { |
| 695 | Lisp_Object val; | 687 | Lisp_Object val; |
| 696 | int len, clen; | 688 | int len, clen; |
| @@ -1558,8 +1550,7 @@ See also the function `substitute-in-file-name'.") | |||
| 1558 | 1550 | ||
| 1559 | /* If /~ or // appears, discard everything through first slash. */ | 1551 | /* If /~ or // appears, discard everything through first slash. */ |
| 1560 | static int | 1552 | static int |
| 1561 | file_name_absolute_p (filename) | 1553 | file_name_absolute_p (const unsigned char *filename) |
| 1562 | const unsigned char *filename; | ||
| 1563 | { | 1554 | { |
| 1564 | return | 1555 | return |
| 1565 | (IS_DIRECTORY_SEP (*filename) || *filename == '~' | 1556 | (IS_DIRECTORY_SEP (*filename) || *filename == '~' |
| @@ -1571,8 +1562,7 @@ file_name_absolute_p (filename) | |||
| 1571 | } | 1562 | } |
| 1572 | 1563 | ||
| 1573 | static unsigned char * | 1564 | static unsigned char * |
| 1574 | search_embedded_absfilename (nm, endp) | 1565 | search_embedded_absfilename (unsigned char *nm, unsigned char *endp) |
| 1575 | unsigned char *nm, *endp; | ||
| 1576 | { | 1566 | { |
| 1577 | unsigned char *p, *s; | 1567 | unsigned char *p, *s; |
| 1578 | 1568 | ||
| @@ -1823,8 +1813,7 @@ those `/' is discarded. */) | |||
| 1823 | (directory-file-name (expand-file-name FOO)). */ | 1813 | (directory-file-name (expand-file-name FOO)). */ |
| 1824 | 1814 | ||
| 1825 | Lisp_Object | 1815 | Lisp_Object |
| 1826 | expand_and_dir_to_file (filename, defdir) | 1816 | expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir) |
| 1827 | Lisp_Object filename, defdir; | ||
| 1828 | { | 1817 | { |
| 1829 | register Lisp_Object absname; | 1818 | register Lisp_Object absname; |
| 1830 | 1819 | ||
| @@ -1853,12 +1842,7 @@ expand_and_dir_to_file (filename, defdir) | |||
| 1853 | If QUICK is nonzero, we ask for y or n, not yes or no. */ | 1842 | If QUICK is nonzero, we ask for y or n, not yes or no. */ |
| 1854 | 1843 | ||
| 1855 | void | 1844 | void |
| 1856 | barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick) | 1845 | barf_or_query_if_file_exists (Lisp_Object absname, unsigned char *querystring, int interactive, struct stat *statptr, int quick) |
| 1857 | Lisp_Object absname; | ||
| 1858 | unsigned char *querystring; | ||
| 1859 | int interactive; | ||
| 1860 | struct stat *statptr; | ||
| 1861 | int quick; | ||
| 1862 | { | 1846 | { |
| 1863 | register Lisp_Object tem, encoded_filename; | 1847 | register Lisp_Object tem, encoded_filename; |
| 1864 | struct stat statbuf; | 1848 | struct stat statbuf; |
| @@ -2228,8 +2212,7 @@ With a prefix argument, TRASH is nil. */) | |||
| 2228 | } | 2212 | } |
| 2229 | 2213 | ||
| 2230 | static Lisp_Object | 2214 | static Lisp_Object |
| 2231 | internal_delete_file_1 (ignore) | 2215 | internal_delete_file_1 (Lisp_Object ignore) |
| 2232 | Lisp_Object ignore; | ||
| 2233 | { | 2216 | { |
| 2234 | return Qt; | 2217 | return Qt; |
| 2235 | } | 2218 | } |
| @@ -2495,8 +2478,7 @@ On Unix, this is a name starting with a `/' or a `~'. */) | |||
| 2495 | /* Return nonzero if file FILENAME exists and can be executed. */ | 2478 | /* Return nonzero if file FILENAME exists and can be executed. */ |
| 2496 | 2479 | ||
| 2497 | static int | 2480 | static int |
| 2498 | check_executable (filename) | 2481 | check_executable (char *filename) |
| 2499 | char *filename; | ||
| 2500 | { | 2482 | { |
| 2501 | #ifdef DOS_NT | 2483 | #ifdef DOS_NT |
| 2502 | int len = strlen (filename); | 2484 | int len = strlen (filename); |
| @@ -2520,8 +2502,7 @@ check_executable (filename) | |||
| 2520 | /* Return nonzero if file FILENAME exists and can be written. */ | 2502 | /* Return nonzero if file FILENAME exists and can be written. */ |
| 2521 | 2503 | ||
| 2522 | static int | 2504 | static int |
| 2523 | check_writable (filename) | 2505 | check_writable (char *filename) |
| 2524 | char *filename; | ||
| 2525 | { | 2506 | { |
| 2526 | #ifdef MSDOS | 2507 | #ifdef MSDOS |
| 2527 | struct stat st; | 2508 | struct stat st; |
| @@ -3235,8 +3216,7 @@ Lisp_Object Qfind_buffer_file_type; | |||
| 3235 | o set back the buffer multibyteness. */ | 3216 | o set back the buffer multibyteness. */ |
| 3236 | 3217 | ||
| 3237 | static Lisp_Object | 3218 | static Lisp_Object |
| 3238 | decide_coding_unwind (unwind_data) | 3219 | decide_coding_unwind (Lisp_Object unwind_data) |
| 3239 | Lisp_Object unwind_data; | ||
| 3240 | { | 3220 | { |
| 3241 | Lisp_Object multibyte, undo_list, buffer; | 3221 | Lisp_Object multibyte, undo_list, buffer; |
| 3242 | 3222 | ||
| @@ -3273,7 +3253,7 @@ static EMACS_INT non_regular_nbytes; | |||
| 3273 | Value is the number of bytes read. */ | 3253 | Value is the number of bytes read. */ |
| 3274 | 3254 | ||
| 3275 | static Lisp_Object | 3255 | static Lisp_Object |
| 3276 | read_non_regular () | 3256 | read_non_regular (void) |
| 3277 | { | 3257 | { |
| 3278 | EMACS_INT nbytes; | 3258 | EMACS_INT nbytes; |
| 3279 | 3259 | ||
| @@ -3291,7 +3271,7 @@ read_non_regular () | |||
| 3291 | in insert-file-contents. */ | 3271 | in insert-file-contents. */ |
| 3292 | 3272 | ||
| 3293 | static Lisp_Object | 3273 | static Lisp_Object |
| 3294 | read_non_regular_quit () | 3274 | read_non_regular_quit (void) |
| 3295 | { | 3275 | { |
| 3296 | return Qnil; | 3276 | return Qnil; |
| 3297 | } | 3277 | } |
| @@ -4448,8 +4428,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4448 | static Lisp_Object build_annotations (Lisp_Object, Lisp_Object); | 4428 | static Lisp_Object build_annotations (Lisp_Object, Lisp_Object); |
| 4449 | 4429 | ||
| 4450 | static Lisp_Object | 4430 | static Lisp_Object |
| 4451 | build_annotations_unwind (arg) | 4431 | build_annotations_unwind (Lisp_Object arg) |
| 4452 | Lisp_Object arg; | ||
| 4453 | { | 4432 | { |
| 4454 | Vwrite_region_annotation_buffers = arg; | 4433 | Vwrite_region_annotation_buffers = arg; |
| 4455 | return Qnil; | 4434 | return Qnil; |
| @@ -4923,8 +4902,7 @@ DEFUN ("car-less-than-car", Fcar_less_than_car, Scar_less_than_car, 2, 2, 0, | |||
| 4923 | as save-excursion would do. */ | 4902 | as save-excursion would do. */ |
| 4924 | 4903 | ||
| 4925 | static Lisp_Object | 4904 | static Lisp_Object |
| 4926 | build_annotations (start, end) | 4905 | build_annotations (Lisp_Object start, Lisp_Object end) |
| 4927 | Lisp_Object start, end; | ||
| 4928 | { | 4906 | { |
| 4929 | Lisp_Object annotations; | 4907 | Lisp_Object annotations; |
| 4930 | Lisp_Object p, res; | 4908 | Lisp_Object p, res; |
| @@ -5013,13 +4991,7 @@ build_annotations (start, end) | |||
| 5013 | The return value is negative in case of system call failure. */ | 4991 | The return value is negative in case of system call failure. */ |
| 5014 | 4992 | ||
| 5015 | static int | 4993 | static int |
| 5016 | a_write (desc, string, pos, nchars, annot, coding) | 4994 | a_write (int desc, Lisp_Object string, int pos, register int nchars, Lisp_Object *annot, struct coding_system *coding) |
| 5017 | int desc; | ||
| 5018 | Lisp_Object string; | ||
| 5019 | register int nchars; | ||
| 5020 | int pos; | ||
| 5021 | Lisp_Object *annot; | ||
| 5022 | struct coding_system *coding; | ||
| 5023 | { | 4995 | { |
| 5024 | Lisp_Object tem; | 4996 | Lisp_Object tem; |
| 5025 | int nextpos; | 4997 | int nextpos; |
| @@ -5063,11 +5035,7 @@ a_write (desc, string, pos, nchars, annot, coding) | |||
| 5063 | are indexes to the string STRING. */ | 5035 | are indexes to the string STRING. */ |
| 5064 | 5036 | ||
| 5065 | static int | 5037 | static int |
| 5066 | e_write (desc, string, start, end, coding) | 5038 | e_write (int desc, Lisp_Object string, int start, int end, struct coding_system *coding) |
| 5067 | int desc; | ||
| 5068 | Lisp_Object string; | ||
| 5069 | int start, end; | ||
| 5070 | struct coding_system *coding; | ||
| 5071 | { | 5039 | { |
| 5072 | if (STRINGP (string)) | 5040 | if (STRINGP (string)) |
| 5073 | { | 5041 | { |
| @@ -5259,8 +5227,7 @@ An argument specifies the modification time value to use | |||
| 5259 | } | 5227 | } |
| 5260 | 5228 | ||
| 5261 | Lisp_Object | 5229 | Lisp_Object |
| 5262 | auto_save_error (error) | 5230 | auto_save_error (Lisp_Object error) |
| 5263 | Lisp_Object error; | ||
| 5264 | { | 5231 | { |
| 5265 | Lisp_Object args[3], msg; | 5232 | Lisp_Object args[3], msg; |
| 5266 | int i, nbytes; | 5233 | int i, nbytes; |
| @@ -5296,7 +5263,7 @@ auto_save_error (error) | |||
| 5296 | } | 5263 | } |
| 5297 | 5264 | ||
| 5298 | Lisp_Object | 5265 | Lisp_Object |
| 5299 | auto_save_1 () | 5266 | auto_save_1 (void) |
| 5300 | { | 5267 | { |
| 5301 | struct stat st; | 5268 | struct stat st; |
| 5302 | Lisp_Object modes; | 5269 | Lisp_Object modes; |
| @@ -5322,8 +5289,8 @@ auto_save_1 () | |||
| 5322 | } | 5289 | } |
| 5323 | 5290 | ||
| 5324 | static Lisp_Object | 5291 | static Lisp_Object |
| 5325 | do_auto_save_unwind (arg) /* used as unwind-protect function */ | 5292 | do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */ |
| 5326 | Lisp_Object arg; | 5293 | |
| 5327 | { | 5294 | { |
| 5328 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 5295 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 5329 | auto_saving = 0; | 5296 | auto_saving = 0; |
| @@ -5337,16 +5304,15 @@ do_auto_save_unwind (arg) /* used as unwind-protect function */ | |||
| 5337 | } | 5304 | } |
| 5338 | 5305 | ||
| 5339 | static Lisp_Object | 5306 | static Lisp_Object |
| 5340 | do_auto_save_unwind_1 (value) /* used as unwind-protect function */ | 5307 | do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */ |
| 5341 | Lisp_Object value; | 5308 | |
| 5342 | { | 5309 | { |
| 5343 | minibuffer_auto_raise = XINT (value); | 5310 | minibuffer_auto_raise = XINT (value); |
| 5344 | return Qnil; | 5311 | return Qnil; |
| 5345 | } | 5312 | } |
| 5346 | 5313 | ||
| 5347 | static Lisp_Object | 5314 | static Lisp_Object |
| 5348 | do_auto_save_make_dir (dir) | 5315 | do_auto_save_make_dir (Lisp_Object dir) |
| 5349 | Lisp_Object dir; | ||
| 5350 | { | 5316 | { |
| 5351 | Lisp_Object mode; | 5317 | Lisp_Object mode; |
| 5352 | 5318 | ||
| @@ -5356,8 +5322,7 @@ do_auto_save_make_dir (dir) | |||
| 5356 | } | 5322 | } |
| 5357 | 5323 | ||
| 5358 | static Lisp_Object | 5324 | static Lisp_Object |
| 5359 | do_auto_save_eh (ignore) | 5325 | do_auto_save_eh (Lisp_Object ignore) |
| 5360 | Lisp_Object ignore; | ||
| 5361 | { | 5326 | { |
| 5362 | return Qnil; | 5327 | return Qnil; |
| 5363 | } | 5328 | } |
| @@ -5627,8 +5592,7 @@ before any other event (mouse or keypress) is handled. */) | |||
| 5627 | } | 5592 | } |
| 5628 | 5593 | ||
| 5629 | Lisp_Object | 5594 | Lisp_Object |
| 5630 | Fread_file_name (prompt, dir, default_filename, mustmatch, initial, predicate) | 5595 | Fread_file_name (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object initial, Lisp_Object predicate) |
| 5631 | Lisp_Object prompt, dir, default_filename, mustmatch, initial, predicate; | ||
| 5632 | { | 5596 | { |
| 5633 | struct gcpro gcpro1, gcpro2; | 5597 | struct gcpro gcpro1, gcpro2; |
| 5634 | Lisp_Object args[7]; | 5598 | Lisp_Object args[7]; |
| @@ -5646,7 +5610,7 @@ Fread_file_name (prompt, dir, default_filename, mustmatch, initial, predicate) | |||
| 5646 | 5610 | ||
| 5647 | 5611 | ||
| 5648 | void | 5612 | void |
| 5649 | syms_of_fileio () | 5613 | syms_of_fileio (void) |
| 5650 | { | 5614 | { |
| 5651 | Qoperations = intern_c_string ("operations"); | 5615 | Qoperations = intern_c_string ("operations"); |
| 5652 | Qexpand_file_name = intern_c_string ("expand-file-name"); | 5616 | Qexpand_file_name = intern_c_string ("expand-file-name"); |
diff --git a/src/filelock.c b/src/filelock.c index 69e15a53846..769e5aa7a92 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -126,7 +126,7 @@ static void get_boot_time_1 (char *, int); | |||
| 126 | #endif | 126 | #endif |
| 127 | 127 | ||
| 128 | static time_t | 128 | static time_t |
| 129 | get_boot_time () | 129 | get_boot_time (void) |
| 130 | { | 130 | { |
| 131 | #if defined (BOOT_TIME) | 131 | #if defined (BOOT_TIME) |
| 132 | int counter; | 132 | int counter; |
| @@ -253,9 +253,7 @@ get_boot_time () | |||
| 253 | Success is indicated by setting BOOT_TIME to a larger value. */ | 253 | Success is indicated by setting BOOT_TIME to a larger value. */ |
| 254 | 254 | ||
| 255 | void | 255 | void |
| 256 | get_boot_time_1 (filename, newest) | 256 | get_boot_time_1 (char *filename, int newest) |
| 257 | char *filename; | ||
| 258 | int newest; | ||
| 259 | { | 257 | { |
| 260 | struct utmp ut, *utp; | 258 | struct utmp ut, *utp; |
| 261 | int desc; | 259 | int desc; |
| @@ -326,9 +324,7 @@ typedef struct | |||
| 326 | fill_in_lock_file_name (lock, (file))) | 324 | fill_in_lock_file_name (lock, (file))) |
| 327 | 325 | ||
| 328 | static void | 326 | static void |
| 329 | fill_in_lock_file_name (lockfile, fn) | 327 | fill_in_lock_file_name (register char *lockfile, register Lisp_Object fn) |
| 330 | register char *lockfile; | ||
| 331 | register Lisp_Object fn; | ||
| 332 | { | 328 | { |
| 333 | register char *p; | 329 | register char *p; |
| 334 | struct stat st; | 330 | struct stat st; |
| @@ -364,9 +360,7 @@ fill_in_lock_file_name (lockfile, fn) | |||
| 364 | Return 1 if successful, 0 if not. */ | 360 | Return 1 if successful, 0 if not. */ |
| 365 | 361 | ||
| 366 | static int | 362 | static int |
| 367 | lock_file_1 (lfname, force) | 363 | lock_file_1 (char *lfname, int force) |
| 368 | char *lfname; | ||
| 369 | int force; | ||
| 370 | { | 364 | { |
| 371 | register int err; | 365 | register int err; |
| 372 | time_t boot_time; | 366 | time_t boot_time; |
| @@ -408,8 +402,7 @@ lock_file_1 (lfname, force) | |||
| 408 | /* Return 1 if times A and B are no more than one second apart. */ | 402 | /* Return 1 if times A and B are no more than one second apart. */ |
| 409 | 403 | ||
| 410 | int | 404 | int |
| 411 | within_one_second (a, b) | 405 | within_one_second (time_t a, time_t b) |
| 412 | time_t a, b; | ||
| 413 | { | 406 | { |
| 414 | return (a - b >= -1 && a - b <= 1); | 407 | return (a - b >= -1 && a - b <= 1); |
| 415 | } | 408 | } |
| @@ -420,12 +413,10 @@ within_one_second (a, b) | |||
| 420 | or -1 if something is wrong with the locking mechanism. */ | 413 | or -1 if something is wrong with the locking mechanism. */ |
| 421 | 414 | ||
| 422 | static int | 415 | static int |
| 423 | current_lock_owner (owner, lfname) | 416 | current_lock_owner (lock_info_type *owner, char *lfname) |
| 424 | lock_info_type *owner; | ||
| 425 | char *lfname; | ||
| 426 | { | 417 | { |
| 427 | #ifndef index | 418 | #ifndef index |
| 428 | extern char *rindex (), *index (); | 419 | extern char *rindex (const char *, int), *index (const char *, int); |
| 429 | #endif | 420 | #endif |
| 430 | int len, ret; | 421 | int len, ret; |
| 431 | int local_owner = 0; | 422 | int local_owner = 0; |
| @@ -540,9 +531,7 @@ current_lock_owner (owner, lfname) | |||
| 540 | Return -1 if cannot lock for any other reason. */ | 531 | Return -1 if cannot lock for any other reason. */ |
| 541 | 532 | ||
| 542 | static int | 533 | static int |
| 543 | lock_if_free (clasher, lfname) | 534 | lock_if_free (lock_info_type *clasher, register char *lfname) |
| 544 | lock_info_type *clasher; | ||
| 545 | register char *lfname; | ||
| 546 | { | 535 | { |
| 547 | while (lock_file_1 (lfname, 0) == 0) | 536 | while (lock_file_1 (lfname, 0) == 0) |
| 548 | { | 537 | { |
| @@ -585,8 +574,7 @@ lock_if_free (clasher, lfname) | |||
| 585 | take away the lock, or return nil meaning ignore the lock. */ | 574 | take away the lock, or return nil meaning ignore the lock. */ |
| 586 | 575 | ||
| 587 | void | 576 | void |
| 588 | lock_file (fn) | 577 | lock_file (Lisp_Object fn) |
| 589 | Lisp_Object fn; | ||
| 590 | { | 578 | { |
| 591 | register Lisp_Object attack, orig_fn, encoded_fn; | 579 | register Lisp_Object attack, orig_fn, encoded_fn; |
| 592 | register char *lfname, *locker; | 580 | register char *lfname, *locker; |
| @@ -645,8 +633,7 @@ lock_file (fn) | |||
| 645 | } | 633 | } |
| 646 | 634 | ||
| 647 | void | 635 | void |
| 648 | unlock_file (fn) | 636 | unlock_file (register Lisp_Object fn) |
| 649 | register Lisp_Object fn; | ||
| 650 | { | 637 | { |
| 651 | register char *lfname; | 638 | register char *lfname; |
| 652 | 639 | ||
| @@ -660,7 +647,7 @@ unlock_file (fn) | |||
| 660 | } | 647 | } |
| 661 | 648 | ||
| 662 | void | 649 | void |
| 663 | unlock_all_files () | 650 | unlock_all_files (void) |
| 664 | { | 651 | { |
| 665 | register Lisp_Object tail; | 652 | register Lisp_Object tail; |
| 666 | register struct buffer *b; | 653 | register struct buffer *b; |
| @@ -709,8 +696,7 @@ should not be locked in that case. */) | |||
| 709 | /* Unlock the file visited in buffer BUFFER. */ | 696 | /* Unlock the file visited in buffer BUFFER. */ |
| 710 | 697 | ||
| 711 | void | 698 | void |
| 712 | unlock_buffer (buffer) | 699 | unlock_buffer (struct buffer *buffer) |
| 713 | struct buffer *buffer; | ||
| 714 | { | 700 | { |
| 715 | if (BUF_SAVE_MODIFF (buffer) < BUF_MODIFF (buffer) | 701 | if (BUF_SAVE_MODIFF (buffer) < BUF_MODIFF (buffer) |
| 716 | && STRINGP (buffer->file_truename)) | 702 | && STRINGP (buffer->file_truename)) |
| @@ -750,14 +736,14 @@ t if it is locked by you, else a string saying which user has locked it. */) | |||
| 750 | /* Initialization functions. */ | 736 | /* Initialization functions. */ |
| 751 | 737 | ||
| 752 | void | 738 | void |
| 753 | init_filelock () | 739 | init_filelock (void) |
| 754 | { | 740 | { |
| 755 | boot_time = 0; | 741 | boot_time = 0; |
| 756 | boot_time_initialized = 0; | 742 | boot_time_initialized = 0; |
| 757 | } | 743 | } |
| 758 | 744 | ||
| 759 | void | 745 | void |
| 760 | syms_of_filelock () | 746 | syms_of_filelock (void) |
| 761 | { | 747 | { |
| 762 | DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory, | 748 | DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory, |
| 763 | doc: /* The directory for writing temporary files. */); | 749 | doc: /* The directory for writing temporary files. */); |
diff --git a/src/filemode.c b/src/filemode.c index 4a11d2a3115..c3a5a924a93 100644 --- a/src/filemode.c +++ b/src/filemode.c | |||
| @@ -90,10 +90,10 @@ | |||
| 90 | #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) | 90 | #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) |
| 91 | #endif | 91 | #endif |
| 92 | 92 | ||
| 93 | void mode_string (); | 93 | void mode_string (short unsigned int mode, char *str); |
| 94 | static char ftypelet (); | 94 | static char ftypelet (long int bits); |
| 95 | static void rwx (); | 95 | static void rwx (short unsigned int bits, char *chars); |
| 96 | static void setst (); | 96 | static void setst (short unsigned int bits, char *chars); |
| 97 | 97 | ||
| 98 | /* filemodestring - fill in string STR with an ls-style ASCII | 98 | /* filemodestring - fill in string STR with an ls-style ASCII |
| 99 | representation of the st_mode field of file stats block STATP. | 99 | representation of the st_mode field of file stats block STATP. |
| @@ -132,9 +132,7 @@ static void setst (); | |||
| 132 | 'T' if the file is sticky but not executable. */ | 132 | 'T' if the file is sticky but not executable. */ |
| 133 | 133 | ||
| 134 | void | 134 | void |
| 135 | filemodestring (statp, str) | 135 | filemodestring (struct stat *statp, char *str) |
| 136 | struct stat *statp; | ||
| 137 | char *str; | ||
| 138 | { | 136 | { |
| 139 | mode_string (statp->st_mode, str); | 137 | mode_string (statp->st_mode, str); |
| 140 | } | 138 | } |
| @@ -143,9 +141,7 @@ filemodestring (statp, str) | |||
| 143 | is given as an argument. */ | 141 | is given as an argument. */ |
| 144 | 142 | ||
| 145 | void | 143 | void |
| 146 | mode_string (mode, str) | 144 | mode_string (short unsigned int mode, char *str) |
| 147 | unsigned short mode; | ||
| 148 | char *str; | ||
| 149 | { | 145 | { |
| 150 | str[0] = ftypelet ((long) mode); | 146 | str[0] = ftypelet ((long) mode); |
| 151 | rwx ((mode & 0700) << 0, &str[1]); | 147 | rwx ((mode & 0700) << 0, &str[1]); |
| @@ -167,8 +163,7 @@ mode_string (mode, str) | |||
| 167 | '?' for any other file type. */ | 163 | '?' for any other file type. */ |
| 168 | 164 | ||
| 169 | static char | 165 | static char |
| 170 | ftypelet (bits) | 166 | ftypelet (long int bits) |
| 171 | long bits; | ||
| 172 | { | 167 | { |
| 173 | #ifdef S_ISBLK | 168 | #ifdef S_ISBLK |
| 174 | if (S_ISBLK (bits)) | 169 | if (S_ISBLK (bits)) |
| @@ -207,9 +202,7 @@ ftypelet (bits) | |||
| 207 | flags in CHARS accordingly. */ | 202 | flags in CHARS accordingly. */ |
| 208 | 203 | ||
| 209 | static void | 204 | static void |
| 210 | rwx (bits, chars) | 205 | rwx (short unsigned int bits, char *chars) |
| 211 | unsigned short bits; | ||
| 212 | char *chars; | ||
| 213 | { | 206 | { |
| 214 | chars[0] = (bits & S_IRUSR) ? 'r' : '-'; | 207 | chars[0] = (bits & S_IRUSR) ? 'r' : '-'; |
| 215 | chars[1] = (bits & S_IWUSR) ? 'w' : '-'; | 208 | chars[1] = (bits & S_IWUSR) ? 'w' : '-'; |
| @@ -220,9 +213,7 @@ rwx (bits, chars) | |||
| 220 | according to the file mode BITS. */ | 213 | according to the file mode BITS. */ |
| 221 | 214 | ||
| 222 | static void | 215 | static void |
| 223 | setst (bits, chars) | 216 | setst (short unsigned int bits, char *chars) |
| 224 | unsigned short bits; | ||
| 225 | char *chars; | ||
| 226 | { | 217 | { |
| 227 | #ifdef S_ISUID | 218 | #ifdef S_ISUID |
| 228 | if (bits & S_ISUID) | 219 | if (bits & S_ISUID) |
| @@ -76,7 +76,7 @@ extern Lisp_Object Qinput_method_function; | |||
| 76 | 76 | ||
| 77 | static int internal_equal (Lisp_Object , Lisp_Object, int, int); | 77 | static int internal_equal (Lisp_Object , Lisp_Object, int, int); |
| 78 | 78 | ||
| 79 | extern long get_random (); | 79 | extern long get_random (void); |
| 80 | extern void seed_random (long); | 80 | extern void seed_random (long); |
| 81 | 81 | ||
| 82 | #ifndef HAVE_UNISTD_H | 82 | #ifndef HAVE_UNISTD_H |
| @@ -390,8 +390,7 @@ static Lisp_Object concat (int nargs, Lisp_Object *args, enum Lisp_Type target_t | |||
| 390 | 390 | ||
| 391 | /* ARGSUSED */ | 391 | /* ARGSUSED */ |
| 392 | Lisp_Object | 392 | Lisp_Object |
| 393 | concat2 (s1, s2) | 393 | concat2 (Lisp_Object s1, Lisp_Object s2) |
| 394 | Lisp_Object s1, s2; | ||
| 395 | { | 394 | { |
| 396 | Lisp_Object args[2]; | 395 | Lisp_Object args[2]; |
| 397 | args[0] = s1; | 396 | args[0] = s1; |
| @@ -401,8 +400,7 @@ concat2 (s1, s2) | |||
| 401 | 400 | ||
| 402 | /* ARGSUSED */ | 401 | /* ARGSUSED */ |
| 403 | Lisp_Object | 402 | Lisp_Object |
| 404 | concat3 (s1, s2, s3) | 403 | concat3 (Lisp_Object s1, Lisp_Object s2, Lisp_Object s3) |
| 405 | Lisp_Object s1, s2, s3; | ||
| 406 | { | 404 | { |
| 407 | Lisp_Object args[3]; | 405 | Lisp_Object args[3]; |
| 408 | args[0] = s1; | 406 | args[0] = s1; |
| @@ -492,11 +490,7 @@ struct textprop_rec | |||
| 492 | }; | 490 | }; |
| 493 | 491 | ||
| 494 | static Lisp_Object | 492 | static Lisp_Object |
| 495 | concat (nargs, args, target_type, last_special) | 493 | concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special) |
| 496 | int nargs; | ||
| 497 | Lisp_Object *args; | ||
| 498 | enum Lisp_Type target_type; | ||
| 499 | int last_special; | ||
| 500 | { | 494 | { |
| 501 | Lisp_Object val; | 495 | Lisp_Object val; |
| 502 | register Lisp_Object tail; | 496 | register Lisp_Object tail; |
| @@ -777,7 +771,7 @@ static EMACS_INT string_char_byte_cache_charpos; | |||
| 777 | static EMACS_INT string_char_byte_cache_bytepos; | 771 | static EMACS_INT string_char_byte_cache_bytepos; |
| 778 | 772 | ||
| 779 | void | 773 | void |
| 780 | clear_string_char_byte_cache () | 774 | clear_string_char_byte_cache (void) |
| 781 | { | 775 | { |
| 782 | string_char_byte_cache_string = Qnil; | 776 | string_char_byte_cache_string = Qnil; |
| 783 | } | 777 | } |
| @@ -785,9 +779,7 @@ clear_string_char_byte_cache () | |||
| 785 | /* Return the byte index corresponding to CHAR_INDEX in STRING. */ | 779 | /* Return the byte index corresponding to CHAR_INDEX in STRING. */ |
| 786 | 780 | ||
| 787 | EMACS_INT | 781 | EMACS_INT |
| 788 | string_char_to_byte (string, char_index) | 782 | string_char_to_byte (Lisp_Object string, EMACS_INT char_index) |
| 789 | Lisp_Object string; | ||
| 790 | EMACS_INT char_index; | ||
| 791 | { | 783 | { |
| 792 | EMACS_INT i_byte; | 784 | EMACS_INT i_byte; |
| 793 | EMACS_INT best_below, best_below_byte; | 785 | EMACS_INT best_below, best_below_byte; |
| @@ -847,9 +839,7 @@ string_char_to_byte (string, char_index) | |||
| 847 | /* Return the character index corresponding to BYTE_INDEX in STRING. */ | 839 | /* Return the character index corresponding to BYTE_INDEX in STRING. */ |
| 848 | 840 | ||
| 849 | EMACS_INT | 841 | EMACS_INT |
| 850 | string_byte_to_char (string, byte_index) | 842 | string_byte_to_char (Lisp_Object string, EMACS_INT byte_index) |
| 851 | Lisp_Object string; | ||
| 852 | EMACS_INT byte_index; | ||
| 853 | { | 843 | { |
| 854 | EMACS_INT i, i_byte; | 844 | EMACS_INT i, i_byte; |
| 855 | EMACS_INT best_below, best_below_byte; | 845 | EMACS_INT best_below, best_below_byte; |
| @@ -913,8 +903,7 @@ string_byte_to_char (string, byte_index) | |||
| 913 | /* Convert STRING to a multibyte string. */ | 903 | /* Convert STRING to a multibyte string. */ |
| 914 | 904 | ||
| 915 | Lisp_Object | 905 | Lisp_Object |
| 916 | string_make_multibyte (string) | 906 | string_make_multibyte (Lisp_Object string) |
| 917 | Lisp_Object string; | ||
| 918 | { | 907 | { |
| 919 | unsigned char *buf; | 908 | unsigned char *buf; |
| 920 | EMACS_INT nbytes; | 909 | EMACS_INT nbytes; |
| @@ -947,8 +936,7 @@ string_make_multibyte (string) | |||
| 947 | converted to eight-bit characters. */ | 936 | converted to eight-bit characters. */ |
| 948 | 937 | ||
| 949 | Lisp_Object | 938 | Lisp_Object |
| 950 | string_to_multibyte (string) | 939 | string_to_multibyte (Lisp_Object string) |
| 951 | Lisp_Object string; | ||
| 952 | { | 940 | { |
| 953 | unsigned char *buf; | 941 | unsigned char *buf; |
| 954 | EMACS_INT nbytes; | 942 | EMACS_INT nbytes; |
| @@ -978,8 +966,7 @@ string_to_multibyte (string) | |||
| 978 | /* Convert STRING to a single-byte string. */ | 966 | /* Convert STRING to a single-byte string. */ |
| 979 | 967 | ||
| 980 | Lisp_Object | 968 | Lisp_Object |
| 981 | string_make_unibyte (string) | 969 | string_make_unibyte (Lisp_Object string) |
| 982 | Lisp_Object string; | ||
| 983 | { | 970 | { |
| 984 | int nchars; | 971 | int nchars; |
| 985 | unsigned char *buf; | 972 | unsigned char *buf; |
| @@ -1311,9 +1298,7 @@ With one argument, just copy STRING without its properties. */) | |||
| 1311 | both in characters and in bytes. */ | 1298 | both in characters and in bytes. */ |
| 1312 | 1299 | ||
| 1313 | Lisp_Object | 1300 | Lisp_Object |
| 1314 | substring_both (string, from, from_byte, to, to_byte) | 1301 | substring_both (Lisp_Object string, int from, int from_byte, int to, int to_byte) |
| 1315 | Lisp_Object string; | ||
| 1316 | int from, from_byte, to, to_byte; | ||
| 1317 | { | 1302 | { |
| 1318 | Lisp_Object res; | 1303 | Lisp_Object res; |
| 1319 | int size; | 1304 | int size; |
| @@ -1495,8 +1480,7 @@ Elements of LIST that are not conses are ignored. */) | |||
| 1495 | Use only on lists known never to be circular. */ | 1480 | Use only on lists known never to be circular. */ |
| 1496 | 1481 | ||
| 1497 | Lisp_Object | 1482 | Lisp_Object |
| 1498 | assq_no_quit (key, list) | 1483 | assq_no_quit (Lisp_Object key, Lisp_Object list) |
| 1499 | Lisp_Object key, list; | ||
| 1500 | { | 1484 | { |
| 1501 | while (CONSP (list) | 1485 | while (CONSP (list) |
| 1502 | && (!CONSP (XCAR (list)) | 1486 | && (!CONSP (XCAR (list)) |
| @@ -1547,8 +1531,7 @@ The value is actually the first element of LIST whose car equals KEY. */) | |||
| 1547 | Use only on lists known never to be circular. */ | 1531 | Use only on lists known never to be circular. */ |
| 1548 | 1532 | ||
| 1549 | Lisp_Object | 1533 | Lisp_Object |
| 1550 | assoc_no_quit (key, list) | 1534 | assoc_no_quit (Lisp_Object key, Lisp_Object list) |
| 1551 | Lisp_Object key, list; | ||
| 1552 | { | 1535 | { |
| 1553 | while (CONSP (list) | 1536 | while (CONSP (list) |
| 1554 | && (!CONSP (XCAR (list)) | 1537 | && (!CONSP (XCAR (list)) |
| @@ -1824,7 +1807,7 @@ See also the function `nreverse', which is used more often. */) | |||
| 1824 | return new; | 1807 | return new; |
| 1825 | } | 1808 | } |
| 1826 | 1809 | ||
| 1827 | Lisp_Object merge (); | 1810 | Lisp_Object merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred); |
| 1828 | 1811 | ||
| 1829 | DEFUN ("sort", Fsort, Ssort, 2, 2, 0, | 1812 | DEFUN ("sort", Fsort, Ssort, 2, 2, 0, |
| 1830 | doc: /* Sort LIST, stably, comparing elements using PREDICATE. | 1813 | doc: /* Sort LIST, stably, comparing elements using PREDICATE. |
| @@ -1858,9 +1841,7 @@ if the first element should sort before the second. */) | |||
| 1858 | } | 1841 | } |
| 1859 | 1842 | ||
| 1860 | Lisp_Object | 1843 | Lisp_Object |
| 1861 | merge (org_l1, org_l2, pred) | 1844 | merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred) |
| 1862 | Lisp_Object org_l1, org_l2; | ||
| 1863 | Lisp_Object pred; | ||
| 1864 | { | 1845 | { |
| 1865 | Lisp_Object value; | 1846 | Lisp_Object value; |
| 1866 | register Lisp_Object tail; | 1847 | register Lisp_Object tail; |
| @@ -2117,9 +2098,7 @@ of strings. (`equal' ignores text properties.) */) | |||
| 2117 | PROPS, if non-nil, means compare string text properties too. */ | 2098 | PROPS, if non-nil, means compare string text properties too. */ |
| 2118 | 2099 | ||
| 2119 | static int | 2100 | static int |
| 2120 | internal_equal (o1, o2, depth, props) | 2101 | internal_equal (register Lisp_Object o1, register Lisp_Object o2, int depth, int props) |
| 2121 | register Lisp_Object o1, o2; | ||
| 2122 | int depth, props; | ||
| 2123 | { | 2102 | { |
| 2124 | if (depth > 200) | 2103 | if (depth > 200) |
| 2125 | error ("Stack overflow in equal"); | 2104 | error ("Stack overflow in equal"); |
| @@ -2240,7 +2219,6 @@ internal_equal (o1, o2, depth, props) | |||
| 2240 | return 0; | 2219 | return 0; |
| 2241 | } | 2220 | } |
| 2242 | 2221 | ||
| 2243 | extern Lisp_Object Fmake_char_internal (); | ||
| 2244 | 2222 | ||
| 2245 | DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0, | 2223 | DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0, |
| 2246 | doc: /* Store each element of ARRAY with ITEM. | 2224 | doc: /* Store each element of ARRAY with ITEM. |
| @@ -2334,8 +2312,7 @@ This makes STRING unibyte and may change its length. */) | |||
| 2334 | 2312 | ||
| 2335 | /* ARGSUSED */ | 2313 | /* ARGSUSED */ |
| 2336 | Lisp_Object | 2314 | Lisp_Object |
| 2337 | nconc2 (s1, s2) | 2315 | nconc2 (Lisp_Object s1, Lisp_Object s2) |
| 2338 | Lisp_Object s1, s2; | ||
| 2339 | { | 2316 | { |
| 2340 | Lisp_Object args[2]; | 2317 | Lisp_Object args[2]; |
| 2341 | args[0] = s1; | 2318 | args[0] = s1; |
| @@ -2390,10 +2367,7 @@ usage: (nconc &rest LISTS) */) | |||
| 2390 | LENI is the length of VALS, which should also be the length of SEQ. */ | 2367 | LENI is the length of VALS, which should also be the length of SEQ. */ |
| 2391 | 2368 | ||
| 2392 | static void | 2369 | static void |
| 2393 | mapcar1 (leni, vals, fn, seq) | 2370 | mapcar1 (int leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) |
| 2394 | int leni; | ||
| 2395 | Lisp_Object *vals; | ||
| 2396 | Lisp_Object fn, seq; | ||
| 2397 | { | 2371 | { |
| 2398 | register Lisp_Object tail; | 2372 | register Lisp_Object tail; |
| 2399 | Lisp_Object dummy; | 2373 | Lisp_Object dummy; |
| @@ -2702,8 +2676,7 @@ is nil and `use-dialog-box' is non-nil. */) | |||
| 2702 | Anything that calls this function must protect from GC! */ | 2676 | Anything that calls this function must protect from GC! */ |
| 2703 | 2677 | ||
| 2704 | Lisp_Object | 2678 | Lisp_Object |
| 2705 | do_yes_or_no_p (prompt) | 2679 | do_yes_or_no_p (Lisp_Object prompt) |
| 2706 | Lisp_Object prompt; | ||
| 2707 | { | 2680 | { |
| 2708 | return call1 (intern ("yes-or-no-p"), prompt); | 2681 | return call1 (intern ("yes-or-no-p"), prompt); |
| 2709 | } | 2682 | } |
| @@ -2870,8 +2843,7 @@ particular subfeatures supported in this version of FEATURE. */) | |||
| 2870 | Lisp_Object require_nesting_list; | 2843 | Lisp_Object require_nesting_list; |
| 2871 | 2844 | ||
| 2872 | Lisp_Object | 2845 | Lisp_Object |
| 2873 | require_unwind (old_value) | 2846 | require_unwind (Lisp_Object old_value) |
| 2874 | Lisp_Object old_value; | ||
| 2875 | { | 2847 | { |
| 2876 | return require_nesting_list = old_value; | 2848 | return require_nesting_list = old_value; |
| 2877 | } | 2849 | } |
| @@ -3333,12 +3305,7 @@ into shorter lines. */) | |||
| 3333 | } | 3305 | } |
| 3334 | 3306 | ||
| 3335 | static int | 3307 | static int |
| 3336 | base64_encode_1 (from, to, length, line_break, multibyte) | 3308 | base64_encode_1 (const char *from, char *to, int length, int line_break, int multibyte) |
| 3337 | const char *from; | ||
| 3338 | char *to; | ||
| 3339 | int length; | ||
| 3340 | int line_break; | ||
| 3341 | int multibyte; | ||
| 3342 | { | 3309 | { |
| 3343 | int counter = 0, i = 0; | 3310 | int counter = 0, i = 0; |
| 3344 | char *e = to; | 3311 | char *e = to; |
| @@ -3535,12 +3502,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string, | |||
| 3535 | characters in *NCHARS_RETURN. */ | 3502 | characters in *NCHARS_RETURN. */ |
| 3536 | 3503 | ||
| 3537 | static int | 3504 | static int |
| 3538 | base64_decode_1 (from, to, length, multibyte, nchars_return) | 3505 | base64_decode_1 (const char *from, char *to, int length, int multibyte, int *nchars_return) |
| 3539 | const char *from; | ||
| 3540 | char *to; | ||
| 3541 | int length; | ||
| 3542 | int multibyte; | ||
| 3543 | int *nchars_return; | ||
| 3544 | { | 3506 | { |
| 3545 | int i = 0; | 3507 | int i = 0; |
| 3546 | char *e = to; | 3508 | char *e = to; |
| @@ -3682,8 +3644,7 @@ static int sweep_weak_table (struct Lisp_Hash_Table *, int); | |||
| 3682 | Lisp_Hash_Table. Otherwise, signal an error. */ | 3644 | Lisp_Hash_Table. Otherwise, signal an error. */ |
| 3683 | 3645 | ||
| 3684 | static struct Lisp_Hash_Table * | 3646 | static struct Lisp_Hash_Table * |
| 3685 | check_hash_table (obj) | 3647 | check_hash_table (Lisp_Object obj) |
| 3686 | Lisp_Object obj; | ||
| 3687 | { | 3648 | { |
| 3688 | CHECK_HASH_TABLE (obj); | 3649 | CHECK_HASH_TABLE (obj); |
| 3689 | return XHASH_TABLE (obj); | 3650 | return XHASH_TABLE (obj); |
| @@ -3694,8 +3655,7 @@ check_hash_table (obj) | |||
| 3694 | number. */ | 3655 | number. */ |
| 3695 | 3656 | ||
| 3696 | int | 3657 | int |
| 3697 | next_almost_prime (n) | 3658 | next_almost_prime (int n) |
| 3698 | int n; | ||
| 3699 | { | 3659 | { |
| 3700 | if (n % 2 == 0) | 3660 | if (n % 2 == 0) |
| 3701 | n += 1; | 3661 | n += 1; |
| @@ -3714,11 +3674,7 @@ next_almost_prime (n) | |||
| 3714 | a DEFUN parameter list. */ | 3674 | a DEFUN parameter list. */ |
| 3715 | 3675 | ||
| 3716 | static int | 3676 | static int |
| 3717 | get_key_arg (key, nargs, args, used) | 3677 | get_key_arg (Lisp_Object key, int nargs, Lisp_Object *args, char *used) |
| 3718 | Lisp_Object key; | ||
| 3719 | int nargs; | ||
| 3720 | Lisp_Object *args; | ||
| 3721 | char *used; | ||
| 3722 | { | 3678 | { |
| 3723 | int i; | 3679 | int i; |
| 3724 | 3680 | ||
| @@ -3743,10 +3699,7 @@ get_key_arg (key, nargs, args, used) | |||
| 3743 | vector that are not copied from VEC are set to INIT. */ | 3699 | vector that are not copied from VEC are set to INIT. */ |
| 3744 | 3700 | ||
| 3745 | Lisp_Object | 3701 | Lisp_Object |
| 3746 | larger_vector (vec, new_size, init) | 3702 | larger_vector (Lisp_Object vec, int new_size, Lisp_Object init) |
| 3747 | Lisp_Object vec; | ||
| 3748 | int new_size; | ||
| 3749 | Lisp_Object init; | ||
| 3750 | { | 3703 | { |
| 3751 | struct Lisp_Vector *v; | 3704 | struct Lisp_Vector *v; |
| 3752 | int i, old_size; | 3705 | int i, old_size; |
| @@ -3774,10 +3727,7 @@ larger_vector (vec, new_size, init) | |||
| 3774 | KEY2 are the same. */ | 3727 | KEY2 are the same. */ |
| 3775 | 3728 | ||
| 3776 | static int | 3729 | static int |
| 3777 | cmpfn_eql (h, key1, hash1, key2, hash2) | 3730 | cmpfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2) |
| 3778 | struct Lisp_Hash_Table *h; | ||
| 3779 | Lisp_Object key1, key2; | ||
| 3780 | unsigned hash1, hash2; | ||
| 3781 | { | 3731 | { |
| 3782 | return (FLOATP (key1) | 3732 | return (FLOATP (key1) |
| 3783 | && FLOATP (key2) | 3733 | && FLOATP (key2) |
| @@ -3790,10 +3740,7 @@ cmpfn_eql (h, key1, hash1, key2, hash2) | |||
| 3790 | KEY2 are the same. */ | 3740 | KEY2 are the same. */ |
| 3791 | 3741 | ||
| 3792 | static int | 3742 | static int |
| 3793 | cmpfn_equal (h, key1, hash1, key2, hash2) | 3743 | cmpfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2) |
| 3794 | struct Lisp_Hash_Table *h; | ||
| 3795 | Lisp_Object key1, key2; | ||
| 3796 | unsigned hash1, hash2; | ||
| 3797 | { | 3744 | { |
| 3798 | return hash1 == hash2 && !NILP (Fequal (key1, key2)); | 3745 | return hash1 == hash2 && !NILP (Fequal (key1, key2)); |
| 3799 | } | 3746 | } |
| @@ -3804,10 +3751,7 @@ cmpfn_equal (h, key1, hash1, key2, hash2) | |||
| 3804 | if KEY1 and KEY2 are the same. */ | 3751 | if KEY1 and KEY2 are the same. */ |
| 3805 | 3752 | ||
| 3806 | static int | 3753 | static int |
| 3807 | cmpfn_user_defined (h, key1, hash1, key2, hash2) | 3754 | cmpfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2) |
| 3808 | struct Lisp_Hash_Table *h; | ||
| 3809 | Lisp_Object key1, key2; | ||
| 3810 | unsigned hash1, hash2; | ||
| 3811 | { | 3755 | { |
| 3812 | if (hash1 == hash2) | 3756 | if (hash1 == hash2) |
| 3813 | { | 3757 | { |
| @@ -3828,9 +3772,7 @@ cmpfn_user_defined (h, key1, hash1, key2, hash2) | |||
| 3828 | in a Lisp integer. */ | 3772 | in a Lisp integer. */ |
| 3829 | 3773 | ||
| 3830 | static unsigned | 3774 | static unsigned |
| 3831 | hashfn_eq (h, key) | 3775 | hashfn_eq (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 3832 | struct Lisp_Hash_Table *h; | ||
| 3833 | Lisp_Object key; | ||
| 3834 | { | 3776 | { |
| 3835 | unsigned hash = XUINT (key) ^ XTYPE (key); | 3777 | unsigned hash = XUINT (key) ^ XTYPE (key); |
| 3836 | xassert ((hash & ~INTMASK) == 0); | 3778 | xassert ((hash & ~INTMASK) == 0); |
| @@ -3843,9 +3785,7 @@ hashfn_eq (h, key) | |||
| 3843 | in a Lisp integer. */ | 3785 | in a Lisp integer. */ |
| 3844 | 3786 | ||
| 3845 | static unsigned | 3787 | static unsigned |
| 3846 | hashfn_eql (h, key) | 3788 | hashfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 3847 | struct Lisp_Hash_Table *h; | ||
| 3848 | Lisp_Object key; | ||
| 3849 | { | 3789 | { |
| 3850 | unsigned hash; | 3790 | unsigned hash; |
| 3851 | if (FLOATP (key)) | 3791 | if (FLOATP (key)) |
| @@ -3862,9 +3802,7 @@ hashfn_eql (h, key) | |||
| 3862 | in a Lisp integer. */ | 3802 | in a Lisp integer. */ |
| 3863 | 3803 | ||
| 3864 | static unsigned | 3804 | static unsigned |
| 3865 | hashfn_equal (h, key) | 3805 | hashfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 3866 | struct Lisp_Hash_Table *h; | ||
| 3867 | Lisp_Object key; | ||
| 3868 | { | 3806 | { |
| 3869 | unsigned hash = sxhash (key, 0); | 3807 | unsigned hash = sxhash (key, 0); |
| 3870 | xassert ((hash & ~INTMASK) == 0); | 3808 | xassert ((hash & ~INTMASK) == 0); |
| @@ -3877,9 +3815,7 @@ hashfn_equal (h, key) | |||
| 3877 | guaranteed to fit in a Lisp integer. */ | 3815 | guaranteed to fit in a Lisp integer. */ |
| 3878 | 3816 | ||
| 3879 | static unsigned | 3817 | static unsigned |
| 3880 | hashfn_user_defined (h, key) | 3818 | hashfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 3881 | struct Lisp_Hash_Table *h; | ||
| 3882 | Lisp_Object key; | ||
| 3883 | { | 3819 | { |
| 3884 | Lisp_Object args[2], hash; | 3820 | Lisp_Object args[2], hash; |
| 3885 | 3821 | ||
| @@ -4003,8 +3939,7 @@ make_hash_table (test, size, rehash_size, rehash_threshold, weak, | |||
| 4003 | only the table itself is. */ | 3939 | only the table itself is. */ |
| 4004 | 3940 | ||
| 4005 | Lisp_Object | 3941 | Lisp_Object |
| 4006 | copy_hash_table (h1) | 3942 | copy_hash_table (struct Lisp_Hash_Table *h1) |
| 4007 | struct Lisp_Hash_Table *h1; | ||
| 4008 | { | 3943 | { |
| 4009 | Lisp_Object table; | 3944 | Lisp_Object table; |
| 4010 | struct Lisp_Hash_Table *h2; | 3945 | struct Lisp_Hash_Table *h2; |
| @@ -4035,8 +3970,7 @@ copy_hash_table (h1) | |||
| 4035 | because it's already too large, throw an error. */ | 3970 | because it's already too large, throw an error. */ |
| 4036 | 3971 | ||
| 4037 | static INLINE void | 3972 | static INLINE void |
| 4038 | maybe_resize_hash_table (h) | 3973 | maybe_resize_hash_table (struct Lisp_Hash_Table *h) |
| 4039 | struct Lisp_Hash_Table *h; | ||
| 4040 | { | 3974 | { |
| 4041 | if (NILP (h->next_free)) | 3975 | if (NILP (h->next_free)) |
| 4042 | { | 3976 | { |
| @@ -4101,10 +4035,7 @@ maybe_resize_hash_table (h) | |||
| 4101 | matching KEY, or -1 if not found. */ | 4035 | matching KEY, or -1 if not found. */ |
| 4102 | 4036 | ||
| 4103 | int | 4037 | int |
| 4104 | hash_lookup (h, key, hash) | 4038 | hash_lookup (struct Lisp_Hash_Table *h, Lisp_Object key, unsigned int *hash) |
| 4105 | struct Lisp_Hash_Table *h; | ||
| 4106 | Lisp_Object key; | ||
| 4107 | unsigned *hash; | ||
| 4108 | { | 4039 | { |
| 4109 | unsigned hash_code; | 4040 | unsigned hash_code; |
| 4110 | int start_of_bucket; | 4041 | int start_of_bucket; |
| @@ -4138,10 +4069,7 @@ hash_lookup (h, key, hash) | |||
| 4138 | Value is the index of the entry in H matching KEY. */ | 4069 | Value is the index of the entry in H matching KEY. */ |
| 4139 | 4070 | ||
| 4140 | int | 4071 | int |
| 4141 | hash_put (h, key, value, hash) | 4072 | hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value, unsigned int hash) |
| 4142 | struct Lisp_Hash_Table *h; | ||
| 4143 | Lisp_Object key, value; | ||
| 4144 | unsigned hash; | ||
| 4145 | { | 4073 | { |
| 4146 | int start_of_bucket, i; | 4074 | int start_of_bucket, i; |
| 4147 | 4075 | ||
| @@ -4171,9 +4099,7 @@ hash_put (h, key, value, hash) | |||
| 4171 | /* Remove the entry matching KEY from hash table H, if there is one. */ | 4099 | /* Remove the entry matching KEY from hash table H, if there is one. */ |
| 4172 | 4100 | ||
| 4173 | static void | 4101 | static void |
| 4174 | hash_remove_from_table (h, key) | 4102 | hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 4175 | struct Lisp_Hash_Table *h; | ||
| 4176 | Lisp_Object key; | ||
| 4177 | { | 4103 | { |
| 4178 | unsigned hash_code; | 4104 | unsigned hash_code; |
| 4179 | int start_of_bucket; | 4105 | int start_of_bucket; |
| @@ -4221,8 +4147,7 @@ hash_remove_from_table (h, key) | |||
| 4221 | /* Clear hash table H. */ | 4147 | /* Clear hash table H. */ |
| 4222 | 4148 | ||
| 4223 | void | 4149 | void |
| 4224 | hash_clear (h) | 4150 | hash_clear (struct Lisp_Hash_Table *h) |
| 4225 | struct Lisp_Hash_Table *h; | ||
| 4226 | { | 4151 | { |
| 4227 | if (h->count > 0) | 4152 | if (h->count > 0) |
| 4228 | { | 4153 | { |
| @@ -4251,7 +4176,7 @@ hash_clear (h) | |||
| 4251 | ************************************************************************/ | 4176 | ************************************************************************/ |
| 4252 | 4177 | ||
| 4253 | void | 4178 | void |
| 4254 | init_weak_hash_tables () | 4179 | init_weak_hash_tables (void) |
| 4255 | { | 4180 | { |
| 4256 | weak_hash_tables = NULL; | 4181 | weak_hash_tables = NULL; |
| 4257 | } | 4182 | } |
| @@ -4262,9 +4187,7 @@ init_weak_hash_tables () | |||
| 4262 | non-zero if anything was marked. */ | 4187 | non-zero if anything was marked. */ |
| 4263 | 4188 | ||
| 4264 | static int | 4189 | static int |
| 4265 | sweep_weak_table (h, remove_entries_p) | 4190 | sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p) |
| 4266 | struct Lisp_Hash_Table *h; | ||
| 4267 | int remove_entries_p; | ||
| 4268 | { | 4191 | { |
| 4269 | int bucket, n, marked; | 4192 | int bucket, n, marked; |
| 4270 | 4193 | ||
| @@ -4352,7 +4275,7 @@ sweep_weak_table (h, remove_entries_p) | |||
| 4352 | from Vweak_hash_tables. Called from gc_sweep. */ | 4275 | from Vweak_hash_tables. Called from gc_sweep. */ |
| 4353 | 4276 | ||
| 4354 | void | 4277 | void |
| 4355 | sweep_weak_hash_tables () | 4278 | sweep_weak_hash_tables (void) |
| 4356 | { | 4279 | { |
| 4357 | struct Lisp_Hash_Table *h, *used, *next; | 4280 | struct Lisp_Hash_Table *h, *used, *next; |
| 4358 | int marked; | 4281 | int marked; |
| @@ -4420,9 +4343,7 @@ sweep_weak_hash_tables () | |||
| 4420 | code returned is guaranteed to fit in a Lisp integer. */ | 4343 | code returned is guaranteed to fit in a Lisp integer. */ |
| 4421 | 4344 | ||
| 4422 | static unsigned | 4345 | static unsigned |
| 4423 | sxhash_string (ptr, len) | 4346 | sxhash_string (unsigned char *ptr, int len) |
| 4424 | unsigned char *ptr; | ||
| 4425 | int len; | ||
| 4426 | { | 4347 | { |
| 4427 | unsigned char *p = ptr; | 4348 | unsigned char *p = ptr; |
| 4428 | unsigned char *end = p + len; | 4349 | unsigned char *end = p + len; |
| @@ -4445,9 +4366,7 @@ sxhash_string (ptr, len) | |||
| 4445 | list. We don't recurse deeper than SXHASH_MAX_DEPTH in it. */ | 4366 | list. We don't recurse deeper than SXHASH_MAX_DEPTH in it. */ |
| 4446 | 4367 | ||
| 4447 | static unsigned | 4368 | static unsigned |
| 4448 | sxhash_list (list, depth) | 4369 | sxhash_list (Lisp_Object list, int depth) |
| 4449 | Lisp_Object list; | ||
| 4450 | int depth; | ||
| 4451 | { | 4370 | { |
| 4452 | unsigned hash = 0; | 4371 | unsigned hash = 0; |
| 4453 | int i; | 4372 | int i; |
| @@ -4475,9 +4394,7 @@ sxhash_list (list, depth) | |||
| 4475 | the Lisp structure. */ | 4394 | the Lisp structure. */ |
| 4476 | 4395 | ||
| 4477 | static unsigned | 4396 | static unsigned |
| 4478 | sxhash_vector (vec, depth) | 4397 | sxhash_vector (Lisp_Object vec, int depth) |
| 4479 | Lisp_Object vec; | ||
| 4480 | int depth; | ||
| 4481 | { | 4398 | { |
| 4482 | unsigned hash = ASIZE (vec); | 4399 | unsigned hash = ASIZE (vec); |
| 4483 | int i, n; | 4400 | int i, n; |
| @@ -4496,8 +4413,7 @@ sxhash_vector (vec, depth) | |||
| 4496 | /* Return a hash for bool-vector VECTOR. */ | 4413 | /* Return a hash for bool-vector VECTOR. */ |
| 4497 | 4414 | ||
| 4498 | static unsigned | 4415 | static unsigned |
| 4499 | sxhash_bool_vector (vec) | 4416 | sxhash_bool_vector (Lisp_Object vec) |
| 4500 | Lisp_Object vec; | ||
| 4501 | { | 4417 | { |
| 4502 | unsigned hash = XBOOL_VECTOR (vec)->size; | 4418 | unsigned hash = XBOOL_VECTOR (vec)->size; |
| 4503 | int i, n; | 4419 | int i, n; |
| @@ -4514,9 +4430,7 @@ sxhash_bool_vector (vec) | |||
| 4514 | structure. Value is an unsigned integer clipped to INTMASK. */ | 4430 | structure. Value is an unsigned integer clipped to INTMASK. */ |
| 4515 | 4431 | ||
| 4516 | unsigned | 4432 | unsigned |
| 4517 | sxhash (obj, depth) | 4433 | sxhash (Lisp_Object obj, int depth) |
| 4518 | Lisp_Object obj; | ||
| 4519 | int depth; | ||
| 4520 | { | 4434 | { |
| 4521 | unsigned hash; | 4435 | unsigned hash; |
| 4522 | 4436 | ||
| @@ -5110,7 +5024,7 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5110 | 5024 | ||
| 5111 | 5025 | ||
| 5112 | void | 5026 | void |
| 5113 | syms_of_fns () | 5027 | syms_of_fns (void) |
| 5114 | { | 5028 | { |
| 5115 | /* Hash table stuff. */ | 5029 | /* Hash table stuff. */ |
| 5116 | Qhash_table_p = intern_c_string ("hash-table-p"); | 5030 | Qhash_table_p = intern_c_string ("hash-table-p"); |
| @@ -5286,7 +5200,7 @@ this variable. */); | |||
| 5286 | 5200 | ||
| 5287 | 5201 | ||
| 5288 | void | 5202 | void |
| 5289 | init_fns () | 5203 | init_fns (void) |
| 5290 | { | 5204 | { |
| 5291 | } | 5205 | } |
| 5292 | 5206 | ||
diff --git a/src/font.c b/src/font.c index b92b44a38bc..a1b38eaabe5 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -175,7 +175,7 @@ static struct font_driver_list *font_driver_list; | |||
| 175 | /* Creaters of font-related Lisp object. */ | 175 | /* Creaters of font-related Lisp object. */ |
| 176 | 176 | ||
| 177 | Lisp_Object | 177 | Lisp_Object |
| 178 | font_make_spec () | 178 | font_make_spec (void) |
| 179 | { | 179 | { |
| 180 | Lisp_Object font_spec; | 180 | Lisp_Object font_spec; |
| 181 | struct font_spec *spec | 181 | struct font_spec *spec |
| @@ -187,7 +187,7 @@ font_make_spec () | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | Lisp_Object | 189 | Lisp_Object |
| 190 | font_make_entity () | 190 | font_make_entity (void) |
| 191 | { | 191 | { |
| 192 | Lisp_Object font_entity; | 192 | Lisp_Object font_entity; |
| 193 | struct font_entity *entity | 193 | struct font_entity *entity |
| @@ -202,10 +202,7 @@ font_make_entity () | |||
| 202 | not nil, copy properties from ENTITY to the font-object. If | 202 | not nil, copy properties from ENTITY to the font-object. If |
| 203 | PIXELSIZE is positive, set the `size' property to PIXELSIZE. */ | 203 | PIXELSIZE is positive, set the `size' property to PIXELSIZE. */ |
| 204 | Lisp_Object | 204 | Lisp_Object |
| 205 | font_make_object (size, entity, pixelsize) | 205 | font_make_object (int size, Lisp_Object entity, int pixelsize) |
| 206 | int size; | ||
| 207 | Lisp_Object entity; | ||
| 208 | int pixelsize; | ||
| 209 | { | 206 | { |
| 210 | Lisp_Object font_object; | 207 | Lisp_Object font_object; |
| 211 | struct font *font | 208 | struct font *font |
| @@ -245,10 +242,7 @@ static int num_font_drivers; | |||
| 245 | STR. */ | 242 | STR. */ |
| 246 | 243 | ||
| 247 | Lisp_Object | 244 | Lisp_Object |
| 248 | font_intern_prop (str, len, force_symbol) | 245 | font_intern_prop (char *str, int len, int force_symbol) |
| 249 | char *str; | ||
| 250 | int len; | ||
| 251 | int force_symbol; | ||
| 252 | { | 246 | { |
| 253 | int i; | 247 | int i; |
| 254 | Lisp_Object tem; | 248 | Lisp_Object tem; |
| @@ -290,9 +284,7 @@ font_intern_prop (str, len, force_symbol) | |||
| 290 | /* Return a pixel size of font-spec SPEC on frame F. */ | 284 | /* Return a pixel size of font-spec SPEC on frame F. */ |
| 291 | 285 | ||
| 292 | static int | 286 | static int |
| 293 | font_pixel_size (f, spec) | 287 | font_pixel_size (FRAME_PTR f, Lisp_Object spec) |
| 294 | FRAME_PTR f; | ||
| 295 | Lisp_Object spec; | ||
| 296 | { | 288 | { |
| 297 | #ifdef HAVE_WINDOW_SYSTEM | 289 | #ifdef HAVE_WINDOW_SYSTEM |
| 298 | Lisp_Object size = AREF (spec, FONT_SIZE_INDEX); | 290 | Lisp_Object size = AREF (spec, FONT_SIZE_INDEX); |
| @@ -327,10 +319,7 @@ font_pixel_size (f, spec) | |||
| 327 | VAL is an integer. */ | 319 | VAL is an integer. */ |
| 328 | 320 | ||
| 329 | int | 321 | int |
| 330 | font_style_to_value (prop, val, noerror) | 322 | font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror) |
| 331 | enum font_property_index prop; | ||
| 332 | Lisp_Object val; | ||
| 333 | int noerror; | ||
| 334 | { | 323 | { |
| 335 | Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); | 324 | Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); |
| 336 | int len = ASIZE (table); | 325 | int len = ASIZE (table); |
| @@ -395,10 +384,7 @@ font_style_to_value (prop, val, noerror) | |||
| 395 | } | 384 | } |
| 396 | 385 | ||
| 397 | Lisp_Object | 386 | Lisp_Object |
| 398 | font_style_symbolic (font, prop, for_face) | 387 | font_style_symbolic (Lisp_Object font, enum font_property_index prop, int for_face) |
| 399 | Lisp_Object font; | ||
| 400 | enum font_property_index prop; | ||
| 401 | int for_face; | ||
| 402 | { | 388 | { |
| 403 | Lisp_Object val = AREF (font, prop); | 389 | Lisp_Object val = AREF (font, prop); |
| 404 | Lisp_Object table, elt; | 390 | Lisp_Object table, elt; |
| @@ -424,8 +410,7 @@ extern Lisp_Object find_font_encoding (Lisp_Object); | |||
| 424 | of the font. REPERTORY is a charset symbol or nil. */ | 410 | of the font. REPERTORY is a charset symbol or nil. */ |
| 425 | 411 | ||
| 426 | Lisp_Object | 412 | Lisp_Object |
| 427 | find_font_encoding (fontname) | 413 | find_font_encoding (Lisp_Object fontname) |
| 428 | Lisp_Object fontname; | ||
| 429 | { | 414 | { |
| 430 | Lisp_Object tail, elt; | 415 | Lisp_Object tail, elt; |
| 431 | 416 | ||
| @@ -448,9 +433,7 @@ find_font_encoding (fontname) | |||
| 448 | REGISTRY is available, return 0. Otherwise return -1. */ | 433 | REGISTRY is available, return 0. Otherwise return -1. */ |
| 449 | 434 | ||
| 450 | int | 435 | int |
| 451 | font_registry_charsets (registry, encoding, repertory) | 436 | font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct charset **repertory) |
| 452 | Lisp_Object registry; | ||
| 453 | struct charset **encoding, **repertory; | ||
| 454 | { | 437 | { |
| 455 | Lisp_Object val; | 438 | Lisp_Object val; |
| 456 | int encoding_id, repertory_id; | 439 | int encoding_id, repertory_id; |
| @@ -516,8 +499,7 @@ static Lisp_Object font_prop_validate_spacing (Lisp_Object, Lisp_Object); | |||
| 516 | static int get_font_prop_index (Lisp_Object); | 499 | static int get_font_prop_index (Lisp_Object); |
| 517 | 500 | ||
| 518 | static Lisp_Object | 501 | static Lisp_Object |
| 519 | font_prop_validate_symbol (prop, val) | 502 | font_prop_validate_symbol (Lisp_Object prop, Lisp_Object val) |
| 520 | Lisp_Object prop, val; | ||
| 521 | { | 503 | { |
| 522 | if (STRINGP (val)) | 504 | if (STRINGP (val)) |
| 523 | val = Fintern (val, Qnil); | 505 | val = Fintern (val, Qnil); |
| @@ -530,8 +512,7 @@ font_prop_validate_symbol (prop, val) | |||
| 530 | 512 | ||
| 531 | 513 | ||
| 532 | static Lisp_Object | 514 | static Lisp_Object |
| 533 | font_prop_validate_style (style, val) | 515 | font_prop_validate_style (Lisp_Object style, Lisp_Object val) |
| 534 | Lisp_Object style, val; | ||
| 535 | { | 516 | { |
| 536 | enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX | 517 | enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX |
| 537 | : EQ (style, QCslant) ? FONT_SLANT_INDEX | 518 | : EQ (style, QCslant) ? FONT_SLANT_INDEX |
| @@ -565,16 +546,14 @@ font_prop_validate_style (style, val) | |||
| 565 | } | 546 | } |
| 566 | 547 | ||
| 567 | static Lisp_Object | 548 | static Lisp_Object |
| 568 | font_prop_validate_non_neg (prop, val) | 549 | font_prop_validate_non_neg (Lisp_Object prop, Lisp_Object val) |
| 569 | Lisp_Object prop, val; | ||
| 570 | { | 550 | { |
| 571 | return (NATNUMP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0) | 551 | return (NATNUMP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0) |
| 572 | ? val : Qerror); | 552 | ? val : Qerror); |
| 573 | } | 553 | } |
| 574 | 554 | ||
| 575 | static Lisp_Object | 555 | static Lisp_Object |
| 576 | font_prop_validate_spacing (prop, val) | 556 | font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val) |
| 577 | Lisp_Object prop, val; | ||
| 578 | { | 557 | { |
| 579 | if (NILP (val) || (NATNUMP (val) && XINT (val) <= FONT_SPACING_CHARCELL)) | 558 | if (NILP (val) || (NATNUMP (val) && XINT (val) <= FONT_SPACING_CHARCELL)) |
| 580 | return val; | 559 | return val; |
| @@ -595,8 +574,7 @@ font_prop_validate_spacing (prop, val) | |||
| 595 | } | 574 | } |
| 596 | 575 | ||
| 597 | static Lisp_Object | 576 | static Lisp_Object |
| 598 | font_prop_validate_otf (prop, val) | 577 | font_prop_validate_otf (Lisp_Object prop, Lisp_Object val) |
| 599 | Lisp_Object prop, val; | ||
| 600 | { | 578 | { |
| 601 | Lisp_Object tail, tmp; | 579 | Lisp_Object tail, tmp; |
| 602 | int i; | 580 | int i; |
| @@ -667,8 +645,7 @@ struct | |||
| 667 | already known property. */ | 645 | already known property. */ |
| 668 | 646 | ||
| 669 | static int | 647 | static int |
| 670 | get_font_prop_index (key) | 648 | get_font_prop_index (Lisp_Object key) |
| 671 | Lisp_Object key; | ||
| 672 | { | 649 | { |
| 673 | int i; | 650 | int i; |
| 674 | 651 | ||
| @@ -683,9 +660,7 @@ get_font_prop_index (key) | |||
| 683 | signal an error. The value is VAL or the regularized one. */ | 660 | signal an error. The value is VAL or the regularized one. */ |
| 684 | 661 | ||
| 685 | static Lisp_Object | 662 | static Lisp_Object |
| 686 | font_prop_validate (idx, prop, val) | 663 | font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val) |
| 687 | int idx; | ||
| 688 | Lisp_Object prop, val; | ||
| 689 | { | 664 | { |
| 690 | Lisp_Object validated; | 665 | Lisp_Object validated; |
| 691 | 666 | ||
| @@ -710,8 +685,7 @@ font_prop_validate (idx, prop, val) | |||
| 710 | keeping the sorting order. Don't check the validity of VAL. */ | 685 | keeping the sorting order. Don't check the validity of VAL. */ |
| 711 | 686 | ||
| 712 | Lisp_Object | 687 | Lisp_Object |
| 713 | font_put_extra (font, prop, val) | 688 | font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val) |
| 714 | Lisp_Object font, prop, val; | ||
| 715 | { | 689 | { |
| 716 | Lisp_Object extra = AREF (font, FONT_EXTRA_INDEX); | 690 | Lisp_Object extra = AREF (font, FONT_EXTRA_INDEX); |
| 717 | Lisp_Object slot = (NILP (extra) ? Qnil : assq_no_quit (prop, extra)); | 691 | Lisp_Object slot = (NILP (extra) ? Qnil : assq_no_quit (prop, extra)); |
| @@ -799,8 +773,7 @@ enum xlfd_field_mask | |||
| 799 | -1. */ | 773 | -1. */ |
| 800 | 774 | ||
| 801 | static int | 775 | static int |
| 802 | parse_matrix (p) | 776 | parse_matrix (char *p) |
| 803 | char *p; | ||
| 804 | { | 777 | { |
| 805 | double matrix[4]; | 778 | double matrix[4]; |
| 806 | char *end; | 779 | char *end; |
| @@ -822,9 +795,7 @@ parse_matrix (p) | |||
| 822 | field position by its contents. */ | 795 | field position by its contents. */ |
| 823 | 796 | ||
| 824 | static int | 797 | static int |
| 825 | font_expand_wildcards (field, n) | 798 | font_expand_wildcards (Lisp_Object *field, int n) |
| 826 | Lisp_Object field[XLFD_LAST_INDEX]; | ||
| 827 | int n; | ||
| 828 | { | 799 | { |
| 829 | /* Copy of FIELD. */ | 800 | /* Copy of FIELD. */ |
| 830 | Lisp_Object tmp[XLFD_LAST_INDEX]; | 801 | Lisp_Object tmp[XLFD_LAST_INDEX]; |
| @@ -1058,9 +1029,7 @@ font_check_xlfd_parse (Lisp_Object font, char *name) | |||
| 1058 | a fully specified XLFD. */ | 1029 | a fully specified XLFD. */ |
| 1059 | 1030 | ||
| 1060 | int | 1031 | int |
| 1061 | font_parse_xlfd (name, font) | 1032 | font_parse_xlfd (char *name, Lisp_Object font) |
| 1062 | char *name; | ||
| 1063 | Lisp_Object font; | ||
| 1064 | { | 1033 | { |
| 1065 | int len = strlen (name); | 1034 | int len = strlen (name); |
| 1066 | int i, j, n; | 1035 | int i, j, n; |
| @@ -1242,11 +1211,7 @@ font_parse_xlfd (name, font) | |||
| 1242 | 0, use PIXEL_SIZE instead. */ | 1211 | 0, use PIXEL_SIZE instead. */ |
| 1243 | 1212 | ||
| 1244 | int | 1213 | int |
| 1245 | font_unparse_xlfd (font, pixel_size, name, nbytes) | 1214 | font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) |
| 1246 | Lisp_Object font; | ||
| 1247 | int pixel_size; | ||
| 1248 | char *name; | ||
| 1249 | int nbytes; | ||
| 1250 | { | 1215 | { |
| 1251 | char *f[XLFD_REGISTRY_INDEX + 1]; | 1216 | char *f[XLFD_REGISTRY_INDEX + 1]; |
| 1252 | Lisp_Object val; | 1217 | Lisp_Object val; |
| @@ -1389,9 +1354,7 @@ font_unparse_xlfd (font, pixel_size, name, nbytes) | |||
| 1389 | This function tries to guess which format it is. */ | 1354 | This function tries to guess which format it is. */ |
| 1390 | 1355 | ||
| 1391 | int | 1356 | int |
| 1392 | font_parse_fcname (name, font) | 1357 | font_parse_fcname (char *name, Lisp_Object font) |
| 1393 | char *name; | ||
| 1394 | Lisp_Object font; | ||
| 1395 | { | 1358 | { |
| 1396 | char *p, *q; | 1359 | char *p, *q; |
| 1397 | char *size_beg = NULL, *size_end = NULL; | 1360 | char *size_beg = NULL, *size_end = NULL; |
| @@ -1648,11 +1611,7 @@ font_parse_fcname (name, font) | |||
| 1648 | FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ | 1611 | FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ |
| 1649 | 1612 | ||
| 1650 | int | 1613 | int |
| 1651 | font_unparse_fcname (font, pixel_size, name, nbytes) | 1614 | font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) |
| 1652 | Lisp_Object font; | ||
| 1653 | int pixel_size; | ||
| 1654 | char *name; | ||
| 1655 | int nbytes; | ||
| 1656 | { | 1615 | { |
| 1657 | Lisp_Object family, foundry; | 1616 | Lisp_Object family, foundry; |
| 1658 | Lisp_Object tail, val; | 1617 | Lisp_Object tail, val; |
| @@ -1771,11 +1730,7 @@ font_unparse_fcname (font, pixel_size, name, nbytes) | |||
| 1771 | size. */ | 1730 | size. */ |
| 1772 | 1731 | ||
| 1773 | int | 1732 | int |
| 1774 | font_unparse_gtkname (font, f, name, nbytes) | 1733 | font_unparse_gtkname (Lisp_Object font, struct frame *f, char *name, int nbytes) |
| 1775 | Lisp_Object font; | ||
| 1776 | struct frame *f; | ||
| 1777 | char *name; | ||
| 1778 | int nbytes; | ||
| 1779 | { | 1734 | { |
| 1780 | char *p; | 1735 | char *p; |
| 1781 | int len = 1; | 1736 | int len = 1; |
| @@ -1858,9 +1813,7 @@ font_unparse_gtkname (font, f, name, nbytes) | |||
| 1858 | 0. Otherwise return -1. */ | 1813 | 0. Otherwise return -1. */ |
| 1859 | 1814 | ||
| 1860 | static int | 1815 | static int |
| 1861 | font_parse_name (name, font) | 1816 | font_parse_name (char *name, Lisp_Object font) |
| 1862 | char *name; | ||
| 1863 | Lisp_Object font; | ||
| 1864 | { | 1817 | { |
| 1865 | if (name[0] == '-' || index (name, '*') || index (name, '?')) | 1818 | if (name[0] == '-' || index (name, '*') || index (name, '?')) |
| 1866 | return font_parse_xlfd (name, font); | 1819 | return font_parse_xlfd (name, font); |
| @@ -1873,8 +1826,7 @@ font_parse_name (name, font) | |||
| 1873 | part. */ | 1826 | part. */ |
| 1874 | 1827 | ||
| 1875 | void | 1828 | void |
| 1876 | font_parse_family_registry (family, registry, font_spec) | 1829 | font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Object font_spec) |
| 1877 | Lisp_Object family, registry, font_spec; | ||
| 1878 | { | 1830 | { |
| 1879 | int len; | 1831 | int len; |
| 1880 | char *p0, *p1; | 1832 | char *p0, *p1; |
| @@ -2229,8 +2181,7 @@ static Lisp_Object font_sort_entities (Lisp_Object, Lisp_Object, | |||
| 2229 | extern Lisp_Object Vface_font_rescale_alist; | 2181 | extern Lisp_Object Vface_font_rescale_alist; |
| 2230 | 2182 | ||
| 2231 | static double | 2183 | static double |
| 2232 | font_rescale_ratio (font_entity) | 2184 | font_rescale_ratio (Lisp_Object font_entity) |
| 2233 | Lisp_Object font_entity; | ||
| 2234 | { | 2185 | { |
| 2235 | Lisp_Object tail, elt; | 2186 | Lisp_Object tail, elt; |
| 2236 | Lisp_Object name = Qnil; | 2187 | Lisp_Object name = Qnil; |
| @@ -2277,8 +2228,7 @@ static int sort_shift_bits[FONT_SIZE_INDEX + 1]; | |||
| 2277 | SPEC_PROP. */ | 2228 | SPEC_PROP. */ |
| 2278 | 2229 | ||
| 2279 | static unsigned | 2230 | static unsigned |
| 2280 | font_score (entity, spec_prop) | 2231 | font_score (Lisp_Object entity, Lisp_Object *spec_prop) |
| 2281 | Lisp_Object entity, *spec_prop; | ||
| 2282 | { | 2232 | { |
| 2283 | unsigned score = 0; | 2233 | unsigned score = 0; |
| 2284 | int i; | 2234 | int i; |
| @@ -2352,8 +2302,7 @@ struct font_sort_data | |||
| 2352 | /* The comparison function for qsort. */ | 2302 | /* The comparison function for qsort. */ |
| 2353 | 2303 | ||
| 2354 | static int | 2304 | static int |
| 2355 | font_compare (d1, d2) | 2305 | font_compare (const void *d1, const void *d2) |
| 2356 | const void *d1, *d2; | ||
| 2357 | { | 2306 | { |
| 2358 | const struct font_sort_data *data1 = d1; | 2307 | const struct font_sort_data *data1 = d1; |
| 2359 | const struct font_sort_data *data2 = d2; | 2308 | const struct font_sort_data *data2 = d2; |
| @@ -2381,9 +2330,7 @@ font_compare (d1, d2) | |||
| 2381 | such a case. */ | 2330 | such a case. */ |
| 2382 | 2331 | ||
| 2383 | static Lisp_Object | 2332 | static Lisp_Object |
| 2384 | font_sort_entities (list, prefer, frame, best_only) | 2333 | font_sort_entities (Lisp_Object list, Lisp_Object prefer, Lisp_Object frame, int best_only) |
| 2385 | Lisp_Object list, prefer, frame; | ||
| 2386 | int best_only; | ||
| 2387 | { | 2334 | { |
| 2388 | Lisp_Object prefer_prop[FONT_SPEC_MAX]; | 2335 | Lisp_Object prefer_prop[FONT_SPEC_MAX]; |
| 2389 | int len, maxlen, i; | 2336 | int len, maxlen, i; |
| @@ -2488,8 +2435,7 @@ font_sort_entities (list, prefer, frame, best_only) | |||
| 2488 | function with font_sort_order after setting up it. */ | 2435 | function with font_sort_order after setting up it. */ |
| 2489 | 2436 | ||
| 2490 | void | 2437 | void |
| 2491 | font_update_sort_order (order) | 2438 | font_update_sort_order (int *order) |
| 2492 | int *order; | ||
| 2493 | { | 2439 | { |
| 2494 | int i, shift_bits; | 2440 | int i, shift_bits; |
| 2495 | 2441 | ||
| @@ -2509,8 +2455,7 @@ font_update_sort_order (order) | |||
| 2509 | } | 2455 | } |
| 2510 | 2456 | ||
| 2511 | static int | 2457 | static int |
| 2512 | font_check_otf_features (script, langsys, features, table) | 2458 | font_check_otf_features (Lisp_Object script, Lisp_Object langsys, Lisp_Object features, Lisp_Object table) |
| 2513 | Lisp_Object script, langsys, features, table; | ||
| 2514 | { | 2459 | { |
| 2515 | Lisp_Object val; | 2460 | Lisp_Object val; |
| 2516 | int negative; | 2461 | int negative; |
| @@ -2584,8 +2529,7 @@ font_check_otf (Lisp_Object spec, Lisp_Object otf_capability) | |||
| 2584 | specification SPEC. */ | 2529 | specification SPEC. */ |
| 2585 | 2530 | ||
| 2586 | int | 2531 | int |
| 2587 | font_match_p (spec, font) | 2532 | font_match_p (Lisp_Object spec, Lisp_Object font) |
| 2588 | Lisp_Object spec, font; | ||
| 2589 | { | 2533 | { |
| 2590 | Lisp_Object prop[FONT_SPEC_MAX], *props; | 2534 | Lisp_Object prop[FONT_SPEC_MAX], *props; |
| 2591 | Lisp_Object extra, font_extra; | 2535 | Lisp_Object extra, font_extra; |
| @@ -2708,9 +2652,7 @@ static void font_clear_cache (FRAME_PTR, Lisp_Object, | |||
| 2708 | struct font_driver *); | 2652 | struct font_driver *); |
| 2709 | 2653 | ||
| 2710 | static void | 2654 | static void |
| 2711 | font_prepare_cache (f, driver) | 2655 | font_prepare_cache (FRAME_PTR f, struct font_driver *driver) |
| 2712 | FRAME_PTR f; | ||
| 2713 | struct font_driver *driver; | ||
| 2714 | { | 2656 | { |
| 2715 | Lisp_Object cache, val; | 2657 | Lisp_Object cache, val; |
| 2716 | 2658 | ||
| @@ -2732,9 +2674,7 @@ font_prepare_cache (f, driver) | |||
| 2732 | 2674 | ||
| 2733 | 2675 | ||
| 2734 | static void | 2676 | static void |
| 2735 | font_finish_cache (f, driver) | 2677 | font_finish_cache (FRAME_PTR f, struct font_driver *driver) |
| 2736 | FRAME_PTR f; | ||
| 2737 | struct font_driver *driver; | ||
| 2738 | { | 2678 | { |
| 2739 | Lisp_Object cache, val, tmp; | 2679 | Lisp_Object cache, val, tmp; |
| 2740 | 2680 | ||
| @@ -2755,9 +2695,7 @@ font_finish_cache (f, driver) | |||
| 2755 | 2695 | ||
| 2756 | 2696 | ||
| 2757 | static Lisp_Object | 2697 | static Lisp_Object |
| 2758 | font_get_cache (f, driver) | 2698 | font_get_cache (FRAME_PTR f, struct font_driver *driver) |
| 2759 | FRAME_PTR f; | ||
| 2760 | struct font_driver *driver; | ||
| 2761 | { | 2699 | { |
| 2762 | Lisp_Object val = driver->get_cache (f); | 2700 | Lisp_Object val = driver->get_cache (f); |
| 2763 | Lisp_Object type = driver->type; | 2701 | Lisp_Object type = driver->type; |
| @@ -2773,10 +2711,7 @@ font_get_cache (f, driver) | |||
| 2773 | static int num_fonts; | 2711 | static int num_fonts; |
| 2774 | 2712 | ||
| 2775 | static void | 2713 | static void |
| 2776 | font_clear_cache (f, cache, driver) | 2714 | font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver) |
| 2777 | FRAME_PTR f; | ||
| 2778 | Lisp_Object cache; | ||
| 2779 | struct font_driver *driver; | ||
| 2780 | { | 2715 | { |
| 2781 | Lisp_Object tail, elt; | 2716 | Lisp_Object tail, elt; |
| 2782 | Lisp_Object tail2, entity; | 2717 | Lisp_Object tail2, entity; |
| @@ -2830,9 +2765,7 @@ static Lisp_Object scratch_font_spec, scratch_font_prefer; | |||
| 2830 | extern Lisp_Object Vface_ignored_fonts; | 2765 | extern Lisp_Object Vface_ignored_fonts; |
| 2831 | 2766 | ||
| 2832 | Lisp_Object | 2767 | Lisp_Object |
| 2833 | font_delete_unmatched (vec, spec, size) | 2768 | font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size) |
| 2834 | Lisp_Object vec, spec; | ||
| 2835 | int size; | ||
| 2836 | { | 2769 | { |
| 2837 | Lisp_Object entity, val; | 2770 | Lisp_Object entity, val; |
| 2838 | enum font_property_index prop; | 2771 | enum font_property_index prop; |
| @@ -2905,8 +2838,7 @@ font_delete_unmatched (vec, spec, size) | |||
| 2905 | same font-driver. */ | 2838 | same font-driver. */ |
| 2906 | 2839 | ||
| 2907 | Lisp_Object | 2840 | Lisp_Object |
| 2908 | font_list_entities (frame, spec) | 2841 | font_list_entities (Lisp_Object frame, Lisp_Object spec) |
| 2909 | Lisp_Object frame, spec; | ||
| 2910 | { | 2842 | { |
| 2911 | FRAME_PTR f = XFRAME (frame); | 2843 | FRAME_PTR f = XFRAME (frame); |
| 2912 | struct font_driver_list *driver_list = f->font_driver_list; | 2844 | struct font_driver_list *driver_list = f->font_driver_list; |
| @@ -2982,9 +2914,7 @@ font_list_entities (frame, spec) | |||
| 2982 | font-related attributes. */ | 2914 | font-related attributes. */ |
| 2983 | 2915 | ||
| 2984 | static Lisp_Object | 2916 | static Lisp_Object |
| 2985 | font_matching_entity (f, attrs, spec) | 2917 | font_matching_entity (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) |
| 2986 | FRAME_PTR f; | ||
| 2987 | Lisp_Object *attrs, spec; | ||
| 2988 | { | 2918 | { |
| 2989 | struct font_driver_list *driver_list = f->font_driver_list; | 2919 | struct font_driver_list *driver_list = f->font_driver_list; |
| 2990 | Lisp_Object ftype, size, entity; | 2920 | Lisp_Object ftype, size, entity; |
| @@ -3032,10 +2962,7 @@ font_matching_entity (f, attrs, spec) | |||
| 3032 | opened font object. */ | 2962 | opened font object. */ |
| 3033 | 2963 | ||
| 3034 | static Lisp_Object | 2964 | static Lisp_Object |
| 3035 | font_open_entity (f, entity, pixel_size) | 2965 | font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size) |
| 3036 | FRAME_PTR f; | ||
| 3037 | Lisp_Object entity; | ||
| 3038 | int pixel_size; | ||
| 3039 | { | 2966 | { |
| 3040 | struct font_driver_list *driver_list; | 2967 | struct font_driver_list *driver_list; |
| 3041 | Lisp_Object objlist, size, val, font_object; | 2968 | Lisp_Object objlist, size, val, font_object; |
| @@ -3111,9 +3038,7 @@ font_open_entity (f, entity, pixel_size) | |||
| 3111 | /* Close FONT_OBJECT that is opened on frame F. */ | 3038 | /* Close FONT_OBJECT that is opened on frame F. */ |
| 3112 | 3039 | ||
| 3113 | void | 3040 | void |
| 3114 | font_close_object (f, font_object) | 3041 | font_close_object (FRAME_PTR f, Lisp_Object font_object) |
| 3115 | FRAME_PTR f; | ||
| 3116 | Lisp_Object font_object; | ||
| 3117 | { | 3042 | { |
| 3118 | struct font *font = XFONT_OBJECT (font_object); | 3043 | struct font *font = XFONT_OBJECT (font_object); |
| 3119 | 3044 | ||
| @@ -3134,10 +3059,7 @@ font_close_object (f, font_object) | |||
| 3134 | FONT is a font-entity and it must be opened to check. */ | 3059 | FONT is a font-entity and it must be opened to check. */ |
| 3135 | 3060 | ||
| 3136 | int | 3061 | int |
| 3137 | font_has_char (f, font, c) | 3062 | font_has_char (FRAME_PTR f, Lisp_Object font, int c) |
| 3138 | FRAME_PTR f; | ||
| 3139 | Lisp_Object font; | ||
| 3140 | int c; | ||
| 3141 | { | 3063 | { |
| 3142 | struct font *fontp; | 3064 | struct font *fontp; |
| 3143 | 3065 | ||
| @@ -3172,9 +3094,7 @@ font_has_char (f, font, c) | |||
| 3172 | /* Return the glyph ID of FONT_OBJECT for character C. */ | 3094 | /* Return the glyph ID of FONT_OBJECT for character C. */ |
| 3173 | 3095 | ||
| 3174 | unsigned | 3096 | unsigned |
| 3175 | font_encode_char (font_object, c) | 3097 | font_encode_char (Lisp_Object font_object, int c) |
| 3176 | Lisp_Object font_object; | ||
| 3177 | int c; | ||
| 3178 | { | 3098 | { |
| 3179 | struct font *font; | 3099 | struct font *font; |
| 3180 | 3100 | ||
| @@ -3187,8 +3107,7 @@ font_encode_char (font_object, c) | |||
| 3187 | /* Return the name of FONT_OBJECT. */ | 3107 | /* Return the name of FONT_OBJECT. */ |
| 3188 | 3108 | ||
| 3189 | Lisp_Object | 3109 | Lisp_Object |
| 3190 | font_get_name (font_object) | 3110 | font_get_name (Lisp_Object font_object) |
| 3191 | Lisp_Object font_object; | ||
| 3192 | { | 3111 | { |
| 3193 | font_assert (FONT_OBJECT_P (font_object)); | 3112 | font_assert (FONT_OBJECT_P (font_object)); |
| 3194 | return AREF (font_object, FONT_NAME_INDEX); | 3113 | return AREF (font_object, FONT_NAME_INDEX); |
| @@ -3198,8 +3117,7 @@ font_get_name (font_object) | |||
| 3198 | /* Return the specification of FONT_OBJECT. */ | 3117 | /* Return the specification of FONT_OBJECT. */ |
| 3199 | 3118 | ||
| 3200 | Lisp_Object | 3119 | Lisp_Object |
| 3201 | font_get_spec (font_object) | 3120 | font_get_spec (Lisp_Object font_object) |
| 3202 | Lisp_Object font_object; | ||
| 3203 | { | 3121 | { |
| 3204 | Lisp_Object spec = font_make_spec (); | 3122 | Lisp_Object spec = font_make_spec (); |
| 3205 | int i; | 3123 | int i; |
| @@ -3216,8 +3134,7 @@ font_get_spec (font_object) | |||
| 3216 | could not be parsed by font_parse_name, return Qnil. */ | 3134 | could not be parsed by font_parse_name, return Qnil. */ |
| 3217 | 3135 | ||
| 3218 | Lisp_Object | 3136 | Lisp_Object |
| 3219 | font_spec_from_name (font_name) | 3137 | font_spec_from_name (Lisp_Object font_name) |
| 3220 | Lisp_Object font_name; | ||
| 3221 | { | 3138 | { |
| 3222 | Lisp_Object spec = Ffont_spec (0, NULL); | 3139 | Lisp_Object spec = Ffont_spec (0, NULL); |
| 3223 | 3140 | ||
| @@ -3231,9 +3148,7 @@ font_spec_from_name (font_name) | |||
| 3231 | 3148 | ||
| 3232 | 3149 | ||
| 3233 | void | 3150 | void |
| 3234 | font_clear_prop (attrs, prop) | 3151 | font_clear_prop (Lisp_Object *attrs, enum font_property_index prop) |
| 3235 | Lisp_Object *attrs; | ||
| 3236 | enum font_property_index prop; | ||
| 3237 | { | 3152 | { |
| 3238 | Lisp_Object font = attrs[LFACE_FONT_INDEX]; | 3153 | Lisp_Object font = attrs[LFACE_FONT_INDEX]; |
| 3239 | 3154 | ||
| @@ -3284,9 +3199,7 @@ font_clear_prop (attrs, prop) | |||
| 3284 | } | 3199 | } |
| 3285 | 3200 | ||
| 3286 | void | 3201 | void |
| 3287 | font_update_lface (f, attrs) | 3202 | font_update_lface (FRAME_PTR f, Lisp_Object *attrs) |
| 3288 | FRAME_PTR f; | ||
| 3289 | Lisp_Object *attrs; | ||
| 3290 | { | 3203 | { |
| 3291 | Lisp_Object spec; | 3204 | Lisp_Object spec; |
| 3292 | 3205 | ||
| @@ -3333,9 +3246,7 @@ font_update_lface (f, attrs) | |||
| 3333 | supports C and matches best with ATTRS and PIXEL_SIZE. */ | 3246 | supports C and matches best with ATTRS and PIXEL_SIZE. */ |
| 3334 | 3247 | ||
| 3335 | static Lisp_Object | 3248 | static Lisp_Object |
| 3336 | font_select_entity (frame, entities, attrs, pixel_size, c) | 3249 | font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c) |
| 3337 | Lisp_Object frame, entities, *attrs; | ||
| 3338 | int pixel_size, c; | ||
| 3339 | { | 3250 | { |
| 3340 | Lisp_Object font_entity; | 3251 | Lisp_Object font_entity; |
| 3341 | Lisp_Object prefer; | 3252 | Lisp_Object prefer; |
| @@ -3380,11 +3291,7 @@ font_select_entity (frame, entities, attrs, pixel_size, c) | |||
| 3380 | character that the entity must support. */ | 3291 | character that the entity must support. */ |
| 3381 | 3292 | ||
| 3382 | Lisp_Object | 3293 | Lisp_Object |
| 3383 | font_find_for_lface (f, attrs, spec, c) | 3294 | font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c) |
| 3384 | FRAME_PTR f; | ||
| 3385 | Lisp_Object *attrs; | ||
| 3386 | Lisp_Object spec; | ||
| 3387 | int c; | ||
| 3388 | { | 3295 | { |
| 3389 | Lisp_Object work; | 3296 | Lisp_Object work; |
| 3390 | Lisp_Object frame, entities, val; | 3297 | Lisp_Object frame, entities, val; |
| @@ -3534,11 +3441,7 @@ font_find_for_lface (f, attrs, spec, c) | |||
| 3534 | 3441 | ||
| 3535 | 3442 | ||
| 3536 | Lisp_Object | 3443 | Lisp_Object |
| 3537 | font_open_for_lface (f, entity, attrs, spec) | 3444 | font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_Object spec) |
| 3538 | FRAME_PTR f; | ||
| 3539 | Lisp_Object entity; | ||
| 3540 | Lisp_Object *attrs; | ||
| 3541 | Lisp_Object spec; | ||
| 3542 | { | 3445 | { |
| 3543 | int size; | 3446 | int size; |
| 3544 | 3447 | ||
| @@ -3581,9 +3484,7 @@ font_open_for_lface (f, entity, attrs, spec) | |||
| 3581 | font-object. */ | 3484 | font-object. */ |
| 3582 | 3485 | ||
| 3583 | Lisp_Object | 3486 | Lisp_Object |
| 3584 | font_load_for_lface (f, attrs, spec) | 3487 | font_load_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) |
| 3585 | FRAME_PTR f; | ||
| 3586 | Lisp_Object *attrs, spec; | ||
| 3587 | { | 3488 | { |
| 3588 | Lisp_Object entity, name; | 3489 | Lisp_Object entity, name; |
| 3589 | 3490 | ||
| @@ -3613,9 +3514,7 @@ font_load_for_lface (f, attrs, spec) | |||
| 3613 | /* Make FACE on frame F ready to use the font opened for FACE. */ | 3514 | /* Make FACE on frame F ready to use the font opened for FACE. */ |
| 3614 | 3515 | ||
| 3615 | void | 3516 | void |
| 3616 | font_prepare_for_face (f, face) | 3517 | font_prepare_for_face (FRAME_PTR f, struct face *face) |
| 3617 | FRAME_PTR f; | ||
| 3618 | struct face *face; | ||
| 3619 | { | 3518 | { |
| 3620 | if (face->font->driver->prepare_face) | 3519 | if (face->font->driver->prepare_face) |
| 3621 | face->font->driver->prepare_face (f, face); | 3520 | face->font->driver->prepare_face (f, face); |
| @@ -3625,9 +3524,7 @@ font_prepare_for_face (f, face) | |||
| 3625 | /* Make FACE on frame F stop using the font opened for FACE. */ | 3524 | /* Make FACE on frame F stop using the font opened for FACE. */ |
| 3626 | 3525 | ||
| 3627 | void | 3526 | void |
| 3628 | font_done_for_face (f, face) | 3527 | font_done_for_face (FRAME_PTR f, struct face *face) |
| 3629 | FRAME_PTR f; | ||
| 3630 | struct face *face; | ||
| 3631 | { | 3528 | { |
| 3632 | if (face->font->driver->done_face) | 3529 | if (face->font->driver->done_face) |
| 3633 | face->font->driver->done_face (f, face); | 3530 | face->font->driver->done_face (f, face); |
| @@ -3639,9 +3536,7 @@ font_done_for_face (f, face) | |||
| 3639 | font is found, return Qnil. */ | 3536 | font is found, return Qnil. */ |
| 3640 | 3537 | ||
| 3641 | Lisp_Object | 3538 | Lisp_Object |
| 3642 | font_open_by_spec (f, spec) | 3539 | font_open_by_spec (FRAME_PTR f, Lisp_Object spec) |
| 3643 | FRAME_PTR f; | ||
| 3644 | Lisp_Object spec; | ||
| 3645 | { | 3540 | { |
| 3646 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 3541 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 3647 | 3542 | ||
| @@ -3665,9 +3560,7 @@ font_open_by_spec (f, spec) | |||
| 3665 | found, return Qnil. */ | 3560 | found, return Qnil. */ |
| 3666 | 3561 | ||
| 3667 | Lisp_Object | 3562 | Lisp_Object |
| 3668 | font_open_by_name (f, name) | 3563 | font_open_by_name (FRAME_PTR f, char *name) |
| 3669 | FRAME_PTR f; | ||
| 3670 | char *name; | ||
| 3671 | { | 3564 | { |
| 3672 | Lisp_Object args[2]; | 3565 | Lisp_Object args[2]; |
| 3673 | Lisp_Object spec, ret; | 3566 | Lisp_Object spec, ret; |
| @@ -3697,9 +3590,7 @@ font_open_by_name (f, name) | |||
| 3697 | (e.g. syms_of_xfont). */ | 3590 | (e.g. syms_of_xfont). */ |
| 3698 | 3591 | ||
| 3699 | void | 3592 | void |
| 3700 | register_font_driver (driver, f) | 3593 | register_font_driver (struct font_driver *driver, FRAME_PTR f) |
| 3701 | struct font_driver *driver; | ||
| 3702 | FRAME_PTR f; | ||
| 3703 | { | 3594 | { |
| 3704 | struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; | 3595 | struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; |
| 3705 | struct font_driver_list *prev, *list; | 3596 | struct font_driver_list *prev, *list; |
| @@ -3727,8 +3618,7 @@ register_font_driver (driver, f) | |||
| 3727 | } | 3618 | } |
| 3728 | 3619 | ||
| 3729 | void | 3620 | void |
| 3730 | free_font_driver_list (f) | 3621 | free_font_driver_list (FRAME_PTR f) |
| 3731 | FRAME_PTR f; | ||
| 3732 | { | 3622 | { |
| 3733 | struct font_driver_list *list, *next; | 3623 | struct font_driver_list *list, *next; |
| 3734 | 3624 | ||
| @@ -3750,9 +3640,7 @@ free_font_driver_list (f) | |||
| 3750 | F. */ | 3640 | F. */ |
| 3751 | 3641 | ||
| 3752 | Lisp_Object | 3642 | Lisp_Object |
| 3753 | font_update_drivers (f, new_drivers) | 3643 | font_update_drivers (FRAME_PTR f, Lisp_Object new_drivers) |
| 3754 | FRAME_PTR f; | ||
| 3755 | Lisp_Object new_drivers; | ||
| 3756 | { | 3644 | { |
| 3757 | Lisp_Object active_drivers = Qnil; | 3645 | Lisp_Object active_drivers = Qnil; |
| 3758 | struct font_driver *driver; | 3646 | struct font_driver *driver; |
| @@ -3843,10 +3731,7 @@ font_update_drivers (f, new_drivers) | |||
| 3843 | } | 3731 | } |
| 3844 | 3732 | ||
| 3845 | int | 3733 | int |
| 3846 | font_put_frame_data (f, driver, data) | 3734 | font_put_frame_data (FRAME_PTR f, struct font_driver *driver, void *data) |
| 3847 | FRAME_PTR f; | ||
| 3848 | struct font_driver *driver; | ||
| 3849 | void *data; | ||
| 3850 | { | 3735 | { |
| 3851 | struct font_data_list *list, *prev; | 3736 | struct font_data_list *list, *prev; |
| 3852 | 3737 | ||
| @@ -3880,9 +3765,7 @@ font_put_frame_data (f, driver, data) | |||
| 3880 | 3765 | ||
| 3881 | 3766 | ||
| 3882 | void * | 3767 | void * |
| 3883 | font_get_frame_data (f, driver) | 3768 | font_get_frame_data (FRAME_PTR f, struct font_driver *driver) |
| 3884 | FRAME_PTR f; | ||
| 3885 | struct font_driver *driver; | ||
| 3886 | { | 3769 | { |
| 3887 | struct font_data_list *list; | 3770 | struct font_data_list *list; |
| 3888 | 3771 | ||
| @@ -3901,12 +3784,7 @@ font_get_frame_data (f, driver) | |||
| 3901 | STRING. */ | 3784 | STRING. */ |
| 3902 | 3785 | ||
| 3903 | Lisp_Object | 3786 | Lisp_Object |
| 3904 | font_at (c, pos, face, w, string) | 3787 | font_at (int c, EMACS_INT pos, struct face *face, struct window *w, Lisp_Object string) |
| 3905 | int c; | ||
| 3906 | EMACS_INT pos; | ||
| 3907 | struct face *face; | ||
| 3908 | struct window *w; | ||
| 3909 | Lisp_Object string; | ||
| 3910 | { | 3788 | { |
| 3911 | FRAME_PTR f; | 3789 | FRAME_PTR f; |
| 3912 | int multibyte; | 3790 | int multibyte; |
| @@ -3988,11 +3866,7 @@ font_at (c, pos, face, w, string) | |||
| 3988 | It is assured that the current buffer (or STRING) is multibyte. */ | 3866 | It is assured that the current buffer (or STRING) is multibyte. */ |
| 3989 | 3867 | ||
| 3990 | Lisp_Object | 3868 | Lisp_Object |
| 3991 | font_range (pos, limit, w, face, string) | 3869 | font_range (EMACS_INT pos, EMACS_INT *limit, struct window *w, struct face *face, Lisp_Object string) |
| 3992 | EMACS_INT pos, *limit; | ||
| 3993 | struct window *w; | ||
| 3994 | struct face *face; | ||
| 3995 | Lisp_Object string; | ||
| 3996 | { | 3870 | { |
| 3997 | EMACS_INT pos_byte, ignore; | 3871 | EMACS_INT pos_byte, ignore; |
| 3998 | int c; | 3872 | int c; |
| @@ -4535,8 +4409,7 @@ DEFUN ("clear-font-cache", Fclear_font_cache, Sclear_font_cache, 0, 0, 0, | |||
| 4535 | 4409 | ||
| 4536 | 4410 | ||
| 4537 | void | 4411 | void |
| 4538 | font_fill_lglyph_metrics (glyph, font_object) | 4412 | font_fill_lglyph_metrics (Lisp_Object glyph, Lisp_Object font_object) |
| 4539 | Lisp_Object glyph, font_object; | ||
| 4540 | { | 4413 | { |
| 4541 | struct font *font = XFONT_OBJECT (font_object); | 4414 | struct font *font = XFONT_OBJECT (font_object); |
| 4542 | unsigned code; | 4415 | unsigned code; |
| @@ -5118,9 +4991,7 @@ If the named font is not yet loaded, return nil. */) | |||
| 5118 | build_style_table ((TBL), sizeof TBL / sizeof (struct table_entry)) | 4991 | build_style_table ((TBL), sizeof TBL / sizeof (struct table_entry)) |
| 5119 | 4992 | ||
| 5120 | static Lisp_Object | 4993 | static Lisp_Object |
| 5121 | build_style_table (entry, nelement) | 4994 | build_style_table (const struct table_entry *entry, int nelement) |
| 5122 | struct table_entry *entry; | ||
| 5123 | int nelement; | ||
| 5124 | { | 4995 | { |
| 5125 | int i, j; | 4996 | int i, j; |
| 5126 | Lisp_Object table, elt; | 4997 | Lisp_Object table, elt; |
| @@ -5150,9 +5021,7 @@ static Lisp_Object Vfont_log_deferred; | |||
| 5150 | opening), ARG is the argument for the action, and RESULT is the | 5021 | opening), ARG is the argument for the action, and RESULT is the |
| 5151 | result of the action. */ | 5022 | result of the action. */ |
| 5152 | void | 5023 | void |
| 5153 | font_add_log (action, arg, result) | 5024 | font_add_log (char *action, Lisp_Object arg, Lisp_Object result) |
| 5154 | char *action; | ||
| 5155 | Lisp_Object arg, result; | ||
| 5156 | { | 5025 | { |
| 5157 | Lisp_Object tail, val; | 5026 | Lisp_Object tail, val; |
| 5158 | int i; | 5027 | int i; |
| @@ -5238,9 +5107,7 @@ font_add_log (action, arg, result) | |||
| 5238 | as font_add_log. */ | 5107 | as font_add_log. */ |
| 5239 | 5108 | ||
| 5240 | void | 5109 | void |
| 5241 | font_deferred_log (action, arg, result) | 5110 | font_deferred_log (char *action, Lisp_Object arg, Lisp_Object result) |
| 5242 | char *action; | ||
| 5243 | Lisp_Object arg, result; | ||
| 5244 | { | 5111 | { |
| 5245 | if (EQ (Vfont_log, Qt)) | 5112 | if (EQ (Vfont_log, Qt)) |
| 5246 | return; | 5113 | return; |
| @@ -5249,17 +5116,17 @@ font_deferred_log (action, arg, result) | |||
| 5249 | ASET (Vfont_log_deferred, 2, result); | 5116 | ASET (Vfont_log_deferred, 2, result); |
| 5250 | } | 5117 | } |
| 5251 | 5118 | ||
| 5252 | extern void syms_of_ftfont (); | 5119 | extern void syms_of_ftfont (void); |
| 5253 | extern void syms_of_xfont (); | 5120 | extern void syms_of_xfont (void); |
| 5254 | extern void syms_of_xftfont (); | 5121 | extern void syms_of_xftfont (void); |
| 5255 | extern void syms_of_ftxfont (); | 5122 | extern void syms_of_ftxfont (void); |
| 5256 | extern void syms_of_bdffont (); | 5123 | extern void syms_of_bdffont (void); |
| 5257 | extern void syms_of_w32font (); | 5124 | extern void syms_of_w32font (void); |
| 5258 | extern void syms_of_atmfont (); | 5125 | extern void syms_of_atmfont (void); |
| 5259 | extern void syms_of_nsfont (); | 5126 | extern void syms_of_nsfont (void); |
| 5260 | 5127 | ||
| 5261 | void | 5128 | void |
| 5262 | syms_of_font () | 5129 | syms_of_font (void) |
| 5263 | { | 5130 | { |
| 5264 | sort_shift_bits[FONT_TYPE_INDEX] = 0; | 5131 | sort_shift_bits[FONT_TYPE_INDEX] = 0; |
| 5265 | sort_shift_bits[FONT_SLANT_INDEX] = 2; | 5132 | sort_shift_bits[FONT_SLANT_INDEX] = 2; |
| @@ -5446,7 +5313,7 @@ EMACS_FONT_LOG is set. Otherwise, it is set to t. */); | |||
| 5446 | } | 5313 | } |
| 5447 | 5314 | ||
| 5448 | void | 5315 | void |
| 5449 | init_font () | 5316 | init_font (void) |
| 5450 | { | 5317 | { |
| 5451 | Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; | 5318 | Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; |
| 5452 | } | 5319 | } |
diff --git a/src/fontset.c b/src/fontset.c index 84035838552..01c62000ca0 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -306,9 +306,7 @@ fontset_id_valid_p (id) | |||
| 306 | : fontset_ref ((fontset), (c))) | 306 | : fontset_ref ((fontset), (c))) |
| 307 | 307 | ||
| 308 | static Lisp_Object | 308 | static Lisp_Object |
| 309 | fontset_ref (fontset, c) | 309 | fontset_ref (Lisp_Object fontset, int c) |
| 310 | Lisp_Object fontset; | ||
| 311 | int c; | ||
| 312 | { | 310 | { |
| 313 | Lisp_Object elt; | 311 | Lisp_Object elt; |
| 314 | 312 | ||
| @@ -343,8 +341,7 @@ fontset_ref (fontset, c) | |||
| 343 | : fontset_add ((fontset), (range), (elt), (add))) | 341 | : fontset_add ((fontset), (range), (elt), (add))) |
| 344 | 342 | ||
| 345 | static Lisp_Object | 343 | static Lisp_Object |
| 346 | fontset_add (fontset, range, elt, add) | 344 | fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add) |
| 347 | Lisp_Object fontset, range, elt, add; | ||
| 348 | { | 345 | { |
| 349 | Lisp_Object args[2]; | 346 | Lisp_Object args[2]; |
| 350 | int idx = (EQ (add, Qappend) ? 0 : 1); | 347 | int idx = (EQ (add, Qappend) ? 0 : 1); |
| @@ -376,8 +373,7 @@ fontset_add (fontset, range, elt, add) | |||
| 376 | } | 373 | } |
| 377 | 374 | ||
| 378 | static int | 375 | static int |
| 379 | fontset_compare_rfontdef (val1, val2) | 376 | fontset_compare_rfontdef (const void *val1, const void *val2) |
| 380 | const void *val1, *val2; | ||
| 381 | { | 377 | { |
| 382 | return (RFONT_DEF_SCORE (*(Lisp_Object *) val1) | 378 | return (RFONT_DEF_SCORE (*(Lisp_Object *) val1) |
| 383 | - RFONT_DEF_SCORE (*(Lisp_Object *) val2)); | 379 | - RFONT_DEF_SCORE (*(Lisp_Object *) val2)); |
| @@ -392,12 +388,10 @@ fontset_compare_rfontdef (val1, val2) | |||
| 392 | If PREFERRED_FAMILY is not nil, that family has the higher priority | 388 | If PREFERRED_FAMILY is not nil, that family has the higher priority |
| 393 | if the encoding charsets or languages in font-specs are the same. */ | 389 | if the encoding charsets or languages in font-specs are the same. */ |
| 394 | 390 | ||
| 395 | extern Lisp_Object Fassoc_string (); | 391 | extern Lisp_Object Fassoc_string (Lisp_Object, Lisp_Object, Lisp_Object); |
| 396 | 392 | ||
| 397 | static void | 393 | static void |
| 398 | reorder_font_vector (font_group, font) | 394 | reorder_font_vector (Lisp_Object font_group, struct font *font) |
| 399 | Lisp_Object font_group; | ||
| 400 | struct font *font; | ||
| 401 | { | 395 | { |
| 402 | Lisp_Object vec, font_object; | 396 | Lisp_Object vec, font_object; |
| 403 | int size; | 397 | int size; |
| @@ -525,11 +519,7 @@ fontset_get_font_group (Lisp_Object fontset, int c) | |||
| 525 | If FALLBACK is nonzero, search only fallback fonts. */ | 519 | If FALLBACK is nonzero, search only fallback fonts. */ |
| 526 | 520 | ||
| 527 | static Lisp_Object | 521 | static Lisp_Object |
| 528 | fontset_find_font (fontset, c, face, id, fallback) | 522 | fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fallback) |
| 529 | Lisp_Object fontset; | ||
| 530 | int c; | ||
| 531 | struct face *face; | ||
| 532 | int id, fallback; | ||
| 533 | { | 523 | { |
| 534 | Lisp_Object vec, font_group; | 524 | Lisp_Object vec, font_group; |
| 535 | int i, charset_matched = 0, found_index; | 525 | int i, charset_matched = 0, found_index; |
| @@ -728,11 +718,7 @@ fontset_find_font (fontset, c, face, id, fallback) | |||
| 728 | 718 | ||
| 729 | 719 | ||
| 730 | static Lisp_Object | 720 | static Lisp_Object |
| 731 | fontset_font (fontset, c, face, id) | 721 | fontset_font (Lisp_Object fontset, int c, struct face *face, int id) |
| 732 | Lisp_Object fontset; | ||
| 733 | int c; | ||
| 734 | struct face *face; | ||
| 735 | int id; | ||
| 736 | { | 722 | { |
| 737 | Lisp_Object rfont_def, default_rfont_def; | 723 | Lisp_Object rfont_def, default_rfont_def; |
| 738 | Lisp_Object base_fontset; | 724 | Lisp_Object base_fontset; |
| @@ -793,8 +779,7 @@ fontset_font (fontset, c, face, id) | |||
| 793 | BASE. */ | 779 | BASE. */ |
| 794 | 780 | ||
| 795 | static Lisp_Object | 781 | static Lisp_Object |
| 796 | make_fontset (frame, name, base) | 782 | make_fontset (Lisp_Object frame, Lisp_Object name, Lisp_Object base) |
| 797 | Lisp_Object frame, name, base; | ||
| 798 | { | 783 | { |
| 799 | Lisp_Object fontset; | 784 | Lisp_Object fontset; |
| 800 | int size = ASIZE (Vfontset_table); | 785 | int size = ASIZE (Vfontset_table); |
| @@ -835,8 +820,7 @@ make_fontset (frame, name, base) | |||
| 835 | /* Return the name of the fontset who has ID. */ | 820 | /* Return the name of the fontset who has ID. */ |
| 836 | 821 | ||
| 837 | Lisp_Object | 822 | Lisp_Object |
| 838 | fontset_name (id) | 823 | fontset_name (int id) |
| 839 | int id; | ||
| 840 | { | 824 | { |
| 841 | Lisp_Object fontset; | 825 | Lisp_Object fontset; |
| 842 | 826 | ||
| @@ -848,8 +832,7 @@ fontset_name (id) | |||
| 848 | /* Return the ASCII font name of the fontset who has ID. */ | 832 | /* Return the ASCII font name of the fontset who has ID. */ |
| 849 | 833 | ||
| 850 | Lisp_Object | 834 | Lisp_Object |
| 851 | fontset_ascii (id) | 835 | fontset_ascii (int id) |
| 852 | int id; | ||
| 853 | { | 836 | { |
| 854 | Lisp_Object fontset, elt; | 837 | Lisp_Object fontset, elt; |
| 855 | 838 | ||
| @@ -861,9 +844,7 @@ fontset_ascii (id) | |||
| 861 | } | 844 | } |
| 862 | 845 | ||
| 863 | void | 846 | void |
| 864 | free_realized_fontset (f, fontset) | 847 | free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) |
| 865 | FRAME_PTR f; | ||
| 866 | Lisp_Object fontset; | ||
| 867 | { | 848 | { |
| 868 | Lisp_Object tail; | 849 | Lisp_Object tail; |
| 869 | 850 | ||
| @@ -879,9 +860,7 @@ free_realized_fontset (f, fontset) | |||
| 879 | free_realized_face. */ | 860 | free_realized_face. */ |
| 880 | 861 | ||
| 881 | void | 862 | void |
| 882 | free_face_fontset (f, face) | 863 | free_face_fontset (FRAME_PTR f, struct face *face) |
| 883 | FRAME_PTR f; | ||
| 884 | struct face *face; | ||
| 885 | { | 864 | { |
| 886 | Lisp_Object fontset; | 865 | Lisp_Object fontset; |
| 887 | 866 | ||
| @@ -915,9 +894,7 @@ free_face_fontset (f, face) | |||
| 915 | when C is not an ASCII character. */ | 894 | when C is not an ASCII character. */ |
| 916 | 895 | ||
| 917 | int | 896 | int |
| 918 | face_suitable_for_char_p (face, c) | 897 | face_suitable_for_char_p (struct face *face, int c) |
| 919 | struct face *face; | ||
| 920 | int c; | ||
| 921 | { | 898 | { |
| 922 | Lisp_Object fontset, rfont_def; | 899 | Lisp_Object fontset, rfont_def; |
| 923 | 900 | ||
| @@ -934,11 +911,7 @@ face_suitable_for_char_p (face, c) | |||
| 934 | the macro FACE_FOR_CHAR. */ | 911 | the macro FACE_FOR_CHAR. */ |
| 935 | 912 | ||
| 936 | int | 913 | int |
| 937 | face_for_char (f, face, c, pos, object) | 914 | face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object object) |
| 938 | FRAME_PTR f; | ||
| 939 | struct face *face; | ||
| 940 | int c, pos; | ||
| 941 | Lisp_Object object; | ||
| 942 | { | 915 | { |
| 943 | Lisp_Object fontset, rfont_def, charset; | 916 | Lisp_Object fontset, rfont_def, charset; |
| 944 | int face_id; | 917 | int face_id; |
| @@ -1006,10 +979,7 @@ face_for_char (f, face, c, pos, object) | |||
| 1006 | 979 | ||
| 1007 | 980 | ||
| 1008 | Lisp_Object | 981 | Lisp_Object |
| 1009 | font_for_char (face, c, pos, object) | 982 | font_for_char (struct face *face, int c, int pos, Lisp_Object object) |
| 1010 | struct face *face; | ||
| 1011 | int c, pos; | ||
| 1012 | Lisp_Object object; | ||
| 1013 | { | 983 | { |
| 1014 | Lisp_Object fontset, rfont_def, charset; | 984 | Lisp_Object fontset, rfont_def, charset; |
| 1015 | int id; | 985 | int id; |
| @@ -1059,10 +1029,7 @@ font_for_char (face, c, pos, object) | |||
| 1059 | Called from realize_x_face. */ | 1029 | Called from realize_x_face. */ |
| 1060 | 1030 | ||
| 1061 | int | 1031 | int |
| 1062 | make_fontset_for_ascii_face (f, base_fontset_id, face) | 1032 | make_fontset_for_ascii_face (FRAME_PTR f, int base_fontset_id, struct face *face) |
| 1063 | FRAME_PTR f; | ||
| 1064 | int base_fontset_id; | ||
| 1065 | struct face *face; | ||
| 1066 | { | 1033 | { |
| 1067 | Lisp_Object base_fontset, fontset, frame; | 1034 | Lisp_Object base_fontset, fontset, frame; |
| 1068 | 1035 | ||
| @@ -1096,8 +1063,7 @@ static Lisp_Object Vcached_fontset_data; | |||
| 1096 | expression corresponding to PATTERN. */ | 1063 | expression corresponding to PATTERN. */ |
| 1097 | 1064 | ||
| 1098 | static Lisp_Object | 1065 | static Lisp_Object |
| 1099 | fontset_pattern_regexp (pattern) | 1066 | fontset_pattern_regexp (Lisp_Object pattern) |
| 1100 | Lisp_Object pattern; | ||
| 1101 | { | 1067 | { |
| 1102 | if (!index ((char *) SDATA (pattern), '*') | 1068 | if (!index ((char *) SDATA (pattern), '*') |
| 1103 | && !index ((char *) SDATA (pattern), '?')) | 1069 | && !index ((char *) SDATA (pattern), '?')) |
| @@ -1171,9 +1137,7 @@ fontset_pattern_regexp (pattern) | |||
| 1171 | */ | 1137 | */ |
| 1172 | 1138 | ||
| 1173 | int | 1139 | int |
| 1174 | fs_query_fontset (name, name_pattern) | 1140 | fs_query_fontset (Lisp_Object name, int name_pattern) |
| 1175 | Lisp_Object name; | ||
| 1176 | int name_pattern; | ||
| 1177 | { | 1141 | { |
| 1178 | Lisp_Object tem; | 1142 | Lisp_Object tem; |
| 1179 | int i; | 1143 | int i; |
| @@ -1246,10 +1210,7 @@ If REGEXPP is non-nil, PATTERN is a regular expression. */) | |||
| 1246 | /* Return a list of base fontset names matching PATTERN on frame F. */ | 1210 | /* Return a list of base fontset names matching PATTERN on frame F. */ |
| 1247 | 1211 | ||
| 1248 | Lisp_Object | 1212 | Lisp_Object |
| 1249 | list_fontsets (f, pattern, size) | 1213 | list_fontsets (FRAME_PTR f, Lisp_Object pattern, int size) |
| 1250 | FRAME_PTR f; | ||
| 1251 | Lisp_Object pattern; | ||
| 1252 | int size; | ||
| 1253 | { | 1214 | { |
| 1254 | Lisp_Object frame, regexp, val; | 1215 | Lisp_Object frame, regexp, val; |
| 1255 | int id; | 1216 | int id; |
| @@ -1285,8 +1246,7 @@ list_fontsets (f, pattern, size) | |||
| 1285 | /* Free all realized fontsets whose base fontset is BASE. */ | 1246 | /* Free all realized fontsets whose base fontset is BASE. */ |
| 1286 | 1247 | ||
| 1287 | static void | 1248 | static void |
| 1288 | free_realized_fontsets (base) | 1249 | free_realized_fontsets (Lisp_Object base) |
| 1289 | Lisp_Object base; | ||
| 1290 | { | 1250 | { |
| 1291 | int id; | 1251 | int id; |
| 1292 | 1252 | ||
| @@ -1343,8 +1303,7 @@ free_realized_fontsets (base) | |||
| 1343 | Set *FRAME to the actual frame. */ | 1303 | Set *FRAME to the actual frame. */ |
| 1344 | 1304 | ||
| 1345 | static Lisp_Object | 1305 | static Lisp_Object |
| 1346 | check_fontset_name (name, frame) | 1306 | check_fontset_name (Lisp_Object name, Lisp_Object *frame) |
| 1347 | Lisp_Object name, *frame; | ||
| 1348 | { | 1307 | { |
| 1349 | int id; | 1308 | int id; |
| 1350 | 1309 | ||
| @@ -1373,8 +1332,7 @@ check_fontset_name (name, frame) | |||
| 1373 | } | 1332 | } |
| 1374 | 1333 | ||
| 1375 | static void | 1334 | static void |
| 1376 | accumulate_script_ranges (arg, range, val) | 1335 | accumulate_script_ranges (Lisp_Object arg, Lisp_Object range, Lisp_Object val) |
| 1377 | Lisp_Object arg, range, val; | ||
| 1378 | { | 1336 | { |
| 1379 | if (EQ (XCAR (arg), val)) | 1337 | if (EQ (XCAR (arg), val)) |
| 1380 | { | 1338 | { |
| @@ -1399,8 +1357,7 @@ accumulate_script_ranges (arg, range, val) | |||
| 1399 | case. */ | 1357 | case. */ |
| 1400 | 1358 | ||
| 1401 | static void | 1359 | static void |
| 1402 | set_fontset_font (arg, range) | 1360 | set_fontset_font (Lisp_Object arg, Lisp_Object range) |
| 1403 | Lisp_Object arg, range; | ||
| 1404 | { | 1361 | { |
| 1405 | Lisp_Object fontset, font_def, add, ascii, script_range_list; | 1362 | Lisp_Object fontset, font_def, add, ascii, script_range_list; |
| 1406 | int from = XINT (XCAR (range)), to = XINT (XCDR (range)); | 1363 | int from = XINT (XCAR (range)), to = XINT (XCDR (range)); |
| @@ -1762,8 +1719,7 @@ static int num_auto_fontsets; | |||
| 1762 | user intends to use FONT-OBJECT for Latin characters. */ | 1719 | user intends to use FONT-OBJECT for Latin characters. */ |
| 1763 | 1720 | ||
| 1764 | int | 1721 | int |
| 1765 | fontset_from_font (font_object) | 1722 | fontset_from_font (Lisp_Object font_object) |
| 1766 | Lisp_Object font_object; | ||
| 1767 | { | 1723 | { |
| 1768 | Lisp_Object font_name = font_get_name (font_object); | 1724 | Lisp_Object font_name = font_get_name (font_object); |
| 1769 | Lisp_Object font_spec = Fcopy_font_spec (font_object); | 1725 | Lisp_Object font_spec = Fcopy_font_spec (font_object); |
| @@ -1819,8 +1775,7 @@ fontset_from_font (font_object) | |||
| 1819 | fontset_from_font. */ | 1775 | fontset_from_font. */ |
| 1820 | 1776 | ||
| 1821 | static void | 1777 | static void |
| 1822 | update_auto_fontset_alist (font_object, fontset) | 1778 | update_auto_fontset_alist (Lisp_Object font_object, Lisp_Object fontset) |
| 1823 | Lisp_Object font_object, fontset; | ||
| 1824 | { | 1779 | { |
| 1825 | Lisp_Object prev, tail; | 1780 | Lisp_Object prev, tail; |
| 1826 | 1781 | ||
| @@ -2224,7 +2179,7 @@ DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, | |||
| 2224 | #endif /* FONTSET_DEBUG */ | 2179 | #endif /* FONTSET_DEBUG */ |
| 2225 | 2180 | ||
| 2226 | void | 2181 | void |
| 2227 | syms_of_fontset () | 2182 | syms_of_fontset (void) |
| 2228 | { | 2183 | { |
| 2229 | DEFSYM (Qfontset, "fontset"); | 2184 | DEFSYM (Qfontset, "fontset"); |
| 2230 | Fput (Qfontset, Qchar_table_extra_slots, make_number (9)); | 2185 | Fput (Qfontset, Qchar_table_extra_slots, make_number (9)); |
diff --git a/src/frame.c b/src/frame.c index 3199d35004e..33b09c66cd7 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -142,9 +142,7 @@ static Lisp_Object Vdelete_frame_functions, Qdelete_frame_functions; | |||
| 142 | int focus_follows_mouse; | 142 | int focus_follows_mouse; |
| 143 | 143 | ||
| 144 | static void | 144 | static void |
| 145 | set_menu_bar_lines_1 (window, n) | 145 | set_menu_bar_lines_1 (Lisp_Object window, int n) |
| 146 | Lisp_Object window; | ||
| 147 | int n; | ||
| 148 | { | 146 | { |
| 149 | struct window *w = XWINDOW (window); | 147 | struct window *w = XWINDOW (window); |
| 150 | 148 | ||
| @@ -170,9 +168,7 @@ set_menu_bar_lines_1 (window, n) | |||
| 170 | } | 168 | } |
| 171 | 169 | ||
| 172 | void | 170 | void |
| 173 | set_menu_bar_lines (f, value, oldval) | 171 | set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 174 | struct frame *f; | ||
| 175 | Lisp_Object value, oldval; | ||
| 176 | { | 172 | { |
| 177 | int nlines; | 173 | int nlines; |
| 178 | int olines = FRAME_MENU_BAR_LINES (f); | 174 | int olines = FRAME_MENU_BAR_LINES (f); |
| @@ -202,9 +198,9 @@ set_menu_bar_lines (f, value, oldval) | |||
| 202 | Lisp_Object Vframe_list; | 198 | Lisp_Object Vframe_list; |
| 203 | 199 | ||
| 204 | extern Lisp_Object Vminibuffer_list; | 200 | extern Lisp_Object Vminibuffer_list; |
| 205 | extern Lisp_Object get_minibuffer (); | 201 | extern Lisp_Object get_minibuffer (int); |
| 206 | extern Lisp_Object Fhandle_switch_frame (); | 202 | extern Lisp_Object Fhandle_switch_frame (Lisp_Object event); |
| 207 | extern Lisp_Object Fredirect_frame_focus (); | 203 | extern Lisp_Object Fredirect_frame_focus (Lisp_Object frame, Lisp_Object focus_frame); |
| 208 | extern Lisp_Object x_get_focus_frame (); | 204 | extern Lisp_Object x_get_focus_frame (); |
| 209 | extern Lisp_Object QCname, Qfont_param; | 205 | extern Lisp_Object QCname, Qfont_param; |
| 210 | 206 | ||
| @@ -282,8 +278,7 @@ FRAME defaults to the currently selected frame. */) | |||
| 282 | } | 278 | } |
| 283 | 279 | ||
| 284 | struct frame * | 280 | struct frame * |
| 285 | make_frame (mini_p) | 281 | make_frame (int mini_p) |
| 286 | int mini_p; | ||
| 287 | { | 282 | { |
| 288 | Lisp_Object frame; | 283 | Lisp_Object frame; |
| 289 | register struct frame *f; | 284 | register struct frame *f; |
| @@ -433,10 +428,7 @@ make_frame (mini_p) | |||
| 433 | default (the global minibuffer). */ | 428 | default (the global minibuffer). */ |
| 434 | 429 | ||
| 435 | struct frame * | 430 | struct frame * |
| 436 | make_frame_without_minibuffer (mini_window, kb, display) | 431 | make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lisp_Object display) |
| 437 | register Lisp_Object mini_window; | ||
| 438 | KBOARD *kb; | ||
| 439 | Lisp_Object display; | ||
| 440 | { | 432 | { |
| 441 | register struct frame *f; | 433 | register struct frame *f; |
| 442 | struct gcpro gcpro1; | 434 | struct gcpro gcpro1; |
| @@ -485,7 +477,7 @@ make_frame_without_minibuffer (mini_window, kb, display) | |||
| 485 | /* Make a frame containing only a minibuffer window. */ | 477 | /* Make a frame containing only a minibuffer window. */ |
| 486 | 478 | ||
| 487 | struct frame * | 479 | struct frame * |
| 488 | make_minibuffer_frame () | 480 | make_minibuffer_frame (void) |
| 489 | { | 481 | { |
| 490 | /* First make a frame containing just a root window, no minibuffer. */ | 482 | /* First make a frame containing just a root window, no minibuffer. */ |
| 491 | 483 | ||
| @@ -784,9 +776,7 @@ affects all frames on the same terminal device. */) | |||
| 784 | The value of NORECORD is passed as argument to Fselect_window. */ | 776 | The value of NORECORD is passed as argument to Fselect_window. */ |
| 785 | 777 | ||
| 786 | Lisp_Object | 778 | Lisp_Object |
| 787 | do_switch_frame (frame, track, for_deletion, norecord) | 779 | do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object norecord) |
| 788 | Lisp_Object frame, norecord; | ||
| 789 | int track, for_deletion; | ||
| 790 | { | 780 | { |
| 791 | struct frame *sf = SELECTED_FRAME (); | 781 | struct frame *sf = SELECTED_FRAME (); |
| 792 | 782 | ||
| @@ -1061,9 +1051,7 @@ DEFUN ("frame-list", Fframe_list, Sframe_list, | |||
| 1061 | Otherwise, include all frames. */ | 1051 | Otherwise, include all frames. */ |
| 1062 | 1052 | ||
| 1063 | static Lisp_Object | 1053 | static Lisp_Object |
| 1064 | next_frame (frame, minibuf) | 1054 | next_frame (Lisp_Object frame, Lisp_Object minibuf) |
| 1065 | Lisp_Object frame; | ||
| 1066 | Lisp_Object minibuf; | ||
| 1067 | { | 1055 | { |
| 1068 | Lisp_Object tail; | 1056 | Lisp_Object tail; |
| 1069 | int passed = 0; | 1057 | int passed = 0; |
| @@ -1141,9 +1129,7 @@ next_frame (frame, minibuf) | |||
| 1141 | Otherwise, include all frames. */ | 1129 | Otherwise, include all frames. */ |
| 1142 | 1130 | ||
| 1143 | static Lisp_Object | 1131 | static Lisp_Object |
| 1144 | prev_frame (frame, minibuf) | 1132 | prev_frame (Lisp_Object frame, Lisp_Object minibuf) |
| 1145 | Lisp_Object frame; | ||
| 1146 | Lisp_Object minibuf; | ||
| 1147 | { | 1133 | { |
| 1148 | Lisp_Object tail; | 1134 | Lisp_Object tail; |
| 1149 | Lisp_Object prev; | 1135 | Lisp_Object prev; |
| @@ -1261,8 +1247,7 @@ Otherwise, include all frames. */) | |||
| 1261 | (Exception: if F is the terminal frame, and we are using X, return 1.) */ | 1247 | (Exception: if F is the terminal frame, and we are using X, return 1.) */ |
| 1262 | 1248 | ||
| 1263 | int | 1249 | int |
| 1264 | other_visible_frames (f) | 1250 | other_visible_frames (FRAME_PTR f) |
| 1265 | FRAME_PTR f; | ||
| 1266 | { | 1251 | { |
| 1267 | /* We know the selected frame is visible, | 1252 | /* We know the selected frame is visible, |
| 1268 | so if F is some other frame, it can't be the sole visible one. */ | 1253 | so if F is some other frame, it can't be the sole visible one. */ |
| @@ -1316,11 +1301,11 @@ extern Lisp_Object Qrun_hook_with_args; | |||
| 1316 | this. Any other value of FORCE implements the semantics | 1301 | this. Any other value of FORCE implements the semantics |
| 1317 | described for Fdelete_frame. */ | 1302 | described for Fdelete_frame. */ |
| 1318 | Lisp_Object | 1303 | Lisp_Object |
| 1319 | delete_frame (frame, force) | 1304 | delete_frame (Lisp_Object frame, Lisp_Object force) |
| 1320 | /* If we use `register' here, gcc-4.0.2 on amd64 using | 1305 | /* If we use `register' here, gcc-4.0.2 on amd64 using |
| 1321 | -DUSE_LISP_UNION_TYPE complains further down that we're getting the | 1306 | -DUSE_LISP_UNION_TYPE complains further down that we're getting the |
| 1322 | address of `force'. Go figure. */ | 1307 | address of `force'. Go figure. */ |
| 1323 | Lisp_Object frame, force; | 1308 | |
| 1324 | { | 1309 | { |
| 1325 | struct frame *f; | 1310 | struct frame *f; |
| 1326 | struct frame *sf = SELECTED_FRAME (); | 1311 | struct frame *sf = SELECTED_FRAME (); |
| @@ -1858,8 +1843,7 @@ If omitted, FRAME defaults to the currently selected frame. */) | |||
| 1858 | and all its descendents. */ | 1843 | and all its descendents. */ |
| 1859 | 1844 | ||
| 1860 | static void | 1845 | static void |
| 1861 | make_frame_visible_1 (window) | 1846 | make_frame_visible_1 (Lisp_Object window) |
| 1862 | Lisp_Object window; | ||
| 1863 | { | 1847 | { |
| 1864 | struct window *w; | 1848 | struct window *w; |
| 1865 | 1849 | ||
| @@ -2136,9 +2120,7 @@ See `redirect-frame-focus'. */) | |||
| 2136 | /* Return the value of frame parameter PROP in frame FRAME. */ | 2120 | /* Return the value of frame parameter PROP in frame FRAME. */ |
| 2137 | 2121 | ||
| 2138 | Lisp_Object | 2122 | Lisp_Object |
| 2139 | get_frame_param (frame, prop) | 2123 | get_frame_param (register struct frame *frame, Lisp_Object prop) |
| 2140 | register struct frame *frame; | ||
| 2141 | Lisp_Object prop; | ||
| 2142 | { | 2124 | { |
| 2143 | register Lisp_Object tem; | 2125 | register Lisp_Object tem; |
| 2144 | 2126 | ||
| @@ -2151,8 +2133,7 @@ get_frame_param (frame, prop) | |||
| 2151 | /* Return the buffer-predicate of the selected frame. */ | 2133 | /* Return the buffer-predicate of the selected frame. */ |
| 2152 | 2134 | ||
| 2153 | Lisp_Object | 2135 | Lisp_Object |
| 2154 | frame_buffer_predicate (frame) | 2136 | frame_buffer_predicate (Lisp_Object frame) |
| 2155 | Lisp_Object frame; | ||
| 2156 | { | 2137 | { |
| 2157 | return XFRAME (frame)->buffer_predicate; | 2138 | return XFRAME (frame)->buffer_predicate; |
| 2158 | } | 2139 | } |
| @@ -2160,8 +2141,7 @@ frame_buffer_predicate (frame) | |||
| 2160 | /* Return the buffer-list of the selected frame. */ | 2141 | /* Return the buffer-list of the selected frame. */ |
| 2161 | 2142 | ||
| 2162 | Lisp_Object | 2143 | Lisp_Object |
| 2163 | frame_buffer_list (frame) | 2144 | frame_buffer_list (Lisp_Object frame) |
| 2164 | Lisp_Object frame; | ||
| 2165 | { | 2145 | { |
| 2166 | return XFRAME (frame)->buffer_list; | 2146 | return XFRAME (frame)->buffer_list; |
| 2167 | } | 2147 | } |
| @@ -2169,8 +2149,7 @@ frame_buffer_list (frame) | |||
| 2169 | /* Set the buffer-list of the selected frame. */ | 2149 | /* Set the buffer-list of the selected frame. */ |
| 2170 | 2150 | ||
| 2171 | void | 2151 | void |
| 2172 | set_frame_buffer_list (frame, list) | 2152 | set_frame_buffer_list (Lisp_Object frame, Lisp_Object list) |
| 2173 | Lisp_Object frame, list; | ||
| 2174 | { | 2153 | { |
| 2175 | XFRAME (frame)->buffer_list = list; | 2154 | XFRAME (frame)->buffer_list = list; |
| 2176 | } | 2155 | } |
| @@ -2178,8 +2157,7 @@ set_frame_buffer_list (frame, list) | |||
| 2178 | /* Discard BUFFER from the buffer-list and buried-buffer-list of each frame. */ | 2157 | /* Discard BUFFER from the buffer-list and buried-buffer-list of each frame. */ |
| 2179 | 2158 | ||
| 2180 | void | 2159 | void |
| 2181 | frames_discard_buffer (buffer) | 2160 | frames_discard_buffer (Lisp_Object buffer) |
| 2182 | Lisp_Object buffer; | ||
| 2183 | { | 2161 | { |
| 2184 | Lisp_Object frame, tail; | 2162 | Lisp_Object frame, tail; |
| 2185 | 2163 | ||
| @@ -2196,9 +2174,7 @@ frames_discard_buffer (buffer) | |||
| 2196 | If the alist already has an element for PROP, we change it. */ | 2174 | If the alist already has an element for PROP, we change it. */ |
| 2197 | 2175 | ||
| 2198 | void | 2176 | void |
| 2199 | store_in_alist (alistptr, prop, val) | 2177 | store_in_alist (Lisp_Object *alistptr, Lisp_Object prop, Lisp_Object val) |
| 2200 | Lisp_Object *alistptr, val; | ||
| 2201 | Lisp_Object prop; | ||
| 2202 | { | 2178 | { |
| 2203 | register Lisp_Object tem; | 2179 | register Lisp_Object tem; |
| 2204 | 2180 | ||
| @@ -2210,9 +2186,7 @@ store_in_alist (alistptr, prop, val) | |||
| 2210 | } | 2186 | } |
| 2211 | 2187 | ||
| 2212 | static int | 2188 | static int |
| 2213 | frame_name_fnn_p (str, len) | 2189 | frame_name_fnn_p (char *str, EMACS_INT len) |
| 2214 | char *str; | ||
| 2215 | EMACS_INT len; | ||
| 2216 | { | 2190 | { |
| 2217 | if (len > 1 && str[0] == 'F') | 2191 | if (len > 1 && str[0] == 'F') |
| 2218 | { | 2192 | { |
| @@ -2230,9 +2204,7 @@ frame_name_fnn_p (str, len) | |||
| 2230 | Modeled after x_set_name which is used for WINDOW frames. */ | 2204 | Modeled after x_set_name which is used for WINDOW frames. */ |
| 2231 | 2205 | ||
| 2232 | static void | 2206 | static void |
| 2233 | set_term_frame_name (f, name) | 2207 | set_term_frame_name (struct frame *f, Lisp_Object name) |
| 2234 | struct frame *f; | ||
| 2235 | Lisp_Object name; | ||
| 2236 | { | 2208 | { |
| 2237 | f->explicit_name = ! NILP (name); | 2209 | f->explicit_name = ! NILP (name); |
| 2238 | 2210 | ||
| @@ -2270,9 +2242,7 @@ set_term_frame_name (f, name) | |||
| 2270 | } | 2242 | } |
| 2271 | 2243 | ||
| 2272 | void | 2244 | void |
| 2273 | store_frame_param (f, prop, val) | 2245 | store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val) |
| 2274 | struct frame *f; | ||
| 2275 | Lisp_Object prop, val; | ||
| 2276 | { | 2246 | { |
| 2277 | register Lisp_Object old_alist_elt; | 2247 | register Lisp_Object old_alist_elt; |
| 2278 | 2248 | ||
| @@ -2893,12 +2863,7 @@ extern Lisp_Object Qtop; | |||
| 2893 | */ | 2863 | */ |
| 2894 | 2864 | ||
| 2895 | void | 2865 | void |
| 2896 | x_fullscreen_adjust (f, width, height, top_pos, left_pos) | 2866 | x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int *left_pos) |
| 2897 | struct frame *f; | ||
| 2898 | int *width; | ||
| 2899 | int *height; | ||
| 2900 | int *top_pos; | ||
| 2901 | int *left_pos; | ||
| 2902 | { | 2867 | { |
| 2903 | int newwidth = FRAME_COLS (f); | 2868 | int newwidth = FRAME_COLS (f); |
| 2904 | int newheight = FRAME_LINES (f); | 2869 | int newheight = FRAME_LINES (f); |
| @@ -2941,9 +2906,7 @@ x_fullscreen_adjust (f, width, height, top_pos, left_pos) | |||
| 2941 | to store the new value in the parameter alist. */ | 2906 | to store the new value in the parameter alist. */ |
| 2942 | 2907 | ||
| 2943 | void | 2908 | void |
| 2944 | x_set_frame_parameters (f, alist) | 2909 | x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) |
| 2945 | FRAME_PTR f; | ||
| 2946 | Lisp_Object alist; | ||
| 2947 | { | 2910 | { |
| 2948 | Lisp_Object tail; | 2911 | Lisp_Object tail; |
| 2949 | 2912 | ||
| @@ -3217,9 +3180,7 @@ x_set_frame_parameters (f, alist) | |||
| 3217 | param_alist need to be considered here. */ | 3180 | param_alist need to be considered here. */ |
| 3218 | 3181 | ||
| 3219 | void | 3182 | void |
| 3220 | x_report_frame_params (f, alistptr) | 3183 | x_report_frame_params (struct frame *f, Lisp_Object *alistptr) |
| 3221 | struct frame *f; | ||
| 3222 | Lisp_Object *alistptr; | ||
| 3223 | { | 3184 | { |
| 3224 | char buf[16]; | 3185 | char buf[16]; |
| 3225 | Lisp_Object tem; | 3186 | Lisp_Object tem; |
| @@ -3288,9 +3249,7 @@ x_report_frame_params (f, alistptr) | |||
| 3288 | the previous value of that parameter, NEW_VALUE is the new value. */ | 3249 | the previous value of that parameter, NEW_VALUE is the new value. */ |
| 3289 | 3250 | ||
| 3290 | void | 3251 | void |
| 3291 | x_set_fullscreen (f, new_value, old_value) | 3252 | x_set_fullscreen (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 3292 | struct frame *f; | ||
| 3293 | Lisp_Object new_value, old_value; | ||
| 3294 | { | 3253 | { |
| 3295 | if (NILP (new_value)) | 3254 | if (NILP (new_value)) |
| 3296 | f->want_fullscreen = FULLSCREEN_NONE; | 3255 | f->want_fullscreen = FULLSCREEN_NONE; |
| @@ -3312,9 +3271,7 @@ x_set_fullscreen (f, new_value, old_value) | |||
| 3312 | the previous value of that parameter, NEW_VALUE is the new value. */ | 3271 | the previous value of that parameter, NEW_VALUE is the new value. */ |
| 3313 | 3272 | ||
| 3314 | void | 3273 | void |
| 3315 | x_set_line_spacing (f, new_value, old_value) | 3274 | x_set_line_spacing (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 3316 | struct frame *f; | ||
| 3317 | Lisp_Object new_value, old_value; | ||
| 3318 | { | 3275 | { |
| 3319 | if (NILP (new_value)) | 3276 | if (NILP (new_value)) |
| 3320 | f->extra_line_spacing = 0; | 3277 | f->extra_line_spacing = 0; |
| @@ -3331,9 +3288,7 @@ x_set_line_spacing (f, new_value, old_value) | |||
| 3331 | the previous value of that parameter, NEW_VALUE is the new value. */ | 3288 | the previous value of that parameter, NEW_VALUE is the new value. */ |
| 3332 | 3289 | ||
| 3333 | void | 3290 | void |
| 3334 | x_set_screen_gamma (f, new_value, old_value) | 3291 | x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 3335 | struct frame *f; | ||
| 3336 | Lisp_Object new_value, old_value; | ||
| 3337 | { | 3292 | { |
| 3338 | Lisp_Object bgcolor; | 3293 | Lisp_Object bgcolor; |
| 3339 | 3294 | ||
| @@ -3363,9 +3318,7 @@ x_set_screen_gamma (f, new_value, old_value) | |||
| 3363 | 3318 | ||
| 3364 | 3319 | ||
| 3365 | void | 3320 | void |
| 3366 | x_set_font (f, arg, oldval) | 3321 | x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3367 | struct frame *f; | ||
| 3368 | Lisp_Object arg, oldval; | ||
| 3369 | { | 3322 | { |
| 3370 | Lisp_Object frame, font_object, font_param = Qnil; | 3323 | Lisp_Object frame, font_object, font_param = Qnil; |
| 3371 | int fontset = -1; | 3324 | int fontset = -1; |
| @@ -3462,9 +3415,7 @@ x_set_font (f, arg, oldval) | |||
| 3462 | 3415 | ||
| 3463 | 3416 | ||
| 3464 | void | 3417 | void |
| 3465 | x_set_font_backend (f, new_value, old_value) | 3418 | x_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 3466 | struct frame *f; | ||
| 3467 | Lisp_Object new_value, old_value; | ||
| 3468 | { | 3419 | { |
| 3469 | if (! NILP (new_value) | 3420 | if (! NILP (new_value) |
| 3470 | && !CONSP (new_value)) | 3421 | && !CONSP (new_value)) |
| @@ -3520,17 +3471,13 @@ x_set_font_backend (f, new_value, old_value) | |||
| 3520 | 3471 | ||
| 3521 | 3472 | ||
| 3522 | void | 3473 | void |
| 3523 | x_set_fringe_width (f, new_value, old_value) | 3474 | x_set_fringe_width (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 3524 | struct frame *f; | ||
| 3525 | Lisp_Object new_value, old_value; | ||
| 3526 | { | 3475 | { |
| 3527 | compute_fringe_widths (f, 1); | 3476 | compute_fringe_widths (f, 1); |
| 3528 | } | 3477 | } |
| 3529 | 3478 | ||
| 3530 | void | 3479 | void |
| 3531 | x_set_border_width (f, arg, oldval) | 3480 | x_set_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3532 | struct frame *f; | ||
| 3533 | Lisp_Object arg, oldval; | ||
| 3534 | { | 3481 | { |
| 3535 | CHECK_NUMBER (arg); | 3482 | CHECK_NUMBER (arg); |
| 3536 | 3483 | ||
| @@ -3544,9 +3491,7 @@ x_set_border_width (f, arg, oldval) | |||
| 3544 | } | 3491 | } |
| 3545 | 3492 | ||
| 3546 | void | 3493 | void |
| 3547 | x_set_internal_border_width (f, arg, oldval) | 3494 | x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3548 | struct frame *f; | ||
| 3549 | Lisp_Object arg, oldval; | ||
| 3550 | { | 3495 | { |
| 3551 | int old = FRAME_INTERNAL_BORDER_WIDTH (f); | 3496 | int old = FRAME_INTERNAL_BORDER_WIDTH (f); |
| 3552 | 3497 | ||
| @@ -3574,9 +3519,7 @@ x_set_internal_border_width (f, arg, oldval) | |||
| 3574 | } | 3519 | } |
| 3575 | 3520 | ||
| 3576 | void | 3521 | void |
| 3577 | x_set_visibility (f, value, oldval) | 3522 | x_set_visibility (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 3578 | struct frame *f; | ||
| 3579 | Lisp_Object value, oldval; | ||
| 3580 | { | 3523 | { |
| 3581 | Lisp_Object frame; | 3524 | Lisp_Object frame; |
| 3582 | XSETFRAME (frame, f); | 3525 | XSETFRAME (frame, f); |
| @@ -3590,33 +3533,25 @@ x_set_visibility (f, value, oldval) | |||
| 3590 | } | 3533 | } |
| 3591 | 3534 | ||
| 3592 | void | 3535 | void |
| 3593 | x_set_autoraise (f, arg, oldval) | 3536 | x_set_autoraise (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3594 | struct frame *f; | ||
| 3595 | Lisp_Object arg, oldval; | ||
| 3596 | { | 3537 | { |
| 3597 | f->auto_raise = !EQ (Qnil, arg); | 3538 | f->auto_raise = !EQ (Qnil, arg); |
| 3598 | } | 3539 | } |
| 3599 | 3540 | ||
| 3600 | void | 3541 | void |
| 3601 | x_set_autolower (f, arg, oldval) | 3542 | x_set_autolower (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3602 | struct frame *f; | ||
| 3603 | Lisp_Object arg, oldval; | ||
| 3604 | { | 3543 | { |
| 3605 | f->auto_lower = !EQ (Qnil, arg); | 3544 | f->auto_lower = !EQ (Qnil, arg); |
| 3606 | } | 3545 | } |
| 3607 | 3546 | ||
| 3608 | void | 3547 | void |
| 3609 | x_set_unsplittable (f, arg, oldval) | 3548 | x_set_unsplittable (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3610 | struct frame *f; | ||
| 3611 | Lisp_Object arg, oldval; | ||
| 3612 | { | 3549 | { |
| 3613 | f->no_split = !NILP (arg); | 3550 | f->no_split = !NILP (arg); |
| 3614 | } | 3551 | } |
| 3615 | 3552 | ||
| 3616 | void | 3553 | void |
| 3617 | x_set_vertical_scroll_bars (f, arg, oldval) | 3554 | x_set_vertical_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3618 | struct frame *f; | ||
| 3619 | Lisp_Object arg, oldval; | ||
| 3620 | { | 3555 | { |
| 3621 | if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)) | 3556 | if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)) |
| 3622 | || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) | 3557 | || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) |
| @@ -3647,9 +3582,7 @@ x_set_vertical_scroll_bars (f, arg, oldval) | |||
| 3647 | } | 3582 | } |
| 3648 | 3583 | ||
| 3649 | void | 3584 | void |
| 3650 | x_set_scroll_bar_width (f, arg, oldval) | 3585 | x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3651 | struct frame *f; | ||
| 3652 | Lisp_Object arg, oldval; | ||
| 3653 | { | 3586 | { |
| 3654 | int wid = FRAME_COLUMN_WIDTH (f); | 3587 | int wid = FRAME_COLUMN_WIDTH (f); |
| 3655 | 3588 | ||
| @@ -3684,8 +3617,7 @@ x_set_scroll_bar_width (f, arg, oldval) | |||
| 3684 | /* Return non-nil if frame F wants a bitmap icon. */ | 3617 | /* Return non-nil if frame F wants a bitmap icon. */ |
| 3685 | 3618 | ||
| 3686 | Lisp_Object | 3619 | Lisp_Object |
| 3687 | x_icon_type (f) | 3620 | x_icon_type (FRAME_PTR f) |
| 3688 | FRAME_PTR f; | ||
| 3689 | { | 3621 | { |
| 3690 | Lisp_Object tem; | 3622 | Lisp_Object tem; |
| 3691 | 3623 | ||
| @@ -3697,9 +3629,7 @@ x_icon_type (f) | |||
| 3697 | } | 3629 | } |
| 3698 | 3630 | ||
| 3699 | void | 3631 | void |
| 3700 | x_set_alpha (f, arg, oldval) | 3632 | x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 3701 | struct frame *f; | ||
| 3702 | Lisp_Object arg, oldval; | ||
| 3703 | { | 3633 | { |
| 3704 | double alpha = 1.0; | 3634 | double alpha = 1.0; |
| 3705 | double newval[2]; | 3635 | double newval[2]; |
| @@ -3757,7 +3687,7 @@ x_set_alpha (f, arg, oldval) | |||
| 3757 | Fix it up, or set it to `emacs' if it is too hopeless. */ | 3687 | Fix it up, or set it to `emacs' if it is too hopeless. */ |
| 3758 | 3688 | ||
| 3759 | void | 3689 | void |
| 3760 | validate_x_resource_name () | 3690 | validate_x_resource_name (void) |
| 3761 | { | 3691 | { |
| 3762 | int len = 0; | 3692 | int len = 0; |
| 3763 | /* Number of valid characters in the resource name. */ | 3693 | /* Number of valid characters in the resource name. */ |
| @@ -3832,9 +3762,7 @@ extern Display_Info *check_x_display_info (Lisp_Object); | |||
| 3832 | See Fx_get_resource below for other parameters. */ | 3762 | See Fx_get_resource below for other parameters. */ |
| 3833 | 3763 | ||
| 3834 | static Lisp_Object | 3764 | static Lisp_Object |
| 3835 | xrdb_get_resource (rdb, attribute, class, component, subclass) | 3765 | xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass) |
| 3836 | XrmDatabase rdb; | ||
| 3837 | Lisp_Object attribute, class, component, subclass; | ||
| 3838 | { | 3766 | { |
| 3839 | register char *value; | 3767 | register char *value; |
| 3840 | char *name_key; | 3768 | char *name_key; |
| @@ -3919,9 +3847,7 @@ and the class is `Emacs.CLASS.SUBCLASS'. */) | |||
| 3919 | /* Get an X resource, like Fx_get_resource, but for display DPYINFO. */ | 3847 | /* Get an X resource, like Fx_get_resource, but for display DPYINFO. */ |
| 3920 | 3848 | ||
| 3921 | Lisp_Object | 3849 | Lisp_Object |
| 3922 | display_x_get_resource (dpyinfo, attribute, class, component, subclass) | 3850 | display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass) |
| 3923 | Display_Info *dpyinfo; | ||
| 3924 | Lisp_Object attribute, class, component, subclass; | ||
| 3925 | { | 3851 | { |
| 3926 | return xrdb_get_resource (dpyinfo->xrdb, | 3852 | return xrdb_get_resource (dpyinfo->xrdb, |
| 3927 | attribute, class, component, subclass); | 3853 | attribute, class, component, subclass); |
| @@ -3931,8 +3857,7 @@ display_x_get_resource (dpyinfo, attribute, class, component, subclass) | |||
| 3931 | /* Used when C code wants a resource value. */ | 3857 | /* Used when C code wants a resource value. */ |
| 3932 | /* Called from oldXMenu/Create.c. */ | 3858 | /* Called from oldXMenu/Create.c. */ |
| 3933 | char * | 3859 | char * |
| 3934 | x_get_resource_string (attribute, class) | 3860 | x_get_resource_string (char *attribute, char *class) |
| 3935 | char *attribute, *class; | ||
| 3936 | { | 3861 | { |
| 3937 | char *name_key; | 3862 | char *name_key; |
| 3938 | char *class_key; | 3863 | char *class_key; |
| @@ -3965,12 +3890,7 @@ x_get_resource_string (attribute, class) | |||
| 3965 | and don't let it get stored in any Lisp-visible variables! */ | 3890 | and don't let it get stored in any Lisp-visible variables! */ |
| 3966 | 3891 | ||
| 3967 | Lisp_Object | 3892 | Lisp_Object |
| 3968 | x_get_arg (dpyinfo, alist, param, attribute, class, type) | 3893 | x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) |
| 3969 | Display_Info *dpyinfo; | ||
| 3970 | Lisp_Object alist, param; | ||
| 3971 | char *attribute; | ||
| 3972 | char *class; | ||
| 3973 | enum resource_types type; | ||
| 3974 | { | 3894 | { |
| 3975 | register Lisp_Object tem; | 3895 | register Lisp_Object tem; |
| 3976 | 3896 | ||
| @@ -4068,12 +3988,7 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type) | |||
| 4068 | } | 3988 | } |
| 4069 | 3989 | ||
| 4070 | Lisp_Object | 3990 | Lisp_Object |
| 4071 | x_frame_get_arg (f, alist, param, attribute, class, type) | 3991 | x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) |
| 4072 | struct frame *f; | ||
| 4073 | Lisp_Object alist, param; | ||
| 4074 | char *attribute; | ||
| 4075 | char *class; | ||
| 4076 | enum resource_types type; | ||
| 4077 | { | 3992 | { |
| 4078 | return x_get_arg (FRAME_X_DISPLAY_INFO (f), | 3993 | return x_get_arg (FRAME_X_DISPLAY_INFO (f), |
| 4079 | alist, param, attribute, class, type); | 3994 | alist, param, attribute, class, type); |
| @@ -4082,12 +3997,7 @@ x_frame_get_arg (f, alist, param, attribute, class, type) | |||
| 4082 | /* Like x_frame_get_arg, but also record the value in f->param_alist. */ | 3997 | /* Like x_frame_get_arg, but also record the value in f->param_alist. */ |
| 4083 | 3998 | ||
| 4084 | Lisp_Object | 3999 | Lisp_Object |
| 4085 | x_frame_get_and_record_arg (f, alist, param, attribute, class, type) | 4000 | x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) |
| 4086 | struct frame *f; | ||
| 4087 | Lisp_Object alist, param; | ||
| 4088 | char *attribute; | ||
| 4089 | char *class; | ||
| 4090 | enum resource_types type; | ||
| 4091 | { | 4001 | { |
| 4092 | Lisp_Object value; | 4002 | Lisp_Object value; |
| 4093 | 4003 | ||
| @@ -4107,14 +4017,7 @@ x_frame_get_and_record_arg (f, alist, param, attribute, class, type) | |||
| 4107 | If that is not found either, use the value DEFLT. */ | 4017 | If that is not found either, use the value DEFLT. */ |
| 4108 | 4018 | ||
| 4109 | Lisp_Object | 4019 | Lisp_Object |
| 4110 | x_default_parameter (f, alist, prop, deflt, xprop, xclass, type) | 4020 | x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, Lisp_Object deflt, char *xprop, char *xclass, enum resource_types type) |
| 4111 | struct frame *f; | ||
| 4112 | Lisp_Object alist; | ||
| 4113 | Lisp_Object prop; | ||
| 4114 | Lisp_Object deflt; | ||
| 4115 | char *xprop; | ||
| 4116 | char *xclass; | ||
| 4117 | enum resource_types type; | ||
| 4118 | { | 4021 | { |
| 4119 | Lisp_Object tem; | 4022 | Lisp_Object tem; |
| 4120 | 4023 | ||
| @@ -4208,10 +4111,7 @@ On Nextstep, this just calls `ns-parse-geometry'. */) | |||
| 4208 | #define DEFAULT_COLS 80 | 4111 | #define DEFAULT_COLS 80 |
| 4209 | 4112 | ||
| 4210 | int | 4113 | int |
| 4211 | x_figure_window_size (f, parms, toolbar_p) | 4114 | x_figure_window_size (struct frame *f, Lisp_Object parms, int toolbar_p) |
| 4212 | struct frame *f; | ||
| 4213 | Lisp_Object parms; | ||
| 4214 | int toolbar_p; | ||
| 4215 | { | 4115 | { |
| 4216 | register Lisp_Object tem0, tem1, tem2; | 4116 | register Lisp_Object tem0, tem1, tem2; |
| 4217 | long window_prompting = 0; | 4117 | long window_prompting = 0; |
| @@ -4386,7 +4286,7 @@ x_figure_window_size (f, parms, toolbar_p) | |||
| 4386 | #endif /* HAVE_WINDOW_SYSTEM */ | 4286 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 4387 | 4287 | ||
| 4388 | void | 4288 | void |
| 4389 | frame_make_pointer_invisible () | 4289 | frame_make_pointer_invisible (void) |
| 4390 | { | 4290 | { |
| 4391 | if (! NILP (Vmake_pointer_invisible)) | 4291 | if (! NILP (Vmake_pointer_invisible)) |
| 4392 | { | 4292 | { |
| @@ -4406,7 +4306,7 @@ frame_make_pointer_invisible () | |||
| 4406 | } | 4306 | } |
| 4407 | 4307 | ||
| 4408 | void | 4308 | void |
| 4409 | frame_make_pointer_visible () | 4309 | frame_make_pointer_visible (void) |
| 4410 | { | 4310 | { |
| 4411 | /* We don't check Vmake_pointer_invisible here in case the | 4311 | /* We don't check Vmake_pointer_invisible here in case the |
| 4412 | pointer was invisible when Vmake_pointer_invisible was set to nil. */ | 4312 | pointer was invisible when Vmake_pointer_invisible was set to nil. */ |
| @@ -4431,7 +4331,7 @@ frame_make_pointer_visible () | |||
| 4431 | ***********************************************************************/ | 4331 | ***********************************************************************/ |
| 4432 | 4332 | ||
| 4433 | void | 4333 | void |
| 4434 | syms_of_frame () | 4334 | syms_of_frame (void) |
| 4435 | { | 4335 | { |
| 4436 | Qframep = intern_c_string ("framep"); | 4336 | Qframep = intern_c_string ("framep"); |
| 4437 | staticpro (&Qframep); | 4337 | staticpro (&Qframep); |
diff --git a/src/fringe.c b/src/fringe.c index dcb4705e2e5..9e1d7003d4f 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -490,8 +490,7 @@ int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; | |||
| 490 | Return 0 if not a bitmap. */ | 490 | Return 0 if not a bitmap. */ |
| 491 | 491 | ||
| 492 | int | 492 | int |
| 493 | lookup_fringe_bitmap (bitmap) | 493 | lookup_fringe_bitmap (Lisp_Object bitmap) |
| 494 | Lisp_Object bitmap; | ||
| 495 | { | 494 | { |
| 496 | int bn; | 495 | int bn; |
| 497 | 496 | ||
| @@ -517,8 +516,7 @@ lookup_fringe_bitmap (bitmap) | |||
| 517 | Return BN if not found in Vfringe_bitmaps. */ | 516 | Return BN if not found in Vfringe_bitmaps. */ |
| 518 | 517 | ||
| 519 | static Lisp_Object | 518 | static Lisp_Object |
| 520 | get_fringe_bitmap_name (bn) | 519 | get_fringe_bitmap_name (int bn) |
| 521 | int bn; | ||
| 522 | { | 520 | { |
| 523 | Lisp_Object bitmaps; | 521 | Lisp_Object bitmaps; |
| 524 | Lisp_Object num; | 522 | Lisp_Object num; |
| @@ -550,11 +548,7 @@ get_fringe_bitmap_name (bn) | |||
| 550 | */ | 548 | */ |
| 551 | 549 | ||
| 552 | static void | 550 | static void |
| 553 | draw_fringe_bitmap_1 (w, row, left_p, overlay, which) | 551 | draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int overlay, int which) |
| 554 | struct window *w; | ||
| 555 | struct glyph_row *row; | ||
| 556 | int left_p, overlay; | ||
| 557 | int which; | ||
| 558 | { | 552 | { |
| 559 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 553 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 560 | struct draw_fringe_bitmap_params p; | 554 | struct draw_fringe_bitmap_params p; |
| @@ -690,9 +684,7 @@ draw_fringe_bitmap_1 (w, row, left_p, overlay, which) | |||
| 690 | } | 684 | } |
| 691 | 685 | ||
| 692 | static int | 686 | static int |
| 693 | get_logical_cursor_bitmap (w, cursor) | 687 | get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor) |
| 694 | struct window *w; | ||
| 695 | Lisp_Object cursor; | ||
| 696 | { | 688 | { |
| 697 | Lisp_Object cmap, bm = Qnil; | 689 | Lisp_Object cmap, bm = Qnil; |
| 698 | 690 | ||
| @@ -715,10 +707,7 @@ get_logical_cursor_bitmap (w, cursor) | |||
| 715 | } | 707 | } |
| 716 | 708 | ||
| 717 | static int | 709 | static int |
| 718 | get_logical_fringe_bitmap (w, bitmap, right_p, partial_p) | 710 | get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, int partial_p) |
| 719 | struct window *w; | ||
| 720 | Lisp_Object bitmap; | ||
| 721 | int right_p, partial_p; | ||
| 722 | { | 711 | { |
| 723 | Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm; | 712 | Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm; |
| 724 | int ln1 = 0, ln2 = 0; | 713 | int ln1 = 0, ln2 = 0; |
| @@ -818,10 +807,7 @@ get_logical_fringe_bitmap (w, bitmap, right_p, partial_p) | |||
| 818 | 807 | ||
| 819 | 808 | ||
| 820 | void | 809 | void |
| 821 | draw_fringe_bitmap (w, row, left_p) | 810 | draw_fringe_bitmap (struct window *w, struct glyph_row *row, int left_p) |
| 822 | struct window *w; | ||
| 823 | struct glyph_row *row; | ||
| 824 | int left_p; | ||
| 825 | { | 811 | { |
| 826 | int overlay = 0; | 812 | int overlay = 0; |
| 827 | 813 | ||
| @@ -874,9 +860,7 @@ draw_fringe_bitmap (w, row, left_p) | |||
| 874 | function with input blocked. */ | 860 | function with input blocked. */ |
| 875 | 861 | ||
| 876 | void | 862 | void |
| 877 | draw_row_fringe_bitmaps (w, row) | 863 | draw_row_fringe_bitmaps (struct window *w, struct glyph_row *row) |
| 878 | struct window *w; | ||
| 879 | struct glyph_row *row; | ||
| 880 | { | 864 | { |
| 881 | xassert (interrupt_input_blocked); | 865 | xassert (interrupt_input_blocked); |
| 882 | 866 | ||
| @@ -904,9 +888,7 @@ draw_row_fringe_bitmaps (w, row) | |||
| 904 | */ | 888 | */ |
| 905 | 889 | ||
| 906 | int | 890 | int |
| 907 | draw_window_fringes (w, no_fringe) | 891 | draw_window_fringes (struct window *w, int no_fringe) |
| 908 | struct window *w; | ||
| 909 | int no_fringe; | ||
| 910 | { | 892 | { |
| 911 | struct glyph_row *row; | 893 | struct glyph_row *row; |
| 912 | int yb = window_text_bottom_y (w); | 894 | int yb = window_text_bottom_y (w); |
| @@ -944,9 +926,7 @@ draw_window_fringes (w, no_fringe) | |||
| 944 | If KEEP_CURRENT_P is 0, update current_matrix too. */ | 926 | If KEEP_CURRENT_P is 0, update current_matrix too. */ |
| 945 | 927 | ||
| 946 | int | 928 | int |
| 947 | update_window_fringes (w, keep_current_p) | 929 | update_window_fringes (struct window *w, int keep_current_p) |
| 948 | struct window *w; | ||
| 949 | int keep_current_p; | ||
| 950 | { | 930 | { |
| 951 | struct glyph_row *row, *cur = 0; | 931 | struct glyph_row *row, *cur = 0; |
| 952 | int yb = window_text_bottom_y (w); | 932 | int yb = window_text_bottom_y (w); |
| @@ -1188,9 +1168,7 @@ update_window_fringes (w, keep_current_p) | |||
| 1188 | */ | 1168 | */ |
| 1189 | 1169 | ||
| 1190 | void | 1170 | void |
| 1191 | compute_fringe_widths (f, redraw) | 1171 | compute_fringe_widths (struct frame *f, int redraw) |
| 1192 | struct frame *f; | ||
| 1193 | int redraw; | ||
| 1194 | { | 1172 | { |
| 1195 | int o_left = FRAME_LEFT_FRINGE_WIDTH (f); | 1173 | int o_left = FRAME_LEFT_FRINGE_WIDTH (f); |
| 1196 | int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); | 1174 | int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); |
| @@ -1272,8 +1250,7 @@ compute_fringe_widths (f, redraw) | |||
| 1272 | /* Free resources used by a user-defined bitmap. */ | 1250 | /* Free resources used by a user-defined bitmap. */ |
| 1273 | 1251 | ||
| 1274 | void | 1252 | void |
| 1275 | destroy_fringe_bitmap (n) | 1253 | destroy_fringe_bitmap (int n) |
| 1276 | int n; | ||
| 1277 | { | 1254 | { |
| 1278 | struct fringe_bitmap **fbp; | 1255 | struct fringe_bitmap **fbp; |
| 1279 | 1256 | ||
| @@ -1342,10 +1319,7 @@ static const unsigned char swap_nibble[16] = { | |||
| 1342 | #endif /* HAVE_X_WINDOWS */ | 1319 | #endif /* HAVE_X_WINDOWS */ |
| 1343 | 1320 | ||
| 1344 | void | 1321 | void |
| 1345 | init_fringe_bitmap (which, fb, once_p) | 1322 | init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p) |
| 1346 | int which; | ||
| 1347 | struct fringe_bitmap *fb; | ||
| 1348 | int once_p; | ||
| 1349 | { | 1323 | { |
| 1350 | if (once_p || fb->dynamic) | 1324 | if (once_p || fb->dynamic) |
| 1351 | { | 1325 | { |
| @@ -1620,7 +1594,7 @@ Return nil if POS is not visible in WINDOW. */) | |||
| 1620 | ***********************************************************************/ | 1594 | ***********************************************************************/ |
| 1621 | 1595 | ||
| 1622 | void | 1596 | void |
| 1623 | syms_of_fringe () | 1597 | syms_of_fringe (void) |
| 1624 | { | 1598 | { |
| 1625 | Qtruncation = intern_c_string ("truncation"); | 1599 | Qtruncation = intern_c_string ("truncation"); |
| 1626 | staticpro (&Qtruncation); | 1600 | staticpro (&Qtruncation); |
| @@ -1657,7 +1631,7 @@ If nil, also continue lines which are exactly as wide as the window. */); | |||
| 1657 | /* Garbage collection hook */ | 1631 | /* Garbage collection hook */ |
| 1658 | 1632 | ||
| 1659 | void | 1633 | void |
| 1660 | mark_fringe_data () | 1634 | mark_fringe_data (void) |
| 1661 | { | 1635 | { |
| 1662 | int i; | 1636 | int i; |
| 1663 | 1637 | ||
| @@ -1669,7 +1643,7 @@ mark_fringe_data () | |||
| 1669 | /* Initialize this module when Emacs starts. */ | 1643 | /* Initialize this module when Emacs starts. */ |
| 1670 | 1644 | ||
| 1671 | void | 1645 | void |
| 1672 | init_fringe_once () | 1646 | init_fringe_once (void) |
| 1673 | { | 1647 | { |
| 1674 | int bt; | 1648 | int bt; |
| 1675 | 1649 | ||
| @@ -1678,7 +1652,7 @@ init_fringe_once () | |||
| 1678 | } | 1652 | } |
| 1679 | 1653 | ||
| 1680 | void | 1654 | void |
| 1681 | init_fringe () | 1655 | init_fringe (void) |
| 1682 | { | 1656 | { |
| 1683 | int i; | 1657 | int i; |
| 1684 | 1658 | ||
diff --git a/src/ftfont.c b/src/ftfont.c index a75296cc7b7..83d1e033abb 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -188,9 +188,7 @@ get_adstyle_property (FcPattern *p) | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static Lisp_Object | 190 | static Lisp_Object |
| 191 | ftfont_pattern_entity (p, extra) | 191 | ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) |
| 192 | FcPattern *p; | ||
| 193 | Lisp_Object extra; | ||
| 194 | { | 192 | { |
| 195 | Lisp_Object key, cache, entity; | 193 | Lisp_Object key, cache, entity; |
| 196 | char *file, *str; | 194 | char *file, *str; |
| @@ -289,9 +287,7 @@ ftfont_pattern_entity (p, extra) | |||
| 289 | static Lisp_Object ftfont_generic_family_list; | 287 | static Lisp_Object ftfont_generic_family_list; |
| 290 | 288 | ||
| 291 | static Lisp_Object | 289 | static Lisp_Object |
| 292 | ftfont_resolve_generic_family (family, pattern) | 290 | ftfont_resolve_generic_family (Lisp_Object family, FcPattern *pattern) |
| 293 | Lisp_Object family; | ||
| 294 | FcPattern *pattern; | ||
| 295 | { | 291 | { |
| 296 | Lisp_Object slot; | 292 | Lisp_Object slot; |
| 297 | FcPattern *match; | 293 | FcPattern *match; |
| @@ -348,9 +344,7 @@ struct ftfont_cache_data | |||
| 348 | }; | 344 | }; |
| 349 | 345 | ||
| 350 | static Lisp_Object | 346 | static Lisp_Object |
| 351 | ftfont_lookup_cache (key, cache_for) | 347 | ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) |
| 352 | Lisp_Object key; | ||
| 353 | enum ftfont_cache_for cache_for; | ||
| 354 | { | 348 | { |
| 355 | Lisp_Object cache, val, entity; | 349 | Lisp_Object cache, val, entity; |
| 356 | struct ftfont_cache_data *cache_data; | 350 | struct ftfont_cache_data *cache_data; |
| @@ -450,8 +444,7 @@ ftfont_lookup_cache (key, cache_for) | |||
| 450 | } | 444 | } |
| 451 | 445 | ||
| 452 | FcCharSet * | 446 | FcCharSet * |
| 453 | ftfont_get_fc_charset (entity) | 447 | ftfont_get_fc_charset (Lisp_Object entity) |
| 454 | Lisp_Object entity; | ||
| 455 | { | 448 | { |
| 456 | Lisp_Object val, cache; | 449 | Lisp_Object val, cache; |
| 457 | struct ftfont_cache_data *cache_data; | 450 | struct ftfont_cache_data *cache_data; |
| @@ -559,15 +552,13 @@ struct font_driver ftfont_driver = | |||
| 559 | extern Lisp_Object QCname; | 552 | extern Lisp_Object QCname; |
| 560 | 553 | ||
| 561 | static Lisp_Object | 554 | static Lisp_Object |
| 562 | ftfont_get_cache (f) | 555 | ftfont_get_cache (FRAME_PTR f) |
| 563 | FRAME_PTR f; | ||
| 564 | { | 556 | { |
| 565 | return freetype_font_cache; | 557 | return freetype_font_cache; |
| 566 | } | 558 | } |
| 567 | 559 | ||
| 568 | static int | 560 | static int |
| 569 | ftfont_get_charset (registry) | 561 | ftfont_get_charset (Lisp_Object registry) |
| 570 | Lisp_Object registry; | ||
| 571 | { | 562 | { |
| 572 | char *str = (char *) SDATA (SYMBOL_NAME (registry)); | 563 | char *str = (char *) SDATA (SYMBOL_NAME (registry)); |
| 573 | char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1); | 564 | char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1); |
| @@ -710,11 +701,7 @@ static FcPattern *ftfont_spec_pattern (Lisp_Object, char *, | |||
| 710 | char **langname); | 701 | char **langname); |
| 711 | 702 | ||
| 712 | static FcPattern * | 703 | static FcPattern * |
| 713 | ftfont_spec_pattern (spec, otlayout, otspec, langname) | 704 | ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **otspec, char **langname) |
| 714 | Lisp_Object spec; | ||
| 715 | char *otlayout; | ||
| 716 | struct OpenTypeSpec **otspec; | ||
| 717 | char **langname; | ||
| 718 | { | 705 | { |
| 719 | Lisp_Object tmp, extra; | 706 | Lisp_Object tmp, extra; |
| 720 | FcPattern *pattern = NULL; | 707 | FcPattern *pattern = NULL; |
| @@ -871,8 +858,7 @@ ftfont_spec_pattern (spec, otlayout, otspec, langname) | |||
| 871 | } | 858 | } |
| 872 | 859 | ||
| 873 | static Lisp_Object | 860 | static Lisp_Object |
| 874 | ftfont_list (frame, spec) | 861 | ftfont_list (Lisp_Object frame, Lisp_Object spec) |
| 875 | Lisp_Object frame, spec; | ||
| 876 | { | 862 | { |
| 877 | Lisp_Object val = Qnil, family, adstyle; | 863 | Lisp_Object val = Qnil, family, adstyle; |
| 878 | int i; | 864 | int i; |
| @@ -1069,8 +1055,7 @@ ftfont_list (frame, spec) | |||
| 1069 | } | 1055 | } |
| 1070 | 1056 | ||
| 1071 | static Lisp_Object | 1057 | static Lisp_Object |
| 1072 | ftfont_match (frame, spec) | 1058 | ftfont_match (Lisp_Object frame, Lisp_Object spec) |
| 1073 | Lisp_Object frame, spec; | ||
| 1074 | { | 1059 | { |
| 1075 | Lisp_Object entity = Qnil; | 1060 | Lisp_Object entity = Qnil; |
| 1076 | FcPattern *pattern, *match = NULL; | 1061 | FcPattern *pattern, *match = NULL; |
| @@ -1120,8 +1105,7 @@ ftfont_match (frame, spec) | |||
| 1120 | } | 1105 | } |
| 1121 | 1106 | ||
| 1122 | static Lisp_Object | 1107 | static Lisp_Object |
| 1123 | ftfont_list_family (frame) | 1108 | ftfont_list_family (Lisp_Object frame) |
| 1124 | Lisp_Object frame; | ||
| 1125 | { | 1109 | { |
| 1126 | Lisp_Object list = Qnil; | 1110 | Lisp_Object list = Qnil; |
| 1127 | FcPattern *pattern = NULL; | 1111 | FcPattern *pattern = NULL; |
| @@ -1164,10 +1148,7 @@ ftfont_list_family (frame) | |||
| 1164 | 1148 | ||
| 1165 | 1149 | ||
| 1166 | static Lisp_Object | 1150 | static Lisp_Object |
| 1167 | ftfont_open (f, entity, pixel_size) | 1151 | ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) |
| 1168 | FRAME_PTR f; | ||
| 1169 | Lisp_Object entity; | ||
| 1170 | int pixel_size; | ||
| 1171 | { | 1152 | { |
| 1172 | struct ftfont_info *ftfont_info; | 1153 | struct ftfont_info *ftfont_info; |
| 1173 | struct font *font; | 1154 | struct font *font; |
| @@ -1307,9 +1288,7 @@ ftfont_open (f, entity, pixel_size) | |||
| 1307 | } | 1288 | } |
| 1308 | 1289 | ||
| 1309 | static void | 1290 | static void |
| 1310 | ftfont_close (f, font) | 1291 | ftfont_close (FRAME_PTR f, struct font *font) |
| 1311 | FRAME_PTR f; | ||
| 1312 | struct font *font; | ||
| 1313 | { | 1292 | { |
| 1314 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1293 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1315 | Lisp_Object val, cache; | 1294 | Lisp_Object val, cache; |
| @@ -1335,9 +1314,7 @@ ftfont_close (f, font) | |||
| 1335 | } | 1314 | } |
| 1336 | 1315 | ||
| 1337 | static int | 1316 | static int |
| 1338 | ftfont_has_char (font, c) | 1317 | ftfont_has_char (Lisp_Object font, int c) |
| 1339 | Lisp_Object font; | ||
| 1340 | int c; | ||
| 1341 | { | 1318 | { |
| 1342 | struct charset *cs = NULL; | 1319 | struct charset *cs = NULL; |
| 1343 | 1320 | ||
| @@ -1367,9 +1344,7 @@ ftfont_has_char (font, c) | |||
| 1367 | } | 1344 | } |
| 1368 | 1345 | ||
| 1369 | static unsigned | 1346 | static unsigned |
| 1370 | ftfont_encode_char (font, c) | 1347 | ftfont_encode_char (struct font *font, int c) |
| 1371 | struct font *font; | ||
| 1372 | int c; | ||
| 1373 | { | 1348 | { |
| 1374 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1349 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1375 | FT_Face ft_face = ftfont_info->ft_size->face; | 1350 | FT_Face ft_face = ftfont_info->ft_size->face; |
| @@ -1380,11 +1355,7 @@ ftfont_encode_char (font, c) | |||
| 1380 | } | 1355 | } |
| 1381 | 1356 | ||
| 1382 | static int | 1357 | static int |
| 1383 | ftfont_text_extents (font, code, nglyphs, metrics) | 1358 | ftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics) |
| 1384 | struct font *font; | ||
| 1385 | unsigned *code; | ||
| 1386 | int nglyphs; | ||
| 1387 | struct font_metrics *metrics; | ||
| 1388 | { | 1359 | { |
| 1389 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1360 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1390 | FT_Face ft_face = ftfont_info->ft_size->face; | 1361 | FT_Face ft_face = ftfont_info->ft_size->face; |
| @@ -1439,11 +1410,7 @@ ftfont_text_extents (font, code, nglyphs, metrics) | |||
| 1439 | } | 1410 | } |
| 1440 | 1411 | ||
| 1441 | static int | 1412 | static int |
| 1442 | ftfont_get_bitmap (font, code, bitmap, bits_per_pixel) | 1413 | ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bitmap, int bits_per_pixel) |
| 1443 | struct font *font; | ||
| 1444 | unsigned code; | ||
| 1445 | struct font_bitmap *bitmap; | ||
| 1446 | int bits_per_pixel; | ||
| 1447 | { | 1414 | { |
| 1448 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1415 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1449 | FT_Face ft_face = ftfont_info->ft_size->face; | 1416 | FT_Face ft_face = ftfont_info->ft_size->face; |
| @@ -1487,11 +1454,7 @@ ftfont_get_bitmap (font, code, bitmap, bits_per_pixel) | |||
| 1487 | } | 1454 | } |
| 1488 | 1455 | ||
| 1489 | static int | 1456 | static int |
| 1490 | ftfont_anchor_point (font, code, index, x, y) | 1457 | ftfont_anchor_point (struct font *font, unsigned int code, int index, int *x, int *y) |
| 1491 | struct font *font; | ||
| 1492 | unsigned code; | ||
| 1493 | int index; | ||
| 1494 | int *x, *y; | ||
| 1495 | { | 1458 | { |
| 1496 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1459 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1497 | FT_Face ft_face = ftfont_info->ft_size->face; | 1460 | FT_Face ft_face = ftfont_info->ft_size->face; |
| @@ -2677,9 +2640,7 @@ static const char *ftfont_non_booleans [] = { | |||
| 2677 | }; | 2640 | }; |
| 2678 | 2641 | ||
| 2679 | static void | 2642 | static void |
| 2680 | ftfont_filter_properties (font, alist) | 2643 | ftfont_filter_properties (Lisp_Object font, Lisp_Object alist) |
| 2681 | Lisp_Object font; | ||
| 2682 | Lisp_Object alist; | ||
| 2683 | { | 2644 | { |
| 2684 | Lisp_Object it; | 2645 | Lisp_Object it; |
| 2685 | int i; | 2646 | int i; |
| @@ -2721,7 +2682,7 @@ ftfont_filter_properties (font, alist) | |||
| 2721 | 2682 | ||
| 2722 | 2683 | ||
| 2723 | void | 2684 | void |
| 2724 | syms_of_ftfont () | 2685 | syms_of_ftfont (void) |
| 2725 | { | 2686 | { |
| 2726 | DEFSYM (Qfreetype, "freetype"); | 2687 | DEFSYM (Qfreetype, "freetype"); |
| 2727 | DEFSYM (Qmonospace, "monospace"); | 2688 | DEFSYM (Qmonospace, "monospace"); |
diff --git a/src/ftxfont.c b/src/ftxfont.c index e81a5380045..0a9137617b8 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -61,9 +61,7 @@ struct ftxfont_frame_data | |||
| 61 | /* Return an array of 6 GCs for antialiasing. */ | 61 | /* Return an array of 6 GCs for antialiasing. */ |
| 62 | 62 | ||
| 63 | static GC * | 63 | static GC * |
| 64 | ftxfont_get_gcs (f, foreground, background) | 64 | ftxfont_get_gcs (FRAME_PTR f, long unsigned int foreground, long unsigned int background) |
| 65 | FRAME_PTR f; | ||
| 66 | unsigned long foreground, background; | ||
| 67 | { | 65 | { |
| 68 | XColor color; | 66 | XColor color; |
| 69 | XGCValues xgcv; | 67 | XGCValues xgcv; |
| @@ -140,15 +138,7 @@ ftxfont_get_gcs (f, foreground, background) | |||
| 140 | } | 138 | } |
| 141 | 139 | ||
| 142 | static int | 140 | static int |
| 143 | ftxfont_draw_bitmap (f, gc_fore, gcs, font, code, x, y, p, size, n, flush) | 141 | ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsigned int code, int x, int y, XPoint *p, int size, int *n, int flush) |
| 144 | FRAME_PTR f; | ||
| 145 | GC gc_fore, *gcs; | ||
| 146 | struct font *font; | ||
| 147 | unsigned code; | ||
| 148 | int x, y; | ||
| 149 | XPoint *p; | ||
| 150 | int size, *n; | ||
| 151 | int flush; | ||
| 152 | { | 142 | { |
| 153 | struct font_bitmap bitmap; | 143 | struct font_bitmap bitmap; |
| 154 | unsigned char *b; | 144 | unsigned char *b; |
| @@ -224,11 +214,7 @@ ftxfont_draw_bitmap (f, gc_fore, gcs, font, code, x, y, p, size, n, flush) | |||
| 224 | } | 214 | } |
| 225 | 215 | ||
| 226 | static void | 216 | static void |
| 227 | ftxfont_draw_backgrond (f, font, gc, x, y, width) | 217 | ftxfont_draw_backgrond (FRAME_PTR f, struct font *font, GC gc, int x, int y, int width) |
| 228 | FRAME_PTR f; | ||
| 229 | struct font *font; | ||
| 230 | GC gc; | ||
| 231 | int x, y, width; | ||
| 232 | { | 218 | { |
| 233 | XGCValues xgcv; | 219 | XGCValues xgcv; |
| 234 | 220 | ||
| @@ -250,9 +236,7 @@ static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); | |||
| 250 | struct font_driver ftxfont_driver; | 236 | struct font_driver ftxfont_driver; |
| 251 | 237 | ||
| 252 | static Lisp_Object | 238 | static Lisp_Object |
| 253 | ftxfont_list (frame, spec) | 239 | ftxfont_list (Lisp_Object frame, Lisp_Object spec) |
| 254 | Lisp_Object frame; | ||
| 255 | Lisp_Object spec; | ||
| 256 | { | 240 | { |
| 257 | Lisp_Object list = ftfont_driver.list (frame, spec), tail; | 241 | Lisp_Object list = ftfont_driver.list (frame, spec), tail; |
| 258 | 242 | ||
| @@ -262,9 +246,7 @@ ftxfont_list (frame, spec) | |||
| 262 | } | 246 | } |
| 263 | 247 | ||
| 264 | static Lisp_Object | 248 | static Lisp_Object |
| 265 | ftxfont_match (frame, spec) | 249 | ftxfont_match (Lisp_Object frame, Lisp_Object spec) |
| 266 | Lisp_Object frame; | ||
| 267 | Lisp_Object spec; | ||
| 268 | { | 250 | { |
| 269 | Lisp_Object entity = ftfont_driver.match (frame, spec); | 251 | Lisp_Object entity = ftfont_driver.match (frame, spec); |
| 270 | 252 | ||
| @@ -274,10 +256,7 @@ ftxfont_match (frame, spec) | |||
| 274 | } | 256 | } |
| 275 | 257 | ||
| 276 | static Lisp_Object | 258 | static Lisp_Object |
| 277 | ftxfont_open (f, entity, pixel_size) | 259 | ftxfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) |
| 278 | FRAME_PTR f; | ||
| 279 | Lisp_Object entity; | ||
| 280 | int pixel_size; | ||
| 281 | { | 260 | { |
| 282 | Lisp_Object font_object; | 261 | Lisp_Object font_object; |
| 283 | struct font *font; | 262 | struct font *font; |
| @@ -291,17 +270,13 @@ ftxfont_open (f, entity, pixel_size) | |||
| 291 | } | 270 | } |
| 292 | 271 | ||
| 293 | static void | 272 | static void |
| 294 | ftxfont_close (f, font) | 273 | ftxfont_close (FRAME_PTR f, struct font *font) |
| 295 | FRAME_PTR f; | ||
| 296 | struct font *font; | ||
| 297 | { | 274 | { |
| 298 | ftfont_driver.close (f, font); | 275 | ftfont_driver.close (f, font); |
| 299 | } | 276 | } |
| 300 | 277 | ||
| 301 | static int | 278 | static int |
| 302 | ftxfont_draw (s, from, to, x, y, with_background) | 279 | ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) |
| 303 | struct glyph_string *s; | ||
| 304 | int from, to, x, y, with_background; | ||
| 305 | { | 280 | { |
| 306 | FRAME_PTR f = s->f; | 281 | FRAME_PTR f = s->f; |
| 307 | struct face *face = s->face; | 282 | struct face *face = s->face; |
| @@ -372,8 +347,7 @@ ftxfont_draw (s, from, to, x, y, with_background) | |||
| 372 | } | 347 | } |
| 373 | 348 | ||
| 374 | static int | 349 | static int |
| 375 | ftxfont_end_for_frame (f) | 350 | ftxfont_end_for_frame (FRAME_PTR f) |
| 376 | FRAME_PTR f; | ||
| 377 | { | 351 | { |
| 378 | struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); | 352 | struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); |
| 379 | 353 | ||
| @@ -396,7 +370,7 @@ ftxfont_end_for_frame (f) | |||
| 396 | 370 | ||
| 397 | 371 | ||
| 398 | void | 372 | void |
| 399 | syms_of_ftxfont () | 373 | syms_of_ftxfont (void) |
| 400 | { | 374 | { |
| 401 | DEFSYM (Qftx, "ftx"); | 375 | DEFSYM (Qftx, "ftx"); |
| 402 | 376 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 63de2b02fe5..ba111164a95 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -85,9 +85,7 @@ static GdkDisplay *gdpy_def; | |||
| 85 | W can be a GtkMenu or a GtkWindow widget. */ | 85 | W can be a GtkMenu or a GtkWindow widget. */ |
| 86 | 86 | ||
| 87 | static void | 87 | static void |
| 88 | xg_set_screen (w, f) | 88 | xg_set_screen (GtkWidget *w, FRAME_PTR f) |
| 89 | GtkWidget *w; | ||
| 90 | FRAME_PTR f; | ||
| 91 | { | 89 | { |
| 92 | if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ()) | 90 | if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ()) |
| 93 | { | 91 | { |
| @@ -110,9 +108,7 @@ xg_set_screen (w, f) | |||
| 110 | multipe displays. */ | 108 | multipe displays. */ |
| 111 | 109 | ||
| 112 | void | 110 | void |
| 113 | xg_display_open (display_name, dpy) | 111 | xg_display_open (char *display_name, Display **dpy) |
| 114 | char *display_name; | ||
| 115 | Display **dpy; | ||
| 116 | { | 112 | { |
| 117 | GdkDisplay *gdpy; | 113 | GdkDisplay *gdpy; |
| 118 | 114 | ||
| @@ -180,7 +176,7 @@ static int malloc_cpt; | |||
| 180 | Return a pointer to the allocated structure. */ | 176 | Return a pointer to the allocated structure. */ |
| 181 | 177 | ||
| 182 | widget_value * | 178 | widget_value * |
| 183 | malloc_widget_value () | 179 | malloc_widget_value (void) |
| 184 | { | 180 | { |
| 185 | widget_value *wv; | 181 | widget_value *wv; |
| 186 | if (widget_value_free_list) | 182 | if (widget_value_free_list) |
| @@ -202,8 +198,7 @@ malloc_widget_value () | |||
| 202 | by malloc_widget_value, and no substructures. */ | 198 | by malloc_widget_value, and no substructures. */ |
| 203 | 199 | ||
| 204 | void | 200 | void |
| 205 | free_widget_value (wv) | 201 | free_widget_value (widget_value *wv) |
| 206 | widget_value *wv; | ||
| 207 | { | 202 | { |
| 208 | if (wv->free_list) | 203 | if (wv->free_list) |
| 209 | abort (); | 204 | abort (); |
| @@ -227,8 +222,7 @@ free_widget_value (wv) | |||
| 227 | scroll bars on display DPY. */ | 222 | scroll bars on display DPY. */ |
| 228 | 223 | ||
| 229 | GdkCursor * | 224 | GdkCursor * |
| 230 | xg_create_default_cursor (dpy) | 225 | xg_create_default_cursor (Display *dpy) |
| 231 | Display *dpy; | ||
| 232 | { | 226 | { |
| 233 | GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy); | 227 | GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy); |
| 234 | return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR); | 228 | return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR); |
| @@ -237,10 +231,7 @@ xg_create_default_cursor (dpy) | |||
| 237 | /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */ | 231 | /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */ |
| 238 | 232 | ||
| 239 | static GdkPixbuf * | 233 | static GdkPixbuf * |
| 240 | xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap) | 234 | xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix, GdkPixmap *gmask, GdkColormap *cmap) |
| 241 | GdkPixmap *gpix; | ||
| 242 | GdkPixmap *gmask; | ||
| 243 | GdkColormap *cmap; | ||
| 244 | { | 235 | { |
| 245 | int width, height; | 236 | int width, height; |
| 246 | GdkPixbuf *icon_buf, *tmp_buf; | 237 | GdkPixbuf *icon_buf, *tmp_buf; |
| @@ -291,8 +282,7 @@ xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap) | |||
| 291 | } | 282 | } |
| 292 | 283 | ||
| 293 | static Lisp_Object | 284 | static Lisp_Object |
| 294 | file_for_image (image) | 285 | file_for_image (Lisp_Object image) |
| 295 | Lisp_Object image; | ||
| 296 | { | 286 | { |
| 297 | Lisp_Object specified_file = Qnil; | 287 | Lisp_Object specified_file = Qnil; |
| 298 | Lisp_Object tail; | 288 | Lisp_Object tail; |
| @@ -319,11 +309,7 @@ file_for_image (image) | |||
| 319 | If OLD_WIDGET is not NULL, that widget is modified. */ | 309 | If OLD_WIDGET is not NULL, that widget is modified. */ |
| 320 | 310 | ||
| 321 | static GtkWidget * | 311 | static GtkWidget * |
| 322 | xg_get_image_for_pixmap (f, img, widget, old_widget) | 312 | xg_get_image_for_pixmap (FRAME_PTR f, struct image *img, GtkWidget *widget, GtkImage *old_widget) |
| 323 | FRAME_PTR f; | ||
| 324 | struct image *img; | ||
| 325 | GtkWidget *widget; | ||
| 326 | GtkImage *old_widget; | ||
| 327 | { | 313 | { |
| 328 | GdkPixmap *gpix; | 314 | GdkPixmap *gpix; |
| 329 | GdkPixmap *gmask; | 315 | GdkPixmap *gmask; |
| @@ -391,9 +377,7 @@ xg_get_image_for_pixmap (f, img, widget, old_widget) | |||
| 391 | and it is those widgets that are visible. */ | 377 | and it is those widgets that are visible. */ |
| 392 | 378 | ||
| 393 | static void | 379 | static void |
| 394 | xg_set_cursor (w, cursor) | 380 | xg_set_cursor (GtkWidget *w, GdkCursor *cursor) |
| 395 | GtkWidget *w; | ||
| 396 | GdkCursor *cursor; | ||
| 397 | { | 381 | { |
| 398 | GdkWindow *window = gtk_widget_get_window(w); | 382 | GdkWindow *window = gtk_widget_get_window(w); |
| 399 | GList *children = gdk_window_peek_children (window); | 383 | GList *children = gdk_window_peek_children (window); |
| @@ -446,8 +430,7 @@ xg_list_remove (xg_list_node *list, xg_list_node *node) | |||
| 446 | with g_free. */ | 430 | with g_free. */ |
| 447 | 431 | ||
| 448 | static char * | 432 | static char * |
| 449 | get_utf8_string (str) | 433 | get_utf8_string (char *str) |
| 450 | char *str; | ||
| 451 | { | 434 | { |
| 452 | char *utf8_str = str; | 435 | char *utf8_str = str; |
| 453 | 436 | ||
| @@ -526,8 +509,7 @@ get_utf8_string (str) | |||
| 526 | F is the frame we shall set geometry for. */ | 509 | F is the frame we shall set geometry for. */ |
| 527 | 510 | ||
| 528 | static void | 511 | static void |
| 529 | xg_set_geometry (f) | 512 | xg_set_geometry (FRAME_PTR f) |
| 530 | FRAME_PTR f; | ||
| 531 | { | 513 | { |
| 532 | if (f->size_hint_flags & (USPosition | PPosition)) | 514 | if (f->size_hint_flags & (USPosition | PPosition)) |
| 533 | { | 515 | { |
| @@ -558,8 +540,7 @@ xg_set_geometry (f) | |||
| 558 | and use a GtkFixed widget, this doesn't happen automatically. */ | 540 | and use a GtkFixed widget, this doesn't happen automatically. */ |
| 559 | 541 | ||
| 560 | static void | 542 | static void |
| 561 | xg_clear_under_internal_border (f) | 543 | xg_clear_under_internal_border (FRAME_PTR f) |
| 562 | FRAME_PTR f; | ||
| 563 | { | 544 | { |
| 564 | if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) | 545 | if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) |
| 565 | { | 546 | { |
| @@ -597,9 +578,7 @@ xg_clear_under_internal_border (f) | |||
| 597 | PIXELWIDTH, PIXELHEIGHT is the new size in pixels. */ | 578 | PIXELWIDTH, PIXELHEIGHT is the new size in pixels. */ |
| 598 | 579 | ||
| 599 | void | 580 | void |
| 600 | xg_frame_resized (f, pixelwidth, pixelheight) | 581 | xg_frame_resized (FRAME_PTR f, int pixelwidth, int pixelheight) |
| 601 | FRAME_PTR f; | ||
| 602 | int pixelwidth, pixelheight; | ||
| 603 | { | 582 | { |
| 604 | int rows, columns; | 583 | int rows, columns; |
| 605 | 584 | ||
| @@ -635,10 +614,7 @@ xg_frame_resized (f, pixelwidth, pixelheight) | |||
| 635 | COLUMNS/ROWS is the size the edit area shall have after the resize. */ | 614 | COLUMNS/ROWS is the size the edit area shall have after the resize. */ |
| 636 | 615 | ||
| 637 | void | 616 | void |
| 638 | xg_frame_set_char_size (f, cols, rows) | 617 | xg_frame_set_char_size (FRAME_PTR f, int cols, int rows) |
| 639 | FRAME_PTR f; | ||
| 640 | int cols; | ||
| 641 | int rows; | ||
| 642 | { | 618 | { |
| 643 | int pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows) | 619 | int pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows) |
| 644 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); | 620 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); |
| @@ -700,8 +676,7 @@ xg_frame_set_char_size (f, cols, rows) | |||
| 700 | The policy is to keep the number of editable lines. */ | 676 | The policy is to keep the number of editable lines. */ |
| 701 | 677 | ||
| 702 | static void | 678 | static void |
| 703 | xg_height_changed (f) | 679 | xg_height_changed (FRAME_PTR f) |
| 704 | FRAME_PTR f; | ||
| 705 | { | 680 | { |
| 706 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 681 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| 707 | FRAME_PIXEL_WIDTH (f), FRAME_TOTAL_PIXEL_HEIGHT (f)); | 682 | FRAME_PIXEL_WIDTH (f), FRAME_TOTAL_PIXEL_HEIGHT (f)); |
| @@ -716,9 +691,7 @@ xg_height_changed (f) | |||
| 716 | Return 0 if no widget match WDESC. */ | 691 | Return 0 if no widget match WDESC. */ |
| 717 | 692 | ||
| 718 | GtkWidget * | 693 | GtkWidget * |
| 719 | xg_win_to_widget (dpy, wdesc) | 694 | xg_win_to_widget (Display *dpy, Window wdesc) |
| 720 | Display *dpy; | ||
| 721 | Window wdesc; | ||
| 722 | { | 695 | { |
| 723 | gpointer gdkwin; | 696 | gpointer gdkwin; |
| 724 | GtkWidget *gwdesc = 0; | 697 | GtkWidget *gwdesc = 0; |
| @@ -742,10 +715,7 @@ xg_win_to_widget (dpy, wdesc) | |||
| 742 | W is the widget that color will be used for. Used to find colormap. */ | 715 | W is the widget that color will be used for. Used to find colormap. */ |
| 743 | 716 | ||
| 744 | static void | 717 | static void |
| 745 | xg_pix_to_gcolor (w, pixel, c) | 718 | xg_pix_to_gcolor (GtkWidget *w, long unsigned int pixel, GdkColor *c) |
| 746 | GtkWidget *w; | ||
| 747 | unsigned long pixel; | ||
| 748 | GdkColor *c; | ||
| 749 | { | 719 | { |
| 750 | GdkColormap *map = gtk_widget_get_colormap (w); | 720 | GdkColormap *map = gtk_widget_get_colormap (w); |
| 751 | gdk_colormap_query_color (map, pixel, c); | 721 | gdk_colormap_query_color (map, pixel, c); |
| @@ -755,8 +725,7 @@ xg_pix_to_gcolor (w, pixel, c) | |||
| 755 | Return 0 if creation failed, non-zero otherwise. */ | 725 | Return 0 if creation failed, non-zero otherwise. */ |
| 756 | 726 | ||
| 757 | int | 727 | int |
| 758 | xg_create_frame_widgets (f) | 728 | xg_create_frame_widgets (FRAME_PTR f) |
| 759 | FRAME_PTR f; | ||
| 760 | { | 729 | { |
| 761 | GtkWidget *wtop; | 730 | GtkWidget *wtop; |
| 762 | GtkWidget *wvbox; | 731 | GtkWidget *wvbox; |
| @@ -882,10 +851,7 @@ xg_create_frame_widgets (f) | |||
| 882 | flag (this is useful when FLAGS is 0). */ | 851 | flag (this is useful when FLAGS is 0). */ |
| 883 | 852 | ||
| 884 | void | 853 | void |
| 885 | x_wm_set_size_hint (f, flags, user_position) | 854 | x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position) |
| 886 | FRAME_PTR f; | ||
| 887 | long flags; | ||
| 888 | int user_position; | ||
| 889 | { | 855 | { |
| 890 | /* Must use GTK routines here, otherwise GTK resets the size hints | 856 | /* Must use GTK routines here, otherwise GTK resets the size hints |
| 891 | to its own defaults. */ | 857 | to its own defaults. */ |
| @@ -981,9 +947,7 @@ x_wm_set_size_hint (f, flags, user_position) | |||
| 981 | BG is the pixel value to change to. */ | 947 | BG is the pixel value to change to. */ |
| 982 | 948 | ||
| 983 | void | 949 | void |
| 984 | xg_set_background_color (f, bg) | 950 | xg_set_background_color (FRAME_PTR f, long unsigned int bg) |
| 985 | FRAME_PTR f; | ||
| 986 | unsigned long bg; | ||
| 987 | { | 951 | { |
| 988 | if (FRAME_GTK_WIDGET (f)) | 952 | if (FRAME_GTK_WIDGET (f)) |
| 989 | { | 953 | { |
| @@ -1001,10 +965,7 @@ xg_set_background_color (f, bg) | |||
| 1001 | functions so GTK does not overwrite the icon. */ | 965 | functions so GTK does not overwrite the icon. */ |
| 1002 | 966 | ||
| 1003 | void | 967 | void |
| 1004 | xg_set_frame_icon (f, icon_pixmap, icon_mask) | 968 | xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask) |
| 1005 | FRAME_PTR f; | ||
| 1006 | Pixmap icon_pixmap; | ||
| 1007 | Pixmap icon_mask; | ||
| 1008 | { | 969 | { |
| 1009 | GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); | 970 | GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); |
| 1010 | GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap); | 971 | GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap); |
| @@ -1064,10 +1025,7 @@ get_dialog_title (char key) | |||
| 1064 | Returns TRUE to end propagation of event. */ | 1025 | Returns TRUE to end propagation of event. */ |
| 1065 | 1026 | ||
| 1066 | static gboolean | 1027 | static gboolean |
| 1067 | dialog_delete_callback (w, event, user_data) | 1028 | dialog_delete_callback (GtkWidget *w, GdkEvent *event, gpointer user_data) |
| 1068 | GtkWidget *w; | ||
| 1069 | GdkEvent *event; | ||
| 1070 | gpointer user_data; | ||
| 1071 | { | 1029 | { |
| 1072 | gtk_widget_unmap (w); | 1030 | gtk_widget_unmap (w); |
| 1073 | return TRUE; | 1031 | return TRUE; |
| @@ -1081,10 +1039,7 @@ dialog_delete_callback (w, event, user_data) | |||
| 1081 | Returns the GTK dialog widget. */ | 1039 | Returns the GTK dialog widget. */ |
| 1082 | 1040 | ||
| 1083 | static GtkWidget * | 1041 | static GtkWidget * |
| 1084 | create_dialog (wv, select_cb, deactivate_cb) | 1042 | create_dialog (widget_value *wv, GCallback select_cb, GCallback deactivate_cb) |
| 1085 | widget_value *wv; | ||
| 1086 | GCallback select_cb; | ||
| 1087 | GCallback deactivate_cb; | ||
| 1088 | { | 1043 | { |
| 1089 | char *title = get_dialog_title (wv->name[0]); | 1044 | char *title = get_dialog_title (wv->name[0]); |
| 1090 | int total_buttons = wv->name[1] - '0'; | 1045 | int total_buttons = wv->name[1] - '0'; |
| @@ -1215,8 +1170,7 @@ xg_dialog_response_cb (w, | |||
| 1215 | /* Destroy the dialog. This makes it pop down. */ | 1170 | /* Destroy the dialog. This makes it pop down. */ |
| 1216 | 1171 | ||
| 1217 | static Lisp_Object | 1172 | static Lisp_Object |
| 1218 | pop_down_dialog (arg) | 1173 | pop_down_dialog (Lisp_Object arg) |
| 1219 | Lisp_Object arg; | ||
| 1220 | { | 1174 | { |
| 1221 | struct Lisp_Save_Value *p = XSAVE_VALUE (arg); | 1175 | struct Lisp_Save_Value *p = XSAVE_VALUE (arg); |
| 1222 | struct xg_dialog_data *dd = (struct xg_dialog_data *) p->pointer; | 1176 | struct xg_dialog_data *dd = (struct xg_dialog_data *) p->pointer; |
| @@ -1237,8 +1191,7 @@ pop_down_dialog (arg) | |||
| 1237 | We pass in DATA as gpointer* so we can use this as a callback. */ | 1191 | We pass in DATA as gpointer* so we can use this as a callback. */ |
| 1238 | 1192 | ||
| 1239 | static gboolean | 1193 | static gboolean |
| 1240 | xg_maybe_add_timer (data) | 1194 | xg_maybe_add_timer (gpointer data) |
| 1241 | gpointer data; | ||
| 1242 | { | 1195 | { |
| 1243 | struct xg_dialog_data *dd = (struct xg_dialog_data *) data; | 1196 | struct xg_dialog_data *dd = (struct xg_dialog_data *) data; |
| 1244 | EMACS_TIME next_time = timer_check (1); | 1197 | EMACS_TIME next_time = timer_check (1); |
| @@ -1262,10 +1215,7 @@ xg_maybe_add_timer (data) | |||
| 1262 | The dialog W is not destroyed when this function returns. */ | 1215 | The dialog W is not destroyed when this function returns. */ |
| 1263 | 1216 | ||
| 1264 | static int | 1217 | static int |
| 1265 | xg_dialog_run (f, w) | 1218 | xg_dialog_run (FRAME_PTR f, GtkWidget *w) |
| 1266 | FRAME_PTR f; | ||
| 1267 | GtkWidget *w; | ||
| 1268 | |||
| 1269 | { | 1219 | { |
| 1270 | int count = SPECPDL_INDEX (); | 1220 | int count = SPECPDL_INDEX (); |
| 1271 | struct xg_dialog_data dd; | 1221 | struct xg_dialog_data dd; |
| @@ -1308,7 +1258,7 @@ xg_dialog_run (f, w) | |||
| 1308 | Return zero if not. */ | 1258 | Return zero if not. */ |
| 1309 | 1259 | ||
| 1310 | int | 1260 | int |
| 1311 | xg_uses_old_file_dialog () | 1261 | xg_uses_old_file_dialog (void) |
| 1312 | { | 1262 | { |
| 1313 | #ifdef HAVE_GTK_FILE_SELECTION_NEW | 1263 | #ifdef HAVE_GTK_FILE_SELECTION_NEW |
| 1314 | extern int x_gtk_use_old_file_dialog; | 1264 | extern int x_gtk_use_old_file_dialog; |
| @@ -1325,8 +1275,7 @@ typedef char * (*xg_get_file_func) (GtkWidget *); | |||
| 1325 | The returned string must be free:d. */ | 1275 | The returned string must be free:d. */ |
| 1326 | 1276 | ||
| 1327 | static char * | 1277 | static char * |
| 1328 | xg_get_file_name_from_chooser (w) | 1278 | xg_get_file_name_from_chooser (GtkWidget *w) |
| 1329 | GtkWidget *w; | ||
| 1330 | { | 1279 | { |
| 1331 | return gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (w)); | 1280 | return gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (w)); |
| 1332 | } | 1281 | } |
| @@ -1335,9 +1284,7 @@ xg_get_file_name_from_chooser (w) | |||
| 1335 | WIDGET is the toggle widget, DATA is the file chooser dialog. */ | 1284 | WIDGET is the toggle widget, DATA is the file chooser dialog. */ |
| 1336 | 1285 | ||
| 1337 | static void | 1286 | static void |
| 1338 | xg_toggle_visibility_cb (widget, data) | 1287 | xg_toggle_visibility_cb (GtkWidget *widget, gpointer data) |
| 1339 | GtkWidget *widget; | ||
| 1340 | gpointer data; | ||
| 1341 | { | 1288 | { |
| 1342 | GtkFileChooser *dialog = GTK_FILE_CHOOSER (data); | 1289 | GtkFileChooser *dialog = GTK_FILE_CHOOSER (data); |
| 1343 | gboolean visible; | 1290 | gboolean visible; |
| @@ -1353,10 +1300,7 @@ xg_toggle_visibility_cb (widget, data) | |||
| 1353 | changes that property by right clicking in the file list. */ | 1300 | changes that property by right clicking in the file list. */ |
| 1354 | 1301 | ||
| 1355 | static void | 1302 | static void |
| 1356 | xg_toggle_notify_cb (gobject, arg1, user_data) | 1303 | xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data) |
| 1357 | GObject *gobject; | ||
| 1358 | GParamSpec *arg1; | ||
| 1359 | gpointer user_data; | ||
| 1360 | { | 1304 | { |
| 1361 | extern int x_gtk_show_hidden_files; | 1305 | extern int x_gtk_show_hidden_files; |
| 1362 | 1306 | ||
| @@ -1503,8 +1447,7 @@ xg_get_file_with_chooser (f, prompt, default_filename, | |||
| 1503 | The returned string must be free:d. */ | 1447 | The returned string must be free:d. */ |
| 1504 | 1448 | ||
| 1505 | static char * | 1449 | static char * |
| 1506 | xg_get_file_name_from_selector (w) | 1450 | xg_get_file_name_from_selector (GtkWidget *w) |
| 1507 | GtkWidget *w; | ||
| 1508 | { | 1451 | { |
| 1509 | GtkFileSelection *filesel = GTK_FILE_SELECTION (w); | 1452 | GtkFileSelection *filesel = GTK_FILE_SELECTION (w); |
| 1510 | return xstrdup ((char*) gtk_file_selection_get_filename (filesel)); | 1453 | return xstrdup ((char*) gtk_file_selection_get_filename (filesel)); |
| @@ -1565,11 +1508,7 @@ xg_get_file_with_selection (f, prompt, default_filename, | |||
| 1565 | The returned string must be freed by the caller. */ | 1508 | The returned string must be freed by the caller. */ |
| 1566 | 1509 | ||
| 1567 | char * | 1510 | char * |
| 1568 | xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p) | 1511 | xg_get_file_name (FRAME_PTR f, char *prompt, char *default_filename, int mustmatch_p, int only_dir_p) |
| 1569 | FRAME_PTR f; | ||
| 1570 | char *prompt; | ||
| 1571 | char *default_filename; | ||
| 1572 | int mustmatch_p, only_dir_p; | ||
| 1573 | { | 1512 | { |
| 1574 | GtkWidget *w = 0; | 1513 | GtkWidget *w = 0; |
| 1575 | char *fn = 0; | 1514 | char *fn = 0; |
| @@ -1623,9 +1562,7 @@ xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p) | |||
| 1623 | DEFAULT_NAME, if non-zero, is the default font name. */ | 1562 | DEFAULT_NAME, if non-zero, is the default font name. */ |
| 1624 | 1563 | ||
| 1625 | char * | 1564 | char * |
| 1626 | xg_get_font_name (f, default_name) | 1565 | xg_get_font_name (FRAME_PTR f, char *default_name) |
| 1627 | FRAME_PTR f; | ||
| 1628 | char *default_name; | ||
| 1629 | { | 1566 | { |
| 1630 | GtkWidget *w; | 1567 | GtkWidget *w; |
| 1631 | char *fontname = NULL; | 1568 | char *fontname = NULL; |
| @@ -1690,10 +1627,7 @@ static xg_list_node xg_menu_item_cb_list; | |||
| 1690 | allocated xg_menu_cb_data if CL_DATA is NULL. */ | 1627 | allocated xg_menu_cb_data if CL_DATA is NULL. */ |
| 1691 | 1628 | ||
| 1692 | static xg_menu_cb_data * | 1629 | static xg_menu_cb_data * |
| 1693 | make_cl_data (cl_data, f, highlight_cb) | 1630 | make_cl_data (xg_menu_cb_data *cl_data, FRAME_PTR f, GCallback highlight_cb) |
| 1694 | xg_menu_cb_data *cl_data; | ||
| 1695 | FRAME_PTR f; | ||
| 1696 | GCallback highlight_cb; | ||
| 1697 | { | 1631 | { |
| 1698 | if (! cl_data) | 1632 | if (! cl_data) |
| 1699 | { | 1633 | { |
| @@ -1724,10 +1658,7 @@ make_cl_data (cl_data, f, highlight_cb) | |||
| 1724 | creating the menu bar. */ | 1658 | creating the menu bar. */ |
| 1725 | 1659 | ||
| 1726 | static void | 1660 | static void |
| 1727 | update_cl_data (cl_data, f, highlight_cb) | 1661 | update_cl_data (xg_menu_cb_data *cl_data, FRAME_PTR f, GCallback highlight_cb) |
| 1728 | xg_menu_cb_data *cl_data; | ||
| 1729 | FRAME_PTR f; | ||
| 1730 | GCallback highlight_cb; | ||
| 1731 | { | 1662 | { |
| 1732 | if (cl_data) | 1663 | if (cl_data) |
| 1733 | { | 1664 | { |
| @@ -1742,8 +1673,7 @@ update_cl_data (cl_data, f, highlight_cb) | |||
| 1742 | If reference count is zero, free CL_DATA. */ | 1673 | If reference count is zero, free CL_DATA. */ |
| 1743 | 1674 | ||
| 1744 | static void | 1675 | static void |
| 1745 | unref_cl_data (cl_data) | 1676 | unref_cl_data (xg_menu_cb_data *cl_data) |
| 1746 | xg_menu_cb_data *cl_data; | ||
| 1747 | { | 1677 | { |
| 1748 | if (cl_data && cl_data->ref_count > 0) | 1678 | if (cl_data && cl_data->ref_count > 0) |
| 1749 | { | 1679 | { |
| @@ -1759,7 +1689,7 @@ unref_cl_data (cl_data) | |||
| 1759 | /* Function that marks all lisp data during GC. */ | 1689 | /* Function that marks all lisp data during GC. */ |
| 1760 | 1690 | ||
| 1761 | void | 1691 | void |
| 1762 | xg_mark_data () | 1692 | xg_mark_data (void) |
| 1763 | { | 1693 | { |
| 1764 | xg_list_node *iter; | 1694 | xg_list_node *iter; |
| 1765 | 1695 | ||
| @@ -1781,9 +1711,7 @@ xg_mark_data () | |||
| 1781 | CLIENT_DATA points to the xg_menu_item_cb_data associated with the W. */ | 1711 | CLIENT_DATA points to the xg_menu_item_cb_data associated with the W. */ |
| 1782 | 1712 | ||
| 1783 | static void | 1713 | static void |
| 1784 | menuitem_destroy_callback (w, client_data) | 1714 | menuitem_destroy_callback (GtkWidget *w, gpointer client_data) |
| 1785 | GtkWidget *w; | ||
| 1786 | gpointer client_data; | ||
| 1787 | { | 1715 | { |
| 1788 | if (client_data) | 1716 | if (client_data) |
| 1789 | { | 1717 | { |
| @@ -1801,10 +1729,7 @@ menuitem_destroy_callback (w, client_data) | |||
| 1801 | Returns FALSE to tell GTK to keep processing this event. */ | 1729 | Returns FALSE to tell GTK to keep processing this event. */ |
| 1802 | 1730 | ||
| 1803 | static gboolean | 1731 | static gboolean |
| 1804 | menuitem_highlight_callback (w, event, client_data) | 1732 | menuitem_highlight_callback (GtkWidget *w, GdkEventCrossing *event, gpointer client_data) |
| 1805 | GtkWidget *w; | ||
| 1806 | GdkEventCrossing *event; | ||
| 1807 | gpointer client_data; | ||
| 1808 | { | 1733 | { |
| 1809 | GdkEvent ev; | 1734 | GdkEvent ev; |
| 1810 | GtkWidget *subwidget; | 1735 | GtkWidget *subwidget; |
| @@ -1832,9 +1757,7 @@ menuitem_highlight_callback (w, event, client_data) | |||
| 1832 | CLIENT_DATA points to the xg_menu_cb_data associated with W. */ | 1757 | CLIENT_DATA points to the xg_menu_cb_data associated with W. */ |
| 1833 | 1758 | ||
| 1834 | static void | 1759 | static void |
| 1835 | menu_destroy_callback (w, client_data) | 1760 | menu_destroy_callback (GtkWidget *w, gpointer client_data) |
| 1836 | GtkWidget *w; | ||
| 1837 | gpointer client_data; | ||
| 1838 | { | 1761 | { |
| 1839 | unref_cl_data ((xg_menu_cb_data*) client_data); | 1762 | unref_cl_data ((xg_menu_cb_data*) client_data); |
| 1840 | } | 1763 | } |
| @@ -1845,9 +1768,7 @@ menu_destroy_callback (w, client_data) | |||
| 1845 | Returns the GtkHBox. */ | 1768 | Returns the GtkHBox. */ |
| 1846 | 1769 | ||
| 1847 | static GtkWidget * | 1770 | static GtkWidget * |
| 1848 | make_widget_for_menu_item (utf8_label, utf8_key) | 1771 | make_widget_for_menu_item (char *utf8_label, char *utf8_key) |
| 1849 | char *utf8_label; | ||
| 1850 | char *utf8_key; | ||
| 1851 | { | 1772 | { |
| 1852 | GtkWidget *wlbl; | 1773 | GtkWidget *wlbl; |
| 1853 | GtkWidget *wkey; | 1774 | GtkWidget *wkey; |
| @@ -1885,11 +1806,7 @@ make_widget_for_menu_item (utf8_label, utf8_key) | |||
| 1885 | but the MacOS X version doesn't either, so I guess that is OK. */ | 1806 | but the MacOS X version doesn't either, so I guess that is OK. */ |
| 1886 | 1807 | ||
| 1887 | static GtkWidget * | 1808 | static GtkWidget * |
| 1888 | make_menu_item (utf8_label, utf8_key, item, group) | 1809 | make_menu_item (char *utf8_label, char *utf8_key, widget_value *item, GSList **group) |
| 1889 | char *utf8_label; | ||
| 1890 | char *utf8_key; | ||
| 1891 | widget_value *item; | ||
| 1892 | GSList **group; | ||
| 1893 | { | 1810 | { |
| 1894 | GtkWidget *w; | 1811 | GtkWidget *w; |
| 1895 | GtkWidget *wtoadd = 0; | 1812 | GtkWidget *wtoadd = 0; |
| @@ -1984,7 +1901,7 @@ static int xg_detached_menus; | |||
| 1984 | /* Returns non-zero if there are detached menus. */ | 1901 | /* Returns non-zero if there are detached menus. */ |
| 1985 | 1902 | ||
| 1986 | int | 1903 | int |
| 1987 | xg_have_tear_offs () | 1904 | xg_have_tear_offs (void) |
| 1988 | { | 1905 | { |
| 1989 | return xg_detached_menus > 0; | 1906 | return xg_detached_menus > 0; |
| 1990 | } | 1907 | } |
| @@ -1995,9 +1912,7 @@ xg_have_tear_offs () | |||
| 1995 | CLIENT_DATA is not used. */ | 1912 | CLIENT_DATA is not used. */ |
| 1996 | 1913 | ||
| 1997 | static void | 1914 | static void |
| 1998 | tearoff_remove (widget, client_data) | 1915 | tearoff_remove (GtkWidget *widget, gpointer client_data) |
| 1999 | GtkWidget *widget; | ||
| 2000 | gpointer client_data; | ||
| 2001 | { | 1916 | { |
| 2002 | if (xg_detached_menus > 0) --xg_detached_menus; | 1917 | if (xg_detached_menus > 0) --xg_detached_menus; |
| 2003 | } | 1918 | } |
| @@ -2008,9 +1923,7 @@ tearoff_remove (widget, client_data) | |||
| 2008 | CLIENT_DATA is not used. */ | 1923 | CLIENT_DATA is not used. */ |
| 2009 | 1924 | ||
| 2010 | static void | 1925 | static void |
| 2011 | tearoff_activate (widget, client_data) | 1926 | tearoff_activate (GtkWidget *widget, gpointer client_data) |
| 2012 | GtkWidget *widget; | ||
| 2013 | gpointer client_data; | ||
| 2014 | { | 1927 | { |
| 2015 | GtkWidget *menu = gtk_widget_get_parent (widget); | 1928 | GtkWidget *menu = gtk_widget_get_parent (widget); |
| 2016 | if (gtk_menu_get_tearoff_state (GTK_MENU (menu))) | 1929 | if (gtk_menu_get_tearoff_state (GTK_MENU (menu))) |
| @@ -2038,13 +1951,7 @@ tearoff_activate (widget, client_data) | |||
| 2038 | Returns the created GtkWidget. */ | 1951 | Returns the created GtkWidget. */ |
| 2039 | 1952 | ||
| 2040 | static GtkWidget * | 1953 | static GtkWidget * |
| 2041 | xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group) | 1954 | xg_create_one_menuitem (widget_value *item, FRAME_PTR f, GCallback select_cb, GCallback highlight_cb, xg_menu_cb_data *cl_data, GSList **group) |
| 2042 | widget_value *item; | ||
| 2043 | FRAME_PTR f; | ||
| 2044 | GCallback select_cb; | ||
| 2045 | GCallback highlight_cb; | ||
| 2046 | xg_menu_cb_data *cl_data; | ||
| 2047 | GSList **group; | ||
| 2048 | { | 1955 | { |
| 2049 | char *utf8_label; | 1956 | char *utf8_label; |
| 2050 | char *utf8_key; | 1957 | char *utf8_key; |
| @@ -2317,8 +2224,7 @@ xg_create_widget (type, name, f, val, | |||
| 2317 | /* Return the label for menu item WITEM. */ | 2224 | /* Return the label for menu item WITEM. */ |
| 2318 | 2225 | ||
| 2319 | static const char * | 2226 | static const char * |
| 2320 | xg_get_menu_item_label (witem) | 2227 | xg_get_menu_item_label (GtkMenuItem *witem) |
| 2321 | GtkMenuItem *witem; | ||
| 2322 | { | 2228 | { |
| 2323 | GtkLabel *wlabel = GTK_LABEL (gtk_bin_get_child (GTK_BIN (witem))); | 2229 | GtkLabel *wlabel = GTK_LABEL (gtk_bin_get_child (GTK_BIN (witem))); |
| 2324 | return gtk_label_get_label (wlabel); | 2230 | return gtk_label_get_label (wlabel); |
| @@ -2327,9 +2233,7 @@ xg_get_menu_item_label (witem) | |||
| 2327 | /* Return non-zero if the menu item WITEM has the text LABEL. */ | 2233 | /* Return non-zero if the menu item WITEM has the text LABEL. */ |
| 2328 | 2234 | ||
| 2329 | static int | 2235 | static int |
| 2330 | xg_item_label_same_p (witem, label) | 2236 | xg_item_label_same_p (GtkMenuItem *witem, char *label) |
| 2331 | GtkMenuItem *witem; | ||
| 2332 | char *label; | ||
| 2333 | { | 2237 | { |
| 2334 | int is_same = 0; | 2238 | int is_same = 0; |
| 2335 | char *utf8_label = get_utf8_string (label); | 2239 | char *utf8_label = get_utf8_string (label); |
| @@ -2348,8 +2252,7 @@ xg_item_label_same_p (witem, label) | |||
| 2348 | /* Destroy widgets in LIST. */ | 2252 | /* Destroy widgets in LIST. */ |
| 2349 | 2253 | ||
| 2350 | static void | 2254 | static void |
| 2351 | xg_destroy_widgets (list) | 2255 | xg_destroy_widgets (GList *list) |
| 2352 | GList *list; | ||
| 2353 | { | 2256 | { |
| 2354 | GList *iter; | 2257 | GList *iter; |
| 2355 | 2258 | ||
| @@ -2561,12 +2464,7 @@ xg_update_menubar (menubar, f, list, iter, pos, val, | |||
| 2561 | CL_DATA is the data to set in the widget for menu invocation. */ | 2464 | CL_DATA is the data to set in the widget for menu invocation. */ |
| 2562 | 2465 | ||
| 2563 | static void | 2466 | static void |
| 2564 | xg_update_menu_item (val, w, select_cb, highlight_cb, cl_data) | 2467 | xg_update_menu_item (widget_value *val, GtkWidget *w, GCallback select_cb, GCallback highlight_cb, xg_menu_cb_data *cl_data) |
| 2565 | widget_value *val; | ||
| 2566 | GtkWidget *w; | ||
| 2567 | GCallback select_cb; | ||
| 2568 | GCallback highlight_cb; | ||
| 2569 | xg_menu_cb_data *cl_data; | ||
| 2570 | { | 2468 | { |
| 2571 | GtkWidget *wchild; | 2469 | GtkWidget *wchild; |
| 2572 | GtkLabel *wlbl = 0; | 2470 | GtkLabel *wlbl = 0; |
| @@ -2666,9 +2564,7 @@ xg_update_menu_item (val, w, select_cb, highlight_cb, cl_data) | |||
| 2666 | /* Update the toggle menu item W so it corresponds to VAL. */ | 2564 | /* Update the toggle menu item W so it corresponds to VAL. */ |
| 2667 | 2565 | ||
| 2668 | static void | 2566 | static void |
| 2669 | xg_update_toggle_item (val, w) | 2567 | xg_update_toggle_item (widget_value *val, GtkWidget *w) |
| 2670 | widget_value *val; | ||
| 2671 | GtkWidget *w; | ||
| 2672 | { | 2568 | { |
| 2673 | gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected); | 2569 | gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected); |
| 2674 | } | 2570 | } |
| @@ -2676,9 +2572,7 @@ xg_update_toggle_item (val, w) | |||
| 2676 | /* Update the radio menu item W so it corresponds to VAL. */ | 2572 | /* Update the radio menu item W so it corresponds to VAL. */ |
| 2677 | 2573 | ||
| 2678 | static void | 2574 | static void |
| 2679 | xg_update_radio_item (val, w) | 2575 | xg_update_radio_item (widget_value *val, GtkWidget *w) |
| 2680 | widget_value *val; | ||
| 2681 | GtkWidget *w; | ||
| 2682 | { | 2576 | { |
| 2683 | gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected); | 2577 | gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected); |
| 2684 | } | 2578 | } |
| @@ -2915,8 +2809,7 @@ xg_modify_menubar_widgets (menubar, f, val, deep_p, | |||
| 2915 | changed. Value is non-zero if widgets were updated. */ | 2809 | changed. Value is non-zero if widgets were updated. */ |
| 2916 | 2810 | ||
| 2917 | int | 2811 | int |
| 2918 | xg_update_frame_menubar (f) | 2812 | xg_update_frame_menubar (FRAME_PTR f) |
| 2919 | FRAME_PTR f; | ||
| 2920 | { | 2813 | { |
| 2921 | struct x_output *x = f->output_data.x; | 2814 | struct x_output *x = f->output_data.x; |
| 2922 | GtkRequisition req; | 2815 | GtkRequisition req; |
| @@ -2946,8 +2839,7 @@ xg_update_frame_menubar (f) | |||
| 2946 | This is used when deleting a frame, and when turning off the menu bar. */ | 2839 | This is used when deleting a frame, and when turning off the menu bar. */ |
| 2947 | 2840 | ||
| 2948 | void | 2841 | void |
| 2949 | free_frame_menubar (f) | 2842 | free_frame_menubar (FRAME_PTR f) |
| 2950 | FRAME_PTR f; | ||
| 2951 | { | 2843 | { |
| 2952 | struct x_output *x = f->output_data.x; | 2844 | struct x_output *x = f->output_data.x; |
| 2953 | 2845 | ||
| @@ -2995,8 +2887,7 @@ static struct | |||
| 2995 | /* Store the widget pointer W in id_to_widget and return the integer index. */ | 2887 | /* Store the widget pointer W in id_to_widget and return the integer index. */ |
| 2996 | 2888 | ||
| 2997 | static int | 2889 | static int |
| 2998 | xg_store_widget_in_map (w) | 2890 | xg_store_widget_in_map (GtkWidget *w) |
| 2999 | GtkWidget *w; | ||
| 3000 | { | 2891 | { |
| 3001 | int i; | 2892 | int i; |
| 3002 | 2893 | ||
| @@ -3034,8 +2925,7 @@ xg_store_widget_in_map (w) | |||
| 3034 | Called when scroll bar is destroyed. */ | 2925 | Called when scroll bar is destroyed. */ |
| 3035 | 2926 | ||
| 3036 | static void | 2927 | static void |
| 3037 | xg_remove_widget_from_map (idx) | 2928 | xg_remove_widget_from_map (int idx) |
| 3038 | int idx; | ||
| 3039 | { | 2929 | { |
| 3040 | if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0) | 2930 | if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0) |
| 3041 | { | 2931 | { |
| @@ -3047,8 +2937,7 @@ xg_remove_widget_from_map (idx) | |||
| 3047 | /* Get the widget pointer at IDX from id_to_widget. */ | 2937 | /* Get the widget pointer at IDX from id_to_widget. */ |
| 3048 | 2938 | ||
| 3049 | static GtkWidget * | 2939 | static GtkWidget * |
| 3050 | xg_get_widget_from_map (idx) | 2940 | xg_get_widget_from_map (int idx) |
| 3051 | int idx; | ||
| 3052 | { | 2941 | { |
| 3053 | if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0) | 2942 | if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0) |
| 3054 | return id_to_widget.widgets[idx]; | 2943 | return id_to_widget.widgets[idx]; |
| @@ -3060,9 +2949,7 @@ xg_get_widget_from_map (idx) | |||
| 3060 | Return -1 if WID not in id_to_widget. */ | 2949 | Return -1 if WID not in id_to_widget. */ |
| 3061 | 2950 | ||
| 3062 | int | 2951 | int |
| 3063 | xg_get_scroll_id_for_window (dpy, wid) | 2952 | xg_get_scroll_id_for_window (Display *dpy, Window wid) |
| 3064 | Display *dpy; | ||
| 3065 | Window wid; | ||
| 3066 | { | 2953 | { |
| 3067 | int idx; | 2954 | int idx; |
| 3068 | GtkWidget *w; | 2955 | GtkWidget *w; |
| @@ -3084,9 +2971,7 @@ xg_get_scroll_id_for_window (dpy, wid) | |||
| 3084 | We free pointer to last scroll bar values here and remove the index. */ | 2971 | We free pointer to last scroll bar values here and remove the index. */ |
| 3085 | 2972 | ||
| 3086 | static void | 2973 | static void |
| 3087 | xg_gtk_scroll_destroy (widget, data) | 2974 | xg_gtk_scroll_destroy (GtkWidget *widget, gpointer data) |
| 3088 | GtkWidget *widget; | ||
| 3089 | gpointer data; | ||
| 3090 | { | 2975 | { |
| 3091 | int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */ | 2976 | int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */ |
| 3092 | xg_remove_widget_from_map (id); | 2977 | xg_remove_widget_from_map (id); |
| @@ -3101,11 +2986,7 @@ xg_gtk_scroll_destroy (widget, data) | |||
| 3101 | to set resources for the widget. */ | 2986 | to set resources for the widget. */ |
| 3102 | 2987 | ||
| 3103 | void | 2988 | void |
| 3104 | xg_create_scroll_bar (f, bar, scroll_callback, end_callback, scroll_bar_name) | 2989 | xg_create_scroll_bar (FRAME_PTR f, struct scroll_bar *bar, GCallback scroll_callback, GCallback end_callback, char *scroll_bar_name) |
| 3105 | FRAME_PTR f; | ||
| 3106 | struct scroll_bar *bar; | ||
| 3107 | GCallback scroll_callback, end_callback; | ||
| 3108 | char *scroll_bar_name; | ||
| 3109 | { | 2990 | { |
| 3110 | GtkWidget *wscroll; | 2991 | GtkWidget *wscroll; |
| 3111 | GtkWidget *webox; | 2992 | GtkWidget *webox; |
| @@ -3158,9 +3039,7 @@ xg_create_scroll_bar (f, bar, scroll_callback, end_callback, scroll_bar_name) | |||
| 3158 | /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F. */ | 3039 | /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F. */ |
| 3159 | 3040 | ||
| 3160 | void | 3041 | void |
| 3161 | xg_remove_scroll_bar (f, scrollbar_id) | 3042 | xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id) |
| 3162 | FRAME_PTR f; | ||
| 3163 | int scrollbar_id; | ||
| 3164 | { | 3043 | { |
| 3165 | GtkWidget *w = xg_get_widget_from_map (scrollbar_id); | 3044 | GtkWidget *w = xg_get_widget_from_map (scrollbar_id); |
| 3166 | if (w) | 3045 | if (w) |
| @@ -3178,13 +3057,7 @@ xg_remove_scroll_bar (f, scrollbar_id) | |||
| 3178 | WIDTH, HEIGHT is the size in pixels the bar shall have. */ | 3057 | WIDTH, HEIGHT is the size in pixels the bar shall have. */ |
| 3179 | 3058 | ||
| 3180 | void | 3059 | void |
| 3181 | xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height) | 3060 | xg_update_scrollbar_pos (FRAME_PTR f, int scrollbar_id, int top, int left, int width, int height) |
| 3182 | FRAME_PTR f; | ||
| 3183 | int scrollbar_id; | ||
| 3184 | int top; | ||
| 3185 | int left; | ||
| 3186 | int width; | ||
| 3187 | int height; | ||
| 3188 | { | 3061 | { |
| 3189 | 3062 | ||
| 3190 | GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id); | 3063 | GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id); |
| @@ -3245,9 +3118,7 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height) | |||
| 3245 | displaying PORTION out of a whole WHOLE, and our position POSITION. */ | 3118 | displaying PORTION out of a whole WHOLE, and our position POSITION. */ |
| 3246 | 3119 | ||
| 3247 | void | 3120 | void |
| 3248 | xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | 3121 | xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole) |
| 3249 | struct scroll_bar *bar; | ||
| 3250 | int portion, position, whole; | ||
| 3251 | { | 3122 | { |
| 3252 | GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window); | 3123 | GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window); |
| 3253 | 3124 | ||
| @@ -3329,9 +3200,7 @@ xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3329 | Return non-zero if the event is for a scroll bar, zero otherwise. */ | 3200 | Return non-zero if the event is for a scroll bar, zero otherwise. */ |
| 3330 | 3201 | ||
| 3331 | int | 3202 | int |
| 3332 | xg_event_is_for_scrollbar (f, event) | 3203 | xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event) |
| 3333 | FRAME_PTR f; | ||
| 3334 | XEvent *event; | ||
| 3335 | { | 3204 | { |
| 3336 | int retval = 0; | 3205 | int retval = 0; |
| 3337 | 3206 | ||
| @@ -3386,10 +3255,7 @@ xg_event_is_for_scrollbar (f, event) | |||
| 3386 | tool bar. 0 is the first button. */ | 3255 | tool bar. 0 is the first button. */ |
| 3387 | 3256 | ||
| 3388 | static gboolean | 3257 | static gboolean |
| 3389 | xg_tool_bar_button_cb (widget, event, user_data) | 3258 | xg_tool_bar_button_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| 3390 | GtkWidget *widget; | ||
| 3391 | GdkEventButton *event; | ||
| 3392 | gpointer user_data; | ||
| 3393 | { | 3259 | { |
| 3394 | /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */ | 3260 | /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */ |
| 3395 | gpointer ptr = (gpointer) (EMACS_INT) event->state; | 3261 | gpointer ptr = (gpointer) (EMACS_INT) event->state; |
| @@ -3404,9 +3270,7 @@ xg_tool_bar_button_cb (widget, event, user_data) | |||
| 3404 | tool bar. 0 is the first button. */ | 3270 | tool bar. 0 is the first button. */ |
| 3405 | 3271 | ||
| 3406 | static void | 3272 | static void |
| 3407 | xg_tool_bar_callback (w, client_data) | 3273 | xg_tool_bar_callback (GtkWidget *w, gpointer client_data) |
| 3408 | GtkWidget *w; | ||
| 3409 | gpointer client_data; | ||
| 3410 | { | 3274 | { |
| 3411 | /* The EMACS_INT cast avoids a warning. */ | 3275 | /* The EMACS_INT cast avoids a warning. */ |
| 3412 | int idx = (int) (EMACS_INT) client_data; | 3276 | int idx = (int) (EMACS_INT) client_data; |
| @@ -3455,9 +3319,7 @@ xg_tool_bar_callback (w, client_data) | |||
| 3455 | tool bar. 0 is the first button. */ | 3319 | tool bar. 0 is the first button. */ |
| 3456 | 3320 | ||
| 3457 | static void | 3321 | static void |
| 3458 | xg_tool_bar_proxy_callback (w, client_data) | 3322 | xg_tool_bar_proxy_callback (GtkWidget *w, gpointer client_data) |
| 3459 | GtkWidget *w; | ||
| 3460 | gpointer client_data; | ||
| 3461 | { | 3323 | { |
| 3462 | GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), | 3324 | GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), |
| 3463 | XG_TOOL_BAR_PROXY_BUTTON)); | 3325 | XG_TOOL_BAR_PROXY_BUTTON)); |
| @@ -3474,10 +3336,7 @@ xg_tool_bar_help_callback (GtkWidget *w, | |||
| 3474 | the detached tool bar when the detached tool bar it is not expanded. */ | 3336 | the detached tool bar when the detached tool bar it is not expanded. */ |
| 3475 | 3337 | ||
| 3476 | static gboolean | 3338 | static gboolean |
| 3477 | xg_tool_bar_proxy_help_callback (w, event, client_data) | 3339 | xg_tool_bar_proxy_help_callback (GtkWidget *w, GdkEventCrossing *event, gpointer client_data) |
| 3478 | GtkWidget *w; | ||
| 3479 | GdkEventCrossing *event; | ||
| 3480 | gpointer client_data; | ||
| 3481 | { | 3340 | { |
| 3482 | GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), | 3341 | GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), |
| 3483 | XG_TOOL_BAR_PROXY_BUTTON)); | 3342 | XG_TOOL_BAR_PROXY_BUTTON)); |
| @@ -3503,9 +3362,7 @@ xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage) | |||
| 3503 | blank. */ | 3362 | blank. */ |
| 3504 | 3363 | ||
| 3505 | static gboolean | 3364 | static gboolean |
| 3506 | xg_tool_bar_menu_proxy (toolitem, user_data) | 3365 | xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data) |
| 3507 | GtkToolItem *toolitem; | ||
| 3508 | gpointer user_data; | ||
| 3509 | { | 3366 | { |
| 3510 | GtkWidget *weventbox = gtk_bin_get_child (GTK_BIN (toolitem)); | 3367 | GtkWidget *weventbox = gtk_bin_get_child (GTK_BIN (toolitem)); |
| 3511 | GtkButton *wbutton = GTK_BUTTON (gtk_bin_get_child (GTK_BIN (weventbox))); | 3368 | GtkButton *wbutton = GTK_BUTTON (gtk_bin_get_child (GTK_BIN (weventbox))); |
| @@ -3615,10 +3472,7 @@ xg_tool_bar_menu_proxy (toolitem, user_data) | |||
| 3615 | CLIENT_DATA is a pointer to the frame the tool bar belongs to. */ | 3472 | CLIENT_DATA is a pointer to the frame the tool bar belongs to. */ |
| 3616 | 3473 | ||
| 3617 | static void | 3474 | static void |
| 3618 | xg_tool_bar_detach_callback (wbox, w, client_data) | 3475 | xg_tool_bar_detach_callback (GtkHandleBox *wbox, GtkWidget *w, gpointer client_data) |
| 3619 | GtkHandleBox *wbox; | ||
| 3620 | GtkWidget *w; | ||
| 3621 | gpointer client_data; | ||
| 3622 | { | 3476 | { |
| 3623 | FRAME_PTR f = (FRAME_PTR) client_data; | 3477 | FRAME_PTR f = (FRAME_PTR) client_data; |
| 3624 | extern int x_gtk_whole_detached_tool_bar; | 3478 | extern int x_gtk_whole_detached_tool_bar; |
| @@ -3646,10 +3500,7 @@ xg_tool_bar_detach_callback (wbox, w, client_data) | |||
| 3646 | CLIENT_DATA is a pointer to the frame the tool bar belongs to. */ | 3500 | CLIENT_DATA is a pointer to the frame the tool bar belongs to. */ |
| 3647 | 3501 | ||
| 3648 | static void | 3502 | static void |
| 3649 | xg_tool_bar_attach_callback (wbox, w, client_data) | 3503 | xg_tool_bar_attach_callback (GtkHandleBox *wbox, GtkWidget *w, gpointer client_data) |
| 3650 | GtkHandleBox *wbox; | ||
| 3651 | GtkWidget *w; | ||
| 3652 | gpointer client_data; | ||
| 3653 | { | 3504 | { |
| 3654 | FRAME_PTR f = (FRAME_PTR) client_data; | 3505 | FRAME_PTR f = (FRAME_PTR) client_data; |
| 3655 | g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); | 3506 | g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); |
| @@ -3676,10 +3527,7 @@ xg_tool_bar_attach_callback (wbox, w, client_data) | |||
| 3676 | Returns FALSE to tell GTK to keep processing this event. */ | 3527 | Returns FALSE to tell GTK to keep processing this event. */ |
| 3677 | 3528 | ||
| 3678 | static gboolean | 3529 | static gboolean |
| 3679 | xg_tool_bar_help_callback (w, event, client_data) | 3530 | xg_tool_bar_help_callback (GtkWidget *w, GdkEventCrossing *event, gpointer client_data) |
| 3680 | GtkWidget *w; | ||
| 3681 | GdkEventCrossing *event; | ||
| 3682 | gpointer client_data; | ||
| 3683 | { | 3531 | { |
| 3684 | /* The EMACS_INT cast avoids a warning. */ | 3532 | /* The EMACS_INT cast avoids a warning. */ |
| 3685 | int idx = (int) (EMACS_INT) client_data; | 3533 | int idx = (int) (EMACS_INT) client_data; |
| @@ -3718,10 +3566,7 @@ xg_tool_bar_help_callback (w, event, client_data) | |||
| 3718 | Returns FALSE to tell GTK to keep processing this event. */ | 3566 | Returns FALSE to tell GTK to keep processing this event. */ |
| 3719 | 3567 | ||
| 3720 | static gboolean | 3568 | static gboolean |
| 3721 | xg_tool_bar_item_expose_callback (w, event, client_data) | 3569 | xg_tool_bar_item_expose_callback (GtkWidget *w, GdkEventExpose *event, gpointer client_data) |
| 3722 | GtkWidget *w; | ||
| 3723 | GdkEventExpose *event; | ||
| 3724 | gpointer client_data; | ||
| 3725 | { | 3570 | { |
| 3726 | gint width, height; | 3571 | gint width, height; |
| 3727 | 3572 | ||
| @@ -3742,8 +3587,7 @@ xg_tool_bar_item_expose_callback (w, event, client_data) | |||
| 3742 | /* Attach a tool bar to frame F. */ | 3587 | /* Attach a tool bar to frame F. */ |
| 3743 | 3588 | ||
| 3744 | static void | 3589 | static void |
| 3745 | xg_pack_tool_bar (f) | 3590 | xg_pack_tool_bar (FRAME_PTR f) |
| 3746 | FRAME_PTR f; | ||
| 3747 | { | 3591 | { |
| 3748 | struct x_output *x = f->output_data.x; | 3592 | struct x_output *x = f->output_data.x; |
| 3749 | int vbox_pos = x->menubar_widget ? 1 : 0; | 3593 | int vbox_pos = x->menubar_widget ? 1 : 0; |
| @@ -3777,8 +3621,7 @@ xg_pack_tool_bar (f) | |||
| 3777 | #endif | 3621 | #endif |
| 3778 | 3622 | ||
| 3779 | static void | 3623 | static void |
| 3780 | xg_create_tool_bar (f) | 3624 | xg_create_tool_bar (FRAME_PTR f) |
| 3781 | FRAME_PTR f; | ||
| 3782 | { | 3625 | { |
| 3783 | struct x_output *x = f->output_data.x; | 3626 | struct x_output *x = f->output_data.x; |
| 3784 | 3627 | ||
| @@ -3799,10 +3642,7 @@ xg_create_tool_bar (f) | |||
| 3799 | Returns IMAGE if RTL is not found. */ | 3642 | Returns IMAGE if RTL is not found. */ |
| 3800 | 3643 | ||
| 3801 | static Lisp_Object | 3644 | static Lisp_Object |
| 3802 | find_rtl_image (f, image, rtl) | 3645 | find_rtl_image (FRAME_PTR f, Lisp_Object image, Lisp_Object rtl) |
| 3803 | FRAME_PTR f; | ||
| 3804 | Lisp_Object image; | ||
| 3805 | Lisp_Object rtl; | ||
| 3806 | { | 3646 | { |
| 3807 | int i; | 3647 | int i; |
| 3808 | Lisp_Object file, rtl_name; | 3648 | Lisp_Object file, rtl_name; |
| @@ -3955,8 +3795,7 @@ xg_show_toolbar_item (GtkToolItem *ti) | |||
| 3955 | extern Lisp_Object Qx_gtk_map_stock; | 3795 | extern Lisp_Object Qx_gtk_map_stock; |
| 3956 | 3796 | ||
| 3957 | void | 3797 | void |
| 3958 | update_frame_tool_bar (f) | 3798 | update_frame_tool_bar (FRAME_PTR f) |
| 3959 | FRAME_PTR f; | ||
| 3960 | { | 3799 | { |
| 3961 | int i; | 3800 | int i; |
| 3962 | GtkRequisition old_req, new_req; | 3801 | GtkRequisition old_req, new_req; |
| @@ -4237,8 +4076,7 @@ update_frame_tool_bar (f) | |||
| 4237 | Remove the tool bar. */ | 4076 | Remove the tool bar. */ |
| 4238 | 4077 | ||
| 4239 | void | 4078 | void |
| 4240 | free_frame_tool_bar (f) | 4079 | free_frame_tool_bar (FRAME_PTR f) |
| 4241 | FRAME_PTR f; | ||
| 4242 | { | 4080 | { |
| 4243 | struct x_output *x = f->output_data.x; | 4081 | struct x_output *x = f->output_data.x; |
| 4244 | 4082 | ||
| @@ -4269,7 +4107,7 @@ free_frame_tool_bar (f) | |||
| 4269 | Initializing | 4107 | Initializing |
| 4270 | ***********************************************************************/ | 4108 | ***********************************************************************/ |
| 4271 | void | 4109 | void |
| 4272 | xg_initialize () | 4110 | xg_initialize (void) |
| 4273 | { | 4111 | { |
| 4274 | GtkBindingSet *binding_set; | 4112 | GtkBindingSet *binding_set; |
| 4275 | 4113 | ||
diff --git a/src/indent.c b/src/indent.c index de0026fe103..66f1f4cac49 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -72,7 +72,7 @@ static EMACS_INT current_column_bol_cache; | |||
| 72 | /* Get the display table to use for the current buffer. */ | 72 | /* Get the display table to use for the current buffer. */ |
| 73 | 73 | ||
| 74 | struct Lisp_Char_Table * | 74 | struct Lisp_Char_Table * |
| 75 | buffer_display_table () | 75 | buffer_display_table (void) |
| 76 | { | 76 | { |
| 77 | Lisp_Object thisbuf; | 77 | Lisp_Object thisbuf; |
| 78 | 78 | ||
| @@ -89,9 +89,7 @@ buffer_display_table () | |||
| 89 | /* Return the width of character C under display table DP. */ | 89 | /* Return the width of character C under display table DP. */ |
| 90 | 90 | ||
| 91 | static int | 91 | static int |
| 92 | character_width (c, dp) | 92 | character_width (int c, struct Lisp_Char_Table *dp) |
| 93 | int c; | ||
| 94 | struct Lisp_Char_Table *dp; | ||
| 95 | { | 93 | { |
| 96 | Lisp_Object elt; | 94 | Lisp_Object elt; |
| 97 | 95 | ||
| @@ -125,9 +123,7 @@ character_width (c, dp) | |||
| 125 | invalidate the buffer's width_run_cache. */ | 123 | invalidate the buffer's width_run_cache. */ |
| 126 | 124 | ||
| 127 | int | 125 | int |
| 128 | disptab_matches_widthtab (disptab, widthtab) | 126 | disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *widthtab) |
| 129 | struct Lisp_Char_Table *disptab; | ||
| 130 | struct Lisp_Vector *widthtab; | ||
| 131 | { | 127 | { |
| 132 | int i; | 128 | int i; |
| 133 | 129 | ||
| @@ -145,9 +141,7 @@ disptab_matches_widthtab (disptab, widthtab) | |||
| 145 | /* Recompute BUF's width table, using the display table DISPTAB. */ | 141 | /* Recompute BUF's width table, using the display table DISPTAB. */ |
| 146 | 142 | ||
| 147 | void | 143 | void |
| 148 | recompute_width_table (buf, disptab) | 144 | recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab) |
| 149 | struct buffer *buf; | ||
| 150 | struct Lisp_Char_Table *disptab; | ||
| 151 | { | 145 | { |
| 152 | int i; | 146 | int i; |
| 153 | struct Lisp_Vector *widthtab; | 147 | struct Lisp_Vector *widthtab; |
| @@ -166,7 +160,7 @@ recompute_width_table (buf, disptab) | |||
| 166 | state of current_buffer's cache_long_line_scans variable. */ | 160 | state of current_buffer's cache_long_line_scans variable. */ |
| 167 | 161 | ||
| 168 | static void | 162 | static void |
| 169 | width_run_cache_on_off () | 163 | width_run_cache_on_off (void) |
| 170 | { | 164 | { |
| 171 | if (NILP (current_buffer->cache_long_line_scans) | 165 | if (NILP (current_buffer->cache_long_line_scans) |
| 172 | /* And, for the moment, this feature doesn't work on multibyte | 166 | /* And, for the moment, this feature doesn't work on multibyte |
| @@ -217,11 +211,7 @@ width_run_cache_on_off () | |||
| 217 | will equal the return value. */ | 211 | will equal the return value. */ |
| 218 | 212 | ||
| 219 | EMACS_INT | 213 | EMACS_INT |
| 220 | skip_invisible (pos, next_boundary_p, to, window) | 214 | skip_invisible (EMACS_INT pos, EMACS_INT *next_boundary_p, EMACS_INT to, Lisp_Object window) |
| 221 | EMACS_INT pos; | ||
| 222 | EMACS_INT *next_boundary_p; | ||
| 223 | EMACS_INT to; | ||
| 224 | Lisp_Object window; | ||
| 225 | { | 215 | { |
| 226 | Lisp_Object prop, position, overlay_limit, proplimit; | 216 | Lisp_Object prop, position, overlay_limit, proplimit; |
| 227 | Lisp_Object buffer, tmp; | 217 | Lisp_Object buffer, tmp; |
| @@ -332,13 +322,13 @@ Text that has an invisible property is considered as having width 0, unless | |||
| 332 | /* Cancel any recorded value of the horizontal position. */ | 322 | /* Cancel any recorded value of the horizontal position. */ |
| 333 | 323 | ||
| 334 | void | 324 | void |
| 335 | invalidate_current_column () | 325 | invalidate_current_column (void) |
| 336 | { | 326 | { |
| 337 | last_known_column_point = 0; | 327 | last_known_column_point = 0; |
| 338 | } | 328 | } |
| 339 | 329 | ||
| 340 | double | 330 | double |
| 341 | current_column () | 331 | current_column (void) |
| 342 | { | 332 | { |
| 343 | register int col; | 333 | register int col; |
| 344 | register unsigned char *ptr, *stop; | 334 | register unsigned char *ptr, *stop; |
| @@ -723,7 +713,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) | |||
| 723 | due to text properties or overlays. */ | 713 | due to text properties or overlays. */ |
| 724 | 714 | ||
| 725 | static double | 715 | static double |
| 726 | current_column_1 () | 716 | current_column_1 (void) |
| 727 | { | 717 | { |
| 728 | EMACS_INT col = MOST_POSITIVE_FIXNUM; | 718 | EMACS_INT col = MOST_POSITIVE_FIXNUM; |
| 729 | EMACS_INT opoint = PT; | 719 | EMACS_INT opoint = PT; |
| @@ -887,8 +877,7 @@ following any initial whitespace. */) | |||
| 887 | } | 877 | } |
| 888 | 878 | ||
| 889 | static double | 879 | static double |
| 890 | position_indentation (pos_byte) | 880 | position_indentation (register int pos_byte) |
| 891 | register int pos_byte; | ||
| 892 | { | 881 | { |
| 893 | register EMACS_INT column = 0; | 882 | register EMACS_INT column = 0; |
| 894 | register EMACS_INT tab_width = XINT (current_buffer->tab_width); | 883 | register EMACS_INT tab_width = XINT (current_buffer->tab_width); |
| @@ -977,9 +966,7 @@ position_indentation (pos_byte) | |||
| 977 | preceding line. */ | 966 | preceding line. */ |
| 978 | 967 | ||
| 979 | int | 968 | int |
| 980 | indented_beyond_p (pos, pos_byte, column) | 969 | indented_beyond_p (int pos, int pos_byte, double column) |
| 981 | int pos, pos_byte; | ||
| 982 | double column; | ||
| 983 | { | 970 | { |
| 984 | double val; | 971 | double val; |
| 985 | int opoint = PT, opoint_byte = PT_BYTE; | 972 | int opoint = PT, opoint_byte = PT_BYTE; |
| @@ -1137,12 +1124,7 @@ struct position val_compute_motion; | |||
| 1137 | the scroll bars if they are turned on. */ | 1124 | the scroll bars if they are turned on. */ |
| 1138 | 1125 | ||
| 1139 | struct position * | 1126 | struct position * |
| 1140 | compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, hscroll, tab_offset, win) | 1127 | compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_motion, EMACS_INT to, EMACS_INT tovpos, EMACS_INT tohpos, EMACS_INT width, EMACS_INT hscroll, EMACS_INT tab_offset, struct window *win) |
| 1141 | EMACS_INT from, fromvpos, fromhpos, to, tovpos, tohpos; | ||
| 1142 | int did_motion; | ||
| 1143 | EMACS_INT width; | ||
| 1144 | EMACS_INT hscroll, tab_offset; | ||
| 1145 | struct window *win; | ||
| 1146 | { | 1128 | { |
| 1147 | register EMACS_INT hpos = fromhpos; | 1129 | register EMACS_INT hpos = fromhpos; |
| 1148 | register EMACS_INT vpos = fromvpos; | 1130 | register EMACS_INT vpos = fromvpos; |
| @@ -1856,9 +1838,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) | |||
| 1856 | struct position val_vmotion; | 1838 | struct position val_vmotion; |
| 1857 | 1839 | ||
| 1858 | struct position * | 1840 | struct position * |
| 1859 | vmotion (from, vtarget, w) | 1841 | vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) |
| 1860 | register EMACS_INT from, vtarget; | ||
| 1861 | struct window *w; | ||
| 1862 | { | 1842 | { |
| 1863 | EMACS_INT hscroll = XINT (w->hscroll); | 1843 | EMACS_INT hscroll = XINT (w->hscroll); |
| 1864 | struct position pos; | 1844 | struct position pos; |
| @@ -2183,7 +2163,7 @@ whether or not it is currently displayed in some window. */) | |||
| 2183 | /* File's initialization. */ | 2163 | /* File's initialization. */ |
| 2184 | 2164 | ||
| 2185 | void | 2165 | void |
| 2186 | syms_of_indent () | 2166 | syms_of_indent (void) |
| 2187 | { | 2167 | { |
| 2188 | DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode, | 2168 | DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode, |
| 2189 | doc: /* *Indentation can insert tabs if this is non-nil. */); | 2169 | doc: /* *Indentation can insert tabs if this is non-nil. */); |
diff --git a/src/insdel.c b/src/insdel.c index 2b00de88711..2024cfc362f 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -51,7 +51,7 @@ static void adjust_markers_for_replace (EMACS_INT, EMACS_INT, EMACS_INT, | |||
| 51 | EMACS_INT, EMACS_INT, EMACS_INT); | 51 | EMACS_INT, EMACS_INT, EMACS_INT); |
| 52 | static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes); | 52 | static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes); |
| 53 | 53 | ||
| 54 | Lisp_Object Fcombine_after_change_execute (); | 54 | Lisp_Object Fcombine_after_change_execute (void); |
| 55 | 55 | ||
| 56 | /* Non-nil means don't call the after-change-functions right away, | 56 | /* Non-nil means don't call the after-change-functions right away, |
| 57 | just record an element in combine_after_change_list. */ | 57 | just record an element in combine_after_change_list. */ |
| @@ -85,7 +85,7 @@ static int check_markers_debug_flag; | |||
| 85 | else | 85 | else |
| 86 | 86 | ||
| 87 | void | 87 | void |
| 88 | check_markers () | 88 | check_markers (void) |
| 89 | { | 89 | { |
| 90 | register struct Lisp_Marker *tail; | 90 | register struct Lisp_Marker *tail; |
| 91 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 91 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
| @@ -2132,8 +2132,7 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, | |||
| 2132 | NO-ERROR-FLAG is nil if there was an error, | 2132 | NO-ERROR-FLAG is nil if there was an error, |
| 2133 | anything else meaning no error (so this function does nothing). */ | 2133 | anything else meaning no error (so this function does nothing). */ |
| 2134 | Lisp_Object | 2134 | Lisp_Object |
| 2135 | reset_var_on_error (val) | 2135 | reset_var_on_error (Lisp_Object val) |
| 2136 | Lisp_Object val; | ||
| 2137 | { | 2136 | { |
| 2138 | if (NILP (XCDR (val))) | 2137 | if (NILP (XCDR (val))) |
| 2139 | Fset (XCAR (val), Qnil); | 2138 | Fset (XCAR (val), Qnil); |
| @@ -2297,8 +2296,7 @@ signal_after_change (EMACS_INT charpos, EMACS_INT lendel, EMACS_INT lenins) | |||
| 2297 | } | 2296 | } |
| 2298 | 2297 | ||
| 2299 | Lisp_Object | 2298 | Lisp_Object |
| 2300 | Fcombine_after_change_execute_1 (val) | 2299 | Fcombine_after_change_execute_1 (Lisp_Object val) |
| 2301 | Lisp_Object val; | ||
| 2302 | { | 2300 | { |
| 2303 | Vcombine_after_change_calls = val; | 2301 | Vcombine_after_change_calls = val; |
| 2304 | return val; | 2302 | return val; |
| @@ -2390,7 +2388,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, | |||
| 2390 | } | 2388 | } |
| 2391 | 2389 | ||
| 2392 | void | 2390 | void |
| 2393 | syms_of_insdel () | 2391 | syms_of_insdel (void) |
| 2394 | { | 2392 | { |
| 2395 | staticpro (&combine_after_change_list); | 2393 | staticpro (&combine_after_change_list); |
| 2396 | staticpro (&combine_after_change_buffer); | 2394 | staticpro (&combine_after_change_buffer); |
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, |
diff --git a/src/keymap.c b/src/keymap.c index 3aeeb1afc05..a0f1c63c14a 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -183,19 +183,13 @@ in case you use it as a menu with `x-popup-menu'. */) | |||
| 183 | initial_define_key (control_x_map, Ctl('X'), "exchange-point-and-mark"); */ | 183 | initial_define_key (control_x_map, Ctl('X'), "exchange-point-and-mark"); */ |
| 184 | 184 | ||
| 185 | void | 185 | void |
| 186 | initial_define_key (keymap, key, defname) | 186 | initial_define_key (Lisp_Object keymap, int key, char *defname) |
| 187 | Lisp_Object keymap; | ||
| 188 | int key; | ||
| 189 | char *defname; | ||
| 190 | { | 187 | { |
| 191 | store_in_keymap (keymap, make_number (key), intern_c_string (defname)); | 188 | store_in_keymap (keymap, make_number (key), intern_c_string (defname)); |
| 192 | } | 189 | } |
| 193 | 190 | ||
| 194 | void | 191 | void |
| 195 | initial_define_lispy_key (keymap, keyname, defname) | 192 | initial_define_lispy_key (Lisp_Object keymap, char *keyname, char *defname) |
| 196 | Lisp_Object keymap; | ||
| 197 | char *keyname; | ||
| 198 | char *defname; | ||
| 199 | { | 193 | { |
| 200 | store_in_keymap (keymap, intern_c_string (keyname), intern_c_string (defname)); | 194 | store_in_keymap (keymap, intern_c_string (keyname), intern_c_string (defname)); |
| 201 | } | 195 | } |
| @@ -255,9 +249,7 @@ when reading a key-sequence to be looked-up in this keymap. */) | |||
| 255 | do_autoload which can GC. */ | 249 | do_autoload which can GC. */ |
| 256 | 250 | ||
| 257 | Lisp_Object | 251 | Lisp_Object |
| 258 | get_keymap (object, error, autoload) | 252 | get_keymap (Lisp_Object object, int error, int autoload) |
| 259 | Lisp_Object object; | ||
| 260 | int error, autoload; | ||
| 261 | { | 253 | { |
| 262 | Lisp_Object tem; | 254 | Lisp_Object tem; |
| 263 | 255 | ||
| @@ -309,9 +301,7 @@ get_keymap (object, error, autoload) | |||
| 309 | We assume that KEYMAP is a valid keymap. */ | 301 | We assume that KEYMAP is a valid keymap. */ |
| 310 | 302 | ||
| 311 | Lisp_Object | 303 | Lisp_Object |
| 312 | keymap_parent (keymap, autoload) | 304 | keymap_parent (Lisp_Object keymap, int autoload) |
| 313 | Lisp_Object keymap; | ||
| 314 | int autoload; | ||
| 315 | { | 305 | { |
| 316 | Lisp_Object list; | 306 | Lisp_Object list; |
| 317 | 307 | ||
| @@ -340,8 +330,7 @@ If KEYMAP has no parent, return nil. */) | |||
| 340 | 330 | ||
| 341 | /* Check whether MAP is one of MAPS parents. */ | 331 | /* Check whether MAP is one of MAPS parents. */ |
| 342 | int | 332 | int |
| 343 | keymap_memberp (map, maps) | 333 | keymap_memberp (Lisp_Object map, Lisp_Object maps) |
| 344 | Lisp_Object map, maps; | ||
| 345 | { | 334 | { |
| 346 | if (NILP (map)) return 0; | 335 | if (NILP (map)) return 0; |
| 347 | while (KEYMAPP (maps) && !EQ (map, maps)) | 336 | while (KEYMAPP (maps) && !EQ (map, maps)) |
| @@ -437,8 +426,7 @@ Return PARENT. PARENT should be nil or another keymap. */) | |||
| 437 | make sure that SUBMAP inherits that definition as its own parent. */ | 426 | make sure that SUBMAP inherits that definition as its own parent. */ |
| 438 | 427 | ||
| 439 | static void | 428 | static void |
| 440 | fix_submap_inheritance (map, event, submap) | 429 | fix_submap_inheritance (Lisp_Object map, Lisp_Object event, Lisp_Object submap) |
| 441 | Lisp_Object map, event, submap; | ||
| 442 | { | 430 | { |
| 443 | Lisp_Object map_parent, parent_entry; | 431 | Lisp_Object map_parent, parent_entry; |
| 444 | 432 | ||
| @@ -500,12 +488,7 @@ fix_submap_inheritance (map, event, submap) | |||
| 500 | If NOINHERIT, don't accept a subkeymap found in an inherited keymap. */ | 488 | If NOINHERIT, don't accept a subkeymap found in an inherited keymap. */ |
| 501 | 489 | ||
| 502 | Lisp_Object | 490 | Lisp_Object |
| 503 | access_keymap (map, idx, t_ok, noinherit, autoload) | 491 | access_keymap (Lisp_Object map, Lisp_Object idx, int t_ok, int noinherit, int autoload) |
| 504 | Lisp_Object map; | ||
| 505 | Lisp_Object idx; | ||
| 506 | int t_ok; | ||
| 507 | int noinherit; | ||
| 508 | int autoload; | ||
| 509 | { | 492 | { |
| 510 | Lisp_Object val; | 493 | Lisp_Object val; |
| 511 | 494 | ||
| @@ -634,10 +617,7 @@ access_keymap (map, idx, t_ok, noinherit, autoload) | |||
| 634 | } | 617 | } |
| 635 | 618 | ||
| 636 | static void | 619 | static void |
| 637 | map_keymap_item (fun, args, key, val, data) | 620 | map_keymap_item (map_keymap_function_t fun, Lisp_Object args, Lisp_Object key, Lisp_Object val, void *data) |
| 638 | map_keymap_function_t fun; | ||
| 639 | Lisp_Object args, key, val; | ||
| 640 | void *data; | ||
| 641 | { | 621 | { |
| 642 | /* We should maybe try to detect bindings shadowed by previous | 622 | /* We should maybe try to detect bindings shadowed by previous |
| 643 | ones and things like that. */ | 623 | ones and things like that. */ |
| @@ -647,8 +627,7 @@ map_keymap_item (fun, args, key, val, data) | |||
| 647 | } | 627 | } |
| 648 | 628 | ||
| 649 | static void | 629 | static void |
| 650 | map_keymap_char_table_item (args, key, val) | 630 | map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val) |
| 651 | Lisp_Object args, key, val; | ||
| 652 | { | 631 | { |
| 653 | if (!NILP (val)) | 632 | if (!NILP (val)) |
| 654 | { | 633 | { |
| @@ -707,9 +686,7 @@ map_keymap_internal (Lisp_Object map, | |||
| 707 | } | 686 | } |
| 708 | 687 | ||
| 709 | static void | 688 | static void |
| 710 | map_keymap_call (key, val, fun, dummy) | 689 | map_keymap_call (Lisp_Object key, Lisp_Object val, Lisp_Object fun, void *dummy) |
| 711 | Lisp_Object key, val, fun; | ||
| 712 | void *dummy; | ||
| 713 | { | 690 | { |
| 714 | call2 (fun, key, val); | 691 | call2 (fun, key, val); |
| 715 | } | 692 | } |
| @@ -717,11 +694,7 @@ map_keymap_call (key, val, fun, dummy) | |||
| 717 | /* Same as map_keymap_internal, but doesn't traverses parent keymaps as well. | 694 | /* Same as map_keymap_internal, but doesn't traverses parent keymaps as well. |
| 718 | A non-zero AUTOLOAD indicates that autoloaded keymaps should be loaded. */ | 695 | A non-zero AUTOLOAD indicates that autoloaded keymaps should be loaded. */ |
| 719 | void | 696 | void |
| 720 | map_keymap (map, fun, args, data, autoload) | 697 | map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, void *data, int autoload) |
| 721 | map_keymap_function_t fun; | ||
| 722 | Lisp_Object map, args; | ||
| 723 | void *data; | ||
| 724 | int autoload; | ||
| 725 | { | 698 | { |
| 726 | struct gcpro gcpro1; | 699 | struct gcpro gcpro1; |
| 727 | GCPRO1 (args); | 700 | GCPRO1 (args); |
| @@ -739,10 +712,7 @@ Lisp_Object Qkeymap_canonicalize; | |||
| 739 | /* Same as map_keymap, but does it right, properly eliminating duplicate | 712 | /* Same as map_keymap, but does it right, properly eliminating duplicate |
| 740 | bindings due to inheritance. */ | 713 | bindings due to inheritance. */ |
| 741 | void | 714 | void |
| 742 | map_keymap_canonical (map, fun, args, data) | 715 | map_keymap_canonical (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, void *data) |
| 743 | map_keymap_function_t fun; | ||
| 744 | Lisp_Object map, args; | ||
| 745 | void *data; | ||
| 746 | { | 716 | { |
| 747 | struct gcpro gcpro1; | 717 | struct gcpro gcpro1; |
| 748 | GCPRO1 (args); | 718 | GCPRO1 (args); |
| @@ -804,9 +774,7 @@ usage: (map-keymap FUNCTION KEYMAP) */) | |||
| 804 | This can GC because menu_item_eval_property calls Feval. */ | 774 | This can GC because menu_item_eval_property calls Feval. */ |
| 805 | 775 | ||
| 806 | Lisp_Object | 776 | Lisp_Object |
| 807 | get_keyelt (object, autoload) | 777 | get_keyelt (Lisp_Object object, int autoload) |
| 808 | Lisp_Object object; | ||
| 809 | int autoload; | ||
| 810 | { | 778 | { |
| 811 | while (1) | 779 | while (1) |
| 812 | { | 780 | { |
| @@ -886,10 +854,7 @@ get_keyelt (object, autoload) | |||
| 886 | } | 854 | } |
| 887 | 855 | ||
| 888 | static Lisp_Object | 856 | static Lisp_Object |
| 889 | store_in_keymap (keymap, idx, def) | 857 | store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) |
| 890 | Lisp_Object keymap; | ||
| 891 | register Lisp_Object idx; | ||
| 892 | Lisp_Object def; | ||
| 893 | { | 858 | { |
| 894 | /* Flush any reverse-map cache. */ | 859 | /* Flush any reverse-map cache. */ |
| 895 | where_is_cache = Qnil; | 860 | where_is_cache = Qnil; |
| @@ -1044,8 +1009,7 @@ store_in_keymap (keymap, idx, def) | |||
| 1044 | EXFUN (Fcopy_keymap, 1); | 1009 | EXFUN (Fcopy_keymap, 1); |
| 1045 | 1010 | ||
| 1046 | Lisp_Object | 1011 | Lisp_Object |
| 1047 | copy_keymap_item (elt) | 1012 | copy_keymap_item (Lisp_Object elt) |
| 1048 | Lisp_Object elt; | ||
| 1049 | { | 1013 | { |
| 1050 | Lisp_Object res, tem; | 1014 | Lisp_Object res, tem; |
| 1051 | 1015 | ||
| @@ -1118,8 +1082,7 @@ copy_keymap_item (elt) | |||
| 1118 | } | 1082 | } |
| 1119 | 1083 | ||
| 1120 | static void | 1084 | static void |
| 1121 | copy_keymap_1 (chartable, idx, elt) | 1085 | copy_keymap_1 (Lisp_Object chartable, Lisp_Object idx, Lisp_Object elt) |
| 1122 | Lisp_Object chartable, idx, elt; | ||
| 1123 | { | 1086 | { |
| 1124 | Fset_char_table_range (chartable, idx, copy_keymap_item (elt)); | 1087 | Fset_char_table_range (chartable, idx, copy_keymap_item (elt)); |
| 1125 | } | 1088 | } |
| @@ -1412,8 +1375,7 @@ recognize the default bindings, just as `read-key-sequence' does. */) | |||
| 1412 | Return the keymap. */ | 1375 | Return the keymap. */ |
| 1413 | 1376 | ||
| 1414 | static Lisp_Object | 1377 | static Lisp_Object |
| 1415 | define_as_prefix (keymap, c) | 1378 | define_as_prefix (Lisp_Object keymap, Lisp_Object c) |
| 1416 | Lisp_Object keymap, c; | ||
| 1417 | { | 1379 | { |
| 1418 | Lisp_Object cmd; | 1380 | Lisp_Object cmd; |
| 1419 | 1381 | ||
| @@ -1430,8 +1392,7 @@ define_as_prefix (keymap, c) | |||
| 1430 | /* Append a key to the end of a key sequence. We always make a vector. */ | 1392 | /* Append a key to the end of a key sequence. We always make a vector. */ |
| 1431 | 1393 | ||
| 1432 | Lisp_Object | 1394 | Lisp_Object |
| 1433 | append_key (key_sequence, key) | 1395 | append_key (Lisp_Object key_sequence, Lisp_Object key) |
| 1434 | Lisp_Object key_sequence, key; | ||
| 1435 | { | 1396 | { |
| 1436 | Lisp_Object args[2]; | 1397 | Lisp_Object args[2]; |
| 1437 | 1398 | ||
| @@ -1445,8 +1406,7 @@ append_key (key_sequence, key) | |||
| 1445 | signal an error if is a mistake such as RET or M-RET or C-DEL, etc. */ | 1406 | signal an error if is a mistake such as RET or M-RET or C-DEL, etc. */ |
| 1446 | 1407 | ||
| 1447 | static void | 1408 | static void |
| 1448 | silly_event_symbol_error (c) | 1409 | silly_event_symbol_error (Lisp_Object c) |
| 1449 | Lisp_Object c; | ||
| 1450 | { | 1410 | { |
| 1451 | Lisp_Object parsed, base, name, assoc; | 1411 | Lisp_Object parsed, base, name, assoc; |
| 1452 | int modifiers; | 1412 | int modifiers; |
| @@ -1515,8 +1475,7 @@ static int cmm_size = 0; | |||
| 1515 | list, let the key sequence be read, and hope some other piece of | 1475 | list, let the key sequence be read, and hope some other piece of |
| 1516 | code signals the error. */ | 1476 | code signals the error. */ |
| 1517 | int | 1477 | int |
| 1518 | current_minor_maps (modeptr, mapptr) | 1478 | current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr) |
| 1519 | Lisp_Object **modeptr, **mapptr; | ||
| 1520 | { | 1479 | { |
| 1521 | int i = 0; | 1480 | int i = 0; |
| 1522 | int list_number = 0; | 1481 | int list_number = 0; |
| @@ -2128,10 +2087,10 @@ struct accessible_keymaps_data { | |||
| 2128 | }; | 2087 | }; |
| 2129 | 2088 | ||
| 2130 | static void | 2089 | static void |
| 2131 | accessible_keymaps_1 (key, cmd, args, data) | 2090 | accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *data) |
| 2132 | Lisp_Object key, cmd, args; | 2091 | |
| 2133 | /* Use void* to be compatible with map_keymap_function_t. */ | 2092 | /* Use void* to be compatible with map_keymap_function_t. */ |
| 2134 | void *data; | 2093 | |
| 2135 | { | 2094 | { |
| 2136 | struct accessible_keymaps_data *d = data; /* Cast! */ | 2095 | struct accessible_keymaps_data *d = data; /* Cast! */ |
| 2137 | Lisp_Object maps = d->maps; | 2096 | Lisp_Object maps = d->maps; |
| @@ -2389,10 +2348,7 @@ spaces are put between sequence elements, etc. */) | |||
| 2389 | 2348 | ||
| 2390 | 2349 | ||
| 2391 | char * | 2350 | char * |
| 2392 | push_key_description (c, p, force_multibyte) | 2351 | push_key_description (register unsigned int c, register char *p, int force_multibyte) |
| 2393 | register unsigned int c; | ||
| 2394 | register char *p; | ||
| 2395 | int force_multibyte; | ||
| 2396 | { | 2352 | { |
| 2397 | unsigned c2; | 2353 | unsigned c2; |
| 2398 | 2354 | ||
| @@ -2549,9 +2505,7 @@ around function keys and event symbols. */) | |||
| 2549 | } | 2505 | } |
| 2550 | 2506 | ||
| 2551 | char * | 2507 | char * |
| 2552 | push_text_char_description (c, p) | 2508 | push_text_char_description (register unsigned int c, register char *p) |
| 2553 | register unsigned int c; | ||
| 2554 | register char *p; | ||
| 2555 | { | 2509 | { |
| 2556 | if (c >= 0200) | 2510 | if (c >= 0200) |
| 2557 | { | 2511 | { |
| @@ -2611,8 +2565,7 @@ static int where_is_preferred_modifier; | |||
| 2611 | Else, return 2 if SEQ uses the where_is_preferred_modifier, | 2565 | Else, return 2 if SEQ uses the where_is_preferred_modifier, |
| 2612 | and 1 otherwise. */ | 2566 | and 1 otherwise. */ |
| 2613 | static int | 2567 | static int |
| 2614 | preferred_sequence_p (seq) | 2568 | preferred_sequence_p (Lisp_Object seq) |
| 2615 | Lisp_Object seq; | ||
| 2616 | { | 2569 | { |
| 2617 | int i; | 2570 | int i; |
| 2618 | int len = XINT (Flength (seq)); | 2571 | int len = XINT (Flength (seq)); |
| @@ -2982,9 +2935,7 @@ remapped command in the returned list. */) | |||
| 2982 | /* This function can GC because get_keyelt can. */ | 2935 | /* This function can GC because get_keyelt can. */ |
| 2983 | 2936 | ||
| 2984 | static void | 2937 | static void |
| 2985 | where_is_internal_1 (key, binding, args, data) | 2938 | where_is_internal_1 (Lisp_Object key, Lisp_Object binding, Lisp_Object args, void *data) |
| 2986 | Lisp_Object key, binding, args; | ||
| 2987 | void *data; | ||
| 2988 | { | 2939 | { |
| 2989 | struct where_is_internal_data *d = data; /* Cast! */ | 2940 | struct where_is_internal_data *d = data; /* Cast! */ |
| 2990 | Lisp_Object definition = d->definition; | 2941 | Lisp_Object definition = d->definition; |
| @@ -3342,8 +3293,7 @@ key binding\n\ | |||
| 3342 | static int previous_description_column; | 3293 | static int previous_description_column; |
| 3343 | 3294 | ||
| 3344 | static void | 3295 | static void |
| 3345 | describe_command (definition, args) | 3296 | describe_command (Lisp_Object definition, Lisp_Object args) |
| 3346 | Lisp_Object definition, args; | ||
| 3347 | { | 3297 | { |
| 3348 | register Lisp_Object tem1; | 3298 | register Lisp_Object tem1; |
| 3349 | int column = (int) current_column (); /* iftc */ | 3299 | int column = (int) current_column (); /* iftc */ |
| @@ -3379,8 +3329,7 @@ describe_command (definition, args) | |||
| 3379 | } | 3329 | } |
| 3380 | 3330 | ||
| 3381 | static void | 3331 | static void |
| 3382 | describe_translation (definition, args) | 3332 | describe_translation (Lisp_Object definition, Lisp_Object args) |
| 3383 | Lisp_Object definition, args; | ||
| 3384 | { | 3333 | { |
| 3385 | register Lisp_Object tem1; | 3334 | register Lisp_Object tem1; |
| 3386 | 3335 | ||
| @@ -3413,8 +3362,7 @@ struct describe_map_elt { Lisp_Object event; Lisp_Object definition; int shadowe | |||
| 3413 | the event field. */ | 3362 | the event field. */ |
| 3414 | 3363 | ||
| 3415 | static int | 3364 | static int |
| 3416 | describe_map_compare (aa, bb) | 3365 | describe_map_compare (const void *aa, const void *bb) |
| 3417 | const void *aa, *bb; | ||
| 3418 | { | 3366 | { |
| 3419 | const struct describe_map_elt *a = aa, *b = bb; | 3367 | const struct describe_map_elt *a = aa, *b = bb; |
| 3420 | if (INTEGERP (a->event) && INTEGERP (b->event)) | 3368 | if (INTEGERP (a->event) && INTEGERP (b->event)) |
| @@ -3624,8 +3572,7 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3624 | } | 3572 | } |
| 3625 | 3573 | ||
| 3626 | static void | 3574 | static void |
| 3627 | describe_vector_princ (elt, fun) | 3575 | describe_vector_princ (Lisp_Object elt, Lisp_Object fun) |
| 3628 | Lisp_Object elt, fun; | ||
| 3629 | { | 3576 | { |
| 3630 | Findent_to (make_number (16), make_number (1)); | 3577 | Findent_to (make_number (16), make_number (1)); |
| 3631 | call1 (fun, elt); | 3578 | call1 (fun, elt); |
| @@ -3893,8 +3840,7 @@ static Lisp_Object apropos_predicate; | |||
| 3893 | static Lisp_Object apropos_accumulate; | 3840 | static Lisp_Object apropos_accumulate; |
| 3894 | 3841 | ||
| 3895 | static void | 3842 | static void |
| 3896 | apropos_accum (symbol, string) | 3843 | apropos_accum (Lisp_Object symbol, Lisp_Object string) |
| 3897 | Lisp_Object symbol, string; | ||
| 3898 | { | 3844 | { |
| 3899 | register Lisp_Object tem; | 3845 | register Lisp_Object tem; |
| 3900 | 3846 | ||
| @@ -3925,7 +3871,7 @@ Return list of symbols found. */) | |||
| 3925 | } | 3871 | } |
| 3926 | 3872 | ||
| 3927 | void | 3873 | void |
| 3928 | syms_of_keymap () | 3874 | syms_of_keymap (void) |
| 3929 | { | 3875 | { |
| 3930 | Qkeymap = intern_c_string ("keymap"); | 3876 | Qkeymap = intern_c_string ("keymap"); |
| 3931 | staticpro (&Qkeymap); | 3877 | staticpro (&Qkeymap); |
| @@ -4119,7 +4065,7 @@ preferred. */); | |||
| 4119 | } | 4065 | } |
| 4120 | 4066 | ||
| 4121 | void | 4067 | void |
| 4122 | keys_of_keymap () | 4068 | keys_of_keymap (void) |
| 4123 | { | 4069 | { |
| 4124 | initial_define_key (global_map, 033, "ESC-prefix"); | 4070 | initial_define_key (global_map, 033, "ESC-prefix"); |
| 4125 | initial_define_key (global_map, Ctl ('X'), "Control-X-prefix"); | 4071 | initial_define_key (global_map, Ctl ('X'), "Control-X-prefix"); |
diff --git a/src/lread.c b/src/lread.c index 16efd7114ea..5e0d2d8c772 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -230,7 +230,7 @@ static Lisp_Object load_unwind (Lisp_Object); | |||
| 230 | static Lisp_Object load_descriptor_unwind (Lisp_Object); | 230 | static Lisp_Object load_descriptor_unwind (Lisp_Object); |
| 231 | 231 | ||
| 232 | static void invalid_syntax (const char *, int) NO_RETURN; | 232 | static void invalid_syntax (const char *, int) NO_RETURN; |
| 233 | static void end_of_file_error () NO_RETURN; | 233 | static void end_of_file_error (void) NO_RETURN; |
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | /* Functions that read one byte from the current source READCHARFUN | 236 | /* Functions that read one byte from the current source READCHARFUN |
| @@ -262,9 +262,7 @@ static int readbyte_from_string (int, Lisp_Object); | |||
| 262 | static int unread_char; | 262 | static int unread_char; |
| 263 | 263 | ||
| 264 | static int | 264 | static int |
| 265 | readchar (readcharfun, multibyte) | 265 | readchar (Lisp_Object readcharfun, int *multibyte) |
| 266 | Lisp_Object readcharfun; | ||
| 267 | int *multibyte; | ||
| 268 | { | 266 | { |
| 269 | Lisp_Object tem; | 267 | Lisp_Object tem; |
| 270 | register int c; | 268 | register int c; |
| @@ -435,9 +433,7 @@ readchar (readcharfun, multibyte) | |||
| 435 | If the stream is a user function, call it with the char as argument. */ | 433 | If the stream is a user function, call it with the char as argument. */ |
| 436 | 434 | ||
| 437 | static void | 435 | static void |
| 438 | unreadchar (readcharfun, c) | 436 | unreadchar (Lisp_Object readcharfun, int c) |
| 439 | Lisp_Object readcharfun; | ||
| 440 | int c; | ||
| 441 | { | 437 | { |
| 442 | readchar_count--; | 438 | readchar_count--; |
| 443 | if (c == -1) | 439 | if (c == -1) |
| @@ -501,18 +497,14 @@ unreadchar (readcharfun, c) | |||
| 501 | } | 497 | } |
| 502 | 498 | ||
| 503 | static int | 499 | static int |
| 504 | readbyte_for_lambda (c, readcharfun) | 500 | readbyte_for_lambda (int c, Lisp_Object readcharfun) |
| 505 | int c; | ||
| 506 | Lisp_Object readcharfun; | ||
| 507 | { | 501 | { |
| 508 | return read_bytecode_char (c >= 0); | 502 | return read_bytecode_char (c >= 0); |
| 509 | } | 503 | } |
| 510 | 504 | ||
| 511 | 505 | ||
| 512 | static int | 506 | static int |
| 513 | readbyte_from_file (c, readcharfun) | 507 | readbyte_from_file (int c, Lisp_Object readcharfun) |
| 514 | int c; | ||
| 515 | Lisp_Object readcharfun; | ||
| 516 | { | 508 | { |
| 517 | if (c >= 0) | 509 | if (c >= 0) |
| 518 | { | 510 | { |
| @@ -543,9 +535,7 @@ readbyte_from_file (c, readcharfun) | |||
| 543 | } | 535 | } |
| 544 | 536 | ||
| 545 | static int | 537 | static int |
| 546 | readbyte_from_string (c, readcharfun) | 538 | readbyte_from_string (int c, Lisp_Object readcharfun) |
| 547 | int c; | ||
| 548 | Lisp_Object readcharfun; | ||
| 549 | { | 539 | { |
| 550 | Lisp_Object string = XCAR (readcharfun); | 540 | Lisp_Object string = XCAR (readcharfun); |
| 551 | 541 | ||
| @@ -573,10 +563,7 @@ readbyte_from_string (c, readcharfun) | |||
| 573 | extern char emacs_mule_bytes[256]; | 563 | extern char emacs_mule_bytes[256]; |
| 574 | 564 | ||
| 575 | static int | 565 | static int |
| 576 | read_emacs_mule_char (c, readbyte, readcharfun) | 566 | read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object readcharfun) |
| 577 | int c; | ||
| 578 | int (*readbyte) (int, Lisp_Object); | ||
| 579 | Lisp_Object readcharfun; | ||
| 580 | { | 567 | { |
| 581 | /* Emacs-mule coding uses at most 4-byte for one character. */ | 568 | /* Emacs-mule coding uses at most 4-byte for one character. */ |
| 582 | unsigned char buf[4]; | 569 | unsigned char buf[4]; |
| @@ -871,8 +858,7 @@ DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | |||
| 871 | because of an incompatible change in the byte compiler. */ | 858 | because of an incompatible change in the byte compiler. */ |
| 872 | 859 | ||
| 873 | static int | 860 | static int |
| 874 | safe_to_load_p (fd) | 861 | safe_to_load_p (int fd) |
| 875 | int fd; | ||
| 876 | { | 862 | { |
| 877 | char buf[512]; | 863 | char buf[512]; |
| 878 | int nbytes, i; | 864 | int nbytes, i; |
| @@ -909,8 +895,7 @@ safe_to_load_p (fd) | |||
| 909 | after loading a file successfully. */ | 895 | after loading a file successfully. */ |
| 910 | 896 | ||
| 911 | static Lisp_Object | 897 | static Lisp_Object |
| 912 | record_load_unwind (old) | 898 | record_load_unwind (Lisp_Object old) |
| 913 | Lisp_Object old; | ||
| 914 | { | 899 | { |
| 915 | return Vloads_in_progress = old; | 900 | return Vloads_in_progress = old; |
| 916 | } | 901 | } |
| @@ -918,15 +903,13 @@ record_load_unwind (old) | |||
| 918 | /* This handler function is used via internal_condition_case_1. */ | 903 | /* This handler function is used via internal_condition_case_1. */ |
| 919 | 904 | ||
| 920 | static Lisp_Object | 905 | static Lisp_Object |
| 921 | load_error_handler (data) | 906 | load_error_handler (Lisp_Object data) |
| 922 | Lisp_Object data; | ||
| 923 | { | 907 | { |
| 924 | return Qnil; | 908 | return Qnil; |
| 925 | } | 909 | } |
| 926 | 910 | ||
| 927 | static Lisp_Object | 911 | static Lisp_Object |
| 928 | load_warn_old_style_backquotes (file) | 912 | load_warn_old_style_backquotes (Lisp_Object file) |
| 929 | Lisp_Object file; | ||
| 930 | { | 913 | { |
| 931 | if (!NILP (Vold_style_backquotes)) | 914 | if (!NILP (Vold_style_backquotes)) |
| 932 | { | 915 | { |
| @@ -1299,8 +1282,8 @@ Return t if the file exists and loads successfully. */) | |||
| 1299 | } | 1282 | } |
| 1300 | 1283 | ||
| 1301 | static Lisp_Object | 1284 | static Lisp_Object |
| 1302 | load_unwind (arg) /* used as unwind-protect function in load */ | 1285 | load_unwind (Lisp_Object arg) /* used as unwind-protect function in load */ |
| 1303 | Lisp_Object arg; | 1286 | |
| 1304 | { | 1287 | { |
| 1305 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 1288 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 1306 | if (stream != NULL) | 1289 | if (stream != NULL) |
| @@ -1313,8 +1296,7 @@ load_unwind (arg) /* used as unwind-protect function in load */ | |||
| 1313 | } | 1296 | } |
| 1314 | 1297 | ||
| 1315 | static Lisp_Object | 1298 | static Lisp_Object |
| 1316 | load_descriptor_unwind (oldlist) | 1299 | load_descriptor_unwind (Lisp_Object oldlist) |
| 1317 | Lisp_Object oldlist; | ||
| 1318 | { | 1300 | { |
| 1319 | load_descriptor_list = oldlist; | 1301 | load_descriptor_list = oldlist; |
| 1320 | return Qnil; | 1302 | return Qnil; |
| @@ -1324,7 +1306,7 @@ load_descriptor_unwind (oldlist) | |||
| 1324 | This is used when starting a subprocess. */ | 1306 | This is used when starting a subprocess. */ |
| 1325 | 1307 | ||
| 1326 | void | 1308 | void |
| 1327 | close_load_descs () | 1309 | close_load_descs (void) |
| 1328 | { | 1310 | { |
| 1329 | #ifndef WINDOWSNT | 1311 | #ifndef WINDOWSNT |
| 1330 | Lisp_Object tail; | 1312 | Lisp_Object tail; |
| @@ -1334,8 +1316,7 @@ close_load_descs () | |||
| 1334 | } | 1316 | } |
| 1335 | 1317 | ||
| 1336 | static int | 1318 | static int |
| 1337 | complete_filename_p (pathname) | 1319 | complete_filename_p (Lisp_Object pathname) |
| 1338 | Lisp_Object pathname; | ||
| 1339 | { | 1320 | { |
| 1340 | register const unsigned char *s = SDATA (pathname); | 1321 | register const unsigned char *s = SDATA (pathname); |
| 1341 | return (IS_DIRECTORY_SEP (s[0]) | 1322 | return (IS_DIRECTORY_SEP (s[0]) |
| @@ -1383,11 +1364,7 @@ in which case file-name-handlers are ignored. */) | |||
| 1383 | but store the found remote file name in *STOREPTR. */ | 1364 | but store the found remote file name in *STOREPTR. */ |
| 1384 | 1365 | ||
| 1385 | int | 1366 | int |
| 1386 | openp (path, str, suffixes, storeptr, predicate) | 1367 | openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *storeptr, Lisp_Object predicate) |
| 1387 | Lisp_Object path, str; | ||
| 1388 | Lisp_Object suffixes; | ||
| 1389 | Lisp_Object *storeptr; | ||
| 1390 | Lisp_Object predicate; | ||
| 1391 | { | 1368 | { |
| 1392 | register int fd; | 1369 | register int fd; |
| 1393 | int fn_size = 100; | 1370 | int fn_size = 100; |
| @@ -1539,9 +1516,7 @@ openp (path, str, suffixes, storeptr, predicate) | |||
| 1539 | ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */ | 1516 | ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */ |
| 1540 | 1517 | ||
| 1541 | static void | 1518 | static void |
| 1542 | build_load_history (filename, entire) | 1519 | build_load_history (Lisp_Object filename, int entire) |
| 1543 | Lisp_Object filename; | ||
| 1544 | int entire; | ||
| 1545 | { | 1520 | { |
| 1546 | register Lisp_Object tail, prev, newelt; | 1521 | register Lisp_Object tail, prev, newelt; |
| 1547 | register Lisp_Object tem, tem2; | 1522 | register Lisp_Object tem, tem2; |
| @@ -1601,16 +1576,15 @@ build_load_history (filename, entire) | |||
| 1601 | } | 1576 | } |
| 1602 | 1577 | ||
| 1603 | Lisp_Object | 1578 | Lisp_Object |
| 1604 | unreadpure (junk) /* Used as unwind-protect function in readevalloop */ | 1579 | unreadpure (Lisp_Object junk) /* Used as unwind-protect function in readevalloop */ |
| 1605 | Lisp_Object junk; | 1580 | |
| 1606 | { | 1581 | { |
| 1607 | read_pure = 0; | 1582 | read_pure = 0; |
| 1608 | return Qnil; | 1583 | return Qnil; |
| 1609 | } | 1584 | } |
| 1610 | 1585 | ||
| 1611 | static Lisp_Object | 1586 | static Lisp_Object |
| 1612 | readevalloop_1 (old) | 1587 | readevalloop_1 (Lisp_Object old) |
| 1613 | Lisp_Object old; | ||
| 1614 | { | 1588 | { |
| 1615 | load_convert_to_unibyte = ! NILP (old); | 1589 | load_convert_to_unibyte = ! NILP (old); |
| 1616 | return Qnil; | 1590 | return Qnil; |
| @@ -1620,7 +1594,7 @@ readevalloop_1 (old) | |||
| 1620 | information. */ | 1594 | information. */ |
| 1621 | 1595 | ||
| 1622 | static void | 1596 | static void |
| 1623 | end_of_file_error () | 1597 | end_of_file_error (void) |
| 1624 | { | 1598 | { |
| 1625 | if (STRINGP (Vload_file_name)) | 1599 | if (STRINGP (Vload_file_name)) |
| 1626 | xsignal1 (Qend_of_file, Vload_file_name); | 1600 | xsignal1 (Qend_of_file, Vload_file_name); |
| @@ -1924,10 +1898,10 @@ START and END optionally delimit a substring of STRING from which to read; | |||
| 1924 | /* Function to set up the global context we need in toplevel read | 1898 | /* Function to set up the global context we need in toplevel read |
| 1925 | calls. */ | 1899 | calls. */ |
| 1926 | static Lisp_Object | 1900 | static Lisp_Object |
| 1927 | read_internal_start (stream, start, end) | 1901 | read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end) |
| 1928 | Lisp_Object stream; | 1902 | |
| 1929 | Lisp_Object start; /* Only used when stream is a string. */ | 1903 | /* Only used when stream is a string. */ |
| 1930 | Lisp_Object end; /* Only used when stream is a string. */ | 1904 | /* Only used when stream is a string. */ |
| 1931 | { | 1905 | { |
| 1932 | Lisp_Object retval; | 1906 | Lisp_Object retval; |
| 1933 | 1907 | ||
| @@ -1985,9 +1959,7 @@ read_internal_start (stream, start, end) | |||
| 1985 | S is error string of length N (if > 0) */ | 1959 | S is error string of length N (if > 0) */ |
| 1986 | 1960 | ||
| 1987 | static void | 1961 | static void |
| 1988 | invalid_syntax (s, n) | 1962 | invalid_syntax (const char *s, int n) |
| 1989 | const char *s; | ||
| 1990 | int n; | ||
| 1991 | { | 1963 | { |
| 1992 | if (!n) | 1964 | if (!n) |
| 1993 | n = strlen (s); | 1965 | n = strlen (s); |
| @@ -1999,8 +1971,7 @@ invalid_syntax (s, n) | |||
| 1999 | are not allowed. */ | 1971 | are not allowed. */ |
| 2000 | 1972 | ||
| 2001 | static Lisp_Object | 1973 | static Lisp_Object |
| 2002 | read0 (readcharfun) | 1974 | read0 (Lisp_Object readcharfun) |
| 2003 | Lisp_Object readcharfun; | ||
| 2004 | { | 1975 | { |
| 2005 | register Lisp_Object val; | 1976 | register Lisp_Object val; |
| 2006 | int c; | 1977 | int c; |
| @@ -2020,9 +1991,7 @@ static char *read_buffer; | |||
| 2020 | If the escape sequence forces unibyte, return eight-bit char. */ | 1991 | If the escape sequence forces unibyte, return eight-bit char. */ |
| 2021 | 1992 | ||
| 2022 | static int | 1993 | static int |
| 2023 | read_escape (readcharfun, stringp) | 1994 | read_escape (Lisp_Object readcharfun, int stringp) |
| 2024 | Lisp_Object readcharfun; | ||
| 2025 | int stringp; | ||
| 2026 | { | 1995 | { |
| 2027 | register int c = READCHAR; | 1996 | register int c = READCHAR; |
| 2028 | /* \u allows up to four hex digits, \U up to eight. Default to the | 1997 | /* \u allows up to four hex digits, \U up to eight. Default to the |
| @@ -2236,9 +2205,7 @@ read_escape (readcharfun, stringp) | |||
| 2236 | range. */ | 2205 | range. */ |
| 2237 | 2206 | ||
| 2238 | static Lisp_Object | 2207 | static Lisp_Object |
| 2239 | read_integer (readcharfun, radix) | 2208 | read_integer (Lisp_Object readcharfun, int radix) |
| 2240 | Lisp_Object readcharfun; | ||
| 2241 | int radix; | ||
| 2242 | { | 2209 | { |
| 2243 | int ndigits = 0, invalid_p, c, sign = 0; | 2210 | int ndigits = 0, invalid_p, c, sign = 0; |
| 2244 | /* We use a floating point number because */ | 2211 | /* We use a floating point number because */ |
| @@ -2303,10 +2270,7 @@ read_integer (readcharfun, radix) | |||
| 2303 | FIRST_IN_LIST is nonzero if this is the first element of a list. */ | 2270 | FIRST_IN_LIST is nonzero if this is the first element of a list. */ |
| 2304 | 2271 | ||
| 2305 | static Lisp_Object | 2272 | static Lisp_Object |
| 2306 | read1 (readcharfun, pch, first_in_list) | 2273 | read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) |
| 2307 | register Lisp_Object readcharfun; | ||
| 2308 | int *pch; | ||
| 2309 | int first_in_list; | ||
| 2310 | { | 2274 | { |
| 2311 | register int c; | 2275 | register int c; |
| 2312 | int uninterned_symbol = 0; | 2276 | int uninterned_symbol = 0; |
| @@ -3110,9 +3074,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 3110 | static Lisp_Object seen_list; | 3074 | static Lisp_Object seen_list; |
| 3111 | 3075 | ||
| 3112 | static void | 3076 | static void |
| 3113 | substitute_object_in_subtree (object, placeholder) | 3077 | substitute_object_in_subtree (Lisp_Object object, Lisp_Object placeholder) |
| 3114 | Lisp_Object object; | ||
| 3115 | Lisp_Object placeholder; | ||
| 3116 | { | 3078 | { |
| 3117 | Lisp_Object check_object; | 3079 | Lisp_Object check_object; |
| 3118 | 3080 | ||
| @@ -3147,10 +3109,7 @@ substitute_object_in_subtree (object, placeholder) | |||
| 3147 | } while (0) | 3109 | } while (0) |
| 3148 | 3110 | ||
| 3149 | static Lisp_Object | 3111 | static Lisp_Object |
| 3150 | substitute_object_recurse (object, placeholder, subtree) | 3112 | substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Object subtree) |
| 3151 | Lisp_Object object; | ||
| 3152 | Lisp_Object placeholder; | ||
| 3153 | Lisp_Object subtree; | ||
| 3154 | { | 3113 | { |
| 3155 | /* If we find the placeholder, return the target object. */ | 3114 | /* If we find the placeholder, return the target object. */ |
| 3156 | if (EQ (placeholder, subtree)) | 3115 | if (EQ (placeholder, subtree)) |
| @@ -3225,9 +3184,7 @@ substitute_object_recurse (object, placeholder, subtree) | |||
| 3225 | 3184 | ||
| 3226 | /* Helper function for substitute_object_recurse. */ | 3185 | /* Helper function for substitute_object_recurse. */ |
| 3227 | static void | 3186 | static void |
| 3228 | substitute_in_interval (interval, arg) | 3187 | substitute_in_interval (INTERVAL interval, Lisp_Object arg) |
| 3229 | INTERVAL interval; | ||
| 3230 | Lisp_Object arg; | ||
| 3231 | { | 3188 | { |
| 3232 | Lisp_Object object = Fcar (arg); | 3189 | Lisp_Object object = Fcar (arg); |
| 3233 | Lisp_Object placeholder = Fcdr (arg); | 3190 | Lisp_Object placeholder = Fcdr (arg); |
| @@ -3243,9 +3200,7 @@ substitute_in_interval (interval, arg) | |||
| 3243 | #define EXP_INT 16 | 3200 | #define EXP_INT 16 |
| 3244 | 3201 | ||
| 3245 | int | 3202 | int |
| 3246 | isfloat_string (cp, ignore_trailing) | 3203 | isfloat_string (register char *cp, int ignore_trailing) |
| 3247 | register char *cp; | ||
| 3248 | int ignore_trailing; | ||
| 3249 | { | 3204 | { |
| 3250 | register int state; | 3205 | register int state; |
| 3251 | 3206 | ||
| @@ -3310,9 +3265,7 @@ isfloat_string (cp, ignore_trailing) | |||
| 3310 | 3265 | ||
| 3311 | 3266 | ||
| 3312 | static Lisp_Object | 3267 | static Lisp_Object |
| 3313 | read_vector (readcharfun, bytecodeflag) | 3268 | read_vector (Lisp_Object readcharfun, int bytecodeflag) |
| 3314 | Lisp_Object readcharfun; | ||
| 3315 | int bytecodeflag; | ||
| 3316 | { | 3269 | { |
| 3317 | register int i; | 3270 | register int i; |
| 3318 | register int size; | 3271 | register int size; |
| @@ -3395,9 +3348,7 @@ read_vector (readcharfun, bytecodeflag) | |||
| 3395 | and make structure pure. */ | 3348 | and make structure pure. */ |
| 3396 | 3349 | ||
| 3397 | static Lisp_Object | 3350 | static Lisp_Object |
| 3398 | read_list (flag, readcharfun) | 3351 | read_list (int flag, register Lisp_Object readcharfun) |
| 3399 | int flag; | ||
| 3400 | register Lisp_Object readcharfun; | ||
| 3401 | { | 3352 | { |
| 3402 | /* -1 means check next element for defun, | 3353 | /* -1 means check next element for defun, |
| 3403 | 0 means don't check, | 3354 | 0 means don't check, |
| @@ -3585,14 +3536,13 @@ Lisp_Object initial_obarray; | |||
| 3585 | 3536 | ||
| 3586 | int oblookup_last_bucket_number; | 3537 | int oblookup_last_bucket_number; |
| 3587 | 3538 | ||
| 3588 | static int hash_string (); | 3539 | static int hash_string (const unsigned char *ptr, int len); |
| 3589 | 3540 | ||
| 3590 | /* Get an error if OBARRAY is not an obarray. | 3541 | /* Get an error if OBARRAY is not an obarray. |
| 3591 | If it is one, return it. */ | 3542 | If it is one, return it. */ |
| 3592 | 3543 | ||
| 3593 | Lisp_Object | 3544 | Lisp_Object |
| 3594 | check_obarray (obarray) | 3545 | check_obarray (Lisp_Object obarray) |
| 3595 | Lisp_Object obarray; | ||
| 3596 | { | 3546 | { |
| 3597 | if (!VECTORP (obarray) || XVECTOR (obarray)->size == 0) | 3547 | if (!VECTORP (obarray) || XVECTOR (obarray)->size == 0) |
| 3598 | { | 3548 | { |
| @@ -3607,8 +3557,7 @@ check_obarray (obarray) | |||
| 3607 | interned in the current obarray. */ | 3557 | interned in the current obarray. */ |
| 3608 | 3558 | ||
| 3609 | Lisp_Object | 3559 | Lisp_Object |
| 3610 | intern (str) | 3560 | intern (const char *str) |
| 3611 | const char *str; | ||
| 3612 | { | 3561 | { |
| 3613 | Lisp_Object tem; | 3562 | Lisp_Object tem; |
| 3614 | int len = strlen (str); | 3563 | int len = strlen (str); |
| @@ -3649,8 +3598,7 @@ intern_c_string (const char *str) | |||
| 3649 | /* Create an uninterned symbol with name STR. */ | 3598 | /* Create an uninterned symbol with name STR. */ |
| 3650 | 3599 | ||
| 3651 | Lisp_Object | 3600 | Lisp_Object |
| 3652 | make_symbol (str) | 3601 | make_symbol (char *str) |
| 3653 | char *str; | ||
| 3654 | { | 3602 | { |
| 3655 | int len = strlen (str); | 3603 | int len = strlen (str); |
| 3656 | 3604 | ||
| @@ -3812,10 +3760,7 @@ OBARRAY defaults to the value of the variable `obarray'. */) | |||
| 3812 | Also store the bucket number in oblookup_last_bucket_number. */ | 3760 | Also store the bucket number in oblookup_last_bucket_number. */ |
| 3813 | 3761 | ||
| 3814 | Lisp_Object | 3762 | Lisp_Object |
| 3815 | oblookup (obarray, ptr, size, size_byte) | 3763 | oblookup (Lisp_Object obarray, register const char *ptr, int size, int size_byte) |
| 3816 | Lisp_Object obarray; | ||
| 3817 | register const char *ptr; | ||
| 3818 | int size, size_byte; | ||
| 3819 | { | 3764 | { |
| 3820 | int hash; | 3765 | int hash; |
| 3821 | int obsize; | 3766 | int obsize; |
| @@ -3852,9 +3797,7 @@ oblookup (obarray, ptr, size, size_byte) | |||
| 3852 | } | 3797 | } |
| 3853 | 3798 | ||
| 3854 | static int | 3799 | static int |
| 3855 | hash_string (ptr, len) | 3800 | hash_string (const unsigned char *ptr, int len) |
| 3856 | const unsigned char *ptr; | ||
| 3857 | int len; | ||
| 3858 | { | 3801 | { |
| 3859 | register const unsigned char *p = ptr; | 3802 | register const unsigned char *p = ptr; |
| 3860 | register const unsigned char *end = p + len; | 3803 | register const unsigned char *end = p + len; |
| @@ -3871,10 +3814,7 @@ hash_string (ptr, len) | |||
| 3871 | } | 3814 | } |
| 3872 | 3815 | ||
| 3873 | void | 3816 | void |
| 3874 | map_obarray (obarray, fn, arg) | 3817 | map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Object arg) |
| 3875 | Lisp_Object obarray; | ||
| 3876 | void (*fn) (Lisp_Object, Lisp_Object); | ||
| 3877 | Lisp_Object arg; | ||
| 3878 | { | 3818 | { |
| 3879 | register int i; | 3819 | register int i; |
| 3880 | register Lisp_Object tail; | 3820 | register Lisp_Object tail; |
| @@ -3894,8 +3834,7 @@ map_obarray (obarray, fn, arg) | |||
| 3894 | } | 3834 | } |
| 3895 | 3835 | ||
| 3896 | void | 3836 | void |
| 3897 | mapatoms_1 (sym, function) | 3837 | mapatoms_1 (Lisp_Object sym, Lisp_Object function) |
| 3898 | Lisp_Object sym, function; | ||
| 3899 | { | 3838 | { |
| 3900 | call1 (function, sym); | 3839 | call1 (function, sym); |
| 3901 | } | 3840 | } |
| @@ -3916,7 +3855,7 @@ OBARRAY defaults to the value of `obarray'. */) | |||
| 3916 | #define OBARRAY_SIZE 1511 | 3855 | #define OBARRAY_SIZE 1511 |
| 3917 | 3856 | ||
| 3918 | void | 3857 | void |
| 3919 | init_obarray () | 3858 | init_obarray (void) |
| 3920 | { | 3859 | { |
| 3921 | Lisp_Object oblength; | 3860 | Lisp_Object oblength; |
| 3922 | 3861 | ||
| @@ -3957,8 +3896,7 @@ init_obarray () | |||
| 3957 | } | 3896 | } |
| 3958 | 3897 | ||
| 3959 | void | 3898 | void |
| 3960 | defsubr (sname) | 3899 | defsubr (struct Lisp_Subr *sname) |
| 3961 | struct Lisp_Subr *sname; | ||
| 3962 | { | 3900 | { |
| 3963 | Lisp_Object sym; | 3901 | Lisp_Object sym; |
| 3964 | sym = intern_c_string (sname->symbol_name); | 3902 | sym = intern_c_string (sname->symbol_name); |
| @@ -4053,7 +3991,7 @@ defvar_kboard (struct Lisp_Kboard_Objfwd *ko_fwd, | |||
| 4053 | static Lisp_Object dump_path; | 3991 | static Lisp_Object dump_path; |
| 4054 | 3992 | ||
| 4055 | void | 3993 | void |
| 4056 | init_lread () | 3994 | init_lread (void) |
| 4057 | { | 3995 | { |
| 4058 | char *normal; | 3996 | char *normal; |
| 4059 | int turn_off_warning = 0; | 3997 | int turn_off_warning = 0; |
| @@ -4246,9 +4184,7 @@ init_lread () | |||
| 4246 | does not exist. Print it on stderr and put it in *Messages*. */ | 4184 | does not exist. Print it on stderr and put it in *Messages*. */ |
| 4247 | 4185 | ||
| 4248 | void | 4186 | void |
| 4249 | dir_warning (format, dirname) | 4187 | dir_warning (char *format, Lisp_Object dirname) |
| 4250 | char *format; | ||
| 4251 | Lisp_Object dirname; | ||
| 4252 | { | 4188 | { |
| 4253 | char *buffer | 4189 | char *buffer |
| 4254 | = (char *) alloca (SCHARS (dirname) + strlen (format) + 5); | 4190 | = (char *) alloca (SCHARS (dirname) + strlen (format) + 5); |
| @@ -4261,7 +4197,7 @@ dir_warning (format, dirname) | |||
| 4261 | } | 4197 | } |
| 4262 | 4198 | ||
| 4263 | void | 4199 | void |
| 4264 | syms_of_lread () | 4200 | syms_of_lread (void) |
| 4265 | { | 4201 | { |
| 4266 | defsubr (&Sread); | 4202 | defsubr (&Sread); |
| 4267 | defsubr (&Sread_from_string); | 4203 | defsubr (&Sread_from_string); |
diff --git a/src/macros.c b/src/macros.c index 62aeb0fa635..83180d090a8 100644 --- a/src/macros.c +++ b/src/macros.c | |||
| @@ -53,7 +53,7 @@ Lisp_Object executing_kbd_macro; | |||
| 53 | 53 | ||
| 54 | extern Lisp_Object real_this_command; | 54 | extern Lisp_Object real_this_command; |
| 55 | 55 | ||
| 56 | Lisp_Object Fexecute_kbd_macro (); | 56 | Lisp_Object Fexecute_kbd_macro (Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc); |
| 57 | 57 | ||
| 58 | DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P", | 58 | DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P", |
| 59 | doc: /* Record subsequent keyboard input, defining a keyboard macro. | 59 | doc: /* Record subsequent keyboard input, defining a keyboard macro. |
| @@ -140,7 +140,7 @@ macro before appending to it. */) | |||
| 140 | /* Finish defining the current keyboard macro. */ | 140 | /* Finish defining the current keyboard macro. */ |
| 141 | 141 | ||
| 142 | void | 142 | void |
| 143 | end_kbd_macro () | 143 | end_kbd_macro (void) |
| 144 | { | 144 | { |
| 145 | current_kboard->defining_kbd_macro = Qnil; | 145 | current_kboard->defining_kbd_macro = Qnil; |
| 146 | update_mode_lines++; | 146 | update_mode_lines++; |
| @@ -194,8 +194,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */) | |||
| 194 | /* Store character c into kbd macro being defined */ | 194 | /* Store character c into kbd macro being defined */ |
| 195 | 195 | ||
| 196 | void | 196 | void |
| 197 | store_kbd_macro_char (c) | 197 | store_kbd_macro_char (Lisp_Object c) |
| 198 | Lisp_Object c; | ||
| 199 | { | 198 | { |
| 200 | struct kboard *kb = current_kboard; | 199 | struct kboard *kb = current_kboard; |
| 201 | 200 | ||
| @@ -223,7 +222,7 @@ store_kbd_macro_char (c) | |||
| 223 | really belong to it. This is done in between editor commands. */ | 222 | really belong to it. This is done in between editor commands. */ |
| 224 | 223 | ||
| 225 | void | 224 | void |
| 226 | finalize_kbd_macro_chars () | 225 | finalize_kbd_macro_chars (void) |
| 227 | { | 226 | { |
| 228 | current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr; | 227 | current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr; |
| 229 | } | 228 | } |
| @@ -286,8 +285,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */) | |||
| 286 | Called when the unwind-protect in Fexecute_kbd_macro gets invoked. */ | 285 | Called when the unwind-protect in Fexecute_kbd_macro gets invoked. */ |
| 287 | 286 | ||
| 288 | static Lisp_Object | 287 | static Lisp_Object |
| 289 | pop_kbd_macro (info) | 288 | pop_kbd_macro (Lisp_Object info) |
| 290 | Lisp_Object info; | ||
| 291 | { | 289 | { |
| 292 | Lisp_Object tem; | 290 | Lisp_Object tem; |
| 293 | Vexecuting_kbd_macro = XCAR (info); | 291 | Vexecuting_kbd_macro = XCAR (info); |
| @@ -367,14 +365,14 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */) | |||
| 367 | } | 365 | } |
| 368 | 366 | ||
| 369 | void | 367 | void |
| 370 | init_macros () | 368 | init_macros (void) |
| 371 | { | 369 | { |
| 372 | Vexecuting_kbd_macro = Qnil; | 370 | Vexecuting_kbd_macro = Qnil; |
| 373 | executing_kbd_macro = Qnil; | 371 | executing_kbd_macro = Qnil; |
| 374 | } | 372 | } |
| 375 | 373 | ||
| 376 | void | 374 | void |
| 377 | syms_of_macros () | 375 | syms_of_macros (void) |
| 378 | { | 376 | { |
| 379 | Qexecute_kbd_macro = intern_c_string ("execute-kbd-macro"); | 377 | Qexecute_kbd_macro = intern_c_string ("execute-kbd-macro"); |
| 380 | staticpro (&Qexecute_kbd_macro); | 378 | staticpro (&Qexecute_kbd_macro); |
diff --git a/src/marker.c b/src/marker.c index 354111d3081..fc9a6637a82 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -39,8 +39,7 @@ static void byte_char_debug_check (struct buffer *, int, int); | |||
| 39 | static int byte_debug_flag; | 39 | static int byte_debug_flag; |
| 40 | 40 | ||
| 41 | void | 41 | void |
| 42 | clear_charpos_cache (b) | 42 | clear_charpos_cache (struct buffer *b) |
| 43 | struct buffer *b; | ||
| 44 | { | 43 | { |
| 45 | if (cached_buffer == b) | 44 | if (cached_buffer == b) |
| 46 | cached_buffer = 0; | 45 | cached_buffer = 0; |
| @@ -100,9 +99,7 @@ clear_charpos_cache (b) | |||
| 100 | } | 99 | } |
| 101 | 100 | ||
| 102 | static void | 101 | static void |
| 103 | byte_char_debug_check (b, charpos, bytepos) | 102 | byte_char_debug_check (struct buffer *b, int charpos, int bytepos) |
| 104 | struct buffer *b; | ||
| 105 | int charpos, bytepos; | ||
| 106 | { | 103 | { |
| 107 | int nchars = 0; | 104 | int nchars = 0; |
| 108 | 105 | ||
| @@ -122,16 +119,13 @@ byte_char_debug_check (b, charpos, bytepos) | |||
| 122 | } | 119 | } |
| 123 | 120 | ||
| 124 | int | 121 | int |
| 125 | charpos_to_bytepos (charpos) | 122 | charpos_to_bytepos (int charpos) |
| 126 | int charpos; | ||
| 127 | { | 123 | { |
| 128 | return buf_charpos_to_bytepos (current_buffer, charpos); | 124 | return buf_charpos_to_bytepos (current_buffer, charpos); |
| 129 | } | 125 | } |
| 130 | 126 | ||
| 131 | int | 127 | int |
| 132 | buf_charpos_to_bytepos (b, charpos) | 128 | buf_charpos_to_bytepos (struct buffer *b, int charpos) |
| 133 | struct buffer *b; | ||
| 134 | int charpos; | ||
| 135 | { | 129 | { |
| 136 | struct Lisp_Marker *tail; | 130 | struct Lisp_Marker *tail; |
| 137 | int best_above, best_above_byte; | 131 | int best_above, best_above_byte; |
| @@ -254,8 +248,7 @@ buf_charpos_to_bytepos (b, charpos) | |||
| 254 | in the simplest, most reliable way. */ | 248 | in the simplest, most reliable way. */ |
| 255 | 249 | ||
| 256 | int | 250 | int |
| 257 | verify_bytepos (charpos) | 251 | verify_bytepos (int charpos) |
| 258 | int charpos; | ||
| 259 | { | 252 | { |
| 260 | int below = 1; | 253 | int below = 1; |
| 261 | int below_byte = 1; | 254 | int below_byte = 1; |
| @@ -315,16 +308,13 @@ verify_bytepos (charpos) | |||
| 315 | } | 308 | } |
| 316 | 309 | ||
| 317 | int | 310 | int |
| 318 | bytepos_to_charpos (bytepos) | 311 | bytepos_to_charpos (int bytepos) |
| 319 | int bytepos; | ||
| 320 | { | 312 | { |
| 321 | return buf_bytepos_to_charpos (current_buffer, bytepos); | 313 | return buf_bytepos_to_charpos (current_buffer, bytepos); |
| 322 | } | 314 | } |
| 323 | 315 | ||
| 324 | int | 316 | int |
| 325 | buf_bytepos_to_charpos (b, bytepos) | 317 | buf_bytepos_to_charpos (struct buffer *b, int bytepos) |
| 326 | struct buffer *b; | ||
| 327 | int bytepos; | ||
| 328 | { | 318 | { |
| 329 | struct Lisp_Marker *tail; | 319 | struct Lisp_Marker *tail; |
| 330 | int best_above, best_above_byte; | 320 | int best_above, best_above_byte; |
| @@ -556,8 +546,7 @@ Returns MARKER. */) | |||
| 556 | be outside the visible part. */ | 546 | be outside the visible part. */ |
| 557 | 547 | ||
| 558 | Lisp_Object | 548 | Lisp_Object |
| 559 | set_marker_restricted (marker, pos, buffer) | 549 | set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer) |
| 560 | Lisp_Object marker, pos, buffer; | ||
| 561 | { | 550 | { |
| 562 | register int charno, bytepos; | 551 | register int charno, bytepos; |
| 563 | register struct buffer *b; | 552 | register struct buffer *b; |
| @@ -632,9 +621,7 @@ set_marker_restricted (marker, pos, buffer) | |||
| 632 | character position and the corresponding byte position. */ | 621 | character position and the corresponding byte position. */ |
| 633 | 622 | ||
| 634 | Lisp_Object | 623 | Lisp_Object |
| 635 | set_marker_both (marker, buffer, charpos, bytepos) | 624 | set_marker_both (Lisp_Object marker, Lisp_Object buffer, int charpos, int bytepos) |
| 636 | Lisp_Object marker, buffer; | ||
| 637 | int charpos, bytepos; | ||
| 638 | { | 625 | { |
| 639 | register struct buffer *b; | 626 | register struct buffer *b; |
| 640 | register struct Lisp_Marker *m; | 627 | register struct Lisp_Marker *m; |
| @@ -682,9 +669,7 @@ set_marker_both (marker, buffer, charpos, bytepos) | |||
| 682 | be outside the visible part. */ | 669 | be outside the visible part. */ |
| 683 | 670 | ||
| 684 | Lisp_Object | 671 | Lisp_Object |
| 685 | set_marker_restricted_both (marker, buffer, charpos, bytepos) | 672 | set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, int charpos, int bytepos) |
| 686 | Lisp_Object marker, buffer; | ||
| 687 | int charpos, bytepos; | ||
| 688 | { | 673 | { |
| 689 | register struct buffer *b; | 674 | register struct buffer *b; |
| 690 | register struct Lisp_Marker *m; | 675 | register struct Lisp_Marker *m; |
| @@ -745,8 +730,7 @@ set_marker_restricted_both (marker, buffer, charpos, bytepos) | |||
| 745 | including those in chain fields of markers. */ | 730 | including those in chain fields of markers. */ |
| 746 | 731 | ||
| 747 | void | 732 | void |
| 748 | unchain_marker (marker) | 733 | unchain_marker (register struct Lisp_Marker *marker) |
| 749 | register struct Lisp_Marker *marker; | ||
| 750 | { | 734 | { |
| 751 | register struct Lisp_Marker *tail, *prev, *next; | 735 | register struct Lisp_Marker *tail, *prev, *next; |
| 752 | register struct buffer *b; | 736 | register struct buffer *b; |
| @@ -796,8 +780,7 @@ unchain_marker (marker) | |||
| 796 | /* Return the char position of marker MARKER, as a C integer. */ | 780 | /* Return the char position of marker MARKER, as a C integer. */ |
| 797 | 781 | ||
| 798 | int | 782 | int |
| 799 | marker_position (marker) | 783 | marker_position (Lisp_Object marker) |
| 800 | Lisp_Object marker; | ||
| 801 | { | 784 | { |
| 802 | register struct Lisp_Marker *m = XMARKER (marker); | 785 | register struct Lisp_Marker *m = XMARKER (marker); |
| 803 | register struct buffer *buf = m->buffer; | 786 | register struct buffer *buf = m->buffer; |
| @@ -811,8 +794,7 @@ marker_position (marker) | |||
| 811 | /* Return the byte position of marker MARKER, as a C integer. */ | 794 | /* Return the byte position of marker MARKER, as a C integer. */ |
| 812 | 795 | ||
| 813 | int | 796 | int |
| 814 | marker_byte_position (marker) | 797 | marker_byte_position (Lisp_Object marker) |
| 815 | Lisp_Object marker; | ||
| 816 | { | 798 | { |
| 817 | register struct Lisp_Marker *m = XMARKER (marker); | 799 | register struct Lisp_Marker *m = XMARKER (marker); |
| 818 | register struct buffer *buf = m->buffer; | 800 | register struct buffer *buf = m->buffer; |
| @@ -898,8 +880,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at, | |||
| 898 | /* For debugging -- count the markers in buffer BUF. */ | 880 | /* For debugging -- count the markers in buffer BUF. */ |
| 899 | 881 | ||
| 900 | int | 882 | int |
| 901 | count_markers (buf) | 883 | count_markers (struct buffer *buf) |
| 902 | struct buffer *buf; | ||
| 903 | { | 884 | { |
| 904 | int total = 0; | 885 | int total = 0; |
| 905 | struct Lisp_Marker *tail; | 886 | struct Lisp_Marker *tail; |
| @@ -911,7 +892,7 @@ count_markers (buf) | |||
| 911 | } | 892 | } |
| 912 | 893 | ||
| 913 | void | 894 | void |
| 914 | syms_of_marker () | 895 | syms_of_marker (void) |
| 915 | { | 896 | { |
| 916 | defsubr (&Smarker_position); | 897 | defsubr (&Smarker_position); |
| 917 | defsubr (&Smarker_buffer); | 898 | defsubr (&Smarker_buffer); |
| @@ -71,8 +71,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; | |||
| 71 | /* Initialize structure containing state of computation. | 71 | /* Initialize structure containing state of computation. |
| 72 | (RFC 1321, 3.3: Step 3) */ | 72 | (RFC 1321, 3.3: Step 3) */ |
| 73 | void | 73 | void |
| 74 | md5_init_ctx (ctx) | 74 | md5_init_ctx (struct md5_ctx *ctx) |
| 75 | struct md5_ctx *ctx; | ||
| 76 | { | 75 | { |
| 77 | ctx->A = 0x67452301; | 76 | ctx->A = 0x67452301; |
| 78 | ctx->B = 0xefcdab89; | 77 | ctx->B = 0xefcdab89; |
| @@ -89,9 +88,7 @@ md5_init_ctx (ctx) | |||
| 89 | IMPORTANT: On some systems it is required that RESBUF is correctly | 88 | IMPORTANT: On some systems it is required that RESBUF is correctly |
| 90 | aligned for a 32 bits value. */ | 89 | aligned for a 32 bits value. */ |
| 91 | void * | 90 | void * |
| 92 | md5_read_ctx (ctx, resbuf) | 91 | md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) |
| 93 | const struct md5_ctx *ctx; | ||
| 94 | void *resbuf; | ||
| 95 | { | 92 | { |
| 96 | ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); | 93 | ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); |
| 97 | ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); | 94 | ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); |
| @@ -107,9 +104,7 @@ md5_read_ctx (ctx, resbuf) | |||
| 107 | IMPORTANT: On some systems it is required that RESBUF is correctly | 104 | IMPORTANT: On some systems it is required that RESBUF is correctly |
| 108 | aligned for a 32 bits value. */ | 105 | aligned for a 32 bits value. */ |
| 109 | void * | 106 | void * |
| 110 | md5_finish_ctx (ctx, resbuf) | 107 | md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) |
| 111 | struct md5_ctx *ctx; | ||
| 112 | void *resbuf; | ||
| 113 | { | 108 | { |
| 114 | /* Take yet unprocessed bytes into account. */ | 109 | /* Take yet unprocessed bytes into account. */ |
| 115 | md5_uint32 bytes = ctx->buflen; | 110 | md5_uint32 bytes = ctx->buflen; |
| @@ -138,9 +133,7 @@ md5_finish_ctx (ctx, resbuf) | |||
| 138 | resulting message digest number will be written into the 16 bytes | 133 | resulting message digest number will be written into the 16 bytes |
| 139 | beginning at RESBLOCK. */ | 134 | beginning at RESBLOCK. */ |
| 140 | int | 135 | int |
| 141 | md5_stream (stream, resblock) | 136 | md5_stream (FILE *stream, void *resblock) |
| 142 | FILE *stream; | ||
| 143 | void *resblock; | ||
| 144 | { | 137 | { |
| 145 | /* Important: BLOCKSIZE must be a multiple of 64. */ | 138 | /* Important: BLOCKSIZE must be a multiple of 64. */ |
| 146 | #define BLOCKSIZE 4096 | 139 | #define BLOCKSIZE 4096 |
| @@ -195,10 +188,7 @@ md5_stream (stream, resblock) | |||
| 195 | output yields to the wanted ASCII representation of the message | 188 | output yields to the wanted ASCII representation of the message |
| 196 | digest. */ | 189 | digest. */ |
| 197 | void * | 190 | void * |
| 198 | md5_buffer (buffer, len, resblock) | 191 | md5_buffer (const char *buffer, size_t len, void *resblock) |
| 199 | const char *buffer; | ||
| 200 | size_t len; | ||
| 201 | void *resblock; | ||
| 202 | { | 192 | { |
| 203 | struct md5_ctx ctx; | 193 | struct md5_ctx ctx; |
| 204 | 194 | ||
| @@ -214,10 +204,7 @@ md5_buffer (buffer, len, resblock) | |||
| 214 | 204 | ||
| 215 | 205 | ||
| 216 | void | 206 | void |
| 217 | md5_process_bytes (buffer, len, ctx) | 207 | md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) |
| 218 | const void *buffer; | ||
| 219 | size_t len; | ||
| 220 | struct md5_ctx *ctx; | ||
| 221 | { | 208 | { |
| 222 | /* const void aligned_buffer = buffer; */ | 209 | /* const void aligned_buffer = buffer; */ |
| 223 | 210 | ||
| @@ -287,10 +274,7 @@ md5_process_bytes (buffer, len, ctx) | |||
| 287 | It is assumed that LEN % 64 == 0. */ | 274 | It is assumed that LEN % 64 == 0. */ |
| 288 | 275 | ||
| 289 | void | 276 | void |
| 290 | md5_process_block (buffer, len, ctx) | 277 | md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) |
| 291 | const void *buffer; | ||
| 292 | size_t len; | ||
| 293 | struct md5_ctx *ctx; | ||
| 294 | { | 278 | { |
| 295 | md5_uint32 correct_words[16]; | 279 | md5_uint32 correct_words[16]; |
| 296 | const md5_uint32 *words = buffer; | 280 | const md5_uint32 *words = buffer; |
diff --git a/src/menu.c b/src/menu.c index 55b1acb3fb9..a90c71219d3 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -87,7 +87,7 @@ int menu_items_n_panes; | |||
| 87 | static int menu_items_submenu_depth; | 87 | static int menu_items_submenu_depth; |
| 88 | 88 | ||
| 89 | void | 89 | void |
| 90 | init_menu_items () | 90 | init_menu_items (void) |
| 91 | { | 91 | { |
| 92 | if (!NILP (menu_items_inuse)) | 92 | if (!NILP (menu_items_inuse)) |
| 93 | error ("Trying to use a menu from within a menu-entry"); | 93 | error ("Trying to use a menu from within a menu-entry"); |
| @@ -107,13 +107,12 @@ init_menu_items () | |||
| 107 | /* Call at the end of generating the data in menu_items. */ | 107 | /* Call at the end of generating the data in menu_items. */ |
| 108 | 108 | ||
| 109 | void | 109 | void |
| 110 | finish_menu_items () | 110 | finish_menu_items (void) |
| 111 | { | 111 | { |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | Lisp_Object | 114 | Lisp_Object |
| 115 | unuse_menu_items (dummy) | 115 | unuse_menu_items (Lisp_Object dummy) |
| 116 | Lisp_Object dummy; | ||
| 117 | { | 116 | { |
| 118 | return menu_items_inuse = Qnil; | 117 | return menu_items_inuse = Qnil; |
| 119 | } | 118 | } |
| @@ -122,7 +121,7 @@ unuse_menu_items (dummy) | |||
| 122 | in menu_items. */ | 121 | in menu_items. */ |
| 123 | 122 | ||
| 124 | void | 123 | void |
| 125 | discard_menu_items () | 124 | discard_menu_items (void) |
| 126 | { | 125 | { |
| 127 | /* Free the structure if it is especially large. | 126 | /* Free the structure if it is especially large. |
| 128 | Otherwise, hold on to it, to save time. */ | 127 | Otherwise, hold on to it, to save time. */ |
| @@ -145,8 +144,7 @@ cleanup_popup_menu (Lisp_Object arg) | |||
| 145 | mechanism. */ | 144 | mechanism. */ |
| 146 | 145 | ||
| 147 | static Lisp_Object | 146 | static Lisp_Object |
| 148 | restore_menu_items (saved) | 147 | restore_menu_items (Lisp_Object saved) |
| 149 | Lisp_Object saved; | ||
| 150 | { | 148 | { |
| 151 | menu_items = XCAR (saved); | 149 | menu_items = XCAR (saved); |
| 152 | menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil); | 150 | menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil); |
| @@ -164,7 +162,7 @@ restore_menu_items (saved) | |||
| 164 | It will be restored when the specpdl is unwound. */ | 162 | It will be restored when the specpdl is unwound. */ |
| 165 | 163 | ||
| 166 | void | 164 | void |
| 167 | save_menu_items () | 165 | save_menu_items (void) |
| 168 | { | 166 | { |
| 169 | Lisp_Object saved = list4 (!NILP (menu_items_inuse) ? menu_items : Qnil, | 167 | Lisp_Object saved = list4 (!NILP (menu_items_inuse) ? menu_items : Qnil, |
| 170 | make_number (menu_items_used), | 168 | make_number (menu_items_used), |
| @@ -179,7 +177,7 @@ save_menu_items () | |||
| 179 | /* Make the menu_items vector twice as large. */ | 177 | /* Make the menu_items vector twice as large. */ |
| 180 | 178 | ||
| 181 | static void | 179 | static void |
| 182 | grow_menu_items () | 180 | grow_menu_items (void) |
| 183 | { | 181 | { |
| 184 | menu_items_allocated *= 2; | 182 | menu_items_allocated *= 2; |
| 185 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); | 183 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); |
| @@ -188,7 +186,7 @@ grow_menu_items () | |||
| 188 | /* Begin a submenu. */ | 186 | /* Begin a submenu. */ |
| 189 | 187 | ||
| 190 | static void | 188 | static void |
| 191 | push_submenu_start () | 189 | push_submenu_start (void) |
| 192 | { | 190 | { |
| 193 | if (menu_items_used + 1 > menu_items_allocated) | 191 | if (menu_items_used + 1 > menu_items_allocated) |
| 194 | grow_menu_items (); | 192 | grow_menu_items (); |
| @@ -200,7 +198,7 @@ push_submenu_start () | |||
| 200 | /* End a submenu. */ | 198 | /* End a submenu. */ |
| 201 | 199 | ||
| 202 | static void | 200 | static void |
| 203 | push_submenu_end () | 201 | push_submenu_end (void) |
| 204 | { | 202 | { |
| 205 | if (menu_items_used + 1 > menu_items_allocated) | 203 | if (menu_items_used + 1 > menu_items_allocated) |
| 206 | grow_menu_items (); | 204 | grow_menu_items (); |
| @@ -212,7 +210,7 @@ push_submenu_end () | |||
| 212 | /* Indicate boundary between left and right. */ | 210 | /* Indicate boundary between left and right. */ |
| 213 | 211 | ||
| 214 | static void | 212 | static void |
| 215 | push_left_right_boundary () | 213 | push_left_right_boundary (void) |
| 216 | { | 214 | { |
| 217 | if (menu_items_used + 1 > menu_items_allocated) | 215 | if (menu_items_used + 1 > menu_items_allocated) |
| 218 | grow_menu_items (); | 216 | grow_menu_items (); |
| @@ -224,8 +222,7 @@ push_left_right_boundary () | |||
| 224 | NAME is the pane name. PREFIX_VEC is a prefix key for this pane. */ | 222 | NAME is the pane name. PREFIX_VEC is a prefix key for this pane. */ |
| 225 | 223 | ||
| 226 | static void | 224 | static void |
| 227 | push_menu_pane (name, prefix_vec) | 225 | push_menu_pane (Lisp_Object name, Lisp_Object prefix_vec) |
| 228 | Lisp_Object name, prefix_vec; | ||
| 229 | { | 226 | { |
| 230 | if (menu_items_used + MENU_ITEMS_PANE_LENGTH > menu_items_allocated) | 227 | if (menu_items_used + MENU_ITEMS_PANE_LENGTH > menu_items_allocated) |
| 231 | grow_menu_items (); | 228 | grow_menu_items (); |
| @@ -246,8 +243,7 @@ push_menu_pane (name, prefix_vec) | |||
| 246 | item, one of nil, `toggle' or `radio'. */ | 243 | item, one of nil, `toggle' or `radio'. */ |
| 247 | 244 | ||
| 248 | static void | 245 | static void |
| 249 | push_menu_item (name, enable, key, def, equiv, type, selected, help) | 246 | push_menu_item (Lisp_Object name, Lisp_Object enable, Lisp_Object key, Lisp_Object def, Lisp_Object equiv, Lisp_Object type, Lisp_Object selected, Lisp_Object help) |
| 250 | Lisp_Object name, enable, key, def, equiv, type, selected, help; | ||
| 251 | { | 247 | { |
| 252 | if (menu_items_used + MENU_ITEMS_ITEM_LENGTH > menu_items_allocated) | 248 | if (menu_items_used + MENU_ITEMS_ITEM_LENGTH > menu_items_allocated) |
| 253 | grow_menu_items (); | 249 | grow_menu_items (); |
| @@ -332,9 +328,7 @@ single_keymap_panes (Lisp_Object keymap, Lisp_Object pane_name, | |||
| 332 | If we encounter submenus deeper than SKP->MAXDEPTH levels, ignore them. */ | 328 | If we encounter submenus deeper than SKP->MAXDEPTH levels, ignore them. */ |
| 333 | 329 | ||
| 334 | static void | 330 | static void |
| 335 | single_menu_item (key, item, dummy, skp_v) | 331 | single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *skp_v) |
| 336 | Lisp_Object key, item, dummy; | ||
| 337 | void *skp_v; | ||
| 338 | { | 332 | { |
| 339 | Lisp_Object map, item_string, enabled; | 333 | Lisp_Object map, item_string, enabled; |
| 340 | struct gcpro gcpro1, gcpro2; | 334 | struct gcpro gcpro1, gcpro2; |
| @@ -456,9 +450,7 @@ single_menu_item (key, item, dummy, skp_v) | |||
| 456 | and generate menu panes for them in menu_items. */ | 450 | and generate menu panes for them in menu_items. */ |
| 457 | 451 | ||
| 458 | static void | 452 | static void |
| 459 | keymap_panes (keymaps, nmaps) | 453 | keymap_panes (Lisp_Object *keymaps, int nmaps) |
| 460 | Lisp_Object *keymaps; | ||
| 461 | int nmaps; | ||
| 462 | { | 454 | { |
| 463 | int mapno; | 455 | int mapno; |
| 464 | 456 | ||
| @@ -477,8 +469,7 @@ keymap_panes (keymaps, nmaps) | |||
| 477 | 469 | ||
| 478 | /* Push the items in a single pane defined by the alist PANE. */ | 470 | /* Push the items in a single pane defined by the alist PANE. */ |
| 479 | static void | 471 | static void |
| 480 | list_of_items (pane) | 472 | list_of_items (Lisp_Object pane) |
| 481 | Lisp_Object pane; | ||
| 482 | { | 473 | { |
| 483 | Lisp_Object tail, item, item1; | 474 | Lisp_Object tail, item, item1; |
| 484 | 475 | ||
| @@ -505,8 +496,7 @@ list_of_items (pane) | |||
| 505 | alist-of-alists MENU. | 496 | alist-of-alists MENU. |
| 506 | This handles old-fashioned calls to x-popup-menu. */ | 497 | This handles old-fashioned calls to x-popup-menu. */ |
| 507 | void | 498 | void |
| 508 | list_of_panes (menu) | 499 | list_of_panes (Lisp_Object menu) |
| 509 | Lisp_Object menu; | ||
| 510 | { | 500 | { |
| 511 | Lisp_Object tail; | 501 | Lisp_Object tail; |
| 512 | 502 | ||
| @@ -531,8 +521,7 @@ list_of_panes (menu) | |||
| 531 | whose event type is ITEM_KEY (with string ITEM_NAME) | 521 | whose event type is ITEM_KEY (with string ITEM_NAME) |
| 532 | and whose contents come from the list of keymaps MAPS. */ | 522 | and whose contents come from the list of keymaps MAPS. */ |
| 533 | int | 523 | int |
| 534 | parse_single_submenu (item_key, item_name, maps) | 524 | parse_single_submenu (Lisp_Object item_key, Lisp_Object item_name, Lisp_Object maps) |
| 535 | Lisp_Object item_key, item_name, maps; | ||
| 536 | { | 525 | { |
| 537 | Lisp_Object length; | 526 | Lisp_Object length; |
| 538 | int len; | 527 | int len; |
| @@ -583,7 +572,7 @@ parse_single_submenu (item_key, item_name, maps) | |||
| 583 | /* Allocate a widget_value, blocking input. */ | 572 | /* Allocate a widget_value, blocking input. */ |
| 584 | 573 | ||
| 585 | widget_value * | 574 | widget_value * |
| 586 | xmalloc_widget_value () | 575 | xmalloc_widget_value (void) |
| 587 | { | 576 | { |
| 588 | widget_value *value; | 577 | widget_value *value; |
| 589 | 578 | ||
| @@ -600,8 +589,7 @@ xmalloc_widget_value () | |||
| 600 | must be left alone. */ | 589 | must be left alone. */ |
| 601 | 590 | ||
| 602 | void | 591 | void |
| 603 | free_menubar_widget_value_tree (wv) | 592 | free_menubar_widget_value_tree (widget_value *wv) |
| 604 | widget_value *wv; | ||
| 605 | { | 593 | { |
| 606 | if (! wv) return; | 594 | if (! wv) return; |
| 607 | 595 | ||
| @@ -627,8 +615,7 @@ free_menubar_widget_value_tree (wv) | |||
| 627 | in menu_items starting at index START, up to index END. */ | 615 | in menu_items starting at index START, up to index END. */ |
| 628 | 616 | ||
| 629 | widget_value * | 617 | widget_value * |
| 630 | digest_single_submenu (start, end, top_level_items) | 618 | digest_single_submenu (int start, int end, int top_level_items) |
| 631 | int start, end, top_level_items; | ||
| 632 | { | 619 | { |
| 633 | widget_value *wv, *prev_wv, *save_wv, *first_wv; | 620 | widget_value *wv, *prev_wv, *save_wv, *first_wv; |
| 634 | int i; | 621 | int i; |
| @@ -856,8 +843,7 @@ digest_single_submenu (start, end, top_level_items) | |||
| 856 | tree is constructed, and small strings are relocated. So we must wait | 843 | tree is constructed, and small strings are relocated. So we must wait |
| 857 | until no GC can happen before storing pointers into lisp values. */ | 844 | until no GC can happen before storing pointers into lisp values. */ |
| 858 | void | 845 | void |
| 859 | update_submenu_strings (first_wv) | 846 | update_submenu_strings (widget_value *first_wv) |
| 860 | widget_value *first_wv; | ||
| 861 | { | 847 | { |
| 862 | widget_value *wv; | 848 | widget_value *wv; |
| 863 | 849 | ||
| @@ -891,11 +877,7 @@ update_submenu_strings (first_wv) | |||
| 891 | VECTOR is an array of menu events for the whole menu. */ | 877 | VECTOR is an array of menu events for the whole menu. */ |
| 892 | 878 | ||
| 893 | void | 879 | void |
| 894 | find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data) | 880 | find_and_call_menu_selection (FRAME_PTR f, int menu_bar_items_used, Lisp_Object vector, void *client_data) |
| 895 | FRAME_PTR f; | ||
| 896 | int menu_bar_items_used; | ||
| 897 | Lisp_Object vector; | ||
| 898 | void *client_data; | ||
| 899 | { | 881 | { |
| 900 | Lisp_Object prefix, entry; | 882 | Lisp_Object prefix, entry; |
| 901 | Lisp_Object *subprefix_stack; | 883 | Lisp_Object *subprefix_stack; |
| @@ -1368,7 +1350,7 @@ no quit occurs and `x-popup-menu' returns nil. */) | |||
| 1368 | } | 1350 | } |
| 1369 | 1351 | ||
| 1370 | void | 1352 | void |
| 1371 | syms_of_menu () | 1353 | syms_of_menu (void) |
| 1372 | { | 1354 | { |
| 1373 | staticpro (&menu_items); | 1355 | staticpro (&menu_items); |
| 1374 | menu_items = Qnil; | 1356 | menu_items = Qnil; |
diff --git a/src/minibuf.c b/src/minibuf.c index 412d2550df8..2159c576636 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -154,7 +154,7 @@ extern Lisp_Object Qfield; | |||
| 154 | or when a minibuffer exits. */ | 154 | or when a minibuffer exits. */ |
| 155 | 155 | ||
| 156 | void | 156 | void |
| 157 | choose_minibuf_frame () | 157 | choose_minibuf_frame (void) |
| 158 | { | 158 | { |
| 159 | if (FRAMEP (selected_frame) | 159 | if (FRAMEP (selected_frame) |
| 160 | && FRAME_LIVE_P (XFRAME (selected_frame)) | 160 | && FRAME_LIVE_P (XFRAME (selected_frame)) |
| @@ -193,8 +193,7 @@ choose_minibuf_frame () | |||
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | Lisp_Object | 195 | Lisp_Object |
| 196 | choose_minibuf_frame_1 (ignore) | 196 | choose_minibuf_frame_1 (Lisp_Object ignore) |
| 197 | Lisp_Object ignore; | ||
| 198 | { | 197 | { |
| 199 | choose_minibuf_frame (); | 198 | choose_minibuf_frame (); |
| 200 | return Qnil; | 199 | return Qnil; |
| @@ -239,8 +238,7 @@ static Lisp_Object string_to_object (Lisp_Object, Lisp_Object); | |||
| 239 | string, and DEFALT is a string, read from DEFALT instead of VAL. */ | 238 | string, and DEFALT is a string, read from DEFALT instead of VAL. */ |
| 240 | 239 | ||
| 241 | static Lisp_Object | 240 | static Lisp_Object |
| 242 | string_to_object (val, defalt) | 241 | string_to_object (Lisp_Object val, Lisp_Object defalt) |
| 243 | Lisp_Object val, defalt; | ||
| 244 | { | 242 | { |
| 245 | struct gcpro gcpro1, gcpro2; | 243 | struct gcpro gcpro1, gcpro2; |
| 246 | Lisp_Object expr_and_pos; | 244 | Lisp_Object expr_and_pos; |
| @@ -839,12 +837,11 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 839 | used for nonrecursive minibuffer invocations */ | 837 | used for nonrecursive minibuffer invocations */ |
| 840 | 838 | ||
| 841 | Lisp_Object | 839 | Lisp_Object |
| 842 | get_minibuffer (depth) | 840 | get_minibuffer (int depth) |
| 843 | int depth; | ||
| 844 | { | 841 | { |
| 845 | Lisp_Object tail, num, buf; | 842 | Lisp_Object tail, num, buf; |
| 846 | char name[24]; | 843 | char name[24]; |
| 847 | extern Lisp_Object nconc2 (); | 844 | extern Lisp_Object nconc2 (Lisp_Object, Lisp_Object); |
| 848 | 845 | ||
| 849 | XSETFASTINT (num, depth); | 846 | XSETFASTINT (num, depth); |
| 850 | tail = Fnthcdr (num, Vminibuffer_list); | 847 | tail = Fnthcdr (num, Vminibuffer_list); |
| @@ -884,8 +881,7 @@ get_minibuffer (depth) | |||
| 884 | } | 881 | } |
| 885 | 882 | ||
| 886 | static Lisp_Object | 883 | static Lisp_Object |
| 887 | run_exit_minibuf_hook (data) | 884 | run_exit_minibuf_hook (Lisp_Object data) |
| 888 | Lisp_Object data; | ||
| 889 | { | 885 | { |
| 890 | if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) | 886 | if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) |
| 891 | && !NILP (Vrun_hooks)) | 887 | && !NILP (Vrun_hooks)) |
| @@ -898,8 +894,7 @@ run_exit_minibuf_hook (data) | |||
| 898 | not, and it restores the current window, buffer, etc. */ | 894 | not, and it restores the current window, buffer, etc. */ |
| 899 | 895 | ||
| 900 | static Lisp_Object | 896 | static Lisp_Object |
| 901 | read_minibuf_unwind (data) | 897 | read_minibuf_unwind (Lisp_Object data) |
| 902 | Lisp_Object data; | ||
| 903 | { | 898 | { |
| 904 | Lisp_Object old_deactivate_mark; | 899 | Lisp_Object old_deactivate_mark; |
| 905 | Lisp_Object window; | 900 | Lisp_Object window; |
| @@ -1249,8 +1244,7 @@ function, instead of the usual behavior. */) | |||
| 1249 | } | 1244 | } |
| 1250 | 1245 | ||
| 1251 | static Lisp_Object | 1246 | static Lisp_Object |
| 1252 | minibuf_conform_representation (string, basis) | 1247 | minibuf_conform_representation (Lisp_Object string, Lisp_Object basis) |
| 1253 | Lisp_Object string, basis; | ||
| 1254 | { | 1248 | { |
| 1255 | if (STRING_MULTIBYTE (string) == STRING_MULTIBYTE (basis)) | 1249 | if (STRING_MULTIBYTE (string) == STRING_MULTIBYTE (basis)) |
| 1256 | return string; | 1250 | return string; |
| @@ -1843,7 +1837,7 @@ Completion ignores case if the ambient value of | |||
| 1843 | RETURN_UNGCPRO (unbind_to (count, val)); | 1837 | RETURN_UNGCPRO (unbind_to (count, val)); |
| 1844 | } | 1838 | } |
| 1845 | 1839 | ||
| 1846 | Lisp_Object Fassoc_string (); | 1840 | Lisp_Object Fassoc_string (register Lisp_Object key, Lisp_Object list, Lisp_Object case_fold); |
| 1847 | 1841 | ||
| 1848 | /* Test whether TXT is an exact completion. */ | 1842 | /* Test whether TXT is an exact completion. */ |
| 1849 | DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0, | 1843 | DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0, |
| @@ -2061,14 +2055,14 @@ If no minibuffer is active, return nil. */) | |||
| 2061 | 2055 | ||
| 2062 | 2056 | ||
| 2063 | void | 2057 | void |
| 2064 | init_minibuf_once () | 2058 | init_minibuf_once (void) |
| 2065 | { | 2059 | { |
| 2066 | Vminibuffer_list = Qnil; | 2060 | Vminibuffer_list = Qnil; |
| 2067 | staticpro (&Vminibuffer_list); | 2061 | staticpro (&Vminibuffer_list); |
| 2068 | } | 2062 | } |
| 2069 | 2063 | ||
| 2070 | void | 2064 | void |
| 2071 | syms_of_minibuf () | 2065 | syms_of_minibuf (void) |
| 2072 | { | 2066 | { |
| 2073 | minibuf_level = 0; | 2067 | minibuf_level = 0; |
| 2074 | minibuf_prompt = Qnil; | 2068 | minibuf_prompt = Qnil; |
diff --git a/src/prefix-args.c b/src/prefix-args.c index d29085a3dff..84e47dabb9a 100644 --- a/src/prefix-args.c +++ b/src/prefix-args.c | |||
| @@ -54,9 +54,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 54 | #include <stdlib.h> | 54 | #include <stdlib.h> |
| 55 | 55 | ||
| 56 | int | 56 | int |
| 57 | main (argc, argv) | 57 | main (int argc, char **argv) |
| 58 | int argc; | ||
| 59 | char **argv; | ||
| 60 | { | 58 | { |
| 61 | char *progname; | 59 | char *progname; |
| 62 | char *prefix; | 60 | char *prefix; |
diff --git a/src/print.c b/src/print.c index dedd58b99e3..76ce467eed0 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -168,7 +168,7 @@ extern int noninteractive_need_newline; | |||
| 168 | 168 | ||
| 169 | extern int minibuffer_auto_raise; | 169 | extern int minibuffer_auto_raise; |
| 170 | 170 | ||
| 171 | void print_interval (); | 171 | void print_interval (INTERVAL interval, Lisp_Object printcharfun); |
| 172 | 172 | ||
| 173 | /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ | 173 | /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ |
| 174 | int print_output_debug_flag = 1; | 174 | int print_output_debug_flag = 1; |
| @@ -287,8 +287,7 @@ int print_output_debug_flag = 1; | |||
| 287 | when there is a recursive call to print. */ | 287 | when there is a recursive call to print. */ |
| 288 | 288 | ||
| 289 | static Lisp_Object | 289 | static Lisp_Object |
| 290 | print_unwind (saved_text) | 290 | print_unwind (Lisp_Object saved_text) |
| 291 | Lisp_Object saved_text; | ||
| 292 | { | 291 | { |
| 293 | bcopy (SDATA (saved_text), print_buffer, SCHARS (saved_text)); | 292 | bcopy (SDATA (saved_text), print_buffer, SCHARS (saved_text)); |
| 294 | return Qnil; | 293 | return Qnil; |
| @@ -301,9 +300,7 @@ print_unwind (saved_text) | |||
| 301 | argument. */ | 300 | argument. */ |
| 302 | 301 | ||
| 303 | static void | 302 | static void |
| 304 | printchar (ch, fun) | 303 | printchar (unsigned int ch, Lisp_Object fun) |
| 305 | unsigned int ch; | ||
| 306 | Lisp_Object fun; | ||
| 307 | { | 304 | { |
| 308 | if (!NILP (fun) && !EQ (fun, Qt)) | 305 | if (!NILP (fun) && !EQ (fun, Qt)) |
| 309 | call1 (fun, make_number (ch)); | 306 | call1 (fun, make_number (ch)); |
| @@ -353,11 +350,7 @@ printchar (ch, fun) | |||
| 353 | to data in a Lisp string. Otherwise that is not safe. */ | 350 | to data in a Lisp string. Otherwise that is not safe. */ |
| 354 | 351 | ||
| 355 | static void | 352 | static void |
| 356 | strout (ptr, size, size_byte, printcharfun, multibyte) | 353 | strout (char *ptr, int size, int size_byte, Lisp_Object printcharfun, int multibyte) |
| 357 | char *ptr; | ||
| 358 | int size, size_byte; | ||
| 359 | Lisp_Object printcharfun; | ||
| 360 | int multibyte; | ||
| 361 | { | 354 | { |
| 362 | if (size < 0) | 355 | if (size < 0) |
| 363 | size_byte = size = strlen (ptr); | 356 | size_byte = size = strlen (ptr); |
| @@ -440,9 +433,7 @@ strout (ptr, size, size_byte, printcharfun, multibyte) | |||
| 440 | because printing one char can relocate. */ | 433 | because printing one char can relocate. */ |
| 441 | 434 | ||
| 442 | static void | 435 | static void |
| 443 | print_string (string, printcharfun) | 436 | print_string (Lisp_Object string, Lisp_Object printcharfun) |
| 444 | Lisp_Object string; | ||
| 445 | Lisp_Object printcharfun; | ||
| 446 | { | 437 | { |
| 447 | if (EQ (printcharfun, Qt) || NILP (printcharfun)) | 438 | if (EQ (printcharfun, Qt) || NILP (printcharfun)) |
| 448 | { | 439 | { |
| @@ -549,9 +540,7 @@ PRINTCHARFUN defaults to the value of `standard-output' (which see). */) | |||
| 549 | Do not use this on the contents of a Lisp string. */ | 540 | Do not use this on the contents of a Lisp string. */ |
| 550 | 541 | ||
| 551 | void | 542 | void |
| 552 | write_string (data, size) | 543 | write_string (char *data, int size) |
| 553 | char *data; | ||
| 554 | int size; | ||
| 555 | { | 544 | { |
| 556 | PRINTDECLARE; | 545 | PRINTDECLARE; |
| 557 | Lisp_Object printcharfun; | 546 | Lisp_Object printcharfun; |
| @@ -568,10 +557,7 @@ write_string (data, size) | |||
| 568 | Do not use this on the contents of a Lisp string. */ | 557 | Do not use this on the contents of a Lisp string. */ |
| 569 | 558 | ||
| 570 | void | 559 | void |
| 571 | write_string_1 (data, size, printcharfun) | 560 | write_string_1 (char *data, int size, Lisp_Object printcharfun) |
| 572 | char *data; | ||
| 573 | int size; | ||
| 574 | Lisp_Object printcharfun; | ||
| 575 | { | 561 | { |
| 576 | PRINTDECLARE; | 562 | PRINTDECLARE; |
| 577 | 563 | ||
| @@ -582,8 +568,7 @@ write_string_1 (data, size, printcharfun) | |||
| 582 | 568 | ||
| 583 | 569 | ||
| 584 | void | 570 | void |
| 585 | temp_output_buffer_setup (bufname) | 571 | temp_output_buffer_setup (const char *bufname) |
| 586 | const char *bufname; | ||
| 587 | { | 572 | { |
| 588 | int count = SPECPDL_INDEX (); | 573 | int count = SPECPDL_INDEX (); |
| 589 | register struct buffer *old = current_buffer; | 574 | register struct buffer *old = current_buffer; |
| @@ -616,10 +601,7 @@ temp_output_buffer_setup (bufname) | |||
| 616 | } | 601 | } |
| 617 | 602 | ||
| 618 | Lisp_Object | 603 | Lisp_Object |
| 619 | internal_with_output_to_temp_buffer (bufname, function, args) | 604 | internal_with_output_to_temp_buffer (const char *bufname, Lisp_Object (*function) (Lisp_Object), Lisp_Object args) |
| 620 | const char *bufname; | ||
| 621 | Lisp_Object (*function) (Lisp_Object); | ||
| 622 | Lisp_Object args; | ||
| 623 | { | 605 | { |
| 624 | int count = SPECPDL_INDEX (); | 606 | int count = SPECPDL_INDEX (); |
| 625 | Lisp_Object buf, val; | 607 | Lisp_Object buf, val; |
| @@ -695,10 +677,10 @@ usage: (with-output-to-temp-buffer BUFNAME BODY...) */) | |||
| 695 | } | 677 | } |
| 696 | 678 | ||
| 697 | 679 | ||
| 698 | static void print (); | 680 | static void print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); |
| 699 | static void print_preprocess (); | 681 | static void print_preprocess (Lisp_Object obj); |
| 700 | static void print_preprocess_string (); | 682 | static void print_preprocess_string (INTERVAL interval, Lisp_Object arg); |
| 701 | static void print_object (); | 683 | static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); |
| 702 | 684 | ||
| 703 | DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, | 685 | DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, |
| 704 | doc: /* Output a newline to stream PRINTCHARFUN. | 686 | doc: /* Output a newline to stream PRINTCHARFUN. |
| @@ -919,8 +901,7 @@ to make it write to the debugging output. */) | |||
| 919 | print_output_debug_flag from being optimized away. */ | 901 | print_output_debug_flag from being optimized away. */ |
| 920 | 902 | ||
| 921 | void | 903 | void |
| 922 | debug_output_compilation_hack (x) | 904 | debug_output_compilation_hack (int x) |
| 923 | int x; | ||
| 924 | { | 905 | { |
| 925 | print_output_debug_flag = x; | 906 | print_output_debug_flag = x; |
| 926 | } | 907 | } |
| @@ -974,16 +955,14 @@ append to existing target file. */) | |||
| 974 | /* This is the interface for debugging printing. */ | 955 | /* This is the interface for debugging printing. */ |
| 975 | 956 | ||
| 976 | void | 957 | void |
| 977 | debug_print (arg) | 958 | debug_print (Lisp_Object arg) |
| 978 | Lisp_Object arg; | ||
| 979 | { | 959 | { |
| 980 | Fprin1 (arg, Qexternal_debugging_output); | 960 | Fprin1 (arg, Qexternal_debugging_output); |
| 981 | fprintf (stderr, "\r\n"); | 961 | fprintf (stderr, "\r\n"); |
| 982 | } | 962 | } |
| 983 | 963 | ||
| 984 | void | 964 | void |
| 985 | safe_debug_print (arg) | 965 | safe_debug_print (Lisp_Object arg) |
| 986 | Lisp_Object arg; | ||
| 987 | { | 966 | { |
| 988 | int valid = valid_lisp_object_p (arg); | 967 | int valid = valid_lisp_object_p (arg); |
| 989 | 968 | ||
| @@ -1037,10 +1016,7 @@ error message is constructed. */) | |||
| 1037 | CALLER is the Lisp function inside which the error was signaled. */ | 1016 | CALLER is the Lisp function inside which the error was signaled. */ |
| 1038 | 1017 | ||
| 1039 | void | 1018 | void |
| 1040 | print_error_message (data, stream, context, caller) | 1019 | print_error_message (Lisp_Object data, Lisp_Object stream, char *context, Lisp_Object caller) |
| 1041 | Lisp_Object data, stream; | ||
| 1042 | char *context; | ||
| 1043 | Lisp_Object caller; | ||
| 1044 | { | 1020 | { |
| 1045 | Lisp_Object errname, errmsg, file_error, tail; | 1021 | Lisp_Object errname, errmsg, file_error, tail; |
| 1046 | struct gcpro gcpro1; | 1022 | struct gcpro gcpro1; |
| @@ -1125,9 +1101,7 @@ print_error_message (data, stream, context, caller) | |||
| 1125 | */ | 1101 | */ |
| 1126 | 1102 | ||
| 1127 | void | 1103 | void |
| 1128 | float_to_string (buf, data) | 1104 | float_to_string (unsigned char *buf, double data) |
| 1129 | unsigned char *buf; | ||
| 1130 | double data; | ||
| 1131 | { | 1105 | { |
| 1132 | unsigned char *cp; | 1106 | unsigned char *cp; |
| 1133 | int width; | 1107 | int width; |
| @@ -1250,10 +1224,7 @@ float_to_string (buf, data) | |||
| 1250 | 1224 | ||
| 1251 | 1225 | ||
| 1252 | static void | 1226 | static void |
| 1253 | print (obj, printcharfun, escapeflag) | 1227 | print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag) |
| 1254 | Lisp_Object obj; | ||
| 1255 | register Lisp_Object printcharfun; | ||
| 1256 | int escapeflag; | ||
| 1257 | { | 1228 | { |
| 1258 | new_backquote_output = 0; | 1229 | new_backquote_output = 0; |
| 1259 | 1230 | ||
| @@ -1312,8 +1283,7 @@ print (obj, printcharfun, escapeflag) | |||
| 1312 | The status fields of Vprint_number_table mean whether each object appears | 1283 | The status fields of Vprint_number_table mean whether each object appears |
| 1313 | more than once in OBJ: Qnil at the first time, and Qt after that . */ | 1284 | more than once in OBJ: Qnil at the first time, and Qt after that . */ |
| 1314 | static void | 1285 | static void |
| 1315 | print_preprocess (obj) | 1286 | print_preprocess (Lisp_Object obj) |
| 1316 | Lisp_Object obj; | ||
| 1317 | { | 1287 | { |
| 1318 | int i; | 1288 | int i; |
| 1319 | EMACS_INT size; | 1289 | EMACS_INT size; |
| @@ -1433,9 +1403,7 @@ print_preprocess (obj) | |||
| 1433 | } | 1403 | } |
| 1434 | 1404 | ||
| 1435 | static void | 1405 | static void |
| 1436 | print_preprocess_string (interval, arg) | 1406 | print_preprocess_string (INTERVAL interval, Lisp_Object arg) |
| 1437 | INTERVAL interval; | ||
| 1438 | Lisp_Object arg; | ||
| 1439 | { | 1407 | { |
| 1440 | print_preprocess (interval->plist); | 1408 | print_preprocess (interval->plist); |
| 1441 | } | 1409 | } |
| @@ -1445,7 +1413,7 @@ print_preprocess_string (interval, arg) | |||
| 1445 | Lisp_Object Vprint_charset_text_property; | 1413 | Lisp_Object Vprint_charset_text_property; |
| 1446 | extern Lisp_Object Qdefault; | 1414 | extern Lisp_Object Qdefault; |
| 1447 | 1415 | ||
| 1448 | static void print_check_string_charset_prop (); | 1416 | static void print_check_string_charset_prop (INTERVAL interval, Lisp_Object string); |
| 1449 | 1417 | ||
| 1450 | #define PRINT_STRING_NON_CHARSET_FOUND 1 | 1418 | #define PRINT_STRING_NON_CHARSET_FOUND 1 |
| 1451 | #define PRINT_STRING_UNSAFE_CHARSET_FOUND 2 | 1419 | #define PRINT_STRING_UNSAFE_CHARSET_FOUND 2 |
| @@ -1454,9 +1422,7 @@ static void print_check_string_charset_prop (); | |||
| 1454 | static int print_check_string_result; | 1422 | static int print_check_string_result; |
| 1455 | 1423 | ||
| 1456 | static void | 1424 | static void |
| 1457 | print_check_string_charset_prop (interval, string) | 1425 | print_check_string_charset_prop (INTERVAL interval, Lisp_Object string) |
| 1458 | INTERVAL interval; | ||
| 1459 | Lisp_Object string; | ||
| 1460 | { | 1426 | { |
| 1461 | Lisp_Object val; | 1427 | Lisp_Object val; |
| 1462 | 1428 | ||
| @@ -1503,8 +1469,7 @@ print_check_string_charset_prop (interval, string) | |||
| 1503 | static Lisp_Object print_prune_charset_plist; | 1469 | static Lisp_Object print_prune_charset_plist; |
| 1504 | 1470 | ||
| 1505 | static Lisp_Object | 1471 | static Lisp_Object |
| 1506 | print_prune_string_charset (string) | 1472 | print_prune_string_charset (Lisp_Object string) |
| 1507 | Lisp_Object string; | ||
| 1508 | { | 1473 | { |
| 1509 | print_check_string_result = 0; | 1474 | print_check_string_result = 0; |
| 1510 | traverse_intervals (STRING_INTERVALS (string), 0, | 1475 | traverse_intervals (STRING_INTERVALS (string), 0, |
| @@ -1528,10 +1493,7 @@ print_prune_string_charset (string) | |||
| 1528 | } | 1493 | } |
| 1529 | 1494 | ||
| 1530 | static void | 1495 | static void |
| 1531 | print_object (obj, printcharfun, escapeflag) | 1496 | print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag) |
| 1532 | Lisp_Object obj; | ||
| 1533 | register Lisp_Object printcharfun; | ||
| 1534 | int escapeflag; | ||
| 1535 | { | 1497 | { |
| 1536 | char buf[40]; | 1498 | char buf[40]; |
| 1537 | 1499 | ||
| @@ -2307,9 +2269,7 @@ print_object (obj, printcharfun, escapeflag) | |||
| 2307 | This is part of printing a string that has text properties. */ | 2269 | This is part of printing a string that has text properties. */ |
| 2308 | 2270 | ||
| 2309 | void | 2271 | void |
| 2310 | print_interval (interval, printcharfun) | 2272 | print_interval (INTERVAL interval, Lisp_Object printcharfun) |
| 2311 | INTERVAL interval; | ||
| 2312 | Lisp_Object printcharfun; | ||
| 2313 | { | 2273 | { |
| 2314 | if (NILP (interval->plist)) | 2274 | if (NILP (interval->plist)) |
| 2315 | return; | 2275 | return; |
| @@ -2324,7 +2284,7 @@ print_interval (interval, printcharfun) | |||
| 2324 | 2284 | ||
| 2325 | 2285 | ||
| 2326 | void | 2286 | void |
| 2327 | syms_of_print () | 2287 | syms_of_print (void) |
| 2328 | { | 2288 | { |
| 2329 | Qtemp_buffer_setup_hook = intern_c_string ("temp-buffer-setup-hook"); | 2289 | Qtemp_buffer_setup_hook = intern_c_string ("temp-buffer-setup-hook"); |
| 2330 | staticpro (&Qtemp_buffer_setup_hook); | 2290 | staticpro (&Qtemp_buffer_setup_hook); |
diff --git a/src/ralloc.c b/src/ralloc.c index 7ccbdc7daf7..dd68e7c8afc 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -40,11 +40,11 @@ typedef size_t SIZE; | |||
| 40 | /* Declared in dispnew.c, this version doesn't screw up if regions | 40 | /* Declared in dispnew.c, this version doesn't screw up if regions |
| 41 | overlap. */ | 41 | overlap. */ |
| 42 | 42 | ||
| 43 | extern void safe_bcopy (); | 43 | extern void safe_bcopy (const char *, char *, int); |
| 44 | 44 | ||
| 45 | #ifdef DOUG_LEA_MALLOC | 45 | #ifdef DOUG_LEA_MALLOC |
| 46 | #define M_TOP_PAD -2 | 46 | #define M_TOP_PAD -2 |
| 47 | extern int mallopt (); | 47 | extern int mallopt (int, int); |
| 48 | #else /* not DOUG_LEA_MALLOC */ | 48 | #else /* not DOUG_LEA_MALLOC */ |
| 49 | #ifndef SYSTEM_MALLOC | 49 | #ifndef SYSTEM_MALLOC |
| 50 | extern size_t __malloc_extra_blocks; | 50 | extern size_t __malloc_extra_blocks; |
| @@ -81,7 +81,7 @@ typedef void *POINTER; | |||
| 81 | 81 | ||
| 82 | static int r_alloc_initialized = 0; | 82 | static int r_alloc_initialized = 0; |
| 83 | 83 | ||
| 84 | static void r_alloc_init (); | 84 | static void r_alloc_init (void); |
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | /* Declarations for working with the malloc, ralloc, and system breaks. */ | 87 | /* Declarations for working with the malloc, ralloc, and system breaks. */ |
| @@ -210,8 +210,7 @@ static int r_alloc_freeze_level; | |||
| 210 | /* Find the heap that ADDRESS falls within. */ | 210 | /* Find the heap that ADDRESS falls within. */ |
| 211 | 211 | ||
| 212 | static heap_ptr | 212 | static heap_ptr |
| 213 | find_heap (address) | 213 | find_heap (POINTER address) |
| 214 | POINTER address; | ||
| 215 | { | 214 | { |
| 216 | heap_ptr heap; | 215 | heap_ptr heap; |
| 217 | 216 | ||
| @@ -243,9 +242,7 @@ find_heap (address) | |||
| 243 | allocate the memory. */ | 242 | allocate the memory. */ |
| 244 | 243 | ||
| 245 | static POINTER | 244 | static POINTER |
| 246 | obtain (address, size) | 245 | obtain (POINTER address, SIZE size) |
| 247 | POINTER address; | ||
| 248 | SIZE size; | ||
| 249 | { | 246 | { |
| 250 | heap_ptr heap; | 247 | heap_ptr heap; |
| 251 | SIZE already_available; | 248 | SIZE already_available; |
| @@ -326,7 +323,7 @@ obtain (address, size) | |||
| 326 | it can also eliminate the last heap entirely. */ | 323 | it can also eliminate the last heap entirely. */ |
| 327 | 324 | ||
| 328 | static void | 325 | static void |
| 329 | relinquish () | 326 | relinquish (void) |
| 330 | { | 327 | { |
| 331 | register heap_ptr h; | 328 | register heap_ptr h; |
| 332 | long excess = 0; | 329 | long excess = 0; |
| @@ -385,7 +382,7 @@ relinquish () | |||
| 385 | above where malloc gets space. */ | 382 | above where malloc gets space. */ |
| 386 | 383 | ||
| 387 | long | 384 | long |
| 388 | r_alloc_size_in_use () | 385 | r_alloc_size_in_use (void) |
| 389 | { | 386 | { |
| 390 | return (char *) break_value - (char *) virtual_break_value; | 387 | return (char *) break_value - (char *) virtual_break_value; |
| 391 | } | 388 | } |
| @@ -396,8 +393,7 @@ r_alloc_size_in_use () | |||
| 396 | to that block. */ | 393 | to that block. */ |
| 397 | 394 | ||
| 398 | static bloc_ptr | 395 | static bloc_ptr |
| 399 | find_bloc (ptr) | 396 | find_bloc (POINTER *ptr) |
| 400 | POINTER *ptr; | ||
| 401 | { | 397 | { |
| 402 | register bloc_ptr p = first_bloc; | 398 | register bloc_ptr p = first_bloc; |
| 403 | 399 | ||
| @@ -422,8 +418,7 @@ find_bloc (ptr) | |||
| 422 | memory for the new block. */ | 418 | memory for the new block. */ |
| 423 | 419 | ||
| 424 | static bloc_ptr | 420 | static bloc_ptr |
| 425 | get_bloc (size) | 421 | get_bloc (SIZE size) |
| 426 | SIZE size; | ||
| 427 | { | 422 | { |
| 428 | register bloc_ptr new_bloc; | 423 | register bloc_ptr new_bloc; |
| 429 | register heap_ptr heap; | 424 | register heap_ptr heap; |
| @@ -478,10 +473,7 @@ get_bloc (size) | |||
| 478 | Do not touch the contents of blocs or break_value. */ | 473 | Do not touch the contents of blocs or break_value. */ |
| 479 | 474 | ||
| 480 | static int | 475 | static int |
| 481 | relocate_blocs (bloc, heap, address) | 476 | relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address) |
| 482 | bloc_ptr bloc; | ||
| 483 | heap_ptr heap; | ||
| 484 | POINTER address; | ||
| 485 | { | 477 | { |
| 486 | register bloc_ptr b = bloc; | 478 | register bloc_ptr b = bloc; |
| 487 | 479 | ||
| @@ -541,8 +533,7 @@ relocate_blocs (bloc, heap, address) | |||
| 541 | before that of BEFORE. */ | 533 | before that of BEFORE. */ |
| 542 | 534 | ||
| 543 | static void | 535 | static void |
| 544 | reorder_bloc (bloc, before) | 536 | reorder_bloc (bloc_ptr bloc, bloc_ptr before) |
| 545 | bloc_ptr bloc, before; | ||
| 546 | { | 537 | { |
| 547 | bloc_ptr prev, next; | 538 | bloc_ptr prev, next; |
| 548 | 539 | ||
| @@ -570,9 +561,7 @@ reorder_bloc (bloc, before) | |||
| 570 | with heap HEAP and bloc BLOC. */ | 561 | with heap HEAP and bloc BLOC. */ |
| 571 | 562 | ||
| 572 | static void | 563 | static void |
| 573 | update_heap_bloc_correspondence (bloc, heap) | 564 | update_heap_bloc_correspondence (bloc_ptr bloc, heap_ptr heap) |
| 574 | bloc_ptr bloc; | ||
| 575 | heap_ptr heap; | ||
| 576 | { | 565 | { |
| 577 | register bloc_ptr b; | 566 | register bloc_ptr b; |
| 578 | 567 | ||
| @@ -634,9 +623,7 @@ update_heap_bloc_correspondence (bloc, heap) | |||
| 634 | that come after BLOC in memory. */ | 623 | that come after BLOC in memory. */ |
| 635 | 624 | ||
| 636 | static int | 625 | static int |
| 637 | resize_bloc (bloc, size) | 626 | resize_bloc (bloc_ptr bloc, SIZE size) |
| 638 | bloc_ptr bloc; | ||
| 639 | SIZE size; | ||
| 640 | { | 627 | { |
| 641 | register bloc_ptr b; | 628 | register bloc_ptr b; |
| 642 | heap_ptr heap; | 629 | heap_ptr heap; |
| @@ -733,8 +720,7 @@ resize_bloc (bloc, size) | |||
| 733 | This may return space to the system. */ | 720 | This may return space to the system. */ |
| 734 | 721 | ||
| 735 | static void | 722 | static void |
| 736 | free_bloc (bloc) | 723 | free_bloc (bloc_ptr bloc) |
| 737 | bloc_ptr bloc; | ||
| 738 | { | 724 | { |
| 739 | heap_ptr heap = bloc->heap; | 725 | heap_ptr heap = bloc->heap; |
| 740 | 726 | ||
| @@ -800,8 +786,7 @@ free_bloc (bloc) | |||
| 800 | GNU malloc package. */ | 786 | GNU malloc package. */ |
| 801 | 787 | ||
| 802 | POINTER | 788 | POINTER |
| 803 | r_alloc_sbrk (size) | 789 | r_alloc_sbrk (long int size) |
| 804 | long size; | ||
| 805 | { | 790 | { |
| 806 | register bloc_ptr b; | 791 | register bloc_ptr b; |
| 807 | POINTER address; | 792 | POINTER address; |
| @@ -952,9 +937,7 @@ r_alloc_sbrk (size) | |||
| 952 | return zero. */ | 937 | return zero. */ |
| 953 | 938 | ||
| 954 | POINTER | 939 | POINTER |
| 955 | r_alloc (ptr, size) | 940 | r_alloc (POINTER *ptr, SIZE size) |
| 956 | POINTER *ptr; | ||
| 957 | SIZE size; | ||
| 958 | { | 941 | { |
| 959 | register bloc_ptr new_bloc; | 942 | register bloc_ptr new_bloc; |
| 960 | 943 | ||
| @@ -977,8 +960,7 @@ r_alloc (ptr, size) | |||
| 977 | Store 0 in *PTR to show there's no block allocated. */ | 960 | Store 0 in *PTR to show there's no block allocated. */ |
| 978 | 961 | ||
| 979 | void | 962 | void |
| 980 | r_alloc_free (ptr) | 963 | r_alloc_free (register POINTER *ptr) |
| 981 | register POINTER *ptr; | ||
| 982 | { | 964 | { |
| 983 | register bloc_ptr dead_bloc; | 965 | register bloc_ptr dead_bloc; |
| 984 | 966 | ||
| @@ -1012,9 +994,7 @@ r_alloc_free (ptr) | |||
| 1012 | return zero. */ | 994 | return zero. */ |
| 1013 | 995 | ||
| 1014 | POINTER | 996 | POINTER |
| 1015 | r_re_alloc (ptr, size) | 997 | r_re_alloc (POINTER *ptr, SIZE size) |
| 1016 | POINTER *ptr; | ||
| 1017 | SIZE size; | ||
| 1018 | { | 998 | { |
| 1019 | register bloc_ptr bloc; | 999 | register bloc_ptr bloc; |
| 1020 | 1000 | ||
| @@ -1075,8 +1055,7 @@ r_re_alloc (ptr, size) | |||
| 1075 | malloc must return a null pointer. */ | 1055 | malloc must return a null pointer. */ |
| 1076 | 1056 | ||
| 1077 | void | 1057 | void |
| 1078 | r_alloc_freeze (size) | 1058 | r_alloc_freeze (long int size) |
| 1079 | long size; | ||
| 1080 | { | 1059 | { |
| 1081 | if (! r_alloc_initialized) | 1060 | if (! r_alloc_initialized) |
| 1082 | r_alloc_init (); | 1061 | r_alloc_init (); |
| @@ -1093,7 +1072,7 @@ r_alloc_freeze (size) | |||
| 1093 | } | 1072 | } |
| 1094 | 1073 | ||
| 1095 | void | 1074 | void |
| 1096 | r_alloc_thaw () | 1075 | r_alloc_thaw (void) |
| 1097 | { | 1076 | { |
| 1098 | 1077 | ||
| 1099 | if (! r_alloc_initialized) | 1078 | if (! r_alloc_initialized) |
| @@ -1122,7 +1101,7 @@ r_alloc_thaw () | |||
| 1122 | /* Reinitialize the morecore hook variables after restarting a dumped | 1101 | /* Reinitialize the morecore hook variables after restarting a dumped |
| 1123 | Emacs. This is needed when using Doug Lea's malloc from GNU libc. */ | 1102 | Emacs. This is needed when using Doug Lea's malloc from GNU libc. */ |
| 1124 | void | 1103 | void |
| 1125 | r_alloc_reinit () | 1104 | r_alloc_reinit (void) |
| 1126 | { | 1105 | { |
| 1127 | /* Only do this if the hook has been reset, so that we don't get an | 1106 | /* Only do this if the hook has been reset, so that we don't get an |
| 1128 | infinite loop, in case Emacs was linked statically. */ | 1107 | infinite loop, in case Emacs was linked statically. */ |
| @@ -1235,8 +1214,7 @@ r_alloc_check () | |||
| 1235 | is checked to ensure that memory corruption does not occur due to | 1214 | is checked to ensure that memory corruption does not occur due to |
| 1236 | misuse. */ | 1215 | misuse. */ |
| 1237 | void | 1216 | void |
| 1238 | r_alloc_reset_variable (old, new) | 1217 | r_alloc_reset_variable (POINTER *old, POINTER *new) |
| 1239 | POINTER *old, *new; | ||
| 1240 | { | 1218 | { |
| 1241 | bloc_ptr bloc = first_bloc; | 1219 | bloc_ptr bloc = first_bloc; |
| 1242 | 1220 | ||
| @@ -1266,7 +1244,7 @@ r_alloc_reset_variable (old, new) | |||
| 1266 | /* Initialize various things for memory allocation. */ | 1244 | /* Initialize various things for memory allocation. */ |
| 1267 | 1245 | ||
| 1268 | static void | 1246 | static void |
| 1269 | r_alloc_init () | 1247 | r_alloc_init (void) |
| 1270 | { | 1248 | { |
| 1271 | if (r_alloc_initialized) | 1249 | if (r_alloc_initialized) |
| 1272 | return; | 1250 | return; |
diff --git a/src/regex.c b/src/regex.c index 46065dda9e6..67efee37d82 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -1321,8 +1321,7 @@ reg_syntax_t re_syntax_options; | |||
| 1321 | defined in regex.h. We return the old syntax. */ | 1321 | defined in regex.h. We return the old syntax. */ |
| 1322 | 1322 | ||
| 1323 | reg_syntax_t | 1323 | reg_syntax_t |
| 1324 | re_set_syntax (syntax) | 1324 | re_set_syntax (reg_syntax_t syntax) |
| 1325 | reg_syntax_t syntax; | ||
| 1326 | { | 1325 | { |
| 1327 | reg_syntax_t ret = re_syntax_options; | 1326 | reg_syntax_t ret = re_syntax_options; |
| 1328 | 1327 | ||
| @@ -1335,8 +1334,7 @@ WEAK_ALIAS (__re_set_syntax, re_set_syntax) | |||
| 1335 | static re_char *whitespace_regexp; | 1334 | static re_char *whitespace_regexp; |
| 1336 | 1335 | ||
| 1337 | void | 1336 | void |
| 1338 | re_set_whitespace_regexp (regexp) | 1337 | re_set_whitespace_regexp (const char *regexp) |
| 1339 | const char *regexp; | ||
| 1340 | { | 1338 | { |
| 1341 | whitespace_regexp = (re_char *) regexp; | 1339 | whitespace_regexp = (re_char *) regexp; |
| 1342 | } | 1340 | } |
| @@ -2149,8 +2147,7 @@ struct range_table_work_area | |||
| 2149 | 2147 | ||
| 2150 | /* Map a string to the char class it names (if any). */ | 2148 | /* Map a string to the char class it names (if any). */ |
| 2151 | re_wctype_t | 2149 | re_wctype_t |
| 2152 | re_wctype (str) | 2150 | re_wctype (const re_char *str) |
| 2153 | re_char *str; | ||
| 2154 | { | 2151 | { |
| 2155 | const char *string = str; | 2152 | const char *string = str; |
| 2156 | if (STREQ (string, "alnum")) return RECC_ALNUM; | 2153 | if (STREQ (string, "alnum")) return RECC_ALNUM; |
| @@ -2175,9 +2172,7 @@ re_wctype (str) | |||
| 2175 | 2172 | ||
| 2176 | /* True if CH is in the char class CC. */ | 2173 | /* True if CH is in the char class CC. */ |
| 2177 | boolean | 2174 | boolean |
| 2178 | re_iswctype (ch, cc) | 2175 | re_iswctype (int ch, re_wctype_t cc) |
| 2179 | int ch; | ||
| 2180 | re_wctype_t cc; | ||
| 2181 | { | 2176 | { |
| 2182 | switch (cc) | 2177 | switch (cc) |
| 2183 | { | 2178 | { |
| @@ -2207,8 +2202,7 @@ re_iswctype (ch, cc) | |||
| 2207 | /* Return a bit-pattern to use in the range-table bits to match multibyte | 2202 | /* Return a bit-pattern to use in the range-table bits to match multibyte |
| 2208 | chars of class CC. */ | 2203 | chars of class CC. */ |
| 2209 | static int | 2204 | static int |
| 2210 | re_wctype_to_bit (cc) | 2205 | re_wctype_to_bit (re_wctype_t cc) |
| 2211 | re_wctype_t cc; | ||
| 2212 | { | 2206 | { |
| 2213 | switch (cc) | 2207 | switch (cc) |
| 2214 | { | 2208 | { |
| @@ -2232,8 +2226,7 @@ re_wctype_to_bit (cc) | |||
| 2232 | /* Actually extend the space in WORK_AREA. */ | 2226 | /* Actually extend the space in WORK_AREA. */ |
| 2233 | 2227 | ||
| 2234 | static void | 2228 | static void |
| 2235 | extend_range_table_work_area (work_area) | 2229 | extend_range_table_work_area (struct range_table_work_area *work_area) |
| 2236 | struct range_table_work_area *work_area; | ||
| 2237 | { | 2230 | { |
| 2238 | work_area->allocated += 16 * sizeof (int); | 2231 | work_area->allocated += 16 * sizeof (int); |
| 2239 | if (work_area->table) | 2232 | if (work_area->table) |
| @@ -2557,11 +2550,7 @@ do { \ | |||
| 2557 | } while (0) | 2550 | } while (0) |
| 2558 | 2551 | ||
| 2559 | static reg_errcode_t | 2552 | static reg_errcode_t |
| 2560 | regex_compile (pattern, size, syntax, bufp) | 2553 | regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct re_pattern_buffer *bufp) |
| 2561 | re_char *pattern; | ||
| 2562 | size_t size; | ||
| 2563 | reg_syntax_t syntax; | ||
| 2564 | struct re_pattern_buffer *bufp; | ||
| 2565 | { | 2554 | { |
| 2566 | /* We fetch characters from PATTERN here. */ | 2555 | /* We fetch characters from PATTERN here. */ |
| 2567 | register re_wchar_t c, c1; | 2556 | register re_wchar_t c, c1; |
| @@ -3875,10 +3864,7 @@ regex_compile (pattern, size, syntax, bufp) | |||
| 3875 | /* Store OP at LOC followed by two-byte integer parameter ARG. */ | 3864 | /* Store OP at LOC followed by two-byte integer parameter ARG. */ |
| 3876 | 3865 | ||
| 3877 | static void | 3866 | static void |
| 3878 | store_op1 (op, loc, arg) | 3867 | store_op1 (re_opcode_t op, unsigned char *loc, int arg) |
| 3879 | re_opcode_t op; | ||
| 3880 | unsigned char *loc; | ||
| 3881 | int arg; | ||
| 3882 | { | 3868 | { |
| 3883 | *loc = (unsigned char) op; | 3869 | *loc = (unsigned char) op; |
| 3884 | STORE_NUMBER (loc + 1, arg); | 3870 | STORE_NUMBER (loc + 1, arg); |
| @@ -3888,10 +3874,7 @@ store_op1 (op, loc, arg) | |||
| 3888 | /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ | 3874 | /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */ |
| 3889 | 3875 | ||
| 3890 | static void | 3876 | static void |
| 3891 | store_op2 (op, loc, arg1, arg2) | 3877 | store_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2) |
| 3892 | re_opcode_t op; | ||
| 3893 | unsigned char *loc; | ||
| 3894 | int arg1, arg2; | ||
| 3895 | { | 3878 | { |
| 3896 | *loc = (unsigned char) op; | 3879 | *loc = (unsigned char) op; |
| 3897 | STORE_NUMBER (loc + 1, arg1); | 3880 | STORE_NUMBER (loc + 1, arg1); |
| @@ -3903,11 +3886,7 @@ store_op2 (op, loc, arg1, arg2) | |||
| 3903 | for OP followed by two-byte integer parameter ARG. */ | 3886 | for OP followed by two-byte integer parameter ARG. */ |
| 3904 | 3887 | ||
| 3905 | static void | 3888 | static void |
| 3906 | insert_op1 (op, loc, arg, end) | 3889 | insert_op1 (re_opcode_t op, unsigned char *loc, int arg, unsigned char *end) |
| 3907 | re_opcode_t op; | ||
| 3908 | unsigned char *loc; | ||
| 3909 | int arg; | ||
| 3910 | unsigned char *end; | ||
| 3911 | { | 3890 | { |
| 3912 | register unsigned char *pfrom = end; | 3891 | register unsigned char *pfrom = end; |
| 3913 | register unsigned char *pto = end + 3; | 3892 | register unsigned char *pto = end + 3; |
| @@ -3922,11 +3901,7 @@ insert_op1 (op, loc, arg, end) | |||
| 3922 | /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ | 3901 | /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */ |
| 3923 | 3902 | ||
| 3924 | static void | 3903 | static void |
| 3925 | insert_op2 (op, loc, arg1, arg2, end) | 3904 | insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end) |
| 3926 | re_opcode_t op; | ||
| 3927 | unsigned char *loc; | ||
| 3928 | int arg1, arg2; | ||
| 3929 | unsigned char *end; | ||
| 3930 | { | 3905 | { |
| 3931 | register unsigned char *pfrom = end; | 3906 | register unsigned char *pfrom = end; |
| 3932 | register unsigned char *pto = end + 5; | 3907 | register unsigned char *pto = end + 5; |
| @@ -3943,9 +3918,7 @@ insert_op2 (op, loc, arg1, arg2, end) | |||
| 3943 | least one character before the ^. */ | 3918 | least one character before the ^. */ |
| 3944 | 3919 | ||
| 3945 | static boolean | 3920 | static boolean |
| 3946 | at_begline_loc_p (pattern, p, syntax) | 3921 | at_begline_loc_p (const re_char *pattern, const re_char *p, reg_syntax_t syntax) |
| 3947 | re_char *pattern, *p; | ||
| 3948 | reg_syntax_t syntax; | ||
| 3949 | { | 3922 | { |
| 3950 | re_char *prev = p - 2; | 3923 | re_char *prev = p - 2; |
| 3951 | boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; | 3924 | boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; |
| @@ -3967,9 +3940,7 @@ at_begline_loc_p (pattern, p, syntax) | |||
| 3967 | at least one character after the $, i.e., `P < PEND'. */ | 3940 | at least one character after the $, i.e., `P < PEND'. */ |
| 3968 | 3941 | ||
| 3969 | static boolean | 3942 | static boolean |
| 3970 | at_endline_loc_p (p, pend, syntax) | 3943 | at_endline_loc_p (const re_char *p, const re_char *pend, reg_syntax_t syntax) |
| 3971 | re_char *p, *pend; | ||
| 3972 | reg_syntax_t syntax; | ||
| 3973 | { | 3944 | { |
| 3974 | re_char *next = p; | 3945 | re_char *next = p; |
| 3975 | boolean next_backslash = *next == '\\'; | 3946 | boolean next_backslash = *next == '\\'; |
| @@ -3989,9 +3960,7 @@ at_endline_loc_p (p, pend, syntax) | |||
| 3989 | false if it's not. */ | 3960 | false if it's not. */ |
| 3990 | 3961 | ||
| 3991 | static boolean | 3962 | static boolean |
| 3992 | group_in_compile_stack (compile_stack, regnum) | 3963 | group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum) |
| 3993 | compile_stack_type compile_stack; | ||
| 3994 | regnum_t regnum; | ||
| 3995 | { | 3964 | { |
| 3996 | int this_element; | 3965 | int this_element; |
| 3997 | 3966 | ||
| @@ -4015,10 +3984,7 @@ group_in_compile_stack (compile_stack, regnum) | |||
| 4015 | Return -1 if fastmap was not updated accurately. */ | 3984 | Return -1 if fastmap was not updated accurately. */ |
| 4016 | 3985 | ||
| 4017 | static int | 3986 | static int |
| 4018 | analyse_first (p, pend, fastmap, multibyte) | 3987 | analyse_first (const re_char *p, const re_char *pend, char *fastmap, const const int multibyte) |
| 4019 | re_char *p, *pend; | ||
| 4020 | char *fastmap; | ||
| 4021 | const int multibyte; | ||
| 4022 | { | 3988 | { |
| 4023 | int j, k; | 3989 | int j, k; |
| 4024 | boolean not; | 3990 | boolean not; |
| @@ -4330,8 +4296,7 @@ analyse_first (p, pend, fastmap, multibyte) | |||
| 4330 | Returns 0 if we succeed, -2 if an internal error. */ | 4296 | Returns 0 if we succeed, -2 if an internal error. */ |
| 4331 | 4297 | ||
| 4332 | int | 4298 | int |
| 4333 | re_compile_fastmap (bufp) | 4299 | re_compile_fastmap (struct re_pattern_buffer *bufp) |
| 4334 | struct re_pattern_buffer *bufp; | ||
| 4335 | { | 4300 | { |
| 4336 | char *fastmap = bufp->fastmap; | 4301 | char *fastmap = bufp->fastmap; |
| 4337 | int analysis; | 4302 | int analysis; |
| @@ -4361,11 +4326,7 @@ re_compile_fastmap (bufp) | |||
| 4361 | freeing the old data. */ | 4326 | freeing the old data. */ |
| 4362 | 4327 | ||
| 4363 | void | 4328 | void |
| 4364 | re_set_registers (bufp, regs, num_regs, starts, ends) | 4329 | re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned int num_regs, regoff_t *starts, regoff_t *ends) |
| 4365 | struct re_pattern_buffer *bufp; | ||
| 4366 | struct re_registers *regs; | ||
| 4367 | unsigned num_regs; | ||
| 4368 | regoff_t *starts, *ends; | ||
| 4369 | { | 4330 | { |
| 4370 | if (num_regs) | 4331 | if (num_regs) |
| 4371 | { | 4332 | { |
| @@ -4389,11 +4350,7 @@ WEAK_ALIAS (__re_set_registers, re_set_registers) | |||
| 4389 | doesn't let you say where to stop matching. */ | 4350 | doesn't let you say where to stop matching. */ |
| 4390 | 4351 | ||
| 4391 | int | 4352 | int |
| 4392 | re_search (bufp, string, size, startpos, range, regs) | 4353 | re_search (struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range, struct re_registers *regs) |
| 4393 | struct re_pattern_buffer *bufp; | ||
| 4394 | const char *string; | ||
| 4395 | int size, startpos, range; | ||
| 4396 | struct re_registers *regs; | ||
| 4397 | { | 4354 | { |
| 4398 | return re_search_2 (bufp, NULL, 0, string, size, startpos, range, | 4355 | return re_search_2 (bufp, NULL, 0, string, size, startpos, range, |
| 4399 | regs, size); | 4356 | regs, size); |
| @@ -4434,14 +4391,7 @@ WEAK_ALIAS (__re_search, re_search) | |||
| 4434 | stack overflow). */ | 4391 | stack overflow). */ |
| 4435 | 4392 | ||
| 4436 | int | 4393 | int |
| 4437 | re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop) | 4394 | re_search_2 (struct re_pattern_buffer *bufp, const char *str1, int size1, const char *str2, int size2, int startpos, int range, struct re_registers *regs, int stop) |
| 4438 | struct re_pattern_buffer *bufp; | ||
| 4439 | const char *str1, *str2; | ||
| 4440 | int size1, size2; | ||
| 4441 | int startpos; | ||
| 4442 | int range; | ||
| 4443 | struct re_registers *regs; | ||
| 4444 | int stop; | ||
| 4445 | { | 4395 | { |
| 4446 | int val; | 4396 | int val; |
| 4447 | re_char *string1 = (re_char*) str1; | 4397 | re_char *string1 = (re_char*) str1; |
| @@ -4775,8 +4725,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, | |||
| 4775 | /* If the operation is a match against one or more chars, | 4725 | /* If the operation is a match against one or more chars, |
| 4776 | return a pointer to the next operation, else return NULL. */ | 4726 | return a pointer to the next operation, else return NULL. */ |
| 4777 | static re_char * | 4727 | static re_char * |
| 4778 | skip_one_char (p) | 4728 | skip_one_char (const re_char *p) |
| 4779 | re_char *p; | ||
| 4780 | { | 4729 | { |
| 4781 | switch (SWITCH_ENUM_CAST (*p++)) | 4730 | switch (SWITCH_ENUM_CAST (*p++)) |
| 4782 | { | 4731 | { |
| @@ -4818,8 +4767,7 @@ skip_one_char (p) | |||
| 4818 | 4767 | ||
| 4819 | /* Jump over non-matching operations. */ | 4768 | /* Jump over non-matching operations. */ |
| 4820 | static re_char * | 4769 | static re_char * |
| 4821 | skip_noops (p, pend) | 4770 | skip_noops (const re_char *p, const re_char *pend) |
| 4822 | re_char *p, *pend; | ||
| 4823 | { | 4771 | { |
| 4824 | int mcnt; | 4772 | int mcnt; |
| 4825 | while (p < pend) | 4773 | while (p < pend) |
| @@ -4846,9 +4794,7 @@ skip_noops (p, pend) | |||
| 4846 | 4794 | ||
| 4847 | /* Non-zero if "p1 matches something" implies "p2 fails". */ | 4795 | /* Non-zero if "p1 matches something" implies "p2 fails". */ |
| 4848 | static int | 4796 | static int |
| 4849 | mutually_exclusive_p (bufp, p1, p2) | 4797 | mutually_exclusive_p (struct re_pattern_buffer *bufp, const re_char *p1, const re_char *p2) |
| 4850 | struct re_pattern_buffer *bufp; | ||
| 4851 | re_char *p1, *p2; | ||
| 4852 | { | 4798 | { |
| 4853 | re_opcode_t op2; | 4799 | re_opcode_t op2; |
| 4854 | const boolean multibyte = RE_MULTIBYTE_P (bufp); | 4800 | const boolean multibyte = RE_MULTIBYTE_P (bufp); |
| @@ -5086,13 +5032,7 @@ Lisp_Object re_match_object; | |||
| 5086 | matched substring. */ | 5032 | matched substring. */ |
| 5087 | 5033 | ||
| 5088 | int | 5034 | int |
| 5089 | re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) | 5035 | re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop) |
| 5090 | struct re_pattern_buffer *bufp; | ||
| 5091 | const char *string1, *string2; | ||
| 5092 | int size1, size2; | ||
| 5093 | int pos; | ||
| 5094 | struct re_registers *regs; | ||
| 5095 | int stop; | ||
| 5096 | { | 5036 | { |
| 5097 | int result; | 5037 | int result; |
| 5098 | 5038 | ||
| @@ -5114,13 +5054,7 @@ WEAK_ALIAS (__re_match_2, re_match_2) | |||
| 5114 | /* This is a separate function so that we can force an alloca cleanup | 5054 | /* This is a separate function so that we can force an alloca cleanup |
| 5115 | afterwards. */ | 5055 | afterwards. */ |
| 5116 | static int | 5056 | static int |
| 5117 | re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) | 5057 | re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int size1, const re_char *string2, int size2, int pos, struct re_registers *regs, int stop) |
| 5118 | struct re_pattern_buffer *bufp; | ||
| 5119 | re_char *string1, *string2; | ||
| 5120 | int size1, size2; | ||
| 5121 | int pos; | ||
| 5122 | struct re_registers *regs; | ||
| 5123 | int stop; | ||
| 5124 | { | 5058 | { |
| 5125 | /* General temporaries. */ | 5059 | /* General temporaries. */ |
| 5126 | int mcnt; | 5060 | int mcnt; |
| @@ -6451,11 +6385,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) | |||
| 6451 | bytes; nonzero otherwise. */ | 6385 | bytes; nonzero otherwise. */ |
| 6452 | 6386 | ||
| 6453 | static int | 6387 | static int |
| 6454 | bcmp_translate (s1, s2, len, translate, target_multibyte) | 6388 | bcmp_translate (const re_char *s1, const re_char *s2, register int len, Lisp_Object translate, const const int target_multibyte) |
| 6455 | re_char *s1, *s2; | ||
| 6456 | register int len; | ||
| 6457 | RE_TRANSLATE_TYPE translate; | ||
| 6458 | const int target_multibyte; | ||
| 6459 | { | 6389 | { |
| 6460 | register re_char *p1 = s1, *p2 = s2; | 6390 | register re_char *p1 = s1, *p2 = s2; |
| 6461 | re_char *p1_end = s1 + len; | 6391 | re_char *p1_end = s1 + len; |
| @@ -6496,10 +6426,7 @@ bcmp_translate (s1, s2, len, translate, target_multibyte) | |||
| 6496 | We call regex_compile to do the actual compilation. */ | 6426 | We call regex_compile to do the actual compilation. */ |
| 6497 | 6427 | ||
| 6498 | const char * | 6428 | const char * |
| 6499 | re_compile_pattern (pattern, length, bufp) | 6429 | re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) |
| 6500 | const char *pattern; | ||
| 6501 | size_t length; | ||
| 6502 | struct re_pattern_buffer *bufp; | ||
| 6503 | { | 6430 | { |
| 6504 | reg_errcode_t ret; | 6431 | reg_errcode_t ret; |
| 6505 | 6432 | ||
diff --git a/src/region-cache.c b/src/region-cache.c index d03d7df0bda..45eb723c885 100644 --- a/src/region-cache.c +++ b/src/region-cache.c | |||
| @@ -122,13 +122,13 @@ struct region_cache { | |||
| 122 | preserve that information, instead of throwing it away. */ | 122 | preserve that information, instead of throwing it away. */ |
| 123 | #define PRESERVE_THRESHOLD (500) | 123 | #define PRESERVE_THRESHOLD (500) |
| 124 | 124 | ||
| 125 | static void revalidate_region_cache (); | 125 | static void revalidate_region_cache (struct buffer *buf, struct region_cache *c); |
| 126 | 126 | ||
| 127 | 127 | ||
| 128 | /* Interface: Allocating, initializing, and disposing of region caches. */ | 128 | /* Interface: Allocating, initializing, and disposing of region caches. */ |
| 129 | 129 | ||
| 130 | struct region_cache * | 130 | struct region_cache * |
| 131 | new_region_cache () | 131 | new_region_cache (void) |
| 132 | { | 132 | { |
| 133 | struct region_cache *c | 133 | struct region_cache *c |
| 134 | = (struct region_cache *) xmalloc (sizeof (struct region_cache)); | 134 | = (struct region_cache *) xmalloc (sizeof (struct region_cache)); |
| @@ -156,8 +156,7 @@ new_region_cache () | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | void | 158 | void |
| 159 | free_region_cache (c) | 159 | free_region_cache (struct region_cache *c) |
| 160 | struct region_cache *c; | ||
| 161 | { | 160 | { |
| 162 | xfree (c->boundaries); | 161 | xfree (c->boundaries); |
| 163 | xfree (c); | 162 | xfree (c); |
| @@ -174,9 +173,7 @@ free_region_cache (c) | |||
| 174 | entries. It would be nice if it took advantage of locality of | 173 | entries. It would be nice if it took advantage of locality of |
| 175 | reference, too, by searching entries near the last entry found. */ | 174 | reference, too, by searching entries near the last entry found. */ |
| 176 | static int | 175 | static int |
| 177 | find_cache_boundary (c, pos) | 176 | find_cache_boundary (struct region_cache *c, int pos) |
| 178 | struct region_cache *c; | ||
| 179 | int pos; | ||
| 180 | { | 177 | { |
| 181 | int low = 0, high = c->cache_len; | 178 | int low = 0, high = c->cache_len; |
| 182 | 179 | ||
| @@ -210,10 +207,7 @@ find_cache_boundary (c, pos) | |||
| 210 | /* Move the gap of cache C to index POS, and make sure it has space | 207 | /* Move the gap of cache C to index POS, and make sure it has space |
| 211 | for at least MIN_SIZE boundaries. */ | 208 | for at least MIN_SIZE boundaries. */ |
| 212 | static void | 209 | static void |
| 213 | move_cache_gap (c, pos, min_size) | 210 | move_cache_gap (struct region_cache *c, int pos, int min_size) |
| 214 | struct region_cache *c; | ||
| 215 | int pos; | ||
| 216 | int min_size; | ||
| 217 | { | 211 | { |
| 218 | /* Copy these out of the cache and into registers. */ | 212 | /* Copy these out of the cache and into registers. */ |
| 219 | int gap_start = c->gap_start; | 213 | int gap_start = c->gap_start; |
| @@ -298,10 +292,7 @@ move_cache_gap (c, pos, min_size) | |||
| 298 | /* Insert a new boundary in cache C; it will have cache index INDEX, | 292 | /* Insert a new boundary in cache C; it will have cache index INDEX, |
| 299 | and have the specified POS and VALUE. */ | 293 | and have the specified POS and VALUE. */ |
| 300 | static void | 294 | static void |
| 301 | insert_cache_boundary (c, index, pos, value) | 295 | insert_cache_boundary (struct region_cache *c, int index, int pos, int value) |
| 302 | struct region_cache *c; | ||
| 303 | int index; | ||
| 304 | int pos, value; | ||
| 305 | { | 296 | { |
| 306 | /* index must be a valid cache index. */ | 297 | /* index must be a valid cache index. */ |
| 307 | if (index < 0 || index > c->cache_len) | 298 | if (index < 0 || index > c->cache_len) |
| @@ -337,9 +328,7 @@ insert_cache_boundary (c, index, pos, value) | |||
| 337 | /* Delete the i'th entry from cache C if START <= i < END. */ | 328 | /* Delete the i'th entry from cache C if START <= i < END. */ |
| 338 | 329 | ||
| 339 | static void | 330 | static void |
| 340 | delete_cache_boundaries (c, start, end) | 331 | delete_cache_boundaries (struct region_cache *c, int start, int end) |
| 341 | struct region_cache *c; | ||
| 342 | int start, end; | ||
| 343 | { | 332 | { |
| 344 | int len = end - start; | 333 | int len = end - start; |
| 345 | 334 | ||
| @@ -391,10 +380,7 @@ delete_cache_boundaries (c, start, end) | |||
| 391 | 380 | ||
| 392 | /* Set the value in cache C for the region START..END to VALUE. */ | 381 | /* Set the value in cache C for the region START..END to VALUE. */ |
| 393 | static void | 382 | static void |
| 394 | set_cache_region (c, start, end, value) | 383 | set_cache_region (struct region_cache *c, int start, int end, int value) |
| 395 | struct region_cache *c; | ||
| 396 | int start, end; | ||
| 397 | int value; | ||
| 398 | { | 384 | { |
| 399 | if (start > end) | 385 | if (start > end) |
| 400 | abort (); | 386 | abort (); |
| @@ -495,10 +481,7 @@ set_cache_region (c, start, end, value) | |||
| 495 | buffer positions in the presence of insertions and deletions; the | 481 | buffer positions in the presence of insertions and deletions; the |
| 496 | args to pass are the same before and after such an operation.) */ | 482 | args to pass are the same before and after such an operation.) */ |
| 497 | void | 483 | void |
| 498 | invalidate_region_cache (buf, c, head, tail) | 484 | invalidate_region_cache (struct buffer *buf, struct region_cache *c, int head, int tail) |
| 499 | struct buffer *buf; | ||
| 500 | struct region_cache *c; | ||
| 501 | int head, tail; | ||
| 502 | { | 485 | { |
| 503 | /* Let chead = c->beg_unchanged, and | 486 | /* Let chead = c->beg_unchanged, and |
| 504 | ctail = c->end_unchanged. | 487 | ctail = c->end_unchanged. |
| @@ -576,9 +559,7 @@ invalidate_region_cache (buf, c, head, tail) | |||
| 576 | the cache, and causes cache gap motion. */ | 559 | the cache, and causes cache gap motion. */ |
| 577 | 560 | ||
| 578 | static void | 561 | static void |
| 579 | revalidate_region_cache (buf, c) | 562 | revalidate_region_cache (struct buffer *buf, struct region_cache *c) |
| 580 | struct buffer *buf; | ||
| 581 | struct region_cache *c; | ||
| 582 | { | 563 | { |
| 583 | /* The boundaries now in the cache are expressed relative to the | 564 | /* The boundaries now in the cache are expressed relative to the |
| 584 | buffer_beg and buffer_end values stored in the cache. Now, | 565 | buffer_beg and buffer_end values stored in the cache. Now, |
| @@ -706,10 +687,7 @@ revalidate_region_cache (buf, c) | |||
| 706 | buffer positions) is "known," for the purposes of CACHE (e.g. "has | 687 | buffer positions) is "known," for the purposes of CACHE (e.g. "has |
| 707 | no newlines", in the case of the line cache). */ | 688 | no newlines", in the case of the line cache). */ |
| 708 | void | 689 | void |
| 709 | know_region_cache (buf, c, start, end) | 690 | know_region_cache (struct buffer *buf, struct region_cache *c, int start, int end) |
| 710 | struct buffer *buf; | ||
| 711 | struct region_cache *c; | ||
| 712 | int start, end; | ||
| 713 | { | 691 | { |
| 714 | revalidate_region_cache (buf, c); | 692 | revalidate_region_cache (buf, c); |
| 715 | 693 | ||
| @@ -723,11 +701,7 @@ know_region_cache (buf, c, start, end) | |||
| 723 | the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest | 701 | the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest |
| 724 | position after POS where the knownness changes. */ | 702 | position after POS where the knownness changes. */ |
| 725 | int | 703 | int |
| 726 | region_cache_forward (buf, c, pos, next) | 704 | region_cache_forward (struct buffer *buf, struct region_cache *c, int pos, int *next) |
| 727 | struct buffer *buf; | ||
| 728 | struct region_cache *c; | ||
| 729 | int pos; | ||
| 730 | int *next; | ||
| 731 | { | 705 | { |
| 732 | revalidate_region_cache (buf, c); | 706 | revalidate_region_cache (buf, c); |
| 733 | 707 | ||
| @@ -762,11 +736,7 @@ region_cache_forward (buf, c, pos, next) | |||
| 762 | /* Return true if the text immediately before POS in BUF is known, for | 736 | /* Return true if the text immediately before POS in BUF is known, for |
| 763 | the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest | 737 | the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest |
| 764 | position before POS where the knownness changes. */ | 738 | position before POS where the knownness changes. */ |
| 765 | int region_cache_backward (buf, c, pos, next) | 739 | int region_cache_backward (struct buffer *buf, struct region_cache *c, int pos, int *next) |
| 766 | struct buffer *buf; | ||
| 767 | struct region_cache *c; | ||
| 768 | int pos; | ||
| 769 | int *next; | ||
| 770 | { | 740 | { |
| 771 | revalidate_region_cache (buf, c); | 741 | revalidate_region_cache (buf, c); |
| 772 | 742 | ||
| @@ -804,8 +774,7 @@ int region_cache_backward (buf, c, pos, next) | |||
| 804 | /* Debugging: pretty-print a cache to the standard error output. */ | 774 | /* Debugging: pretty-print a cache to the standard error output. */ |
| 805 | 775 | ||
| 806 | void | 776 | void |
| 807 | pp_cache (c) | 777 | pp_cache (struct region_cache *c) |
| 808 | struct region_cache *c; | ||
| 809 | { | 778 | { |
| 810 | int i; | 779 | int i; |
| 811 | int beg_u = c->buffer_beg + c->beg_unchanged; | 780 | int beg_u = c->buffer_beg + c->beg_unchanged; |
diff --git a/src/scroll.c b/src/scroll.c index 5363ec3be42..410420df0b8 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -244,12 +244,7 @@ calculate_scrolling (frame, matrix, window_size, lines_below, | |||
| 244 | of lines. */ | 244 | of lines. */ |
| 245 | 245 | ||
| 246 | static void | 246 | static void |
| 247 | do_scrolling (frame, current_matrix, matrix, window_size, unchanged_at_top) | 247 | do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct matrix_elt *matrix, int window_size, int unchanged_at_top) |
| 248 | struct frame *frame; | ||
| 249 | struct glyph_matrix *current_matrix; | ||
| 250 | struct matrix_elt *matrix; | ||
| 251 | int window_size; | ||
| 252 | int unchanged_at_top; | ||
| 253 | { | 248 | { |
| 254 | struct matrix_elt *p; | 249 | struct matrix_elt *p; |
| 255 | int i, j, k; | 250 | int i, j, k; |
| @@ -854,9 +849,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, | |||
| 854 | such a line will have little weight. */ | 849 | such a line will have little weight. */ |
| 855 | 850 | ||
| 856 | int | 851 | int |
| 857 | scrolling_max_lines_saved (start, end, oldhash, newhash, cost) | 852 | scrolling_max_lines_saved (int start, int end, int *oldhash, int *newhash, int *cost) |
| 858 | int start, end; | ||
| 859 | int *oldhash, *newhash, *cost; | ||
| 860 | { | 853 | { |
| 861 | struct { int hash; int count; } lines[01000]; | 854 | struct { int hash; int count; } lines[01000]; |
| 862 | register int i, h; | 855 | register int i, h; |
| @@ -909,9 +902,7 @@ scrolling_max_lines_saved (start, end, oldhash, newhash, cost) | |||
| 909 | to scroll_frame_lines to perform this scrolling. */ | 902 | to scroll_frame_lines to perform this scrolling. */ |
| 910 | 903 | ||
| 911 | int | 904 | int |
| 912 | scroll_cost (frame, from, to, amount) | 905 | scroll_cost (FRAME_PTR frame, int from, int to, int amount) |
| 913 | FRAME_PTR frame; | ||
| 914 | int from, to, amount; | ||
| 915 | { | 906 | { |
| 916 | /* Compute how many lines, at bottom of frame, | 907 | /* Compute how many lines, at bottom of frame, |
| 917 | will not be involved in actual motion. */ | 908 | will not be involved in actual motion. */ |
| @@ -948,11 +939,7 @@ scroll_cost (frame, from, to, amount) | |||
| 948 | overhead and multiply factor values */ | 939 | overhead and multiply factor values */ |
| 949 | 940 | ||
| 950 | static void | 941 | static void |
| 951 | line_ins_del (frame, ov1, pf1, ovn, pfn, ov, mf) | 942 | line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) |
| 952 | FRAME_PTR frame; | ||
| 953 | int ov1, ovn; | ||
| 954 | int pf1, pfn; | ||
| 955 | register int *ov, *mf; | ||
| 956 | { | 943 | { |
| 957 | register int i; | 944 | register int i; |
| 958 | register int frame_lines = FRAME_LINES (frame); | 945 | register int frame_lines = FRAME_LINES (frame); |
diff --git a/src/search.c b/src/search.c index 69db94e9f1a..004e65e7715 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -110,10 +110,10 @@ static EMACS_INT boyer_moore (int, unsigned char *, int, int, | |||
| 110 | static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, | 110 | static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, |
| 111 | EMACS_INT, EMACS_INT, int, int, | 111 | EMACS_INT, EMACS_INT, int, int, |
| 112 | Lisp_Object, Lisp_Object, int); | 112 | Lisp_Object, Lisp_Object, int); |
| 113 | static void matcher_overflow () NO_RETURN; | 113 | static void matcher_overflow (void) NO_RETURN; |
| 114 | 114 | ||
| 115 | static void | 115 | static void |
| 116 | matcher_overflow () | 116 | matcher_overflow (void) |
| 117 | { | 117 | { |
| 118 | error ("Stack overflow in regexp matcher"); | 118 | error ("Stack overflow in regexp matcher"); |
| 119 | } | 119 | } |
| @@ -132,12 +132,7 @@ matcher_overflow () | |||
| 132 | The behavior also depends on Vsearch_spaces_regexp. */ | 132 | The behavior also depends on Vsearch_spaces_regexp. */ |
| 133 | 133 | ||
| 134 | static void | 134 | static void |
| 135 | compile_pattern_1 (cp, pattern, translate, regp, posix) | 135 | compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object translate, struct re_registers *regp, int posix) |
| 136 | struct regexp_cache *cp; | ||
| 137 | Lisp_Object pattern; | ||
| 138 | Lisp_Object translate; | ||
| 139 | struct re_registers *regp; | ||
| 140 | int posix; | ||
| 141 | { | 136 | { |
| 142 | char *val; | 137 | char *val; |
| 143 | reg_syntax_t old; | 138 | reg_syntax_t old; |
| @@ -187,7 +182,7 @@ compile_pattern_1 (cp, pattern, translate, regp, posix) | |||
| 187 | This is called from garbage collection. */ | 182 | This is called from garbage collection. */ |
| 188 | 183 | ||
| 189 | void | 184 | void |
| 190 | shrink_regexp_cache () | 185 | shrink_regexp_cache (void) |
| 191 | { | 186 | { |
| 192 | struct regexp_cache *cp; | 187 | struct regexp_cache *cp; |
| 193 | 188 | ||
| @@ -205,7 +200,7 @@ shrink_regexp_cache () | |||
| 205 | automagically manages the memory in each re_pattern_buffer struct, | 200 | automagically manages the memory in each re_pattern_buffer struct, |
| 206 | based on its `allocated' and `buffer' values. */ | 201 | based on its `allocated' and `buffer' values. */ |
| 207 | void | 202 | void |
| 208 | clear_regexp_cache () | 203 | clear_regexp_cache (void) |
| 209 | { | 204 | { |
| 210 | int i; | 205 | int i; |
| 211 | 206 | ||
| @@ -229,11 +224,7 @@ clear_regexp_cache () | |||
| 229 | for this pattern. 0 means backtrack only enough to get a valid match. */ | 224 | for this pattern. 0 means backtrack only enough to get a valid match. */ |
| 230 | 225 | ||
| 231 | struct re_pattern_buffer * | 226 | struct re_pattern_buffer * |
| 232 | compile_pattern (pattern, regp, translate, posix, multibyte) | 227 | compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object translate, int posix, int multibyte) |
| 233 | Lisp_Object pattern; | ||
| 234 | struct re_registers *regp; | ||
| 235 | Lisp_Object translate; | ||
| 236 | int posix, multibyte; | ||
| 237 | { | 228 | { |
| 238 | struct regexp_cache *cp, **cpp; | 229 | struct regexp_cache *cp, **cpp; |
| 239 | 230 | ||
| @@ -290,9 +281,7 @@ compile_pattern (pattern, regp, translate, posix, multibyte) | |||
| 290 | 281 | ||
| 291 | 282 | ||
| 292 | static Lisp_Object | 283 | static Lisp_Object |
| 293 | looking_at_1 (string, posix) | 284 | looking_at_1 (Lisp_Object string, int posix) |
| 294 | Lisp_Object string; | ||
| 295 | int posix; | ||
| 296 | { | 285 | { |
| 297 | Lisp_Object val; | 286 | Lisp_Object val; |
| 298 | unsigned char *p1, *p2; | 287 | unsigned char *p1, *p2; |
| @@ -392,9 +381,7 @@ data if you want to preserve them. */) | |||
| 392 | } | 381 | } |
| 393 | 382 | ||
| 394 | static Lisp_Object | 383 | static Lisp_Object |
| 395 | string_match_1 (regexp, string, start, posix) | 384 | string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int posix) |
| 396 | Lisp_Object regexp, string, start; | ||
| 397 | int posix; | ||
| 398 | { | 385 | { |
| 399 | int val; | 386 | int val; |
| 400 | struct re_pattern_buffer *bufp; | 387 | struct re_pattern_buffer *bufp; |
| @@ -499,8 +486,7 @@ matched by parenthesis constructs in the pattern. */) | |||
| 499 | This does not clobber the match data. */ | 486 | This does not clobber the match data. */ |
| 500 | 487 | ||
| 501 | int | 488 | int |
| 502 | fast_string_match (regexp, string) | 489 | fast_string_match (Lisp_Object regexp, Lisp_Object string) |
| 503 | Lisp_Object regexp, string; | ||
| 504 | { | 490 | { |
| 505 | int val; | 491 | int val; |
| 506 | struct re_pattern_buffer *bufp; | 492 | struct re_pattern_buffer *bufp; |
| @@ -525,9 +511,7 @@ fast_string_match (regexp, string) | |||
| 525 | extern Lisp_Object Vascii_downcase_table; | 511 | extern Lisp_Object Vascii_downcase_table; |
| 526 | 512 | ||
| 527 | int | 513 | int |
| 528 | fast_c_string_match_ignore_case (regexp, string) | 514 | fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string) |
| 529 | Lisp_Object regexp; | ||
| 530 | const char *string; | ||
| 531 | { | 515 | { |
| 532 | int val; | 516 | int val; |
| 533 | struct re_pattern_buffer *bufp; | 517 | struct re_pattern_buffer *bufp; |
| @@ -547,8 +531,7 @@ fast_c_string_match_ignore_case (regexp, string) | |||
| 547 | /* Like fast_string_match but ignore case. */ | 531 | /* Like fast_string_match but ignore case. */ |
| 548 | 532 | ||
| 549 | int | 533 | int |
| 550 | fast_string_match_ignore_case (regexp, string) | 534 | fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string) |
| 551 | Lisp_Object regexp, string; | ||
| 552 | { | 535 | { |
| 553 | int val; | 536 | int val; |
| 554 | struct re_pattern_buffer *bufp; | 537 | struct re_pattern_buffer *bufp; |
| @@ -572,10 +555,7 @@ fast_string_match_ignore_case (regexp, string) | |||
| 572 | data. */ | 555 | data. */ |
| 573 | 556 | ||
| 574 | EMACS_INT | 557 | EMACS_INT |
| 575 | fast_looking_at (regexp, pos, pos_byte, limit, limit_byte, string) | 558 | fast_looking_at (Lisp_Object regexp, EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT limit, EMACS_INT limit_byte, Lisp_Object string) |
| 576 | Lisp_Object regexp; | ||
| 577 | EMACS_INT pos, pos_byte, limit, limit_byte; | ||
| 578 | Lisp_Object string; | ||
| 579 | { | 559 | { |
| 580 | int multibyte; | 560 | int multibyte; |
| 581 | struct re_pattern_buffer *buf; | 561 | struct re_pattern_buffer *buf; |
| @@ -640,8 +620,7 @@ fast_looking_at (regexp, pos, pos_byte, limit, limit_byte, string) | |||
| 640 | This is our cheezy way of associating an action with the change of | 620 | This is our cheezy way of associating an action with the change of |
| 641 | state of a buffer-local variable. */ | 621 | state of a buffer-local variable. */ |
| 642 | static void | 622 | static void |
| 643 | newline_cache_on_off (buf) | 623 | newline_cache_on_off (struct buffer *buf) |
| 644 | struct buffer *buf; | ||
| 645 | { | 624 | { |
| 646 | if (NILP (buf->cache_long_line_scans)) | 625 | if (NILP (buf->cache_long_line_scans)) |
| 647 | { | 626 | { |
| @@ -682,12 +661,7 @@ newline_cache_on_off (buf) | |||
| 682 | except when inside redisplay. */ | 661 | except when inside redisplay. */ |
| 683 | 662 | ||
| 684 | int | 663 | int |
| 685 | scan_buffer (target, start, end, count, shortage, allow_quit) | 664 | scan_buffer (register int target, EMACS_INT start, EMACS_INT end, int count, int *shortage, int allow_quit) |
| 686 | register int target; | ||
| 687 | EMACS_INT start, end; | ||
| 688 | int count; | ||
| 689 | int *shortage; | ||
| 690 | int allow_quit; | ||
| 691 | { | 665 | { |
| 692 | struct region_cache *newline_cache; | 666 | struct region_cache *newline_cache; |
| 693 | int direction; | 667 | int direction; |
| @@ -879,11 +853,7 @@ scan_buffer (target, start, end, count, shortage, allow_quit) | |||
| 879 | except in special cases. */ | 853 | except in special cases. */ |
| 880 | 854 | ||
| 881 | int | 855 | int |
| 882 | scan_newline (start, start_byte, limit, limit_byte, count, allow_quit) | 856 | scan_newline (EMACS_INT start, EMACS_INT start_byte, EMACS_INT limit, EMACS_INT limit_byte, register int count, int allow_quit) |
| 883 | EMACS_INT start, start_byte; | ||
| 884 | EMACS_INT limit, limit_byte; | ||
| 885 | register int count; | ||
| 886 | int allow_quit; | ||
| 887 | { | 857 | { |
| 888 | int direction = ((count > 0) ? 1 : -1); | 858 | int direction = ((count > 0) ? 1 : -1); |
| 889 | 859 | ||
| @@ -977,9 +947,7 @@ scan_newline (start, start_byte, limit, limit_byte, count, allow_quit) | |||
| 977 | } | 947 | } |
| 978 | 948 | ||
| 979 | int | 949 | int |
| 980 | find_next_newline_no_quit (from, cnt) | 950 | find_next_newline_no_quit (EMACS_INT from, int cnt) |
| 981 | EMACS_INT from; | ||
| 982 | int cnt; | ||
| 983 | { | 951 | { |
| 984 | return scan_buffer ('\n', from, 0, cnt, (int *) 0, 0); | 952 | return scan_buffer ('\n', from, 0, cnt, (int *) 0, 0); |
| 985 | } | 953 | } |
| @@ -989,9 +957,7 @@ find_next_newline_no_quit (from, cnt) | |||
| 989 | find_next_newline (...)-1, because you might hit TO. */ | 957 | find_next_newline (...)-1, because you might hit TO. */ |
| 990 | 958 | ||
| 991 | int | 959 | int |
| 992 | find_before_next_newline (from, to, cnt) | 960 | find_before_next_newline (EMACS_INT from, EMACS_INT to, int cnt) |
| 993 | EMACS_INT from, to; | ||
| 994 | int cnt; | ||
| 995 | { | 961 | { |
| 996 | int shortage; | 962 | int shortage; |
| 997 | int pos = scan_buffer ('\n', from, to, cnt, &shortage, 1); | 963 | int pos = scan_buffer ('\n', from, to, cnt, &shortage, 1); |
| @@ -1005,11 +971,7 @@ find_before_next_newline (from, to, cnt) | |||
| 1005 | /* Subroutines of Lisp buffer search functions. */ | 971 | /* Subroutines of Lisp buffer search functions. */ |
| 1006 | 972 | ||
| 1007 | static Lisp_Object | 973 | static Lisp_Object |
| 1008 | search_command (string, bound, noerror, count, direction, RE, posix) | 974 | search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count, int direction, int RE, int posix) |
| 1009 | Lisp_Object string, bound, noerror, count; | ||
| 1010 | int direction; | ||
| 1011 | int RE; | ||
| 1012 | int posix; | ||
| 1013 | { | 975 | { |
| 1014 | register int np; | 976 | register int np; |
| 1015 | int lim, lim_byte; | 977 | int lim, lim_byte; |
| @@ -1086,8 +1048,7 @@ search_command (string, bound, noerror, count, direction, RE, posix) | |||
| 1086 | /* Return 1 if REGEXP it matches just one constant string. */ | 1048 | /* Return 1 if REGEXP it matches just one constant string. */ |
| 1087 | 1049 | ||
| 1088 | static int | 1050 | static int |
| 1089 | trivial_regexp_p (regexp) | 1051 | trivial_regexp_p (Lisp_Object regexp) |
| 1090 | Lisp_Object regexp; | ||
| 1091 | { | 1052 | { |
| 1092 | int len = SBYTES (regexp); | 1053 | int len = SBYTES (regexp); |
| 1093 | unsigned char *s = SDATA (regexp); | 1054 | unsigned char *s = SDATA (regexp); |
| @@ -1504,13 +1465,7 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, | |||
| 1504 | boyer_moore cannot work. */ | 1465 | boyer_moore cannot work. */ |
| 1505 | 1466 | ||
| 1506 | static EMACS_INT | 1467 | static EMACS_INT |
| 1507 | simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) | 1468 | simple_search (int n, unsigned char *pat, int len, int len_byte, Lisp_Object trt, EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT lim, EMACS_INT lim_byte) |
| 1508 | int n; | ||
| 1509 | unsigned char *pat; | ||
| 1510 | int len, len_byte; | ||
| 1511 | Lisp_Object trt; | ||
| 1512 | EMACS_INT pos, pos_byte; | ||
| 1513 | EMACS_INT lim, lim_byte; | ||
| 1514 | { | 1469 | { |
| 1515 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 1470 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
| 1516 | int forward = n > 0; | 1471 | int forward = n > 0; |
| @@ -2127,8 +2082,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 2127 | Also clear out the match data for registers 1 and up. */ | 2082 | Also clear out the match data for registers 1 and up. */ |
| 2128 | 2083 | ||
| 2129 | static void | 2084 | static void |
| 2130 | set_search_regs (beg_byte, nbytes) | 2085 | set_search_regs (EMACS_INT beg_byte, EMACS_INT nbytes) |
| 2131 | EMACS_INT beg_byte, nbytes; | ||
| 2132 | { | 2086 | { |
| 2133 | int i; | 2087 | int i; |
| 2134 | 2088 | ||
| @@ -2162,9 +2116,7 @@ set_search_regs (beg_byte, nbytes) | |||
| 2162 | need not match a word boundary unless it ends in whitespace. */ | 2116 | need not match a word boundary unless it ends in whitespace. */ |
| 2163 | 2117 | ||
| 2164 | static Lisp_Object | 2118 | static Lisp_Object |
| 2165 | wordify (string, lax) | 2119 | wordify (Lisp_Object string, int lax) |
| 2166 | Lisp_Object string; | ||
| 2167 | int lax; | ||
| 2168 | { | 2120 | { |
| 2169 | register unsigned char *p, *o; | 2121 | register unsigned char *p, *o; |
| 2170 | register int i, i_byte, len, punct_count = 0, word_count = 0; | 2122 | register int i, i_byte, len, punct_count = 0, word_count = 0; |
| @@ -2886,9 +2838,7 @@ since only regular expressions have distinguished subexpressions. */) | |||
| 2886 | } | 2838 | } |
| 2887 | 2839 | ||
| 2888 | static Lisp_Object | 2840 | static Lisp_Object |
| 2889 | match_limit (num, beginningp) | 2841 | match_limit (Lisp_Object num, int beginningp) |
| 2890 | Lisp_Object num; | ||
| 2891 | int beginningp; | ||
| 2892 | { | 2842 | { |
| 2893 | register int n; | 2843 | register int n; |
| 2894 | 2844 | ||
| @@ -3171,7 +3121,7 @@ static Lisp_Object saved_last_thing_searched; | |||
| 3171 | /* Called from Flooking_at, Fstring_match, search_buffer, Fstore_match_data | 3121 | /* Called from Flooking_at, Fstring_match, search_buffer, Fstore_match_data |
| 3172 | if asynchronous code (filter or sentinel) is running. */ | 3122 | if asynchronous code (filter or sentinel) is running. */ |
| 3173 | static void | 3123 | static void |
| 3174 | save_search_regs () | 3124 | save_search_regs (void) |
| 3175 | { | 3125 | { |
| 3176 | if (!search_regs_saved) | 3126 | if (!search_regs_saved) |
| 3177 | { | 3127 | { |
| @@ -3190,7 +3140,7 @@ save_search_regs () | |||
| 3190 | 3140 | ||
| 3191 | /* Called upon exit from filters and sentinels. */ | 3141 | /* Called upon exit from filters and sentinels. */ |
| 3192 | void | 3142 | void |
| 3193 | restore_search_regs () | 3143 | restore_search_regs (void) |
| 3194 | { | 3144 | { |
| 3195 | if (search_regs_saved) | 3145 | if (search_regs_saved) |
| 3196 | { | 3146 | { |
| @@ -3209,8 +3159,7 @@ restore_search_regs () | |||
| 3209 | } | 3159 | } |
| 3210 | 3160 | ||
| 3211 | static Lisp_Object | 3161 | static Lisp_Object |
| 3212 | unwind_set_match_data (list) | 3162 | unwind_set_match_data (Lisp_Object list) |
| 3213 | Lisp_Object list; | ||
| 3214 | { | 3163 | { |
| 3215 | /* It is NOT ALWAYS safe to free (evaporate) the markers immediately. */ | 3164 | /* It is NOT ALWAYS safe to free (evaporate) the markers immediately. */ |
| 3216 | return Fset_match_data (list, Qt); | 3165 | return Fset_match_data (list, Qt); |
| @@ -3218,7 +3167,7 @@ unwind_set_match_data (list) | |||
| 3218 | 3167 | ||
| 3219 | /* Called to unwind protect the match data. */ | 3168 | /* Called to unwind protect the match data. */ |
| 3220 | void | 3169 | void |
| 3221 | record_unwind_save_match_data () | 3170 | record_unwind_save_match_data (void) |
| 3222 | { | 3171 | { |
| 3223 | record_unwind_protect (unwind_set_match_data, | 3172 | record_unwind_protect (unwind_set_match_data, |
| 3224 | Fmatch_data (Qnil, Qnil, Qnil)); | 3173 | Fmatch_data (Qnil, Qnil, Qnil)); |
| @@ -3262,7 +3211,7 @@ DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0, | |||
| 3262 | } | 3211 | } |
| 3263 | 3212 | ||
| 3264 | void | 3213 | void |
| 3265 | syms_of_search () | 3214 | syms_of_search (void) |
| 3266 | { | 3215 | { |
| 3267 | register int i; | 3216 | register int i; |
| 3268 | 3217 | ||
diff --git a/src/sound.c b/src/sound.c index b362fc8819e..6fa6f548917 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -328,8 +328,7 @@ static int do_play_sound (const char *, unsigned long); | |||
| 328 | /* Like perror, but signals an error. */ | 328 | /* Like perror, but signals an error. */ |
| 329 | 329 | ||
| 330 | static void | 330 | static void |
| 331 | sound_perror (msg) | 331 | sound_perror (char *msg) |
| 332 | char *msg; | ||
| 333 | { | 332 | { |
| 334 | int saved_errno = errno; | 333 | int saved_errno = errno; |
| 335 | 334 | ||
| @@ -347,8 +346,7 @@ sound_perror (msg) | |||
| 347 | /* Display a warning message. */ | 346 | /* Display a warning message. */ |
| 348 | 347 | ||
| 349 | static void | 348 | static void |
| 350 | sound_warning (msg) | 349 | sound_warning (char *msg) |
| 351 | char *msg; | ||
| 352 | { | 350 | { |
| 353 | message (msg); | 351 | message (msg); |
| 354 | } | 352 | } |
| @@ -381,9 +379,7 @@ sound_warning (msg) | |||
| 381 | range [0, 1]. */ | 379 | range [0, 1]. */ |
| 382 | 380 | ||
| 383 | static int | 381 | static int |
| 384 | parse_sound (sound, attrs) | 382 | parse_sound (Lisp_Object sound, Lisp_Object *attrs) |
| 385 | Lisp_Object sound; | ||
| 386 | Lisp_Object *attrs; | ||
| 387 | { | 383 | { |
| 388 | /* SOUND must be a list starting with the symbol `sound'. */ | 384 | /* SOUND must be a list starting with the symbol `sound'. */ |
| 389 | if (!CONSP (sound) || !EQ (XCAR (sound), Qsound)) | 385 | if (!CONSP (sound) || !EQ (XCAR (sound), Qsound)) |
| @@ -452,8 +448,7 @@ parse_sound (sound, attrs) | |||
| 452 | S is the sound file structure to fill in. */ | 448 | S is the sound file structure to fill in. */ |
| 453 | 449 | ||
| 454 | static void | 450 | static void |
| 455 | find_sound_type (s) | 451 | find_sound_type (struct sound *s) |
| 456 | struct sound *s; | ||
| 457 | { | 452 | { |
| 458 | if (!wav_init (s) && !au_init (s)) | 453 | if (!wav_init (s) && !au_init (s)) |
| 459 | error ("Unknown sound format"); | 454 | error ("Unknown sound format"); |
| @@ -463,8 +458,7 @@ find_sound_type (s) | |||
| 463 | /* Function installed by play-sound-internal with record_unwind_protect. */ | 458 | /* Function installed by play-sound-internal with record_unwind_protect. */ |
| 464 | 459 | ||
| 465 | static Lisp_Object | 460 | static Lisp_Object |
| 466 | sound_cleanup (arg) | 461 | sound_cleanup (Lisp_Object arg) |
| 467 | Lisp_Object arg; | ||
| 468 | { | 462 | { |
| 469 | if (current_sound_device->close) | 463 | if (current_sound_device->close) |
| 470 | current_sound_device->close (current_sound_device); | 464 | current_sound_device->close (current_sound_device); |
| @@ -484,8 +478,7 @@ sound_cleanup (arg) | |||
| 484 | to host byte-order. */ | 478 | to host byte-order. */ |
| 485 | 479 | ||
| 486 | static u_int32_t | 480 | static u_int32_t |
| 487 | le2hl (value) | 481 | le2hl (u_int32_t value) |
| 488 | u_int32_t value; | ||
| 489 | { | 482 | { |
| 490 | #ifdef WORDS_BIG_ENDIAN | 483 | #ifdef WORDS_BIG_ENDIAN |
| 491 | unsigned char *p = (unsigned char *) &value; | 484 | unsigned char *p = (unsigned char *) &value; |
| @@ -499,8 +492,7 @@ le2hl (value) | |||
| 499 | to host byte-order. */ | 492 | to host byte-order. */ |
| 500 | 493 | ||
| 501 | static u_int16_t | 494 | static u_int16_t |
| 502 | le2hs (value) | 495 | le2hs (u_int16_t value) |
| 503 | u_int16_t value; | ||
| 504 | { | 496 | { |
| 505 | #ifdef WORDS_BIG_ENDIAN | 497 | #ifdef WORDS_BIG_ENDIAN |
| 506 | unsigned char *p = (unsigned char *) &value; | 498 | unsigned char *p = (unsigned char *) &value; |
| @@ -514,8 +506,7 @@ le2hs (value) | |||
| 514 | to host byte-order. */ | 506 | to host byte-order. */ |
| 515 | 507 | ||
| 516 | static u_int32_t | 508 | static u_int32_t |
| 517 | be2hl (value) | 509 | be2hl (u_int32_t value) |
| 518 | u_int32_t value; | ||
| 519 | { | 510 | { |
| 520 | #ifndef WORDS_BIG_ENDIAN | 511 | #ifndef WORDS_BIG_ENDIAN |
| 521 | unsigned char *p = (unsigned char *) &value; | 512 | unsigned char *p = (unsigned char *) &value; |
| @@ -554,8 +545,7 @@ be2hs (value) | |||
| 554 | Value is non-zero if the file is a WAV file. */ | 545 | Value is non-zero if the file is a WAV file. */ |
| 555 | 546 | ||
| 556 | static int | 547 | static int |
| 557 | wav_init (s) | 548 | wav_init (struct sound *s) |
| 558 | struct sound *s; | ||
| 559 | { | 549 | { |
| 560 | struct wav_header *header = (struct wav_header *) s->header; | 550 | struct wav_header *header = (struct wav_header *) s->header; |
| 561 | 551 | ||
| @@ -590,9 +580,7 @@ wav_init (s) | |||
| 590 | /* Play RIFF-WAVE audio file S on sound device SD. */ | 580 | /* Play RIFF-WAVE audio file S on sound device SD. */ |
| 591 | 581 | ||
| 592 | static void | 582 | static void |
| 593 | wav_play (s, sd) | 583 | wav_play (struct sound *s, struct sound_device *sd) |
| 594 | struct sound *s; | ||
| 595 | struct sound_device *sd; | ||
| 596 | { | 584 | { |
| 597 | struct wav_header *header = (struct wav_header *) s->header; | 585 | struct wav_header *header = (struct wav_header *) s->header; |
| 598 | 586 | ||
| @@ -665,8 +653,7 @@ enum au_encoding | |||
| 665 | Value is non-zero if the file is an AU file. */ | 653 | Value is non-zero if the file is an AU file. */ |
| 666 | 654 | ||
| 667 | static int | 655 | static int |
| 668 | au_init (s) | 656 | au_init (struct sound *s) |
| 669 | struct sound *s; | ||
| 670 | { | 657 | { |
| 671 | struct au_header *header = (struct au_header *) s->header; | 658 | struct au_header *header = (struct au_header *) s->header; |
| 672 | 659 | ||
| @@ -692,9 +679,7 @@ au_init (s) | |||
| 692 | /* Play Sun audio file S on sound device SD. */ | 679 | /* Play Sun audio file S on sound device SD. */ |
| 693 | 680 | ||
| 694 | static void | 681 | static void |
| 695 | au_play (s, sd) | 682 | au_play (struct sound *s, struct sound_device *sd) |
| 696 | struct sound *s; | ||
| 697 | struct sound_device *sd; | ||
| 698 | { | 683 | { |
| 699 | struct au_header *header = (struct au_header *) s->header; | 684 | struct au_header *header = (struct au_header *) s->header; |
| 700 | 685 | ||
| @@ -740,8 +725,7 @@ au_play (s, sd) | |||
| 740 | otherwise use a default device name. */ | 725 | otherwise use a default device name. */ |
| 741 | 726 | ||
| 742 | static void | 727 | static void |
| 743 | vox_open (sd) | 728 | vox_open (struct sound_device *sd) |
| 744 | struct sound_device *sd; | ||
| 745 | { | 729 | { |
| 746 | char *file; | 730 | char *file; |
| 747 | 731 | ||
| @@ -760,8 +744,7 @@ vox_open (sd) | |||
| 760 | /* Configure device SD from parameters in it. */ | 744 | /* Configure device SD from parameters in it. */ |
| 761 | 745 | ||
| 762 | static void | 746 | static void |
| 763 | vox_configure (sd) | 747 | vox_configure (struct sound_device *sd) |
| 764 | struct sound_device *sd; | ||
| 765 | { | 748 | { |
| 766 | int val; | 749 | int val; |
| 767 | 750 | ||
| @@ -814,8 +797,7 @@ vox_configure (sd) | |||
| 814 | /* Close device SD if it is open. */ | 797 | /* Close device SD if it is open. */ |
| 815 | 798 | ||
| 816 | static void | 799 | static void |
| 817 | vox_close (sd) | 800 | vox_close (struct sound_device *sd) |
| 818 | struct sound_device *sd; | ||
| 819 | { | 801 | { |
| 820 | if (sd->fd >= 0) | 802 | if (sd->fd >= 0) |
| 821 | { | 803 | { |
| @@ -845,9 +827,7 @@ vox_close (sd) | |||
| 845 | /* Choose device-dependent format for device SD from sound file S. */ | 827 | /* Choose device-dependent format for device SD from sound file S. */ |
| 846 | 828 | ||
| 847 | static void | 829 | static void |
| 848 | vox_choose_format (sd, s) | 830 | vox_choose_format (struct sound_device *sd, struct sound *s) |
| 849 | struct sound_device *sd; | ||
| 850 | struct sound *s; | ||
| 851 | { | 831 | { |
| 852 | if (s->type == RIFF) | 832 | if (s->type == RIFF) |
| 853 | { | 833 | { |
| @@ -890,8 +870,7 @@ vox_choose_format (sd, s) | |||
| 890 | structure. */ | 870 | structure. */ |
| 891 | 871 | ||
| 892 | static int | 872 | static int |
| 893 | vox_init (sd) | 873 | vox_init (struct sound_device *sd) |
| 894 | struct sound_device *sd; | ||
| 895 | { | 874 | { |
| 896 | char *file; | 875 | char *file; |
| 897 | int fd; | 876 | int fd; |
| @@ -921,10 +900,7 @@ vox_init (sd) | |||
| 921 | /* Write NBYTES bytes from BUFFER to device SD. */ | 900 | /* Write NBYTES bytes from BUFFER to device SD. */ |
| 922 | 901 | ||
| 923 | static void | 902 | static void |
| 924 | vox_write (sd, buffer, nbytes) | 903 | vox_write (struct sound_device *sd, const char *buffer, int nbytes) |
| 925 | struct sound_device *sd; | ||
| 926 | const char *buffer; | ||
| 927 | int nbytes; | ||
| 928 | { | 904 | { |
| 929 | int nwritten = emacs_write (sd->fd, buffer, nbytes); | 905 | int nwritten = emacs_write (sd->fd, buffer, nbytes); |
| 930 | if (nwritten < 0) | 906 | if (nwritten < 0) |
| @@ -939,9 +915,7 @@ vox_write (sd, buffer, nbytes) | |||
| 939 | /* This driver is available on GNU/Linux. */ | 915 | /* This driver is available on GNU/Linux. */ |
| 940 | 916 | ||
| 941 | static void | 917 | static void |
| 942 | alsa_sound_perror (msg, err) | 918 | alsa_sound_perror (char *msg, int err) |
| 943 | char *msg; | ||
| 944 | int err; | ||
| 945 | { | 919 | { |
| 946 | error ("%s: %s", msg, snd_strerror (err)); | 920 | error ("%s: %s", msg, snd_strerror (err)); |
| 947 | } | 921 | } |
| @@ -958,8 +932,7 @@ struct alsa_params | |||
| 958 | otherwise use a default device name. */ | 932 | otherwise use a default device name. */ |
| 959 | 933 | ||
| 960 | static void | 934 | static void |
| 961 | alsa_open (sd) | 935 | alsa_open (struct sound_device *sd) |
| 962 | struct sound_device *sd; | ||
| 963 | { | 936 | { |
| 964 | char *file; | 937 | char *file; |
| 965 | struct alsa_params *p; | 938 | struct alsa_params *p; |
| @@ -986,8 +959,7 @@ alsa_open (sd) | |||
| 986 | } | 959 | } |
| 987 | 960 | ||
| 988 | static int | 961 | static int |
| 989 | alsa_period_size (sd) | 962 | alsa_period_size (struct sound_device *sd) |
| 990 | struct sound_device *sd; | ||
| 991 | { | 963 | { |
| 992 | struct alsa_params *p = (struct alsa_params *) sd->data; | 964 | struct alsa_params *p = (struct alsa_params *) sd->data; |
| 993 | int fact = snd_pcm_format_size (sd->format, 1) * sd->channels; | 965 | int fact = snd_pcm_format_size (sd->format, 1) * sd->channels; |
| @@ -995,8 +967,7 @@ alsa_period_size (sd) | |||
| 995 | } | 967 | } |
| 996 | 968 | ||
| 997 | static void | 969 | static void |
| 998 | alsa_configure (sd) | 970 | alsa_configure (struct sound_device *sd) |
| 999 | struct sound_device *sd; | ||
| 1000 | { | 971 | { |
| 1001 | int val, err, dir; | 972 | int val, err, dir; |
| 1002 | unsigned uval; | 973 | unsigned uval; |
| @@ -1115,8 +1086,7 @@ alsa_configure (sd) | |||
| 1115 | /* Close device SD if it is open. */ | 1086 | /* Close device SD if it is open. */ |
| 1116 | 1087 | ||
| 1117 | static void | 1088 | static void |
| 1118 | alsa_close (sd) | 1089 | alsa_close (struct sound_device *sd) |
| 1119 | struct sound_device *sd; | ||
| 1120 | { | 1090 | { |
| 1121 | struct alsa_params *p = (struct alsa_params *) sd->data; | 1091 | struct alsa_params *p = (struct alsa_params *) sd->data; |
| 1122 | if (p) | 1092 | if (p) |
| @@ -1137,9 +1107,7 @@ alsa_close (sd) | |||
| 1137 | /* Choose device-dependent format for device SD from sound file S. */ | 1107 | /* Choose device-dependent format for device SD from sound file S. */ |
| 1138 | 1108 | ||
| 1139 | static void | 1109 | static void |
| 1140 | alsa_choose_format (sd, s) | 1110 | alsa_choose_format (struct sound_device *sd, struct sound *s) |
| 1141 | struct sound_device *sd; | ||
| 1142 | struct sound *s; | ||
| 1143 | { | 1111 | { |
| 1144 | struct alsa_params *p = (struct alsa_params *) sd->data; | 1112 | struct alsa_params *p = (struct alsa_params *) sd->data; |
| 1145 | if (s->type == RIFF) | 1113 | if (s->type == RIFF) |
| @@ -1194,10 +1162,7 @@ alsa_choose_format (sd, s) | |||
| 1194 | /* Write NBYTES bytes from BUFFER to device SD. */ | 1162 | /* Write NBYTES bytes from BUFFER to device SD. */ |
| 1195 | 1163 | ||
| 1196 | static void | 1164 | static void |
| 1197 | alsa_write (sd, buffer, nbytes) | 1165 | alsa_write (struct sound_device *sd, const char *buffer, int nbytes) |
| 1198 | struct sound_device *sd; | ||
| 1199 | const char *buffer; | ||
| 1200 | int nbytes; | ||
| 1201 | { | 1166 | { |
| 1202 | struct alsa_params *p = (struct alsa_params *) sd->data; | 1167 | struct alsa_params *p = (struct alsa_params *) sd->data; |
| 1203 | 1168 | ||
| @@ -1244,12 +1209,7 @@ alsa_write (sd, buffer, nbytes) | |||
| 1244 | } | 1209 | } |
| 1245 | 1210 | ||
| 1246 | static void | 1211 | static void |
| 1247 | snd_error_quiet (file, line, function, err, fmt) | 1212 | snd_error_quiet (const char *file, int line, const char *function, int err, const char *fmt) |
| 1248 | const char *file; | ||
| 1249 | int line; | ||
| 1250 | const char *function; | ||
| 1251 | int err; | ||
| 1252 | const char *fmt; | ||
| 1253 | { | 1213 | { |
| 1254 | } | 1214 | } |
| 1255 | 1215 | ||
| @@ -1257,8 +1217,7 @@ snd_error_quiet (file, line, function, err, fmt) | |||
| 1257 | structure. */ | 1217 | structure. */ |
| 1258 | 1218 | ||
| 1259 | static int | 1219 | static int |
| 1260 | alsa_init (sd) | 1220 | alsa_init (struct sound_device *sd) |
| 1261 | struct sound_device *sd; | ||
| 1262 | { | 1221 | { |
| 1263 | char *file; | 1222 | char *file; |
| 1264 | snd_pcm_t *handle; | 1223 | snd_pcm_t *handle; |
| @@ -1524,7 +1483,7 @@ Internal use only, use `play-sound' instead. */) | |||
| 1524 | ***********************************************************************/ | 1483 | ***********************************************************************/ |
| 1525 | 1484 | ||
| 1526 | void | 1485 | void |
| 1527 | syms_of_sound () | 1486 | syms_of_sound (void) |
| 1528 | { | 1487 | { |
| 1529 | QCdevice = intern_c_string(":device"); | 1488 | QCdevice = intern_c_string(":device"); |
| 1530 | staticpro (&QCdevice); | 1489 | staticpro (&QCdevice); |
| @@ -1540,7 +1499,7 @@ syms_of_sound () | |||
| 1540 | 1499 | ||
| 1541 | 1500 | ||
| 1542 | void | 1501 | void |
| 1543 | init_sound () | 1502 | init_sound (void) |
| 1544 | { | 1503 | { |
| 1545 | } | 1504 | } |
| 1546 | 1505 | ||
diff --git a/src/strftime.c b/src/strftime.c index a7617427793..e07d89fb509 100644 --- a/src/strftime.c +++ b/src/strftime.c | |||
| @@ -367,11 +367,7 @@ static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, | |||
| 367 | size_t len LOCALE_PARAM_PROTO); | 367 | size_t len LOCALE_PARAM_PROTO); |
| 368 | 368 | ||
| 369 | static CHAR_T * | 369 | static CHAR_T * |
| 370 | memcpy_lowcase (dest, src, len LOCALE_PARAM) | 370 | memcpy_lowcase (char *dest, const char *src, size_t len) |
| 371 | CHAR_T *dest; | ||
| 372 | const CHAR_T *src; | ||
| 373 | size_t len; | ||
| 374 | LOCALE_PARAM_DECL | ||
| 375 | { | 371 | { |
| 376 | while (len-- > 0) | 372 | while (len-- > 0) |
| 377 | dest[len] = TOLOWER ((UCHAR_T) src[len], loc); | 373 | dest[len] = TOLOWER ((UCHAR_T) src[len], loc); |
| @@ -382,11 +378,7 @@ static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, | |||
| 382 | size_t len LOCALE_PARAM_PROTO); | 378 | size_t len LOCALE_PARAM_PROTO); |
| 383 | 379 | ||
| 384 | static CHAR_T * | 380 | static CHAR_T * |
| 385 | memcpy_uppcase (dest, src, len LOCALE_PARAM) | 381 | memcpy_uppcase (char *dest, const char *src, size_t len) |
| 386 | CHAR_T *dest; | ||
| 387 | const CHAR_T *src; | ||
| 388 | size_t len; | ||
| 389 | LOCALE_PARAM_DECL | ||
| 390 | { | 382 | { |
| 391 | while (len-- > 0) | 383 | while (len-- > 0) |
| 392 | dest[len] = TOUPPER ((UCHAR_T) src[len], loc); | 384 | dest[len] = TOUPPER ((UCHAR_T) src[len], loc); |
| @@ -437,9 +429,7 @@ static int iso_week_days (int, int); | |||
| 437 | __inline__ | 429 | __inline__ |
| 438 | #endif | 430 | #endif |
| 439 | static int | 431 | static int |
| 440 | iso_week_days (yday, wday) | 432 | iso_week_days (int yday, int wday) |
| 441 | int yday; | ||
| 442 | int wday; | ||
| 443 | { | 433 | { |
| 444 | /* Add enough to the first operand of % to make it nonnegative. */ | 434 | /* Add enough to the first operand of % to make it nonnegative. */ |
| 445 | int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; | 435 | int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; |
| @@ -1474,12 +1464,7 @@ libc_hidden_def (my_strftime) | |||
| 1474 | /* For Emacs we have a separate interface which corresponds to the normal | 1464 | /* For Emacs we have a separate interface which corresponds to the normal |
| 1475 | strftime function plus the ut argument, but without the ns argument. */ | 1465 | strftime function plus the ut argument, but without the ns argument. */ |
| 1476 | size_t | 1466 | size_t |
| 1477 | emacs_strftimeu (s, maxsize, format, tp, ut) | 1467 | emacs_strftimeu (char *s, size_t maxsize, const char *format, const struct tm *tp, int ut) |
| 1478 | char *s; | ||
| 1479 | size_t maxsize; | ||
| 1480 | const char *format; | ||
| 1481 | const struct tm *tp; | ||
| 1482 | int ut; | ||
| 1483 | { | 1468 | { |
| 1484 | return my_strftime (s, maxsize, format, tp, ut, 0); | 1469 | return my_strftime (s, maxsize, format, tp, ut, 0); |
| 1485 | } | 1470 | } |
diff --git a/src/syntax.c b/src/syntax.c index 4cead52f958..22620219335 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -109,7 +109,7 @@ static int in_classes (int, Lisp_Object); | |||
| 109 | 109 | ||
| 110 | struct gl_state_s gl_state; /* Global state of syntax parser. */ | 110 | struct gl_state_s gl_state; /* Global state of syntax parser. */ |
| 111 | 111 | ||
| 112 | INTERVAL interval_of (); | 112 | INTERVAL interval_of (int, Lisp_Object); |
| 113 | #define INTERVALS_AT_ONCE 10 /* 1 + max-number of intervals | 113 | #define INTERVALS_AT_ONCE 10 /* 1 + max-number of intervals |
| 114 | to scan to property-change. */ | 114 | to scan to property-change. */ |
| 115 | 115 | ||
| @@ -127,9 +127,7 @@ INTERVAL interval_of (); | |||
| 127 | start/end of OBJECT. */ | 127 | start/end of OBJECT. */ |
| 128 | 128 | ||
| 129 | void | 129 | void |
| 130 | update_syntax_table (charpos, count, init, object) | 130 | update_syntax_table (int charpos, int count, int init, Lisp_Object object) |
| 131 | int charpos, count, init; | ||
| 132 | Lisp_Object object; | ||
| 133 | { | 131 | { |
| 134 | Lisp_Object tmp_table; | 132 | Lisp_Object tmp_table; |
| 135 | int cnt = 0, invalidate = 1; | 133 | int cnt = 0, invalidate = 1; |
| @@ -318,8 +316,7 @@ char_quoted (EMACS_INT charpos, EMACS_INT bytepos) | |||
| 318 | We assume that BYTEPOS is not at the end of the buffer. */ | 316 | We assume that BYTEPOS is not at the end of the buffer. */ |
| 319 | 317 | ||
| 320 | INLINE EMACS_INT | 318 | INLINE EMACS_INT |
| 321 | inc_bytepos (bytepos) | 319 | inc_bytepos (EMACS_INT bytepos) |
| 322 | EMACS_INT bytepos; | ||
| 323 | { | 320 | { |
| 324 | if (NILP (current_buffer->enable_multibyte_characters)) | 321 | if (NILP (current_buffer->enable_multibyte_characters)) |
| 325 | return bytepos + 1; | 322 | return bytepos + 1; |
| @@ -332,8 +329,7 @@ inc_bytepos (bytepos) | |||
| 332 | We assume that BYTEPOS is not at the start of the buffer. */ | 329 | We assume that BYTEPOS is not at the start of the buffer. */ |
| 333 | 330 | ||
| 334 | INLINE EMACS_INT | 331 | INLINE EMACS_INT |
| 335 | dec_bytepos (bytepos) | 332 | dec_bytepos (EMACS_INT bytepos) |
| 336 | EMACS_INT bytepos; | ||
| 337 | { | 333 | { |
| 338 | if (NILP (current_buffer->enable_multibyte_characters)) | 334 | if (NILP (current_buffer->enable_multibyte_characters)) |
| 339 | return bytepos - 1; | 335 | return bytepos - 1; |
| @@ -357,8 +353,7 @@ dec_bytepos (bytepos) | |||
| 357 | update the global data. */ | 353 | update the global data. */ |
| 358 | 354 | ||
| 359 | static EMACS_INT | 355 | static EMACS_INT |
| 360 | find_defun_start (pos, pos_byte) | 356 | find_defun_start (EMACS_INT pos, EMACS_INT pos_byte) |
| 361 | EMACS_INT pos, pos_byte; | ||
| 362 | { | 357 | { |
| 363 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; | 358 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; |
| 364 | 359 | ||
| @@ -422,8 +417,7 @@ find_defun_start (pos, pos_byte) | |||
| 422 | /* Return the SYNTAX_COMEND_FIRST of the character before POS, POS_BYTE. */ | 417 | /* Return the SYNTAX_COMEND_FIRST of the character before POS, POS_BYTE. */ |
| 423 | 418 | ||
| 424 | static int | 419 | static int |
| 425 | prev_char_comend_first (pos, pos_byte) | 420 | prev_char_comend_first (int pos, int pos_byte) |
| 426 | int pos, pos_byte; | ||
| 427 | { | 421 | { |
| 428 | int c, val; | 422 | int c, val; |
| 429 | 423 | ||
| @@ -465,10 +459,7 @@ prev_char_comend_first (pos, pos_byte) | |||
| 465 | the returned value (or at FROM, if the search was not successful). */ | 459 | the returned value (or at FROM, if the search was not successful). */ |
| 466 | 460 | ||
| 467 | static int | 461 | static int |
| 468 | back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_ptr) | 462 | back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested, int comstyle, EMACS_INT *charpos_ptr, EMACS_INT *bytepos_ptr) |
| 469 | EMACS_INT from, from_byte, stop; | ||
| 470 | int comnested, comstyle; | ||
| 471 | EMACS_INT *charpos_ptr, *bytepos_ptr; | ||
| 472 | { | 463 | { |
| 473 | /* Look back, counting the parity of string-quotes, | 464 | /* Look back, counting the parity of string-quotes, |
| 474 | and recording the comment-starters seen. | 465 | and recording the comment-starters seen. |
| @@ -740,8 +731,7 @@ Currently, any char-table counts as a syntax table. */) | |||
| 740 | } | 731 | } |
| 741 | 732 | ||
| 742 | static void | 733 | static void |
| 743 | check_syntax_table (obj) | 734 | check_syntax_table (Lisp_Object obj) |
| 744 | Lisp_Object obj; | ||
| 745 | { | 735 | { |
| 746 | CHECK_TYPE (CHAR_TABLE_P (obj) && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table), | 736 | CHECK_TYPE (CHAR_TABLE_P (obj) && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table), |
| 747 | Qsyntax_table_p, obj); | 737 | Qsyntax_table_p, obj); |
| @@ -1185,8 +1175,7 @@ Lisp_Object Vfind_word_boundary_function_table; | |||
| 1185 | COUNT negative means scan backward and stop at word beginning. */ | 1175 | COUNT negative means scan backward and stop at word beginning. */ |
| 1186 | 1176 | ||
| 1187 | int | 1177 | int |
| 1188 | scan_words (from, count) | 1178 | scan_words (register int from, register int count) |
| 1189 | register int from, count; | ||
| 1190 | { | 1179 | { |
| 1191 | register int beg = BEGV; | 1180 | register int beg = BEGV; |
| 1192 | register int end = ZV; | 1181 | register int end = ZV; |
| @@ -1395,10 +1384,7 @@ This function returns the distance traveled, either zero or negative. */) | |||
| 1395 | } | 1384 | } |
| 1396 | 1385 | ||
| 1397 | static Lisp_Object | 1386 | static Lisp_Object |
| 1398 | skip_chars (forwardp, string, lim, handle_iso_classes) | 1387 | skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_classes) |
| 1399 | int forwardp; | ||
| 1400 | Lisp_Object string, lim; | ||
| 1401 | int handle_iso_classes; | ||
| 1402 | { | 1388 | { |
| 1403 | register unsigned int c; | 1389 | register unsigned int c; |
| 1404 | unsigned char fastmap[0400]; | 1390 | unsigned char fastmap[0400]; |
| @@ -1892,9 +1878,7 @@ skip_chars (forwardp, string, lim, handle_iso_classes) | |||
| 1892 | 1878 | ||
| 1893 | 1879 | ||
| 1894 | static Lisp_Object | 1880 | static Lisp_Object |
| 1895 | skip_syntaxes (forwardp, string, lim) | 1881 | skip_syntaxes (int forwardp, Lisp_Object string, Lisp_Object lim) |
| 1896 | int forwardp; | ||
| 1897 | Lisp_Object string, lim; | ||
| 1898 | { | 1882 | { |
| 1899 | register unsigned int c; | 1883 | register unsigned int c; |
| 1900 | unsigned char fastmap[0400]; | 1884 | unsigned char fastmap[0400]; |
| @@ -2067,9 +2051,7 @@ skip_syntaxes (forwardp, string, lim) | |||
| 2067 | integer which is its type according to re_wctype. */ | 2051 | integer which is its type according to re_wctype. */ |
| 2068 | 2052 | ||
| 2069 | static int | 2053 | static int |
| 2070 | in_classes (c, iso_classes) | 2054 | in_classes (int c, Lisp_Object iso_classes) |
| 2071 | int c; | ||
| 2072 | Lisp_Object iso_classes; | ||
| 2073 | { | 2055 | { |
| 2074 | int fits_class = 0; | 2056 | int fits_class = 0; |
| 2075 | 2057 | ||
| @@ -2422,10 +2404,7 @@ between them, return t; otherwise return nil. */) | |||
| 2422 | ? SYNTAX (c) : Ssymbol) | 2404 | ? SYNTAX (c) : Ssymbol) |
| 2423 | 2405 | ||
| 2424 | static Lisp_Object | 2406 | static Lisp_Object |
| 2425 | scan_lists (from, count, depth, sexpflag) | 2407 | scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpflag) |
| 2426 | register EMACS_INT from; | ||
| 2427 | EMACS_INT count, depth; | ||
| 2428 | int sexpflag; | ||
| 2429 | { | 2408 | { |
| 2430 | Lisp_Object val; | 2409 | Lisp_Object val; |
| 2431 | register EMACS_INT stop = count > 0 ? ZV : BEGV; | 2410 | register EMACS_INT stop = count > 0 ? ZV : BEGV; |
| @@ -3324,7 +3303,7 @@ Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. | |||
| 3324 | } | 3303 | } |
| 3325 | 3304 | ||
| 3326 | void | 3305 | void |
| 3327 | init_syntax_once () | 3306 | init_syntax_once (void) |
| 3328 | { | 3307 | { |
| 3329 | register int i, c; | 3308 | register int i, c; |
| 3330 | Lisp_Object temp; | 3309 | Lisp_Object temp; |
| @@ -3414,7 +3393,7 @@ init_syntax_once () | |||
| 3414 | } | 3393 | } |
| 3415 | 3394 | ||
| 3416 | void | 3395 | void |
| 3417 | syms_of_syntax () | 3396 | syms_of_syntax (void) |
| 3418 | { | 3397 | { |
| 3419 | Qsyntax_table_p = intern_c_string ("syntax-table-p"); | 3398 | Qsyntax_table_p = intern_c_string ("syntax-table-p"); |
| 3420 | staticpro (&Qsyntax_table_p); | 3399 | staticpro (&Qsyntax_table_p); |
diff --git a/src/sysdep.c b/src/sysdep.c index a026cd014a2..60da786c04d 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -254,7 +254,7 @@ get_current_dir_name () | |||
| 254 | /* Discard pending input on all input descriptors. */ | 254 | /* Discard pending input on all input descriptors. */ |
| 255 | 255 | ||
| 256 | void | 256 | void |
| 257 | discard_tty_input () | 257 | discard_tty_input (void) |
| 258 | { | 258 | { |
| 259 | #ifndef WINDOWSNT | 259 | #ifndef WINDOWSNT |
| 260 | struct emacs_tty buf; | 260 | struct emacs_tty buf; |
| @@ -353,8 +353,7 @@ init_baud_rate (int fd) | |||
| 353 | 353 | ||
| 354 | /*ARGSUSED*/ | 354 | /*ARGSUSED*/ |
| 355 | void | 355 | void |
| 356 | set_exclusive_use (fd) | 356 | set_exclusive_use (int fd) |
| 357 | int fd; | ||
| 358 | { | 357 | { |
| 359 | #ifdef FIOCLEX | 358 | #ifdef FIOCLEX |
| 360 | ioctl (fd, FIOCLEX, 0); | 359 | ioctl (fd, FIOCLEX, 0); |
| @@ -376,15 +375,14 @@ int wait_debugging; /* Set nonzero to make following function work under dbx | |||
| 376 | (at least for bsd). */ | 375 | (at least for bsd). */ |
| 377 | 376 | ||
| 378 | SIGTYPE | 377 | SIGTYPE |
| 379 | wait_for_termination_signal () | 378 | wait_for_termination_signal (void) |
| 380 | {} | 379 | {} |
| 381 | 380 | ||
| 382 | /* Wait for subprocess with process id `pid' to terminate and | 381 | /* Wait for subprocess with process id `pid' to terminate and |
| 383 | make sure it will get eliminated (not remain forever as a zombie) */ | 382 | make sure it will get eliminated (not remain forever as a zombie) */ |
| 384 | 383 | ||
| 385 | void | 384 | void |
| 386 | wait_for_termination (pid) | 385 | wait_for_termination (int pid) |
| 387 | int pid; | ||
| 388 | { | 386 | { |
| 389 | while (1) | 387 | while (1) |
| 390 | { | 388 | { |
| @@ -438,8 +436,7 @@ wait_for_termination (pid) | |||
| 438 | */ | 436 | */ |
| 439 | 437 | ||
| 440 | void | 438 | void |
| 441 | flush_pending_output (channel) | 439 | flush_pending_output (int channel) |
| 442 | int channel; | ||
| 443 | { | 440 | { |
| 444 | #ifdef HAVE_TERMIOS | 441 | #ifdef HAVE_TERMIOS |
| 445 | /* If we try this, we get hit with SIGTTIN, because | 442 | /* If we try this, we get hit with SIGTTIN, because |
| @@ -465,8 +462,7 @@ flush_pending_output (channel) | |||
| 465 | in Emacs. No padding needed for insertion into an Emacs buffer. */ | 462 | in Emacs. No padding needed for insertion into an Emacs buffer. */ |
| 466 | 463 | ||
| 467 | void | 464 | void |
| 468 | child_setup_tty (out) | 465 | child_setup_tty (int out) |
| 469 | int out; | ||
| 470 | { | 466 | { |
| 471 | #ifndef DOS_NT | 467 | #ifndef DOS_NT |
| 472 | struct emacs_tty s; | 468 | struct emacs_tty s; |
| @@ -570,7 +566,7 @@ static void restore_signal_handlers (struct save_signal *); | |||
| 570 | /* Suspend the Emacs process; give terminal to its superior. */ | 566 | /* Suspend the Emacs process; give terminal to its superior. */ |
| 571 | 567 | ||
| 572 | void | 568 | void |
| 573 | sys_suspend () | 569 | sys_suspend (void) |
| 574 | { | 570 | { |
| 575 | #if defined (SIGTSTP) && !defined (MSDOS) | 571 | #if defined (SIGTSTP) && !defined (MSDOS) |
| 576 | 572 | ||
| @@ -591,7 +587,7 @@ sys_suspend () | |||
| 591 | /* Fork a subshell. */ | 587 | /* Fork a subshell. */ |
| 592 | 588 | ||
| 593 | void | 589 | void |
| 594 | sys_subshell () | 590 | sys_subshell (void) |
| 595 | { | 591 | { |
| 596 | #ifdef DOS_NT /* Demacs 1.1.2 91/10/20 Manabu Higashida */ | 592 | #ifdef DOS_NT /* Demacs 1.1.2 91/10/20 Manabu Higashida */ |
| 597 | int st; | 593 | int st; |
| @@ -719,8 +715,7 @@ sys_subshell () | |||
| 719 | } | 715 | } |
| 720 | 716 | ||
| 721 | static void | 717 | static void |
| 722 | save_signal_handlers (saved_handlers) | 718 | save_signal_handlers (struct save_signal *saved_handlers) |
| 723 | struct save_signal *saved_handlers; | ||
| 724 | { | 719 | { |
| 725 | while (saved_handlers->code) | 720 | while (saved_handlers->code) |
| 726 | { | 721 | { |
| @@ -731,8 +726,7 @@ save_signal_handlers (saved_handlers) | |||
| 731 | } | 726 | } |
| 732 | 727 | ||
| 733 | static void | 728 | static void |
| 734 | restore_signal_handlers (saved_handlers) | 729 | restore_signal_handlers (struct save_signal *saved_handlers) |
| 735 | struct save_signal *saved_handlers; | ||
| 736 | { | 730 | { |
| 737 | while (saved_handlers->code) | 731 | while (saved_handlers->code) |
| 738 | { | 732 | { |
| @@ -769,8 +763,7 @@ unrequest_sigio (void) | |||
| 769 | int old_fcntl_flags[MAXDESC]; | 763 | int old_fcntl_flags[MAXDESC]; |
| 770 | 764 | ||
| 771 | void | 765 | void |
| 772 | init_sigio (fd) | 766 | init_sigio (int fd) |
| 773 | int fd; | ||
| 774 | { | 767 | { |
| 775 | #ifdef FASYNC | 768 | #ifdef FASYNC |
| 776 | old_fcntl_flags[fd] = fcntl (fd, F_GETFL, 0) & ~FASYNC; | 769 | old_fcntl_flags[fd] = fcntl (fd, F_GETFL, 0) & ~FASYNC; |
| @@ -780,8 +773,7 @@ init_sigio (fd) | |||
| 780 | } | 773 | } |
| 781 | 774 | ||
| 782 | void | 775 | void |
| 783 | reset_sigio (fd) | 776 | reset_sigio (int fd) |
| 784 | int fd; | ||
| 785 | { | 777 | { |
| 786 | #ifdef FASYNC | 778 | #ifdef FASYNC |
| 787 | fcntl (fd, F_SETFL, old_fcntl_flags[fd]); | 779 | fcntl (fd, F_SETFL, old_fcntl_flags[fd]); |
| @@ -793,7 +785,7 @@ reset_sigio (fd) | |||
| 793 | /* XXX Yeah, but you need it for SIGIO, don't you? */ | 785 | /* XXX Yeah, but you need it for SIGIO, don't you? */ |
| 794 | 786 | ||
| 795 | void | 787 | void |
| 796 | request_sigio () | 788 | request_sigio (void) |
| 797 | { | 789 | { |
| 798 | if (noninteractive) | 790 | if (noninteractive) |
| 799 | return; | 791 | return; |
| @@ -857,9 +849,7 @@ unrequest_sigio () | |||
| 857 | Return zero if all's well, or -1 if we ran into an error we | 849 | Return zero if all's well, or -1 if we ran into an error we |
| 858 | couldn't deal with. */ | 850 | couldn't deal with. */ |
| 859 | int | 851 | int |
| 860 | emacs_get_tty (fd, settings) | 852 | emacs_get_tty (int fd, struct emacs_tty *settings) |
| 861 | int fd; | ||
| 862 | struct emacs_tty *settings; | ||
| 863 | { | 853 | { |
| 864 | /* Retrieve the primary parameters - baud rate, character size, etcetera. */ | 854 | /* Retrieve the primary parameters - baud rate, character size, etcetera. */ |
| 865 | #ifdef HAVE_TCATTR | 855 | #ifdef HAVE_TCATTR |
| @@ -906,10 +896,7 @@ emacs_get_tty (fd, settings) | |||
| 906 | Return 0 if all went well, and -1 if anything failed. */ | 896 | Return 0 if all went well, and -1 if anything failed. */ |
| 907 | 897 | ||
| 908 | int | 898 | int |
| 909 | emacs_set_tty (fd, settings, flushp) | 899 | emacs_set_tty (int fd, struct emacs_tty *settings, int flushp) |
| 910 | int fd; | ||
| 911 | struct emacs_tty *settings; | ||
| 912 | int flushp; | ||
| 913 | { | 900 | { |
| 914 | /* Set the primary parameters - baud rate, character size, etcetera. */ | 901 | /* Set the primary parameters - baud rate, character size, etcetera. */ |
| 915 | #ifdef HAVE_TCATTR | 902 | #ifdef HAVE_TCATTR |
| @@ -1021,8 +1008,7 @@ init_all_sys_modes (void) | |||
| 1021 | /* Initialize the terminal mode on the given tty device. */ | 1008 | /* Initialize the terminal mode on the given tty device. */ |
| 1022 | 1009 | ||
| 1023 | void | 1010 | void |
| 1024 | init_sys_modes (tty_out) | 1011 | init_sys_modes (struct tty_display_info *tty_out) |
| 1025 | struct tty_display_info *tty_out; | ||
| 1026 | { | 1012 | { |
| 1027 | struct emacs_tty tty; | 1013 | struct emacs_tty tty; |
| 1028 | 1014 | ||
| @@ -1365,8 +1351,7 @@ get_tty_size (int fd, int *widthp, int *heightp) | |||
| 1365 | to HEIGHT and WIDTH. This is used mainly with ptys. */ | 1351 | to HEIGHT and WIDTH. This is used mainly with ptys. */ |
| 1366 | 1352 | ||
| 1367 | int | 1353 | int |
| 1368 | set_window_size (fd, height, width) | 1354 | set_window_size (int fd, int height, int width) |
| 1369 | int fd, height, width; | ||
| 1370 | { | 1355 | { |
| 1371 | #ifdef TIOCSWINSZ | 1356 | #ifdef TIOCSWINSZ |
| 1372 | 1357 | ||
| @@ -1414,8 +1399,7 @@ reset_all_sys_modes (void) | |||
| 1414 | bottom of the frame, turn off interrupt-driven I/O, etc. */ | 1399 | bottom of the frame, turn off interrupt-driven I/O, etc. */ |
| 1415 | 1400 | ||
| 1416 | void | 1401 | void |
| 1417 | reset_sys_modes (tty_out) | 1402 | reset_sys_modes (struct tty_display_info *tty_out) |
| 1418 | struct tty_display_info *tty_out; | ||
| 1419 | { | 1403 | { |
| 1420 | if (noninteractive) | 1404 | if (noninteractive) |
| 1421 | { | 1405 | { |
| @@ -1490,8 +1474,7 @@ reset_sys_modes (tty_out) | |||
| 1490 | /* Set up the proper status flags for use of a pty. */ | 1474 | /* Set up the proper status flags for use of a pty. */ |
| 1491 | 1475 | ||
| 1492 | void | 1476 | void |
| 1493 | setup_pty (fd) | 1477 | setup_pty (int fd) |
| 1494 | int fd; | ||
| 1495 | { | 1478 | { |
| 1496 | /* I'm told that TOICREMOTE does not mean control chars | 1479 | /* I'm told that TOICREMOTE does not mean control chars |
| 1497 | "can't be sent" but rather that they don't have | 1480 | "can't be sent" but rather that they don't have |
| @@ -1540,7 +1523,7 @@ setup_pty (fd) | |||
| 1540 | #if !(defined (__NetBSD__) && defined (__ELF__)) | 1523 | #if !(defined (__NetBSD__) && defined (__ELF__)) |
| 1541 | #ifndef HAVE_TEXT_START | 1524 | #ifndef HAVE_TEXT_START |
| 1542 | char * | 1525 | char * |
| 1543 | start_of_text () | 1526 | start_of_text (void) |
| 1544 | { | 1527 | { |
| 1545 | #ifdef TEXT_START | 1528 | #ifdef TEXT_START |
| 1546 | return ((char *) TEXT_START); | 1529 | return ((char *) TEXT_START); |
| @@ -1580,7 +1563,7 @@ start_of_text () | |||
| 1580 | 1563 | ||
| 1581 | #ifndef start_of_data | 1564 | #ifndef start_of_data |
| 1582 | char * | 1565 | char * |
| 1583 | start_of_data () | 1566 | start_of_data (void) |
| 1584 | { | 1567 | { |
| 1585 | #ifdef DATA_START | 1568 | #ifdef DATA_START |
| 1586 | return ((char *) DATA_START); | 1569 | return ((char *) DATA_START); |
| @@ -1621,7 +1604,7 @@ extern int h_errno; | |||
| 1621 | #endif /* TRY_AGAIN */ | 1604 | #endif /* TRY_AGAIN */ |
| 1622 | 1605 | ||
| 1623 | void | 1606 | void |
| 1624 | init_system_name () | 1607 | init_system_name (void) |
| 1625 | { | 1608 | { |
| 1626 | #ifndef HAVE_GETHOSTNAME | 1609 | #ifndef HAVE_GETHOSTNAME |
| 1627 | struct utsname uts; | 1610 | struct utsname uts; |
| @@ -2077,7 +2060,7 @@ static char *my_sys_siglist[NSIG]; | |||
| 2077 | #endif | 2060 | #endif |
| 2078 | 2061 | ||
| 2079 | void | 2062 | void |
| 2080 | init_signals () | 2063 | init_signals (void) |
| 2081 | { | 2064 | { |
| 2082 | sigemptyset (&empty_mask); | 2065 | sigemptyset (&empty_mask); |
| 2083 | sigfillset (&full_mask); | 2066 | sigfillset (&full_mask); |
| @@ -2283,8 +2266,7 @@ init_signals () | |||
| 2283 | #endif /* !RAND_BITS */ | 2266 | #endif /* !RAND_BITS */ |
| 2284 | 2267 | ||
| 2285 | void | 2268 | void |
| 2286 | seed_random (arg) | 2269 | seed_random (long int arg) |
| 2287 | long arg; | ||
| 2288 | { | 2270 | { |
| 2289 | #ifdef HAVE_RANDOM | 2271 | #ifdef HAVE_RANDOM |
| 2290 | srandom ((unsigned int)arg); | 2272 | srandom ((unsigned int)arg); |
| @@ -2302,7 +2284,7 @@ seed_random (arg) | |||
| 2302 | * This suffices even for a 64-bit architecture with a 15-bit rand. | 2284 | * This suffices even for a 64-bit architecture with a 15-bit rand. |
| 2303 | */ | 2285 | */ |
| 2304 | long | 2286 | long |
| 2305 | get_random () | 2287 | get_random (void) |
| 2306 | { | 2288 | { |
| 2307 | long val = random (); | 2289 | long val = random (); |
| 2308 | #if VALBITS > RAND_BITS | 2290 | #if VALBITS > RAND_BITS |
| @@ -2337,9 +2319,7 @@ strerror (errnum) | |||
| 2337 | #endif /* ! HAVE_STRERROR */ | 2319 | #endif /* ! HAVE_STRERROR */ |
| 2338 | 2320 | ||
| 2339 | int | 2321 | int |
| 2340 | emacs_open (path, oflag, mode) | 2322 | emacs_open (const char *path, int oflag, int mode) |
| 2341 | const char *path; | ||
| 2342 | int oflag, mode; | ||
| 2343 | { | 2323 | { |
| 2344 | register int rtnval; | 2324 | register int rtnval; |
| 2345 | 2325 | ||
| @@ -2350,8 +2330,7 @@ emacs_open (path, oflag, mode) | |||
| 2350 | } | 2330 | } |
| 2351 | 2331 | ||
| 2352 | int | 2332 | int |
| 2353 | emacs_close (fd) | 2333 | emacs_close (int fd) |
| 2354 | int fd; | ||
| 2355 | { | 2334 | { |
| 2356 | int did_retry = 0; | 2335 | int did_retry = 0; |
| 2357 | register int rtnval; | 2336 | register int rtnval; |
| @@ -2370,10 +2349,7 @@ emacs_close (fd) | |||
| 2370 | } | 2349 | } |
| 2371 | 2350 | ||
| 2372 | int | 2351 | int |
| 2373 | emacs_read (fildes, buf, nbyte) | 2352 | emacs_read (int fildes, char *buf, unsigned int nbyte) |
| 2374 | int fildes; | ||
| 2375 | char *buf; | ||
| 2376 | unsigned int nbyte; | ||
| 2377 | { | 2353 | { |
| 2378 | register int rtnval; | 2354 | register int rtnval; |
| 2379 | 2355 | ||
| @@ -2384,10 +2360,7 @@ emacs_read (fildes, buf, nbyte) | |||
| 2384 | } | 2360 | } |
| 2385 | 2361 | ||
| 2386 | int | 2362 | int |
| 2387 | emacs_write (fildes, buf, nbyte) | 2363 | emacs_write (int fildes, const char *buf, unsigned int nbyte) |
| 2388 | int fildes; | ||
| 2389 | const char *buf; | ||
| 2390 | unsigned int nbyte; | ||
| 2391 | { | 2364 | { |
| 2392 | register int rtnval, bytes_written; | 2365 | register int rtnval, bytes_written; |
| 2393 | 2366 | ||
| @@ -2574,8 +2547,7 @@ gettimeofday (tp, tzp) | |||
| 2574 | */ | 2547 | */ |
| 2575 | 2548 | ||
| 2576 | void | 2549 | void |
| 2577 | croak (badfunc) | 2550 | croak (char *badfunc) |
| 2578 | char *badfunc; | ||
| 2579 | { | 2551 | { |
| 2580 | printf ("%s not yet implemented\r\n", badfunc); | 2552 | printf ("%s not yet implemented\r\n", badfunc); |
| 2581 | reset_all_sys_modes (); | 2553 | reset_all_sys_modes (); |
| @@ -2607,9 +2579,7 @@ closedir (DIR *dirp /* stream from opendir */) | |||
| 2607 | 2579 | ||
| 2608 | 2580 | ||
| 2609 | int | 2581 | int |
| 2610 | set_file_times (filename, atime, mtime) | 2582 | set_file_times (const char *filename, struct timeval atime, struct timeval mtime) |
| 2611 | const char *filename; | ||
| 2612 | EMACS_TIME atime, mtime; | ||
| 2613 | { | 2583 | { |
| 2614 | #ifdef HAVE_UTIMES | 2584 | #ifdef HAVE_UTIMES |
| 2615 | struct timeval tv[2]; | 2585 | struct timeval tv[2]; |
| @@ -2993,7 +2963,7 @@ serial_configure (struct Lisp_Process *p, | |||
| 2993 | /* Process enumeration and access via /proc. */ | 2963 | /* Process enumeration and access via /proc. */ |
| 2994 | 2964 | ||
| 2995 | Lisp_Object | 2965 | Lisp_Object |
| 2996 | list_system_processes () | 2966 | list_system_processes (void) |
| 2997 | { | 2967 | { |
| 2998 | Lisp_Object procdir, match, proclist, next; | 2968 | Lisp_Object procdir, match, proclist, next; |
| 2999 | struct gcpro gcpro1, gcpro2; | 2969 | struct gcpro gcpro1, gcpro2; |
diff --git a/src/termcap.c b/src/termcap.c index 9b4a7f657f6..5a6d9483a51 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -127,15 +127,14 @@ xrealloc (ptr, size) | |||
| 127 | for tgetnum, tgetflag and tgetstr to find. */ | 127 | for tgetnum, tgetflag and tgetstr to find. */ |
| 128 | static char *term_entry; | 128 | static char *term_entry; |
| 129 | 129 | ||
| 130 | static char *tgetst1 (); | 130 | static char *tgetst1 (char *ptr, char **area); |
| 131 | 131 | ||
| 132 | /* Search entry BP for capability CAP. | 132 | /* Search entry BP for capability CAP. |
| 133 | Return a pointer to the capability (in BP) if found, | 133 | Return a pointer to the capability (in BP) if found, |
| 134 | 0 if not found. */ | 134 | 0 if not found. */ |
| 135 | 135 | ||
| 136 | static char * | 136 | static char * |
| 137 | find_capability (bp, cap) | 137 | find_capability (register char *bp, register char *cap) |
| 138 | register char *bp, *cap; | ||
| 139 | { | 138 | { |
| 140 | for (; *bp; bp++) | 139 | for (; *bp; bp++) |
| 141 | if (bp[0] == ':' | 140 | if (bp[0] == ':' |
| @@ -146,8 +145,7 @@ find_capability (bp, cap) | |||
| 146 | } | 145 | } |
| 147 | 146 | ||
| 148 | int | 147 | int |
| 149 | tgetnum (cap) | 148 | tgetnum (char *cap) |
| 150 | char *cap; | ||
| 151 | { | 149 | { |
| 152 | register char *ptr = find_capability (term_entry, cap); | 150 | register char *ptr = find_capability (term_entry, cap); |
| 153 | if (!ptr || ptr[-1] != '#') | 151 | if (!ptr || ptr[-1] != '#') |
| @@ -156,8 +154,7 @@ tgetnum (cap) | |||
| 156 | } | 154 | } |
| 157 | 155 | ||
| 158 | int | 156 | int |
| 159 | tgetflag (cap) | 157 | tgetflag (char *cap) |
| 160 | char *cap; | ||
| 161 | { | 158 | { |
| 162 | register char *ptr = find_capability (term_entry, cap); | 159 | register char *ptr = find_capability (term_entry, cap); |
| 163 | return ptr && ptr[-1] == ':'; | 160 | return ptr && ptr[-1] == ':'; |
| @@ -169,9 +166,7 @@ tgetflag (cap) | |||
| 169 | If AREA is null, space is allocated with `malloc'. */ | 166 | If AREA is null, space is allocated with `malloc'. */ |
| 170 | 167 | ||
| 171 | char * | 168 | char * |
| 172 | tgetstr (cap, area) | 169 | tgetstr (char *cap, char **area) |
| 173 | char *cap; | ||
| 174 | char **area; | ||
| 175 | { | 170 | { |
| 176 | register char *ptr = find_capability (term_entry, cap); | 171 | register char *ptr = find_capability (term_entry, cap); |
| 177 | if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) | 172 | if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) |
| @@ -209,9 +204,7 @@ static const char esctab[] | |||
| 209 | or NULL if PTR is NULL. */ | 204 | or NULL if PTR is NULL. */ |
| 210 | 205 | ||
| 211 | static char * | 206 | static char * |
| 212 | tgetst1 (ptr, area) | 207 | tgetst1 (char *ptr, char **area) |
| 213 | char *ptr; | ||
| 214 | char **area; | ||
| 215 | { | 208 | { |
| 216 | register char *p, *r; | 209 | register char *p, *r; |
| 217 | register int c; | 210 | register int c; |
| @@ -357,10 +350,7 @@ static const int speeds[] = | |||
| 357 | #endif /* not emacs */ | 350 | #endif /* not emacs */ |
| 358 | 351 | ||
| 359 | void | 352 | void |
| 360 | tputs (str, nlines, outfun) | 353 | tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) |
| 361 | register char *str; | ||
| 362 | int nlines; | ||
| 363 | register int (*outfun) (); | ||
| 364 | { | 354 | { |
| 365 | register int padcount = 0; | 355 | register int padcount = 0; |
| 366 | register int speed; | 356 | register int speed; |
| @@ -432,10 +422,10 @@ struct termcap_buffer | |||
| 432 | 422 | ||
| 433 | /* Forward declarations of static functions. */ | 423 | /* Forward declarations of static functions. */ |
| 434 | 424 | ||
| 435 | static int scan_file (); | 425 | static int scan_file (char *str, int fd, register struct termcap_buffer *bufp); |
| 436 | static char *gobble_line (); | 426 | static char *gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end); |
| 437 | static int compare_contin (); | 427 | static int compare_contin (register char *str1, register char *str2); |
| 438 | static int name_match (); | 428 | static int name_match (char *line, char *name); |
| 439 | 429 | ||
| 440 | #ifdef MSDOS /* MW, May 1993 */ | 430 | #ifdef MSDOS /* MW, May 1993 */ |
| 441 | static int | 431 | static int |
| @@ -460,8 +450,7 @@ valid_filename_p (fn) | |||
| 460 | in it, and some other value otherwise. */ | 450 | in it, and some other value otherwise. */ |
| 461 | 451 | ||
| 462 | int | 452 | int |
| 463 | tgetent (bp, name) | 453 | tgetent (char *bp, char *name) |
| 464 | char *bp, *name; | ||
| 465 | { | 454 | { |
| 466 | register char *termcap_name; | 455 | register char *termcap_name; |
| 467 | register int fd; | 456 | register int fd; |
| @@ -625,10 +614,7 @@ tgetent (bp, name) | |||
| 625 | or 0 if no entry is found in the file. */ | 614 | or 0 if no entry is found in the file. */ |
| 626 | 615 | ||
| 627 | static int | 616 | static int |
| 628 | scan_file (str, fd, bufp) | 617 | scan_file (char *str, int fd, register struct termcap_buffer *bufp) |
| 629 | char *str; | ||
| 630 | int fd; | ||
| 631 | register struct termcap_buffer *bufp; | ||
| 632 | { | 618 | { |
| 633 | register char *end; | 619 | register char *end; |
| 634 | 620 | ||
| @@ -665,8 +651,7 @@ scan_file (str, fd, bufp) | |||
| 665 | by termcap entry LINE. */ | 651 | by termcap entry LINE. */ |
| 666 | 652 | ||
| 667 | static int | 653 | static int |
| 668 | name_match (line, name) | 654 | name_match (char *line, char *name) |
| 669 | char *line, *name; | ||
| 670 | { | 655 | { |
| 671 | register char *tem; | 656 | register char *tem; |
| 672 | 657 | ||
| @@ -681,8 +666,7 @@ name_match (line, name) | |||
| 681 | } | 666 | } |
| 682 | 667 | ||
| 683 | static int | 668 | static int |
| 684 | compare_contin (str1, str2) | 669 | compare_contin (register char *str1, register char *str2) |
| 685 | register char *str1, *str2; | ||
| 686 | { | 670 | { |
| 687 | register int c1, c2; | 671 | register int c1, c2; |
| 688 | while (1) | 672 | while (1) |
| @@ -722,10 +706,7 @@ compare_contin (str1, str2) | |||
| 722 | thing as one line. The caller decides when a line is continued. */ | 706 | thing as one line. The caller decides when a line is continued. */ |
| 723 | 707 | ||
| 724 | static char * | 708 | static char * |
| 725 | gobble_line (fd, bufp, append_end) | 709 | gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end) |
| 726 | int fd; | ||
| 727 | register struct termcap_buffer *bufp; | ||
| 728 | char *append_end; | ||
| 729 | { | 710 | { |
| 730 | register char *end; | 711 | register char *end; |
| 731 | register int nread; | 712 | register int nread; |
diff --git a/src/terminal.c b/src/terminal.c index 7693bc3ad40..5659f7d2370 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -435,9 +435,7 @@ selected frame's terminal). */) | |||
| 435 | 435 | ||
| 436 | /* Return the value of terminal parameter PARAM in terminal T. */ | 436 | /* Return the value of terminal parameter PARAM in terminal T. */ |
| 437 | Lisp_Object | 437 | Lisp_Object |
| 438 | get_terminal_param (t, param) | 438 | get_terminal_param (struct terminal *t, Lisp_Object param) |
| 439 | struct terminal *t; | ||
| 440 | Lisp_Object param; | ||
| 441 | { | 439 | { |
| 442 | Lisp_Object tem = Fassq (param, t->param_alist); | 440 | Lisp_Object tem = Fassq (param, t->param_alist); |
| 443 | if (EQ (tem, Qnil)) | 441 | if (EQ (tem, Qnil)) |
| @@ -449,10 +447,7 @@ get_terminal_param (t, param) | |||
| 449 | Return the previous value. */ | 447 | Return the previous value. */ |
| 450 | 448 | ||
| 451 | Lisp_Object | 449 | Lisp_Object |
| 452 | store_terminal_param (t, parameter, value) | 450 | store_terminal_param (struct terminal *t, Lisp_Object parameter, Lisp_Object value) |
| 453 | struct terminal *t; | ||
| 454 | Lisp_Object parameter; | ||
| 455 | Lisp_Object value; | ||
| 456 | { | 451 | { |
| 457 | Lisp_Object old_alist_elt = Fassq (parameter, t->param_alist); | 452 | Lisp_Object old_alist_elt = Fassq (parameter, t->param_alist); |
| 458 | if (EQ (old_alist_elt, Qnil)) | 453 | if (EQ (old_alist_elt, Qnil)) |
| @@ -552,7 +547,7 @@ delete_initial_terminal (struct terminal *terminal) | |||
| 552 | } | 547 | } |
| 553 | 548 | ||
| 554 | void | 549 | void |
| 555 | syms_of_terminal () | 550 | syms_of_terminal (void) |
| 556 | { | 551 | { |
| 557 | 552 | ||
| 558 | DEFVAR_LISP ("ring-bell-function", &Vring_bell_function, | 553 | DEFVAR_LISP ("ring-bell-function", &Vring_bell_function, |
diff --git a/src/terminfo.c b/src/terminfo.c index 55508196fae..89d7426e8f4 100644 --- a/src/terminfo.c +++ b/src/terminfo.c | |||
| @@ -35,13 +35,10 @@ char *UP, *BC, PC; | |||
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | char * | 37 | char * |
| 38 | tparam (string, outstring, len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) | 38 | tparam (char *string, char *outstring, int len, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) |
| 39 | char *string; | ||
| 40 | char *outstring; | ||
| 41 | int len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9; | ||
| 42 | { | 39 | { |
| 43 | char *temp; | 40 | char *temp; |
| 44 | extern char *tparm(); | 41 | extern char *tparm(/* ??? */); |
| 45 | 42 | ||
| 46 | temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); | 43 | temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); |
| 47 | if (outstring == 0) | 44 | if (outstring == 0) |
diff --git a/src/textprop.c b/src/textprop.c index 7e2f2b8f4db..a3294a0650a 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -85,8 +85,7 @@ static void text_read_only (Lisp_Object) NO_RETURN; | |||
| 85 | to capture that error in GDB by putting a breakpoint on it. */ | 85 | to capture that error in GDB by putting a breakpoint on it. */ |
| 86 | 86 | ||
| 87 | static void | 87 | static void |
| 88 | text_read_only (propval) | 88 | text_read_only (Lisp_Object propval) |
| 89 | Lisp_Object propval; | ||
| 90 | { | 89 | { |
| 91 | if (STRINGP (propval)) | 90 | if (STRINGP (propval)) |
| 92 | xsignal1 (Qtext_read_only, propval); | 91 | xsignal1 (Qtext_read_only, propval); |
| @@ -123,9 +122,7 @@ text_read_only (propval) | |||
| 123 | #define hard 1 | 122 | #define hard 1 |
| 124 | 123 | ||
| 125 | INTERVAL | 124 | INTERVAL |
| 126 | validate_interval_range (object, begin, end, force) | 125 | validate_interval_range (Lisp_Object object, Lisp_Object *begin, Lisp_Object *end, int force) |
| 127 | Lisp_Object object, *begin, *end; | ||
| 128 | int force; | ||
| 129 | { | 126 | { |
| 130 | register INTERVAL i; | 127 | register INTERVAL i; |
| 131 | int searchpos; | 128 | int searchpos; |
| @@ -191,8 +188,7 @@ validate_interval_range (object, begin, end, force) | |||
| 191 | is even numbered and thus suitable as a plist. */ | 188 | is even numbered and thus suitable as a plist. */ |
| 192 | 189 | ||
| 193 | static Lisp_Object | 190 | static Lisp_Object |
| 194 | validate_plist (list) | 191 | validate_plist (Lisp_Object list) |
| 195 | Lisp_Object list; | ||
| 196 | { | 192 | { |
| 197 | if (NILP (list)) | 193 | if (NILP (list)) |
| 198 | return Qnil; | 194 | return Qnil; |
| @@ -218,9 +214,7 @@ validate_plist (list) | |||
| 218 | with the same values, of list PLIST. */ | 214 | with the same values, of list PLIST. */ |
| 219 | 215 | ||
| 220 | static int | 216 | static int |
| 221 | interval_has_all_properties (plist, i) | 217 | interval_has_all_properties (Lisp_Object plist, INTERVAL i) |
| 222 | Lisp_Object plist; | ||
| 223 | INTERVAL i; | ||
| 224 | { | 218 | { |
| 225 | register Lisp_Object tail1, tail2, sym1; | 219 | register Lisp_Object tail1, tail2, sym1; |
| 226 | register int found; | 220 | register int found; |
| @@ -256,9 +250,7 @@ interval_has_all_properties (plist, i) | |||
| 256 | properties of PLIST, regardless of their values. */ | 250 | properties of PLIST, regardless of their values. */ |
| 257 | 251 | ||
| 258 | static INLINE int | 252 | static INLINE int |
| 259 | interval_has_some_properties (plist, i) | 253 | interval_has_some_properties (Lisp_Object plist, INTERVAL i) |
| 260 | Lisp_Object plist; | ||
| 261 | INTERVAL i; | ||
| 262 | { | 254 | { |
| 263 | register Lisp_Object tail1, tail2, sym; | 255 | register Lisp_Object tail1, tail2, sym; |
| 264 | 256 | ||
| @@ -280,9 +272,7 @@ interval_has_some_properties (plist, i) | |||
| 280 | property names in LIST, regardless of their values. */ | 272 | property names in LIST, regardless of their values. */ |
| 281 | 273 | ||
| 282 | static INLINE int | 274 | static INLINE int |
| 283 | interval_has_some_properties_list (list, i) | 275 | interval_has_some_properties_list (Lisp_Object list, INTERVAL i) |
| 284 | Lisp_Object list; | ||
| 285 | INTERVAL i; | ||
| 286 | { | 276 | { |
| 287 | register Lisp_Object tail1, tail2, sym; | 277 | register Lisp_Object tail1, tail2, sym; |
| 288 | 278 | ||
| @@ -305,8 +295,7 @@ interval_has_some_properties_list (list, i) | |||
| 305 | /* Return the value of PROP in property-list PLIST, or Qunbound if it | 295 | /* Return the value of PROP in property-list PLIST, or Qunbound if it |
| 306 | has none. */ | 296 | has none. */ |
| 307 | static Lisp_Object | 297 | static Lisp_Object |
| 308 | property_value (plist, prop) | 298 | property_value (Lisp_Object plist, Lisp_Object prop) |
| 309 | Lisp_Object plist, prop; | ||
| 310 | { | 299 | { |
| 311 | Lisp_Object value; | 300 | Lisp_Object value; |
| 312 | 301 | ||
| @@ -324,9 +313,7 @@ property_value (plist, prop) | |||
| 324 | OBJECT is the string or buffer that INTERVAL belongs to. */ | 313 | OBJECT is the string or buffer that INTERVAL belongs to. */ |
| 325 | 314 | ||
| 326 | static void | 315 | static void |
| 327 | set_properties (properties, interval, object) | 316 | set_properties (Lisp_Object properties, INTERVAL interval, Lisp_Object object) |
| 328 | Lisp_Object properties, object; | ||
| 329 | INTERVAL interval; | ||
| 330 | { | 317 | { |
| 331 | Lisp_Object sym, value; | 318 | Lisp_Object sym, value; |
| 332 | 319 | ||
| @@ -372,10 +359,7 @@ set_properties (properties, interval, object) | |||
| 372 | are actually added to I's plist) */ | 359 | are actually added to I's plist) */ |
| 373 | 360 | ||
| 374 | static int | 361 | static int |
| 375 | add_properties (plist, i, object) | 362 | add_properties (Lisp_Object plist, INTERVAL i, Lisp_Object object) |
| 376 | Lisp_Object plist; | ||
| 377 | INTERVAL i; | ||
| 378 | Lisp_Object object; | ||
| 379 | { | 363 | { |
| 380 | Lisp_Object tail1, tail2, sym1, val1; | 364 | Lisp_Object tail1, tail2, sym1, val1; |
| 381 | register int changed = 0; | 365 | register int changed = 0; |
| @@ -451,10 +435,7 @@ add_properties (plist, i, object) | |||
| 451 | OBJECT is the string or buffer containing I. */ | 435 | OBJECT is the string or buffer containing I. */ |
| 452 | 436 | ||
| 453 | static int | 437 | static int |
| 454 | remove_properties (plist, list, i, object) | 438 | remove_properties (Lisp_Object plist, Lisp_Object list, INTERVAL i, Lisp_Object object) |
| 455 | Lisp_Object plist, list; | ||
| 456 | INTERVAL i; | ||
| 457 | Lisp_Object object; | ||
| 458 | { | 439 | { |
| 459 | register Lisp_Object tail1, tail2, sym, current_plist; | 440 | register Lisp_Object tail1, tail2, sym, current_plist; |
| 460 | register int changed = 0; | 441 | register int changed = 0; |
| @@ -535,9 +516,7 @@ erase_properties (i) | |||
| 535 | POSITION is BEG-based. */ | 516 | POSITION is BEG-based. */ |
| 536 | 517 | ||
| 537 | INTERVAL | 518 | INTERVAL |
| 538 | interval_of (position, object) | 519 | interval_of (int position, Lisp_Object object) |
| 539 | int position; | ||
| 540 | Lisp_Object object; | ||
| 541 | { | 520 | { |
| 542 | register INTERVAL i; | 521 | register INTERVAL i; |
| 543 | int beg, end; | 522 | int beg, end; |
| @@ -623,10 +602,7 @@ If POSITION is at the end of OBJECT, the value is nil. */) | |||
| 623 | window-specific overlays are considered only if they are associated | 602 | window-specific overlays are considered only if they are associated |
| 624 | with OBJECT. */ | 603 | with OBJECT. */ |
| 625 | Lisp_Object | 604 | Lisp_Object |
| 626 | get_char_property_and_overlay (position, prop, object, overlay) | 605 | get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop, Lisp_Object object, Lisp_Object *overlay) |
| 627 | Lisp_Object position, object; | ||
| 628 | register Lisp_Object prop; | ||
| 629 | Lisp_Object *overlay; | ||
| 630 | { | 606 | { |
| 631 | struct window *w = 0; | 607 | struct window *w = 0; |
| 632 | 608 | ||
| @@ -1020,8 +996,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) | |||
| 1020 | /* Return 1 if there's a change in some property between BEG and END. */ | 996 | /* Return 1 if there's a change in some property between BEG and END. */ |
| 1021 | 997 | ||
| 1022 | int | 998 | int |
| 1023 | property_change_between_p (beg, end) | 999 | property_change_between_p (int beg, int end) |
| 1024 | int beg, end; | ||
| 1025 | { | 1000 | { |
| 1026 | register INTERVAL i, next; | 1001 | register INTERVAL i, next; |
| 1027 | Lisp_Object object, pos; | 1002 | Lisp_Object object, pos; |
| @@ -1353,8 +1328,7 @@ the designated part of OBJECT. */) | |||
| 1353 | otherwise. */ | 1328 | otherwise. */ |
| 1354 | 1329 | ||
| 1355 | Lisp_Object | 1330 | Lisp_Object |
| 1356 | set_text_properties (start, end, properties, object, coherent_change_p) | 1331 | set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object, Lisp_Object coherent_change_p) |
| 1357 | Lisp_Object start, end, properties, object, coherent_change_p; | ||
| 1358 | { | 1332 | { |
| 1359 | register INTERVAL i; | 1333 | register INTERVAL i; |
| 1360 | Lisp_Object ostart, oend; | 1334 | Lisp_Object ostart, oend; |
| @@ -1418,9 +1392,7 @@ set_text_properties (start, end, properties, object, coherent_change_p) | |||
| 1418 | START and END can be in any order. */ | 1392 | START and END can be in any order. */ |
| 1419 | 1393 | ||
| 1420 | void | 1394 | void |
| 1421 | set_text_properties_1 (start, end, properties, buffer, i) | 1395 | set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object buffer, INTERVAL i) |
| 1422 | Lisp_Object start, end, properties, buffer; | ||
| 1423 | INTERVAL i; | ||
| 1424 | { | 1396 | { |
| 1425 | register INTERVAL prev_changed = NULL_INTERVAL; | 1397 | register INTERVAL prev_changed = NULL_INTERVAL; |
| 1426 | register int s, len; | 1398 | register int s, len; |
| @@ -1777,8 +1749,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */ | |||
| 1777 | BUFFER can be either a buffer or nil (meaning current buffer). */ | 1749 | BUFFER can be either a buffer or nil (meaning current buffer). */ |
| 1778 | 1750 | ||
| 1779 | int | 1751 | int |
| 1780 | text_property_stickiness (prop, pos, buffer) | 1752 | text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer) |
| 1781 | Lisp_Object prop, pos, buffer; | ||
| 1782 | { | 1753 | { |
| 1783 | Lisp_Object prev_pos, front_sticky; | 1754 | Lisp_Object prev_pos, front_sticky; |
| 1784 | int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */ | 1755 | int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */ |
| @@ -1851,8 +1822,7 @@ text_property_stickiness (prop, pos, buffer) | |||
| 1851 | /* Note this can GC when DEST is a buffer. */ | 1822 | /* Note this can GC when DEST is a buffer. */ |
| 1852 | 1823 | ||
| 1853 | Lisp_Object | 1824 | Lisp_Object |
| 1854 | copy_text_properties (start, end, src, pos, dest, prop) | 1825 | copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_Object pos, Lisp_Object dest, Lisp_Object prop) |
| 1855 | Lisp_Object start, end, src, pos, dest, prop; | ||
| 1856 | { | 1826 | { |
| 1857 | INTERVAL i; | 1827 | INTERVAL i; |
| 1858 | Lisp_Object res; | 1828 | Lisp_Object res; |
| @@ -1944,8 +1914,7 @@ copy_text_properties (start, end, src, pos, dest, prop) | |||
| 1944 | doesn't contain text properties between START and END. */ | 1914 | doesn't contain text properties between START and END. */ |
| 1945 | 1915 | ||
| 1946 | Lisp_Object | 1916 | Lisp_Object |
| 1947 | text_property_list (object, start, end, prop) | 1917 | text_property_list (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object prop) |
| 1948 | Lisp_Object object, start, end, prop; | ||
| 1949 | { | 1918 | { |
| 1950 | struct interval *i; | 1919 | struct interval *i; |
| 1951 | Lisp_Object result; | 1920 | Lisp_Object result; |
| @@ -2002,8 +1971,7 @@ text_property_list (object, start, end, prop) | |||
| 2002 | non-zero if OBJECT was modified. */ | 1971 | non-zero if OBJECT was modified. */ |
| 2003 | 1972 | ||
| 2004 | int | 1973 | int |
| 2005 | add_text_properties_from_list (object, list, delta) | 1974 | add_text_properties_from_list (Lisp_Object object, Lisp_Object list, Lisp_Object delta) |
| 2006 | Lisp_Object object, list, delta; | ||
| 2007 | { | 1975 | { |
| 2008 | struct gcpro gcpro1, gcpro2; | 1976 | struct gcpro gcpro1, gcpro2; |
| 2009 | int modified_p = 0; | 1977 | int modified_p = 0; |
| @@ -2036,8 +2004,7 @@ add_text_properties_from_list (object, list, delta) | |||
| 2036 | end-points to NEW_END. */ | 2004 | end-points to NEW_END. */ |
| 2037 | 2005 | ||
| 2038 | Lisp_Object | 2006 | Lisp_Object |
| 2039 | extend_property_ranges (list, new_end) | 2007 | extend_property_ranges (Lisp_Object list, Lisp_Object new_end) |
| 2040 | Lisp_Object list, new_end; | ||
| 2041 | { | 2008 | { |
| 2042 | Lisp_Object prev = Qnil, head = list; | 2009 | Lisp_Object prev = Qnil, head = list; |
| 2043 | int max = XINT (new_end); | 2010 | int max = XINT (new_end); |
| @@ -2072,8 +2039,7 @@ extend_property_ranges (list, new_end) | |||
| 2072 | /* Call the modification hook functions in LIST, each with START and END. */ | 2039 | /* Call the modification hook functions in LIST, each with START and END. */ |
| 2073 | 2040 | ||
| 2074 | static void | 2041 | static void |
| 2075 | call_mod_hooks (list, start, end) | 2042 | call_mod_hooks (Lisp_Object list, Lisp_Object start, Lisp_Object end) |
| 2076 | Lisp_Object list, start, end; | ||
| 2077 | { | 2043 | { |
| 2078 | struct gcpro gcpro1; | 2044 | struct gcpro gcpro1; |
| 2079 | GCPRO1 (list); | 2045 | GCPRO1 (list); |
| @@ -2094,9 +2060,7 @@ call_mod_hooks (list, start, end) | |||
| 2094 | those hooks in order, with START and END - 1 as arguments. */ | 2060 | those hooks in order, with START and END - 1 as arguments. */ |
| 2095 | 2061 | ||
| 2096 | void | 2062 | void |
| 2097 | verify_interval_modification (buf, start, end) | 2063 | verify_interval_modification (struct buffer *buf, int start, int end) |
| 2098 | struct buffer *buf; | ||
| 2099 | int start, end; | ||
| 2100 | { | 2064 | { |
| 2101 | register INTERVAL intervals = BUF_INTERVALS (buf); | 2065 | register INTERVAL intervals = BUF_INTERVALS (buf); |
| 2102 | register INTERVAL i; | 2066 | register INTERVAL i; |
| @@ -2274,8 +2238,7 @@ verify_interval_modification (buf, start, end) | |||
| 2274 | so it can indicate the range of inserted text. */ | 2238 | so it can indicate the range of inserted text. */ |
| 2275 | 2239 | ||
| 2276 | void | 2240 | void |
| 2277 | report_interval_modification (start, end) | 2241 | report_interval_modification (Lisp_Object start, Lisp_Object end) |
| 2278 | Lisp_Object start, end; | ||
| 2279 | { | 2242 | { |
| 2280 | if (! NILP (interval_insert_behind_hooks)) | 2243 | if (! NILP (interval_insert_behind_hooks)) |
| 2281 | call_mod_hooks (interval_insert_behind_hooks, start, end); | 2244 | call_mod_hooks (interval_insert_behind_hooks, start, end); |
| @@ -2286,7 +2249,7 @@ report_interval_modification (start, end) | |||
| 2286 | } | 2249 | } |
| 2287 | 2250 | ||
| 2288 | void | 2251 | void |
| 2289 | syms_of_textprop () | 2252 | syms_of_textprop (void) |
| 2290 | { | 2253 | { |
| 2291 | DEFVAR_LISP ("default-text-properties", &Vdefault_text_properties, | 2254 | DEFVAR_LISP ("default-text-properties", &Vdefault_text_properties, |
| 2292 | doc: /* Property-list used as default values. | 2255 | doc: /* Property-list used as default values. |
diff --git a/src/tparam.c b/src/tparam.c index dcf79a3b617..a35647799cb 100644 --- a/src/tparam.c +++ b/src/tparam.c | |||
| @@ -90,15 +90,11 @@ xrealloc (ptr, size) | |||
| 90 | 90 | ||
| 91 | The fourth and following args to tparam serve as the parameter values. */ | 91 | The fourth and following args to tparam serve as the parameter values. */ |
| 92 | 92 | ||
| 93 | static char *tparam1 (); | 93 | static char *tparam1 (char *string, char *outstring, int len, char *up, char *left, register int *argp); |
| 94 | 94 | ||
| 95 | /* VARARGS 2 */ | 95 | /* VARARGS 2 */ |
| 96 | char * | 96 | char * |
| 97 | tparam (string, outstring, len, arg0, arg1, arg2, arg3) | 97 | tparam (char *string, char *outstring, int len, int arg0, int arg1, int arg2, int arg3) |
| 98 | char *string; | ||
| 99 | char *outstring; | ||
| 100 | int len; | ||
| 101 | int arg0, arg1, arg2, arg3; | ||
| 102 | { | 98 | { |
| 103 | int arg[4]; | 99 | int arg[4]; |
| 104 | 100 | ||
| @@ -115,9 +111,7 @@ char *UP; | |||
| 115 | static char tgoto_buf[50]; | 111 | static char tgoto_buf[50]; |
| 116 | 112 | ||
| 117 | char * | 113 | char * |
| 118 | tgoto (cm, hpos, vpos) | 114 | tgoto (char *cm, int hpos, int vpos) |
| 119 | char *cm; | ||
| 120 | int hpos, vpos; | ||
| 121 | { | 115 | { |
| 122 | int args[2]; | 116 | int args[2]; |
| 123 | if (!cm) | 117 | if (!cm) |
| @@ -128,12 +122,7 @@ tgoto (cm, hpos, vpos) | |||
| 128 | } | 122 | } |
| 129 | 123 | ||
| 130 | static char * | 124 | static char * |
| 131 | tparam1 (string, outstring, len, up, left, argp) | 125 | tparam1 (char *string, char *outstring, int len, char *up, char *left, register int *argp) |
| 132 | char *string; | ||
| 133 | char *outstring; | ||
| 134 | int len; | ||
| 135 | char *up, *left; | ||
| 136 | register int *argp; | ||
| 137 | { | 126 | { |
| 138 | register int c; | 127 | register int c; |
| 139 | register char *p = string; | 128 | register char *p = string; |
diff --git a/src/undo.c b/src/undo.c index b678c5c58ba..2d491a41221 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -67,8 +67,7 @@ int undo_inhibit_record_point; | |||
| 67 | undo record that will be added just after this command terminates. */ | 67 | undo record that will be added just after this command terminates. */ |
| 68 | 68 | ||
| 69 | static void | 69 | static void |
| 70 | record_point (pt) | 70 | record_point (int pt) |
| 71 | int pt; | ||
| 72 | { | 71 | { |
| 73 | int at_boundary; | 72 | int at_boundary; |
| 74 | 73 | ||
| @@ -130,8 +129,7 @@ record_point (pt) | |||
| 130 | because we don't need to record the contents.) */ | 129 | because we don't need to record the contents.) */ |
| 131 | 130 | ||
| 132 | void | 131 | void |
| 133 | record_insert (beg, length) | 132 | record_insert (int beg, int length) |
| 134 | int beg, length; | ||
| 135 | { | 133 | { |
| 136 | Lisp_Object lbeg, lend; | 134 | Lisp_Object lbeg, lend; |
| 137 | 135 | ||
| @@ -166,9 +164,7 @@ record_insert (beg, length) | |||
| 166 | of the characters in STRING, at location BEG. */ | 164 | of the characters in STRING, at location BEG. */ |
| 167 | 165 | ||
| 168 | void | 166 | void |
| 169 | record_delete (beg, string) | 167 | record_delete (int beg, Lisp_Object string) |
| 170 | int beg; | ||
| 171 | Lisp_Object string; | ||
| 172 | { | 168 | { |
| 173 | Lisp_Object sbeg; | 169 | Lisp_Object sbeg; |
| 174 | 170 | ||
| @@ -196,9 +192,7 @@ record_delete (beg, string) | |||
| 196 | won't be inverted automatically by undoing the buffer modification. */ | 192 | won't be inverted automatically by undoing the buffer modification. */ |
| 197 | 193 | ||
| 198 | void | 194 | void |
| 199 | record_marker_adjustment (marker, adjustment) | 195 | record_marker_adjustment (Lisp_Object marker, int adjustment) |
| 200 | Lisp_Object marker; | ||
| 201 | int adjustment; | ||
| 202 | { | 196 | { |
| 203 | if (EQ (current_buffer->undo_list, Qt)) | 197 | if (EQ (current_buffer->undo_list, Qt)) |
| 204 | return; | 198 | return; |
| @@ -221,8 +215,7 @@ record_marker_adjustment (marker, adjustment) | |||
| 221 | The replacement must not change the number of characters. */ | 215 | The replacement must not change the number of characters. */ |
| 222 | 216 | ||
| 223 | void | 217 | void |
| 224 | record_change (beg, length) | 218 | record_change (int beg, int length) |
| 225 | int beg, length; | ||
| 226 | { | 219 | { |
| 227 | record_delete (beg, make_buffer_string (beg, beg + length, 1)); | 220 | record_delete (beg, make_buffer_string (beg, beg + length, 1)); |
| 228 | record_insert (beg, length); | 221 | record_insert (beg, length); |
| @@ -233,7 +226,7 @@ record_change (beg, length) | |||
| 233 | we can tell whether it is obsolete because the file was saved again. */ | 226 | we can tell whether it is obsolete because the file was saved again. */ |
| 234 | 227 | ||
| 235 | void | 228 | void |
| 236 | record_first_change () | 229 | record_first_change (void) |
| 237 | { | 230 | { |
| 238 | Lisp_Object high, low; | 231 | Lisp_Object high, low; |
| 239 | struct buffer *base_buffer = current_buffer; | 232 | struct buffer *base_buffer = current_buffer; |
| @@ -257,9 +250,7 @@ record_first_change () | |||
| 257 | for LENGTH characters starting at position BEG in BUFFER. */ | 250 | for LENGTH characters starting at position BEG in BUFFER. */ |
| 258 | 251 | ||
| 259 | void | 252 | void |
| 260 | record_property_change (beg, length, prop, value, buffer) | 253 | record_property_change (int beg, int length, Lisp_Object prop, Lisp_Object value, Lisp_Object buffer) |
| 261 | int beg, length; | ||
| 262 | Lisp_Object prop, value, buffer; | ||
| 263 | { | 254 | { |
| 264 | Lisp_Object lbeg, lend, entry; | 255 | Lisp_Object lbeg, lend, entry; |
| 265 | struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); | 256 | struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); |
| @@ -328,8 +319,7 @@ but another undo command will undo to the previous boundary. */) | |||
| 328 | In some cases this works by calling undo-outer-limit-function. */ | 319 | In some cases this works by calling undo-outer-limit-function. */ |
| 329 | 320 | ||
| 330 | void | 321 | void |
| 331 | truncate_undo_list (b) | 322 | truncate_undo_list (struct buffer *b) |
| 332 | struct buffer *b; | ||
| 333 | { | 323 | { |
| 334 | Lisp_Object list; | 324 | Lisp_Object list; |
| 335 | Lisp_Object prev, next, last_boundary; | 325 | Lisp_Object prev, next, last_boundary; |
| @@ -665,7 +655,7 @@ Return what remains of the list. */) | |||
| 665 | } | 655 | } |
| 666 | 656 | ||
| 667 | void | 657 | void |
| 668 | syms_of_undo () | 658 | syms_of_undo (void) |
| 669 | { | 659 | { |
| 670 | Qinhibit_read_only = intern_c_string ("inhibit-read-only"); | 660 | Qinhibit_read_only = intern_c_string ("inhibit-read-only"); |
| 671 | staticpro (&Qinhibit_read_only); | 661 | staticpro (&Qinhibit_read_only); |
diff --git a/src/unexelf.c b/src/unexelf.c index a91af9458eb..f654d9dc8c9 100644 --- a/src/unexelf.c +++ b/src/unexelf.c | |||
| @@ -594,8 +594,7 @@ typedef unsigned char byte; | |||
| 594 | /* Round X up to a multiple of Y. */ | 594 | /* Round X up to a multiple of Y. */ |
| 595 | 595 | ||
| 596 | static ElfW(Addr) | 596 | static ElfW(Addr) |
| 597 | round_up (x, y) | 597 | round_up (Elf32_Addr x, Elf32_Addr y) |
| 598 | ElfW(Addr) x, y; | ||
| 599 | { | 598 | { |
| 600 | int rem = x % y; | 599 | int rem = x % y; |
| 601 | if (rem == 0) | 600 | if (rem == 0) |
| @@ -611,13 +610,7 @@ round_up (x, y) | |||
| 611 | if NOERROR is 0; we return -1 if NOERROR is nonzero. */ | 610 | if NOERROR is 0; we return -1 if NOERROR is nonzero. */ |
| 612 | 611 | ||
| 613 | static int | 612 | static int |
| 614 | find_section (name, section_names, file_name, old_file_h, old_section_h, noerror) | 613 | find_section (char *name, char *section_names, char *file_name, Elf32_Ehdr *old_file_h, Elf32_Shdr *old_section_h, int noerror) |
| 615 | char *name; | ||
| 616 | char *section_names; | ||
| 617 | char *file_name; | ||
| 618 | ElfW(Ehdr) *old_file_h; | ||
| 619 | ElfW(Shdr) *old_section_h; | ||
| 620 | int noerror; | ||
| 621 | { | 614 | { |
| 622 | int idx; | 615 | int idx; |
| 623 | 616 | ||
| @@ -652,9 +645,7 @@ find_section (name, section_names, file_name, old_file_h, old_section_h, noerror | |||
| 652 | * | 645 | * |
| 653 | */ | 646 | */ |
| 654 | void | 647 | void |
| 655 | unexec (new_name, old_name, data_start, bss_start, entry_address) | 648 | unexec (char *new_name, char *old_name, unsigned int data_start, unsigned int bss_start, unsigned int entry_address) |
| 656 | char *new_name, *old_name; | ||
| 657 | unsigned data_start, bss_start, entry_address; | ||
| 658 | { | 649 | { |
| 659 | int new_file, old_file, new_file_size; | 650 | int new_file, old_file, new_file_size; |
| 660 | 651 | ||
diff --git a/src/window.c b/src/window.c index 950b9936497..f3c63935347 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -220,7 +220,7 @@ DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0, | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | Lisp_Object | 222 | Lisp_Object |
| 223 | make_window () | 223 | make_window (void) |
| 224 | { | 224 | { |
| 225 | Lisp_Object val; | 225 | Lisp_Object val; |
| 226 | register struct window *p; | 226 | register struct window *p; |
| @@ -483,8 +483,7 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 483 | 483 | ||
| 484 | 484 | ||
| 485 | static struct window * | 485 | static struct window * |
| 486 | decode_window (window) | 486 | decode_window (register Lisp_Object window) |
| 487 | register Lisp_Object window; | ||
| 488 | { | 487 | { |
| 489 | if (NILP (window)) | 488 | if (NILP (window)) |
| 490 | return XWINDOW (selected_window); | 489 | return XWINDOW (selected_window); |
| @@ -494,8 +493,7 @@ decode_window (window) | |||
| 494 | } | 493 | } |
| 495 | 494 | ||
| 496 | static struct window * | 495 | static struct window * |
| 497 | decode_any_window (window) | 496 | decode_any_window (register Lisp_Object window) |
| 498 | register Lisp_Object window; | ||
| 499 | { | 497 | { |
| 500 | if (NILP (window)) | 498 | if (NILP (window)) |
| 501 | return XWINDOW (selected_window); | 499 | return XWINDOW (selected_window); |
| @@ -799,9 +797,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 799 | X and Y are frame relative pixel coordinates. */ | 797 | X and Y are frame relative pixel coordinates. */ |
| 800 | 798 | ||
| 801 | static enum window_part | 799 | static enum window_part |
| 802 | coordinates_in_window (w, x, y) | 800 | coordinates_in_window (register struct window *w, register int *x, register int *y) |
| 803 | register struct window *w; | ||
| 804 | register int *x, *y; | ||
| 805 | { | 801 | { |
| 806 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 802 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 807 | int left_x, right_x, top_y, bottom_y; | 803 | int left_x, right_x, top_y, bottom_y; |
| @@ -1084,9 +1080,7 @@ struct check_window_data | |||
| 1084 | }; | 1080 | }; |
| 1085 | 1081 | ||
| 1086 | static int | 1082 | static int |
| 1087 | check_window_containing (w, user_data) | 1083 | check_window_containing (struct window *w, void *user_data) |
| 1088 | struct window *w; | ||
| 1089 | void *user_data; | ||
| 1090 | { | 1084 | { |
| 1091 | struct check_window_data *cw = (struct check_window_data *) user_data; | 1085 | struct check_window_data *cw = (struct check_window_data *) user_data; |
| 1092 | enum window_part found; | 1086 | enum window_part found; |
| @@ -1124,12 +1118,7 @@ check_window_containing (w, user_data) | |||
| 1124 | case. */ | 1118 | case. */ |
| 1125 | 1119 | ||
| 1126 | Lisp_Object | 1120 | Lisp_Object |
| 1127 | window_from_coordinates (f, x, y, part, wx, wy, tool_bar_p) | 1121 | window_from_coordinates (struct frame *f, int x, int y, enum window_part *part, int *wx, int *wy, int tool_bar_p) |
| 1128 | struct frame *f; | ||
| 1129 | int x, y; | ||
| 1130 | enum window_part *part; | ||
| 1131 | int *wx, *wy; | ||
| 1132 | int tool_bar_p; | ||
| 1133 | { | 1122 | { |
| 1134 | Lisp_Object window; | 1123 | Lisp_Object window; |
| 1135 | struct check_window_data cw; | 1124 | struct check_window_data cw; |
| @@ -1469,8 +1458,7 @@ WINDOW defaults to the selected window. */) | |||
| 1469 | return 0. */ | 1458 | return 0. */ |
| 1470 | 1459 | ||
| 1471 | struct Lisp_Char_Table * | 1460 | struct Lisp_Char_Table * |
| 1472 | window_display_table (w) | 1461 | window_display_table (struct window *w) |
| 1473 | struct window *w; | ||
| 1474 | { | 1462 | { |
| 1475 | struct Lisp_Char_Table *dp = NULL; | 1463 | struct Lisp_Char_Table *dp = NULL; |
| 1476 | 1464 | ||
| @@ -1504,8 +1492,7 @@ DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_displa | |||
| 1504 | /* Record info on buffer window w is displaying | 1492 | /* Record info on buffer window w is displaying |
| 1505 | when it is about to cease to display that buffer. */ | 1493 | when it is about to cease to display that buffer. */ |
| 1506 | static void | 1494 | static void |
| 1507 | unshow_buffer (w) | 1495 | unshow_buffer (register struct window *w) |
| 1508 | register struct window *w; | ||
| 1509 | { | 1496 | { |
| 1510 | Lisp_Object buf; | 1497 | Lisp_Object buf; |
| 1511 | struct buffer *b; | 1498 | struct buffer *b; |
| @@ -1553,8 +1540,7 @@ unshow_buffer (w) | |||
| 1553 | 1540 | ||
| 1554 | /* Put replacement into the window structure in place of old. */ | 1541 | /* Put replacement into the window structure in place of old. */ |
| 1555 | static void | 1542 | static void |
| 1556 | replace_window (old, replacement) | 1543 | replace_window (Lisp_Object old, Lisp_Object replacement) |
| 1557 | Lisp_Object old, replacement; | ||
| 1558 | { | 1544 | { |
| 1559 | register Lisp_Object tem; | 1545 | register Lisp_Object tem; |
| 1560 | register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); | 1546 | register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); |
| @@ -1628,8 +1614,7 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 1628 | } | 1614 | } |
| 1629 | 1615 | ||
| 1630 | void | 1616 | void |
| 1631 | delete_window (window) | 1617 | delete_window (register Lisp_Object window) |
| 1632 | register Lisp_Object window; | ||
| 1633 | { | 1618 | { |
| 1634 | register Lisp_Object tem, parent, sib; | 1619 | register Lisp_Object tem, parent, sib; |
| 1635 | register struct window *p; | 1620 | register struct window *p; |
| @@ -1843,9 +1828,7 @@ delete_window (window) | |||
| 1843 | function window_list. */ | 1828 | function window_list. */ |
| 1844 | 1829 | ||
| 1845 | static int | 1830 | static int |
| 1846 | add_window_to_list (w, user_data) | 1831 | add_window_to_list (struct window *w, void *user_data) |
| 1847 | struct window *w; | ||
| 1848 | void *user_data; | ||
| 1849 | { | 1832 | { |
| 1850 | Lisp_Object *list = (Lisp_Object *) user_data; | 1833 | Lisp_Object *list = (Lisp_Object *) user_data; |
| 1851 | Lisp_Object window; | 1834 | Lisp_Object window; |
| @@ -1860,7 +1843,7 @@ add_window_to_list (w, user_data) | |||
| 1860 | list, cache it in Vwindow_list, and return that. */ | 1843 | list, cache it in Vwindow_list, and return that. */ |
| 1861 | 1844 | ||
| 1862 | static Lisp_Object | 1845 | static Lisp_Object |
| 1863 | window_list () | 1846 | window_list (void) |
| 1864 | { | 1847 | { |
| 1865 | if (!CONSP (Vwindow_list)) | 1848 | if (!CONSP (Vwindow_list)) |
| 1866 | { | 1849 | { |
| @@ -1901,8 +1884,7 @@ window_list () | |||
| 1901 | a frame means consider windows on that frame, only. */ | 1884 | a frame means consider windows on that frame, only. */ |
| 1902 | 1885 | ||
| 1903 | static int | 1886 | static int |
| 1904 | candidate_window_p (window, owindow, minibuf, all_frames) | 1887 | candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames) |
| 1905 | Lisp_Object window, owindow, minibuf, all_frames; | ||
| 1906 | { | 1888 | { |
| 1907 | struct window *w = XWINDOW (window); | 1889 | struct window *w = XWINDOW (window); |
| 1908 | struct frame *f = XFRAME (w->frame); | 1890 | struct frame *f = XFRAME (w->frame); |
| @@ -1967,8 +1949,7 @@ candidate_window_p (window, owindow, minibuf, all_frames) | |||
| 1967 | ALL_FRAMES. */ | 1949 | ALL_FRAMES. */ |
| 1968 | 1950 | ||
| 1969 | static void | 1951 | static void |
| 1970 | decode_next_window_args (window, minibuf, all_frames) | 1952 | decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object *all_frames) |
| 1971 | Lisp_Object *window, *minibuf, *all_frames; | ||
| 1972 | { | 1953 | { |
| 1973 | if (NILP (*window)) | 1954 | if (NILP (*window)) |
| 1974 | *window = selected_window; | 1955 | *window = selected_window; |
| @@ -2014,9 +1995,7 @@ decode_next_window_args (window, minibuf, all_frames) | |||
| 2014 | ALL_FRAMES. */ | 1995 | ALL_FRAMES. */ |
| 2015 | 1996 | ||
| 2016 | static Lisp_Object | 1997 | static Lisp_Object |
| 2017 | next_window (window, minibuf, all_frames, next_p) | 1998 | next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, int next_p) |
| 2018 | Lisp_Object window, minibuf, all_frames; | ||
| 2019 | int next_p; | ||
| 2020 | { | 1999 | { |
| 2021 | decode_next_window_args (&window, &minibuf, &all_frames); | 2000 | decode_next_window_args (&window, &minibuf, &all_frames); |
| 2022 | 2001 | ||
| @@ -2200,8 +2179,7 @@ MINIBUF neither nil nor t means never include the minibuffer window. */) | |||
| 2200 | for `next-window'. */ | 2179 | for `next-window'. */ |
| 2201 | 2180 | ||
| 2202 | static Lisp_Object | 2181 | static Lisp_Object |
| 2203 | window_list_1 (window, minibuf, all_frames) | 2182 | window_list_1 (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) |
| 2204 | Lisp_Object window, minibuf, all_frames; | ||
| 2205 | { | 2183 | { |
| 2206 | Lisp_Object tail, list, rest; | 2184 | Lisp_Object tail, list, rest; |
| 2207 | 2185 | ||
| @@ -2249,10 +2227,7 @@ enum window_loop | |||
| 2249 | }; | 2227 | }; |
| 2250 | 2228 | ||
| 2251 | static Lisp_Object | 2229 | static Lisp_Object |
| 2252 | window_loop (type, obj, mini, frames) | 2230 | window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frames) |
| 2253 | enum window_loop type; | ||
| 2254 | Lisp_Object obj, frames; | ||
| 2255 | int mini; | ||
| 2256 | { | 2231 | { |
| 2257 | Lisp_Object window, windows, best_window, frame_arg; | 2232 | Lisp_Object window, windows, best_window, frame_arg; |
| 2258 | struct frame *f; | 2233 | struct frame *f; |
| @@ -2479,7 +2454,7 @@ window_loop (type, obj, mini, frames) | |||
| 2479 | /* Used for debugging. Abort if any window has a dead buffer. */ | 2454 | /* Used for debugging. Abort if any window has a dead buffer. */ |
| 2480 | 2455 | ||
| 2481 | void | 2456 | void |
| 2482 | check_all_windows () | 2457 | check_all_windows (void) |
| 2483 | { | 2458 | { |
| 2484 | window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt); | 2459 | window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt); |
| 2485 | } | 2460 | } |
| @@ -2690,8 +2665,7 @@ frames left, some other buffer is displayed in that window. */) | |||
| 2690 | of all frames, even those on other keyboards. */ | 2665 | of all frames, even those on other keyboards. */ |
| 2691 | 2666 | ||
| 2692 | void | 2667 | void |
| 2693 | replace_buffer_in_all_windows (buffer) | 2668 | replace_buffer_in_all_windows (Lisp_Object buffer) |
| 2694 | Lisp_Object buffer; | ||
| 2695 | { | 2669 | { |
| 2696 | Lisp_Object tail, frame; | 2670 | Lisp_Object tail, frame; |
| 2697 | 2671 | ||
| @@ -2720,9 +2694,7 @@ replace_buffer_in_all_windows (buffer) | |||
| 2720 | minimum allowable size. */ | 2694 | minimum allowable size. */ |
| 2721 | 2695 | ||
| 2722 | void | 2696 | void |
| 2723 | check_frame_size (frame, rows, cols) | 2697 | check_frame_size (FRAME_PTR frame, int *rows, int *cols) |
| 2724 | FRAME_PTR frame; | ||
| 2725 | int *rows, *cols; | ||
| 2726 | { | 2698 | { |
| 2727 | /* For height, we have to see: | 2699 | /* For height, we have to see: |
| 2728 | how many windows the frame has at minimum (one or two), | 2700 | how many windows the frame has at minimum (one or two), |
| @@ -2748,9 +2720,7 @@ check_frame_size (frame, rows, cols) | |||
| 2748 | either. */ | 2720 | either. */ |
| 2749 | 2721 | ||
| 2750 | static int | 2722 | static int |
| 2751 | window_fixed_size_p (w, width_p, check_siblings_p) | 2723 | window_fixed_size_p (struct window *w, int width_p, int check_siblings_p) |
| 2752 | struct window *w; | ||
| 2753 | int width_p, check_siblings_p; | ||
| 2754 | { | 2724 | { |
| 2755 | int fixed_p; | 2725 | int fixed_p; |
| 2756 | struct window *c; | 2726 | struct window *c; |
| @@ -2850,9 +2820,7 @@ window_fixed_size_p (w, width_p, check_siblings_p) | |||
| 2850 | minibuffer window, always return 1. */ | 2820 | minibuffer window, always return 1. */ |
| 2851 | 2821 | ||
| 2852 | static int | 2822 | static int |
| 2853 | window_min_size_2 (w, width_p, safe_p) | 2823 | window_min_size_2 (struct window *w, int width_p, int safe_p) |
| 2854 | struct window *w; | ||
| 2855 | int width_p, safe_p; | ||
| 2856 | { | 2824 | { |
| 2857 | /* We should consider buffer-local values of window_min_height and | 2825 | /* We should consider buffer-local values of window_min_height and |
| 2858 | window_min_width here. */ | 2826 | window_min_width here. */ |
| @@ -2886,9 +2854,7 @@ window_min_size_2 (w, width_p, safe_p) | |||
| 2886 | sizes of W's children. */ | 2854 | sizes of W's children. */ |
| 2887 | 2855 | ||
| 2888 | static int | 2856 | static int |
| 2889 | window_min_size_1 (w, width_p, safe_p) | 2857 | window_min_size_1 (struct window *w, int width_p, int safe_p) |
| 2890 | struct window *w; | ||
| 2891 | int width_p, safe_p; | ||
| 2892 | { | 2858 | { |
| 2893 | struct window *c; | 2859 | struct window *c; |
| 2894 | int size; | 2860 | int size; |
| @@ -2963,9 +2929,7 @@ window_min_size_1 (w, width_p, safe_p) | |||
| 2963 | to 1 if W is fixed-size unless FIXED is null. */ | 2929 | to 1 if W is fixed-size unless FIXED is null. */ |
| 2964 | 2930 | ||
| 2965 | static int | 2931 | static int |
| 2966 | window_min_size (w, width_p, safe_p, ignore_fixed_p, fixed) | 2932 | window_min_size (struct window *w, int width_p, int safe_p, int ignore_fixed_p, int *fixed) |
| 2967 | struct window *w; | ||
| 2968 | int width_p, safe_p, ignore_fixed_p, *fixed; | ||
| 2969 | { | 2933 | { |
| 2970 | int size, fixed_p; | 2934 | int size, fixed_p; |
| 2971 | 2935 | ||
| @@ -2991,8 +2955,7 @@ window_min_size (w, width_p, safe_p, ignore_fixed_p, fixed) | |||
| 2991 | is still too narrow. */ | 2955 | is still too narrow. */ |
| 2992 | 2956 | ||
| 2993 | static int | 2957 | static int |
| 2994 | adjust_window_margins (w) | 2958 | adjust_window_margins (struct window *w) |
| 2995 | struct window *w; | ||
| 2996 | { | 2959 | { |
| 2997 | int box_cols = (WINDOW_TOTAL_COLS (w) | 2960 | int box_cols = (WINDOW_TOTAL_COLS (w) |
| 2998 | - WINDOW_FRINGE_COLS (w) | 2961 | - WINDOW_FRINGE_COLS (w) |
| @@ -3190,10 +3153,7 @@ shrink_windows (total, size, nchildren, shrinkable, resize_fixed_p, | |||
| 3190 | This should give better behavior when resizing frames. */ | 3153 | This should give better behavior when resizing frames. */ |
| 3191 | 3154 | ||
| 3192 | static void | 3155 | static void |
| 3193 | size_window (window, size, width_p, nodelete_p, first_only, last_only) | 3156 | size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int first_only, int last_only) |
| 3194 | Lisp_Object window; | ||
| 3195 | int size, width_p, nodelete_p; | ||
| 3196 | int first_only, last_only; | ||
| 3197 | { | 3157 | { |
| 3198 | struct window *w = XWINDOW (window); | 3158 | struct window *w = XWINDOW (window); |
| 3199 | struct window *c; | 3159 | struct window *c; |
| @@ -3384,10 +3344,7 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) | |||
| 3384 | displayed correctly. */ | 3344 | displayed correctly. */ |
| 3385 | 3345 | ||
| 3386 | void | 3346 | void |
| 3387 | set_window_height (window, height, nodelete) | 3347 | set_window_height (Lisp_Object window, int height, int nodelete) |
| 3388 | Lisp_Object window; | ||
| 3389 | int height; | ||
| 3390 | int nodelete; | ||
| 3391 | { | 3348 | { |
| 3392 | size_window (window, height, 0, nodelete, 0, 0); | 3349 | size_window (window, height, 0, nodelete, 0, 0); |
| 3393 | } | 3350 | } |
| @@ -3401,10 +3358,7 @@ set_window_height (window, height, nodelete) | |||
| 3401 | displayed correctly. */ | 3358 | displayed correctly. */ |
| 3402 | 3359 | ||
| 3403 | void | 3360 | void |
| 3404 | set_window_width (window, width, nodelete) | 3361 | set_window_width (Lisp_Object window, int width, int nodelete) |
| 3405 | Lisp_Object window; | ||
| 3406 | int width; | ||
| 3407 | int nodelete; | ||
| 3408 | { | 3362 | { |
| 3409 | size_window (window, width, 1, nodelete, 0, 0); | 3363 | size_window (window, width, 1, nodelete, 0, 0); |
| 3410 | } | 3364 | } |
| @@ -3412,9 +3366,7 @@ set_window_width (window, width, nodelete) | |||
| 3412 | /* Change window heights in windows rooted in WINDOW by N lines. */ | 3366 | /* Change window heights in windows rooted in WINDOW by N lines. */ |
| 3413 | 3367 | ||
| 3414 | void | 3368 | void |
| 3415 | change_window_heights (window, n) | 3369 | change_window_heights (Lisp_Object window, int n) |
| 3416 | Lisp_Object window; | ||
| 3417 | int n; | ||
| 3418 | { | 3370 | { |
| 3419 | struct window *w = XWINDOW (window); | 3371 | struct window *w = XWINDOW (window); |
| 3420 | 3372 | ||
| @@ -3510,9 +3462,7 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3510 | reset from the buffer's local settings. */ | 3462 | reset from the buffer's local settings. */ |
| 3511 | 3463 | ||
| 3512 | void | 3464 | void |
| 3513 | set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | 3465 | set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int keep_margins_p) |
| 3514 | Lisp_Object window, buffer; | ||
| 3515 | int run_hooks_p, keep_margins_p; | ||
| 3516 | { | 3466 | { |
| 3517 | struct window *w = XWINDOW (window); | 3467 | struct window *w = XWINDOW (window); |
| 3518 | struct buffer *b = XBUFFER (buffer); | 3468 | struct buffer *b = XBUFFER (buffer); |
| @@ -3743,24 +3693,21 @@ selected window before each command. */) | |||
| 3743 | } | 3693 | } |
| 3744 | 3694 | ||
| 3745 | static Lisp_Object | 3695 | static Lisp_Object |
| 3746 | select_window_norecord (window) | 3696 | select_window_norecord (Lisp_Object window) |
| 3747 | Lisp_Object window; | ||
| 3748 | { | 3697 | { |
| 3749 | return WINDOW_LIVE_P (window) | 3698 | return WINDOW_LIVE_P (window) |
| 3750 | ? Fselect_window (window, Qt) : selected_window; | 3699 | ? Fselect_window (window, Qt) : selected_window; |
| 3751 | } | 3700 | } |
| 3752 | 3701 | ||
| 3753 | static Lisp_Object | 3702 | static Lisp_Object |
| 3754 | select_frame_norecord (frame) | 3703 | select_frame_norecord (Lisp_Object frame) |
| 3755 | Lisp_Object frame; | ||
| 3756 | { | 3704 | { |
| 3757 | return FRAME_LIVE_P (XFRAME (frame)) | 3705 | return FRAME_LIVE_P (XFRAME (frame)) |
| 3758 | ? Fselect_frame (frame, Qt) : selected_frame; | 3706 | ? Fselect_frame (frame, Qt) : selected_frame; |
| 3759 | } | 3707 | } |
| 3760 | 3708 | ||
| 3761 | Lisp_Object | 3709 | Lisp_Object |
| 3762 | display_buffer (buffer, not_this_window_p, override_frame) | 3710 | display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame) |
| 3763 | Lisp_Object buffer, not_this_window_p, override_frame; | ||
| 3764 | { | 3711 | { |
| 3765 | return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); | 3712 | return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); |
| 3766 | } | 3713 | } |
| @@ -3811,8 +3758,7 @@ displaying that buffer. */) | |||
| 3811 | 3758 | ||
| 3812 | 3759 | ||
| 3813 | void | 3760 | void |
| 3814 | temp_output_buffer_show (buf) | 3761 | temp_output_buffer_show (register Lisp_Object buf) |
| 3815 | register Lisp_Object buf; | ||
| 3816 | { | 3762 | { |
| 3817 | register struct buffer *old = current_buffer; | 3763 | register struct buffer *old = current_buffer; |
| 3818 | register Lisp_Object window; | 3764 | register Lisp_Object window; |
| @@ -3872,8 +3818,7 @@ temp_output_buffer_show (buf) | |||
| 3872 | } | 3818 | } |
| 3873 | 3819 | ||
| 3874 | static void | 3820 | static void |
| 3875 | make_dummy_parent (window) | 3821 | make_dummy_parent (Lisp_Object window) |
| 3876 | Lisp_Object window; | ||
| 3877 | { | 3822 | { |
| 3878 | Lisp_Object new; | 3823 | Lisp_Object new; |
| 3879 | register struct window *o, *p; | 3824 | register struct window *o, *p; |
| @@ -4087,16 +4032,14 @@ fixed size windows is not altered by this function. */) | |||
| 4087 | } | 4032 | } |
| 4088 | 4033 | ||
| 4089 | int | 4034 | int |
| 4090 | window_height (window) | 4035 | window_height (Lisp_Object window) |
| 4091 | Lisp_Object window; | ||
| 4092 | { | 4036 | { |
| 4093 | register struct window *p = XWINDOW (window); | 4037 | register struct window *p = XWINDOW (window); |
| 4094 | return WINDOW_TOTAL_LINES (p); | 4038 | return WINDOW_TOTAL_LINES (p); |
| 4095 | } | 4039 | } |
| 4096 | 4040 | ||
| 4097 | int | 4041 | int |
| 4098 | window_width (window) | 4042 | window_width (Lisp_Object window) |
| 4099 | Lisp_Object window; | ||
| 4100 | { | 4043 | { |
| 4101 | register struct window *p = XWINDOW (window); | 4044 | register struct window *p = XWINDOW (window); |
| 4102 | return WINDOW_TOTAL_COLS (p); | 4045 | return WINDOW_TOTAL_COLS (p); |
| @@ -4118,9 +4061,7 @@ window_width (window) | |||
| 4118 | deleted. */ | 4061 | deleted. */ |
| 4119 | 4062 | ||
| 4120 | static void | 4063 | static void |
| 4121 | enlarge_window (window, delta, horiz_flag) | 4064 | enlarge_window (Lisp_Object window, int delta, int horiz_flag) |
| 4122 | Lisp_Object window; | ||
| 4123 | int delta, horiz_flag; | ||
| 4124 | { | 4065 | { |
| 4125 | Lisp_Object parent, next, prev; | 4066 | Lisp_Object parent, next, prev; |
| 4126 | struct window *p; | 4067 | struct window *p; |
| @@ -4396,9 +4337,7 @@ enlarge_window (window, delta, horiz_flag) | |||
| 4396 | are not deleted; instead, we signal an error. */ | 4337 | are not deleted; instead, we signal an error. */ |
| 4397 | 4338 | ||
| 4398 | static void | 4339 | static void |
| 4399 | adjust_window_trailing_edge (window, delta, horiz_flag) | 4340 | adjust_window_trailing_edge (Lisp_Object window, int delta, int horiz_flag) |
| 4400 | Lisp_Object window; | ||
| 4401 | int delta, horiz_flag; | ||
| 4402 | { | 4341 | { |
| 4403 | Lisp_Object parent, child; | 4342 | Lisp_Object parent, child; |
| 4404 | struct window *p; | 4343 | struct window *p; |
| @@ -4570,9 +4509,7 @@ static int save_restore_orig_size (struct window *, | |||
| 4570 | from lowest windows first. */ | 4509 | from lowest windows first. */ |
| 4571 | 4510 | ||
| 4572 | static void | 4511 | static void |
| 4573 | shrink_window_lowest_first (w, height) | 4512 | shrink_window_lowest_first (struct window *w, int height) |
| 4574 | struct window *w; | ||
| 4575 | int height; | ||
| 4576 | { | 4513 | { |
| 4577 | struct window *c; | 4514 | struct window *c; |
| 4578 | Lisp_Object child; | 4515 | Lisp_Object child; |
| @@ -4654,9 +4591,7 @@ shrink_window_lowest_first (w, height) | |||
| 4654 | stored in orig_top_line and orig_total_lines for all windows. */ | 4591 | stored in orig_top_line and orig_total_lines for all windows. */ |
| 4655 | 4592 | ||
| 4656 | static int | 4593 | static int |
| 4657 | save_restore_orig_size (w, action) | 4594 | save_restore_orig_size (struct window *w, enum save_restore_action action) |
| 4658 | struct window *w; | ||
| 4659 | enum save_restore_action action; | ||
| 4660 | { | 4595 | { |
| 4661 | int success_p = 1; | 4596 | int success_p = 1; |
| 4662 | 4597 | ||
| @@ -4711,9 +4646,7 @@ save_restore_orig_size (w, action) | |||
| 4711 | without deleting other windows. */ | 4646 | without deleting other windows. */ |
| 4712 | 4647 | ||
| 4713 | void | 4648 | void |
| 4714 | grow_mini_window (w, delta) | 4649 | grow_mini_window (struct window *w, int delta) |
| 4715 | struct window *w; | ||
| 4716 | int delta; | ||
| 4717 | { | 4650 | { |
| 4718 | struct frame *f = XFRAME (w->frame); | 4651 | struct frame *f = XFRAME (w->frame); |
| 4719 | struct window *root; | 4652 | struct window *root; |
| @@ -4762,8 +4695,7 @@ grow_mini_window (w, delta) | |||
| 4762 | line. */ | 4695 | line. */ |
| 4763 | 4696 | ||
| 4764 | void | 4697 | void |
| 4765 | shrink_mini_window (w) | 4698 | shrink_mini_window (struct window *w) |
| 4766 | struct window *w; | ||
| 4767 | { | 4699 | { |
| 4768 | struct frame *f = XFRAME (w->frame); | 4700 | struct frame *f = XFRAME (w->frame); |
| 4769 | struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f)); | 4701 | struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f)); |
| @@ -4793,8 +4725,7 @@ shrink_mini_window (w) | |||
| 4793 | the frame are cleared. */ | 4725 | the frame are cleared. */ |
| 4794 | 4726 | ||
| 4795 | void | 4727 | void |
| 4796 | mark_window_cursors_off (w) | 4728 | mark_window_cursors_off (struct window *w) |
| 4797 | struct window *w; | ||
| 4798 | { | 4729 | { |
| 4799 | while (w) | 4730 | while (w) |
| 4800 | { | 4731 | { |
| @@ -4813,8 +4744,7 @@ mark_window_cursors_off (w) | |||
| 4813 | /* Return number of lines of text (not counting mode lines) in W. */ | 4744 | /* Return number of lines of text (not counting mode lines) in W. */ |
| 4814 | 4745 | ||
| 4815 | int | 4746 | int |
| 4816 | window_internal_height (w) | 4747 | window_internal_height (struct window *w) |
| 4817 | struct window *w; | ||
| 4818 | { | 4748 | { |
| 4819 | int ht = XFASTINT (w->total_lines); | 4749 | int ht = XFASTINT (w->total_lines); |
| 4820 | 4750 | ||
| @@ -4841,8 +4771,7 @@ window_internal_height (w) | |||
| 4841 | separating W from the sibling to its right. */ | 4771 | separating W from the sibling to its right. */ |
| 4842 | 4772 | ||
| 4843 | int | 4773 | int |
| 4844 | window_box_text_cols (w) | 4774 | window_box_text_cols (struct window *w) |
| 4845 | struct window *w; | ||
| 4846 | { | 4775 | { |
| 4847 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 4776 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 4848 | int width = XINT (w->total_cols); | 4777 | int width = XINT (w->total_cols); |
| @@ -4879,11 +4808,7 @@ window_box_text_cols (w) | |||
| 4879 | respectively. */ | 4808 | respectively. */ |
| 4880 | 4809 | ||
| 4881 | static void | 4810 | static void |
| 4882 | window_scroll (window, n, whole, noerror) | 4811 | window_scroll (Lisp_Object window, int n, int whole, int noerror) |
| 4883 | Lisp_Object window; | ||
| 4884 | int n; | ||
| 4885 | int whole; | ||
| 4886 | int noerror; | ||
| 4887 | { | 4812 | { |
| 4888 | immediate_quit = 1; | 4813 | immediate_quit = 1; |
| 4889 | 4814 | ||
| @@ -4903,11 +4828,7 @@ window_scroll (window, n, whole, noerror) | |||
| 4903 | descriptions. */ | 4828 | descriptions. */ |
| 4904 | 4829 | ||
| 4905 | static void | 4830 | static void |
| 4906 | window_scroll_pixel_based (window, n, whole, noerror) | 4831 | window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) |
| 4907 | Lisp_Object window; | ||
| 4908 | int n; | ||
| 4909 | int whole; | ||
| 4910 | int noerror; | ||
| 4911 | { | 4832 | { |
| 4912 | struct it it; | 4833 | struct it it; |
| 4913 | struct window *w = XWINDOW (window); | 4834 | struct window *w = XWINDOW (window); |
| @@ -5253,11 +5174,7 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 5253 | See the comment of window_scroll for parameter descriptions. */ | 5174 | See the comment of window_scroll for parameter descriptions. */ |
| 5254 | 5175 | ||
| 5255 | static void | 5176 | static void |
| 5256 | window_scroll_line_based (window, n, whole, noerror) | 5177 | window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror) |
| 5257 | Lisp_Object window; | ||
| 5258 | int n; | ||
| 5259 | int whole; | ||
| 5260 | int noerror; | ||
| 5261 | { | 5178 | { |
| 5262 | register struct window *w = XWINDOW (window); | 5179 | register struct window *w = XWINDOW (window); |
| 5263 | register int opoint = PT, opoint_byte = PT_BYTE; | 5180 | register int opoint = PT, opoint_byte = PT_BYTE; |
| @@ -5415,9 +5332,7 @@ window_scroll_line_based (window, n, whole, noerror) | |||
| 5415 | up. This is the guts of Fscroll_up and Fscroll_down. */ | 5332 | up. This is the guts of Fscroll_up and Fscroll_down. */ |
| 5416 | 5333 | ||
| 5417 | static void | 5334 | static void |
| 5418 | scroll_command (n, direction) | 5335 | scroll_command (Lisp_Object n, int direction) |
| 5419 | Lisp_Object n; | ||
| 5420 | int direction; | ||
| 5421 | { | 5336 | { |
| 5422 | int count = SPECPDL_INDEX (); | 5337 | int count = SPECPDL_INDEX (); |
| 5423 | 5338 | ||
| @@ -5644,8 +5559,7 @@ Returns nil, if selected window is not a minibuffer window. */) | |||
| 5644 | as opposed to its height. */ | 5559 | as opposed to its height. */ |
| 5645 | 5560 | ||
| 5646 | static int | 5561 | static int |
| 5647 | displayed_window_lines (w) | 5562 | displayed_window_lines (struct window *w) |
| 5648 | struct window *w; | ||
| 5649 | { | 5563 | { |
| 5650 | struct it it; | 5564 | struct it it; |
| 5651 | struct text_pos start; | 5565 | struct text_pos start; |
| @@ -6390,8 +6304,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 6390 | by setting their buffers to nil. */ | 6304 | by setting their buffers to nil. */ |
| 6391 | 6305 | ||
| 6392 | void | 6306 | void |
| 6393 | delete_all_subwindows (w) | 6307 | delete_all_subwindows (register struct window *w) |
| 6394 | register struct window *w; | ||
| 6395 | { | 6308 | { |
| 6396 | if (!NILP (w->next)) | 6309 | if (!NILP (w->next)) |
| 6397 | delete_all_subwindows (XWINDOW (w->next)); | 6310 | delete_all_subwindows (XWINDOW (w->next)); |
| @@ -6417,8 +6330,7 @@ delete_all_subwindows (w) | |||
| 6417 | } | 6330 | } |
| 6418 | 6331 | ||
| 6419 | static int | 6332 | static int |
| 6420 | count_windows (window) | 6333 | count_windows (register struct window *window) |
| 6421 | register struct window *window; | ||
| 6422 | { | 6334 | { |
| 6423 | register int count = 1; | 6335 | register int count = 1; |
| 6424 | if (!NILP (window->next)) | 6336 | if (!NILP (window->next)) |
| @@ -6435,10 +6347,7 @@ count_windows (window) | |||
| 6435 | Value is last index + 1. */ | 6347 | Value is last index + 1. */ |
| 6436 | 6348 | ||
| 6437 | static int | 6349 | static int |
| 6438 | get_leaf_windows (w, flat, i) | 6350 | get_leaf_windows (struct window *w, struct window **flat, int i) |
| 6439 | struct window *w; | ||
| 6440 | struct window **flat; | ||
| 6441 | int i; | ||
| 6442 | { | 6351 | { |
| 6443 | while (w) | 6352 | while (w) |
| 6444 | { | 6353 | { |
| @@ -6461,8 +6370,7 @@ get_leaf_windows (w, flat, i) | |||
| 6461 | can be returned. */ | 6370 | can be returned. */ |
| 6462 | 6371 | ||
| 6463 | struct glyph * | 6372 | struct glyph * |
| 6464 | get_phys_cursor_glyph (w) | 6373 | get_phys_cursor_glyph (struct window *w) |
| 6465 | struct window *w; | ||
| 6466 | { | 6374 | { |
| 6467 | struct glyph_row *row; | 6375 | struct glyph_row *row; |
| 6468 | struct glyph *glyph; | 6376 | struct glyph *glyph; |
| @@ -6481,10 +6389,7 @@ get_phys_cursor_glyph (w) | |||
| 6481 | 6389 | ||
| 6482 | 6390 | ||
| 6483 | static int | 6391 | static int |
| 6484 | save_window_save (window, vector, i) | 6392 | save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) |
| 6485 | Lisp_Object window; | ||
| 6486 | struct Lisp_Vector *vector; | ||
| 6487 | int i; | ||
| 6488 | { | 6393 | { |
| 6489 | register struct saved_window *p; | 6394 | register struct saved_window *p; |
| 6490 | register struct window *w; | 6395 | register struct window *w; |
| @@ -6642,8 +6547,7 @@ usage: (save-window-excursion BODY...) */) | |||
| 6642 | ***********************************************************************/ | 6547 | ***********************************************************************/ |
| 6643 | 6548 | ||
| 6644 | static Lisp_Object | 6549 | static Lisp_Object |
| 6645 | window_tree (w) | 6550 | window_tree (struct window *w) |
| 6646 | struct window *w; | ||
| 6647 | { | 6551 | { |
| 6648 | Lisp_Object tail = Qnil; | 6552 | Lisp_Object tail = Qnil; |
| 6649 | Lisp_Object result = Qnil; | 6553 | Lisp_Object result = Qnil; |
| @@ -7010,10 +6914,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) | |||
| 7010 | additional argument USER_DATA. Stops when FN returns 0. */ | 6914 | additional argument USER_DATA. Stops when FN returns 0. */ |
| 7011 | 6915 | ||
| 7012 | void | 6916 | void |
| 7013 | foreach_window (f, fn, user_data) | 6917 | foreach_window (struct frame *f, int (*fn) (struct window *, void *), void *user_data) |
| 7014 | struct frame *f; | ||
| 7015 | int (* fn) (struct window *, void *); | ||
| 7016 | void *user_data; | ||
| 7017 | { | 6918 | { |
| 7018 | /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ | 6919 | /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ |
| 7019 | if (WINDOWP (FRAME_ROOT_WINDOW (f))) | 6920 | if (WINDOWP (FRAME_ROOT_WINDOW (f))) |
| @@ -7027,10 +6928,7 @@ foreach_window (f, fn, user_data) | |||
| 7027 | Stop when FN returns 0. Value is 0 if stopped by FN. */ | 6928 | Stop when FN returns 0. Value is 0 if stopped by FN. */ |
| 7028 | 6929 | ||
| 7029 | static int | 6930 | static int |
| 7030 | foreach_window_1 (w, fn, user_data) | 6931 | foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *user_data) |
| 7031 | struct window *w; | ||
| 7032 | int (* fn) (struct window *, void *); | ||
| 7033 | void *user_data; | ||
| 7034 | { | 6932 | { |
| 7035 | int cont; | 6933 | int cont; |
| 7036 | 6934 | ||
| @@ -7055,9 +6953,7 @@ foreach_window_1 (w, fn, user_data) | |||
| 7055 | the window start. */ | 6953 | the window start. */ |
| 7056 | 6954 | ||
| 7057 | static int | 6955 | static int |
| 7058 | freeze_window_start (w, freeze_p) | 6956 | freeze_window_start (struct window *w, void *freeze_p) |
| 7059 | struct window *w; | ||
| 7060 | void *freeze_p; | ||
| 7061 | { | 6957 | { |
| 7062 | if (MINI_WINDOW_P (w) | 6958 | if (MINI_WINDOW_P (w) |
| 7063 | || (WINDOWP (selected_window) /* Can be nil in corner cases. */ | 6959 | || (WINDOWP (selected_window) /* Can be nil in corner cases. */ |
| @@ -7077,9 +6973,7 @@ freeze_window_start (w, freeze_p) | |||
| 7077 | means freeze the window start. */ | 6973 | means freeze the window start. */ |
| 7078 | 6974 | ||
| 7079 | void | 6975 | void |
| 7080 | freeze_window_starts (f, freeze_p) | 6976 | freeze_window_starts (struct frame *f, int freeze_p) |
| 7081 | struct frame *f; | ||
| 7082 | int freeze_p; | ||
| 7083 | { | 6977 | { |
| 7084 | foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0)); | 6978 | foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0)); |
| 7085 | } | 6979 | } |
| @@ -7093,9 +6987,7 @@ freeze_window_starts (f, freeze_p) | |||
| 7093 | describe the same state of affairs. This is used by Fequal. */ | 6987 | describe the same state of affairs. This is used by Fequal. */ |
| 7094 | 6988 | ||
| 7095 | int | 6989 | int |
| 7096 | compare_window_configurations (c1, c2, ignore_positions) | 6990 | compare_window_configurations (Lisp_Object c1, Lisp_Object c2, int ignore_positions) |
| 7097 | Lisp_Object c1, c2; | ||
| 7098 | int ignore_positions; | ||
| 7099 | { | 6991 | { |
| 7100 | register struct save_window_data *d1, *d2; | 6992 | register struct save_window_data *d1, *d2; |
| 7101 | struct Lisp_Vector *sw1, *sw2; | 6993 | struct Lisp_Vector *sw1, *sw2; |
| @@ -7221,7 +7113,7 @@ and scrolling positions. */) | |||
| 7221 | } | 7113 | } |
| 7222 | 7114 | ||
| 7223 | void | 7115 | void |
| 7224 | init_window_once () | 7116 | init_window_once (void) |
| 7225 | { | 7117 | { |
| 7226 | struct frame *f = make_initial_frame (); | 7118 | struct frame *f = make_initial_frame (); |
| 7227 | XSETFRAME (selected_frame, f); | 7119 | XSETFRAME (selected_frame, f); |
| @@ -7234,13 +7126,13 @@ init_window_once () | |||
| 7234 | } | 7126 | } |
| 7235 | 7127 | ||
| 7236 | void | 7128 | void |
| 7237 | init_window () | 7129 | init_window (void) |
| 7238 | { | 7130 | { |
| 7239 | Vwindow_list = Qnil; | 7131 | Vwindow_list = Qnil; |
| 7240 | } | 7132 | } |
| 7241 | 7133 | ||
| 7242 | void | 7134 | void |
| 7243 | syms_of_window () | 7135 | syms_of_window (void) |
| 7244 | { | 7136 | { |
| 7245 | Qscroll_up = intern_c_string ("scroll-up"); | 7137 | Qscroll_up = intern_c_string ("scroll-up"); |
| 7246 | staticpro (&Qscroll_up); | 7138 | staticpro (&Qscroll_up); |
| @@ -7449,7 +7341,7 @@ frame to be redrawn only if it is a tty frame. */); | |||
| 7449 | } | 7341 | } |
| 7450 | 7342 | ||
| 7451 | void | 7343 | void |
| 7452 | keys_of_window () | 7344 | keys_of_window (void) |
| 7453 | { | 7345 | { |
| 7454 | initial_define_key (control_x_map, '1', "delete-other-windows"); | 7346 | initial_define_key (control_x_map, '1', "delete-other-windows"); |
| 7455 | initial_define_key (control_x_map, '2', "split-window"); | 7347 | initial_define_key (control_x_map, '2', "split-window"); |
diff --git a/src/xfaces.c b/src/xfaces.c index 79eb20febc0..79978f4665b 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -656,10 +656,7 @@ DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, | |||
| 656 | is called. */ | 656 | is called. */ |
| 657 | 657 | ||
| 658 | void | 658 | void |
| 659 | x_free_colors (f, pixels, npixels) | 659 | x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) |
| 660 | struct frame *f; | ||
| 661 | unsigned long *pixels; | ||
| 662 | int npixels; | ||
| 663 | { | 660 | { |
| 664 | int class = FRAME_X_DISPLAY_INFO (f)->visual->class; | 661 | int class = FRAME_X_DISPLAY_INFO (f)->visual->class; |
| 665 | 662 | ||
| @@ -681,12 +678,7 @@ x_free_colors (f, pixels, npixels) | |||
| 681 | is called. */ | 678 | is called. */ |
| 682 | 679 | ||
| 683 | void | 680 | void |
| 684 | x_free_dpy_colors (dpy, screen, cmap, pixels, npixels) | 681 | x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, long unsigned int *pixels, int npixels) |
| 685 | Display *dpy; | ||
| 686 | Screen *screen; | ||
| 687 | Colormap cmap; | ||
| 688 | unsigned long *pixels; | ||
| 689 | int npixels; | ||
| 690 | { | 682 | { |
| 691 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); | 683 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); |
| 692 | int class = dpyinfo->visual->class; | 684 | int class = dpyinfo->visual->class; |
| @@ -707,10 +699,7 @@ x_free_dpy_colors (dpy, screen, cmap, pixels, npixels) | |||
| 707 | are given by XGCV and MASK. */ | 699 | are given by XGCV and MASK. */ |
| 708 | 700 | ||
| 709 | static INLINE GC | 701 | static INLINE GC |
| 710 | x_create_gc (f, mask, xgcv) | 702 | x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv) |
| 711 | struct frame *f; | ||
| 712 | unsigned long mask; | ||
| 713 | XGCValues *xgcv; | ||
| 714 | { | 703 | { |
| 715 | GC gc; | 704 | GC gc; |
| 716 | BLOCK_INPUT; | 705 | BLOCK_INPUT; |
| @@ -724,9 +713,7 @@ x_create_gc (f, mask, xgcv) | |||
| 724 | /* Free GC which was used on frame F. */ | 713 | /* Free GC which was used on frame F. */ |
| 725 | 714 | ||
| 726 | static INLINE void | 715 | static INLINE void |
| 727 | x_free_gc (f, gc) | 716 | x_free_gc (struct frame *f, GC gc) |
| 728 | struct frame *f; | ||
| 729 | GC gc; | ||
| 730 | { | 717 | { |
| 731 | eassert (interrupt_input_blocked); | 718 | eassert (interrupt_input_blocked); |
| 732 | IF_DEBUG (xassert (--ngcs >= 0)); | 719 | IF_DEBUG (xassert (--ngcs >= 0)); |
| @@ -794,8 +781,7 @@ x_free_gc (f, gc) | |||
| 794 | are in ISO8859-1. */ | 781 | are in ISO8859-1. */ |
| 795 | 782 | ||
| 796 | int | 783 | int |
| 797 | xstrcasecmp (s1, s2) | 784 | xstrcasecmp (const unsigned char *s1, const unsigned char *s2) |
| 798 | const unsigned char *s1, *s2; | ||
| 799 | { | 785 | { |
| 800 | while (*s1 && *s2) | 786 | while (*s1 && *s2) |
| 801 | { | 787 | { |
| @@ -819,9 +805,7 @@ xstrcasecmp (s1, s2) | |||
| 819 | Lisp function definitions. */ | 805 | Lisp function definitions. */ |
| 820 | 806 | ||
| 821 | static INLINE struct frame * | 807 | static INLINE struct frame * |
| 822 | frame_or_selected_frame (frame, nparam) | 808 | frame_or_selected_frame (Lisp_Object frame, int nparam) |
| 823 | Lisp_Object frame; | ||
| 824 | int nparam; | ||
| 825 | { | 809 | { |
| 826 | if (NILP (frame)) | 810 | if (NILP (frame)) |
| 827 | frame = selected_frame; | 811 | frame = selected_frame; |
| @@ -838,8 +822,7 @@ frame_or_selected_frame (frame, nparam) | |||
| 838 | /* Initialize face cache and basic faces for frame F. */ | 822 | /* Initialize face cache and basic faces for frame F. */ |
| 839 | 823 | ||
| 840 | void | 824 | void |
| 841 | init_frame_faces (f) | 825 | init_frame_faces (struct frame *f) |
| 842 | struct frame *f; | ||
| 843 | { | 826 | { |
| 844 | /* Make a face cache, if F doesn't have one. */ | 827 | /* Make a face cache, if F doesn't have one. */ |
| 845 | if (FRAME_FACE_CACHE (f) == NULL) | 828 | if (FRAME_FACE_CACHE (f) == NULL) |
| @@ -877,8 +860,7 @@ init_frame_faces (f) | |||
| 877 | /* Free face cache of frame F. Called from delete_frame. */ | 860 | /* Free face cache of frame F. Called from delete_frame. */ |
| 878 | 861 | ||
| 879 | void | 862 | void |
| 880 | free_frame_faces (f) | 863 | free_frame_faces (struct frame *f) |
| 881 | struct frame *f; | ||
| 882 | { | 864 | { |
| 883 | struct face_cache *face_cache = FRAME_FACE_CACHE (f); | 865 | struct face_cache *face_cache = FRAME_FACE_CACHE (f); |
| 884 | 866 | ||
| @@ -909,8 +891,7 @@ free_frame_faces (f) | |||
| 909 | of named faces. */ | 891 | of named faces. */ |
| 910 | 892 | ||
| 911 | void | 893 | void |
| 912 | recompute_basic_faces (f) | 894 | recompute_basic_faces (struct frame *f) |
| 913 | struct frame *f; | ||
| 914 | { | 895 | { |
| 915 | if (FRAME_FACE_CACHE (f)) | 896 | if (FRAME_FACE_CACHE (f)) |
| 916 | { | 897 | { |
| @@ -925,8 +906,7 @@ recompute_basic_faces (f) | |||
| 925 | try to free unused fonts, too. */ | 906 | try to free unused fonts, too. */ |
| 926 | 907 | ||
| 927 | void | 908 | void |
| 928 | clear_face_cache (clear_fonts_p) | 909 | clear_face_cache (int clear_fonts_p) |
| 929 | int clear_fonts_p; | ||
| 930 | { | 910 | { |
| 931 | #ifdef HAVE_WINDOW_SYSTEM | 911 | #ifdef HAVE_WINDOW_SYSTEM |
| 932 | Lisp_Object tail, frame; | 912 | Lisp_Object tail, frame; |
| @@ -1045,10 +1025,7 @@ the pixmap. Bits are stored row by row, each row occupies | |||
| 1045 | if these pointers are not null. */ | 1025 | if these pointers are not null. */ |
| 1046 | 1026 | ||
| 1047 | static int | 1027 | static int |
| 1048 | load_pixmap (f, name, w_ptr, h_ptr) | 1028 | load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr) |
| 1049 | FRAME_PTR f; | ||
| 1050 | Lisp_Object name; | ||
| 1051 | unsigned int *w_ptr, *h_ptr; | ||
| 1052 | { | 1029 | { |
| 1053 | int bitmap_id; | 1030 | int bitmap_id; |
| 1054 | 1031 | ||
| @@ -1117,9 +1094,7 @@ load_pixmap (f, name, w_ptr, h_ptr) | |||
| 1117 | Return 0 if there's a problem with RGB_LIST, otherwise return 1. */ | 1094 | Return 0 if there's a problem with RGB_LIST, otherwise return 1. */ |
| 1118 | 1095 | ||
| 1119 | static int | 1096 | static int |
| 1120 | parse_rgb_list (rgb_list, color) | 1097 | parse_rgb_list (Lisp_Object rgb_list, XColor *color) |
| 1121 | Lisp_Object rgb_list; | ||
| 1122 | XColor *color; | ||
| 1123 | { | 1098 | { |
| 1124 | #define PARSE_RGB_LIST_FIELD(field) \ | 1099 | #define PARSE_RGB_LIST_FIELD(field) \ |
| 1125 | if (CONSP (rgb_list) && INTEGERP (XCAR (rgb_list))) \ | 1100 | if (CONSP (rgb_list) && INTEGERP (XCAR (rgb_list))) \ |
| @@ -1144,10 +1119,7 @@ parse_rgb_list (rgb_list, color) | |||
| 1144 | returned in it. */ | 1119 | returned in it. */ |
| 1145 | 1120 | ||
| 1146 | static int | 1121 | static int |
| 1147 | tty_lookup_color (f, color, tty_color, std_color) | 1122 | tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor *std_color) |
| 1148 | struct frame *f; | ||
| 1149 | Lisp_Object color; | ||
| 1150 | XColor *tty_color, *std_color; | ||
| 1151 | { | 1123 | { |
| 1152 | Lisp_Object frame, color_desc; | 1124 | Lisp_Object frame, color_desc; |
| 1153 | 1125 | ||
| @@ -1207,11 +1179,7 @@ tty_lookup_color (f, color, tty_color, std_color) | |||
| 1207 | /* A version of defined_color for non-X frames. */ | 1179 | /* A version of defined_color for non-X frames. */ |
| 1208 | 1180 | ||
| 1209 | int | 1181 | int |
| 1210 | tty_defined_color (f, color_name, color_def, alloc) | 1182 | tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc) |
| 1211 | struct frame *f; | ||
| 1212 | char *color_name; | ||
| 1213 | XColor *color_def; | ||
| 1214 | int alloc; | ||
| 1215 | { | 1183 | { |
| 1216 | int status = 1; | 1184 | int status = 1; |
| 1217 | 1185 | ||
| @@ -1246,11 +1214,7 @@ tty_defined_color (f, color_name, color_def, alloc) | |||
| 1246 | This does the right thing for any type of frame. */ | 1214 | This does the right thing for any type of frame. */ |
| 1247 | 1215 | ||
| 1248 | int | 1216 | int |
| 1249 | defined_color (f, color_name, color_def, alloc) | 1217 | defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc) |
| 1250 | struct frame *f; | ||
| 1251 | char *color_name; | ||
| 1252 | XColor *color_def; | ||
| 1253 | int alloc; | ||
| 1254 | { | 1218 | { |
| 1255 | if (!FRAME_WINDOW_P (f)) | 1219 | if (!FRAME_WINDOW_P (f)) |
| 1256 | return tty_defined_color (f, color_name, color_def, alloc); | 1220 | return tty_defined_color (f, color_name, color_def, alloc); |
| @@ -1275,9 +1239,7 @@ defined_color (f, color_name, color_def, alloc) | |||
| 1275 | Lisp string. */ | 1239 | Lisp string. */ |
| 1276 | 1240 | ||
| 1277 | Lisp_Object | 1241 | Lisp_Object |
| 1278 | tty_color_name (f, idx) | 1242 | tty_color_name (struct frame *f, int idx) |
| 1279 | struct frame *f; | ||
| 1280 | int idx; | ||
| 1281 | { | 1243 | { |
| 1282 | if (idx >= 0 && !NILP (Ffboundp (Qtty_color_by_index))) | 1244 | if (idx >= 0 && !NILP (Ffboundp (Qtty_color_by_index))) |
| 1283 | { | 1245 | { |
| @@ -1312,9 +1274,7 @@ tty_color_name (f, idx) | |||
| 1312 | The criterion implemented here is not a terribly sophisticated one. */ | 1274 | The criterion implemented here is not a terribly sophisticated one. */ |
| 1313 | 1275 | ||
| 1314 | static int | 1276 | static int |
| 1315 | face_color_gray_p (f, color_name) | 1277 | face_color_gray_p (struct frame *f, char *color_name) |
| 1316 | struct frame *f; | ||
| 1317 | char *color_name; | ||
| 1318 | { | 1278 | { |
| 1319 | XColor color; | 1279 | XColor color; |
| 1320 | int gray_p; | 1280 | int gray_p; |
| @@ -1341,10 +1301,7 @@ face_color_gray_p (f, color_name) | |||
| 1341 | color. */ | 1301 | color. */ |
| 1342 | 1302 | ||
| 1343 | static int | 1303 | static int |
| 1344 | face_color_supported_p (f, color_name, background_p) | 1304 | face_color_supported_p (struct frame *f, char *color_name, int background_p) |
| 1345 | struct frame *f; | ||
| 1346 | char *color_name; | ||
| 1347 | int background_p; | ||
| 1348 | { | 1305 | { |
| 1349 | Lisp_Object frame; | 1306 | Lisp_Object frame; |
| 1350 | XColor not_used; | 1307 | XColor not_used; |
| @@ -1419,11 +1376,7 @@ COLOR must be a valid color name. */) | |||
| 1419 | these colors. */ | 1376 | these colors. */ |
| 1420 | 1377 | ||
| 1421 | unsigned long | 1378 | unsigned long |
| 1422 | load_color (f, face, name, target_index) | 1379 | load_color (struct frame *f, struct face *face, Lisp_Object name, enum lface_attribute_index target_index) |
| 1423 | struct frame *f; | ||
| 1424 | struct face *face; | ||
| 1425 | Lisp_Object name; | ||
| 1426 | enum lface_attribute_index target_index; | ||
| 1427 | { | 1380 | { |
| 1428 | XColor color; | 1381 | XColor color; |
| 1429 | 1382 | ||
| @@ -1494,10 +1447,7 @@ load_color (f, face, name, target_index) | |||
| 1494 | try to emulate gray colors with a stipple from Vface_default_stipple. */ | 1447 | try to emulate gray colors with a stipple from Vface_default_stipple. */ |
| 1495 | 1448 | ||
| 1496 | static void | 1449 | static void |
| 1497 | load_face_colors (f, face, attrs) | 1450 | load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs) |
| 1498 | struct frame *f; | ||
| 1499 | struct face *face; | ||
| 1500 | Lisp_Object *attrs; | ||
| 1501 | { | 1451 | { |
| 1502 | Lisp_Object fg, bg; | 1452 | Lisp_Object fg, bg; |
| 1503 | 1453 | ||
| @@ -1533,9 +1483,7 @@ load_face_colors (f, face, attrs) | |||
| 1533 | /* Free color PIXEL on frame F. */ | 1483 | /* Free color PIXEL on frame F. */ |
| 1534 | 1484 | ||
| 1535 | void | 1485 | void |
| 1536 | unload_color (f, pixel) | 1486 | unload_color (struct frame *f, long unsigned int pixel) |
| 1537 | struct frame *f; | ||
| 1538 | unsigned long pixel; | ||
| 1539 | { | 1487 | { |
| 1540 | #ifdef HAVE_X_WINDOWS | 1488 | #ifdef HAVE_X_WINDOWS |
| 1541 | if (pixel != -1) | 1489 | if (pixel != -1) |
| @@ -1551,9 +1499,7 @@ unload_color (f, pixel) | |||
| 1551 | /* Free colors allocated for FACE. */ | 1499 | /* Free colors allocated for FACE. */ |
| 1552 | 1500 | ||
| 1553 | static void | 1501 | static void |
| 1554 | free_face_colors (f, face) | 1502 | free_face_colors (struct frame *f, struct face *face) |
| 1555 | struct frame *f; | ||
| 1556 | struct face *face; | ||
| 1557 | { | 1503 | { |
| 1558 | /* PENDING(NS): need to do something here? */ | 1504 | /* PENDING(NS): need to do something here? */ |
| 1559 | #ifdef HAVE_X_WINDOWS | 1505 | #ifdef HAVE_X_WINDOWS |
| @@ -1693,8 +1639,7 @@ static int font_sort_order[4]; | |||
| 1693 | static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX]; | 1639 | static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX]; |
| 1694 | 1640 | ||
| 1695 | static int | 1641 | static int |
| 1696 | compare_fonts_by_sort_order (v1, v2) | 1642 | compare_fonts_by_sort_order (const void *v1, const void *v2) |
| 1697 | const void *v1, *v2; | ||
| 1698 | { | 1643 | { |
| 1699 | Lisp_Object font1 = *(Lisp_Object *) v1; | 1644 | Lisp_Object font1 = *(Lisp_Object *) v1; |
| 1700 | Lisp_Object font2 = *(Lisp_Object *) v2; | 1645 | Lisp_Object font2 = *(Lisp_Object *) v2; |
| @@ -2150,9 +2095,7 @@ resolve_face_name_error (ignore) | |||
| 2150 | Return default face in case of errors. */ | 2095 | Return default face in case of errors. */ |
| 2151 | 2096 | ||
| 2152 | static Lisp_Object | 2097 | static Lisp_Object |
| 2153 | resolve_face_name (face_name, signal_p) | 2098 | resolve_face_name (Lisp_Object face_name, int signal_p) |
| 2154 | Lisp_Object face_name; | ||
| 2155 | int signal_p; | ||
| 2156 | { | 2099 | { |
| 2157 | Lisp_Object orig_face; | 2100 | Lisp_Object orig_face; |
| 2158 | Lisp_Object tortoise, hare; | 2101 | Lisp_Object tortoise, hare; |
| @@ -2198,10 +2141,7 @@ resolve_face_name (face_name, signal_p) | |||
| 2198 | signal an error if FACE_NAME is not a valid face name. If SIGNAL_P | 2141 | signal an error if FACE_NAME is not a valid face name. If SIGNAL_P |
| 2199 | is zero, value is nil if FACE_NAME is not a valid face name. */ | 2142 | is zero, value is nil if FACE_NAME is not a valid face name. */ |
| 2200 | static INLINE Lisp_Object | 2143 | static INLINE Lisp_Object |
| 2201 | lface_from_face_name_no_resolve (f, face_name, signal_p) | 2144 | lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, int signal_p) |
| 2202 | struct frame *f; | ||
| 2203 | Lisp_Object face_name; | ||
| 2204 | int signal_p; | ||
| 2205 | { | 2145 | { |
| 2206 | Lisp_Object lface; | 2146 | Lisp_Object lface; |
| 2207 | 2147 | ||
| @@ -2229,10 +2169,7 @@ lface_from_face_name_no_resolve (f, face_name, signal_p) | |||
| 2229 | If SIGNAL_P is zero, value is nil if FACE_NAME is not a valid face | 2169 | If SIGNAL_P is zero, value is nil if FACE_NAME is not a valid face |
| 2230 | name. */ | 2170 | name. */ |
| 2231 | static INLINE Lisp_Object | 2171 | static INLINE Lisp_Object |
| 2232 | lface_from_face_name (f, face_name, signal_p) | 2172 | lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p) |
| 2233 | struct frame *f; | ||
| 2234 | Lisp_Object face_name; | ||
| 2235 | int signal_p; | ||
| 2236 | { | 2173 | { |
| 2237 | face_name = resolve_face_name (face_name, signal_p); | 2174 | face_name = resolve_face_name (face_name, signal_p); |
| 2238 | return lface_from_face_name_no_resolve (f, face_name, signal_p); | 2175 | return lface_from_face_name_no_resolve (f, face_name, signal_p); |
| @@ -2246,11 +2183,7 @@ lface_from_face_name (f, face_name, signal_p) | |||
| 2246 | Otherwise, value is zero if FACE_NAME is not a face. */ | 2183 | Otherwise, value is zero if FACE_NAME is not a face. */ |
| 2247 | 2184 | ||
| 2248 | static INLINE int | 2185 | static INLINE int |
| 2249 | get_lface_attributes_no_remap (f, face_name, attrs, signal_p) | 2186 | get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p) |
| 2250 | struct frame *f; | ||
| 2251 | Lisp_Object face_name; | ||
| 2252 | Lisp_Object *attrs; | ||
| 2253 | int signal_p; | ||
| 2254 | { | 2187 | { |
| 2255 | Lisp_Object lface; | 2188 | Lisp_Object lface; |
| 2256 | 2189 | ||
| @@ -2271,12 +2204,7 @@ get_lface_attributes_no_remap (f, face_name, attrs, signal_p) | |||
| 2271 | Otherwise, value is zero if FACE_NAME is not a face. */ | 2204 | Otherwise, value is zero if FACE_NAME is not a face. */ |
| 2272 | 2205 | ||
| 2273 | static INLINE int | 2206 | static INLINE int |
| 2274 | get_lface_attributes (f, face_name, attrs, signal_p, named_merge_points) | 2207 | get_lface_attributes (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p, struct named_merge_point *named_merge_points) |
| 2275 | struct frame *f; | ||
| 2276 | Lisp_Object face_name; | ||
| 2277 | Lisp_Object *attrs; | ||
| 2278 | int signal_p; | ||
| 2279 | struct named_merge_point *named_merge_points; | ||
| 2280 | { | 2208 | { |
| 2281 | Lisp_Object face_remapping; | 2209 | Lisp_Object face_remapping; |
| 2282 | 2210 | ||
| @@ -2312,8 +2240,7 @@ get_lface_attributes (f, face_name, attrs, signal_p, named_merge_points) | |||
| 2312 | specified, i.e. are non-nil. */ | 2240 | specified, i.e. are non-nil. */ |
| 2313 | 2241 | ||
| 2314 | static int | 2242 | static int |
| 2315 | lface_fully_specified_p (attrs) | 2243 | lface_fully_specified_p (Lisp_Object *attrs) |
| 2316 | Lisp_Object *attrs; | ||
| 2317 | { | 2244 | { |
| 2318 | int i; | 2245 | int i; |
| 2319 | 2246 | ||
| @@ -2333,10 +2260,7 @@ lface_fully_specified_p (attrs) | |||
| 2333 | of FORCE_P. */ | 2260 | of FORCE_P. */ |
| 2334 | 2261 | ||
| 2335 | static int | 2262 | static int |
| 2336 | set_lface_from_font (f, lface, font_object, force_p) | 2263 | set_lface_from_font (struct frame *f, Lisp_Object lface, Lisp_Object font_object, int force_p) |
| 2337 | struct frame *f; | ||
| 2338 | Lisp_Object lface, font_object; | ||
| 2339 | int force_p; | ||
| 2340 | { | 2264 | { |
| 2341 | Lisp_Object val; | 2265 | Lisp_Object val; |
| 2342 | struct font *font = XFONT_OBJECT (font_object); | 2266 | struct font *font = XFONT_OBJECT (font_object); |
| @@ -2397,8 +2321,7 @@ set_lface_from_font (f, lface, font_object, force_p) | |||
| 2397 | unless both FROM and TO are relative. */ | 2321 | unless both FROM and TO are relative. */ |
| 2398 | 2322 | ||
| 2399 | Lisp_Object | 2323 | Lisp_Object |
| 2400 | merge_face_heights (from, to, invalid) | 2324 | merge_face_heights (Lisp_Object from, Lisp_Object to, Lisp_Object invalid) |
| 2401 | Lisp_Object from, to, invalid; | ||
| 2402 | { | 2325 | { |
| 2403 | Lisp_Object result = invalid; | 2326 | Lisp_Object result = invalid; |
| 2404 | 2327 | ||
| @@ -2447,10 +2370,7 @@ merge_face_heights (from, to, invalid) | |||
| 2447 | other places. */ | 2370 | other places. */ |
| 2448 | 2371 | ||
| 2449 | static INLINE void | 2372 | static INLINE void |
| 2450 | merge_face_vectors (f, from, to, named_merge_points) | 2373 | merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, struct named_merge_point *named_merge_points) |
| 2451 | struct frame *f; | ||
| 2452 | Lisp_Object *from, *to; | ||
| 2453 | struct named_merge_point *named_merge_points; | ||
| 2454 | { | 2374 | { |
| 2455 | int i; | 2375 | int i; |
| 2456 | 2376 | ||
| @@ -2517,11 +2437,7 @@ merge_face_vectors (f, from, to, named_merge_points) | |||
| 2517 | merging succeeded. */ | 2437 | merging succeeded. */ |
| 2518 | 2438 | ||
| 2519 | static int | 2439 | static int |
| 2520 | merge_named_face (f, face_name, to, named_merge_points) | 2440 | merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, struct named_merge_point *named_merge_points) |
| 2521 | struct frame *f; | ||
| 2522 | Lisp_Object face_name; | ||
| 2523 | Lisp_Object *to; | ||
| 2524 | struct named_merge_point *named_merge_points; | ||
| 2525 | { | 2441 | { |
| 2526 | struct named_merge_point named_merge_point; | 2442 | struct named_merge_point named_merge_point; |
| 2527 | 2443 | ||
| @@ -2571,12 +2487,7 @@ merge_named_face (f, face_name, to, named_merge_points) | |||
| 2571 | specifications. */ | 2487 | specifications. */ |
| 2572 | 2488 | ||
| 2573 | static int | 2489 | static int |
| 2574 | merge_face_ref (f, face_ref, to, err_msgs, named_merge_points) | 2490 | merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, int err_msgs, struct named_merge_point *named_merge_points) |
| 2575 | struct frame *f; | ||
| 2576 | Lisp_Object face_ref; | ||
| 2577 | Lisp_Object *to; | ||
| 2578 | int err_msgs; | ||
| 2579 | struct named_merge_point *named_merge_points; | ||
| 2580 | { | 2491 | { |
| 2581 | int ok = 1; /* Succeed without an error? */ | 2492 | int ok = 1; /* Succeed without an error? */ |
| 2582 | 2493 | ||
| @@ -3494,9 +3405,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 3494 | has been assigned the value NEW_VALUE. */ | 3405 | has been assigned the value NEW_VALUE. */ |
| 3495 | 3406 | ||
| 3496 | void | 3407 | void |
| 3497 | update_face_from_frame_parameter (f, param, new_value) | 3408 | update_face_from_frame_parameter (struct frame *f, Lisp_Object param, Lisp_Object new_value) |
| 3498 | struct frame *f; | ||
| 3499 | Lisp_Object param, new_value; | ||
| 3500 | { | 3409 | { |
| 3501 | Lisp_Object face = Qnil; | 3410 | Lisp_Object face = Qnil; |
| 3502 | Lisp_Object lface; | 3411 | Lisp_Object lface; |
| @@ -3575,8 +3484,7 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 3575 | font-object set in `default' face attributes LFACE. */ | 3484 | font-object set in `default' face attributes LFACE. */ |
| 3576 | 3485 | ||
| 3577 | static void | 3486 | static void |
| 3578 | set_font_frame_param (frame, lface) | 3487 | set_font_frame_param (Lisp_Object frame, Lisp_Object lface) |
| 3579 | Lisp_Object frame, lface; | ||
| 3580 | { | 3488 | { |
| 3581 | struct frame *f = XFRAME (frame); | 3489 | struct frame *f = XFRAME (frame); |
| 3582 | Lisp_Object font; | 3490 | Lisp_Object font; |
| @@ -3627,9 +3535,7 @@ DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource, | |||
| 3627 | error; if SIGNAL_P is zero, return 0. */ | 3535 | error; if SIGNAL_P is zero, return 0. */ |
| 3628 | 3536 | ||
| 3629 | static Lisp_Object | 3537 | static Lisp_Object |
| 3630 | face_boolean_x_resource_value (value, signal_p) | 3538 | face_boolean_x_resource_value (Lisp_Object value, int signal_p) |
| 3631 | Lisp_Object value; | ||
| 3632 | int signal_p; | ||
| 3633 | { | 3539 | { |
| 3634 | Lisp_Object result = make_number (0); | 3540 | Lisp_Object result = make_number (0); |
| 3635 | 3541 | ||
| @@ -4075,8 +3981,7 @@ return the font name used for CHARACTER. */) | |||
| 4075 | is called quite often. */ | 3981 | is called quite often. */ |
| 4076 | 3982 | ||
| 4077 | static INLINE int | 3983 | static INLINE int |
| 4078 | face_attr_equal_p (v1, v2) | 3984 | face_attr_equal_p (Lisp_Object v1, Lisp_Object v2) |
| 4079 | Lisp_Object v1, v2; | ||
| 4080 | { | 3985 | { |
| 4081 | /* Type can differ, e.g. when one attribute is unspecified, i.e. nil, | 3986 | /* Type can differ, e.g. when one attribute is unspecified, i.e. nil, |
| 4082 | and the other is specified. */ | 3987 | and the other is specified. */ |
| @@ -4109,8 +4014,7 @@ face_attr_equal_p (v1, v2) | |||
| 4109 | is called quite often. */ | 4014 | is called quite often. */ |
| 4110 | 4015 | ||
| 4111 | static INLINE int | 4016 | static INLINE int |
| 4112 | lface_equal_p (v1, v2) | 4017 | lface_equal_p (Lisp_Object *v1, Lisp_Object *v2) |
| 4113 | Lisp_Object *v1, *v2; | ||
| 4114 | { | 4018 | { |
| 4115 | int i, equal_p = 1; | 4019 | int i, equal_p = 1; |
| 4116 | 4020 | ||
| @@ -4198,8 +4102,7 @@ For internal use only. */) | |||
| 4198 | below in computing a hash value for a Lisp face. */ | 4102 | below in computing a hash value for a Lisp face. */ |
| 4199 | 4103 | ||
| 4200 | static INLINE unsigned | 4104 | static INLINE unsigned |
| 4201 | hash_string_case_insensitive (string) | 4105 | hash_string_case_insensitive (Lisp_Object string) |
| 4202 | Lisp_Object string; | ||
| 4203 | { | 4106 | { |
| 4204 | const unsigned char *s; | 4107 | const unsigned char *s; |
| 4205 | unsigned hash = 0; | 4108 | unsigned hash = 0; |
| @@ -4213,8 +4116,7 @@ hash_string_case_insensitive (string) | |||
| 4213 | /* Return a hash code for face attribute vector V. */ | 4116 | /* Return a hash code for face attribute vector V. */ |
| 4214 | 4117 | ||
| 4215 | static INLINE unsigned | 4118 | static INLINE unsigned |
| 4216 | lface_hash (v) | 4119 | lface_hash (Lisp_Object *v) |
| 4217 | Lisp_Object *v; | ||
| 4218 | { | 4120 | { |
| 4219 | return (hash_string_case_insensitive (v[LFACE_FAMILY_INDEX]) | 4121 | return (hash_string_case_insensitive (v[LFACE_FAMILY_INDEX]) |
| 4220 | ^ hash_string_case_insensitive (v[LFACE_FOUNDRY_INDEX]) | 4122 | ^ hash_string_case_insensitive (v[LFACE_FOUNDRY_INDEX]) |
| @@ -4233,8 +4135,7 @@ lface_hash (v) | |||
| 4233 | LFACE1 and LFACE2 must be fully-specified. */ | 4135 | LFACE1 and LFACE2 must be fully-specified. */ |
| 4234 | 4136 | ||
| 4235 | static INLINE int | 4137 | static INLINE int |
| 4236 | lface_same_font_attributes_p (lface1, lface2) | 4138 | lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) |
| 4237 | Lisp_Object *lface1, *lface2; | ||
| 4238 | { | 4139 | { |
| 4239 | xassert (lface_fully_specified_p (lface1) | 4140 | xassert (lface_fully_specified_p (lface1) |
| 4240 | && lface_fully_specified_p (lface2)); | 4141 | && lface_fully_specified_p (lface2)); |
| @@ -4265,8 +4166,7 @@ lface_same_font_attributes_p (lface1, lface2) | |||
| 4265 | vector ATTR. */ | 4166 | vector ATTR. */ |
| 4266 | 4167 | ||
| 4267 | static struct face * | 4168 | static struct face * |
| 4268 | make_realized_face (attr) | 4169 | make_realized_face (Lisp_Object *attr) |
| 4269 | Lisp_Object *attr; | ||
| 4270 | { | 4170 | { |
| 4271 | struct face *face = (struct face *) xmalloc (sizeof *face); | 4171 | struct face *face = (struct face *) xmalloc (sizeof *face); |
| 4272 | bzero (face, sizeof *face); | 4172 | bzero (face, sizeof *face); |
| @@ -4280,9 +4180,7 @@ make_realized_face (attr) | |||
| 4280 | be null. */ | 4180 | be null. */ |
| 4281 | 4181 | ||
| 4282 | void | 4182 | void |
| 4283 | free_realized_face (f, face) | 4183 | free_realized_face (struct frame *f, struct face *face) |
| 4284 | struct frame *f; | ||
| 4285 | struct face *face; | ||
| 4286 | { | 4184 | { |
| 4287 | if (face) | 4185 | if (face) |
| 4288 | { | 4186 | { |
| @@ -4317,9 +4215,7 @@ free_realized_face (f, face) | |||
| 4317 | by clearing the face cache. */ | 4215 | by clearing the face cache. */ |
| 4318 | 4216 | ||
| 4319 | void | 4217 | void |
| 4320 | prepare_face_for_display (f, face) | 4218 | prepare_face_for_display (struct frame *f, struct face *face) |
| 4321 | struct frame *f; | ||
| 4322 | struct face *face; | ||
| 4323 | { | 4219 | { |
| 4324 | #ifdef HAVE_WINDOW_SYSTEM | 4220 | #ifdef HAVE_WINDOW_SYSTEM |
| 4325 | xassert (FRAME_WINDOW_P (f)); | 4221 | xassert (FRAME_WINDOW_P (f)); |
| @@ -4356,8 +4252,7 @@ prepare_face_for_display (f, face) | |||
| 4356 | /* Returns the `distance' between the colors X and Y. */ | 4252 | /* Returns the `distance' between the colors X and Y. */ |
| 4357 | 4253 | ||
| 4358 | static int | 4254 | static int |
| 4359 | color_distance (x, y) | 4255 | color_distance (XColor *x, XColor *y) |
| 4360 | XColor *x, *y; | ||
| 4361 | { | 4256 | { |
| 4362 | /* This formula is from a paper title `Colour metric' by Thiadmer Riemersma. | 4257 | /* This formula is from a paper title `Colour metric' by Thiadmer Riemersma. |
| 4363 | Quoting from that paper: | 4258 | Quoting from that paper: |
| @@ -4415,8 +4310,7 @@ If FRAME is unspecified or nil, the current frame is used. */) | |||
| 4415 | /* Return a new face cache for frame F. */ | 4310 | /* Return a new face cache for frame F. */ |
| 4416 | 4311 | ||
| 4417 | static struct face_cache * | 4312 | static struct face_cache * |
| 4418 | make_face_cache (f) | 4313 | make_face_cache (struct frame *f) |
| 4419 | struct frame *f; | ||
| 4420 | { | 4314 | { |
| 4421 | struct face_cache *c; | 4315 | struct face_cache *c; |
| 4422 | int size; | 4316 | int size; |
| @@ -4439,8 +4333,7 @@ make_face_cache (f) | |||
| 4439 | keeping too many graphics contexts that are no longer needed. */ | 4333 | keeping too many graphics contexts that are no longer needed. */ |
| 4440 | 4334 | ||
| 4441 | static void | 4335 | static void |
| 4442 | clear_face_gcs (c) | 4336 | clear_face_gcs (struct face_cache *c) |
| 4443 | struct face_cache *c; | ||
| 4444 | { | 4337 | { |
| 4445 | if (c && FRAME_WINDOW_P (c->f)) | 4338 | if (c && FRAME_WINDOW_P (c->f)) |
| 4446 | { | 4339 | { |
| @@ -4470,8 +4363,7 @@ clear_face_gcs (c) | |||
| 4470 | event doesn't try to use faces we destroyed. */ | 4363 | event doesn't try to use faces we destroyed. */ |
| 4471 | 4364 | ||
| 4472 | static void | 4365 | static void |
| 4473 | free_realized_faces (c) | 4366 | free_realized_faces (struct face_cache *c) |
| 4474 | struct face_cache *c; | ||
| 4475 | { | 4367 | { |
| 4476 | if (c && c->used) | 4368 | if (c && c->used) |
| 4477 | { | 4369 | { |
| @@ -4511,9 +4403,7 @@ free_realized_faces (c) | |||
| 4511 | /* Free all realized faces that are using FONTSET on frame F. */ | 4403 | /* Free all realized faces that are using FONTSET on frame F. */ |
| 4512 | 4404 | ||
| 4513 | void | 4405 | void |
| 4514 | free_realized_faces_for_fontset (f, fontset) | 4406 | free_realized_faces_for_fontset (struct frame *f, int fontset) |
| 4515 | struct frame *f; | ||
| 4516 | int fontset; | ||
| 4517 | { | 4407 | { |
| 4518 | struct face_cache *cache = FRAME_FACE_CACHE (f); | 4408 | struct face_cache *cache = FRAME_FACE_CACHE (f); |
| 4519 | struct face *face; | 4409 | struct face *face; |
| @@ -4554,8 +4444,7 @@ free_realized_faces_for_fontset (f, fontset) | |||
| 4554 | because we can't tell which realized faces depend on that face. */ | 4444 | because we can't tell which realized faces depend on that face. */ |
| 4555 | 4445 | ||
| 4556 | void | 4446 | void |
| 4557 | free_all_realized_faces (frame) | 4447 | free_all_realized_faces (Lisp_Object frame) |
| 4558 | Lisp_Object frame; | ||
| 4559 | { | 4448 | { |
| 4560 | if (NILP (frame)) | 4449 | if (NILP (frame)) |
| 4561 | { | 4450 | { |
| @@ -4571,8 +4460,7 @@ free_all_realized_faces (frame) | |||
| 4571 | /* Free face cache C and faces in it, including their X resources. */ | 4460 | /* Free face cache C and faces in it, including their X resources. */ |
| 4572 | 4461 | ||
| 4573 | static void | 4462 | static void |
| 4574 | free_face_cache (c) | 4463 | free_face_cache (struct face_cache *c) |
| 4575 | struct face_cache *c; | ||
| 4576 | { | 4464 | { |
| 4577 | if (c) | 4465 | if (c) |
| 4578 | { | 4466 | { |
| @@ -4592,10 +4480,7 @@ free_face_cache (c) | |||
| 4592 | that a requested face is not cached. */ | 4480 | that a requested face is not cached. */ |
| 4593 | 4481 | ||
| 4594 | static void | 4482 | static void |
| 4595 | cache_face (c, face, hash) | 4483 | cache_face (struct face_cache *c, struct face *face, unsigned int hash) |
| 4596 | struct face_cache *c; | ||
| 4597 | struct face *face; | ||
| 4598 | unsigned hash; | ||
| 4599 | { | 4484 | { |
| 4600 | int i = hash % FACE_CACHE_BUCKETS_SIZE; | 4485 | int i = hash % FACE_CACHE_BUCKETS_SIZE; |
| 4601 | 4486 | ||
| @@ -4672,9 +4557,7 @@ cache_face (c, face, hash) | |||
| 4672 | /* Remove face FACE from cache C. */ | 4557 | /* Remove face FACE from cache C. */ |
| 4673 | 4558 | ||
| 4674 | static void | 4559 | static void |
| 4675 | uncache_face (c, face) | 4560 | uncache_face (struct face_cache *c, struct face *face) |
| 4676 | struct face_cache *c; | ||
| 4677 | struct face *face; | ||
| 4678 | { | 4561 | { |
| 4679 | int i = face->hash % FACE_CACHE_BUCKETS_SIZE; | 4562 | int i = face->hash % FACE_CACHE_BUCKETS_SIZE; |
| 4680 | 4563 | ||
| @@ -4698,9 +4581,7 @@ uncache_face (c, face) | |||
| 4698 | realize a new one. */ | 4581 | realize a new one. */ |
| 4699 | 4582 | ||
| 4700 | INLINE int | 4583 | INLINE int |
| 4701 | lookup_face (f, attr) | 4584 | lookup_face (struct frame *f, Lisp_Object *attr) |
| 4702 | struct frame *f; | ||
| 4703 | Lisp_Object *attr; | ||
| 4704 | { | 4585 | { |
| 4705 | struct face_cache *cache = FRAME_FACE_CACHE (f); | 4586 | struct face_cache *cache = FRAME_FACE_CACHE (f); |
| 4706 | unsigned hash; | 4587 | unsigned hash; |
| @@ -4746,10 +4627,7 @@ lookup_face (f, attr) | |||
| 4746 | suitable face is found, realize a new one. */ | 4627 | suitable face is found, realize a new one. */ |
| 4747 | 4628 | ||
| 4748 | int | 4629 | int |
| 4749 | face_for_font (f, font_object, base_face) | 4630 | face_for_font (struct frame *f, Lisp_Object font_object, struct face *base_face) |
| 4750 | struct frame *f; | ||
| 4751 | Lisp_Object font_object; | ||
| 4752 | struct face *base_face; | ||
| 4753 | { | 4631 | { |
| 4754 | struct face_cache *cache = FRAME_FACE_CACHE (f); | 4632 | struct face_cache *cache = FRAME_FACE_CACHE (f); |
| 4755 | unsigned hash; | 4633 | unsigned hash; |
| @@ -4784,10 +4662,7 @@ face_for_font (f, font_object, base_face) | |||
| 4784 | face isn't realized and cannot be realized. */ | 4662 | face isn't realized and cannot be realized. */ |
| 4785 | 4663 | ||
| 4786 | int | 4664 | int |
| 4787 | lookup_named_face (f, symbol, signal_p) | 4665 | lookup_named_face (struct frame *f, Lisp_Object symbol, int signal_p) |
| 4788 | struct frame *f; | ||
| 4789 | Lisp_Object symbol; | ||
| 4790 | int signal_p; | ||
| 4791 | { | 4666 | { |
| 4792 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 4667 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 4793 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; | 4668 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; |
| @@ -4819,9 +4694,7 @@ lookup_named_face (f, symbol, signal_p) | |||
| 4819 | rather than signal an error. */ | 4694 | rather than signal an error. */ |
| 4820 | 4695 | ||
| 4821 | int | 4696 | int |
| 4822 | lookup_basic_face (f, face_id) | 4697 | lookup_basic_face (struct frame *f, int face_id) |
| 4823 | struct frame *f; | ||
| 4824 | int face_id; | ||
| 4825 | { | 4698 | { |
| 4826 | Lisp_Object name, mapping; | 4699 | Lisp_Object name, mapping; |
| 4827 | int remapped_face_id; | 4700 | int remapped_face_id; |
| @@ -4868,9 +4741,7 @@ lookup_basic_face (f, face_id) | |||
| 4868 | LFACE_ID on frame F. Value is -1 if LFACE_ID isn't valid. */ | 4741 | LFACE_ID on frame F. Value is -1 if LFACE_ID isn't valid. */ |
| 4869 | 4742 | ||
| 4870 | int | 4743 | int |
| 4871 | ascii_face_of_lisp_face (f, lface_id) | 4744 | ascii_face_of_lisp_face (struct frame *f, int lface_id) |
| 4872 | struct frame *f; | ||
| 4873 | int lface_id; | ||
| 4874 | { | 4745 | { |
| 4875 | int face_id; | 4746 | int face_id; |
| 4876 | 4747 | ||
| @@ -4891,9 +4762,7 @@ ascii_face_of_lisp_face (f, lface_id) | |||
| 4891 | STEPS < 0 means larger. Value is the id of the face. */ | 4762 | STEPS < 0 means larger. Value is the id of the face. */ |
| 4892 | 4763 | ||
| 4893 | int | 4764 | int |
| 4894 | smaller_face (f, face_id, steps) | 4765 | smaller_face (struct frame *f, int face_id, int steps) |
| 4895 | struct frame *f; | ||
| 4896 | int face_id, steps; | ||
| 4897 | { | 4766 | { |
| 4898 | #ifdef HAVE_WINDOW_SYSTEM | 4767 | #ifdef HAVE_WINDOW_SYSTEM |
| 4899 | struct face *face; | 4768 | struct face *face; |
| @@ -4952,10 +4821,7 @@ smaller_face (f, face_id, steps) | |||
| 4952 | FACE_ID on frame F, but has height HEIGHT. */ | 4821 | FACE_ID on frame F, but has height HEIGHT. */ |
| 4953 | 4822 | ||
| 4954 | int | 4823 | int |
| 4955 | face_with_height (f, face_id, height) | 4824 | face_with_height (struct frame *f, int face_id, int height) |
| 4956 | struct frame *f; | ||
| 4957 | int face_id; | ||
| 4958 | int height; | ||
| 4959 | { | 4825 | { |
| 4960 | #ifdef HAVE_WINDOW_SYSTEM | 4826 | #ifdef HAVE_WINDOW_SYSTEM |
| 4961 | struct face *face; | 4827 | struct face *face; |
| @@ -4984,11 +4850,7 @@ face_with_height (f, face_id, height) | |||
| 4984 | default face. FACE_ID is assumed to be already realized. */ | 4850 | default face. FACE_ID is assumed to be already realized. */ |
| 4985 | 4851 | ||
| 4986 | int | 4852 | int |
| 4987 | lookup_derived_face (f, symbol, face_id, signal_p) | 4853 | lookup_derived_face (struct frame *f, Lisp_Object symbol, int face_id, int signal_p) |
| 4988 | struct frame *f; | ||
| 4989 | Lisp_Object symbol; | ||
| 4990 | int face_id; | ||
| 4991 | int signal_p; | ||
| 4992 | { | 4854 | { |
| 4993 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 4855 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 4994 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; | 4856 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; |
| @@ -5045,10 +4907,7 @@ DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector, | |||
| 5045 | \(2) `close in spirit' to what the attributes specify, if not exact. */ | 4907 | \(2) `close in spirit' to what the attributes specify, if not exact. */ |
| 5046 | 4908 | ||
| 5047 | static int | 4909 | static int |
| 5048 | x_supports_face_attributes_p (f, attrs, def_face) | 4910 | x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, struct face *def_face) |
| 5049 | struct frame *f; | ||
| 5050 | Lisp_Object *attrs; | ||
| 5051 | struct face *def_face; | ||
| 5052 | { | 4911 | { |
| 5053 | Lisp_Object *def_attrs = def_face->lface; | 4912 | Lisp_Object *def_attrs = def_face->lface; |
| 5054 | 4913 | ||
| @@ -5149,10 +5008,7 @@ x_supports_face_attributes_p (f, attrs, def_face) | |||
| 5149 | substitution of a `dim' face for italic. */ | 5008 | substitution of a `dim' face for italic. */ |
| 5150 | 5009 | ||
| 5151 | static int | 5010 | static int |
| 5152 | tty_supports_face_attributes_p (f, attrs, def_face) | 5011 | tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, struct face *def_face) |
| 5153 | struct frame *f; | ||
| 5154 | Lisp_Object *attrs; | ||
| 5155 | struct face *def_face; | ||
| 5156 | { | 5012 | { |
| 5157 | int weight; | 5013 | int weight; |
| 5158 | Lisp_Object val, fg, bg; | 5014 | Lisp_Object val, fg, bg; |
| @@ -5532,8 +5388,7 @@ be found. Value is ALIST. */) | |||
| 5532 | attribute of ATTRS doesn't name a fontset. */ | 5388 | attribute of ATTRS doesn't name a fontset. */ |
| 5533 | 5389 | ||
| 5534 | static int | 5390 | static int |
| 5535 | face_fontset (attrs) | 5391 | face_fontset (Lisp_Object *attrs) |
| 5536 | Lisp_Object *attrs; | ||
| 5537 | { | 5392 | { |
| 5538 | Lisp_Object name; | 5393 | Lisp_Object name; |
| 5539 | 5394 | ||
| @@ -5556,8 +5411,7 @@ face_fontset (attrs) | |||
| 5556 | face. */ | 5411 | face. */ |
| 5557 | 5412 | ||
| 5558 | static int | 5413 | static int |
| 5559 | realize_basic_faces (f) | 5414 | realize_basic_faces (struct frame *f) |
| 5560 | struct frame *f; | ||
| 5561 | { | 5415 | { |
| 5562 | int success_p = 0; | 5416 | int success_p = 0; |
| 5563 | int count = SPECPDL_INDEX (); | 5417 | int count = SPECPDL_INDEX (); |
| @@ -5605,8 +5459,7 @@ realize_basic_faces (f) | |||
| 5605 | that are not explicitly specified are taken from frame parameters. */ | 5459 | that are not explicitly specified are taken from frame parameters. */ |
| 5606 | 5460 | ||
| 5607 | static int | 5461 | static int |
| 5608 | realize_default_face (f) | 5462 | realize_default_face (struct frame *f) |
| 5609 | struct frame *f; | ||
| 5610 | { | 5463 | { |
| 5611 | struct face_cache *c = FRAME_FACE_CACHE (f); | 5464 | struct face_cache *c = FRAME_FACE_CACHE (f); |
| 5612 | Lisp_Object lface; | 5465 | Lisp_Object lface; |
| @@ -5729,10 +5582,7 @@ realize_default_face (f) | |||
| 5729 | have. The default face must have been realized already. */ | 5582 | have. The default face must have been realized already. */ |
| 5730 | 5583 | ||
| 5731 | static void | 5584 | static void |
| 5732 | realize_named_face (f, symbol, id) | 5585 | realize_named_face (struct frame *f, Lisp_Object symbol, int id) |
| 5733 | struct frame *f; | ||
| 5734 | Lisp_Object symbol; | ||
| 5735 | int id; | ||
| 5736 | { | 5586 | { |
| 5737 | struct face_cache *c = FRAME_FACE_CACHE (f); | 5587 | struct face_cache *c = FRAME_FACE_CACHE (f); |
| 5738 | Lisp_Object lface = lface_from_face_name (f, symbol, 0); | 5588 | Lisp_Object lface = lface_from_face_name (f, symbol, 0); |
| @@ -5768,10 +5618,7 @@ realize_named_face (f, symbol, id) | |||
| 5768 | face. Value is a pointer to the newly created realized face. */ | 5618 | face. Value is a pointer to the newly created realized face. */ |
| 5769 | 5619 | ||
| 5770 | static struct face * | 5620 | static struct face * |
| 5771 | realize_face (cache, attrs, former_face_id) | 5621 | realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id) |
| 5772 | struct face_cache *cache; | ||
| 5773 | Lisp_Object *attrs; | ||
| 5774 | int former_face_id; | ||
| 5775 | { | 5622 | { |
| 5776 | struct face *face; | 5623 | struct face *face; |
| 5777 | 5624 | ||
| @@ -5812,10 +5659,7 @@ realize_face (cache, attrs, former_face_id) | |||
| 5812 | no-font. */ | 5659 | no-font. */ |
| 5813 | 5660 | ||
| 5814 | static struct face * | 5661 | static struct face * |
| 5815 | realize_non_ascii_face (f, font_object, base_face) | 5662 | realize_non_ascii_face (struct frame *f, Lisp_Object font_object, struct face *base_face) |
| 5816 | struct frame *f; | ||
| 5817 | Lisp_Object font_object; | ||
| 5818 | struct face *base_face; | ||
| 5819 | { | 5663 | { |
| 5820 | struct face_cache *cache = FRAME_FACE_CACHE (f); | 5664 | struct face_cache *cache = FRAME_FACE_CACHE (f); |
| 5821 | struct face *face; | 5665 | struct face *face; |
| @@ -5849,9 +5693,7 @@ realize_non_ascii_face (f, font_object, base_face) | |||
| 5849 | created realized face. */ | 5693 | created realized face. */ |
| 5850 | 5694 | ||
| 5851 | static struct face * | 5695 | static struct face * |
| 5852 | realize_x_face (cache, attrs) | 5696 | realize_x_face (struct face_cache *cache, Lisp_Object *attrs) |
| 5853 | struct face_cache *cache; | ||
| 5854 | Lisp_Object *attrs; | ||
| 5855 | { | 5697 | { |
| 5856 | struct face *face = NULL; | 5698 | struct face *face = NULL; |
| 5857 | #ifdef HAVE_WINDOW_SYSTEM | 5699 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -6058,11 +5900,7 @@ realize_x_face (cache, attrs) | |||
| 6058 | default foreground/background colors. */ | 5900 | default foreground/background colors. */ |
| 6059 | 5901 | ||
| 6060 | static void | 5902 | static void |
| 6061 | map_tty_color (f, face, idx, defaulted) | 5903 | map_tty_color (struct frame *f, struct face *face, enum lface_attribute_index idx, int *defaulted) |
| 6062 | struct frame *f; | ||
| 6063 | struct face *face; | ||
| 6064 | enum lface_attribute_index idx; | ||
| 6065 | int *defaulted; | ||
| 6066 | { | 5904 | { |
| 6067 | Lisp_Object frame, color, def; | 5905 | Lisp_Object frame, color, def; |
| 6068 | int foreground_p = idx == LFACE_FOREGROUND_INDEX; | 5906 | int foreground_p = idx == LFACE_FOREGROUND_INDEX; |
| @@ -6139,9 +5977,7 @@ map_tty_color (f, face, idx, defaulted) | |||
| 6139 | Value is a pointer to the newly created realized face. */ | 5977 | Value is a pointer to the newly created realized face. */ |
| 6140 | 5978 | ||
| 6141 | static struct face * | 5979 | static struct face * |
| 6142 | realize_tty_face (cache, attrs) | 5980 | realize_tty_face (struct face_cache *cache, Lisp_Object *attrs) |
| 6143 | struct face_cache *cache; | ||
| 6144 | Lisp_Object *attrs; | ||
| 6145 | { | 5981 | { |
| 6146 | struct face *face; | 5982 | struct face *face; |
| 6147 | int weight, slant; | 5983 | int weight, slant; |
| @@ -6222,10 +6058,7 @@ is non-nil. */) | |||
| 6222 | property PROP on frame F in current_buffer. */ | 6058 | property PROP on frame F in current_buffer. */ |
| 6223 | 6059 | ||
| 6224 | int | 6060 | int |
| 6225 | compute_char_face (f, ch, prop) | 6061 | compute_char_face (struct frame *f, int ch, Lisp_Object prop) |
| 6226 | struct frame *f; | ||
| 6227 | int ch; | ||
| 6228 | Lisp_Object prop; | ||
| 6229 | { | 6062 | { |
| 6230 | int face_id; | 6063 | int face_id; |
| 6231 | 6064 | ||
| @@ -6559,10 +6392,7 @@ face_at_string_position (w, string, pos, bufpos, region_beg, | |||
| 6559 | */ | 6392 | */ |
| 6560 | 6393 | ||
| 6561 | int | 6394 | int |
| 6562 | merge_faces (f, face_name, face_id, base_face_id) | 6395 | merge_faces (struct frame *f, Lisp_Object face_name, int face_id, int base_face_id) |
| 6563 | struct frame *f; | ||
| 6564 | Lisp_Object face_name; | ||
| 6565 | int face_id, base_face_id; | ||
| 6566 | { | 6396 | { |
| 6567 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 6397 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 6568 | struct face *base_face; | 6398 | struct face *base_face; |
| @@ -6751,7 +6581,7 @@ DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources, | |||
| 6751 | ***********************************************************************/ | 6581 | ***********************************************************************/ |
| 6752 | 6582 | ||
| 6753 | void | 6583 | void |
| 6754 | syms_of_xfaces () | 6584 | syms_of_xfaces (void) |
| 6755 | { | 6585 | { |
| 6756 | Qface = intern_c_string ("face"); | 6586 | Qface = intern_c_string ("face"); |
| 6757 | staticpro (&Qface); | 6587 | staticpro (&Qface); |
diff --git a/src/xfns.c b/src/xfns.c index 74ddce6cf56..76735fcc74f 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -218,7 +218,7 @@ char *x_last_font_name; | |||
| 218 | /* Error if we are not connected to X. */ | 218 | /* Error if we are not connected to X. */ |
| 219 | 219 | ||
| 220 | void | 220 | void |
| 221 | check_x () | 221 | check_x (void) |
| 222 | { | 222 | { |
| 223 | if (! x_in_use) | 223 | if (! x_in_use) |
| 224 | error ("X windows are not in use or not initialized"); | 224 | error ("X windows are not in use or not initialized"); |
| @@ -228,7 +228,7 @@ check_x () | |||
| 228 | You should not call this unless HAVE_MENUS is defined. */ | 228 | You should not call this unless HAVE_MENUS is defined. */ |
| 229 | 229 | ||
| 230 | int | 230 | int |
| 231 | have_menus_p () | 231 | have_menus_p (void) |
| 232 | { | 232 | { |
| 233 | return x_in_use; | 233 | return x_in_use; |
| 234 | } | 234 | } |
| @@ -237,8 +237,7 @@ have_menus_p () | |||
| 237 | and checking validity for X. */ | 237 | and checking validity for X. */ |
| 238 | 238 | ||
| 239 | FRAME_PTR | 239 | FRAME_PTR |
| 240 | check_x_frame (frame) | 240 | check_x_frame (Lisp_Object frame) |
| 241 | Lisp_Object frame; | ||
| 242 | { | 241 | { |
| 243 | FRAME_PTR f; | 242 | FRAME_PTR f; |
| 244 | 243 | ||
| @@ -257,8 +256,7 @@ check_x_frame (frame) | |||
| 257 | the first X display on the list. */ | 256 | the first X display on the list. */ |
| 258 | 257 | ||
| 259 | struct x_display_info * | 258 | struct x_display_info * |
| 260 | check_x_display_info (object) | 259 | check_x_display_info (Lisp_Object object) |
| 261 | Lisp_Object object; | ||
| 262 | { | 260 | { |
| 263 | struct x_display_info *dpyinfo = NULL; | 261 | struct x_display_info *dpyinfo = NULL; |
| 264 | 262 | ||
| @@ -300,9 +298,7 @@ check_x_display_info (object) | |||
| 300 | /* This function can be called during GC, so use GC_xxx type test macros. */ | 298 | /* This function can be called during GC, so use GC_xxx type test macros. */ |
| 301 | 299 | ||
| 302 | struct frame * | 300 | struct frame * |
| 303 | x_window_to_frame (dpyinfo, wdesc) | 301 | x_window_to_frame (struct x_display_info *dpyinfo, int wdesc) |
| 304 | struct x_display_info *dpyinfo; | ||
| 305 | int wdesc; | ||
| 306 | { | 302 | { |
| 307 | Lisp_Object tail, frame; | 303 | Lisp_Object tail, frame; |
| 308 | struct frame *f; | 304 | struct frame *f; |
| @@ -350,9 +346,7 @@ x_window_to_frame (dpyinfo, wdesc) | |||
| 350 | windows. */ | 346 | windows. */ |
| 351 | 347 | ||
| 352 | struct frame * | 348 | struct frame * |
| 353 | x_any_window_to_frame (dpyinfo, wdesc) | 349 | x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc) |
| 354 | struct x_display_info *dpyinfo; | ||
| 355 | int wdesc; | ||
| 356 | { | 350 | { |
| 357 | Lisp_Object tail, frame; | 351 | Lisp_Object tail, frame; |
| 358 | struct frame *f, *found; | 352 | struct frame *f, *found; |
| @@ -403,9 +397,7 @@ x_any_window_to_frame (dpyinfo, wdesc) | |||
| 403 | /* Likewise, but consider only the menu bar widget. */ | 397 | /* Likewise, but consider only the menu bar widget. */ |
| 404 | 398 | ||
| 405 | struct frame * | 399 | struct frame * |
| 406 | x_menubar_window_to_frame (dpyinfo, wdesc) | 400 | x_menubar_window_to_frame (struct x_display_info *dpyinfo, int wdesc) |
| 407 | struct x_display_info *dpyinfo; | ||
| 408 | int wdesc; | ||
| 409 | { | 401 | { |
| 410 | Lisp_Object tail, frame; | 402 | Lisp_Object tail, frame; |
| 411 | struct frame *f; | 403 | struct frame *f; |
| @@ -449,9 +441,7 @@ x_menubar_window_to_frame (dpyinfo, wdesc) | |||
| 449 | If WDESC is some other (smaller) window, we return 0. */ | 441 | If WDESC is some other (smaller) window, we return 0. */ |
| 450 | 442 | ||
| 451 | struct frame * | 443 | struct frame * |
| 452 | x_top_window_to_frame (dpyinfo, wdesc) | 444 | x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc) |
| 453 | struct x_display_info *dpyinfo; | ||
| 454 | int wdesc; | ||
| 455 | { | 445 | { |
| 456 | Lisp_Object tail, frame; | 446 | Lisp_Object tail, frame; |
| 457 | struct frame *f; | 447 | struct frame *f; |
| @@ -533,9 +523,7 @@ static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *, | |||
| 533 | not Emacs's own window. */ | 523 | not Emacs's own window. */ |
| 534 | 524 | ||
| 535 | void | 525 | void |
| 536 | x_real_positions (f, xptr, yptr) | 526 | x_real_positions (FRAME_PTR f, int *xptr, int *yptr) |
| 537 | FRAME_PTR f; | ||
| 538 | int *xptr, *yptr; | ||
| 539 | { | 527 | { |
| 540 | int win_x, win_y, outer_x, outer_y; | 528 | int win_x, win_y, outer_x, outer_y; |
| 541 | int real_x = 0, real_y = 0; | 529 | int real_x = 0, real_y = 0; |
| @@ -653,9 +641,7 @@ x_real_positions (f, xptr, yptr) | |||
| 653 | /* Gamma-correct COLOR on frame F. */ | 641 | /* Gamma-correct COLOR on frame F. */ |
| 654 | 642 | ||
| 655 | void | 643 | void |
| 656 | gamma_correct (f, color) | 644 | gamma_correct (struct frame *f, XColor *color) |
| 657 | struct frame *f; | ||
| 658 | XColor *color; | ||
| 659 | { | 645 | { |
| 660 | if (f->gamma) | 646 | if (f->gamma) |
| 661 | { | 647 | { |
| @@ -672,11 +658,7 @@ gamma_correct (f, color) | |||
| 672 | no color could be allocated. */ | 658 | no color could be allocated. */ |
| 673 | 659 | ||
| 674 | int | 660 | int |
| 675 | x_defined_color (f, color_name, color, alloc_p) | 661 | x_defined_color (struct frame *f, char *color_name, XColor *color, int alloc_p) |
| 676 | struct frame *f; | ||
| 677 | char *color_name; | ||
| 678 | XColor *color; | ||
| 679 | int alloc_p; | ||
| 680 | { | 662 | { |
| 681 | int success_p; | 663 | int success_p; |
| 682 | Display *dpy = FRAME_X_DISPLAY (f); | 664 | Display *dpy = FRAME_X_DISPLAY (f); |
| @@ -697,10 +679,7 @@ x_defined_color (f, color_name, color, alloc_p) | |||
| 697 | Signal an error if color can't be allocated. */ | 679 | Signal an error if color can't be allocated. */ |
| 698 | 680 | ||
| 699 | int | 681 | int |
| 700 | x_decode_color (f, color_name, mono_color) | 682 | x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color) |
| 701 | FRAME_PTR f; | ||
| 702 | Lisp_Object color_name; | ||
| 703 | int mono_color; | ||
| 704 | { | 683 | { |
| 705 | XColor cdef; | 684 | XColor cdef; |
| 706 | 685 | ||
| @@ -734,9 +713,7 @@ x_decode_color (f, color_name, mono_color) | |||
| 734 | See also the comment of wait_for_wm in struct x_output. */ | 713 | See also the comment of wait_for_wm in struct x_output. */ |
| 735 | 714 | ||
| 736 | static void | 715 | static void |
| 737 | x_set_wait_for_wm (f, new_value, old_value) | 716 | x_set_wait_for_wm (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 738 | struct frame *f; | ||
| 739 | Lisp_Object new_value, old_value; | ||
| 740 | { | 717 | { |
| 741 | f->output_data.x->wait_for_wm = !NILP (new_value); | 718 | f->output_data.x->wait_for_wm = !NILP (new_value); |
| 742 | } | 719 | } |
| @@ -747,9 +724,7 @@ x_set_wait_for_wm (f, new_value, old_value) | |||
| 747 | may be any format that GdkPixbuf knows about, i.e. not just bitmaps. */ | 724 | may be any format that GdkPixbuf knows about, i.e. not just bitmaps. */ |
| 748 | 725 | ||
| 749 | int | 726 | int |
| 750 | xg_set_icon (f, file) | 727 | xg_set_icon (FRAME_PTR f, Lisp_Object file) |
| 751 | FRAME_PTR f; | ||
| 752 | Lisp_Object file; | ||
| 753 | { | 728 | { |
| 754 | int result = 0; | 729 | int result = 0; |
| 755 | Lisp_Object found; | 730 | Lisp_Object found; |
| @@ -783,9 +758,7 @@ xg_set_icon (f, file) | |||
| 783 | } | 758 | } |
| 784 | 759 | ||
| 785 | int | 760 | int |
| 786 | xg_set_icon_from_xpm_data (f, data) | 761 | xg_set_icon_from_xpm_data (FRAME_PTR f, char **data) |
| 787 | FRAME_PTR f; | ||
| 788 | char **data; | ||
| 789 | { | 762 | { |
| 790 | int result = 0; | 763 | int result = 0; |
| 791 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data); | 764 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data); |
| @@ -809,9 +782,7 @@ xg_set_icon_from_xpm_data (f, data) | |||
| 809 | in the standard place; do not attempt to change the window. */ | 782 | in the standard place; do not attempt to change the window. */ |
| 810 | 783 | ||
| 811 | void | 784 | void |
| 812 | x_set_foreground_color (f, arg, oldval) | 785 | x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 813 | struct frame *f; | ||
| 814 | Lisp_Object arg, oldval; | ||
| 815 | { | 786 | { |
| 816 | struct x_output *x = f->output_data.x; | 787 | struct x_output *x = f->output_data.x; |
| 817 | unsigned long fg, old_fg; | 788 | unsigned long fg, old_fg; |
| @@ -847,9 +818,7 @@ x_set_foreground_color (f, arg, oldval) | |||
| 847 | } | 818 | } |
| 848 | 819 | ||
| 849 | void | 820 | void |
| 850 | x_set_background_color (f, arg, oldval) | 821 | x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 851 | struct frame *f; | ||
| 852 | Lisp_Object arg, oldval; | ||
| 853 | { | 822 | { |
| 854 | struct x_output *x = f->output_data.x; | 823 | struct x_output *x = f->output_data.x; |
| 855 | unsigned long bg; | 824 | unsigned long bg; |
| @@ -895,8 +864,7 @@ x_set_background_color (f, arg, oldval) | |||
| 895 | } | 864 | } |
| 896 | 865 | ||
| 897 | static Cursor | 866 | static Cursor |
| 898 | make_invisible_cursor (f) | 867 | make_invisible_cursor (struct frame *f) |
| 899 | struct frame *f; | ||
| 900 | { | 868 | { |
| 901 | Display *dpy = FRAME_X_DISPLAY (f); | 869 | Display *dpy = FRAME_X_DISPLAY (f); |
| 902 | static char const no_data[] = { 0 }; | 870 | static char const no_data[] = { 0 }; |
| @@ -924,9 +892,7 @@ make_invisible_cursor (f) | |||
| 924 | } | 892 | } |
| 925 | 893 | ||
| 926 | void | 894 | void |
| 927 | x_set_mouse_color (f, arg, oldval) | 895 | x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 928 | struct frame *f; | ||
| 929 | Lisp_Object arg, oldval; | ||
| 930 | { | 896 | { |
| 931 | struct x_output *x = f->output_data.x; | 897 | struct x_output *x = f->output_data.x; |
| 932 | Display *dpy = FRAME_X_DISPLAY (f); | 898 | Display *dpy = FRAME_X_DISPLAY (f); |
| @@ -1071,9 +1037,7 @@ x_set_mouse_color (f, arg, oldval) | |||
| 1071 | } | 1037 | } |
| 1072 | 1038 | ||
| 1073 | void | 1039 | void |
| 1074 | x_set_cursor_color (f, arg, oldval) | 1040 | x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1075 | struct frame *f; | ||
| 1076 | Lisp_Object arg, oldval; | ||
| 1077 | { | 1041 | { |
| 1078 | unsigned long fore_pixel, pixel; | 1042 | unsigned long fore_pixel, pixel; |
| 1079 | int fore_pixel_allocated_p = 0, pixel_allocated_p = 0; | 1043 | int fore_pixel_allocated_p = 0, pixel_allocated_p = 0; |
| @@ -1144,9 +1108,7 @@ x_set_cursor_color (f, arg, oldval) | |||
| 1144 | F has an x-window. */ | 1108 | F has an x-window. */ |
| 1145 | 1109 | ||
| 1146 | void | 1110 | void |
| 1147 | x_set_border_pixel (f, pix) | 1111 | x_set_border_pixel (struct frame *f, int pix) |
| 1148 | struct frame *f; | ||
| 1149 | int pix; | ||
| 1150 | { | 1112 | { |
| 1151 | unload_color (f, f->output_data.x->border_pixel); | 1113 | unload_color (f, f->output_data.x->border_pixel); |
| 1152 | f->output_data.x->border_pixel = pix; | 1114 | f->output_data.x->border_pixel = pix; |
| @@ -1175,9 +1137,7 @@ x_set_border_pixel (f, pix) | |||
| 1175 | and so emacs' border colors may be overridden. */ | 1137 | and so emacs' border colors may be overridden. */ |
| 1176 | 1138 | ||
| 1177 | void | 1139 | void |
| 1178 | x_set_border_color (f, arg, oldval) | 1140 | x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1179 | struct frame *f; | ||
| 1180 | Lisp_Object arg, oldval; | ||
| 1181 | { | 1141 | { |
| 1182 | int pix; | 1142 | int pix; |
| 1183 | 1143 | ||
| @@ -1189,9 +1149,7 @@ x_set_border_color (f, arg, oldval) | |||
| 1189 | 1149 | ||
| 1190 | 1150 | ||
| 1191 | void | 1151 | void |
| 1192 | x_set_cursor_type (f, arg, oldval) | 1152 | x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 1193 | FRAME_PTR f; | ||
| 1194 | Lisp_Object arg, oldval; | ||
| 1195 | { | 1153 | { |
| 1196 | set_frame_cursor_types (f, arg); | 1154 | set_frame_cursor_types (f, arg); |
| 1197 | 1155 | ||
| @@ -1200,9 +1158,7 @@ x_set_cursor_type (f, arg, oldval) | |||
| 1200 | } | 1158 | } |
| 1201 | 1159 | ||
| 1202 | void | 1160 | void |
| 1203 | x_set_icon_type (f, arg, oldval) | 1161 | x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1204 | struct frame *f; | ||
| 1205 | Lisp_Object arg, oldval; | ||
| 1206 | { | 1162 | { |
| 1207 | int result; | 1163 | int result; |
| 1208 | 1164 | ||
| @@ -1234,9 +1190,7 @@ x_set_icon_type (f, arg, oldval) | |||
| 1234 | } | 1190 | } |
| 1235 | 1191 | ||
| 1236 | void | 1192 | void |
| 1237 | x_set_icon_name (f, arg, oldval) | 1193 | x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1238 | struct frame *f; | ||
| 1239 | Lisp_Object arg, oldval; | ||
| 1240 | { | 1194 | { |
| 1241 | int result; | 1195 | int result; |
| 1242 | 1196 | ||
| @@ -1274,9 +1228,7 @@ x_set_icon_name (f, arg, oldval) | |||
| 1274 | 1228 | ||
| 1275 | 1229 | ||
| 1276 | void | 1230 | void |
| 1277 | x_set_menu_bar_lines (f, value, oldval) | 1231 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1278 | struct frame *f; | ||
| 1279 | Lisp_Object value, oldval; | ||
| 1280 | { | 1232 | { |
| 1281 | int nlines; | 1233 | int nlines; |
| 1282 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) | 1234 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) |
| @@ -1366,9 +1318,7 @@ x_set_menu_bar_lines (f, value, oldval) | |||
| 1366 | The frame's height doesn't change. */ | 1318 | The frame's height doesn't change. */ |
| 1367 | 1319 | ||
| 1368 | void | 1320 | void |
| 1369 | x_set_tool_bar_lines (f, value, oldval) | 1321 | x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1370 | struct frame *f; | ||
| 1371 | Lisp_Object value, oldval; | ||
| 1372 | { | 1322 | { |
| 1373 | int delta, nlines, root_height; | 1323 | int delta, nlines, root_height; |
| 1374 | Lisp_Object root_window; | 1324 | Lisp_Object root_window; |
| @@ -1463,9 +1413,7 @@ x_set_tool_bar_lines (f, value, oldval) | |||
| 1463 | the frame parameter. */ | 1413 | the frame parameter. */ |
| 1464 | 1414 | ||
| 1465 | void | 1415 | void |
| 1466 | x_set_scroll_bar_foreground (f, value, oldval) | 1416 | x_set_scroll_bar_foreground (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1467 | struct frame *f; | ||
| 1468 | Lisp_Object value, oldval; | ||
| 1469 | { | 1417 | { |
| 1470 | unsigned long pixel; | 1418 | unsigned long pixel; |
| 1471 | 1419 | ||
| @@ -1498,9 +1446,7 @@ x_set_scroll_bar_foreground (f, value, oldval) | |||
| 1498 | parameter. */ | 1446 | parameter. */ |
| 1499 | 1447 | ||
| 1500 | void | 1448 | void |
| 1501 | x_set_scroll_bar_background (f, value, oldval) | 1449 | x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1502 | struct frame *f; | ||
| 1503 | Lisp_Object value, oldval; | ||
| 1504 | { | 1450 | { |
| 1505 | unsigned long pixel; | 1451 | unsigned long pixel; |
| 1506 | 1452 | ||
| @@ -1563,11 +1509,7 @@ x_set_scroll_bar_background (f, value, oldval) | |||
| 1563 | the result should be `COMPOUND_TEXT'. */ | 1509 | the result should be `COMPOUND_TEXT'. */ |
| 1564 | 1510 | ||
| 1565 | static unsigned char * | 1511 | static unsigned char * |
| 1566 | x_encode_text (string, coding_system, selectionp, text_bytes, stringp, freep) | 1512 | x_encode_text (Lisp_Object string, Lisp_Object coding_system, int selectionp, int *text_bytes, int *stringp, int *freep) |
| 1567 | Lisp_Object string, coding_system; | ||
| 1568 | int *text_bytes, *stringp; | ||
| 1569 | int selectionp; | ||
| 1570 | int *freep; | ||
| 1571 | { | 1513 | { |
| 1572 | int result = string_xstring_p (string); | 1514 | int result = string_xstring_p (string); |
| 1573 | struct coding_system coding; | 1515 | struct coding_system coding; |
| @@ -1601,9 +1543,7 @@ x_encode_text (string, coding_system, selectionp, text_bytes, stringp, freep) | |||
| 1601 | icon name to NAME. */ | 1543 | icon name to NAME. */ |
| 1602 | 1544 | ||
| 1603 | static void | 1545 | static void |
| 1604 | x_set_name_internal (f, name) | 1546 | x_set_name_internal (FRAME_PTR f, Lisp_Object name) |
| 1605 | FRAME_PTR f; | ||
| 1606 | Lisp_Object name; | ||
| 1607 | { | 1547 | { |
| 1608 | if (FRAME_X_WINDOW (f)) | 1548 | if (FRAME_X_WINDOW (f)) |
| 1609 | { | 1549 | { |
| @@ -1691,10 +1631,7 @@ x_set_name_internal (f, name) | |||
| 1691 | F->explicit_name is set, ignore the new name; otherwise, set it. */ | 1631 | F->explicit_name is set, ignore the new name; otherwise, set it. */ |
| 1692 | 1632 | ||
| 1693 | void | 1633 | void |
| 1694 | x_set_name (f, name, explicit) | 1634 | x_set_name (struct frame *f, Lisp_Object name, int explicit) |
| 1695 | struct frame *f; | ||
| 1696 | Lisp_Object name; | ||
| 1697 | int explicit; | ||
| 1698 | { | 1635 | { |
| 1699 | /* Make sure that requests from lisp code override requests from | 1636 | /* Make sure that requests from lisp code override requests from |
| 1700 | Emacs redisplay code. */ | 1637 | Emacs redisplay code. */ |
| @@ -1741,9 +1678,7 @@ x_set_name (f, name, explicit) | |||
| 1741 | specified a name for the frame; the name will override any set by the | 1678 | specified a name for the frame; the name will override any set by the |
| 1742 | redisplay code. */ | 1679 | redisplay code. */ |
| 1743 | void | 1680 | void |
| 1744 | x_explicitly_set_name (f, arg, oldval) | 1681 | x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 1745 | FRAME_PTR f; | ||
| 1746 | Lisp_Object arg, oldval; | ||
| 1747 | { | 1682 | { |
| 1748 | x_set_name (f, arg, 1); | 1683 | x_set_name (f, arg, 1); |
| 1749 | } | 1684 | } |
| @@ -1752,9 +1687,7 @@ x_explicitly_set_name (f, arg, oldval) | |||
| 1752 | name; names set this way will never override names set by the user's | 1687 | name; names set this way will never override names set by the user's |
| 1753 | lisp code. */ | 1688 | lisp code. */ |
| 1754 | void | 1689 | void |
| 1755 | x_implicitly_set_name (f, arg, oldval) | 1690 | x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 1756 | FRAME_PTR f; | ||
| 1757 | Lisp_Object arg, oldval; | ||
| 1758 | { | 1691 | { |
| 1759 | x_set_name (f, arg, 0); | 1692 | x_set_name (f, arg, 0); |
| 1760 | } | 1693 | } |
| @@ -1763,9 +1696,7 @@ x_implicitly_set_name (f, arg, oldval) | |||
| 1763 | If NAME is nil, use the frame name as the title. */ | 1696 | If NAME is nil, use the frame name as the title. */ |
| 1764 | 1697 | ||
| 1765 | void | 1698 | void |
| 1766 | x_set_title (f, name, old_name) | 1699 | x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name) |
| 1767 | struct frame *f; | ||
| 1768 | Lisp_Object name, old_name; | ||
| 1769 | { | 1700 | { |
| 1770 | /* Don't change the title if it's already NAME. */ | 1701 | /* Don't change the title if it's already NAME. */ |
| 1771 | if (EQ (name, f->title)) | 1702 | if (EQ (name, f->title)) |
| @@ -1784,8 +1715,7 @@ x_set_title (f, name, old_name) | |||
| 1784 | } | 1715 | } |
| 1785 | 1716 | ||
| 1786 | void | 1717 | void |
| 1787 | x_set_scroll_bar_default_width (f) | 1718 | x_set_scroll_bar_default_width (struct frame *f) |
| 1788 | struct frame *f; | ||
| 1789 | { | 1719 | { |
| 1790 | int wid = FRAME_COLUMN_WIDTH (f); | 1720 | int wid = FRAME_COLUMN_WIDTH (f); |
| 1791 | 1721 | ||
| @@ -1966,9 +1896,7 @@ char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; | |||
| 1966 | /* Create an Xt fontset spec from the name of a base font. | 1896 | /* Create an Xt fontset spec from the name of a base font. |
| 1967 | If `motif' is True use the Motif syntax. */ | 1897 | If `motif' is True use the Motif syntax. */ |
| 1968 | char * | 1898 | char * |
| 1969 | xic_create_fontsetname (base_fontname, motif) | 1899 | xic_create_fontsetname (char *base_fontname, int motif) |
| 1970 | char *base_fontname; | ||
| 1971 | Bool motif; | ||
| 1972 | { | 1900 | { |
| 1973 | const char *sep = motif ? ";" : ","; | 1901 | const char *sep = motif ? ";" : ","; |
| 1974 | char *fontsetname; | 1902 | char *fontsetname; |
| @@ -2114,8 +2042,7 @@ print_fontset_result (xfs, name, missing_list, missing_count) | |||
| 2114 | #endif | 2042 | #endif |
| 2115 | 2043 | ||
| 2116 | static XFontSet | 2044 | static XFontSet |
| 2117 | xic_create_xfontset (f) | 2045 | xic_create_xfontset (struct frame *f) |
| 2118 | struct frame *f; | ||
| 2119 | { | 2046 | { |
| 2120 | XFontSet xfs = NULL; | 2047 | XFontSet xfs = NULL; |
| 2121 | struct font *font = FRAME_FONT (f); | 2048 | struct font *font = FRAME_FONT (f); |
| @@ -2214,8 +2141,7 @@ xic_create_xfontset (f) | |||
| 2214 | /* Free the X fontset of frame F if it is the last frame using it. */ | 2141 | /* Free the X fontset of frame F if it is the last frame using it. */ |
| 2215 | 2142 | ||
| 2216 | void | 2143 | void |
| 2217 | xic_free_xfontset (f) | 2144 | xic_free_xfontset (struct frame *f) |
| 2218 | struct frame *f; | ||
| 2219 | { | 2145 | { |
| 2220 | Lisp_Object rest, frame; | 2146 | Lisp_Object rest, frame; |
| 2221 | int shared_p = 0; | 2147 | int shared_p = 0; |
| @@ -2252,9 +2178,7 @@ xic_free_xfontset (f) | |||
| 2252 | input method XIM. */ | 2178 | input method XIM. */ |
| 2253 | 2179 | ||
| 2254 | static XIMStyle | 2180 | static XIMStyle |
| 2255 | best_xim_style (user, xim) | 2181 | best_xim_style (XIMStyles *user, XIMStyles *xim) |
| 2256 | XIMStyles *user; | ||
| 2257 | XIMStyles *xim; | ||
| 2258 | { | 2182 | { |
| 2259 | int i, j; | 2183 | int i, j; |
| 2260 | 2184 | ||
| @@ -2272,8 +2196,7 @@ best_xim_style (user, xim) | |||
| 2272 | static XIMStyle xic_style; | 2196 | static XIMStyle xic_style; |
| 2273 | 2197 | ||
| 2274 | void | 2198 | void |
| 2275 | create_frame_xic (f) | 2199 | create_frame_xic (struct frame *f) |
| 2276 | struct frame *f; | ||
| 2277 | { | 2200 | { |
| 2278 | XIM xim; | 2201 | XIM xim; |
| 2279 | XIC xic = NULL; | 2202 | XIC xic = NULL; |
| @@ -2348,8 +2271,7 @@ create_frame_xic (f) | |||
| 2348 | /* Destroy XIC and free XIC fontset of frame F, if any. */ | 2271 | /* Destroy XIC and free XIC fontset of frame F, if any. */ |
| 2349 | 2272 | ||
| 2350 | void | 2273 | void |
| 2351 | free_frame_xic (f) | 2274 | free_frame_xic (struct frame *f) |
| 2352 | struct frame *f; | ||
| 2353 | { | 2275 | { |
| 2354 | if (FRAME_XIC (f) == NULL) | 2276 | if (FRAME_XIC (f) == NULL) |
| 2355 | return; | 2277 | return; |
| @@ -2365,9 +2287,7 @@ free_frame_xic (f) | |||
| 2365 | pixel position X/Y. X and Y are relative to window W. */ | 2287 | pixel position X/Y. X and Y are relative to window W. */ |
| 2366 | 2288 | ||
| 2367 | void | 2289 | void |
| 2368 | xic_set_preeditarea (w, x, y) | 2290 | xic_set_preeditarea (struct window *w, int x, int y) |
| 2369 | struct window *w; | ||
| 2370 | int x, y; | ||
| 2371 | { | 2291 | { |
| 2372 | struct frame *f = XFRAME (w->frame); | 2292 | struct frame *f = XFRAME (w->frame); |
| 2373 | XVaNestedList attr; | 2293 | XVaNestedList attr; |
| @@ -2384,8 +2304,7 @@ xic_set_preeditarea (w, x, y) | |||
| 2384 | /* Place status area for XIC in bottom right corner of frame F.. */ | 2304 | /* Place status area for XIC in bottom right corner of frame F.. */ |
| 2385 | 2305 | ||
| 2386 | void | 2306 | void |
| 2387 | xic_set_statusarea (f) | 2307 | xic_set_statusarea (struct frame *f) |
| 2388 | struct frame *f; | ||
| 2389 | { | 2308 | { |
| 2390 | XIC xic = FRAME_XIC (f); | 2309 | XIC xic = FRAME_XIC (f); |
| 2391 | XVaNestedList attr; | 2310 | XVaNestedList attr; |
| @@ -2429,9 +2348,7 @@ xic_set_statusarea (f) | |||
| 2429 | BASE_FONTNAME. Called when a new Emacs fontset is chosen. */ | 2348 | BASE_FONTNAME. Called when a new Emacs fontset is chosen. */ |
| 2430 | 2349 | ||
| 2431 | void | 2350 | void |
| 2432 | xic_set_xfontset (f, base_fontname) | 2351 | xic_set_xfontset (struct frame *f, char *base_fontname) |
| 2433 | struct frame *f; | ||
| 2434 | char *base_fontname; | ||
| 2435 | { | 2352 | { |
| 2436 | XVaNestedList attr; | 2353 | XVaNestedList attr; |
| 2437 | XFontSet xfs; | 2354 | XFontSet xfs; |
| @@ -2706,8 +2623,7 @@ x_window (f, window_prompting, minibuffer_only) | |||
| 2706 | #else /* not USE_X_TOOLKIT */ | 2623 | #else /* not USE_X_TOOLKIT */ |
| 2707 | #ifdef USE_GTK | 2624 | #ifdef USE_GTK |
| 2708 | void | 2625 | void |
| 2709 | x_window (f) | 2626 | x_window (FRAME_PTR f) |
| 2710 | FRAME_PTR f; | ||
| 2711 | { | 2627 | { |
| 2712 | if (! xg_create_frame_widgets (f)) | 2628 | if (! xg_create_frame_widgets (f)) |
| 2713 | error ("Unable to create window"); | 2629 | error ("Unable to create window"); |
| @@ -2854,9 +2770,7 @@ x_window (f) | |||
| 2854 | /* Verify that the icon position args for this window are valid. */ | 2770 | /* Verify that the icon position args for this window are valid. */ |
| 2855 | 2771 | ||
| 2856 | static void | 2772 | static void |
| 2857 | x_icon_verify (f, parms) | 2773 | x_icon_verify (struct frame *f, Lisp_Object parms) |
| 2858 | struct frame *f; | ||
| 2859 | Lisp_Object parms; | ||
| 2860 | { | 2774 | { |
| 2861 | Lisp_Object icon_x, icon_y; | 2775 | Lisp_Object icon_x, icon_y; |
| 2862 | 2776 | ||
| @@ -2878,9 +2792,7 @@ x_icon_verify (f, parms) | |||
| 2878 | well. */ | 2792 | well. */ |
| 2879 | 2793 | ||
| 2880 | static void | 2794 | static void |
| 2881 | x_icon (f, parms) | 2795 | x_icon (struct frame *f, Lisp_Object parms) |
| 2882 | struct frame *f; | ||
| 2883 | Lisp_Object parms; | ||
| 2884 | { | 2796 | { |
| 2885 | Lisp_Object icon_x, icon_y; | 2797 | Lisp_Object icon_x, icon_y; |
| 2886 | #if 0 | 2798 | #if 0 |
| @@ -2926,8 +2838,7 @@ x_icon (f, parms) | |||
| 2926 | mouse cursor and the gray border tile. */ | 2838 | mouse cursor and the gray border tile. */ |
| 2927 | 2839 | ||
| 2928 | static void | 2840 | static void |
| 2929 | x_make_gc (f) | 2841 | x_make_gc (struct frame *f) |
| 2930 | struct frame *f; | ||
| 2931 | { | 2842 | { |
| 2932 | XGCValues gc_values; | 2843 | XGCValues gc_values; |
| 2933 | 2844 | ||
| @@ -2986,8 +2897,7 @@ x_make_gc (f) | |||
| 2986 | /* Free what was allocated in x_make_gc. */ | 2897 | /* Free what was allocated in x_make_gc. */ |
| 2987 | 2898 | ||
| 2988 | void | 2899 | void |
| 2989 | x_free_gcs (f) | 2900 | x_free_gcs (struct frame *f) |
| 2990 | struct frame *f; | ||
| 2991 | { | 2901 | { |
| 2992 | Display *dpy = FRAME_X_DISPLAY (f); | 2902 | Display *dpy = FRAME_X_DISPLAY (f); |
| 2993 | 2903 | ||
| @@ -3026,8 +2936,7 @@ x_free_gcs (f) | |||
| 3026 | constructed. */ | 2936 | constructed. */ |
| 3027 | 2937 | ||
| 3028 | static Lisp_Object | 2938 | static Lisp_Object |
| 3029 | unwind_create_frame (frame) | 2939 | unwind_create_frame (Lisp_Object frame) |
| 3030 | Lisp_Object frame; | ||
| 3031 | { | 2940 | { |
| 3032 | struct frame *f = XFRAME (frame); | 2941 | struct frame *f = XFRAME (frame); |
| 3033 | 2942 | ||
| @@ -3059,9 +2968,7 @@ unwind_create_frame (frame) | |||
| 3059 | 2968 | ||
| 3060 | 2969 | ||
| 3061 | static void | 2970 | static void |
| 3062 | x_default_font_parameter (f, parms) | 2971 | x_default_font_parameter (struct frame *f, Lisp_Object parms) |
| 3063 | struct frame *f; | ||
| 3064 | Lisp_Object parms; | ||
| 3065 | { | 2972 | { |
| 3066 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 2973 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 3067 | Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, | 2974 | Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, |
| @@ -3611,8 +3518,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3611 | know about that structure. */ | 3518 | know about that structure. */ |
| 3612 | 3519 | ||
| 3613 | Lisp_Object | 3520 | Lisp_Object |
| 3614 | x_get_focus_frame (frame) | 3521 | x_get_focus_frame (struct frame *frame) |
| 3615 | struct frame *frame; | ||
| 3616 | { | 3522 | { |
| 3617 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame); | 3523 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame); |
| 3618 | Lisp_Object xfocus; | 3524 | Lisp_Object xfocus; |
| @@ -3994,36 +3900,31 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 3994 | } | 3900 | } |
| 3995 | 3901 | ||
| 3996 | int | 3902 | int |
| 3997 | x_pixel_width (f) | 3903 | x_pixel_width (register struct frame *f) |
| 3998 | register struct frame *f; | ||
| 3999 | { | 3904 | { |
| 4000 | return FRAME_PIXEL_WIDTH (f); | 3905 | return FRAME_PIXEL_WIDTH (f); |
| 4001 | } | 3906 | } |
| 4002 | 3907 | ||
| 4003 | int | 3908 | int |
| 4004 | x_pixel_height (f) | 3909 | x_pixel_height (register struct frame *f) |
| 4005 | register struct frame *f; | ||
| 4006 | { | 3910 | { |
| 4007 | return FRAME_PIXEL_HEIGHT (f); | 3911 | return FRAME_PIXEL_HEIGHT (f); |
| 4008 | } | 3912 | } |
| 4009 | 3913 | ||
| 4010 | int | 3914 | int |
| 4011 | x_char_width (f) | 3915 | x_char_width (register struct frame *f) |
| 4012 | register struct frame *f; | ||
| 4013 | { | 3916 | { |
| 4014 | return FRAME_COLUMN_WIDTH (f); | 3917 | return FRAME_COLUMN_WIDTH (f); |
| 4015 | } | 3918 | } |
| 4016 | 3919 | ||
| 4017 | int | 3920 | int |
| 4018 | x_char_height (f) | 3921 | x_char_height (register struct frame *f) |
| 4019 | register struct frame *f; | ||
| 4020 | { | 3922 | { |
| 4021 | return FRAME_LINE_HEIGHT (f); | 3923 | return FRAME_LINE_HEIGHT (f); |
| 4022 | } | 3924 | } |
| 4023 | 3925 | ||
| 4024 | int | 3926 | int |
| 4025 | x_screen_planes (f) | 3927 | x_screen_planes (register struct frame *f) |
| 4026 | register struct frame *f; | ||
| 4027 | { | 3928 | { |
| 4028 | return FRAME_X_DISPLAY_INFO (f)->n_planes; | 3929 | return FRAME_X_DISPLAY_INFO (f)->n_planes; |
| 4029 | } | 3930 | } |
| @@ -4080,8 +3981,7 @@ XScreenNumberOfScreen (scr) | |||
| 4080 | members of DPYINFO appropriately. Called from x_term_init. */ | 3981 | members of DPYINFO appropriately. Called from x_term_init. */ |
| 4081 | 3982 | ||
| 4082 | void | 3983 | void |
| 4083 | select_visual (dpyinfo) | 3984 | select_visual (struct x_display_info *dpyinfo) |
| 4084 | struct x_display_info *dpyinfo; | ||
| 4085 | { | 3985 | { |
| 4086 | Display *dpy = dpyinfo->display; | 3986 | Display *dpy = dpyinfo->display; |
| 4087 | Screen *screen = dpyinfo->screen; | 3987 | Screen *screen = dpyinfo->screen; |
| @@ -4154,8 +4054,7 @@ select_visual (dpyinfo) | |||
| 4154 | Open a new connection if necessary. */ | 4054 | Open a new connection if necessary. */ |
| 4155 | 4055 | ||
| 4156 | struct x_display_info * | 4056 | struct x_display_info * |
| 4157 | x_display_info_for_name (name) | 4057 | x_display_info_for_name (Lisp_Object name) |
| 4158 | Lisp_Object name; | ||
| 4159 | { | 4058 | { |
| 4160 | Lisp_Object names; | 4059 | Lisp_Object names; |
| 4161 | struct x_display_info *dpyinfo; | 4060 | struct x_display_info *dpyinfo; |
| @@ -4302,8 +4201,7 @@ If TERMINAL is omitted or nil, that stands for the selected frame's display. */ | |||
| 4302 | /* Wait for responses to all X commands issued so far for frame F. */ | 4201 | /* Wait for responses to all X commands issued so far for frame F. */ |
| 4303 | 4202 | ||
| 4304 | void | 4203 | void |
| 4305 | x_sync (f) | 4204 | x_sync (FRAME_PTR f) |
| 4306 | FRAME_PTR f; | ||
| 4307 | { | 4205 | { |
| 4308 | BLOCK_INPUT; | 4206 | BLOCK_INPUT; |
| 4309 | XSync (FRAME_X_DISPLAY (f), False); | 4207 | XSync (FRAME_X_DISPLAY (f), False); |
| @@ -4565,8 +4463,7 @@ no value of TYPE. */) | |||
| 4565 | shown on the frames. */ | 4463 | shown on the frames. */ |
| 4566 | 4464 | ||
| 4567 | void | 4465 | void |
| 4568 | show_hourglass (timer) | 4466 | show_hourglass (struct atimer *timer) |
| 4569 | struct atimer *timer; | ||
| 4570 | { | 4467 | { |
| 4571 | /* The timer implementation will cancel this timer automatically | 4468 | /* The timer implementation will cancel this timer automatically |
| 4572 | after this function has run. Set hourglass_atimer to null | 4469 | after this function has run. Set hourglass_atimer to null |
| @@ -4630,7 +4527,7 @@ show_hourglass (timer) | |||
| 4630 | shown. */ | 4527 | shown. */ |
| 4631 | 4528 | ||
| 4632 | void | 4529 | void |
| 4633 | hide_hourglass () | 4530 | hide_hourglass (void) |
| 4634 | { | 4531 | { |
| 4635 | if (hourglass_shown_p) | 4532 | if (hourglass_shown_p) |
| 4636 | { | 4533 | { |
| @@ -4691,8 +4588,7 @@ Lisp_Object Vx_max_tooltip_size; | |||
| 4691 | 4588 | ||
| 4692 | 4589 | ||
| 4693 | static Lisp_Object | 4590 | static Lisp_Object |
| 4694 | unwind_create_tip_frame (frame) | 4591 | unwind_create_tip_frame (Lisp_Object frame) |
| 4695 | Lisp_Object frame; | ||
| 4696 | { | 4592 | { |
| 4697 | Lisp_Object deleted; | 4593 | Lisp_Object deleted; |
| 4698 | 4594 | ||
| @@ -4717,9 +4613,7 @@ unwind_create_tip_frame (frame) | |||
| 4717 | when this happens. */ | 4613 | when this happens. */ |
| 4718 | 4614 | ||
| 4719 | static Lisp_Object | 4615 | static Lisp_Object |
| 4720 | x_create_tip_frame (dpyinfo, parms, text) | 4616 | x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms, Lisp_Object text) |
| 4721 | struct x_display_info *dpyinfo; | ||
| 4722 | Lisp_Object parms, text; | ||
| 4723 | { | 4617 | { |
| 4724 | struct frame *f; | 4618 | struct frame *f; |
| 4725 | Lisp_Object frame, tem; | 4619 | Lisp_Object frame, tem; |
| @@ -5034,11 +4928,7 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 5034 | the display in *ROOT_X, and *ROOT_Y. */ | 4928 | the display in *ROOT_X, and *ROOT_Y. */ |
| 5035 | 4929 | ||
| 5036 | static void | 4930 | static void |
| 5037 | compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | 4931 | compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object dy, int width, int height, int *root_x, int *root_y) |
| 5038 | struct frame *f; | ||
| 5039 | Lisp_Object parms, dx, dy; | ||
| 5040 | int width, height; | ||
| 5041 | int *root_x, *root_y; | ||
| 5042 | { | 4932 | { |
| 5043 | Lisp_Object left, top; | 4933 | Lisp_Object left, top; |
| 5044 | int win_x, win_y; | 4934 | int win_x, win_y; |
| @@ -5594,8 +5484,7 @@ or directory must exist. ONLY-DIR-P is ignored." */) | |||
| 5594 | #ifdef USE_GTK | 5484 | #ifdef USE_GTK |
| 5595 | 5485 | ||
| 5596 | static Lisp_Object | 5486 | static Lisp_Object |
| 5597 | clean_up_dialog (arg) | 5487 | clean_up_dialog (Lisp_Object arg) |
| 5598 | Lisp_Object arg; | ||
| 5599 | { | 5488 | { |
| 5600 | x_menu_set_in_use (0); | 5489 | x_menu_set_in_use (0); |
| 5601 | 5490 | ||
| @@ -5891,7 +5780,7 @@ frame_parm_handler x_frame_parm_handlers[] = | |||
| 5891 | }; | 5780 | }; |
| 5892 | 5781 | ||
| 5893 | void | 5782 | void |
| 5894 | syms_of_xfns () | 5783 | syms_of_xfns (void) |
| 5895 | { | 5784 | { |
| 5896 | /* This is zero if not using X windows. */ | 5785 | /* This is zero if not using X windows. */ |
| 5897 | x_in_use = 0; | 5786 | x_in_use = 0; |
diff --git a/src/xfont.c b/src/xfont.c index 8a1d960343c..b1e793de808 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -55,9 +55,7 @@ static XCharStruct *xfont_get_pcm (XFontStruct *, XChar2b *); | |||
| 55 | is not contained in the font. */ | 55 | is not contained in the font. */ |
| 56 | 56 | ||
| 57 | static XCharStruct * | 57 | static XCharStruct * |
| 58 | xfont_get_pcm (xfont, char2b) | 58 | xfont_get_pcm (XFontStruct *xfont, XChar2b *char2b) |
| 59 | XFontStruct *xfont; | ||
| 60 | XChar2b *char2b; | ||
| 61 | { | 59 | { |
| 62 | /* The result metric information. */ | 60 | /* The result metric information. */ |
| 63 | XCharStruct *pcm = NULL; | 61 | XCharStruct *pcm = NULL; |
| @@ -159,8 +157,7 @@ struct font_driver xfont_driver = | |||
| 159 | extern Lisp_Object QCname; | 157 | extern Lisp_Object QCname; |
| 160 | 158 | ||
| 161 | static Lisp_Object | 159 | static Lisp_Object |
| 162 | xfont_get_cache (f) | 160 | xfont_get_cache (FRAME_PTR f) |
| 163 | FRAME_PTR f; | ||
| 164 | { | 161 | { |
| 165 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 162 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 166 | 163 | ||
| @@ -497,8 +494,7 @@ xfont_list_pattern (Display *display, char *pattern, | |||
| 497 | } | 494 | } |
| 498 | 495 | ||
| 499 | static Lisp_Object | 496 | static Lisp_Object |
| 500 | xfont_list (frame, spec) | 497 | xfont_list (Lisp_Object frame, Lisp_Object spec) |
| 501 | Lisp_Object frame, spec; | ||
| 502 | { | 498 | { |
| 503 | FRAME_PTR f = XFRAME (frame); | 499 | FRAME_PTR f = XFRAME (frame); |
| 504 | Display *display = FRAME_X_DISPLAY_INFO (f)->display; | 500 | Display *display = FRAME_X_DISPLAY_INFO (f)->display; |
| @@ -577,8 +573,7 @@ xfont_list (frame, spec) | |||
| 577 | } | 573 | } |
| 578 | 574 | ||
| 579 | static Lisp_Object | 575 | static Lisp_Object |
| 580 | xfont_match (frame, spec) | 576 | xfont_match (Lisp_Object frame, Lisp_Object spec) |
| 581 | Lisp_Object frame, spec; | ||
| 582 | { | 577 | { |
| 583 | FRAME_PTR f = XFRAME (frame); | 578 | FRAME_PTR f = XFRAME (frame); |
| 584 | Display *display = FRAME_X_DISPLAY_INFO (f)->display; | 579 | Display *display = FRAME_X_DISPLAY_INFO (f)->display; |
| @@ -636,8 +631,7 @@ xfont_match (frame, spec) | |||
| 636 | } | 631 | } |
| 637 | 632 | ||
| 638 | static Lisp_Object | 633 | static Lisp_Object |
| 639 | xfont_list_family (frame) | 634 | xfont_list_family (Lisp_Object frame) |
| 640 | Lisp_Object frame; | ||
| 641 | { | 635 | { |
| 642 | FRAME_PTR f = XFRAME (frame); | 636 | FRAME_PTR f = XFRAME (frame); |
| 643 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 637 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| @@ -696,10 +690,7 @@ xfont_list_family (frame) | |||
| 696 | extern Lisp_Object QCavgwidth; | 690 | extern Lisp_Object QCavgwidth; |
| 697 | 691 | ||
| 698 | static Lisp_Object | 692 | static Lisp_Object |
| 699 | xfont_open (f, entity, pixel_size) | 693 | xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) |
| 700 | FRAME_PTR f; | ||
| 701 | Lisp_Object entity; | ||
| 702 | int pixel_size; | ||
| 703 | { | 694 | { |
| 704 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 695 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 705 | Display *display = dpyinfo->display; | 696 | Display *display = dpyinfo->display; |
| @@ -911,9 +902,7 @@ xfont_open (f, entity, pixel_size) | |||
| 911 | } | 902 | } |
| 912 | 903 | ||
| 913 | static void | 904 | static void |
| 914 | xfont_close (f, font) | 905 | xfont_close (FRAME_PTR f, struct font *font) |
| 915 | FRAME_PTR f; | ||
| 916 | struct font *font; | ||
| 917 | { | 906 | { |
| 918 | BLOCK_INPUT; | 907 | BLOCK_INPUT; |
| 919 | XFreeFont (FRAME_X_DISPLAY (f), ((struct xfont_info *) font)->xfont); | 908 | XFreeFont (FRAME_X_DISPLAY (f), ((struct xfont_info *) font)->xfont); |
| @@ -921,9 +910,7 @@ xfont_close (f, font) | |||
| 921 | } | 910 | } |
| 922 | 911 | ||
| 923 | static int | 912 | static int |
| 924 | xfont_prepare_face (f, face) | 913 | xfont_prepare_face (FRAME_PTR f, struct face *face) |
| 925 | FRAME_PTR f; | ||
| 926 | struct face *face; | ||
| 927 | { | 914 | { |
| 928 | BLOCK_INPUT; | 915 | BLOCK_INPUT; |
| 929 | XSetFont (FRAME_X_DISPLAY (f), face->gc, | 916 | XSetFont (FRAME_X_DISPLAY (f), face->gc, |
| @@ -934,9 +921,7 @@ xfont_prepare_face (f, face) | |||
| 934 | } | 921 | } |
| 935 | 922 | ||
| 936 | static int | 923 | static int |
| 937 | xfont_has_char (font, c) | 924 | xfont_has_char (Lisp_Object font, int c) |
| 938 | Lisp_Object font; | ||
| 939 | int c; | ||
| 940 | { | 925 | { |
| 941 | Lisp_Object registry = AREF (font, FONT_REGISTRY_INDEX); | 926 | Lisp_Object registry = AREF (font, FONT_REGISTRY_INDEX); |
| 942 | struct charset *encoding; | 927 | struct charset *encoding; |
| @@ -965,9 +950,7 @@ xfont_has_char (font, c) | |||
| 965 | } | 950 | } |
| 966 | 951 | ||
| 967 | static unsigned | 952 | static unsigned |
| 968 | xfont_encode_char (font, c) | 953 | xfont_encode_char (struct font *font, int c) |
| 969 | struct font *font; | ||
| 970 | int c; | ||
| 971 | { | 954 | { |
| 972 | XFontStruct *xfont = ((struct xfont_info *) font)->xfont; | 955 | XFontStruct *xfont = ((struct xfont_info *) font)->xfont; |
| 973 | struct charset *charset; | 956 | struct charset *charset; |
| @@ -990,11 +973,7 @@ xfont_encode_char (font, c) | |||
| 990 | } | 973 | } |
| 991 | 974 | ||
| 992 | static int | 975 | static int |
| 993 | xfont_text_extents (font, code, nglyphs, metrics) | 976 | xfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics) |
| 994 | struct font *font; | ||
| 995 | unsigned *code; | ||
| 996 | int nglyphs; | ||
| 997 | struct font_metrics *metrics; | ||
| 998 | { | 977 | { |
| 999 | XFontStruct *xfont = ((struct xfont_info *) font)->xfont; | 978 | XFontStruct *xfont = ((struct xfont_info *) font)->xfont; |
| 1000 | int width = 0; | 979 | int width = 0; |
| @@ -1046,9 +1025,7 @@ xfont_text_extents (font, code, nglyphs, metrics) | |||
| 1046 | } | 1025 | } |
| 1047 | 1026 | ||
| 1048 | static int | 1027 | static int |
| 1049 | xfont_draw (s, from, to, x, y, with_background) | 1028 | xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) |
| 1050 | struct glyph_string *s; | ||
| 1051 | int from, to, x, y, with_background; | ||
| 1052 | { | 1029 | { |
| 1053 | XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont; | 1030 | XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont; |
| 1054 | int len = to - from; | 1031 | int len = to - from; |
| @@ -1123,9 +1100,7 @@ xfont_draw (s, from, to, x, y, with_background) | |||
| 1123 | } | 1100 | } |
| 1124 | 1101 | ||
| 1125 | static int | 1102 | static int |
| 1126 | xfont_check (f, font) | 1103 | xfont_check (FRAME_PTR f, struct font *font) |
| 1127 | FRAME_PTR f; | ||
| 1128 | struct font *font; | ||
| 1129 | { | 1104 | { |
| 1130 | struct xfont_info *xfont = (struct xfont_info *) font; | 1105 | struct xfont_info *xfont = (struct xfont_info *) font; |
| 1131 | 1106 | ||
| @@ -1134,7 +1109,7 @@ xfont_check (f, font) | |||
| 1134 | 1109 | ||
| 1135 | 1110 | ||
| 1136 | void | 1111 | void |
| 1137 | syms_of_xfont () | 1112 | syms_of_xfont (void) |
| 1138 | { | 1113 | { |
| 1139 | staticpro (&xfont_scripts_cache); | 1114 | staticpro (&xfont_scripts_cache); |
| 1140 | { /* Here we rely on the fact that syms_of_xfont (via syms_of_font) | 1115 | { /* Here we rely on the fact that syms_of_xfont (via syms_of_font) |
diff --git a/src/xftfont.c b/src/xftfont.c index 8aeb6397f07..68dd0af762f 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -80,12 +80,7 @@ static void xftfont_get_colors (FRAME_PTR, struct face *, GC gc, | |||
| 80 | may be NULL. */ | 80 | may be NULL. */ |
| 81 | 81 | ||
| 82 | static void | 82 | static void |
| 83 | xftfont_get_colors (f, face, gc, xftface_info, fg, bg) | 83 | xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info *xftface_info, XftColor *fg, XftColor *bg) |
| 84 | FRAME_PTR f; | ||
| 85 | struct face *face; | ||
| 86 | GC gc; | ||
| 87 | struct xftface_info *xftface_info; | ||
| 88 | XftColor *fg, *bg; | ||
| 89 | { | 84 | { |
| 90 | if (xftface_info && face->gc == gc) | 85 | if (xftface_info && face->gc == gc) |
| 91 | { | 86 | { |
| @@ -157,9 +152,7 @@ static int xftfont_end_for_frame (FRAME_PTR f); | |||
| 157 | struct font_driver xftfont_driver; | 152 | struct font_driver xftfont_driver; |
| 158 | 153 | ||
| 159 | static Lisp_Object | 154 | static Lisp_Object |
| 160 | xftfont_list (frame, spec) | 155 | xftfont_list (Lisp_Object frame, Lisp_Object spec) |
| 161 | Lisp_Object frame; | ||
| 162 | Lisp_Object spec; | ||
| 163 | { | 156 | { |
| 164 | Lisp_Object list = ftfont_driver.list (frame, spec), tail; | 157 | Lisp_Object list = ftfont_driver.list (frame, spec), tail; |
| 165 | 158 | ||
| @@ -169,9 +162,7 @@ xftfont_list (frame, spec) | |||
| 169 | } | 162 | } |
| 170 | 163 | ||
| 171 | static Lisp_Object | 164 | static Lisp_Object |
| 172 | xftfont_match (frame, spec) | 165 | xftfont_match (Lisp_Object frame, Lisp_Object spec) |
| 173 | Lisp_Object frame; | ||
| 174 | Lisp_Object spec; | ||
| 175 | { | 166 | { |
| 176 | Lisp_Object entity = ftfont_driver.match (frame, spec); | 167 | Lisp_Object entity = ftfont_driver.match (frame, spec); |
| 177 | 168 | ||
| @@ -187,8 +178,7 @@ extern Lisp_Object QCantialias; | |||
| 187 | static FcChar8 ascii_printable[95]; | 178 | static FcChar8 ascii_printable[95]; |
| 188 | 179 | ||
| 189 | static void | 180 | static void |
| 190 | xftfont_fix_match (pat, match) | 181 | xftfont_fix_match (FcPattern *pat, FcPattern *match) |
| 191 | FcPattern *pat, *match; | ||
| 192 | { | 182 | { |
| 193 | /* These values are not used for matching (except antialias), but for | 183 | /* These values are not used for matching (except antialias), but for |
| 194 | rendering, so make sure they are carried over to the match. | 184 | rendering, so make sure they are carried over to the match. |
| @@ -238,9 +228,7 @@ xftfont_fix_match (pat, match) | |||
| 238 | } | 228 | } |
| 239 | 229 | ||
| 240 | static void | 230 | static void |
| 241 | xftfont_add_rendering_parameters (pat, entity) | 231 | xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity) |
| 242 | FcPattern *pat; | ||
| 243 | Lisp_Object entity; | ||
| 244 | { | 232 | { |
| 245 | Lisp_Object tail; | 233 | Lisp_Object tail; |
| 246 | int ival; | 234 | int ival; |
| @@ -288,10 +276,7 @@ xftfont_add_rendering_parameters (pat, entity) | |||
| 288 | } | 276 | } |
| 289 | 277 | ||
| 290 | static Lisp_Object | 278 | static Lisp_Object |
| 291 | xftfont_open (f, entity, pixel_size) | 279 | xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) |
| 292 | FRAME_PTR f; | ||
| 293 | Lisp_Object entity; | ||
| 294 | int pixel_size; | ||
| 295 | { | 280 | { |
| 296 | FcResult result; | 281 | FcResult result; |
| 297 | Display *display = FRAME_X_DISPLAY (f); | 282 | Display *display = FRAME_X_DISPLAY (f); |
| @@ -510,9 +495,7 @@ xftfont_open (f, entity, pixel_size) | |||
| 510 | } | 495 | } |
| 511 | 496 | ||
| 512 | static void | 497 | static void |
| 513 | xftfont_close (f, font) | 498 | xftfont_close (FRAME_PTR f, struct font *font) |
| 514 | FRAME_PTR f; | ||
| 515 | struct font *font; | ||
| 516 | { | 499 | { |
| 517 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; | 500 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; |
| 518 | 501 | ||
| @@ -527,9 +510,7 @@ xftfont_close (f, font) | |||
| 527 | } | 510 | } |
| 528 | 511 | ||
| 529 | static int | 512 | static int |
| 530 | xftfont_prepare_face (f, face) | 513 | xftfont_prepare_face (FRAME_PTR f, struct face *face) |
| 531 | FRAME_PTR f; | ||
| 532 | struct face *face; | ||
| 533 | { | 514 | { |
| 534 | struct xftface_info *xftface_info; | 515 | struct xftface_info *xftface_info; |
| 535 | 516 | ||
| @@ -552,9 +533,7 @@ xftfont_prepare_face (f, face) | |||
| 552 | } | 533 | } |
| 553 | 534 | ||
| 554 | static void | 535 | static void |
| 555 | xftfont_done_face (f, face) | 536 | xftfont_done_face (FRAME_PTR f, struct face *face) |
| 556 | FRAME_PTR f; | ||
| 557 | struct face *face; | ||
| 558 | { | 537 | { |
| 559 | struct xftface_info *xftface_info; | 538 | struct xftface_info *xftface_info; |
| 560 | 539 | ||
| @@ -576,9 +555,7 @@ xftfont_done_face (f, face) | |||
| 576 | extern Lisp_Object Qja, Qko; | 555 | extern Lisp_Object Qja, Qko; |
| 577 | 556 | ||
| 578 | static int | 557 | static int |
| 579 | xftfont_has_char (font, c) | 558 | xftfont_has_char (Lisp_Object font, int c) |
| 580 | Lisp_Object font; | ||
| 581 | int c; | ||
| 582 | { | 559 | { |
| 583 | struct xftfont_info *xftfont_info; | 560 | struct xftfont_info *xftfont_info; |
| 584 | struct charset *cs = NULL; | 561 | struct charset *cs = NULL; |
| @@ -600,9 +577,7 @@ xftfont_has_char (font, c) | |||
| 600 | } | 577 | } |
| 601 | 578 | ||
| 602 | static unsigned | 579 | static unsigned |
| 603 | xftfont_encode_char (font, c) | 580 | xftfont_encode_char (struct font *font, int c) |
| 604 | struct font *font; | ||
| 605 | int c; | ||
| 606 | { | 581 | { |
| 607 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; | 582 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; |
| 608 | unsigned code = XftCharIndex (xftfont_info->display, xftfont_info->xftfont, | 583 | unsigned code = XftCharIndex (xftfont_info->display, xftfont_info->xftfont, |
| @@ -612,11 +587,7 @@ xftfont_encode_char (font, c) | |||
| 612 | } | 587 | } |
| 613 | 588 | ||
| 614 | static int | 589 | static int |
| 615 | xftfont_text_extents (font, code, nglyphs, metrics) | 590 | xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics) |
| 616 | struct font *font; | ||
| 617 | unsigned *code; | ||
| 618 | int nglyphs; | ||
| 619 | struct font_metrics *metrics; | ||
| 620 | { | 591 | { |
| 621 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; | 592 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; |
| 622 | XGlyphInfo extents; | 593 | XGlyphInfo extents; |
| @@ -637,8 +608,7 @@ xftfont_text_extents (font, code, nglyphs, metrics) | |||
| 637 | } | 608 | } |
| 638 | 609 | ||
| 639 | static XftDraw * | 610 | static XftDraw * |
| 640 | xftfont_get_xft_draw (f) | 611 | xftfont_get_xft_draw (FRAME_PTR f) |
| 641 | FRAME_PTR f; | ||
| 642 | { | 612 | { |
| 643 | XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver); | 613 | XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver); |
| 644 | 614 | ||
| @@ -658,9 +628,7 @@ xftfont_get_xft_draw (f) | |||
| 658 | } | 628 | } |
| 659 | 629 | ||
| 660 | static int | 630 | static int |
| 661 | xftfont_draw (s, from, to, x, y, with_background) | 631 | xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background) |
| 662 | struct glyph_string *s; | ||
| 663 | int from, to, x, y, with_background; | ||
| 664 | { | 632 | { |
| 665 | FRAME_PTR f = s->f; | 633 | FRAME_PTR f = s->f; |
| 666 | struct face *face = s->face; | 634 | struct face *face = s->face; |
| @@ -703,8 +671,7 @@ xftfont_draw (s, from, to, x, y, with_background) | |||
| 703 | } | 671 | } |
| 704 | 672 | ||
| 705 | static int | 673 | static int |
| 706 | xftfont_end_for_frame (f) | 674 | xftfont_end_for_frame (FRAME_PTR f) |
| 707 | FRAME_PTR f; | ||
| 708 | { | 675 | { |
| 709 | XftDraw *xft_draw; | 676 | XftDraw *xft_draw; |
| 710 | 677 | ||
| @@ -724,11 +691,7 @@ xftfont_end_for_frame (f) | |||
| 724 | } | 691 | } |
| 725 | 692 | ||
| 726 | static int | 693 | static int |
| 727 | xftfont_cached_font_ok (f, font_object, entity) | 694 | xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, Lisp_Object entity) |
| 728 | struct frame *f; | ||
| 729 | Lisp_Object font_object; | ||
| 730 | Lisp_Object entity; | ||
| 731 | |||
| 732 | { | 695 | { |
| 733 | struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object); | 696 | struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object); |
| 734 | FcPattern *oldpat = info->xftfont->pattern; | 697 | FcPattern *oldpat = info->xftfont->pattern; |
| @@ -771,7 +734,7 @@ xftfont_cached_font_ok (f, font_object, entity) | |||
| 771 | } | 734 | } |
| 772 | 735 | ||
| 773 | void | 736 | void |
| 774 | syms_of_xftfont () | 737 | syms_of_xftfont (void) |
| 775 | { | 738 | { |
| 776 | DEFSYM (Qxft, "xft"); | 739 | DEFSYM (Qxft, "xft"); |
| 777 | DEFSYM (QChinting, ":hinting"); | 740 | DEFSYM (QChinting, ":hinting"); |
diff --git a/src/xgselect.c b/src/xgselect.c index 42fff2d98da..5c7e008044d 100644 --- a/src/xgselect.c +++ b/src/xgselect.c | |||
| @@ -29,12 +29,7 @@ static GPollFD *gfds; | |||
| 29 | static int gfds_size; | 29 | static int gfds_size; |
| 30 | 30 | ||
| 31 | int | 31 | int |
| 32 | xg_select (max_fds, rfds, wfds, efds, timeout) | 32 | xg_select (int max_fds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout) |
| 33 | int max_fds; | ||
| 34 | SELECT_TYPE *rfds; | ||
| 35 | SELECT_TYPE *wfds; | ||
| 36 | SELECT_TYPE *efds; | ||
| 37 | EMACS_TIME *timeout; | ||
| 38 | { | 33 | { |
| 39 | SELECT_TYPE all_rfds, all_wfds; | 34 | SELECT_TYPE all_rfds, all_wfds; |
| 40 | EMACS_TIME tmo, *tmop = timeout; | 35 | EMACS_TIME tmo, *tmop = timeout; |
| @@ -147,7 +142,7 @@ xg_select (max_fds, rfds, wfds, efds, timeout) | |||
| 147 | #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ | 142 | #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ |
| 148 | 143 | ||
| 149 | void | 144 | void |
| 150 | xgselect_initialize () | 145 | xgselect_initialize (void) |
| 151 | { | 146 | { |
| 152 | #if defined (USE_GTK) || defined (HAVE_GCONF) | 147 | #if defined (USE_GTK) || defined (HAVE_GCONF) |
| 153 | gfds_size = 128; | 148 | gfds_size = 128; |
diff --git a/src/xmenu.c b/src/xmenu.c index 189bcbf9a25..deb7c091877 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -196,10 +196,7 @@ menubar_id_to_frame (id) | |||
| 196 | the scroll bar or the edit window. Fx_popup_menu needs to be | 196 | the scroll bar or the edit window. Fx_popup_menu needs to be |
| 197 | sure it is the edit window. */ | 197 | sure it is the edit window. */ |
| 198 | void | 198 | void |
| 199 | mouse_position_for_popup (f, x, y) | 199 | mouse_position_for_popup (FRAME_PTR f, int *x, int *y) |
| 200 | FRAME_PTR f; | ||
| 201 | int *x; | ||
| 202 | int *y; | ||
| 203 | { | 200 | { |
| 204 | Window root, dummy_window; | 201 | Window root, dummy_window; |
| 205 | int dummy; | 202 | int dummy; |
| @@ -391,8 +388,7 @@ for instance using the window manager, then this produces a quit and | |||
| 391 | /* Set menu_items_inuse so no other popup menu or dialog is created. */ | 388 | /* Set menu_items_inuse so no other popup menu or dialog is created. */ |
| 392 | 389 | ||
| 393 | void | 390 | void |
| 394 | x_menu_set_in_use (in_use) | 391 | x_menu_set_in_use (int in_use) |
| 395 | int in_use; | ||
| 396 | { | 392 | { |
| 397 | menu_items_inuse = in_use ? Qt : Qnil; | 393 | menu_items_inuse = in_use ? Qt : Qnil; |
| 398 | popup_activated_flag = in_use; | 394 | popup_activated_flag = in_use; |
| @@ -638,9 +634,7 @@ If FRAME is nil or not given, use the selected frame. */) | |||
| 638 | Used for popup menus and dialogs. */ | 634 | Used for popup menus and dialogs. */ |
| 639 | 635 | ||
| 640 | static void | 636 | static void |
| 641 | popup_widget_loop (do_timers, widget) | 637 | popup_widget_loop (int do_timers, GtkWidget *widget) |
| 642 | int do_timers; | ||
| 643 | GtkWidget *widget; | ||
| 644 | { | 638 | { |
| 645 | ++popup_activated_flag; | 639 | ++popup_activated_flag; |
| 646 | 640 | ||
| @@ -668,8 +662,7 @@ popup_widget_loop (do_timers, widget) | |||
| 668 | execute Lisp code. */ | 662 | execute Lisp code. */ |
| 669 | 663 | ||
| 670 | void | 664 | void |
| 671 | x_activate_menubar (f) | 665 | x_activate_menubar (FRAME_PTR f) |
| 672 | FRAME_PTR f; | ||
| 673 | { | 666 | { |
| 674 | if (! FRAME_X_P (f)) | 667 | if (! FRAME_X_P (f)) |
| 675 | abort (); | 668 | abort (); |
| @@ -724,9 +717,7 @@ popup_activate_callback (widget, id, client_data) | |||
| 724 | 717 | ||
| 725 | #ifdef USE_GTK | 718 | #ifdef USE_GTK |
| 726 | static void | 719 | static void |
| 727 | popup_deactivate_callback (widget, client_data) | 720 | popup_deactivate_callback (GtkWidget *widget, gpointer client_data) |
| 728 | GtkWidget *widget; | ||
| 729 | gpointer client_data; | ||
| 730 | { | 721 | { |
| 731 | popup_activated_flag = 0; | 722 | popup_activated_flag = 0; |
| 732 | } | 723 | } |
| @@ -746,10 +737,7 @@ popup_deactivate_callback (widget, id, client_data) | |||
| 746 | for that widget. | 737 | for that widget. |
| 747 | F is the frame if known, or NULL if not known. */ | 738 | F is the frame if known, or NULL if not known. */ |
| 748 | static void | 739 | static void |
| 749 | show_help_event (f, widget, help) | 740 | show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help) |
| 750 | FRAME_PTR f; | ||
| 751 | xt_or_gtk_widget widget; | ||
| 752 | Lisp_Object help; | ||
| 753 | { | 741 | { |
| 754 | Lisp_Object frame; | 742 | Lisp_Object frame; |
| 755 | 743 | ||
| @@ -787,9 +775,7 @@ show_help_event (f, widget, help) | |||
| 787 | 775 | ||
| 788 | #ifdef USE_GTK | 776 | #ifdef USE_GTK |
| 789 | void | 777 | void |
| 790 | menu_highlight_callback (widget, call_data) | 778 | menu_highlight_callback (GtkWidget *widget, gpointer call_data) |
| 791 | GtkWidget *widget; | ||
| 792 | gpointer call_data; | ||
| 793 | { | 779 | { |
| 794 | xg_menu_item_cb_data *cb_data; | 780 | xg_menu_item_cb_data *cb_data; |
| 795 | Lisp_Object help; | 781 | Lisp_Object help; |
| @@ -839,9 +825,7 @@ static int xg_crazy_callback_abort; | |||
| 839 | Figure out what the user chose | 825 | Figure out what the user chose |
| 840 | and put the appropriate events into the keyboard buffer. */ | 826 | and put the appropriate events into the keyboard buffer. */ |
| 841 | static void | 827 | static void |
| 842 | menubar_selection_callback (widget, client_data) | 828 | menubar_selection_callback (GtkWidget *widget, gpointer client_data) |
| 843 | GtkWidget *widget; | ||
| 844 | gpointer client_data; | ||
| 845 | { | 829 | { |
| 846 | xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data; | 830 | xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data; |
| 847 | 831 | ||
| @@ -903,8 +887,7 @@ menubar_selection_callback (widget, id, client_data) | |||
| 903 | changed. Value is non-zero if widgets were updated. */ | 887 | changed. Value is non-zero if widgets were updated. */ |
| 904 | 888 | ||
| 905 | static int | 889 | static int |
| 906 | update_frame_menubar (f) | 890 | update_frame_menubar (FRAME_PTR f) |
| 907 | FRAME_PTR f; | ||
| 908 | { | 891 | { |
| 909 | #ifdef USE_GTK | 892 | #ifdef USE_GTK |
| 910 | return xg_update_frame_menubar (f); | 893 | return xg_update_frame_menubar (f); |
| @@ -995,10 +978,7 @@ apply_systemfont_to_menu (w) | |||
| 995 | it is set the first time this is called, from initialize_frame_menubar. */ | 978 | it is set the first time this is called, from initialize_frame_menubar. */ |
| 996 | 979 | ||
| 997 | void | 980 | void |
| 998 | set_frame_menubar (f, first_time, deep_p) | 981 | set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) |
| 999 | FRAME_PTR f; | ||
| 1000 | int first_time; | ||
| 1001 | int deep_p; | ||
| 1002 | { | 982 | { |
| 1003 | xt_or_gtk_widget menubar_widget; | 983 | xt_or_gtk_widget menubar_widget; |
| 1004 | #ifdef USE_X_TOOLKIT | 984 | #ifdef USE_X_TOOLKIT |
| @@ -1347,8 +1327,7 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1347 | is visible. */ | 1327 | is visible. */ |
| 1348 | 1328 | ||
| 1349 | void | 1329 | void |
| 1350 | initialize_frame_menubar (f) | 1330 | initialize_frame_menubar (FRAME_PTR f) |
| 1351 | FRAME_PTR f; | ||
| 1352 | { | 1331 | { |
| 1353 | /* This function is called before the first chance to redisplay | 1332 | /* This function is called before the first chance to redisplay |
| 1354 | the frame. It has to be, so the frame will have the right size. */ | 1333 | the frame. It has to be, so the frame will have the right size. */ |
| @@ -1458,12 +1437,7 @@ struct next_popup_x_y | |||
| 1458 | 1437 | ||
| 1459 | Here only X and Y are used. */ | 1438 | Here only X and Y are used. */ |
| 1460 | static void | 1439 | static void |
| 1461 | menu_position_func (menu, x, y, push_in, user_data) | 1440 | menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) |
| 1462 | GtkMenu *menu; | ||
| 1463 | gint *x; | ||
| 1464 | gint *y; | ||
| 1465 | gboolean *push_in; | ||
| 1466 | gpointer user_data; | ||
| 1467 | { | 1441 | { |
| 1468 | struct next_popup_x_y* data = (struct next_popup_x_y*)user_data; | 1442 | struct next_popup_x_y* data = (struct next_popup_x_y*)user_data; |
| 1469 | GtkRequisition req; | 1443 | GtkRequisition req; |
| @@ -1484,9 +1458,7 @@ menu_position_func (menu, x, y, push_in, user_data) | |||
| 1484 | } | 1458 | } |
| 1485 | 1459 | ||
| 1486 | static void | 1460 | static void |
| 1487 | popup_selection_callback (widget, client_data) | 1461 | popup_selection_callback (GtkWidget *widget, gpointer client_data) |
| 1488 | GtkWidget *widget; | ||
| 1489 | gpointer client_data; | ||
| 1490 | { | 1462 | { |
| 1491 | xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data; | 1463 | xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data; |
| 1492 | 1464 | ||
| @@ -1495,8 +1467,7 @@ popup_selection_callback (widget, client_data) | |||
| 1495 | } | 1467 | } |
| 1496 | 1468 | ||
| 1497 | static Lisp_Object | 1469 | static Lisp_Object |
| 1498 | pop_down_menu (arg) | 1470 | pop_down_menu (Lisp_Object arg) |
| 1499 | Lisp_Object arg; | ||
| 1500 | { | 1471 | { |
| 1501 | struct Lisp_Save_Value *p = XSAVE_VALUE (arg); | 1472 | struct Lisp_Save_Value *p = XSAVE_VALUE (arg); |
| 1502 | 1473 | ||
| @@ -1511,13 +1482,7 @@ pop_down_menu (arg) | |||
| 1511 | menu pops down. | 1482 | menu pops down. |
| 1512 | menu_item_selection will be set to the selection. */ | 1483 | menu_item_selection will be set to the selection. */ |
| 1513 | static void | 1484 | static void |
| 1514 | create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp) | 1485 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, EMACS_UINT timestamp) |
| 1515 | FRAME_PTR f; | ||
| 1516 | widget_value *first_wv; | ||
| 1517 | int x; | ||
| 1518 | int y; | ||
| 1519 | int for_click; | ||
| 1520 | EMACS_UINT timestamp; | ||
| 1521 | { | 1486 | { |
| 1522 | int i; | 1487 | int i; |
| 1523 | GtkWidget *menu; | 1488 | GtkWidget *menu; |
| @@ -1977,9 +1942,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | |||
| 1977 | 1942 | ||
| 1978 | #ifdef USE_GTK | 1943 | #ifdef USE_GTK |
| 1979 | static void | 1944 | static void |
| 1980 | dialog_selection_callback (widget, client_data) | 1945 | dialog_selection_callback (GtkWidget *widget, gpointer client_data) |
| 1981 | GtkWidget *widget; | ||
| 1982 | gpointer client_data; | ||
| 1983 | { | 1946 | { |
| 1984 | /* The EMACS_INT cast avoids a warning. There's no problem | 1947 | /* The EMACS_INT cast avoids a warning. There's no problem |
| 1985 | as long as pointers have enough bits to hold small integers. */ | 1948 | as long as pointers have enough bits to hold small integers. */ |
| @@ -1993,9 +1956,7 @@ dialog_selection_callback (widget, client_data) | |||
| 1993 | dialog pops down. | 1956 | dialog pops down. |
| 1994 | menu_item_selection will be set to the selection. */ | 1957 | menu_item_selection will be set to the selection. */ |
| 1995 | static void | 1958 | static void |
| 1996 | create_and_show_dialog (f, first_wv) | 1959 | create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) |
| 1997 | FRAME_PTR f; | ||
| 1998 | widget_value *first_wv; | ||
| 1999 | { | 1960 | { |
| 2000 | GtkWidget *menu; | 1961 | GtkWidget *menu; |
| 2001 | 1962 | ||
| @@ -2092,11 +2053,7 @@ static char * button_names [] = { | |||
| 2092 | "button6", "button7", "button8", "button9", "button10" }; | 2053 | "button6", "button7", "button8", "button9", "button10" }; |
| 2093 | 2054 | ||
| 2094 | static Lisp_Object | 2055 | static Lisp_Object |
| 2095 | xdialog_show (f, keymaps, title, header, error_name) | 2056 | xdialog_show (FRAME_PTR f, int keymaps, Lisp_Object title, Lisp_Object header, char **error_name) |
| 2096 | FRAME_PTR f; | ||
| 2097 | int keymaps; | ||
| 2098 | Lisp_Object title, header; | ||
| 2099 | char **error_name; | ||
| 2100 | { | 2057 | { |
| 2101 | int i, nb_buttons=0; | 2058 | int i, nb_buttons=0; |
| 2102 | char dialog_name[6]; | 2059 | char dialog_name[6]; |
| @@ -2658,7 +2615,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error, timestamp) | |||
| 2658 | /* Detect if a dialog or menu has been posted. */ | 2615 | /* Detect if a dialog or menu has been posted. */ |
| 2659 | 2616 | ||
| 2660 | int | 2617 | int |
| 2661 | popup_activated () | 2618 | popup_activated (void) |
| 2662 | { | 2619 | { |
| 2663 | return popup_activated_flag; | 2620 | return popup_activated_flag; |
| 2664 | } | 2621 | } |
| @@ -2677,7 +2634,7 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_ | |||
| 2677 | } | 2634 | } |
| 2678 | 2635 | ||
| 2679 | void | 2636 | void |
| 2680 | syms_of_xmenu () | 2637 | syms_of_xmenu (void) |
| 2681 | { | 2638 | { |
| 2682 | Qdebug_on_next_call = intern_c_string ("debug-on-next-call"); | 2639 | Qdebug_on_next_call = intern_c_string ("debug-on-next-call"); |
| 2683 | staticpro (&Qdebug_on_next_call); | 2640 | staticpro (&Qdebug_on_next_call); |
diff --git a/src/xrdb.c b/src/xrdb.c index bd3474c0466..870672611e4 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -50,7 +50,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 50 | 50 | ||
| 51 | #include "lisp.h" | 51 | #include "lisp.h" |
| 52 | 52 | ||
| 53 | extern char *getenv (); | 53 | extern char *getenv (const char *); |
| 54 | 54 | ||
| 55 | /* This does cause trouble on AIX. I'm going to take the comment at | 55 | /* This does cause trouble on AIX. I'm going to take the comment at |
| 56 | face value. */ | 56 | face value. */ |
| @@ -64,8 +64,8 @@ extern short getuid (); /* If this causes portability problems, | |||
| 64 | extern struct passwd *getpwuid (uid_t); | 64 | extern struct passwd *getpwuid (uid_t); |
| 65 | extern struct passwd *getpwnam (const char *); | 65 | extern struct passwd *getpwnam (const char *); |
| 66 | #else | 66 | #else |
| 67 | extern struct passwd *getpwuid (); | 67 | extern struct passwd *getpwuid (uid_t); |
| 68 | extern struct passwd *getpwnam (); | 68 | extern struct passwd *getpwnam (const char *); |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | extern char *get_system_name (); | 71 | extern char *get_system_name (); |
| @@ -82,8 +82,8 @@ extern char *get_system_name (); | |||
| 82 | #define free xfree | 82 | #define free xfree |
| 83 | #endif | 83 | #endif |
| 84 | 84 | ||
| 85 | char *x_get_string_resource (); | 85 | char *x_get_string_resource (XrmDatabase rdb, char *name, char *class); |
| 86 | static int file_p (); | 86 | static int file_p (char *filename); |
| 87 | 87 | ||
| 88 | 88 | ||
| 89 | /* X file search path processing. */ | 89 | /* X file search path processing. */ |
| @@ -98,9 +98,7 @@ char *x_customization_string; | |||
| 98 | resource, for later use in search path decoding. If we find no | 98 | resource, for later use in search path decoding. If we find no |
| 99 | such resource, return zero. */ | 99 | such resource, return zero. */ |
| 100 | char * | 100 | char * |
| 101 | x_get_customization_string (db, name, class) | 101 | x_get_customization_string (XrmDatabase db, char *name, char *class) |
| 102 | XrmDatabase db; | ||
| 103 | char *name, *class; | ||
| 104 | { | 102 | { |
| 105 | char *full_name | 103 | char *full_name |
| 106 | = (char *) alloca (strlen (name) + sizeof ("customization") + 3); | 104 | = (char *) alloca (strlen (name) + sizeof ("customization") + 3); |
| @@ -155,10 +153,7 @@ x_get_customization_string (db, name, class) | |||
| 155 | Return NULL otherwise. */ | 153 | Return NULL otherwise. */ |
| 156 | 154 | ||
| 157 | static char * | 155 | static char * |
| 158 | magic_file_p (string, string_len, class, escaped_suffix, suffix) | 156 | magic_file_p (char *string, int string_len, char *class, char *escaped_suffix, char *suffix) |
| 159 | char *string; | ||
| 160 | int string_len; | ||
| 161 | char *class, *escaped_suffix, *suffix; | ||
| 162 | { | 157 | { |
| 163 | char *lang = getenv ("LANG"); | 158 | char *lang = getenv ("LANG"); |
| 164 | 159 | ||
| @@ -281,7 +276,7 @@ magic_file_p (string, string_len, class, escaped_suffix, suffix) | |||
| 281 | 276 | ||
| 282 | 277 | ||
| 283 | static char * | 278 | static char * |
| 284 | gethomedir () | 279 | gethomedir (void) |
| 285 | { | 280 | { |
| 286 | struct passwd *pw; | 281 | struct passwd *pw; |
| 287 | char *ptr; | 282 | char *ptr; |
| @@ -311,8 +306,7 @@ gethomedir () | |||
| 311 | 306 | ||
| 312 | 307 | ||
| 313 | static int | 308 | static int |
| 314 | file_p (filename) | 309 | file_p (char *filename) |
| 315 | char *filename; | ||
| 316 | { | 310 | { |
| 317 | struct stat status; | 311 | struct stat status; |
| 318 | 312 | ||
| @@ -327,8 +321,7 @@ file_p (filename) | |||
| 327 | the path name of the one we found otherwise. */ | 321 | the path name of the one we found otherwise. */ |
| 328 | 322 | ||
| 329 | static char * | 323 | static char * |
| 330 | search_magic_path (search_path, class, escaped_suffix, suffix) | 324 | search_magic_path (char *search_path, char *class, char *escaped_suffix, char *suffix) |
| 331 | char *search_path, *class, *escaped_suffix, *suffix; | ||
| 332 | { | 325 | { |
| 333 | register char *s, *p; | 326 | register char *s, *p; |
| 334 | 327 | ||
| @@ -363,8 +356,7 @@ search_magic_path (search_path, class, escaped_suffix, suffix) | |||
| 363 | /* Producing databases for individual sources. */ | 356 | /* Producing databases for individual sources. */ |
| 364 | 357 | ||
| 365 | static XrmDatabase | 358 | static XrmDatabase |
| 366 | get_system_app (class) | 359 | get_system_app (char *class) |
| 367 | char *class; | ||
| 368 | { | 360 | { |
| 369 | XrmDatabase db = NULL; | 361 | XrmDatabase db = NULL; |
| 370 | char *path; | 362 | char *path; |
| @@ -384,16 +376,14 @@ get_system_app (class) | |||
| 384 | 376 | ||
| 385 | 377 | ||
| 386 | static XrmDatabase | 378 | static XrmDatabase |
| 387 | get_fallback (display) | 379 | get_fallback (Display *display) |
| 388 | Display *display; | ||
| 389 | { | 380 | { |
| 390 | return NULL; | 381 | return NULL; |
| 391 | } | 382 | } |
| 392 | 383 | ||
| 393 | 384 | ||
| 394 | static XrmDatabase | 385 | static XrmDatabase |
| 395 | get_user_app (class) | 386 | get_user_app (char *class) |
| 396 | char *class; | ||
| 397 | { | 387 | { |
| 398 | char *path; | 388 | char *path; |
| 399 | char *file = 0; | 389 | char *file = 0; |
| @@ -428,8 +418,7 @@ get_user_app (class) | |||
| 428 | 418 | ||
| 429 | 419 | ||
| 430 | static XrmDatabase | 420 | static XrmDatabase |
| 431 | get_user_db (display) | 421 | get_user_db (Display *display) |
| 432 | Display *display; | ||
| 433 | { | 422 | { |
| 434 | XrmDatabase db; | 423 | XrmDatabase db; |
| 435 | char *xdefs; | 424 | char *xdefs; |
| @@ -470,7 +459,7 @@ get_user_db (display) | |||
| 470 | } | 459 | } |
| 471 | 460 | ||
| 472 | static XrmDatabase | 461 | static XrmDatabase |
| 473 | get_environ_db () | 462 | get_environ_db (void) |
| 474 | { | 463 | { |
| 475 | XrmDatabase db; | 464 | XrmDatabase db; |
| 476 | char *p; | 465 | char *p; |
| @@ -505,9 +494,7 @@ XrmRepresentation x_rm_string; /* Quark representation */ | |||
| 505 | /* Load X resources based on the display and a possible -xrm option. */ | 494 | /* Load X resources based on the display and a possible -xrm option. */ |
| 506 | 495 | ||
| 507 | XrmDatabase | 496 | XrmDatabase |
| 508 | x_load_resources (display, xrm_string, myname, myclass) | 497 | x_load_resources (Display *display, char *xrm_string, char *myname, char *myclass) |
| 509 | Display *display; | ||
| 510 | char *xrm_string, *myname, *myclass; | ||
| 511 | { | 498 | { |
| 512 | XrmDatabase user_database; | 499 | XrmDatabase user_database; |
| 513 | XrmDatabase rdb; | 500 | XrmDatabase rdb; |
| @@ -641,11 +628,7 @@ x_load_resources (display, xrm_string, myname, myclass) | |||
| 641 | and of type TYPE from database RDB. The value is returned in RET_VALUE. */ | 628 | and of type TYPE from database RDB. The value is returned in RET_VALUE. */ |
| 642 | 629 | ||
| 643 | int | 630 | int |
| 644 | x_get_resource (rdb, name, class, expected_type, ret_value) | 631 | x_get_resource (XrmDatabase rdb, char *name, char *class, XrmRepresentation expected_type, XrmValue *ret_value) |
| 645 | XrmDatabase rdb; | ||
| 646 | char *name, *class; | ||
| 647 | XrmRepresentation expected_type; | ||
| 648 | XrmValue *ret_value; | ||
| 649 | { | 632 | { |
| 650 | XrmValue value; | 633 | XrmValue value; |
| 651 | XrmName namelist[100]; | 634 | XrmName namelist[100]; |
| @@ -673,9 +656,7 @@ x_get_resource (rdb, name, class, expected_type, ret_value) | |||
| 673 | database RDB. */ | 656 | database RDB. */ |
| 674 | 657 | ||
| 675 | char * | 658 | char * |
| 676 | x_get_string_resource (rdb, name, class) | 659 | x_get_string_resource (XrmDatabase rdb, char *name, char *class) |
| 677 | XrmDatabase rdb; | ||
| 678 | char *name, *class; | ||
| 679 | { | 660 | { |
| 680 | XrmValue value; | 661 | XrmValue value; |
| 681 | 662 | ||
diff --git a/src/xselect.c b/src/xselect.c index 459e5335123..6d076235316 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -183,8 +183,7 @@ static int x_queue_selection_requests; | |||
| 183 | /* Queue up an SELECTION_REQUEST_EVENT *EVENT, to be processed later. */ | 183 | /* Queue up an SELECTION_REQUEST_EVENT *EVENT, to be processed later. */ |
| 184 | 184 | ||
| 185 | static void | 185 | static void |
| 186 | x_queue_event (event) | 186 | x_queue_event (struct input_event *event) |
| 187 | struct input_event *event; | ||
| 188 | { | 187 | { |
| 189 | struct selection_event_queue *queue_tmp; | 188 | struct selection_event_queue *queue_tmp; |
| 190 | 189 | ||
| @@ -215,7 +214,7 @@ x_queue_event (event) | |||
| 215 | /* Start queuing SELECTION_REQUEST_EVENT events. */ | 214 | /* Start queuing SELECTION_REQUEST_EVENT events. */ |
| 216 | 215 | ||
| 217 | static void | 216 | static void |
| 218 | x_start_queuing_selection_requests () | 217 | x_start_queuing_selection_requests (void) |
| 219 | { | 218 | { |
| 220 | if (x_queue_selection_requests) | 219 | if (x_queue_selection_requests) |
| 221 | abort (); | 220 | abort (); |
| @@ -227,7 +226,7 @@ x_start_queuing_selection_requests () | |||
| 227 | /* Stop queuing SELECTION_REQUEST_EVENT events. */ | 226 | /* Stop queuing SELECTION_REQUEST_EVENT events. */ |
| 228 | 227 | ||
| 229 | static void | 228 | static void |
| 230 | x_stop_queuing_selection_requests () | 229 | x_stop_queuing_selection_requests (void) |
| 231 | { | 230 | { |
| 232 | TRACE1 ("x_stop_queuing_selection_requests %d", x_queue_selection_requests); | 231 | TRACE1 ("x_stop_queuing_selection_requests %d", x_queue_selection_requests); |
| 233 | --x_queue_selection_requests; | 232 | --x_queue_selection_requests; |
| @@ -250,10 +249,7 @@ x_stop_queuing_selection_requests () | |||
| 250 | roundtrip whenever possible. */ | 249 | roundtrip whenever possible. */ |
| 251 | 250 | ||
| 252 | static Atom | 251 | static Atom |
| 253 | symbol_to_x_atom (dpyinfo, display, sym) | 252 | symbol_to_x_atom (struct x_display_info *dpyinfo, Display *display, Lisp_Object sym) |
| 254 | struct x_display_info *dpyinfo; | ||
| 255 | Display *display; | ||
| 256 | Lisp_Object sym; | ||
| 257 | { | 253 | { |
| 258 | Atom val; | 254 | Atom val; |
| 259 | if (NILP (sym)) return 0; | 255 | if (NILP (sym)) return 0; |
| @@ -297,9 +293,7 @@ symbol_to_x_atom (dpyinfo, display, sym) | |||
| 297 | and calls to intern whenever possible. */ | 293 | and calls to intern whenever possible. */ |
| 298 | 294 | ||
| 299 | static Lisp_Object | 295 | static Lisp_Object |
| 300 | x_atom_to_symbol (dpy, atom) | 296 | x_atom_to_symbol (Display *dpy, Atom atom) |
| 301 | Display *dpy; | ||
| 302 | Atom atom; | ||
| 303 | { | 297 | { |
| 304 | struct x_display_info *dpyinfo; | 298 | struct x_display_info *dpyinfo; |
| 305 | char *str; | 299 | char *str; |
| @@ -382,8 +376,7 @@ x_atom_to_symbol (dpy, atom) | |||
| 382 | our selection. */ | 376 | our selection. */ |
| 383 | 377 | ||
| 384 | static void | 378 | static void |
| 385 | x_own_selection (selection_name, selection_value) | 379 | x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) |
| 386 | Lisp_Object selection_name, selection_value; | ||
| 387 | { | 380 | { |
| 388 | struct frame *sf = SELECTED_FRAME (); | 381 | struct frame *sf = SELECTED_FRAME (); |
| 389 | Window selecting_window; | 382 | Window selecting_window; |
| @@ -449,9 +442,7 @@ x_own_selection (selection_name, selection_value) | |||
| 449 | This calls random Lisp code, and may signal or gc. */ | 442 | This calls random Lisp code, and may signal or gc. */ |
| 450 | 443 | ||
| 451 | static Lisp_Object | 444 | static Lisp_Object |
| 452 | x_get_local_selection (selection_symbol, target_type, local_request) | 445 | x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, int local_request) |
| 453 | Lisp_Object selection_symbol, target_type; | ||
| 454 | int local_request; | ||
| 455 | { | 446 | { |
| 456 | Lisp_Object local_value; | 447 | Lisp_Object local_value; |
| 457 | Lisp_Object handler_fn, value, type, check; | 448 | Lisp_Object handler_fn, value, type, check; |
| @@ -561,8 +552,7 @@ x_get_local_selection (selection_symbol, target_type, local_request) | |||
| 561 | meaning we were unable to do what they wanted. */ | 552 | meaning we were unable to do what they wanted. */ |
| 562 | 553 | ||
| 563 | static void | 554 | static void |
| 564 | x_decline_selection_request (event) | 555 | x_decline_selection_request (struct input_event *event) |
| 565 | struct input_event *event; | ||
| 566 | { | 556 | { |
| 567 | XSelectionEvent reply; | 557 | XSelectionEvent reply; |
| 568 | 558 | ||
| @@ -597,8 +587,7 @@ static struct x_display_info *selection_request_dpyinfo; | |||
| 597 | before we throw to top-level or go into the debugger or whatever. */ | 587 | before we throw to top-level or go into the debugger or whatever. */ |
| 598 | 588 | ||
| 599 | static Lisp_Object | 589 | static Lisp_Object |
| 600 | x_selection_request_lisp_error (ignore) | 590 | x_selection_request_lisp_error (Lisp_Object ignore) |
| 601 | Lisp_Object ignore; | ||
| 602 | { | 591 | { |
| 603 | if (x_selection_current_request != 0 | 592 | if (x_selection_current_request != 0 |
| 604 | && selection_request_dpyinfo->display) | 593 | && selection_request_dpyinfo->display) |
| @@ -607,8 +596,7 @@ x_selection_request_lisp_error (ignore) | |||
| 607 | } | 596 | } |
| 608 | 597 | ||
| 609 | static Lisp_Object | 598 | static Lisp_Object |
| 610 | x_catch_errors_unwind (dummy) | 599 | x_catch_errors_unwind (Lisp_Object dummy) |
| 611 | Lisp_Object dummy; | ||
| 612 | { | 600 | { |
| 613 | BLOCK_INPUT; | 601 | BLOCK_INPUT; |
| 614 | x_uncatch_errors (); | 602 | x_uncatch_errors (); |
| @@ -634,10 +622,10 @@ struct prop_location | |||
| 634 | struct prop_location *next; | 622 | struct prop_location *next; |
| 635 | }; | 623 | }; |
| 636 | 624 | ||
| 637 | static struct prop_location *expect_property_change (); | 625 | static struct prop_location *expect_property_change (Display *display, Window window, Atom property, int state); |
| 638 | static void wait_for_property_change (); | 626 | static void wait_for_property_change (struct prop_location *location); |
| 639 | static void unexpect_property_change (); | 627 | static void unexpect_property_change (struct prop_location *location); |
| 640 | static int waiting_for_other_props_on_window (); | 628 | static int waiting_for_other_props_on_window (Display *display, Window window); |
| 641 | 629 | ||
| 642 | static int prop_location_identifier; | 630 | static int prop_location_identifier; |
| 643 | 631 | ||
| @@ -648,8 +636,7 @@ static struct prop_location *property_change_reply_object; | |||
| 648 | static struct prop_location *property_change_wait_list; | 636 | static struct prop_location *property_change_wait_list; |
| 649 | 637 | ||
| 650 | static Lisp_Object | 638 | static Lisp_Object |
| 651 | queue_selection_requests_unwind (tem) | 639 | queue_selection_requests_unwind (Lisp_Object tem) |
| 652 | Lisp_Object tem; | ||
| 653 | { | 640 | { |
| 654 | x_stop_queuing_selection_requests (); | 641 | x_stop_queuing_selection_requests (); |
| 655 | return Qnil; | 642 | return Qnil; |
| @@ -659,8 +646,7 @@ queue_selection_requests_unwind (tem) | |||
| 659 | Return nil if there is none. */ | 646 | Return nil if there is none. */ |
| 660 | 647 | ||
| 661 | static Lisp_Object | 648 | static Lisp_Object |
| 662 | some_frame_on_display (dpyinfo) | 649 | some_frame_on_display (struct x_display_info *dpyinfo) |
| 663 | struct x_display_info *dpyinfo; | ||
| 664 | { | 650 | { |
| 665 | Lisp_Object list, frame; | 651 | Lisp_Object list, frame; |
| 666 | 652 | ||
| @@ -684,11 +670,7 @@ static int x_reply_selection_request_cnt; | |||
| 684 | #endif /* TRACE_SELECTION */ | 670 | #endif /* TRACE_SELECTION */ |
| 685 | 671 | ||
| 686 | static void | 672 | static void |
| 687 | x_reply_selection_request (event, format, data, size, type) | 673 | x_reply_selection_request (struct input_event *event, int format, unsigned char *data, int size, Atom type) |
| 688 | struct input_event *event; | ||
| 689 | int format, size; | ||
| 690 | unsigned char *data; | ||
| 691 | Atom type; | ||
| 692 | { | 674 | { |
| 693 | XSelectionEvent reply; | 675 | XSelectionEvent reply; |
| 694 | Display *display = SELECTION_EVENT_DISPLAY (event); | 676 | Display *display = SELECTION_EVENT_DISPLAY (event); |
| @@ -881,8 +863,7 @@ x_reply_selection_request (event, format, data, size, type) | |||
| 881 | This is called from keyboard.c when such an event is found in the queue. */ | 863 | This is called from keyboard.c when such an event is found in the queue. */ |
| 882 | 864 | ||
| 883 | static void | 865 | static void |
| 884 | x_handle_selection_request (event) | 866 | x_handle_selection_request (struct input_event *event) |
| 885 | struct input_event *event; | ||
| 886 | { | 867 | { |
| 887 | struct gcpro gcpro1, gcpro2, gcpro3; | 868 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 888 | Lisp_Object local_selection_data; | 869 | Lisp_Object local_selection_data; |
| @@ -1002,8 +983,7 @@ x_handle_selection_request (event) | |||
| 1002 | This is called from keyboard.c when such an event is found in the queue. */ | 983 | This is called from keyboard.c when such an event is found in the queue. */ |
| 1003 | 984 | ||
| 1004 | static void | 985 | static void |
| 1005 | x_handle_selection_clear (event) | 986 | x_handle_selection_clear (struct input_event *event) |
| 1006 | struct input_event *event; | ||
| 1007 | { | 987 | { |
| 1008 | Display *display = SELECTION_EVENT_DISPLAY (event); | 988 | Display *display = SELECTION_EVENT_DISPLAY (event); |
| 1009 | Atom selection = SELECTION_EVENT_SELECTION (event); | 989 | Atom selection = SELECTION_EVENT_SELECTION (event); |
| @@ -1085,8 +1065,7 @@ x_handle_selection_clear (event) | |||
| 1085 | } | 1065 | } |
| 1086 | 1066 | ||
| 1087 | void | 1067 | void |
| 1088 | x_handle_selection_event (event) | 1068 | x_handle_selection_event (struct input_event *event) |
| 1089 | struct input_event *event; | ||
| 1090 | { | 1069 | { |
| 1091 | TRACE0 ("x_handle_selection_event"); | 1070 | TRACE0 ("x_handle_selection_event"); |
| 1092 | 1071 | ||
| @@ -1106,8 +1085,7 @@ x_handle_selection_event (event) | |||
| 1106 | We do this when about to delete a frame. */ | 1085 | We do this when about to delete a frame. */ |
| 1107 | 1086 | ||
| 1108 | void | 1087 | void |
| 1109 | x_clear_frame_selections (f) | 1088 | x_clear_frame_selections (FRAME_PTR f) |
| 1110 | FRAME_PTR f; | ||
| 1111 | { | 1089 | { |
| 1112 | Lisp_Object frame; | 1090 | Lisp_Object frame; |
| 1113 | Lisp_Object rest; | 1091 | Lisp_Object rest; |
| @@ -1168,9 +1146,7 @@ x_clear_frame_selections (f) | |||
| 1168 | are on the list of what we are waiting for. */ | 1146 | are on the list of what we are waiting for. */ |
| 1169 | 1147 | ||
| 1170 | static int | 1148 | static int |
| 1171 | waiting_for_other_props_on_window (display, window) | 1149 | waiting_for_other_props_on_window (Display *display, Window window) |
| 1172 | Display *display; | ||
| 1173 | Window window; | ||
| 1174 | { | 1150 | { |
| 1175 | struct prop_location *rest = property_change_wait_list; | 1151 | struct prop_location *rest = property_change_wait_list; |
| 1176 | while (rest) | 1152 | while (rest) |
| @@ -1187,11 +1163,7 @@ waiting_for_other_props_on_window (display, window) | |||
| 1187 | this awaited property change. */ | 1163 | this awaited property change. */ |
| 1188 | 1164 | ||
| 1189 | static struct prop_location * | 1165 | static struct prop_location * |
| 1190 | expect_property_change (display, window, property, state) | 1166 | expect_property_change (Display *display, Window window, Atom property, int state) |
| 1191 | Display *display; | ||
| 1192 | Window window; | ||
| 1193 | Atom property; | ||
| 1194 | int state; | ||
| 1195 | { | 1167 | { |
| 1196 | struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl); | 1168 | struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl); |
| 1197 | pl->identifier = ++prop_location_identifier; | 1169 | pl->identifier = ++prop_location_identifier; |
| @@ -1209,8 +1181,7 @@ expect_property_change (display, window, property, state) | |||
| 1209 | IDENTIFIER is the number that uniquely identifies the entry. */ | 1181 | IDENTIFIER is the number that uniquely identifies the entry. */ |
| 1210 | 1182 | ||
| 1211 | static void | 1183 | static void |
| 1212 | unexpect_property_change (location) | 1184 | unexpect_property_change (struct prop_location *location) |
| 1213 | struct prop_location *location; | ||
| 1214 | { | 1185 | { |
| 1215 | struct prop_location *prev = 0, *rest = property_change_wait_list; | 1186 | struct prop_location *prev = 0, *rest = property_change_wait_list; |
| 1216 | while (rest) | 1187 | while (rest) |
| @@ -1232,8 +1203,7 @@ unexpect_property_change (location) | |||
| 1232 | /* Remove the property change expectation element for IDENTIFIER. */ | 1203 | /* Remove the property change expectation element for IDENTIFIER. */ |
| 1233 | 1204 | ||
| 1234 | static Lisp_Object | 1205 | static Lisp_Object |
| 1235 | wait_for_property_change_unwind (loc) | 1206 | wait_for_property_change_unwind (Lisp_Object loc) |
| 1236 | Lisp_Object loc; | ||
| 1237 | { | 1207 | { |
| 1238 | struct prop_location *location = XSAVE_VALUE (loc)->pointer; | 1208 | struct prop_location *location = XSAVE_VALUE (loc)->pointer; |
| 1239 | 1209 | ||
| @@ -1247,8 +1217,7 @@ wait_for_property_change_unwind (loc) | |||
| 1247 | IDENTIFIER should be the value that expect_property_change returned. */ | 1217 | IDENTIFIER should be the value that expect_property_change returned. */ |
| 1248 | 1218 | ||
| 1249 | static void | 1219 | static void |
| 1250 | wait_for_property_change (location) | 1220 | wait_for_property_change (struct prop_location *location) |
| 1251 | struct prop_location *location; | ||
| 1252 | { | 1221 | { |
| 1253 | int secs, usecs; | 1222 | int secs, usecs; |
| 1254 | int count = SPECPDL_INDEX (); | 1223 | int count = SPECPDL_INDEX (); |
| @@ -1286,8 +1255,7 @@ wait_for_property_change (location) | |||
| 1286 | /* Called from XTread_socket in response to a PropertyNotify event. */ | 1255 | /* Called from XTread_socket in response to a PropertyNotify event. */ |
| 1287 | 1256 | ||
| 1288 | void | 1257 | void |
| 1289 | x_handle_property_notify (event) | 1258 | x_handle_property_notify (XPropertyEvent *event) |
| 1290 | XPropertyEvent *event; | ||
| 1291 | { | 1259 | { |
| 1292 | struct prop_location *prev = 0, *rest = property_change_wait_list; | 1260 | struct prop_location *prev = 0, *rest = property_change_wait_list; |
| 1293 | 1261 | ||
| @@ -1378,8 +1346,7 @@ static Window reading_selection_window; | |||
| 1378 | Converts this to Lisp data and returns it. */ | 1346 | Converts this to Lisp data and returns it. */ |
| 1379 | 1347 | ||
| 1380 | static Lisp_Object | 1348 | static Lisp_Object |
| 1381 | x_get_foreign_selection (selection_symbol, target_type, time_stamp) | 1349 | x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type, Lisp_Object time_stamp) |
| 1382 | Lisp_Object selection_symbol, target_type, time_stamp; | ||
| 1383 | { | 1350 | { |
| 1384 | struct frame *sf = SELECTED_FRAME (); | 1351 | struct frame *sf = SELECTED_FRAME (); |
| 1385 | Window requestor_window; | 1352 | Window requestor_window; |
| @@ -1809,11 +1776,7 @@ x_get_window_property_as_lisp_data (display, window, property, target_type, | |||
| 1809 | 1776 | ||
| 1810 | 1777 | ||
| 1811 | static Lisp_Object | 1778 | static Lisp_Object |
| 1812 | selection_data_to_lisp_data (display, data, size, type, format) | 1779 | selection_data_to_lisp_data (Display *display, unsigned char *data, int size, Atom type, int format) |
| 1813 | Display *display; | ||
| 1814 | unsigned char *data; | ||
| 1815 | Atom type; | ||
| 1816 | int size, format; | ||
| 1817 | { | 1780 | { |
| 1818 | struct x_display_info *dpyinfo = x_display_info_for_display (display); | 1781 | struct x_display_info *dpyinfo = x_display_info_for_display (display); |
| 1819 | 1782 | ||
| @@ -2071,8 +2034,7 @@ lisp_data_to_selection_data (display, obj, | |||
| 2071 | } | 2034 | } |
| 2072 | 2035 | ||
| 2073 | static Lisp_Object | 2036 | static Lisp_Object |
| 2074 | clean_local_selection_data (obj) | 2037 | clean_local_selection_data (Lisp_Object obj) |
| 2075 | Lisp_Object obj; | ||
| 2076 | { | 2038 | { |
| 2077 | if (CONSP (obj) | 2039 | if (CONSP (obj) |
| 2078 | && INTEGERP (XCAR (obj)) | 2040 | && INTEGERP (XCAR (obj)) |
| @@ -2112,8 +2074,7 @@ clean_local_selection_data (obj) | |||
| 2112 | We store t there if the reply is successful, lambda if not. */ | 2074 | We store t there if the reply is successful, lambda if not. */ |
| 2113 | 2075 | ||
| 2114 | void | 2076 | void |
| 2115 | x_handle_selection_notify (event) | 2077 | x_handle_selection_notify (XSelectionEvent *event) |
| 2116 | XSelectionEvent *event; | ||
| 2117 | { | 2078 | { |
| 2118 | if (event->requestor != reading_selection_window) | 2079 | if (event->requestor != reading_selection_window) |
| 2119 | return; | 2080 | return; |
| @@ -2254,8 +2215,7 @@ Disowning it means there is no such selection. */) | |||
| 2254 | This is used when we kill a buffer. */ | 2215 | This is used when we kill a buffer. */ |
| 2255 | 2216 | ||
| 2256 | void | 2217 | void |
| 2257 | x_disown_buffer_selections (buffer) | 2218 | x_disown_buffer_selections (Lisp_Object buffer) |
| 2258 | Lisp_Object buffer; | ||
| 2259 | { | 2219 | { |
| 2260 | Lisp_Object tail; | 2220 | Lisp_Object tail; |
| 2261 | struct buffer *buf = XBUFFER (buffer); | 2221 | struct buffer *buf = XBUFFER (buffer); |
| @@ -2332,9 +2292,7 @@ and t is the same as `SECONDARY'. */) | |||
| 2332 | 2292 | ||
| 2333 | /* Ensure that all 8 cut buffers exist. ICCCM says we gotta... */ | 2293 | /* Ensure that all 8 cut buffers exist. ICCCM says we gotta... */ |
| 2334 | static void | 2294 | static void |
| 2335 | initialize_cut_buffers (display, window) | 2295 | initialize_cut_buffers (Display *display, Window window) |
| 2336 | Display *display; | ||
| 2337 | Window window; | ||
| 2338 | { | 2296 | { |
| 2339 | unsigned char *data = (unsigned char *) ""; | 2297 | unsigned char *data = (unsigned char *) ""; |
| 2340 | BLOCK_INPUT; | 2298 | BLOCK_INPUT; |
| @@ -2530,8 +2488,7 @@ Positive N means shift the values forward, negative means backward. */) | |||
| 2530 | bit parts of a 32 bit number). */ | 2488 | bit parts of a 32 bit number). */ |
| 2531 | 2489 | ||
| 2532 | int | 2490 | int |
| 2533 | x_check_property_data (data) | 2491 | x_check_property_data (Lisp_Object data) |
| 2534 | Lisp_Object data; | ||
| 2535 | { | 2492 | { |
| 2536 | Lisp_Object iter; | 2493 | Lisp_Object iter; |
| 2537 | int size = 0; | 2494 | int size = 0; |
| @@ -2564,11 +2521,7 @@ x_check_property_data (data) | |||
| 2564 | XClientMessageEvent). */ | 2521 | XClientMessageEvent). */ |
| 2565 | 2522 | ||
| 2566 | void | 2523 | void |
| 2567 | x_fill_property_data (dpy, data, ret, format) | 2524 | x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format) |
| 2568 | Display *dpy; | ||
| 2569 | Lisp_Object data; | ||
| 2570 | void *ret; | ||
| 2571 | int format; | ||
| 2572 | { | 2525 | { |
| 2573 | long val; | 2526 | long val; |
| 2574 | long *d32 = (long *) ret; | 2527 | long *d32 = (long *) ret; |
| @@ -2620,12 +2573,7 @@ x_fill_property_data (dpy, data, ret, format) | |||
| 2620 | Also see comment for selection_data_to_lisp_data above. */ | 2573 | Also see comment for selection_data_to_lisp_data above. */ |
| 2621 | 2574 | ||
| 2622 | Lisp_Object | 2575 | Lisp_Object |
| 2623 | x_property_data_to_lisp (f, data, type, format, size) | 2576 | x_property_data_to_lisp (struct frame *f, unsigned char *data, Atom type, int format, long unsigned int size) |
| 2624 | struct frame *f; | ||
| 2625 | unsigned char *data; | ||
| 2626 | Atom type; | ||
| 2627 | int format; | ||
| 2628 | unsigned long size; | ||
| 2629 | { | 2577 | { |
| 2630 | return selection_data_to_lisp_data (FRAME_X_DISPLAY (f), | 2578 | return selection_data_to_lisp_data (FRAME_X_DISPLAY (f), |
| 2631 | data, size*format/8, type, format); | 2579 | data, size*format/8, type, format); |
| @@ -2634,10 +2582,7 @@ x_property_data_to_lisp (f, data, type, format, size) | |||
| 2634 | /* Get the mouse position in frame relative coordinates. */ | 2582 | /* Get the mouse position in frame relative coordinates. */ |
| 2635 | 2583 | ||
| 2636 | static void | 2584 | static void |
| 2637 | mouse_position_for_drop (f, x, y) | 2585 | mouse_position_for_drop (FRAME_PTR f, int *x, int *y) |
| 2638 | FRAME_PTR f; | ||
| 2639 | int *x; | ||
| 2640 | int *y; | ||
| 2641 | { | 2586 | { |
| 2642 | Window root, dummy_window; | 2587 | Window root, dummy_window; |
| 2643 | int dummy; | 2588 | int dummy; |
| @@ -2759,11 +2704,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */) | |||
| 2759 | /* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ | 2704 | /* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ |
| 2760 | 2705 | ||
| 2761 | int | 2706 | int |
| 2762 | x_handle_dnd_message (f, event, dpyinfo, bufp) | 2707 | x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp) |
| 2763 | struct frame *f; | ||
| 2764 | XClientMessageEvent *event; | ||
| 2765 | struct x_display_info *dpyinfo; | ||
| 2766 | struct input_event *bufp; | ||
| 2767 | { | 2708 | { |
| 2768 | Lisp_Object vec; | 2709 | Lisp_Object vec; |
| 2769 | Lisp_Object frame; | 2710 | Lisp_Object frame; |
| @@ -2935,7 +2876,7 @@ are ignored. */) | |||
| 2935 | 2876 | ||
| 2936 | 2877 | ||
| 2937 | void | 2878 | void |
| 2938 | syms_of_xselect () | 2879 | syms_of_xselect (void) |
| 2939 | { | 2880 | { |
| 2940 | defsubr (&Sx_get_selection_internal); | 2881 | defsubr (&Sx_get_selection_internal); |
| 2941 | defsubr (&Sx_own_selection_internal); | 2882 | defsubr (&Sx_own_selection_internal); |
diff --git a/src/xsettings.c b/src/xsettings.c index 2760e48fe05..e8aba9ef2d8 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -54,9 +54,7 @@ static GConfClient *gconf_client; | |||
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | static void | 56 | static void |
| 57 | store_config_changed_event (arg, display_name) | 57 | store_config_changed_event (Lisp_Object arg, Lisp_Object display_name) |
| 58 | Lisp_Object arg; | ||
| 59 | Lisp_Object display_name; | ||
| 60 | { | 58 | { |
| 61 | struct input_event event; | 59 | struct input_event event; |
| 62 | EVENT_INIT (event); | 60 | EVENT_INIT (event); |
| @@ -102,11 +100,7 @@ struct xsettings | |||
| 102 | that is SYSTEM_MONO_FONT. */ | 100 | that is SYSTEM_MONO_FONT. */ |
| 103 | 101 | ||
| 104 | static void | 102 | static void |
| 105 | something_changedCB (client, cnxn_id, entry, user_data) | 103 | something_changedCB (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) |
| 106 | GConfClient *client; | ||
| 107 | guint cnxn_id; | ||
| 108 | GConfEntry *entry; | ||
| 109 | gpointer user_data; | ||
| 110 | { | 104 | { |
| 111 | GConfValue *v = gconf_entry_get_value (entry); | 105 | GConfValue *v = gconf_entry_get_value (entry); |
| 112 | 106 | ||
| @@ -156,8 +150,7 @@ something_changedCB (client, cnxn_id, entry, user_data) | |||
| 156 | /* Find the window that contains the XSETTINGS property values. */ | 150 | /* Find the window that contains the XSETTINGS property values. */ |
| 157 | 151 | ||
| 158 | static void | 152 | static void |
| 159 | get_prop_window (dpyinfo) | 153 | get_prop_window (struct x_display_info *dpyinfo) |
| 160 | struct x_display_info *dpyinfo; | ||
| 161 | { | 154 | { |
| 162 | Display *dpy = dpyinfo->display; | 155 | Display *dpy = dpyinfo->display; |
| 163 | 156 | ||
| @@ -229,10 +222,7 @@ get_prop_window (dpyinfo) | |||
| 229 | */ | 222 | */ |
| 230 | 223 | ||
| 231 | static int | 224 | static int |
| 232 | parse_settings (prop, bytes, settings) | 225 | parse_settings (unsigned char *prop, long unsigned int bytes, struct xsettings *settings) |
| 233 | unsigned char *prop; | ||
| 234 | unsigned long bytes; | ||
| 235 | struct xsettings *settings; | ||
| 236 | { | 226 | { |
| 237 | Lisp_Object byteorder = Fbyteorder (); | 227 | Lisp_Object byteorder = Fbyteorder (); |
| 238 | int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst; | 228 | int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst; |
| @@ -402,9 +392,7 @@ parse_settings (prop, bytes, settings) | |||
| 402 | } | 392 | } |
| 403 | 393 | ||
| 404 | static int | 394 | static int |
| 405 | read_settings (dpyinfo, settings) | 395 | read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) |
| 406 | struct x_display_info *dpyinfo; | ||
| 407 | struct xsettings *settings; | ||
| 408 | { | 396 | { |
| 409 | long long_len; | 397 | long long_len; |
| 410 | Atom act_type; | 398 | Atom act_type; |
| @@ -435,10 +423,7 @@ read_settings (dpyinfo, settings) | |||
| 435 | 423 | ||
| 436 | 424 | ||
| 437 | static void | 425 | static void |
| 438 | apply_xft_settings (dpyinfo, send_event_p, settings) | 426 | apply_xft_settings (struct x_display_info *dpyinfo, int send_event_p, struct xsettings *settings) |
| 439 | struct x_display_info *dpyinfo; | ||
| 440 | int send_event_p; | ||
| 441 | struct xsettings *settings; | ||
| 442 | { | 427 | { |
| 443 | #ifdef HAVE_XFT | 428 | #ifdef HAVE_XFT |
| 444 | FcPattern *pat; | 429 | FcPattern *pat; |
| @@ -546,9 +531,7 @@ apply_xft_settings (dpyinfo, send_event_p, settings) | |||
| 546 | } | 531 | } |
| 547 | 532 | ||
| 548 | static void | 533 | static void |
| 549 | read_and_apply_settings (dpyinfo, send_event_p) | 534 | read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p) |
| 550 | struct x_display_info *dpyinfo; | ||
| 551 | int send_event_p; | ||
| 552 | { | 535 | { |
| 553 | struct xsettings settings; | 536 | struct xsettings settings; |
| 554 | Lisp_Object dpyname = XCAR (dpyinfo->name_list_element); | 537 | Lisp_Object dpyname = XCAR (dpyinfo->name_list_element); |
| @@ -592,9 +575,7 @@ read_and_apply_settings (dpyinfo, send_event_p) | |||
| 592 | } | 575 | } |
| 593 | 576 | ||
| 594 | void | 577 | void |
| 595 | xft_settings_event (dpyinfo, event) | 578 | xft_settings_event (struct x_display_info *dpyinfo, XEvent *event) |
| 596 | struct x_display_info *dpyinfo; | ||
| 597 | XEvent *event; | ||
| 598 | { | 579 | { |
| 599 | int check_window_p = 0; | 580 | int check_window_p = 0; |
| 600 | int apply_settings = 0; | 581 | int apply_settings = 0; |
| @@ -636,7 +617,7 @@ xft_settings_event (dpyinfo, event) | |||
| 636 | 617 | ||
| 637 | 618 | ||
| 638 | static void | 619 | static void |
| 639 | init_gconf () | 620 | init_gconf (void) |
| 640 | { | 621 | { |
| 641 | #if defined (HAVE_GCONF) && defined (HAVE_XFT) | 622 | #if defined (HAVE_GCONF) && defined (HAVE_XFT) |
| 642 | int i; | 623 | int i; |
| @@ -669,8 +650,7 @@ init_gconf () | |||
| 669 | } | 650 | } |
| 670 | 651 | ||
| 671 | static void | 652 | static void |
| 672 | init_xsettings (dpyinfo) | 653 | init_xsettings (struct x_display_info *dpyinfo) |
| 673 | struct x_display_info *dpyinfo; | ||
| 674 | { | 654 | { |
| 675 | char sel[64]; | 655 | char sel[64]; |
| 676 | Display *dpy = dpyinfo->display; | 656 | Display *dpy = dpyinfo->display; |
| @@ -696,8 +676,7 @@ init_xsettings (dpyinfo) | |||
| 696 | } | 676 | } |
| 697 | 677 | ||
| 698 | void | 678 | void |
| 699 | xsettings_initialize (dpyinfo) | 679 | xsettings_initialize (struct x_display_info *dpyinfo) |
| 700 | struct x_display_info *dpyinfo; | ||
| 701 | { | 680 | { |
| 702 | if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo; | 681 | if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo; |
| 703 | init_gconf (); | 682 | init_gconf (); |
| @@ -705,13 +684,13 @@ xsettings_initialize (dpyinfo) | |||
| 705 | } | 684 | } |
| 706 | 685 | ||
| 707 | const char * | 686 | const char * |
| 708 | xsettings_get_system_font () | 687 | xsettings_get_system_font (void) |
| 709 | { | 688 | { |
| 710 | return current_mono_font; | 689 | return current_mono_font; |
| 711 | } | 690 | } |
| 712 | 691 | ||
| 713 | const char * | 692 | const char * |
| 714 | xsettings_get_system_normal_font () | 693 | xsettings_get_system_normal_font (void) |
| 715 | { | 694 | { |
| 716 | return current_font; | 695 | return current_font; |
| 717 | } | 696 | } |
| @@ -755,7 +734,7 @@ known style. Otherwise return image. */) | |||
| 755 | } | 734 | } |
| 756 | 735 | ||
| 757 | void | 736 | void |
| 758 | syms_of_xsettings () | 737 | syms_of_xsettings (void) |
| 759 | { | 738 | { |
| 760 | current_mono_font = NULL; | 739 | current_mono_font = NULL; |
| 761 | current_font = NULL; | 740 | current_font = NULL; |
diff --git a/src/xsmfns.c b/src/xsmfns.c index 78d7d9f6523..214d5ff5407 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -95,7 +95,7 @@ Lisp_Object Vx_session_previous_id; | |||
| 95 | #define CHDIR_OPT "--chdir=" | 95 | #define CHDIR_OPT "--chdir=" |
| 96 | 96 | ||
| 97 | static void | 97 | static void |
| 98 | ice_connection_closed () | 98 | ice_connection_closed (void) |
| 99 | { | 99 | { |
| 100 | if (ice_fd >= 0) | 100 | if (ice_fd >= 0) |
| 101 | delete_keyboard_wait_descriptor (ice_fd); | 101 | delete_keyboard_wait_descriptor (ice_fd); |
| @@ -108,8 +108,7 @@ ice_connection_closed () | |||
| 108 | Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP. */ | 108 | Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP. */ |
| 109 | 109 | ||
| 110 | int | 110 | int |
| 111 | x_session_check_input (bufp) | 111 | x_session_check_input (struct input_event *bufp) |
| 112 | struct input_event *bufp; | ||
| 113 | { | 112 | { |
| 114 | SELECT_TYPE read_fds; | 113 | SELECT_TYPE read_fds; |
| 115 | EMACS_TIME tmout; | 114 | EMACS_TIME tmout; |
| @@ -160,7 +159,7 @@ x_session_check_input (bufp) | |||
| 160 | /* Return non-zero if we have a connection to a session manager. */ | 159 | /* Return non-zero if we have a connection to a session manager. */ |
| 161 | 160 | ||
| 162 | int | 161 | int |
| 163 | x_session_have_connection () | 162 | x_session_have_connection (void) |
| 164 | { | 163 | { |
| 165 | return ice_fd != -1; | 164 | return ice_fd != -1; |
| 166 | } | 165 | } |
| @@ -170,9 +169,7 @@ x_session_have_connection () | |||
| 170 | Then lisp code can interact with the user. */ | 169 | Then lisp code can interact with the user. */ |
| 171 | 170 | ||
| 172 | static void | 171 | static void |
| 173 | smc_interact_CB (smcConn, clientData) | 172 | smc_interact_CB (SmcConn smcConn, SmPointer clientData) |
| 174 | SmcConn smcConn; | ||
| 175 | SmPointer clientData; | ||
| 176 | { | 173 | { |
| 177 | doing_interact = True; | 174 | doing_interact = True; |
| 178 | emacs_event.kind = SAVE_SESSION_EVENT; | 175 | emacs_event.kind = SAVE_SESSION_EVENT; |
| @@ -311,9 +308,7 @@ smc_save_yourself_CB (smcConn, | |||
| 311 | /* According to the SM specification, this shall close the connection. */ | 308 | /* According to the SM specification, this shall close the connection. */ |
| 312 | 309 | ||
| 313 | static void | 310 | static void |
| 314 | smc_die_CB (smcConn, clientData) | 311 | smc_die_CB (SmcConn smcConn, SmPointer clientData) |
| 315 | SmcConn smcConn; | ||
| 316 | SmPointer clientData; | ||
| 317 | { | 312 | { |
| 318 | SmcCloseConnection (smcConn, 0, 0); | 313 | SmcCloseConnection (smcConn, 0, 0); |
| 319 | ice_connection_closed (); | 314 | ice_connection_closed (); |
| @@ -326,17 +321,13 @@ smc_die_CB (smcConn, clientData) | |||
| 326 | even seem necessary. */ | 321 | even seem necessary. */ |
| 327 | 322 | ||
| 328 | static void | 323 | static void |
| 329 | smc_save_complete_CB (smcConn, clientData) | 324 | smc_save_complete_CB (SmcConn smcConn, SmPointer clientData) |
| 330 | SmcConn smcConn; | ||
| 331 | SmPointer clientData; | ||
| 332 | { | 325 | { |
| 333 | /* Empty */ | 326 | /* Empty */ |
| 334 | } | 327 | } |
| 335 | 328 | ||
| 336 | static void | 329 | static void |
| 337 | smc_shutdown_cancelled_CB (smcConn, clientData) | 330 | smc_shutdown_cancelled_CB (SmcConn smcConn, SmPointer clientData) |
| 338 | SmcConn smcConn; | ||
| 339 | SmPointer clientData; | ||
| 340 | { | 331 | { |
| 341 | /* Empty */ | 332 | /* Empty */ |
| 342 | } | 333 | } |
| @@ -384,8 +375,7 @@ ice_error_handler (iceConn, | |||
| 384 | 375 | ||
| 385 | 376 | ||
| 386 | static void | 377 | static void |
| 387 | ice_io_error_handler (iceConn) | 378 | ice_io_error_handler (IceConn iceConn) |
| 388 | IceConn iceConn; | ||
| 389 | { | 379 | { |
| 390 | /* Connection probably gone. */ | 380 | /* Connection probably gone. */ |
| 391 | ice_connection_closed (); | 381 | ice_connection_closed (); |
| @@ -395,11 +385,7 @@ ice_io_error_handler (iceConn) | |||
| 395 | uses ICE as it transport protocol. */ | 385 | uses ICE as it transport protocol. */ |
| 396 | 386 | ||
| 397 | static void | 387 | static void |
| 398 | ice_conn_watch_CB (iceConn, clientData, opening, watchData) | 388 | ice_conn_watch_CB (IceConn iceConn, IcePointer clientData, int opening, IcePointer *watchData) |
| 399 | IceConn iceConn; | ||
| 400 | IcePointer clientData; | ||
| 401 | Bool opening; | ||
| 402 | IcePointer *watchData; | ||
| 403 | { | 389 | { |
| 404 | if (! opening) | 390 | if (! opening) |
| 405 | { | 391 | { |
| @@ -423,9 +409,7 @@ ice_conn_watch_CB (iceConn, clientData, opening, watchData) | |||
| 423 | /* Create the client leader window. */ | 409 | /* Create the client leader window. */ |
| 424 | 410 | ||
| 425 | static void | 411 | static void |
| 426 | create_client_leader_window (dpyinfo, client_id) | 412 | create_client_leader_window (struct x_display_info *dpyinfo, char *client_id) |
| 427 | struct x_display_info *dpyinfo; | ||
| 428 | char *client_id; | ||
| 429 | { | 413 | { |
| 430 | Window w; | 414 | Window w; |
| 431 | XClassHint class_hints; | 415 | XClassHint class_hints; |
| @@ -451,8 +435,7 @@ create_client_leader_window (dpyinfo, client_id) | |||
| 451 | /* Try to open a connection to the session manager. */ | 435 | /* Try to open a connection to the session manager. */ |
| 452 | 436 | ||
| 453 | void | 437 | void |
| 454 | x_session_initialize (dpyinfo) | 438 | x_session_initialize (struct x_display_info *dpyinfo) |
| 455 | struct x_display_info *dpyinfo; | ||
| 456 | { | 439 | { |
| 457 | #define SM_ERRORSTRING_LEN 512 | 440 | #define SM_ERRORSTRING_LEN 512 |
| 458 | char errorstring[SM_ERRORSTRING_LEN]; | 441 | char errorstring[SM_ERRORSTRING_LEN]; |
| @@ -532,7 +515,7 @@ x_session_initialize (dpyinfo) | |||
| 532 | /* Ensure that the session manager is not contacted again. */ | 515 | /* Ensure that the session manager is not contacted again. */ |
| 533 | 516 | ||
| 534 | void | 517 | void |
| 535 | x_session_close () | 518 | x_session_close (void) |
| 536 | { | 519 | { |
| 537 | ice_connection_closed (); | 520 | ice_connection_closed (); |
| 538 | } | 521 | } |
| @@ -575,7 +558,7 @@ Do not call this function yourself. */) | |||
| 575 | Initialization | 558 | Initialization |
| 576 | ***********************************************************************/ | 559 | ***********************************************************************/ |
| 577 | void | 560 | void |
| 578 | syms_of_xsmfns () | 561 | syms_of_xsmfns (void) |
| 579 | { | 562 | { |
| 580 | DEFVAR_LISP ("x-session-id", &Vx_session_id, | 563 | DEFVAR_LISP ("x-session-id", &Vx_session_id, |
| 581 | doc: /* The session id Emacs got from the session manager for this session. | 564 | doc: /* The session id Emacs got from the session manager for this session. |
diff --git a/src/xterm.c b/src/xterm.c index 2279f71189f..da7763ca48c 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -385,8 +385,7 @@ static SIGTYPE x_connection_closed (Display *, char *); | |||
| 385 | /* Flush display of frame F, or of all frames if F is null. */ | 385 | /* Flush display of frame F, or of all frames if F is null. */ |
| 386 | 386 | ||
| 387 | static void | 387 | static void |
| 388 | x_flush (f) | 388 | x_flush (struct frame *f) |
| 389 | struct frame *f; | ||
| 390 | { | 389 | { |
| 391 | /* Don't call XFlush when it is not safe to redisplay; the X | 390 | /* Don't call XFlush when it is not safe to redisplay; the X |
| 392 | connection may be broken. */ | 391 | connection may be broken. */ |
| @@ -455,8 +454,7 @@ record_event (locus, type) | |||
| 455 | /* Return the struct x_display_info corresponding to DPY. */ | 454 | /* Return the struct x_display_info corresponding to DPY. */ |
| 456 | 455 | ||
| 457 | struct x_display_info * | 456 | struct x_display_info * |
| 458 | x_display_info_for_display (dpy) | 457 | x_display_info_for_display (Display *dpy) |
| 459 | Display *dpy; | ||
| 460 | { | 458 | { |
| 461 | struct x_display_info *dpyinfo; | 459 | struct x_display_info *dpyinfo; |
| 462 | 460 | ||
| @@ -471,8 +469,7 @@ x_display_info_for_display (dpy) | |||
| 471 | #define OPACITY "_NET_WM_WINDOW_OPACITY" | 469 | #define OPACITY "_NET_WM_WINDOW_OPACITY" |
| 472 | 470 | ||
| 473 | void | 471 | void |
| 474 | x_set_frame_alpha (f) | 472 | x_set_frame_alpha (struct frame *f) |
| 475 | struct frame *f; | ||
| 476 | { | 473 | { |
| 477 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 474 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 478 | Display *dpy = FRAME_X_DISPLAY (f); | 475 | Display *dpy = FRAME_X_DISPLAY (f); |
| @@ -538,15 +535,13 @@ x_set_frame_alpha (f) | |||
| 538 | } | 535 | } |
| 539 | 536 | ||
| 540 | int | 537 | int |
| 541 | x_display_pixel_height (dpyinfo) | 538 | x_display_pixel_height (struct x_display_info *dpyinfo) |
| 542 | struct x_display_info *dpyinfo; | ||
| 543 | { | 539 | { |
| 544 | return HeightOfScreen (dpyinfo->screen); | 540 | return HeightOfScreen (dpyinfo->screen); |
| 545 | } | 541 | } |
| 546 | 542 | ||
| 547 | int | 543 | int |
| 548 | x_display_pixel_width (dpyinfo) | 544 | x_display_pixel_width (struct x_display_info *dpyinfo) |
| 549 | struct x_display_info *dpyinfo; | ||
| 550 | { | 545 | { |
| 551 | return WidthOfScreen (dpyinfo->screen); | 546 | return WidthOfScreen (dpyinfo->screen); |
| 552 | } | 547 | } |
| @@ -563,8 +558,7 @@ x_display_pixel_width (dpyinfo) | |||
| 563 | because all interesting stuff is done on a window basis. */ | 558 | because all interesting stuff is done on a window basis. */ |
| 564 | 559 | ||
| 565 | static void | 560 | static void |
| 566 | x_update_begin (f) | 561 | x_update_begin (struct frame *f) |
| 567 | struct frame *f; | ||
| 568 | { | 562 | { |
| 569 | /* Nothing to do. */ | 563 | /* Nothing to do. */ |
| 570 | } | 564 | } |
| @@ -575,8 +569,7 @@ x_update_begin (f) | |||
| 575 | position of W. */ | 569 | position of W. */ |
| 576 | 570 | ||
| 577 | static void | 571 | static void |
| 578 | x_update_window_begin (w) | 572 | x_update_window_begin (struct window *w) |
| 579 | struct window *w; | ||
| 580 | { | 573 | { |
| 581 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 574 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 582 | struct x_display_info *display_info = FRAME_X_DISPLAY_INFO (f); | 575 | struct x_display_info *display_info = FRAME_X_DISPLAY_INFO (f); |
| @@ -604,9 +597,7 @@ x_update_window_begin (w) | |||
| 604 | /* Draw a vertical window border from (x,y0) to (x,y1) */ | 597 | /* Draw a vertical window border from (x,y0) to (x,y1) */ |
| 605 | 598 | ||
| 606 | static void | 599 | static void |
| 607 | x_draw_vertical_window_border (w, x, y0, y1) | 600 | x_draw_vertical_window_border (struct window *w, int x, int y0, int y1) |
| 608 | struct window *w; | ||
| 609 | int x, y0, y1; | ||
| 610 | { | 601 | { |
| 611 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 602 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 612 | struct face *face; | 603 | struct face *face; |
| @@ -634,9 +625,7 @@ x_draw_vertical_window_border (w, x, y0, y1) | |||
| 634 | here. */ | 625 | here. */ |
| 635 | 626 | ||
| 636 | static void | 627 | static void |
| 637 | x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | 628 | x_update_window_end (struct window *w, int cursor_on_p, int mouse_face_overwritten_p) |
| 638 | struct window *w; | ||
| 639 | int cursor_on_p, mouse_face_overwritten_p; | ||
| 640 | { | 629 | { |
| 641 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame)); | 630 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame)); |
| 642 | 631 | ||
| @@ -672,8 +661,7 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | |||
| 672 | update_end. */ | 661 | update_end. */ |
| 673 | 662 | ||
| 674 | static void | 663 | static void |
| 675 | x_update_end (f) | 664 | x_update_end (struct frame *f) |
| 676 | struct frame *f; | ||
| 677 | { | 665 | { |
| 678 | /* Mouse highlight may be displayed again. */ | 666 | /* Mouse highlight may be displayed again. */ |
| 679 | FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0; | 667 | FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0; |
| @@ -691,8 +679,7 @@ x_update_end (f) | |||
| 691 | updated_window is not available here. */ | 679 | updated_window is not available here. */ |
| 692 | 680 | ||
| 693 | static void | 681 | static void |
| 694 | XTframe_up_to_date (f) | 682 | XTframe_up_to_date (struct frame *f) |
| 695 | struct frame *f; | ||
| 696 | { | 683 | { |
| 697 | if (FRAME_X_P (f)) | 684 | if (FRAME_X_P (f)) |
| 698 | { | 685 | { |
| @@ -721,8 +708,7 @@ XTframe_up_to_date (f) | |||
| 721 | between bitmaps to be drawn between current row and DESIRED_ROW. */ | 708 | between bitmaps to be drawn between current row and DESIRED_ROW. */ |
| 722 | 709 | ||
| 723 | static void | 710 | static void |
| 724 | x_after_update_window_line (desired_row) | 711 | x_after_update_window_line (struct glyph_row *desired_row) |
| 725 | struct glyph_row *desired_row; | ||
| 726 | { | 712 | { |
| 727 | struct window *w = updated_window; | 713 | struct window *w = updated_window; |
| 728 | struct frame *f; | 714 | struct frame *f; |
| @@ -760,10 +746,7 @@ x_after_update_window_line (desired_row) | |||
| 760 | } | 746 | } |
| 761 | 747 | ||
| 762 | static void | 748 | static void |
| 763 | x_draw_fringe_bitmap (w, row, p) | 749 | x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fringe_bitmap_params *p) |
| 764 | struct window *w; | ||
| 765 | struct glyph_row *row; | ||
| 766 | struct draw_fringe_bitmap_params *p; | ||
| 767 | { | 750 | { |
| 768 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 751 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 769 | Display *display = FRAME_X_DISPLAY (f); | 752 | Display *display = FRAME_X_DISPLAY (f); |
| @@ -969,8 +952,7 @@ static void x_check_font (struct frame *, struct font *); | |||
| 969 | face. */ | 952 | face. */ |
| 970 | 953 | ||
| 971 | static void | 954 | static void |
| 972 | x_set_cursor_gc (s) | 955 | x_set_cursor_gc (struct glyph_string *s) |
| 973 | struct glyph_string *s; | ||
| 974 | { | 956 | { |
| 975 | if (s->font == FRAME_FONT (s->f) | 957 | if (s->font == FRAME_FONT (s->f) |
| 976 | && s->face->background == FRAME_BACKGROUND_PIXEL (s->f) | 958 | && s->face->background == FRAME_BACKGROUND_PIXEL (s->f) |
| @@ -1021,8 +1003,7 @@ x_set_cursor_gc (s) | |||
| 1021 | /* Set up S->gc of glyph string S for drawing text in mouse face. */ | 1003 | /* Set up S->gc of glyph string S for drawing text in mouse face. */ |
| 1022 | 1004 | ||
| 1023 | static void | 1005 | static void |
| 1024 | x_set_mouse_face_gc (s) | 1006 | x_set_mouse_face_gc (struct glyph_string *s) |
| 1025 | struct glyph_string *s; | ||
| 1026 | { | 1007 | { |
| 1027 | int face_id; | 1008 | int face_id; |
| 1028 | struct face *face; | 1009 | struct face *face; |
| @@ -1073,8 +1054,7 @@ x_set_mouse_face_gc (s) | |||
| 1073 | matrix was built, so there isn't much to do, here. */ | 1054 | matrix was built, so there isn't much to do, here. */ |
| 1074 | 1055 | ||
| 1075 | static INLINE void | 1056 | static INLINE void |
| 1076 | x_set_mode_line_face_gc (s) | 1057 | x_set_mode_line_face_gc (struct glyph_string *s) |
| 1077 | struct glyph_string *s; | ||
| 1078 | { | 1058 | { |
| 1079 | s->gc = s->face->gc; | 1059 | s->gc = s->face->gc; |
| 1080 | } | 1060 | } |
| @@ -1085,8 +1065,7 @@ x_set_mode_line_face_gc (s) | |||
| 1085 | pattern. */ | 1065 | pattern. */ |
| 1086 | 1066 | ||
| 1087 | static INLINE void | 1067 | static INLINE void |
| 1088 | x_set_glyph_string_gc (s) | 1068 | x_set_glyph_string_gc (struct glyph_string *s) |
| 1089 | struct glyph_string *s; | ||
| 1090 | { | 1069 | { |
| 1091 | PREPARE_FACE_FOR_DISPLAY (s->f, s->face); | 1070 | PREPARE_FACE_FOR_DISPLAY (s->f, s->face); |
| 1092 | 1071 | ||
| @@ -1131,8 +1110,7 @@ x_set_glyph_string_gc (s) | |||
| 1131 | line or menu if we don't have X toolkit support. */ | 1110 | line or menu if we don't have X toolkit support. */ |
| 1132 | 1111 | ||
| 1133 | static INLINE void | 1112 | static INLINE void |
| 1134 | x_set_glyph_string_clipping (s) | 1113 | x_set_glyph_string_clipping (struct glyph_string *s) |
| 1135 | struct glyph_string *s; | ||
| 1136 | { | 1114 | { |
| 1137 | XRectangle *r = s->clip; | 1115 | XRectangle *r = s->clip; |
| 1138 | int n = get_glyph_string_clip_rects (s, r, 2); | 1116 | int n = get_glyph_string_clip_rects (s, r, 2); |
| @@ -1148,8 +1126,7 @@ x_set_glyph_string_clipping (s) | |||
| 1148 | the area of SRC. */ | 1126 | the area of SRC. */ |
| 1149 | 1127 | ||
| 1150 | static void | 1128 | static void |
| 1151 | x_set_glyph_string_clipping_exactly (src, dst) | 1129 | x_set_glyph_string_clipping_exactly (struct glyph_string *src, struct glyph_string *dst) |
| 1152 | struct glyph_string *src, *dst; | ||
| 1153 | { | 1130 | { |
| 1154 | XRectangle r; | 1131 | XRectangle r; |
| 1155 | 1132 | ||
| @@ -1167,8 +1144,7 @@ x_set_glyph_string_clipping_exactly (src, dst) | |||
| 1167 | Compute left and right overhang of glyph string S. */ | 1144 | Compute left and right overhang of glyph string S. */ |
| 1168 | 1145 | ||
| 1169 | static void | 1146 | static void |
| 1170 | x_compute_glyph_string_overhangs (s) | 1147 | x_compute_glyph_string_overhangs (struct glyph_string *s) |
| 1171 | struct glyph_string *s; | ||
| 1172 | { | 1148 | { |
| 1173 | if (s->cmp == NULL | 1149 | if (s->cmp == NULL |
| 1174 | && (s->first_glyph->type == CHAR_GLYPH | 1150 | && (s->first_glyph->type == CHAR_GLYPH |
| @@ -1207,9 +1183,7 @@ x_compute_glyph_string_overhangs (s) | |||
| 1207 | /* Fill rectangle X, Y, W, H with background color of glyph string S. */ | 1183 | /* Fill rectangle X, Y, W, H with background color of glyph string S. */ |
| 1208 | 1184 | ||
| 1209 | static INLINE void | 1185 | static INLINE void |
| 1210 | x_clear_glyph_string_rect (s, x, y, w, h) | 1186 | x_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h) |
| 1211 | struct glyph_string *s; | ||
| 1212 | int x, y, w, h; | ||
| 1213 | { | 1187 | { |
| 1214 | XGCValues xgcv; | 1188 | XGCValues xgcv; |
| 1215 | XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv); | 1189 | XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv); |
| @@ -1226,9 +1200,7 @@ x_clear_glyph_string_rect (s, x, y, w, h) | |||
| 1226 | contains the first component of a composition. */ | 1200 | contains the first component of a composition. */ |
| 1227 | 1201 | ||
| 1228 | static void | 1202 | static void |
| 1229 | x_draw_glyph_string_background (s, force_p) | 1203 | x_draw_glyph_string_background (struct glyph_string *s, int force_p) |
| 1230 | struct glyph_string *s; | ||
| 1231 | int force_p; | ||
| 1232 | { | 1204 | { |
| 1233 | /* Nothing to do if background has already been drawn or if it | 1205 | /* Nothing to do if background has already been drawn or if it |
| 1234 | shouldn't be drawn in the first place. */ | 1206 | shouldn't be drawn in the first place. */ |
| @@ -1264,8 +1236,7 @@ x_draw_glyph_string_background (s, force_p) | |||
| 1264 | /* Draw the foreground of glyph string S. */ | 1236 | /* Draw the foreground of glyph string S. */ |
| 1265 | 1237 | ||
| 1266 | static void | 1238 | static void |
| 1267 | x_draw_glyph_string_foreground (s) | 1239 | x_draw_glyph_string_foreground (struct glyph_string *s) |
| 1268 | struct glyph_string *s; | ||
| 1269 | { | 1240 | { |
| 1270 | int i, x; | 1241 | int i, x; |
| 1271 | 1242 | ||
| @@ -1313,8 +1284,7 @@ x_draw_glyph_string_foreground (s) | |||
| 1313 | /* Draw the foreground of composite glyph string S. */ | 1284 | /* Draw the foreground of composite glyph string S. */ |
| 1314 | 1285 | ||
| 1315 | static void | 1286 | static void |
| 1316 | x_draw_composite_glyph_string_foreground (s) | 1287 | x_draw_composite_glyph_string_foreground (struct glyph_string *s) |
| 1317 | struct glyph_string *s; | ||
| 1318 | { | 1288 | { |
| 1319 | int i, j, x; | 1289 | int i, j, x; |
| 1320 | struct font *font = s->font; | 1290 | struct font *font = s->font; |
| @@ -1639,9 +1609,7 @@ cvt_pixel_dtor (app, to, closure, args, nargs) | |||
| 1639 | say a 24-bit TrueColor map. */ | 1609 | say a 24-bit TrueColor map. */ |
| 1640 | 1610 | ||
| 1641 | static const XColor * | 1611 | static const XColor * |
| 1642 | x_color_cells (dpy, ncells) | 1612 | x_color_cells (Display *dpy, int *ncells) |
| 1643 | Display *dpy; | ||
| 1644 | int *ncells; | ||
| 1645 | { | 1613 | { |
| 1646 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); | 1614 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); |
| 1647 | 1615 | ||
| @@ -1672,10 +1640,7 @@ x_color_cells (dpy, ncells) | |||
| 1672 | colors in COLORS. Use cached information, if available. */ | 1640 | colors in COLORS. Use cached information, if available. */ |
| 1673 | 1641 | ||
| 1674 | void | 1642 | void |
| 1675 | x_query_colors (f, colors, ncolors) | 1643 | x_query_colors (struct frame *f, XColor *colors, int ncolors) |
| 1676 | struct frame *f; | ||
| 1677 | XColor *colors; | ||
| 1678 | int ncolors; | ||
| 1679 | { | 1644 | { |
| 1680 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 1645 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 1681 | 1646 | ||
| @@ -1699,9 +1664,7 @@ x_query_colors (f, colors, ncolors) | |||
| 1699 | COLOR. Use cached information, if available. */ | 1664 | COLOR. Use cached information, if available. */ |
| 1700 | 1665 | ||
| 1701 | void | 1666 | void |
| 1702 | x_query_color (f, color) | 1667 | x_query_color (struct frame *f, XColor *color) |
| 1703 | struct frame *f; | ||
| 1704 | XColor *color; | ||
| 1705 | { | 1668 | { |
| 1706 | x_query_colors (f, color, 1); | 1669 | x_query_colors (f, color, 1); |
| 1707 | } | 1670 | } |
| @@ -1713,10 +1676,7 @@ x_query_color (f, color) | |||
| 1713 | allocated. */ | 1676 | allocated. */ |
| 1714 | 1677 | ||
| 1715 | static int | 1678 | static int |
| 1716 | x_alloc_nearest_color_1 (dpy, cmap, color) | 1679 | x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) |
| 1717 | Display *dpy; | ||
| 1718 | Colormap cmap; | ||
| 1719 | XColor *color; | ||
| 1720 | { | 1680 | { |
| 1721 | int rc; | 1681 | int rc; |
| 1722 | 1682 | ||
| @@ -1786,10 +1746,7 @@ x_alloc_nearest_color_1 (dpy, cmap, color) | |||
| 1786 | allocated. */ | 1746 | allocated. */ |
| 1787 | 1747 | ||
| 1788 | int | 1748 | int |
| 1789 | x_alloc_nearest_color (f, cmap, color) | 1749 | x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color) |
| 1790 | struct frame *f; | ||
| 1791 | Colormap cmap; | ||
| 1792 | XColor *color; | ||
| 1793 | { | 1750 | { |
| 1794 | gamma_correct (f, color); | 1751 | gamma_correct (f, color); |
| 1795 | return x_alloc_nearest_color_1 (FRAME_X_DISPLAY (f), cmap, color); | 1752 | return x_alloc_nearest_color_1 (FRAME_X_DISPLAY (f), cmap, color); |
| @@ -1801,9 +1758,7 @@ x_alloc_nearest_color (f, cmap, color) | |||
| 1801 | get color reference counts right. */ | 1758 | get color reference counts right. */ |
| 1802 | 1759 | ||
| 1803 | unsigned long | 1760 | unsigned long |
| 1804 | x_copy_color (f, pixel) | 1761 | x_copy_color (struct frame *f, long unsigned int pixel) |
| 1805 | struct frame *f; | ||
| 1806 | unsigned long pixel; | ||
| 1807 | { | 1762 | { |
| 1808 | XColor color; | 1763 | XColor color; |
| 1809 | 1764 | ||
| @@ -1824,10 +1779,7 @@ x_copy_color (f, pixel) | |||
| 1824 | get color reference counts right. */ | 1779 | get color reference counts right. */ |
| 1825 | 1780 | ||
| 1826 | unsigned long | 1781 | unsigned long |
| 1827 | x_copy_dpy_color (dpy, cmap, pixel) | 1782 | x_copy_dpy_color (Display *dpy, Colormap cmap, long unsigned int pixel) |
| 1828 | Display *dpy; | ||
| 1829 | Colormap cmap; | ||
| 1830 | unsigned long pixel; | ||
| 1831 | { | 1783 | { |
| 1832 | XColor color; | 1784 | XColor color; |
| 1833 | 1785 | ||
| @@ -1865,13 +1817,7 @@ x_copy_dpy_color (dpy, cmap, pixel) | |||
| 1865 | Value is non-zero if successful. */ | 1817 | Value is non-zero if successful. */ |
| 1866 | 1818 | ||
| 1867 | static int | 1819 | static int |
| 1868 | x_alloc_lighter_color (f, display, cmap, pixel, factor, delta) | 1820 | x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) |
| 1869 | struct frame *f; | ||
| 1870 | Display *display; | ||
| 1871 | Colormap cmap; | ||
| 1872 | unsigned long *pixel; | ||
| 1873 | double factor; | ||
| 1874 | int delta; | ||
| 1875 | { | 1821 | { |
| 1876 | XColor color, new; | 1822 | XColor color, new; |
| 1877 | long bright; | 1823 | long bright; |
| @@ -1947,12 +1893,7 @@ x_alloc_lighter_color (f, display, cmap, pixel, factor, delta) | |||
| 1947 | be allocated, use DEFAULT_PIXEL, instead. */ | 1893 | be allocated, use DEFAULT_PIXEL, instead. */ |
| 1948 | 1894 | ||
| 1949 | static void | 1895 | static void |
| 1950 | x_setup_relief_color (f, relief, factor, delta, default_pixel) | 1896 | x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel) |
| 1951 | struct frame *f; | ||
| 1952 | struct relief *relief; | ||
| 1953 | double factor; | ||
| 1954 | int delta; | ||
| 1955 | unsigned long default_pixel; | ||
| 1956 | { | 1897 | { |
| 1957 | XGCValues xgcv; | 1898 | XGCValues xgcv; |
| 1958 | struct x_output *di = f->output_data.x; | 1899 | struct x_output *di = f->output_data.x; |
| @@ -2000,8 +1941,7 @@ x_setup_relief_color (f, relief, factor, delta, default_pixel) | |||
| 2000 | /* Set up colors for the relief lines around glyph string S. */ | 1941 | /* Set up colors for the relief lines around glyph string S. */ |
| 2001 | 1942 | ||
| 2002 | static void | 1943 | static void |
| 2003 | x_setup_relief_colors (s) | 1944 | x_setup_relief_colors (struct glyph_string *s) |
| 2004 | struct glyph_string *s; | ||
| 2005 | { | 1945 | { |
| 2006 | struct x_output *di = s->f->output_data.x; | 1946 | struct x_output *di = s->f->output_data.x; |
| 2007 | unsigned long color; | 1947 | unsigned long color; |
| @@ -2143,8 +2083,7 @@ x_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width, | |||
| 2143 | /* Draw a box around glyph string S. */ | 2083 | /* Draw a box around glyph string S. */ |
| 2144 | 2084 | ||
| 2145 | static void | 2085 | static void |
| 2146 | x_draw_glyph_string_box (s) | 2086 | x_draw_glyph_string_box (struct glyph_string *s) |
| 2147 | struct glyph_string *s; | ||
| 2148 | { | 2087 | { |
| 2149 | int width, left_x, right_x, top_y, bottom_y, last_x, raised_p; | 2088 | int width, left_x, right_x, top_y, bottom_y, last_x, raised_p; |
| 2150 | int left_p, right_p; | 2089 | int left_p, right_p; |
| @@ -2195,8 +2134,7 @@ x_draw_glyph_string_box (s) | |||
| 2195 | /* Draw foreground of image glyph string S. */ | 2134 | /* Draw foreground of image glyph string S. */ |
| 2196 | 2135 | ||
| 2197 | static void | 2136 | static void |
| 2198 | x_draw_image_foreground (s) | 2137 | x_draw_image_foreground (struct glyph_string *s) |
| 2199 | struct glyph_string *s; | ||
| 2200 | { | 2138 | { |
| 2201 | int x = s->x; | 2139 | int x = s->x; |
| 2202 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); | 2140 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); |
| @@ -2286,8 +2224,7 @@ x_draw_image_foreground (s) | |||
| 2286 | /* Draw a relief around the image glyph string S. */ | 2224 | /* Draw a relief around the image glyph string S. */ |
| 2287 | 2225 | ||
| 2288 | static void | 2226 | static void |
| 2289 | x_draw_image_relief (s) | 2227 | x_draw_image_relief (struct glyph_string *s) |
| 2290 | struct glyph_string *s; | ||
| 2291 | { | 2228 | { |
| 2292 | int x0, y0, x1, y1, thick, raised_p, extra; | 2229 | int x0, y0, x1, y1, thick, raised_p, extra; |
| 2293 | XRectangle r; | 2230 | XRectangle r; |
| @@ -2342,9 +2279,7 @@ x_draw_image_relief (s) | |||
| 2342 | /* Draw the foreground of image glyph string S to PIXMAP. */ | 2279 | /* Draw the foreground of image glyph string S to PIXMAP. */ |
| 2343 | 2280 | ||
| 2344 | static void | 2281 | static void |
| 2345 | x_draw_image_foreground_1 (s, pixmap) | 2282 | x_draw_image_foreground_1 (struct glyph_string *s, Pixmap pixmap) |
| 2346 | struct glyph_string *s; | ||
| 2347 | Pixmap pixmap; | ||
| 2348 | { | 2283 | { |
| 2349 | int x = 0; | 2284 | int x = 0; |
| 2350 | int y = s->ybase - s->y - image_ascent (s->img, s->face, &s->slice); | 2285 | int y = s->ybase - s->y - image_ascent (s->img, s->face, &s->slice); |
| @@ -2420,9 +2355,7 @@ x_draw_image_foreground_1 (s, pixmap) | |||
| 2420 | give the rectangle to draw. */ | 2355 | give the rectangle to draw. */ |
| 2421 | 2356 | ||
| 2422 | static void | 2357 | static void |
| 2423 | x_draw_glyph_string_bg_rect (s, x, y, w, h) | 2358 | x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) |
| 2424 | struct glyph_string *s; | ||
| 2425 | int x, y, w, h; | ||
| 2426 | { | 2359 | { |
| 2427 | if (s->stippled_p) | 2360 | if (s->stippled_p) |
| 2428 | { | 2361 | { |
| @@ -2451,8 +2384,7 @@ x_draw_glyph_string_bg_rect (s, x, y, w, h) | |||
| 2451 | */ | 2384 | */ |
| 2452 | 2385 | ||
| 2453 | static void | 2386 | static void |
| 2454 | x_draw_image_glyph_string (s) | 2387 | x_draw_image_glyph_string (struct glyph_string *s) |
| 2455 | struct glyph_string *s; | ||
| 2456 | { | 2388 | { |
| 2457 | int box_line_hwidth = eabs (s->face->box_line_width); | 2389 | int box_line_hwidth = eabs (s->face->box_line_width); |
| 2458 | int box_line_vwidth = max (s->face->box_line_width, 0); | 2390 | int box_line_vwidth = max (s->face->box_line_width, 0); |
| @@ -2556,8 +2488,7 @@ x_draw_image_glyph_string (s) | |||
| 2556 | /* Draw stretch glyph string S. */ | 2488 | /* Draw stretch glyph string S. */ |
| 2557 | 2489 | ||
| 2558 | static void | 2490 | static void |
| 2559 | x_draw_stretch_glyph_string (s) | 2491 | x_draw_stretch_glyph_string (struct glyph_string *s) |
| 2560 | struct glyph_string *s; | ||
| 2561 | { | 2492 | { |
| 2562 | xassert (s->first_glyph->type == STRETCH_GLYPH); | 2493 | xassert (s->first_glyph->type == STRETCH_GLYPH); |
| 2563 | 2494 | ||
| @@ -2640,8 +2571,7 @@ x_draw_stretch_glyph_string (s) | |||
| 2640 | /* Draw glyph string S. */ | 2571 | /* Draw glyph string S. */ |
| 2641 | 2572 | ||
| 2642 | static void | 2573 | static void |
| 2643 | x_draw_glyph_string (s) | 2574 | x_draw_glyph_string (struct glyph_string *s) |
| 2644 | struct glyph_string *s; | ||
| 2645 | { | 2575 | { |
| 2646 | int relief_drawn_p = 0; | 2576 | int relief_drawn_p = 0; |
| 2647 | 2577 | ||
| @@ -2895,9 +2825,7 @@ x_draw_glyph_string (s) | |||
| 2895 | /* Shift display to make room for inserted glyphs. */ | 2825 | /* Shift display to make room for inserted glyphs. */ |
| 2896 | 2826 | ||
| 2897 | void | 2827 | void |
| 2898 | x_shift_glyphs_for_insert (f, x, y, width, height, shift_by) | 2828 | x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by) |
| 2899 | struct frame *f; | ||
| 2900 | int x, y, width, height, shift_by; | ||
| 2901 | { | 2829 | { |
| 2902 | XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f), | 2830 | XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f), |
| 2903 | f->output_data.x->normal_gc, | 2831 | f->output_data.x->normal_gc, |
| @@ -2909,9 +2837,7 @@ x_shift_glyphs_for_insert (f, x, y, width, height, shift_by) | |||
| 2909 | for X frames. */ | 2837 | for X frames. */ |
| 2910 | 2838 | ||
| 2911 | static void | 2839 | static void |
| 2912 | x_delete_glyphs (f, n) | 2840 | x_delete_glyphs (struct frame *f, register int n) |
| 2913 | struct frame *f; | ||
| 2914 | register int n; | ||
| 2915 | { | 2841 | { |
| 2916 | abort (); | 2842 | abort (); |
| 2917 | } | 2843 | } |
| @@ -2921,12 +2847,7 @@ x_delete_glyphs (f, n) | |||
| 2921 | If they are <= 0, this is probably an error. */ | 2847 | If they are <= 0, this is probably an error. */ |
| 2922 | 2848 | ||
| 2923 | void | 2849 | void |
| 2924 | x_clear_area (dpy, window, x, y, width, height, exposures) | 2850 | x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures) |
| 2925 | Display *dpy; | ||
| 2926 | Window window; | ||
| 2927 | int x, y; | ||
| 2928 | int width, height; | ||
| 2929 | int exposures; | ||
| 2930 | { | 2851 | { |
| 2931 | xassert (width > 0 && height > 0); | 2852 | xassert (width > 0 && height > 0); |
| 2932 | XClearArea (dpy, window, x, y, width, height, exposures); | 2853 | XClearArea (dpy, window, x, y, width, height, exposures); |
| @@ -2978,8 +2899,7 @@ x_clear_frame (struct frame *f) | |||
| 2978 | *RESULT. Return 1 if the difference is negative, otherwise 0. */ | 2899 | *RESULT. Return 1 if the difference is negative, otherwise 0. */ |
| 2979 | 2900 | ||
| 2980 | static int | 2901 | static int |
| 2981 | timeval_subtract (result, x, y) | 2902 | timeval_subtract (struct timeval *result, struct timeval x, struct timeval y) |
| 2982 | struct timeval *result, x, y; | ||
| 2983 | { | 2903 | { |
| 2984 | /* Perform the carry for the later subtraction by updating y. This | 2904 | /* Perform the carry for the later subtraction by updating y. This |
| 2985 | is safer because on some systems the tv_sec member is unsigned. */ | 2905 | is safer because on some systems the tv_sec member is unsigned. */ |
| @@ -3008,8 +2928,7 @@ timeval_subtract (result, x, y) | |||
| 3008 | } | 2928 | } |
| 3009 | 2929 | ||
| 3010 | void | 2930 | void |
| 3011 | XTflash (f) | 2931 | XTflash (struct frame *f) |
| 3012 | struct frame *f; | ||
| 3013 | { | 2932 | { |
| 3014 | BLOCK_INPUT; | 2933 | BLOCK_INPUT; |
| 3015 | 2934 | ||
| @@ -3164,9 +3083,7 @@ XTflash (f) | |||
| 3164 | 3083 | ||
| 3165 | 3084 | ||
| 3166 | static void | 3085 | static void |
| 3167 | XTtoggle_invisible_pointer (f, invisible) | 3086 | XTtoggle_invisible_pointer (FRAME_PTR f, int invisible) |
| 3168 | FRAME_PTR f; | ||
| 3169 | int invisible; | ||
| 3170 | { | 3087 | { |
| 3171 | BLOCK_INPUT; | 3088 | BLOCK_INPUT; |
| 3172 | if (invisible) | 3089 | if (invisible) |
| @@ -3186,7 +3103,7 @@ XTtoggle_invisible_pointer (f, invisible) | |||
| 3186 | /* Make audible bell. */ | 3103 | /* Make audible bell. */ |
| 3187 | 3104 | ||
| 3188 | void | 3105 | void |
| 3189 | XTring_bell () | 3106 | XTring_bell (void) |
| 3190 | { | 3107 | { |
| 3191 | struct frame *f = SELECTED_FRAME (); | 3108 | struct frame *f = SELECTED_FRAME (); |
| 3192 | 3109 | ||
| @@ -3213,8 +3130,7 @@ XTring_bell () | |||
| 3213 | that is bounded by calls to x_update_begin and x_update_end. */ | 3130 | that is bounded by calls to x_update_begin and x_update_end. */ |
| 3214 | 3131 | ||
| 3215 | static void | 3132 | static void |
| 3216 | XTset_terminal_window (n) | 3133 | XTset_terminal_window (register int n) |
| 3217 | register int n; | ||
| 3218 | { | 3134 | { |
| 3219 | /* This function intentionally left blank. */ | 3135 | /* This function intentionally left blank. */ |
| 3220 | } | 3136 | } |
| @@ -3229,9 +3145,7 @@ XTset_terminal_window (n) | |||
| 3229 | lines or deleting -N lines at vertical position VPOS. */ | 3145 | lines or deleting -N lines at vertical position VPOS. */ |
| 3230 | 3146 | ||
| 3231 | static void | 3147 | static void |
| 3232 | x_ins_del_lines (f, vpos, n) | 3148 | x_ins_del_lines (struct frame *f, int vpos, int n) |
| 3233 | struct frame *f; | ||
| 3234 | int vpos, n; | ||
| 3235 | { | 3149 | { |
| 3236 | abort (); | 3150 | abort (); |
| 3237 | } | 3151 | } |
| @@ -3240,9 +3154,7 @@ x_ins_del_lines (f, vpos, n) | |||
| 3240 | /* Scroll part of the display as described by RUN. */ | 3154 | /* Scroll part of the display as described by RUN. */ |
| 3241 | 3155 | ||
| 3242 | static void | 3156 | static void |
| 3243 | x_scroll_run (w, run) | 3157 | x_scroll_run (struct window *w, struct run *run) |
| 3244 | struct window *w; | ||
| 3245 | struct run *run; | ||
| 3246 | { | 3158 | { |
| 3247 | struct frame *f = XFRAME (w->frame); | 3159 | struct frame *f = XFRAME (w->frame); |
| 3248 | int x, y, width, height, from_y, to_y, bottom_y; | 3160 | int x, y, width, height, from_y, to_y, bottom_y; |
| @@ -3299,8 +3211,7 @@ x_scroll_run (w, run) | |||
| 3299 | 3211 | ||
| 3300 | 3212 | ||
| 3301 | static void | 3213 | static void |
| 3302 | frame_highlight (f) | 3214 | frame_highlight (struct frame *f) |
| 3303 | struct frame *f; | ||
| 3304 | { | 3215 | { |
| 3305 | /* We used to only do this if Vx_no_window_manager was non-nil, but | 3216 | /* We used to only do this if Vx_no_window_manager was non-nil, but |
| 3306 | the ICCCM (section 4.1.6) says that the window's border pixmap | 3217 | the ICCCM (section 4.1.6) says that the window's border pixmap |
| @@ -3315,8 +3226,7 @@ frame_highlight (f) | |||
| 3315 | } | 3226 | } |
| 3316 | 3227 | ||
| 3317 | static void | 3228 | static void |
| 3318 | frame_unhighlight (f) | 3229 | frame_unhighlight (struct frame *f) |
| 3319 | struct frame *f; | ||
| 3320 | { | 3230 | { |
| 3321 | /* We used to only do this if Vx_no_window_manager was non-nil, but | 3231 | /* We used to only do this if Vx_no_window_manager was non-nil, but |
| 3322 | the ICCCM (section 4.1.6) says that the window's border pixmap | 3232 | the ICCCM (section 4.1.6) says that the window's border pixmap |
| @@ -3337,9 +3247,7 @@ frame_unhighlight (f) | |||
| 3337 | Lisp code can tell when the switch took place by examining the events. */ | 3247 | Lisp code can tell when the switch took place by examining the events. */ |
| 3338 | 3248 | ||
| 3339 | static void | 3249 | static void |
| 3340 | x_new_focus_frame (dpyinfo, frame) | 3250 | x_new_focus_frame (struct x_display_info *dpyinfo, struct frame *frame) |
| 3341 | struct x_display_info *dpyinfo; | ||
| 3342 | struct frame *frame; | ||
| 3343 | { | 3251 | { |
| 3344 | struct frame *old_focus = dpyinfo->x_focus_frame; | 3252 | struct frame *old_focus = dpyinfo->x_focus_frame; |
| 3345 | 3253 | ||
| @@ -3366,12 +3274,7 @@ x_new_focus_frame (dpyinfo, frame) | |||
| 3366 | a FOCUS_IN_EVENT into *BUFP. */ | 3274 | a FOCUS_IN_EVENT into *BUFP. */ |
| 3367 | 3275 | ||
| 3368 | static void | 3276 | static void |
| 3369 | x_focus_changed (type, state, dpyinfo, frame, bufp) | 3277 | x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame, struct input_event *bufp) |
| 3370 | int type; | ||
| 3371 | int state; | ||
| 3372 | struct x_display_info *dpyinfo; | ||
| 3373 | struct frame *frame; | ||
| 3374 | struct input_event *bufp; | ||
| 3375 | { | 3278 | { |
| 3376 | if (type == FocusIn) | 3279 | if (type == FocusIn) |
| 3377 | { | 3280 | { |
| @@ -3423,10 +3326,7 @@ x_focus_changed (type, state, dpyinfo, frame, bufp) | |||
| 3423 | Returns FOCUS_IN_EVENT event in *BUFP. */ | 3326 | Returns FOCUS_IN_EVENT event in *BUFP. */ |
| 3424 | 3327 | ||
| 3425 | static void | 3328 | static void |
| 3426 | x_detect_focus_change (dpyinfo, event, bufp) | 3329 | x_detect_focus_change (struct x_display_info *dpyinfo, XEvent *event, struct input_event *bufp) |
| 3427 | struct x_display_info *dpyinfo; | ||
| 3428 | XEvent *event; | ||
| 3429 | struct input_event *bufp; | ||
| 3430 | { | 3330 | { |
| 3431 | struct frame *frame; | 3331 | struct frame *frame; |
| 3432 | 3332 | ||
| @@ -3475,8 +3375,7 @@ x_detect_focus_change (dpyinfo, event, bufp) | |||
| 3475 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ | 3375 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ |
| 3476 | 3376 | ||
| 3477 | void | 3377 | void |
| 3478 | x_mouse_leave (dpyinfo) | 3378 | x_mouse_leave (struct x_display_info *dpyinfo) |
| 3479 | struct x_display_info *dpyinfo; | ||
| 3480 | { | 3379 | { |
| 3481 | x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame); | 3380 | x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame); |
| 3482 | } | 3381 | } |
| @@ -3490,15 +3389,13 @@ x_mouse_leave (dpyinfo) | |||
| 3490 | the appropriate X display info. */ | 3389 | the appropriate X display info. */ |
| 3491 | 3390 | ||
| 3492 | static void | 3391 | static void |
| 3493 | XTframe_rehighlight (frame) | 3392 | XTframe_rehighlight (struct frame *frame) |
| 3494 | struct frame *frame; | ||
| 3495 | { | 3393 | { |
| 3496 | x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame)); | 3394 | x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame)); |
| 3497 | } | 3395 | } |
| 3498 | 3396 | ||
| 3499 | static void | 3397 | static void |
| 3500 | x_frame_rehighlight (dpyinfo) | 3398 | x_frame_rehighlight (struct x_display_info *dpyinfo) |
| 3501 | struct x_display_info *dpyinfo; | ||
| 3502 | { | 3399 | { |
| 3503 | struct frame *old_highlight = dpyinfo->x_highlight_frame; | 3400 | struct frame *old_highlight = dpyinfo->x_highlight_frame; |
| 3504 | 3401 | ||
| @@ -3532,8 +3429,7 @@ x_frame_rehighlight (dpyinfo) | |||
| 3532 | 3429 | ||
| 3533 | /* Initialize mode_switch_bit and modifier_meaning. */ | 3430 | /* Initialize mode_switch_bit and modifier_meaning. */ |
| 3534 | static void | 3431 | static void |
| 3535 | x_find_modifier_meanings (dpyinfo) | 3432 | x_find_modifier_meanings (struct x_display_info *dpyinfo) |
| 3536 | struct x_display_info *dpyinfo; | ||
| 3537 | { | 3433 | { |
| 3538 | int min_code, max_code; | 3434 | int min_code, max_code; |
| 3539 | KeySym *syms; | 3435 | KeySym *syms; |
| @@ -3644,9 +3540,7 @@ x_find_modifier_meanings (dpyinfo) | |||
| 3644 | Emacs uses. */ | 3540 | Emacs uses. */ |
| 3645 | 3541 | ||
| 3646 | unsigned int | 3542 | unsigned int |
| 3647 | x_x_to_emacs_modifiers (dpyinfo, state) | 3543 | x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, unsigned int state) |
| 3648 | struct x_display_info *dpyinfo; | ||
| 3649 | unsigned int state; | ||
| 3650 | { | 3544 | { |
| 3651 | EMACS_UINT mod_meta = meta_modifier; | 3545 | EMACS_UINT mod_meta = meta_modifier; |
| 3652 | EMACS_UINT mod_alt = alt_modifier; | 3546 | EMACS_UINT mod_alt = alt_modifier; |
| @@ -3673,9 +3567,7 @@ x_x_to_emacs_modifiers (dpyinfo, state) | |||
| 3673 | } | 3567 | } |
| 3674 | 3568 | ||
| 3675 | static unsigned int | 3569 | static unsigned int |
| 3676 | x_emacs_to_x_modifiers (dpyinfo, state) | 3570 | x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, unsigned int state) |
| 3677 | struct x_display_info *dpyinfo; | ||
| 3678 | unsigned int state; | ||
| 3679 | { | 3571 | { |
| 3680 | EMACS_UINT mod_meta = meta_modifier; | 3572 | EMACS_UINT mod_meta = meta_modifier; |
| 3681 | EMACS_UINT mod_alt = alt_modifier; | 3573 | EMACS_UINT mod_alt = alt_modifier; |
| @@ -3705,8 +3597,7 @@ x_emacs_to_x_modifiers (dpyinfo, state) | |||
| 3705 | /* Convert a keysym to its name. */ | 3597 | /* Convert a keysym to its name. */ |
| 3706 | 3598 | ||
| 3707 | char * | 3599 | char * |
| 3708 | x_get_keysym_name (keysym) | 3600 | x_get_keysym_name (KeySym keysym) |
| 3709 | KeySym keysym; | ||
| 3710 | { | 3601 | { |
| 3711 | char *value; | 3602 | char *value; |
| 3712 | 3603 | ||
| @@ -3727,10 +3618,7 @@ x_get_keysym_name (keysym) | |||
| 3727 | the mouse. */ | 3618 | the mouse. */ |
| 3728 | 3619 | ||
| 3729 | static Lisp_Object | 3620 | static Lisp_Object |
| 3730 | construct_mouse_click (result, event, f) | 3621 | construct_mouse_click (struct input_event *result, XButtonEvent *event, struct frame *f) |
| 3731 | struct input_event *result; | ||
| 3732 | XButtonEvent *event; | ||
| 3733 | struct frame *f; | ||
| 3734 | { | 3622 | { |
| 3735 | /* Make the event type NO_EVENT; we'll change that when we decide | 3623 | /* Make the event type NO_EVENT; we'll change that when we decide |
| 3736 | otherwise. */ | 3624 | otherwise. */ |
| @@ -3763,9 +3651,7 @@ static XMotionEvent last_mouse_motion_event; | |||
| 3763 | static Lisp_Object last_mouse_motion_frame; | 3651 | static Lisp_Object last_mouse_motion_frame; |
| 3764 | 3652 | ||
| 3765 | static int | 3653 | static int |
| 3766 | note_mouse_movement (frame, event) | 3654 | note_mouse_movement (FRAME_PTR frame, XMotionEvent *event) |
| 3767 | FRAME_PTR frame; | ||
| 3768 | XMotionEvent *event; | ||
| 3769 | { | 3655 | { |
| 3770 | last_mouse_movement_time = event->time; | 3656 | last_mouse_movement_time = event->time; |
| 3771 | last_mouse_motion_event = *event; | 3657 | last_mouse_motion_event = *event; |
| @@ -3809,7 +3695,7 @@ note_mouse_movement (frame, event) | |||
| 3809 | ************************************************************************/ | 3695 | ************************************************************************/ |
| 3810 | 3696 | ||
| 3811 | static void | 3697 | static void |
| 3812 | redo_mouse_highlight () | 3698 | redo_mouse_highlight (void) |
| 3813 | { | 3699 | { |
| 3814 | if (!NILP (last_mouse_motion_frame) | 3700 | if (!NILP (last_mouse_motion_frame) |
| 3815 | && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame))) | 3701 | && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame))) |
| @@ -3841,13 +3727,7 @@ redo_mouse_highlight () | |||
| 3841 | movement. */ | 3727 | movement. */ |
| 3842 | 3728 | ||
| 3843 | static void | 3729 | static void |
| 3844 | XTmouse_position (fp, insist, bar_window, part, x, y, time) | 3730 | XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time) |
| 3845 | FRAME_PTR *fp; | ||
| 3846 | int insist; | ||
| 3847 | Lisp_Object *bar_window; | ||
| 3848 | enum scroll_bar_part *part; | ||
| 3849 | Lisp_Object *x, *y; | ||
| 3850 | unsigned long *time; | ||
| 3851 | { | 3731 | { |
| 3852 | FRAME_PTR f1; | 3732 | FRAME_PTR f1; |
| 3853 | 3733 | ||
| @@ -4049,9 +3929,7 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time) | |||
| 4049 | bits. */ | 3929 | bits. */ |
| 4050 | 3930 | ||
| 4051 | static struct scroll_bar * | 3931 | static struct scroll_bar * |
| 4052 | x_window_to_scroll_bar (display, window_id) | 3932 | x_window_to_scroll_bar (Display *display, Window window_id) |
| 4053 | Display *display; | ||
| 4054 | Window window_id; | ||
| 4055 | { | 3933 | { |
| 4056 | Lisp_Object tail; | 3934 | Lisp_Object tail; |
| 4057 | 3935 | ||
| @@ -4222,9 +4100,7 @@ static int scroll_bar_windows_size; | |||
| 4222 | amount to scroll of a whole of WHOLE. */ | 4100 | amount to scroll of a whole of WHOLE. */ |
| 4223 | 4101 | ||
| 4224 | static void | 4102 | static void |
| 4225 | x_send_scroll_bar_event (window, part, portion, whole) | 4103 | x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole) |
| 4226 | Lisp_Object window; | ||
| 4227 | int part, portion, whole; | ||
| 4228 | { | 4104 | { |
| 4229 | XEvent event; | 4105 | XEvent event; |
| 4230 | XClientMessageEvent *ev = (XClientMessageEvent *) &event; | 4106 | XClientMessageEvent *ev = (XClientMessageEvent *) &event; |
| @@ -4286,9 +4162,7 @@ x_send_scroll_bar_event (window, part, portion, whole) | |||
| 4286 | in *IEVENT. */ | 4162 | in *IEVENT. */ |
| 4287 | 4163 | ||
| 4288 | static void | 4164 | static void |
| 4289 | x_scroll_bar_to_input_event (event, ievent) | 4165 | x_scroll_bar_to_input_event (XEvent *event, struct input_event *ievent) |
| 4290 | XEvent *event; | ||
| 4291 | struct input_event *ievent; | ||
| 4292 | { | 4166 | { |
| 4293 | XClientMessageEvent *ev = (XClientMessageEvent *) event; | 4167 | XClientMessageEvent *ev = (XClientMessageEvent *) event; |
| 4294 | Lisp_Object window; | 4168 | Lisp_Object window; |
| @@ -4572,9 +4446,7 @@ xaw_scroll_callback (widget, client_data, call_data) | |||
| 4572 | 4446 | ||
| 4573 | #ifdef USE_GTK | 4447 | #ifdef USE_GTK |
| 4574 | static void | 4448 | static void |
| 4575 | x_create_toolkit_scroll_bar (f, bar) | 4449 | x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) |
| 4576 | struct frame *f; | ||
| 4577 | struct scroll_bar *bar; | ||
| 4578 | { | 4450 | { |
| 4579 | char *scroll_bar_name = SCROLL_BAR_NAME; | 4451 | char *scroll_bar_name = SCROLL_BAR_NAME; |
| 4580 | 4452 | ||
| @@ -4790,9 +4662,7 @@ x_create_toolkit_scroll_bar (f, bar) | |||
| 4790 | 4662 | ||
| 4791 | #ifdef USE_GTK | 4663 | #ifdef USE_GTK |
| 4792 | static void | 4664 | static void |
| 4793 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | 4665 | x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole) |
| 4794 | struct scroll_bar *bar; | ||
| 4795 | int portion, position, whole; | ||
| 4796 | { | 4666 | { |
| 4797 | xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); | 4667 | xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); |
| 4798 | } | 4668 | } |
| @@ -4916,9 +4786,7 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4916 | scroll bar. */ | 4786 | scroll bar. */ |
| 4917 | 4787 | ||
| 4918 | static struct scroll_bar * | 4788 | static struct scroll_bar * |
| 4919 | x_scroll_bar_create (w, top, left, width, height) | 4789 | x_scroll_bar_create (struct window *w, int top, int left, int width, int height) |
| 4920 | struct window *w; | ||
| 4921 | int top, left, width, height; | ||
| 4922 | { | 4790 | { |
| 4923 | struct frame *f = XFRAME (w->frame); | 4791 | struct frame *f = XFRAME (w->frame); |
| 4924 | struct scroll_bar *bar | 4792 | struct scroll_bar *bar |
| @@ -5133,8 +5001,7 @@ x_scroll_bar_set_handle (bar, start, end, rebuild) | |||
| 5133 | nil. */ | 5001 | nil. */ |
| 5134 | 5002 | ||
| 5135 | static void | 5003 | static void |
| 5136 | x_scroll_bar_remove (bar) | 5004 | x_scroll_bar_remove (struct scroll_bar *bar) |
| 5137 | struct scroll_bar *bar; | ||
| 5138 | { | 5005 | { |
| 5139 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 5006 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 5140 | BLOCK_INPUT; | 5007 | BLOCK_INPUT; |
| @@ -5162,9 +5029,7 @@ x_scroll_bar_remove (bar) | |||
| 5162 | create one. */ | 5029 | create one. */ |
| 5163 | 5030 | ||
| 5164 | static void | 5031 | static void |
| 5165 | XTset_vertical_scroll_bar (w, portion, whole, position) | 5032 | XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int position) |
| 5166 | struct window *w; | ||
| 5167 | int portion, whole, position; | ||
| 5168 | { | 5033 | { |
| 5169 | struct frame *f = XFRAME (w->frame); | 5034 | struct frame *f = XFRAME (w->frame); |
| 5170 | struct scroll_bar *bar; | 5035 | struct scroll_bar *bar; |
| @@ -5381,8 +5246,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5381 | `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ | 5246 | `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ |
| 5382 | 5247 | ||
| 5383 | static void | 5248 | static void |
| 5384 | XTcondemn_scroll_bars (frame) | 5249 | XTcondemn_scroll_bars (FRAME_PTR frame) |
| 5385 | FRAME_PTR frame; | ||
| 5386 | { | 5250 | { |
| 5387 | /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */ | 5251 | /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */ |
| 5388 | while (! NILP (FRAME_SCROLL_BARS (frame))) | 5252 | while (! NILP (FRAME_SCROLL_BARS (frame))) |
| @@ -5403,8 +5267,7 @@ XTcondemn_scroll_bars (frame) | |||
| 5403 | Note that WINDOW isn't necessarily condemned at all. */ | 5267 | Note that WINDOW isn't necessarily condemned at all. */ |
| 5404 | 5268 | ||
| 5405 | static void | 5269 | static void |
| 5406 | XTredeem_scroll_bar (window) | 5270 | XTredeem_scroll_bar (struct window *window) |
| 5407 | struct window *window; | ||
| 5408 | { | 5271 | { |
| 5409 | struct scroll_bar *bar; | 5272 | struct scroll_bar *bar; |
| 5410 | struct frame *f; | 5273 | struct frame *f; |
| @@ -5449,8 +5312,7 @@ XTredeem_scroll_bar (window) | |||
| 5449 | last call to `*condemn_scroll_bars_hook'. */ | 5312 | last call to `*condemn_scroll_bars_hook'. */ |
| 5450 | 5313 | ||
| 5451 | static void | 5314 | static void |
| 5452 | XTjudge_scroll_bars (f) | 5315 | XTjudge_scroll_bars (FRAME_PTR f) |
| 5453 | FRAME_PTR f; | ||
| 5454 | { | 5316 | { |
| 5455 | Lisp_Object bar, next; | 5317 | Lisp_Object bar, next; |
| 5456 | 5318 | ||
| @@ -5527,10 +5389,7 @@ x_scroll_bar_expose (bar, event) | |||
| 5527 | 5389 | ||
| 5528 | 5390 | ||
| 5529 | static void | 5391 | static void |
| 5530 | x_scroll_bar_handle_click (bar, event, emacs_event) | 5392 | x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event) |
| 5531 | struct scroll_bar *bar; | ||
| 5532 | XEvent *event; | ||
| 5533 | struct input_event *emacs_event; | ||
| 5534 | { | 5393 | { |
| 5535 | if (! WINDOWP (bar->window)) | 5394 | if (! WINDOWP (bar->window)) |
| 5536 | abort (); | 5395 | abort (); |
| @@ -5620,12 +5479,7 @@ x_scroll_bar_note_movement (bar, event) | |||
| 5620 | on the scroll bar. */ | 5479 | on the scroll bar. */ |
| 5621 | 5480 | ||
| 5622 | static void | 5481 | static void |
| 5623 | x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) | 5482 | x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time) |
| 5624 | FRAME_PTR *fp; | ||
| 5625 | Lisp_Object *bar_window; | ||
| 5626 | enum scroll_bar_part *part; | ||
| 5627 | Lisp_Object *x, *y; | ||
| 5628 | unsigned long *time; | ||
| 5629 | { | 5483 | { |
| 5630 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); | 5484 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); |
| 5631 | Window w = bar->x_window; | 5485 | Window w = bar->x_window; |
| @@ -5697,8 +5551,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) | |||
| 5697 | redraw them. */ | 5551 | redraw them. */ |
| 5698 | 5552 | ||
| 5699 | void | 5553 | void |
| 5700 | x_scroll_bar_clear (f) | 5554 | x_scroll_bar_clear (FRAME_PTR f) |
| 5701 | FRAME_PTR f; | ||
| 5702 | { | 5555 | { |
| 5703 | #ifndef USE_TOOLKIT_SCROLL_BARS | 5556 | #ifndef USE_TOOLKIT_SCROLL_BARS |
| 5704 | Lisp_Object bar; | 5557 | Lisp_Object bar; |
| @@ -5784,9 +5637,7 @@ enum | |||
| 5784 | 5637 | ||
| 5785 | #ifdef HAVE_X_I18N | 5638 | #ifdef HAVE_X_I18N |
| 5786 | static int | 5639 | static int |
| 5787 | x_filter_event (dpyinfo, event) | 5640 | x_filter_event (struct x_display_info *dpyinfo, XEvent *event) |
| 5788 | struct x_display_info *dpyinfo; | ||
| 5789 | XEvent *event; | ||
| 5790 | { | 5641 | { |
| 5791 | /* XFilterEvent returns non-zero if the input method has | 5642 | /* XFilterEvent returns non-zero if the input method has |
| 5792 | consumed the event. We pass the frame's X window to | 5643 | consumed the event. We pass the frame's X window to |
| @@ -5809,10 +5660,7 @@ static struct input_event *current_hold_quit; | |||
| 5809 | It is invoked before the XEvent is translated to a GdkEvent, | 5660 | It is invoked before the XEvent is translated to a GdkEvent, |
| 5810 | so we have a chance to act on the event before GTK. */ | 5661 | so we have a chance to act on the event before GTK. */ |
| 5811 | static GdkFilterReturn | 5662 | static GdkFilterReturn |
| 5812 | event_handler_gdk (gxev, ev, data) | 5663 | event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data) |
| 5813 | GdkXEvent *gxev; | ||
| 5814 | GdkEvent *ev; | ||
| 5815 | gpointer data; | ||
| 5816 | { | 5664 | { |
| 5817 | XEvent *xev = (XEvent *) gxev; | 5665 | XEvent *xev = (XEvent *) gxev; |
| 5818 | 5666 | ||
| @@ -5865,11 +5713,7 @@ event_handler_gdk (gxev, ev, data) | |||
| 5865 | We return the number of characters stored into the buffer. */ | 5713 | We return the number of characters stored into the buffer. */ |
| 5866 | 5714 | ||
| 5867 | static int | 5715 | static int |
| 5868 | handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | 5716 | handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, struct input_event *hold_quit) |
| 5869 | struct x_display_info *dpyinfo; | ||
| 5870 | XEvent *eventp; | ||
| 5871 | int *finish; | ||
| 5872 | struct input_event *hold_quit; | ||
| 5873 | { | 5717 | { |
| 5874 | union { | 5718 | union { |
| 5875 | struct input_event ie; | 5719 | struct input_event ie; |
| @@ -7096,9 +6940,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 7096 | 6940 | ||
| 7097 | Returns the value handle_one_xevent sets in the finish argument. */ | 6941 | Returns the value handle_one_xevent sets in the finish argument. */ |
| 7098 | int | 6942 | int |
| 7099 | x_dispatch_event (event, display) | 6943 | x_dispatch_event (XEvent *event, Display *display) |
| 7100 | XEvent *event; | ||
| 7101 | Display *display; | ||
| 7102 | { | 6944 | { |
| 7103 | struct x_display_info *dpyinfo; | 6945 | struct x_display_info *dpyinfo; |
| 7104 | int finish = X_EVENT_NORMAL; | 6946 | int finish = X_EVENT_NORMAL; |
| @@ -7124,10 +6966,7 @@ x_dispatch_event (event, display) | |||
| 7124 | EXPECTED is nonzero if the caller knows input is available. */ | 6966 | EXPECTED is nonzero if the caller knows input is available. */ |
| 7125 | 6967 | ||
| 7126 | static int | 6968 | static int |
| 7127 | XTread_socket (terminal, expected, hold_quit) | 6969 | XTread_socket (struct terminal *terminal, int expected, struct input_event *hold_quit) |
| 7128 | struct terminal *terminal; | ||
| 7129 | int expected; | ||
| 7130 | struct input_event *hold_quit; | ||
| 7131 | { | 6970 | { |
| 7132 | int count = 0; | 6971 | int count = 0; |
| 7133 | XEvent event; | 6972 | XEvent event; |
| @@ -7278,11 +7117,7 @@ XTread_socket (terminal, expected, hold_quit) | |||
| 7278 | mode lines must be clipped to the whole window. */ | 7117 | mode lines must be clipped to the whole window. */ |
| 7279 | 7118 | ||
| 7280 | static void | 7119 | static void |
| 7281 | x_clip_to_row (w, row, area, gc) | 7120 | x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc) |
| 7282 | struct window *w; | ||
| 7283 | struct glyph_row *row; | ||
| 7284 | int area; | ||
| 7285 | GC gc; | ||
| 7286 | { | 7121 | { |
| 7287 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 7122 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 7288 | XRectangle clip_rect; | 7123 | XRectangle clip_rect; |
| @@ -7303,9 +7138,7 @@ x_clip_to_row (w, row, area, gc) | |||
| 7303 | /* Draw a hollow box cursor on window W in glyph row ROW. */ | 7138 | /* Draw a hollow box cursor on window W in glyph row ROW. */ |
| 7304 | 7139 | ||
| 7305 | static void | 7140 | static void |
| 7306 | x_draw_hollow_cursor (w, row) | 7141 | x_draw_hollow_cursor (struct window *w, struct glyph_row *row) |
| 7307 | struct window *w; | ||
| 7308 | struct glyph_row *row; | ||
| 7309 | { | 7142 | { |
| 7310 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 7143 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 7311 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 7144 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| @@ -7350,11 +7183,7 @@ x_draw_hollow_cursor (w, row) | |||
| 7350 | --gerd. */ | 7183 | --gerd. */ |
| 7351 | 7184 | ||
| 7352 | static void | 7185 | static void |
| 7353 | x_draw_bar_cursor (w, row, width, kind) | 7186 | x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text_cursor_kinds kind) |
| 7354 | struct window *w; | ||
| 7355 | struct glyph_row *row; | ||
| 7356 | int width; | ||
| 7357 | enum text_cursor_kinds kind; | ||
| 7358 | { | 7187 | { |
| 7359 | struct frame *f = XFRAME (w->frame); | 7188 | struct frame *f = XFRAME (w->frame); |
| 7360 | struct glyph *cursor_glyph; | 7189 | struct glyph *cursor_glyph; |
| @@ -7445,9 +7274,7 @@ x_draw_bar_cursor (w, row, width, kind) | |||
| 7445 | /* RIF: Define cursor CURSOR on frame F. */ | 7274 | /* RIF: Define cursor CURSOR on frame F. */ |
| 7446 | 7275 | ||
| 7447 | static void | 7276 | static void |
| 7448 | x_define_frame_cursor (f, cursor) | 7277 | x_define_frame_cursor (struct frame *f, Cursor cursor) |
| 7449 | struct frame *f; | ||
| 7450 | Cursor cursor; | ||
| 7451 | { | 7278 | { |
| 7452 | if (!f->pointer_invisible | 7279 | if (!f->pointer_invisible |
| 7453 | && f->output_data.x->current_cursor != cursor) | 7280 | && f->output_data.x->current_cursor != cursor) |
| @@ -7459,9 +7286,7 @@ x_define_frame_cursor (f, cursor) | |||
| 7459 | /* RIF: Clear area on frame F. */ | 7286 | /* RIF: Clear area on frame F. */ |
| 7460 | 7287 | ||
| 7461 | static void | 7288 | static void |
| 7462 | x_clear_frame_area (f, x, y, width, height) | 7289 | x_clear_frame_area (struct frame *f, int x, int y, int width, int height) |
| 7463 | struct frame *f; | ||
| 7464 | int x, y, width, height; | ||
| 7465 | { | 7290 | { |
| 7466 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 7291 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 7467 | x, y, width, height, False); | 7292 | x, y, width, height, False); |
| @@ -7476,12 +7301,7 @@ x_clear_frame_area (f, x, y, width, height) | |||
| 7476 | /* RIF: Draw cursor on window W. */ | 7301 | /* RIF: Draw cursor on window W. */ |
| 7477 | 7302 | ||
| 7478 | static void | 7303 | static void |
| 7479 | x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p) | 7304 | x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int y, int cursor_type, int cursor_width, int on_p, int active_p) |
| 7480 | struct window *w; | ||
| 7481 | struct glyph_row *glyph_row; | ||
| 7482 | int x, y; | ||
| 7483 | int cursor_type, cursor_width; | ||
| 7484 | int on_p, active_p; | ||
| 7485 | { | 7305 | { |
| 7486 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 7306 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 7487 | 7307 | ||
| @@ -7545,9 +7365,7 @@ x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, activ | |||
| 7545 | /* Make the x-window of frame F use the gnu icon bitmap. */ | 7365 | /* Make the x-window of frame F use the gnu icon bitmap. */ |
| 7546 | 7366 | ||
| 7547 | int | 7367 | int |
| 7548 | x_bitmap_icon (f, file) | 7368 | x_bitmap_icon (struct frame *f, Lisp_Object file) |
| 7549 | struct frame *f; | ||
| 7550 | Lisp_Object file; | ||
| 7551 | { | 7369 | { |
| 7552 | int bitmap_id; | 7370 | int bitmap_id; |
| 7553 | 7371 | ||
| @@ -7624,9 +7442,7 @@ x_bitmap_icon (f, file) | |||
| 7624 | Use ICON_NAME as the text. */ | 7442 | Use ICON_NAME as the text. */ |
| 7625 | 7443 | ||
| 7626 | int | 7444 | int |
| 7627 | x_text_icon (f, icon_name) | 7445 | x_text_icon (struct frame *f, char *icon_name) |
| 7628 | struct frame *f; | ||
| 7629 | char *icon_name; | ||
| 7630 | { | 7446 | { |
| 7631 | if (FRAME_X_WINDOW (f) == 0) | 7447 | if (FRAME_X_WINDOW (f) == 0) |
| 7632 | return 1; | 7448 | return 1; |
| @@ -7669,9 +7485,7 @@ static struct x_error_message_stack *x_error_message; | |||
| 7669 | x_catch_errors is in effect. */ | 7485 | x_catch_errors is in effect. */ |
| 7670 | 7486 | ||
| 7671 | static void | 7487 | static void |
| 7672 | x_error_catcher (display, error) | 7488 | x_error_catcher (Display *display, XErrorEvent *error) |
| 7673 | Display *display; | ||
| 7674 | XErrorEvent *error; | ||
| 7675 | { | 7489 | { |
| 7676 | XGetErrorText (display, error->error_code, | 7490 | XGetErrorText (display, error->error_code, |
| 7677 | x_error_message->string, | 7491 | x_error_message->string, |
| @@ -7691,11 +7505,10 @@ x_error_catcher (display, error) | |||
| 7691 | 7505 | ||
| 7692 | Calling x_uncatch_errors resumes the normal error handling. */ | 7506 | Calling x_uncatch_errors resumes the normal error handling. */ |
| 7693 | 7507 | ||
| 7694 | void x_check_errors (); | 7508 | void x_check_errors (Display *dpy, char *format); |
| 7695 | 7509 | ||
| 7696 | void | 7510 | void |
| 7697 | x_catch_errors (dpy) | 7511 | x_catch_errors (Display *dpy) |
| 7698 | Display *dpy; | ||
| 7699 | { | 7512 | { |
| 7700 | struct x_error_message_stack *data = xmalloc (sizeof (*data)); | 7513 | struct x_error_message_stack *data = xmalloc (sizeof (*data)); |
| 7701 | 7514 | ||
| @@ -7712,7 +7525,7 @@ x_catch_errors (dpy) | |||
| 7712 | DPY should be the display that was passed to x_catch_errors. */ | 7525 | DPY should be the display that was passed to x_catch_errors. */ |
| 7713 | 7526 | ||
| 7714 | void | 7527 | void |
| 7715 | x_uncatch_errors () | 7528 | x_uncatch_errors (void) |
| 7716 | { | 7529 | { |
| 7717 | struct x_error_message_stack *tmp; | 7530 | struct x_error_message_stack *tmp; |
| 7718 | 7531 | ||
| @@ -7734,9 +7547,7 @@ x_uncatch_errors () | |||
| 7734 | sprintf (a buffer, FORMAT, the x error message text) as the text. */ | 7547 | sprintf (a buffer, FORMAT, the x error message text) as the text. */ |
| 7735 | 7548 | ||
| 7736 | void | 7549 | void |
| 7737 | x_check_errors (dpy, format) | 7550 | x_check_errors (Display *dpy, char *format) |
| 7738 | Display *dpy; | ||
| 7739 | char *format; | ||
| 7740 | { | 7551 | { |
| 7741 | /* Make sure to catch any errors incurred so far. */ | 7552 | /* Make sure to catch any errors incurred so far. */ |
| 7742 | XSync (dpy, False); | 7553 | XSync (dpy, False); |
| @@ -7754,8 +7565,7 @@ x_check_errors (dpy, format) | |||
| 7754 | since we did x_catch_errors on DPY. */ | 7565 | since we did x_catch_errors on DPY. */ |
| 7755 | 7566 | ||
| 7756 | int | 7567 | int |
| 7757 | x_had_errors_p (dpy) | 7568 | x_had_errors_p (Display *dpy) |
| 7758 | Display *dpy; | ||
| 7759 | { | 7569 | { |
| 7760 | /* Make sure to catch any errors incurred so far. */ | 7570 | /* Make sure to catch any errors incurred so far. */ |
| 7761 | XSync (dpy, False); | 7571 | XSync (dpy, False); |
| @@ -7766,8 +7576,7 @@ x_had_errors_p (dpy) | |||
| 7766 | /* Forget about any errors we have had, since we did x_catch_errors on DPY. */ | 7576 | /* Forget about any errors we have had, since we did x_catch_errors on DPY. */ |
| 7767 | 7577 | ||
| 7768 | void | 7578 | void |
| 7769 | x_clear_errors (dpy) | 7579 | x_clear_errors (Display *dpy) |
| 7770 | Display *dpy; | ||
| 7771 | { | 7580 | { |
| 7772 | x_error_message->string[0] = 0; | 7581 | x_error_message->string[0] = 0; |
| 7773 | } | 7582 | } |
| @@ -7787,7 +7596,7 @@ x_fully_uncatch_errors () | |||
| 7787 | /* Nonzero if x_catch_errors has been done and not yet canceled. */ | 7596 | /* Nonzero if x_catch_errors has been done and not yet canceled. */ |
| 7788 | 7597 | ||
| 7789 | int | 7598 | int |
| 7790 | x_catching_errors () | 7599 | x_catching_errors (void) |
| 7791 | { | 7600 | { |
| 7792 | return x_error_message != 0; | 7601 | return x_error_message != 0; |
| 7793 | } | 7602 | } |
| @@ -7808,8 +7617,8 @@ x_trace_wire () | |||
| 7808 | which will do the appropriate cleanup for us. */ | 7617 | which will do the appropriate cleanup for us. */ |
| 7809 | 7618 | ||
| 7810 | static SIGTYPE | 7619 | static SIGTYPE |
| 7811 | x_connection_signal (signalnum) /* If we don't have an argument, */ | 7620 | x_connection_signal (int signalnum) /* If we don't have an argument, */ |
| 7812 | int signalnum; /* some compilers complain in signal calls. */ | 7621 | /* some compilers complain in signal calls. */ |
| 7813 | { | 7622 | { |
| 7814 | #ifdef USG | 7623 | #ifdef USG |
| 7815 | /* USG systems forget handlers when they are used; | 7624 | /* USG systems forget handlers when they are used; |
| @@ -7832,7 +7641,7 @@ static char *error_msg; | |||
| 7832 | instead of dumping core when XtCloseDisplay fails. */ | 7641 | instead of dumping core when XtCloseDisplay fails. */ |
| 7833 | 7642 | ||
| 7834 | static void | 7643 | static void |
| 7835 | x_fatal_error_signal () | 7644 | x_fatal_error_signal (void) |
| 7836 | { | 7645 | { |
| 7837 | fprintf (stderr, "%s\n", error_msg); | 7646 | fprintf (stderr, "%s\n", error_msg); |
| 7838 | exit (70); | 7647 | exit (70); |
| @@ -7842,9 +7651,7 @@ x_fatal_error_signal () | |||
| 7842 | the text of an error message that lead to the connection loss. */ | 7651 | the text of an error message that lead to the connection loss. */ |
| 7843 | 7652 | ||
| 7844 | static SIGTYPE | 7653 | static SIGTYPE |
| 7845 | x_connection_closed (dpy, error_message) | 7654 | x_connection_closed (Display *dpy, char *error_message) |
| 7846 | Display *dpy; | ||
| 7847 | char *error_message; | ||
| 7848 | { | 7655 | { |
| 7849 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); | 7656 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); |
| 7850 | Lisp_Object frame, tail; | 7657 | Lisp_Object frame, tail; |
| @@ -7986,9 +7793,7 @@ static void x_error_quitter (Display *, XErrorEvent *); | |||
| 7986 | It calls x_error_quitter or x_error_catcher. */ | 7793 | It calls x_error_quitter or x_error_catcher. */ |
| 7987 | 7794 | ||
| 7988 | static int | 7795 | static int |
| 7989 | x_error_handler (display, error) | 7796 | x_error_handler (Display *display, XErrorEvent *error) |
| 7990 | Display *display; | ||
| 7991 | XErrorEvent *error; | ||
| 7992 | { | 7797 | { |
| 7993 | if (x_error_message) | 7798 | if (x_error_message) |
| 7994 | x_error_catcher (display, error); | 7799 | x_error_catcher (display, error); |
| @@ -8019,9 +7824,7 @@ x_error_handler (display, error) | |||
| 8019 | after x_error_handler prevents inlining into the former. */ | 7824 | after x_error_handler prevents inlining into the former. */ |
| 8020 | 7825 | ||
| 8021 | static void NO_INLINE | 7826 | static void NO_INLINE |
| 8022 | x_error_quitter (display, error) | 7827 | x_error_quitter (Display *display, XErrorEvent *error) |
| 8023 | Display *display; | ||
| 8024 | XErrorEvent *error; | ||
| 8025 | { | 7828 | { |
| 8026 | char buf[256], buf1[356]; | 7829 | char buf[256], buf1[356]; |
| 8027 | 7830 | ||
| @@ -8046,8 +7849,7 @@ x_error_quitter (display, error) | |||
| 8046 | If that was the only one, it prints an error message and kills Emacs. */ | 7849 | If that was the only one, it prints an error message and kills Emacs. */ |
| 8047 | 7850 | ||
| 8048 | static int | 7851 | static int |
| 8049 | x_io_error_quitter (display) | 7852 | x_io_error_quitter (Display *display) |
| 8050 | Display *display; | ||
| 8051 | { | 7853 | { |
| 8052 | char buf[256]; | 7854 | char buf[256]; |
| 8053 | 7855 | ||
| @@ -8064,10 +7866,7 @@ x_io_error_quitter (display) | |||
| 8064 | FONT-OBJECT. */ | 7866 | FONT-OBJECT. */ |
| 8065 | 7867 | ||
| 8066 | Lisp_Object | 7868 | Lisp_Object |
| 8067 | x_new_font (f, font_object, fontset) | 7869 | x_new_font (struct frame *f, Lisp_Object font_object, int fontset) |
| 8068 | struct frame *f; | ||
| 8069 | Lisp_Object font_object; | ||
| 8070 | int fontset; | ||
| 8071 | { | 7870 | { |
| 8072 | struct font *font = XFONT_OBJECT (font_object); | 7871 | struct font *font = XFONT_OBJECT (font_object); |
| 8073 | 7872 | ||
| @@ -8136,10 +7935,7 @@ x_new_font (f, font_object, fontset) | |||
| 8136 | pointer to the x_display_info structure corresponding to XIM. */ | 7935 | pointer to the x_display_info structure corresponding to XIM. */ |
| 8137 | 7936 | ||
| 8138 | static void | 7937 | static void |
| 8139 | xim_destroy_callback (xim, client_data, call_data) | 7938 | xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data) |
| 8140 | XIM xim; | ||
| 8141 | XPointer client_data; | ||
| 8142 | XPointer call_data; | ||
| 8143 | { | 7939 | { |
| 8144 | struct x_display_info *dpyinfo = (struct x_display_info *) client_data; | 7940 | struct x_display_info *dpyinfo = (struct x_display_info *) client_data; |
| 8145 | Lisp_Object frame, tail; | 7941 | Lisp_Object frame, tail; |
| @@ -8174,9 +7970,7 @@ extern char *XSetIMValues (XIM, ...); | |||
| 8174 | RESOURCE_NAME is the resource name Emacs uses. */ | 7970 | RESOURCE_NAME is the resource name Emacs uses. */ |
| 8175 | 7971 | ||
| 8176 | static void | 7972 | static void |
| 8177 | xim_open_dpy (dpyinfo, resource_name) | 7973 | xim_open_dpy (struct x_display_info *dpyinfo, char *resource_name) |
| 8178 | struct x_display_info *dpyinfo; | ||
| 8179 | char *resource_name; | ||
| 8180 | { | 7974 | { |
| 8181 | XIM xim; | 7975 | XIM xim; |
| 8182 | 7976 | ||
| @@ -8220,10 +8014,7 @@ xim_open_dpy (dpyinfo, resource_name) | |||
| 8220 | when the callback was registered. */ | 8014 | when the callback was registered. */ |
| 8221 | 8015 | ||
| 8222 | static void | 8016 | static void |
| 8223 | xim_instantiate_callback (display, client_data, call_data) | 8017 | xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_data) |
| 8224 | Display *display; | ||
| 8225 | XPointer client_data; | ||
| 8226 | XPointer call_data; | ||
| 8227 | { | 8018 | { |
| 8228 | struct xim_inst_t *xim_inst = (struct xim_inst_t *) client_data; | 8019 | struct xim_inst_t *xim_inst = (struct xim_inst_t *) client_data; |
| 8229 | struct x_display_info *dpyinfo = xim_inst->dpyinfo; | 8020 | struct x_display_info *dpyinfo = xim_inst->dpyinfo; |
| @@ -8273,9 +8064,7 @@ xim_instantiate_callback (display, client_data, call_data) | |||
| 8273 | in the XIM instantiate callback function. */ | 8064 | in the XIM instantiate callback function. */ |
| 8274 | 8065 | ||
| 8275 | static void | 8066 | static void |
| 8276 | xim_initialize (dpyinfo, resource_name) | 8067 | xim_initialize (struct x_display_info *dpyinfo, char *resource_name) |
| 8277 | struct x_display_info *dpyinfo; | ||
| 8278 | char *resource_name; | ||
| 8279 | { | 8068 | { |
| 8280 | dpyinfo->xim = NULL; | 8069 | dpyinfo->xim = NULL; |
| 8281 | #ifdef HAVE_XIM | 8070 | #ifdef HAVE_XIM |
| @@ -8309,8 +8098,7 @@ xim_initialize (dpyinfo, resource_name) | |||
| 8309 | /* Close the connection to the XIM server on display DPYINFO. */ | 8098 | /* Close the connection to the XIM server on display DPYINFO. */ |
| 8310 | 8099 | ||
| 8311 | static void | 8100 | static void |
| 8312 | xim_close_dpy (dpyinfo) | 8101 | xim_close_dpy (struct x_display_info *dpyinfo) |
| 8313 | struct x_display_info *dpyinfo; | ||
| 8314 | { | 8102 | { |
| 8315 | #ifdef HAVE_XIM | 8103 | #ifdef HAVE_XIM |
| 8316 | if (use_xim) | 8104 | if (use_xim) |
| @@ -8339,8 +8127,7 @@ xim_close_dpy (dpyinfo) | |||
| 8339 | from its current recorded position values and gravity. */ | 8127 | from its current recorded position values and gravity. */ |
| 8340 | 8128 | ||
| 8341 | void | 8129 | void |
| 8342 | x_calc_absolute_position (f) | 8130 | x_calc_absolute_position (struct frame *f) |
| 8343 | struct frame *f; | ||
| 8344 | { | 8131 | { |
| 8345 | int flags = f->size_hint_flags; | 8132 | int flags = f->size_hint_flags; |
| 8346 | 8133 | ||
| @@ -8392,10 +8179,7 @@ x_calc_absolute_position (f) | |||
| 8392 | which means, do adjust for borders but don't change the gravity. */ | 8179 | which means, do adjust for borders but don't change the gravity. */ |
| 8393 | 8180 | ||
| 8394 | void | 8181 | void |
| 8395 | x_set_offset (f, xoff, yoff, change_gravity) | 8182 | x_set_offset (struct frame *f, register int xoff, register int yoff, int change_gravity) |
| 8396 | struct frame *f; | ||
| 8397 | register int xoff, yoff; | ||
| 8398 | int change_gravity; | ||
| 8399 | { | 8183 | { |
| 8400 | int modified_top, modified_left; | 8184 | int modified_top, modified_left; |
| 8401 | 8185 | ||
| @@ -8464,9 +8248,7 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 8464 | http://freedesktop.org/wiki/Specifications/wm-spec. */ | 8248 | http://freedesktop.org/wiki/Specifications/wm-spec. */ |
| 8465 | 8249 | ||
| 8466 | static int | 8250 | static int |
| 8467 | wm_supports (f, atomname) | 8251 | wm_supports (struct frame *f, const char *atomname) |
| 8468 | struct frame *f; | ||
| 8469 | const char *atomname; | ||
| 8470 | { | 8252 | { |
| 8471 | Atom actual_type; | 8253 | Atom actual_type; |
| 8472 | unsigned long actual_size, bytes_remaining; | 8254 | unsigned long actual_size, bytes_remaining; |
| @@ -8555,11 +8337,7 @@ wm_supports (f, atomname) | |||
| 8555 | } | 8337 | } |
| 8556 | 8338 | ||
| 8557 | static void | 8339 | static void |
| 8558 | set_wm_state (frame, add, what, what2) | 8340 | set_wm_state (Lisp_Object frame, int add, const char *what, const char *what2) |
| 8559 | Lisp_Object frame; | ||
| 8560 | int add; | ||
| 8561 | const char *what; | ||
| 8562 | const char *what2; | ||
| 8563 | { | 8341 | { |
| 8564 | const char *atom = "_NET_WM_STATE"; | 8342 | const char *atom = "_NET_WM_STATE"; |
| 8565 | Fx_send_client_event (frame, make_number (0), frame, | 8343 | Fx_send_client_event (frame, make_number (0), frame, |
| @@ -8577,9 +8355,7 @@ set_wm_state (frame, add, what, what2) | |||
| 8577 | } | 8355 | } |
| 8578 | 8356 | ||
| 8579 | void | 8357 | void |
| 8580 | x_set_sticky (f, new_value, old_value) | 8358 | x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 8581 | struct frame *f; | ||
| 8582 | Lisp_Object new_value, old_value; | ||
| 8583 | { | 8359 | { |
| 8584 | Lisp_Object frame; | 8360 | Lisp_Object frame; |
| 8585 | 8361 | ||
| @@ -8591,8 +8367,7 @@ x_set_sticky (f, new_value, old_value) | |||
| 8591 | /* Do fullscreen as specified in extended window manager hints */ | 8367 | /* Do fullscreen as specified in extended window manager hints */ |
| 8592 | 8368 | ||
| 8593 | static int | 8369 | static int |
| 8594 | do_ewmh_fullscreen (f) | 8370 | do_ewmh_fullscreen (struct frame *f) |
| 8595 | struct frame *f; | ||
| 8596 | { | 8371 | { |
| 8597 | int have_net_atom = wm_supports (f, "_NET_WM_STATE"); | 8372 | int have_net_atom = wm_supports (f, "_NET_WM_STATE"); |
| 8598 | 8373 | ||
| @@ -8640,8 +8415,7 @@ do_ewmh_fullscreen (f) | |||
| 8640 | } | 8415 | } |
| 8641 | 8416 | ||
| 8642 | static void | 8417 | static void |
| 8643 | XTfullscreen_hook (f) | 8418 | XTfullscreen_hook (FRAME_PTR f) |
| 8644 | FRAME_PTR f; | ||
| 8645 | { | 8419 | { |
| 8646 | if (f->async_visible) | 8420 | if (f->async_visible) |
| 8647 | { | 8421 | { |
| @@ -8654,9 +8428,7 @@ XTfullscreen_hook (f) | |||
| 8654 | 8428 | ||
| 8655 | 8429 | ||
| 8656 | static void | 8430 | static void |
| 8657 | x_handle_net_wm_state (f, event) | 8431 | x_handle_net_wm_state (struct frame *f, XPropertyEvent *event) |
| 8658 | struct frame *f; | ||
| 8659 | XPropertyEvent *event; | ||
| 8660 | { | 8432 | { |
| 8661 | Atom actual_type; | 8433 | Atom actual_type; |
| 8662 | unsigned long actual_size, bytes_remaining; | 8434 | unsigned long actual_size, bytes_remaining; |
| @@ -8736,8 +8508,7 @@ x_handle_net_wm_state (f, event) | |||
| 8736 | /* Check if we need to resize the frame due to a fullscreen request. | 8508 | /* Check if we need to resize the frame due to a fullscreen request. |
| 8737 | If so needed, resize the frame. */ | 8509 | If so needed, resize the frame. */ |
| 8738 | static void | 8510 | static void |
| 8739 | x_check_fullscreen (f) | 8511 | x_check_fullscreen (struct frame *f) |
| 8740 | struct frame *f; | ||
| 8741 | { | 8512 | { |
| 8742 | if (do_ewmh_fullscreen (f)) | 8513 | if (do_ewmh_fullscreen (f)) |
| 8743 | return; | 8514 | return; |
| @@ -8783,10 +8554,7 @@ x_check_fullscreen (f) | |||
| 8783 | compensate by moving the window right and down by the proper amount. */ | 8554 | compensate by moving the window right and down by the proper amount. */ |
| 8784 | 8555 | ||
| 8785 | static void | 8556 | static void |
| 8786 | x_check_expected_move (f, expected_left, expected_top) | 8557 | x_check_expected_move (struct frame *f, int expected_left, int expected_top) |
| 8787 | struct frame *f; | ||
| 8788 | int expected_left; | ||
| 8789 | int expected_top; | ||
| 8790 | { | 8558 | { |
| 8791 | int current_left = 0, current_top = 0; | 8559 | int current_left = 0, current_top = 0; |
| 8792 | 8560 | ||
| @@ -8831,9 +8599,7 @@ x_check_expected_move (f, expected_left, expected_top) | |||
| 8831 | of an exact comparison. */ | 8599 | of an exact comparison. */ |
| 8832 | 8600 | ||
| 8833 | static void | 8601 | static void |
| 8834 | x_sync_with_move (f, left, top, fuzzy) | 8602 | x_sync_with_move (struct frame *f, int left, int top, int fuzzy) |
| 8835 | struct frame *f; | ||
| 8836 | int left, top, fuzzy; | ||
| 8837 | { | 8603 | { |
| 8838 | int count = 0; | 8604 | int count = 0; |
| 8839 | 8605 | ||
| @@ -8870,9 +8636,7 @@ x_sync_with_move (f, left, top, fuzzy) | |||
| 8870 | 8636 | ||
| 8871 | /* Wait for an event on frame F matching EVENTTYPE. */ | 8637 | /* Wait for an event on frame F matching EVENTTYPE. */ |
| 8872 | void | 8638 | void |
| 8873 | x_wait_for_event (f, eventtype) | 8639 | x_wait_for_event (struct frame *f, int eventtype) |
| 8874 | struct frame *f; | ||
| 8875 | int eventtype; | ||
| 8876 | { | 8640 | { |
| 8877 | int level = interrupt_input_blocked; | 8641 | int level = interrupt_input_blocked; |
| 8878 | 8642 | ||
| @@ -8917,10 +8681,7 @@ x_wait_for_event (f, eventtype) | |||
| 8917 | size changes. Otherwise we leave the window gravity unchanged. */ | 8681 | size changes. Otherwise we leave the window gravity unchanged. */ |
| 8918 | 8682 | ||
| 8919 | static void | 8683 | static void |
| 8920 | x_set_window_size_1 (f, change_gravity, cols, rows) | 8684 | x_set_window_size_1 (struct frame *f, int change_gravity, int cols, int rows) |
| 8921 | struct frame *f; | ||
| 8922 | int change_gravity; | ||
| 8923 | int cols, rows; | ||
| 8924 | { | 8685 | { |
| 8925 | int pixelwidth, pixelheight; | 8686 | int pixelwidth, pixelheight; |
| 8926 | 8687 | ||
| @@ -8985,10 +8746,7 @@ x_set_window_size_1 (f, change_gravity, cols, rows) | |||
| 8985 | Otherwise we leave the window gravity unchanged. */ | 8746 | Otherwise we leave the window gravity unchanged. */ |
| 8986 | 8747 | ||
| 8987 | void | 8748 | void |
| 8988 | x_set_window_size (f, change_gravity, cols, rows) | 8749 | x_set_window_size (struct frame *f, int change_gravity, int cols, int rows) |
| 8989 | struct frame *f; | ||
| 8990 | int change_gravity; | ||
| 8991 | int cols, rows; | ||
| 8992 | { | 8750 | { |
| 8993 | BLOCK_INPUT; | 8751 | BLOCK_INPUT; |
| 8994 | 8752 | ||
| @@ -9044,9 +8802,7 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 9044 | /* Mouse warping. */ | 8802 | /* Mouse warping. */ |
| 9045 | 8803 | ||
| 9046 | void | 8804 | void |
| 9047 | x_set_mouse_position (f, x, y) | 8805 | x_set_mouse_position (struct frame *f, int x, int y) |
| 9048 | struct frame *f; | ||
| 9049 | int x, y; | ||
| 9050 | { | 8806 | { |
| 9051 | int pix_x, pix_y; | 8807 | int pix_x, pix_y; |
| 9052 | 8808 | ||
| @@ -9069,9 +8825,7 @@ x_set_mouse_position (f, x, y) | |||
| 9069 | /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */ | 8825 | /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */ |
| 9070 | 8826 | ||
| 9071 | void | 8827 | void |
| 9072 | x_set_mouse_pixel_position (f, pix_x, pix_y) | 8828 | x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) |
| 9073 | struct frame *f; | ||
| 9074 | int pix_x, pix_y; | ||
| 9075 | { | 8829 | { |
| 9076 | BLOCK_INPUT; | 8830 | BLOCK_INPUT; |
| 9077 | 8831 | ||
| @@ -9083,8 +8837,7 @@ x_set_mouse_pixel_position (f, pix_x, pix_y) | |||
| 9083 | /* focus shifting, raising and lowering. */ | 8837 | /* focus shifting, raising and lowering. */ |
| 9084 | 8838 | ||
| 9085 | void | 8839 | void |
| 9086 | x_focus_on_frame (f) | 8840 | x_focus_on_frame (struct frame *f) |
| 9087 | struct frame *f; | ||
| 9088 | { | 8841 | { |
| 9089 | #if 0 | 8842 | #if 0 |
| 9090 | /* I don't think that the ICCCM allows programs to do things like this | 8843 | /* I don't think that the ICCCM allows programs to do things like this |
| @@ -9096,8 +8849,7 @@ x_focus_on_frame (f) | |||
| 9096 | } | 8849 | } |
| 9097 | 8850 | ||
| 9098 | void | 8851 | void |
| 9099 | x_unfocus_frame (f) | 8852 | x_unfocus_frame (struct frame *f) |
| 9100 | struct frame *f; | ||
| 9101 | { | 8853 | { |
| 9102 | #if 0 | 8854 | #if 0 |
| 9103 | /* Look at the remarks in x_focus_on_frame. */ | 8855 | /* Look at the remarks in x_focus_on_frame. */ |
| @@ -9110,8 +8862,7 @@ x_unfocus_frame (f) | |||
| 9110 | /* Raise frame F. */ | 8862 | /* Raise frame F. */ |
| 9111 | 8863 | ||
| 9112 | void | 8864 | void |
| 9113 | x_raise_frame (f) | 8865 | x_raise_frame (struct frame *f) |
| 9114 | struct frame *f; | ||
| 9115 | { | 8866 | { |
| 9116 | BLOCK_INPUT; | 8867 | BLOCK_INPUT; |
| 9117 | if (f->async_visible) | 8868 | if (f->async_visible) |
| @@ -9124,8 +8875,7 @@ x_raise_frame (f) | |||
| 9124 | /* Lower frame F. */ | 8875 | /* Lower frame F. */ |
| 9125 | 8876 | ||
| 9126 | void | 8877 | void |
| 9127 | x_lower_frame (f) | 8878 | x_lower_frame (struct frame *f) |
| 9128 | struct frame *f; | ||
| 9129 | { | 8879 | { |
| 9130 | if (f->async_visible) | 8880 | if (f->async_visible) |
| 9131 | { | 8881 | { |
| @@ -9139,8 +8889,7 @@ x_lower_frame (f) | |||
| 9139 | /* Activate frame with Extended Window Manager Hints */ | 8889 | /* Activate frame with Extended Window Manager Hints */ |
| 9140 | 8890 | ||
| 9141 | void | 8891 | void |
| 9142 | x_ewmh_activate_frame (f) | 8892 | x_ewmh_activate_frame (FRAME_PTR f) |
| 9143 | FRAME_PTR f; | ||
| 9144 | { | 8893 | { |
| 9145 | /* See Window Manager Specification/Extended Window Manager Hints at | 8894 | /* See Window Manager Specification/Extended Window Manager Hints at |
| 9146 | http://freedesktop.org/wiki/Specifications/wm-spec */ | 8895 | http://freedesktop.org/wiki/Specifications/wm-spec */ |
| @@ -9160,9 +8909,7 @@ x_ewmh_activate_frame (f) | |||
| 9160 | } | 8909 | } |
| 9161 | 8910 | ||
| 9162 | static void | 8911 | static void |
| 9163 | XTframe_raise_lower (f, raise_flag) | 8912 | XTframe_raise_lower (FRAME_PTR f, int raise_flag) |
| 9164 | FRAME_PTR f; | ||
| 9165 | int raise_flag; | ||
| 9166 | { | 8913 | { |
| 9167 | if (raise_flag) | 8914 | if (raise_flag) |
| 9168 | x_raise_frame (f); | 8915 | x_raise_frame (f); |
| @@ -9173,9 +8920,7 @@ XTframe_raise_lower (f, raise_flag) | |||
| 9173 | /* XEmbed implementation. */ | 8920 | /* XEmbed implementation. */ |
| 9174 | 8921 | ||
| 9175 | void | 8922 | void |
| 9176 | xembed_set_info (f, flags) | 8923 | xembed_set_info (struct frame *f, enum xembed_info flags) |
| 9177 | struct frame *f; | ||
| 9178 | enum xembed_info flags; | ||
| 9179 | { | 8924 | { |
| 9180 | Atom atom; | 8925 | Atom atom; |
| 9181 | unsigned long data[2]; | 8926 | unsigned long data[2]; |
| @@ -9190,13 +8935,7 @@ xembed_set_info (f, flags) | |||
| 9190 | } | 8935 | } |
| 9191 | 8936 | ||
| 9192 | void | 8937 | void |
| 9193 | xembed_send_message (f, time, message, detail, data1, data2) | 8938 | xembed_send_message (struct frame *f, Time time, enum xembed_message message, long int detail, long int data1, long int data2) |
| 9194 | struct frame *f; | ||
| 9195 | Time time; | ||
| 9196 | enum xembed_message message; | ||
| 9197 | long detail; | ||
| 9198 | long data1; | ||
| 9199 | long data2; | ||
| 9200 | { | 8939 | { |
| 9201 | XEvent event; | 8940 | XEvent event; |
| 9202 | 8941 | ||
| @@ -9225,8 +8964,7 @@ xembed_send_message (f, time, message, detail, data1, data2) | |||
| 9225 | finishes with it. */ | 8964 | finishes with it. */ |
| 9226 | 8965 | ||
| 9227 | void | 8966 | void |
| 9228 | x_make_frame_visible (f) | 8967 | x_make_frame_visible (struct frame *f) |
| 9229 | struct frame *f; | ||
| 9230 | { | 8968 | { |
| 9231 | Lisp_Object type; | 8969 | Lisp_Object type; |
| 9232 | int original_top, original_left; | 8970 | int original_top, original_left; |
| @@ -9389,8 +9127,7 @@ x_make_frame_visible (f) | |||
| 9389 | /* Make the frame visible (mapped and not iconified). */ | 9127 | /* Make the frame visible (mapped and not iconified). */ |
| 9390 | 9128 | ||
| 9391 | void | 9129 | void |
| 9392 | x_make_frame_invisible (f) | 9130 | x_make_frame_invisible (struct frame *f) |
| 9393 | struct frame *f; | ||
| 9394 | { | 9131 | { |
| 9395 | Window window; | 9132 | Window window; |
| 9396 | 9133 | ||
| @@ -9447,8 +9184,7 @@ x_make_frame_invisible (f) | |||
| 9447 | /* Change window state from mapped to iconified. */ | 9184 | /* Change window state from mapped to iconified. */ |
| 9448 | 9185 | ||
| 9449 | void | 9186 | void |
| 9450 | x_iconify_frame (f) | 9187 | x_iconify_frame (struct frame *f) |
| 9451 | struct frame *f; | ||
| 9452 | { | 9188 | { |
| 9453 | int result; | 9189 | int result; |
| 9454 | Lisp_Object type; | 9190 | Lisp_Object type; |
| @@ -9574,8 +9310,7 @@ x_iconify_frame (f) | |||
| 9574 | /* Free X resources of frame F. */ | 9310 | /* Free X resources of frame F. */ |
| 9575 | 9311 | ||
| 9576 | void | 9312 | void |
| 9577 | x_free_frame_resources (f) | 9313 | x_free_frame_resources (struct frame *f) |
| 9578 | struct frame *f; | ||
| 9579 | { | 9314 | { |
| 9580 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 9315 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 9581 | Lisp_Object bar; | 9316 | Lisp_Object bar; |
| @@ -9698,8 +9433,7 @@ x_free_frame_resources (f) | |||
| 9698 | /* Destroy the X window of frame F. */ | 9433 | /* Destroy the X window of frame F. */ |
| 9699 | 9434 | ||
| 9700 | void | 9435 | void |
| 9701 | x_destroy_window (f) | 9436 | x_destroy_window (struct frame *f) |
| 9702 | struct frame *f; | ||
| 9703 | { | 9437 | { |
| 9704 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 9438 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 9705 | 9439 | ||
| @@ -9826,9 +9560,7 @@ x_wm_set_size_hint (f, flags, user_position) | |||
| 9826 | /* Used for IconicState or NormalState */ | 9560 | /* Used for IconicState or NormalState */ |
| 9827 | 9561 | ||
| 9828 | void | 9562 | void |
| 9829 | x_wm_set_window_state (f, state) | 9563 | x_wm_set_window_state (struct frame *f, int state) |
| 9830 | struct frame *f; | ||
| 9831 | int state; | ||
| 9832 | { | 9564 | { |
| 9833 | #ifdef USE_X_TOOLKIT | 9565 | #ifdef USE_X_TOOLKIT |
| 9834 | Arg al[1]; | 9566 | Arg al[1]; |
| @@ -9846,9 +9578,7 @@ x_wm_set_window_state (f, state) | |||
| 9846 | } | 9578 | } |
| 9847 | 9579 | ||
| 9848 | void | 9580 | void |
| 9849 | x_wm_set_icon_pixmap (f, pixmap_id) | 9581 | x_wm_set_icon_pixmap (struct frame *f, int pixmap_id) |
| 9850 | struct frame *f; | ||
| 9851 | int pixmap_id; | ||
| 9852 | { | 9582 | { |
| 9853 | Pixmap icon_pixmap, icon_mask; | 9583 | Pixmap icon_pixmap, icon_mask; |
| 9854 | 9584 | ||
| @@ -9896,9 +9626,7 @@ x_wm_set_icon_pixmap (f, pixmap_id) | |||
| 9896 | } | 9626 | } |
| 9897 | 9627 | ||
| 9898 | void | 9628 | void |
| 9899 | x_wm_set_icon_position (f, icon_x, icon_y) | 9629 | x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y) |
| 9900 | struct frame *f; | ||
| 9901 | int icon_x, icon_y; | ||
| 9902 | { | 9630 | { |
| 9903 | Window window = FRAME_OUTER_WINDOW (f); | 9631 | Window window = FRAME_OUTER_WINDOW (f); |
| 9904 | 9632 | ||
| @@ -9971,8 +9699,7 @@ static int x_session_initialized; | |||
| 9971 | /* Test whether two display-name strings agree up to the dot that separates | 9699 | /* Test whether two display-name strings agree up to the dot that separates |
| 9972 | the screen number from the server number. */ | 9700 | the screen number from the server number. */ |
| 9973 | static int | 9701 | static int |
| 9974 | same_x_server (name1, name2) | 9702 | same_x_server (const char *name1, const char *name2) |
| 9975 | const char *name1, *name2; | ||
| 9976 | { | 9703 | { |
| 9977 | int seen_colon = 0; | 9704 | int seen_colon = 0; |
| 9978 | const unsigned char *system_name = SDATA (Vsystem_name); | 9705 | const unsigned char *system_name = SDATA (Vsystem_name); |
| @@ -10019,10 +9746,7 @@ same_x_server (name1, name2) | |||
| 10019 | get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET | 9746 | get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET |
| 10020 | to 5. */ | 9747 | to 5. */ |
| 10021 | static void | 9748 | static void |
| 10022 | get_bits_and_offset (mask, bits, offset) | 9749 | get_bits_and_offset (long unsigned int mask, int *bits, int *offset) |
| 10023 | unsigned long mask; | ||
| 10024 | int *bits; | ||
| 10025 | int *offset; | ||
| 10026 | { | 9750 | { |
| 10027 | int nr = 0; | 9751 | int nr = 0; |
| 10028 | int off = 0; | 9752 | int off = 0; |
| @@ -10047,8 +9771,7 @@ get_bits_and_offset (mask, bits, offset) | |||
| 10047 | But don't permanently open it, just test its availability. */ | 9771 | But don't permanently open it, just test its availability. */ |
| 10048 | 9772 | ||
| 10049 | int | 9773 | int |
| 10050 | x_display_ok (display) | 9774 | x_display_ok (const char *display) |
| 10051 | const char *display; | ||
| 10052 | { | 9775 | { |
| 10053 | int dpy_ok = 1; | 9776 | int dpy_ok = 1; |
| 10054 | Display *dpy; | 9777 | Display *dpy; |
| @@ -10063,11 +9786,7 @@ x_display_ok (display) | |||
| 10063 | 9786 | ||
| 10064 | #ifdef USE_GTK | 9787 | #ifdef USE_GTK |
| 10065 | static void | 9788 | static void |
| 10066 | my_log_handler (log_domain, log_level, message, user_data) | 9789 | my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) |
| 10067 | const gchar *log_domain; | ||
| 10068 | GLogLevelFlags log_level; | ||
| 10069 | const gchar *message; | ||
| 10070 | gpointer user_data; | ||
| 10071 | { | 9790 | { |
| 10072 | if (!strstr (message, "g_set_prgname")) | 9791 | if (!strstr (message, "g_set_prgname")) |
| 10073 | fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message); | 9792 | fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message); |
| @@ -10079,10 +9798,7 @@ my_log_handler (log_domain, log_level, message, user_data) | |||
| 10079 | If we cannot contact the display, return null. */ | 9798 | If we cannot contact the display, return null. */ |
| 10080 | 9799 | ||
| 10081 | struct x_display_info * | 9800 | struct x_display_info * |
| 10082 | x_term_init (display_name, xrm_option, resource_name) | 9801 | x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) |
| 10083 | Lisp_Object display_name; | ||
| 10084 | char *xrm_option; | ||
| 10085 | char *resource_name; | ||
| 10086 | { | 9802 | { |
| 10087 | int connection; | 9803 | int connection; |
| 10088 | Display *dpy; | 9804 | Display *dpy; |
| @@ -10610,8 +10326,7 @@ x_term_init (display_name, xrm_option, resource_name) | |||
| 10610 | and without sending any more commands to the X server. */ | 10326 | and without sending any more commands to the X server. */ |
| 10611 | 10327 | ||
| 10612 | void | 10328 | void |
| 10613 | x_delete_display (dpyinfo) | 10329 | x_delete_display (struct x_display_info *dpyinfo) |
| 10614 | struct x_display_info *dpyinfo; | ||
| 10615 | { | 10330 | { |
| 10616 | struct terminal *t; | 10331 | struct terminal *t; |
| 10617 | 10332 | ||
| @@ -10880,7 +10595,7 @@ x_create_terminal (struct x_display_info *dpyinfo) | |||
| 10880 | } | 10595 | } |
| 10881 | 10596 | ||
| 10882 | void | 10597 | void |
| 10883 | x_initialize () | 10598 | x_initialize (void) |
| 10884 | { | 10599 | { |
| 10885 | baud_rate = 19200; | 10600 | baud_rate = 19200; |
| 10886 | 10601 | ||
| @@ -10938,7 +10653,7 @@ x_initialize () | |||
| 10938 | 10653 | ||
| 10939 | 10654 | ||
| 10940 | void | 10655 | void |
| 10941 | syms_of_xterm () | 10656 | syms_of_xterm (void) |
| 10942 | { | 10657 | { |
| 10943 | x_error_message = NULL; | 10658 | x_error_message = NULL; |
| 10944 | 10659 | ||