diff options
| author | Juanma Barranquero | 2010-07-05 12:36:06 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-05 12:36:06 +0200 |
| commit | d3da34e0dab1404e80dba5413b3c449a6ea8fa0c (patch) | |
| tree | c24d736f75b63d4abb1b8ddd49b088632ccd8aee /src/eval.c | |
| parent | 00be444c737e95c7455aa1808d9da75d4affd51f (diff) | |
| download | emacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.tar.gz emacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.zip | |
Convert most remaining function definitions to standard C.
* buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c,
* xdisp.c: Convert function definitions to standard C.
* cm.c (cmputc): Arg C is now int, not char.
* process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 160 |
1 files changed, 55 insertions, 105 deletions
diff --git a/src/eval.c b/src/eval.c index 239ee40ab95..84f98c8b22c 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -177,12 +177,12 @@ static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | |||
| 177 | /* "gcc -O3" enables automatic function inlining, which optimizes out | 177 | /* "gcc -O3" enables automatic function inlining, which optimizes out |
| 178 | the arguments for the invocations of these functions, whereas they | 178 | the arguments for the invocations of these functions, whereas they |
| 179 | expect these values on the stack. */ | 179 | expect these values on the stack. */ |
| 180 | Lisp_Object apply1 () __attribute__((noinline)); | 180 | Lisp_Object apply1 (Lisp_Object fn, Lisp_Object arg) __attribute__((noinline)); |
| 181 | Lisp_Object call2 () __attribute__((noinline)); | 181 | Lisp_Object call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) __attribute__((noinline)); |
| 182 | #endif | 182 | #endif |
| 183 | 183 | ||
| 184 | void | 184 | void |
| 185 | init_eval_once () | 185 | init_eval_once (void) |
| 186 | { | 186 | { |
| 187 | specpdl_size = 50; | 187 | specpdl_size = 50; |
| 188 | specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); | 188 | specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); |
| @@ -195,7 +195,7 @@ init_eval_once () | |||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | void | 197 | void |
| 198 | init_eval () | 198 | init_eval (void) |
| 199 | { | 199 | { |
| 200 | specpdl_ptr = specpdl; | 200 | specpdl_ptr = specpdl; |
| 201 | catchlist = 0; | 201 | catchlist = 0; |
| @@ -214,8 +214,7 @@ init_eval () | |||
| 214 | /* unwind-protect function used by call_debugger. */ | 214 | /* unwind-protect function used by call_debugger. */ |
| 215 | 215 | ||
| 216 | static Lisp_Object | 216 | static Lisp_Object |
| 217 | restore_stack_limits (data) | 217 | restore_stack_limits (Lisp_Object data) |
| 218 | Lisp_Object data; | ||
| 219 | { | 218 | { |
| 220 | max_specpdl_size = XINT (XCAR (data)); | 219 | max_specpdl_size = XINT (XCAR (data)); |
| 221 | max_lisp_eval_depth = XINT (XCDR (data)); | 220 | max_lisp_eval_depth = XINT (XCDR (data)); |
| @@ -225,8 +224,7 @@ restore_stack_limits (data) | |||
| 225 | /* Call the Lisp debugger, giving it argument ARG. */ | 224 | /* Call the Lisp debugger, giving it argument ARG. */ |
| 226 | 225 | ||
| 227 | Lisp_Object | 226 | Lisp_Object |
| 228 | call_debugger (arg) | 227 | call_debugger (Lisp_Object arg) |
| 229 | Lisp_Object arg; | ||
| 230 | { | 228 | { |
| 231 | int debug_while_redisplaying; | 229 | int debug_while_redisplaying; |
| 232 | int count = SPECPDL_INDEX (); | 230 | int count = SPECPDL_INDEX (); |
| @@ -282,8 +280,7 @@ call_debugger (arg) | |||
| 282 | } | 280 | } |
| 283 | 281 | ||
| 284 | void | 282 | void |
| 285 | do_debug_on_call (code) | 283 | do_debug_on_call (Lisp_Object code) |
| 286 | Lisp_Object code; | ||
| 287 | { | 284 | { |
| 288 | debug_on_next_call = 0; | 285 | debug_on_next_call = 0; |
| 289 | backtrace_list->debug_on_exit = 1; | 286 | backtrace_list->debug_on_exit = 1; |
| @@ -609,8 +606,7 @@ way to do this), or via (not (or executing-kbd-macro noninteractive)). */) | |||
| 609 | called is a built-in. */ | 606 | called is a built-in. */ |
| 610 | 607 | ||
| 611 | int | 608 | int |
| 612 | interactive_p (exclude_subrs_p) | 609 | interactive_p (int exclude_subrs_p) |
| 613 | int exclude_subrs_p; | ||
| 614 | { | 610 | { |
| 615 | struct backtrace *btp; | 611 | struct backtrace *btp; |
| 616 | Lisp_Object fun; | 612 | Lisp_Object fun; |
| @@ -932,8 +928,7 @@ usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) | |||
| 932 | 928 | ||
| 933 | /* Error handler used in Fuser_variable_p. */ | 929 | /* Error handler used in Fuser_variable_p. */ |
| 934 | static Lisp_Object | 930 | static Lisp_Object |
| 935 | user_variable_p_eh (ignore) | 931 | user_variable_p_eh (Lisp_Object ignore) |
| 936 | Lisp_Object ignore; | ||
| 937 | { | 932 | { |
| 938 | return Qnil; | 933 | return Qnil; |
| 939 | } | 934 | } |
| @@ -1219,10 +1214,7 @@ usage: (catch TAG BODY...) */) | |||
| 1219 | This is how catches are done from within C code. */ | 1214 | This is how catches are done from within C code. */ |
| 1220 | 1215 | ||
| 1221 | Lisp_Object | 1216 | Lisp_Object |
| 1222 | internal_catch (tag, func, arg) | 1217 | internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object arg) |
| 1223 | Lisp_Object tag; | ||
| 1224 | Lisp_Object (*func) (); | ||
| 1225 | Lisp_Object arg; | ||
| 1226 | { | 1218 | { |
| 1227 | /* This structure is made part of the chain `catchlist'. */ | 1219 | /* This structure is made part of the chain `catchlist'. */ |
| 1228 | struct catchtag c; | 1220 | struct catchtag c; |
| @@ -1267,9 +1259,7 @@ internal_catch (tag, func, arg) | |||
| 1267 | This is used for correct unwinding in Fthrow and Fsignal. */ | 1259 | This is used for correct unwinding in Fthrow and Fsignal. */ |
| 1268 | 1260 | ||
| 1269 | static void | 1261 | static void |
| 1270 | unwind_to_catch (catch, value) | 1262 | unwind_to_catch (struct catchtag *catch, Lisp_Object value) |
| 1271 | struct catchtag *catch; | ||
| 1272 | Lisp_Object value; | ||
| 1273 | { | 1263 | { |
| 1274 | register int last_time; | 1264 | register int last_time; |
| 1275 | 1265 | ||
| @@ -1400,9 +1390,8 @@ usage: (condition-case VAR BODYFORM &rest HANDLERS) */) | |||
| 1400 | rather than passed in a list. Used by Fbyte_code. */ | 1390 | rather than passed in a list. Used by Fbyte_code. */ |
| 1401 | 1391 | ||
| 1402 | Lisp_Object | 1392 | Lisp_Object |
| 1403 | internal_lisp_condition_case (var, bodyform, handlers) | 1393 | internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, |
| 1404 | volatile Lisp_Object var; | 1394 | Lisp_Object handlers) |
| 1405 | Lisp_Object bodyform, handlers; | ||
| 1406 | { | 1395 | { |
| 1407 | Lisp_Object val; | 1396 | Lisp_Object val; |
| 1408 | struct catchtag c; | 1397 | struct catchtag c; |
| @@ -1469,10 +1458,8 @@ internal_lisp_condition_case (var, bodyform, handlers) | |||
| 1469 | but allow the debugger to run if that is enabled. */ | 1458 | but allow the debugger to run if that is enabled. */ |
| 1470 | 1459 | ||
| 1471 | Lisp_Object | 1460 | Lisp_Object |
| 1472 | internal_condition_case (bfun, handlers, hfun) | 1461 | internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers, |
| 1473 | Lisp_Object (*bfun) (); | 1462 | Lisp_Object (*hfun) (Lisp_Object)) |
| 1474 | Lisp_Object handlers; | ||
| 1475 | Lisp_Object (*hfun) (); | ||
| 1476 | { | 1463 | { |
| 1477 | Lisp_Object val; | 1464 | Lisp_Object val; |
| 1478 | struct catchtag c; | 1465 | struct catchtag c; |
| @@ -1516,11 +1503,8 @@ internal_condition_case (bfun, handlers, hfun) | |||
| 1516 | /* Like internal_condition_case but call BFUN with ARG as its argument. */ | 1503 | /* Like internal_condition_case but call BFUN with ARG as its argument. */ |
| 1517 | 1504 | ||
| 1518 | Lisp_Object | 1505 | Lisp_Object |
| 1519 | internal_condition_case_1 (bfun, arg, handlers, hfun) | 1506 | internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg, |
| 1520 | Lisp_Object (*bfun) (); | 1507 | Lisp_Object handlers, Lisp_Object (*hfun) (Lisp_Object)) |
| 1521 | Lisp_Object arg; | ||
| 1522 | Lisp_Object handlers; | ||
| 1523 | Lisp_Object (*hfun) (); | ||
| 1524 | { | 1508 | { |
| 1525 | Lisp_Object val; | 1509 | Lisp_Object val; |
| 1526 | struct catchtag c; | 1510 | struct catchtag c; |
| @@ -1790,8 +1774,7 @@ See also the function `condition-case'. */) | |||
| 1790 | Used for anything but Qquit (which can return from Fsignal). */ | 1774 | Used for anything but Qquit (which can return from Fsignal). */ |
| 1791 | 1775 | ||
| 1792 | void | 1776 | void |
| 1793 | xsignal (error_symbol, data) | 1777 | xsignal (Lisp_Object error_symbol, Lisp_Object data) |
| 1794 | Lisp_Object error_symbol, data; | ||
| 1795 | { | 1778 | { |
| 1796 | Fsignal (error_symbol, data); | 1779 | Fsignal (error_symbol, data); |
| 1797 | abort (); | 1780 | abort (); |
| @@ -1800,29 +1783,25 @@ xsignal (error_symbol, data) | |||
| 1800 | /* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */ | 1783 | /* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */ |
| 1801 | 1784 | ||
| 1802 | void | 1785 | void |
| 1803 | xsignal0 (error_symbol) | 1786 | xsignal0 (Lisp_Object error_symbol) |
| 1804 | Lisp_Object error_symbol; | ||
| 1805 | { | 1787 | { |
| 1806 | xsignal (error_symbol, Qnil); | 1788 | xsignal (error_symbol, Qnil); |
| 1807 | } | 1789 | } |
| 1808 | 1790 | ||
| 1809 | void | 1791 | void |
| 1810 | xsignal1 (error_symbol, arg) | 1792 | xsignal1 (Lisp_Object error_symbol, Lisp_Object arg) |
| 1811 | Lisp_Object error_symbol, arg; | ||
| 1812 | { | 1793 | { |
| 1813 | xsignal (error_symbol, list1 (arg)); | 1794 | xsignal (error_symbol, list1 (arg)); |
| 1814 | } | 1795 | } |
| 1815 | 1796 | ||
| 1816 | void | 1797 | void |
| 1817 | xsignal2 (error_symbol, arg1, arg2) | 1798 | xsignal2 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2) |
| 1818 | Lisp_Object error_symbol, arg1, arg2; | ||
| 1819 | { | 1799 | { |
| 1820 | xsignal (error_symbol, list2 (arg1, arg2)); | 1800 | xsignal (error_symbol, list2 (arg1, arg2)); |
| 1821 | } | 1801 | } |
| 1822 | 1802 | ||
| 1823 | void | 1803 | void |
| 1824 | xsignal3 (error_symbol, arg1, arg2, arg3) | 1804 | xsignal3 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| 1825 | Lisp_Object error_symbol, arg1, arg2, arg3; | ||
| 1826 | { | 1805 | { |
| 1827 | xsignal (error_symbol, list3 (arg1, arg2, arg3)); | 1806 | xsignal (error_symbol, list3 (arg1, arg2, arg3)); |
| 1828 | } | 1807 | } |
| @@ -1831,9 +1810,7 @@ xsignal3 (error_symbol, arg1, arg2, arg3) | |||
| 1831 | If ARG is not a genuine list, make it a one-element list. */ | 1810 | If ARG is not a genuine list, make it a one-element list. */ |
| 1832 | 1811 | ||
| 1833 | void | 1812 | void |
| 1834 | signal_error (s, arg) | 1813 | signal_error (char *s, Lisp_Object arg) |
| 1835 | char *s; | ||
| 1836 | Lisp_Object arg; | ||
| 1837 | { | 1814 | { |
| 1838 | Lisp_Object tortoise, hare; | 1815 | Lisp_Object tortoise, hare; |
| 1839 | 1816 | ||
| @@ -1862,8 +1839,7 @@ signal_error (s, arg) | |||
| 1862 | a list containing one of CONDITIONS. */ | 1839 | a list containing one of CONDITIONS. */ |
| 1863 | 1840 | ||
| 1864 | static int | 1841 | static int |
| 1865 | wants_debugger (list, conditions) | 1842 | wants_debugger (Lisp_Object list, Lisp_Object conditions) |
| 1866 | Lisp_Object list, conditions; | ||
| 1867 | { | 1843 | { |
| 1868 | if (NILP (list)) | 1844 | if (NILP (list)) |
| 1869 | return 0; | 1845 | return 0; |
| @@ -1887,8 +1863,7 @@ wants_debugger (list, conditions) | |||
| 1887 | according to debugger-ignored-errors. */ | 1863 | according to debugger-ignored-errors. */ |
| 1888 | 1864 | ||
| 1889 | static int | 1865 | static int |
| 1890 | skip_debugger (conditions, data) | 1866 | skip_debugger (Lisp_Object conditions, Lisp_Object data) |
| 1891 | Lisp_Object conditions, data; | ||
| 1892 | { | 1867 | { |
| 1893 | Lisp_Object tail; | 1868 | Lisp_Object tail; |
| 1894 | int first_string = 1; | 1869 | int first_string = 1; |
| @@ -1925,8 +1900,7 @@ skip_debugger (conditions, data) | |||
| 1925 | SIG and DATA describe the signal, as in find_handler_clause. */ | 1900 | SIG and DATA describe the signal, as in find_handler_clause. */ |
| 1926 | 1901 | ||
| 1927 | static int | 1902 | static int |
| 1928 | maybe_call_debugger (conditions, sig, data) | 1903 | maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) |
| 1929 | Lisp_Object conditions, sig, data; | ||
| 1930 | { | 1904 | { |
| 1931 | Lisp_Object combined_data; | 1905 | Lisp_Object combined_data; |
| 1932 | 1906 | ||
| @@ -1962,8 +1936,8 @@ maybe_call_debugger (conditions, sig, data) | |||
| 1962 | a second error here in case we're handling specpdl overflow. */ | 1936 | a second error here in case we're handling specpdl overflow. */ |
| 1963 | 1937 | ||
| 1964 | static Lisp_Object | 1938 | static Lisp_Object |
| 1965 | find_handler_clause (handlers, conditions, sig, data) | 1939 | find_handler_clause (Lisp_Object handlers, Lisp_Object conditions, |
| 1966 | Lisp_Object handlers, conditions, sig, data; | 1940 | Lisp_Object sig, Lisp_Object data) |
| 1967 | { | 1941 | { |
| 1968 | register Lisp_Object h; | 1942 | register Lisp_Object h; |
| 1969 | register Lisp_Object tem; | 1943 | register Lisp_Object tem; |
| @@ -2205,8 +2179,7 @@ this does nothing and returns nil. */) | |||
| 2205 | } | 2179 | } |
| 2206 | 2180 | ||
| 2207 | Lisp_Object | 2181 | Lisp_Object |
| 2208 | un_autoload (oldqueue) | 2182 | un_autoload (Lisp_Object oldqueue) |
| 2209 | Lisp_Object oldqueue; | ||
| 2210 | { | 2183 | { |
| 2211 | register Lisp_Object queue, first, second; | 2184 | register Lisp_Object queue, first, second; |
| 2212 | 2185 | ||
| @@ -2233,8 +2206,7 @@ un_autoload (oldqueue) | |||
| 2233 | FUNDEF is the autoload definition (a list). */ | 2206 | FUNDEF is the autoload definition (a list). */ |
| 2234 | 2207 | ||
| 2235 | void | 2208 | void |
| 2236 | do_autoload (fundef, funname) | 2209 | do_autoload (Lisp_Object fundef, Lisp_Object funname) |
| 2237 | Lisp_Object fundef, funname; | ||
| 2238 | { | 2210 | { |
| 2239 | int count = SPECPDL_INDEX (); | 2211 | int count = SPECPDL_INDEX (); |
| 2240 | Lisp_Object fun; | 2212 | Lisp_Object fun; |
| @@ -2259,7 +2231,7 @@ do_autoload (fundef, funname) | |||
| 2259 | the function. We do this in the specific case of autoloading | 2231 | the function. We do this in the specific case of autoloading |
| 2260 | because autoloading is not an explicit request "load this file", | 2232 | because autoloading is not an explicit request "load this file", |
| 2261 | but rather a request to "call this function". | 2233 | but rather a request to "call this function". |
| 2262 | 2234 | ||
| 2263 | The value saved here is to be restored into Vautoload_queue. */ | 2235 | The value saved here is to be restored into Vautoload_queue. */ |
| 2264 | record_unwind_protect (un_autoload, Vautoload_queue); | 2236 | record_unwind_protect (un_autoload, Vautoload_queue); |
| 2265 | Vautoload_queue = Qt; | 2237 | Vautoload_queue = Qt; |
| @@ -2682,10 +2654,7 @@ usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) | |||
| 2682 | except that it isn't necessary to gcpro ARGS[0]. */ | 2654 | except that it isn't necessary to gcpro ARGS[0]. */ |
| 2683 | 2655 | ||
| 2684 | static Lisp_Object | 2656 | static Lisp_Object |
| 2685 | run_hook_with_args (nargs, args, cond) | 2657 | run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) |
| 2686 | int nargs; | ||
| 2687 | Lisp_Object *args; | ||
| 2688 | enum run_hooks_condition cond; | ||
| 2689 | { | 2658 | { |
| 2690 | Lisp_Object sym, val, ret; | 2659 | Lisp_Object sym, val, ret; |
| 2691 | struct gcpro gcpro1, gcpro2, gcpro3; | 2660 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -2765,10 +2734,7 @@ run_hook_with_args (nargs, args, cond) | |||
| 2765 | except that it isn't necessary to gcpro ARGS[0]. */ | 2734 | except that it isn't necessary to gcpro ARGS[0]. */ |
| 2766 | 2735 | ||
| 2767 | Lisp_Object | 2736 | Lisp_Object |
| 2768 | run_hook_list_with_args (funlist, nargs, args) | 2737 | run_hook_list_with_args (Lisp_Object funlist, int nargs, Lisp_Object *args) |
| 2769 | Lisp_Object funlist; | ||
| 2770 | int nargs; | ||
| 2771 | Lisp_Object *args; | ||
| 2772 | { | 2738 | { |
| 2773 | Lisp_Object sym; | 2739 | Lisp_Object sym; |
| 2774 | Lisp_Object val; | 2740 | Lisp_Object val; |
| @@ -2810,8 +2776,7 @@ run_hook_list_with_args (funlist, nargs, args) | |||
| 2810 | /* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ | 2776 | /* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ |
| 2811 | 2777 | ||
| 2812 | void | 2778 | void |
| 2813 | run_hook_with_args_2 (hook, arg1, arg2) | 2779 | run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2) |
| 2814 | Lisp_Object hook, arg1, arg2; | ||
| 2815 | { | 2780 | { |
| 2816 | Lisp_Object temp[3]; | 2781 | Lisp_Object temp[3]; |
| 2817 | temp[0] = hook; | 2782 | temp[0] = hook; |
| @@ -2823,8 +2788,7 @@ run_hook_with_args_2 (hook, arg1, arg2) | |||
| 2823 | 2788 | ||
| 2824 | /* Apply fn to arg */ | 2789 | /* Apply fn to arg */ |
| 2825 | Lisp_Object | 2790 | Lisp_Object |
| 2826 | apply1 (fn, arg) | 2791 | apply1 (Lisp_Object fn, Lisp_Object arg) |
| 2827 | Lisp_Object fn, arg; | ||
| 2828 | { | 2792 | { |
| 2829 | struct gcpro gcpro1; | 2793 | struct gcpro gcpro1; |
| 2830 | 2794 | ||
| @@ -2843,8 +2807,7 @@ apply1 (fn, arg) | |||
| 2843 | 2807 | ||
| 2844 | /* Call function fn on no arguments */ | 2808 | /* Call function fn on no arguments */ |
| 2845 | Lisp_Object | 2809 | Lisp_Object |
| 2846 | call0 (fn) | 2810 | call0 (Lisp_Object fn) |
| 2847 | Lisp_Object fn; | ||
| 2848 | { | 2811 | { |
| 2849 | struct gcpro gcpro1; | 2812 | struct gcpro gcpro1; |
| 2850 | 2813 | ||
| @@ -2855,8 +2818,7 @@ call0 (fn) | |||
| 2855 | /* Call function fn with 1 argument arg1 */ | 2818 | /* Call function fn with 1 argument arg1 */ |
| 2856 | /* ARGSUSED */ | 2819 | /* ARGSUSED */ |
| 2857 | Lisp_Object | 2820 | Lisp_Object |
| 2858 | call1 (fn, arg1) | 2821 | call1 (Lisp_Object fn, Lisp_Object arg1) |
| 2859 | Lisp_Object fn, arg1; | ||
| 2860 | { | 2822 | { |
| 2861 | struct gcpro gcpro1; | 2823 | struct gcpro gcpro1; |
| 2862 | Lisp_Object args[2]; | 2824 | Lisp_Object args[2]; |
| @@ -2871,8 +2833,7 @@ call1 (fn, arg1) | |||
| 2871 | /* Call function fn with 2 arguments arg1, arg2 */ | 2833 | /* Call function fn with 2 arguments arg1, arg2 */ |
| 2872 | /* ARGSUSED */ | 2834 | /* ARGSUSED */ |
| 2873 | Lisp_Object | 2835 | Lisp_Object |
| 2874 | call2 (fn, arg1, arg2) | 2836 | call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) |
| 2875 | Lisp_Object fn, arg1, arg2; | ||
| 2876 | { | 2837 | { |
| 2877 | struct gcpro gcpro1; | 2838 | struct gcpro gcpro1; |
| 2878 | Lisp_Object args[3]; | 2839 | Lisp_Object args[3]; |
| @@ -2887,8 +2848,7 @@ call2 (fn, arg1, arg2) | |||
| 2887 | /* Call function fn with 3 arguments arg1, arg2, arg3 */ | 2848 | /* Call function fn with 3 arguments arg1, arg2, arg3 */ |
| 2888 | /* ARGSUSED */ | 2849 | /* ARGSUSED */ |
| 2889 | Lisp_Object | 2850 | Lisp_Object |
| 2890 | call3 (fn, arg1, arg2, arg3) | 2851 | call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| 2891 | Lisp_Object fn, arg1, arg2, arg3; | ||
| 2892 | { | 2852 | { |
| 2893 | struct gcpro gcpro1; | 2853 | struct gcpro gcpro1; |
| 2894 | Lisp_Object args[4]; | 2854 | Lisp_Object args[4]; |
| @@ -2904,8 +2864,8 @@ call3 (fn, arg1, arg2, arg3) | |||
| 2904 | /* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ | 2864 | /* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ |
| 2905 | /* ARGSUSED */ | 2865 | /* ARGSUSED */ |
| 2906 | Lisp_Object | 2866 | Lisp_Object |
| 2907 | call4 (fn, arg1, arg2, arg3, arg4) | 2867 | call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| 2908 | Lisp_Object fn, arg1, arg2, arg3, arg4; | 2868 | Lisp_Object arg4) |
| 2909 | { | 2869 | { |
| 2910 | struct gcpro gcpro1; | 2870 | struct gcpro gcpro1; |
| 2911 | Lisp_Object args[5]; | 2871 | Lisp_Object args[5]; |
| @@ -2922,8 +2882,8 @@ call4 (fn, arg1, arg2, arg3, arg4) | |||
| 2922 | /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ | 2882 | /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ |
| 2923 | /* ARGSUSED */ | 2883 | /* ARGSUSED */ |
| 2924 | Lisp_Object | 2884 | Lisp_Object |
| 2925 | call5 (fn, arg1, arg2, arg3, arg4, arg5) | 2885 | call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| 2926 | Lisp_Object fn, arg1, arg2, arg3, arg4, arg5; | 2886 | Lisp_Object arg4, Lisp_Object arg5) |
| 2927 | { | 2887 | { |
| 2928 | struct gcpro gcpro1; | 2888 | struct gcpro gcpro1; |
| 2929 | Lisp_Object args[6]; | 2889 | Lisp_Object args[6]; |
| @@ -2941,8 +2901,8 @@ call5 (fn, arg1, arg2, arg3, arg4, arg5) | |||
| 2941 | /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ | 2901 | /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ |
| 2942 | /* ARGSUSED */ | 2902 | /* ARGSUSED */ |
| 2943 | Lisp_Object | 2903 | Lisp_Object |
| 2944 | call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) | 2904 | call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| 2945 | Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6; | 2905 | Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6) |
| 2946 | { | 2906 | { |
| 2947 | struct gcpro gcpro1; | 2907 | struct gcpro gcpro1; |
| 2948 | Lisp_Object args[7]; | 2908 | Lisp_Object args[7]; |
| @@ -2961,8 +2921,8 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) | |||
| 2961 | /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ | 2921 | /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ |
| 2962 | /* ARGSUSED */ | 2922 | /* ARGSUSED */ |
| 2963 | Lisp_Object | 2923 | Lisp_Object |
| 2964 | call7 (fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7) | 2924 | call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| 2965 | Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7; | 2925 | Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6, Lisp_Object arg7) |
| 2966 | { | 2926 | { |
| 2967 | struct gcpro gcpro1; | 2927 | struct gcpro gcpro1; |
| 2968 | Lisp_Object args[8]; | 2928 | Lisp_Object args[8]; |
| @@ -3147,9 +3107,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 3147 | } | 3107 | } |
| 3148 | 3108 | ||
| 3149 | Lisp_Object | 3109 | Lisp_Object |
| 3150 | apply_lambda (fun, args, eval_flag) | 3110 | apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag) |
| 3151 | Lisp_Object fun, args; | ||
| 3152 | int eval_flag; | ||
| 3153 | { | 3111 | { |
| 3154 | Lisp_Object args_left; | 3112 | Lisp_Object args_left; |
| 3155 | Lisp_Object numargs; | 3113 | Lisp_Object numargs; |
| @@ -3196,10 +3154,7 @@ apply_lambda (fun, args, eval_flag) | |||
| 3196 | FUN must be either a lambda-expression or a compiled-code object. */ | 3154 | FUN must be either a lambda-expression or a compiled-code object. */ |
| 3197 | 3155 | ||
| 3198 | static Lisp_Object | 3156 | static Lisp_Object |
| 3199 | funcall_lambda (fun, nargs, arg_vector) | 3157 | funcall_lambda (Lisp_Object fun, int nargs, register Lisp_Object *arg_vector) |
| 3200 | Lisp_Object fun; | ||
| 3201 | int nargs; | ||
| 3202 | register Lisp_Object *arg_vector; | ||
| 3203 | { | 3158 | { |
| 3204 | Lisp_Object val, syms_left, next; | 3159 | Lisp_Object val, syms_left, next; |
| 3205 | int count = SPECPDL_INDEX (); | 3160 | int count = SPECPDL_INDEX (); |
| @@ -3291,7 +3246,7 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, | |||
| 3291 | } | 3246 | } |
| 3292 | 3247 | ||
| 3293 | void | 3248 | void |
| 3294 | grow_specpdl () | 3249 | grow_specpdl (void) |
| 3295 | { | 3250 | { |
| 3296 | register int count = SPECPDL_INDEX (); | 3251 | register int count = SPECPDL_INDEX (); |
| 3297 | if (specpdl_size >= max_specpdl_size) | 3252 | if (specpdl_size >= max_specpdl_size) |
| @@ -3324,8 +3279,7 @@ grow_specpdl () | |||
| 3324 | BUFFER did not yet have a buffer-local value). */ | 3279 | BUFFER did not yet have a buffer-local value). */ |
| 3325 | 3280 | ||
| 3326 | void | 3281 | void |
| 3327 | specbind (symbol, value) | 3282 | specbind (Lisp_Object symbol, Lisp_Object value) |
| 3328 | Lisp_Object symbol, value; | ||
| 3329 | { | 3283 | { |
| 3330 | struct Lisp_Symbol *sym; | 3284 | struct Lisp_Symbol *sym; |
| 3331 | 3285 | ||
| @@ -3423,9 +3377,7 @@ specbind (symbol, value) | |||
| 3423 | } | 3377 | } |
| 3424 | 3378 | ||
| 3425 | void | 3379 | void |
| 3426 | record_unwind_protect (function, arg) | 3380 | record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg) |
| 3427 | Lisp_Object (*function) (Lisp_Object); | ||
| 3428 | Lisp_Object arg; | ||
| 3429 | { | 3381 | { |
| 3430 | eassert (!handling_signal); | 3382 | eassert (!handling_signal); |
| 3431 | 3383 | ||
| @@ -3438,9 +3390,7 @@ record_unwind_protect (function, arg) | |||
| 3438 | } | 3390 | } |
| 3439 | 3391 | ||
| 3440 | Lisp_Object | 3392 | Lisp_Object |
| 3441 | unbind_to (count, value) | 3393 | unbind_to (int count, Lisp_Object value) |
| 3442 | int count; | ||
| 3443 | Lisp_Object value; | ||
| 3444 | { | 3394 | { |
| 3445 | Lisp_Object quitf = Vquit_flag; | 3395 | Lisp_Object quitf = Vquit_flag; |
| 3446 | struct gcpro gcpro1, gcpro2; | 3396 | struct gcpro gcpro1, gcpro2; |
| @@ -3623,7 +3573,7 @@ If NFRAMES is more than the number of frames, the value is nil. */) | |||
| 3623 | 3573 | ||
| 3624 | 3574 | ||
| 3625 | void | 3575 | void |
| 3626 | mark_backtrace () | 3576 | mark_backtrace (void) |
| 3627 | { | 3577 | { |
| 3628 | register struct backtrace *backlist; | 3578 | register struct backtrace *backlist; |
| 3629 | register int i; | 3579 | register int i; |
| @@ -3642,7 +3592,7 @@ mark_backtrace () | |||
| 3642 | } | 3592 | } |
| 3643 | 3593 | ||
| 3644 | void | 3594 | void |
| 3645 | syms_of_eval () | 3595 | syms_of_eval (void) |
| 3646 | { | 3596 | { |
| 3647 | DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, | 3597 | DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, |
| 3648 | doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. | 3598 | doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. |