diff options
| author | Paul Eggert | 2011-06-14 11:57:19 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-14 11:57:19 -0700 |
| commit | f66c7cf8f794d6f7fd9ccb8794ffc519e4e89795 (patch) | |
| tree | 0de26b21c827049c7fa2485204ecf0e2d632b849 /src | |
| parent | a1759b76246a21c7c07dc2ee00b8db792715104c (diff) | |
| download | emacs-f66c7cf8f794d6f7fd9ccb8794ffc519e4e89795.tar.gz emacs-f66c7cf8f794d6f7fd9ccb8794ffc519e4e89795.zip | |
Variadic C functions now count arguments with ptrdiff_t.
This partly undoes my 2011-03-30 change, which replaced int with size_t.
Back then I didn't know that the Emacs coding style prefers signed int.
Also, in the meantime I found a few more instances where arguments
were being counted with int, which may truncate counts on 64-bit
machines, or EMACS_INT, which may be unnecessarily wide.
* lisp.h (struct Lisp_Subr.function.aMANY)
(DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
Arg counts are now ptrdiff_t, not size_t.
All variadic functions and their callers changed accordingly.
(struct gcpro.nvars): Now size_t, not size_t. All uses changed.
* bytecode.c (exec_byte_code): Check maxdepth for overflow,
to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
* callint.c (Fcall_interactively): Check arg count for overflow,
to avoid potential buffer overrun. Use signed char, not 'int',
for 'varies' array, so that we needn't bother to check its size
calculation for overflow.
* editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
* eval.c (apply_lambda):
* fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
(struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
(mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/alloc.c | 16 | ||||
| -rw-r--r-- | src/bytecode.c | 14 | ||||
| -rw-r--r-- | src/callint.c | 12 | ||||
| -rw-r--r-- | src/callproc.c | 12 | ||||
| -rw-r--r-- | src/character.c | 8 | ||||
| -rw-r--r-- | src/charset.c | 6 | ||||
| -rw-r--r-- | src/coding.c | 8 | ||||
| -rw-r--r-- | src/data.c | 34 | ||||
| -rw-r--r-- | src/dbusbind.c | 50 | ||||
| -rw-r--r-- | src/editfns.c | 34 | ||||
| -rw-r--r-- | src/eval.c | 55 | ||||
| -rw-r--r-- | src/fns.c | 37 | ||||
| -rw-r--r-- | src/font.c | 4 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 16 | ||||
| -rw-r--r-- | src/process.c | 12 | ||||
| -rw-r--r-- | src/xdisp.c | 4 |
19 files changed, 188 insertions, 161 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e4e95ba5aa0..dc8f983c870 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,28 @@ | |||
| 1 | 2011-06-14 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Variadic C functions now count arguments with ptrdiff_t. | ||
| 4 | This partly undoes my 2011-03-30 change, which replaced int with size_t. | ||
| 5 | Back then I didn't know that the Emacs coding style prefers signed int. | ||
| 6 | Also, in the meantime I found a few more instances where arguments | ||
| 7 | were being counted with int, which may be too narrow, or EMACS_INT, which | ||
| 8 | may be too wide. | ||
| 9 | * lisp.h (struct Lisp_Subr.function.aMANY) | ||
| 10 | (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): | ||
| 11 | Arg counts are now ptrdiff_t, not size_t. | ||
| 12 | All variadic functions and their callers changed accordingly. | ||
| 13 | (struct gcpro.nvars): Now size_t, not size_t. All uses changed. | ||
| 14 | * bytecode.c (exec_byte_code): Check maxdepth for overflow, | ||
| 15 | to avoid potential buffer overrun. Don't assume arg counts fit in 'int'. | ||
| 16 | * callint.c (Fcall_interactively): Check arg count for overflow, | ||
| 17 | to avoid potential buffer overrun. Use signed char, not 'int', | ||
| 18 | for 'varies' array, so that we needn't bother to check its size | ||
| 19 | calculation for overflow. | ||
| 20 | * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args. | ||
| 21 | * eval.c (apply_lambda): | ||
| 22 | * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length. | ||
| 23 | (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed. | ||
| 24 | (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args. | ||
| 25 | |||
| 3 | * callint.c (Fcall_interactively): Don't use index var as event count. | 26 | * callint.c (Fcall_interactively): Don't use index var as event count. |
| 4 | 27 | ||
| 5 | * vm-limit.c (check_memory_limits): Fix incorrect extern function decls. | 28 | * vm-limit.c (check_memory_limits): Fix incorrect extern function decls. |
diff --git a/src/alloc.c b/src/alloc.c index fd2884af1c3..56e8eb4d465 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2697,7 +2697,7 @@ DEFUN ("list", Flist, Slist, 0, MANY, 0, | |||
| 2697 | doc: /* Return a newly created list with specified arguments as elements. | 2697 | doc: /* Return a newly created list with specified arguments as elements. |
| 2698 | Any number of arguments, even zero arguments, are allowed. | 2698 | Any number of arguments, even zero arguments, are allowed. |
| 2699 | usage: (list &rest OBJECTS) */) | 2699 | usage: (list &rest OBJECTS) */) |
| 2700 | (size_t nargs, register Lisp_Object *args) | 2700 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2701 | { | 2701 | { |
| 2702 | register Lisp_Object val; | 2702 | register Lisp_Object val; |
| 2703 | val = Qnil; | 2703 | val = Qnil; |
| @@ -2913,10 +2913,10 @@ DEFUN ("vector", Fvector, Svector, 0, MANY, 0, | |||
| 2913 | doc: /* Return a newly created vector with specified arguments as elements. | 2913 | doc: /* Return a newly created vector with specified arguments as elements. |
| 2914 | Any number of arguments, even zero arguments, are allowed. | 2914 | Any number of arguments, even zero arguments, are allowed. |
| 2915 | usage: (vector &rest OBJECTS) */) | 2915 | usage: (vector &rest OBJECTS) */) |
| 2916 | (register size_t nargs, Lisp_Object *args) | 2916 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2917 | { | 2917 | { |
| 2918 | register Lisp_Object len, val; | 2918 | register Lisp_Object len, val; |
| 2919 | register size_t i; | 2919 | ptrdiff_t i; |
| 2920 | register struct Lisp_Vector *p; | 2920 | register struct Lisp_Vector *p; |
| 2921 | 2921 | ||
| 2922 | XSETFASTINT (len, nargs); | 2922 | XSETFASTINT (len, nargs); |
| @@ -2944,15 +2944,15 @@ argument to catch the left-over arguments. If such an integer is used, the | |||
| 2944 | arguments will not be dynamically bound but will be instead pushed on the | 2944 | arguments will not be dynamically bound but will be instead pushed on the |
| 2945 | stack before executing the byte-code. | 2945 | stack before executing the byte-code. |
| 2946 | usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) | 2946 | usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) |
| 2947 | (register size_t nargs, Lisp_Object *args) | 2947 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2948 | { | 2948 | { |
| 2949 | register Lisp_Object len, val; | 2949 | register Lisp_Object len, val; |
| 2950 | register size_t i; | 2950 | ptrdiff_t i; |
| 2951 | register struct Lisp_Vector *p; | 2951 | register struct Lisp_Vector *p; |
| 2952 | 2952 | ||
| 2953 | XSETFASTINT (len, nargs); | 2953 | XSETFASTINT (len, nargs); |
| 2954 | if (!NILP (Vpurify_flag)) | 2954 | if (!NILP (Vpurify_flag)) |
| 2955 | val = make_pure_vector ((EMACS_INT) nargs); | 2955 | val = make_pure_vector (nargs); |
| 2956 | else | 2956 | else |
| 2957 | val = Fmake_vector (len, Qnil); | 2957 | val = Fmake_vector (len, Qnil); |
| 2958 | 2958 | ||
| @@ -4238,7 +4238,7 @@ static void | |||
| 4238 | check_gcpros (void) | 4238 | check_gcpros (void) |
| 4239 | { | 4239 | { |
| 4240 | struct gcpro *p; | 4240 | struct gcpro *p; |
| 4241 | size_t i; | 4241 | ptrdiff_t i; |
| 4242 | 4242 | ||
| 4243 | for (p = gcprolist; p; p = p->next) | 4243 | for (p = gcprolist; p; p = p->next) |
| 4244 | for (i = 0; i < p->nvars; ++i) | 4244 | for (i = 0; i < p->nvars; ++i) |
| @@ -4848,7 +4848,7 @@ returns nil, because real GC can't be done. */) | |||
| 4848 | { | 4848 | { |
| 4849 | register struct specbinding *bind; | 4849 | register struct specbinding *bind; |
| 4850 | char stack_top_variable; | 4850 | char stack_top_variable; |
| 4851 | register size_t i; | 4851 | ptrdiff_t i; |
| 4852 | int message_p; | 4852 | int message_p; |
| 4853 | Lisp_Object total[8]; | 4853 | Lisp_Object total[8]; |
| 4854 | int count = SPECPDL_INDEX (); | 4854 | int count = SPECPDL_INDEX (); |
diff --git a/src/bytecode.c b/src/bytecode.c index 74cf401bf1d..adc9352fb6e 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -433,7 +433,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 433 | 433 | ||
| 434 | Lisp_Object | 434 | Lisp_Object |
| 435 | exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | 435 | exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, |
| 436 | Lisp_Object args_template, int nargs, Lisp_Object *args) | 436 | Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args) |
| 437 | { | 437 | { |
| 438 | int count = SPECPDL_INDEX (); | 438 | int count = SPECPDL_INDEX (); |
| 439 | #ifdef BYTE_CODE_METER | 439 | #ifdef BYTE_CODE_METER |
| @@ -464,7 +464,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 464 | 464 | ||
| 465 | CHECK_STRING (bytestr); | 465 | CHECK_STRING (bytestr); |
| 466 | CHECK_VECTOR (vector); | 466 | CHECK_VECTOR (vector); |
| 467 | CHECK_NUMBER (maxdepth); | 467 | CHECK_NATNUM (maxdepth); |
| 468 | 468 | ||
| 469 | #ifdef BYTE_CODE_SAFE | 469 | #ifdef BYTE_CODE_SAFE |
| 470 | const_length = ASIZE (vector); | 470 | const_length = ASIZE (vector); |
| @@ -486,6 +486,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 486 | stack.byte_string = bytestr; | 486 | stack.byte_string = bytestr; |
| 487 | stack.pc = stack.byte_string_start = SDATA (bytestr); | 487 | stack.pc = stack.byte_string_start = SDATA (bytestr); |
| 488 | stack.constants = vector; | 488 | stack.constants = vector; |
| 489 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (Lisp_Object) < XFASTINT (maxdepth)) | ||
| 490 | memory_full (SIZE_MAX); | ||
| 489 | top = (Lisp_Object *) alloca (XFASTINT (maxdepth) | 491 | top = (Lisp_Object *) alloca (XFASTINT (maxdepth) |
| 490 | * sizeof (Lisp_Object)); | 492 | * sizeof (Lisp_Object)); |
| 491 | #if BYTE_MAINTAIN_TOP | 493 | #if BYTE_MAINTAIN_TOP |
| @@ -502,14 +504,14 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 502 | 504 | ||
| 503 | if (INTEGERP (args_template)) | 505 | if (INTEGERP (args_template)) |
| 504 | { | 506 | { |
| 505 | int at = XINT (args_template); | 507 | ptrdiff_t at = XINT (args_template); |
| 506 | int rest = at & 128; | 508 | int rest = at & 128; |
| 507 | int mandatory = at & 127; | 509 | int mandatory = at & 127; |
| 508 | int nonrest = at >> 8; | 510 | ptrdiff_t nonrest = at >> 8; |
| 509 | eassert (mandatory <= nonrest); | 511 | eassert (mandatory <= nonrest); |
| 510 | if (nargs <= nonrest) | 512 | if (nargs <= nonrest) |
| 511 | { | 513 | { |
| 512 | int i; | 514 | ptrdiff_t i; |
| 513 | for (i = 0 ; i < nargs; i++, args++) | 515 | for (i = 0 ; i < nargs; i++, args++) |
| 514 | PUSH (*args); | 516 | PUSH (*args); |
| 515 | if (nargs < mandatory) | 517 | if (nargs < mandatory) |
| @@ -528,7 +530,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 528 | } | 530 | } |
| 529 | else if (rest) | 531 | else if (rest) |
| 530 | { | 532 | { |
| 531 | int i; | 533 | ptrdiff_t i; |
| 532 | for (i = 0 ; i < nonrest; i++, args++) | 534 | for (i = 0 ; i < nonrest; i++, args++) |
| 533 | PUSH (*args); | 535 | PUSH (*args); |
| 534 | PUSH (Flist (nargs - nonrest, args)); | 536 | PUSH (Flist (nargs - nonrest, args)); |
diff --git a/src/callint.c b/src/callint.c index 29bb7ccc409..dc5e6a4c37a 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -269,10 +269,9 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 269 | /* If varies[i] > 0, the i'th argument shouldn't just have its value | 269 | /* If varies[i] > 0, the i'th argument shouldn't just have its value |
| 270 | in this call quoted in the command history. It should be | 270 | in this call quoted in the command history. It should be |
| 271 | recorded as a call to the function named callint_argfuns[varies[i]]. */ | 271 | recorded as a call to the function named callint_argfuns[varies[i]]. */ |
| 272 | int *varies; | 272 | signed char *varies; |
| 273 | 273 | ||
| 274 | register size_t i; | 274 | ptrdiff_t i, nargs; |
| 275 | size_t nargs; | ||
| 276 | int foo; | 275 | int foo; |
| 277 | char prompt1[100]; | 276 | char prompt1[100]; |
| 278 | char *tem1; | 277 | char *tem1; |
| @@ -465,9 +464,14 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 465 | break; | 464 | break; |
| 466 | } | 465 | } |
| 467 | 466 | ||
| 467 | if (min (MOST_POSITIVE_FIXNUM, | ||
| 468 | min (PTRDIFF_MAX, SIZE_MAX) / sizeof (Lisp_Object)) | ||
| 469 | < nargs) | ||
| 470 | memory_full (SIZE_MAX); | ||
| 471 | |||
| 468 | args = (Lisp_Object *) alloca (nargs * sizeof (Lisp_Object)); | 472 | args = (Lisp_Object *) alloca (nargs * sizeof (Lisp_Object)); |
| 469 | visargs = (Lisp_Object *) alloca (nargs * sizeof (Lisp_Object)); | 473 | visargs = (Lisp_Object *) alloca (nargs * sizeof (Lisp_Object)); |
| 470 | varies = (int *) alloca (nargs * sizeof (int)); | 474 | varies = (signed char *) alloca (nargs); |
| 471 | 475 | ||
| 472 | for (i = 0; i < nargs; i++) | 476 | for (i = 0; i < nargs; i++) |
| 473 | { | 477 | { |
diff --git a/src/callproc.c b/src/callproc.c index 7bb2ac05933..d6bad2a44e7 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -184,7 +184,7 @@ and returns a numeric exit status or a signal description string. | |||
| 184 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. | 184 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. |
| 185 | 185 | ||
| 186 | usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | 186 | usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) |
| 187 | (size_t nargs, register Lisp_Object *args) | 187 | (ptrdiff_t nargs, Lisp_Object *args) |
| 188 | { | 188 | { |
| 189 | Lisp_Object infile, buffer, current_dir, path; | 189 | Lisp_Object infile, buffer, current_dir, path; |
| 190 | volatile int display_p_volatile; | 190 | volatile int display_p_volatile; |
| @@ -231,7 +231,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 231 | /* Decide the coding-system for giving arguments. */ | 231 | /* Decide the coding-system for giving arguments. */ |
| 232 | { | 232 | { |
| 233 | Lisp_Object val, *args2; | 233 | Lisp_Object val, *args2; |
| 234 | size_t i; | 234 | ptrdiff_t i; |
| 235 | 235 | ||
| 236 | /* If arguments are supplied, we may have to encode them. */ | 236 | /* If arguments are supplied, we may have to encode them. */ |
| 237 | if (nargs >= 5) | 237 | if (nargs >= 5) |
| @@ -422,7 +422,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 422 | (nargs > 4 ? nargs - 2 : 2) * sizeof *new_argv); | 422 | (nargs > 4 ? nargs - 2 : 2) * sizeof *new_argv); |
| 423 | if (nargs > 4) | 423 | if (nargs > 4) |
| 424 | { | 424 | { |
| 425 | register size_t i; | 425 | ptrdiff_t i; |
| 426 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 426 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 427 | 427 | ||
| 428 | GCPRO5 (infile, buffer, current_dir, path, error_file); | 428 | GCPRO5 (infile, buffer, current_dir, path, error_file); |
| @@ -716,7 +716,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 716 | { | 716 | { |
| 717 | if (EQ (coding_systems, Qt)) | 717 | if (EQ (coding_systems, Qt)) |
| 718 | { | 718 | { |
| 719 | size_t i; | 719 | ptrdiff_t i; |
| 720 | 720 | ||
| 721 | SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); | 721 | SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); |
| 722 | args2[0] = Qcall_process; | 722 | args2[0] = Qcall_process; |
| @@ -944,7 +944,7 @@ and returns a numeric exit status or a signal description string. | |||
| 944 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. | 944 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. |
| 945 | 945 | ||
| 946 | usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */) | 946 | usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */) |
| 947 | (size_t nargs, register Lisp_Object *args) | 947 | (ptrdiff_t nargs, Lisp_Object *args) |
| 948 | { | 948 | { |
| 949 | struct gcpro gcpro1; | 949 | struct gcpro gcpro1; |
| 950 | Lisp_Object filename_string; | 950 | Lisp_Object filename_string; |
| @@ -953,7 +953,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 953 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ | 953 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ |
| 954 | Lisp_Object coding_systems; | 954 | Lisp_Object coding_systems; |
| 955 | Lisp_Object val, *args2; | 955 | Lisp_Object val, *args2; |
| 956 | size_t i; | 956 | ptrdiff_t i; |
| 957 | char *tempfile; | 957 | char *tempfile; |
| 958 | Lisp_Object tmpdir, pattern; | 958 | Lisp_Object tmpdir, pattern; |
| 959 | 959 | ||
diff --git a/src/character.c b/src/character.c index 70c0637804b..7fc5d647ff5 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -893,9 +893,9 @@ DEFUN ("string", Fstring, Sstring, 0, MANY, 0, | |||
| 893 | doc: /* | 893 | doc: /* |
| 894 | Concatenate all the argument characters and make the result a string. | 894 | Concatenate all the argument characters and make the result a string. |
| 895 | usage: (string &rest CHARACTERS) */) | 895 | usage: (string &rest CHARACTERS) */) |
| 896 | (size_t n, Lisp_Object *args) | 896 | (ptrdiff_t n, Lisp_Object *args) |
| 897 | { | 897 | { |
| 898 | size_t i; | 898 | ptrdiff_t i; |
| 899 | int c; | 899 | int c; |
| 900 | unsigned char *buf, *p; | 900 | unsigned char *buf, *p; |
| 901 | Lisp_Object str; | 901 | Lisp_Object str; |
| @@ -919,9 +919,9 @@ usage: (string &rest CHARACTERS) */) | |||
| 919 | DEFUN ("unibyte-string", Funibyte_string, Sunibyte_string, 0, MANY, 0, | 919 | DEFUN ("unibyte-string", Funibyte_string, Sunibyte_string, 0, MANY, 0, |
| 920 | doc: /* Concatenate all the argument bytes and make the result a unibyte string. | 920 | doc: /* Concatenate all the argument bytes and make the result a unibyte string. |
| 921 | usage: (unibyte-string &rest BYTES) */) | 921 | usage: (unibyte-string &rest BYTES) */) |
| 922 | (size_t n, Lisp_Object *args) | 922 | (ptrdiff_t n, Lisp_Object *args) |
| 923 | { | 923 | { |
| 924 | size_t i; | 924 | ptrdiff_t i; |
| 925 | int c; | 925 | int c; |
| 926 | unsigned char *buf, *p; | 926 | unsigned char *buf, *p; |
| 927 | Lisp_Object str; | 927 | Lisp_Object str; |
diff --git a/src/charset.c b/src/charset.c index 29f98f24089..55234aa76aa 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -844,7 +844,7 @@ DEFUN ("define-charset-internal", Fdefine_charset_internal, | |||
| 844 | Sdefine_charset_internal, charset_arg_max, MANY, 0, | 844 | Sdefine_charset_internal, charset_arg_max, MANY, 0, |
| 845 | doc: /* For internal use only. | 845 | doc: /* For internal use only. |
| 846 | usage: (define-charset-internal ...) */) | 846 | usage: (define-charset-internal ...) */) |
| 847 | (size_t nargs, Lisp_Object *args) | 847 | (ptrdiff_t nargs, Lisp_Object *args) |
| 848 | { | 848 | { |
| 849 | /* Charset attr vector. */ | 849 | /* Charset attr vector. */ |
| 850 | Lisp_Object attrs; | 850 | Lisp_Object attrs; |
| @@ -2145,11 +2145,11 @@ DEFUN ("set-charset-priority", Fset_charset_priority, Sset_charset_priority, | |||
| 2145 | 1, MANY, 0, | 2145 | 1, MANY, 0, |
| 2146 | doc: /* Assign higher priority to the charsets given as arguments. | 2146 | doc: /* Assign higher priority to the charsets given as arguments. |
| 2147 | usage: (set-charset-priority &rest charsets) */) | 2147 | usage: (set-charset-priority &rest charsets) */) |
| 2148 | (size_t nargs, Lisp_Object *args) | 2148 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2149 | { | 2149 | { |
| 2150 | Lisp_Object new_head, old_list, arglist[2]; | 2150 | Lisp_Object new_head, old_list, arglist[2]; |
| 2151 | Lisp_Object list_2022, list_emacs_mule; | 2151 | Lisp_Object list_2022, list_emacs_mule; |
| 2152 | size_t i; | 2152 | ptrdiff_t i; |
| 2153 | int id; | 2153 | int id; |
| 2154 | 2154 | ||
| 2155 | old_list = Fcopy_sequence (Vcharset_ordered_list); | 2155 | old_list = Fcopy_sequence (Vcharset_ordered_list); |
diff --git a/src/coding.c b/src/coding.c index d914e0d641b..04985ab3c74 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9278,7 +9278,7 @@ function to call for FILENAME, that function should examine the | |||
| 9278 | contents of BUFFER instead of reading the file. | 9278 | contents of BUFFER instead of reading the file. |
| 9279 | 9279 | ||
| 9280 | usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) | 9280 | usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) |
| 9281 | (size_t nargs, Lisp_Object *args) | 9281 | (ptrdiff_t nargs, Lisp_Object *args) |
| 9282 | { | 9282 | { |
| 9283 | Lisp_Object operation, target_idx, target, val; | 9283 | Lisp_Object operation, target_idx, target, val; |
| 9284 | register Lisp_Object chain; | 9284 | register Lisp_Object chain; |
| @@ -9355,9 +9355,9 @@ If multiple coding systems belong to the same category, | |||
| 9355 | all but the first one are ignored. | 9355 | all but the first one are ignored. |
| 9356 | 9356 | ||
| 9357 | usage: (set-coding-system-priority &rest coding-systems) */) | 9357 | usage: (set-coding-system-priority &rest coding-systems) */) |
| 9358 | (size_t nargs, Lisp_Object *args) | 9358 | (ptrdiff_t nargs, Lisp_Object *args) |
| 9359 | { | 9359 | { |
| 9360 | size_t i, j; | 9360 | ptrdiff_t i, j; |
| 9361 | int changed[coding_category_max]; | 9361 | int changed[coding_category_max]; |
| 9362 | enum coding_category priorities[coding_category_max]; | 9362 | enum coding_category priorities[coding_category_max]; |
| 9363 | 9363 | ||
| @@ -9461,7 +9461,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal, | |||
| 9461 | Sdefine_coding_system_internal, coding_arg_max, MANY, 0, | 9461 | Sdefine_coding_system_internal, coding_arg_max, MANY, 0, |
| 9462 | doc: /* For internal use only. | 9462 | doc: /* For internal use only. |
| 9463 | usage: (define-coding-system-internal ...) */) | 9463 | usage: (define-coding-system-internal ...) */) |
| 9464 | (size_t nargs, Lisp_Object *args) | 9464 | (ptrdiff_t nargs, Lisp_Object *args) |
| 9465 | { | 9465 | { |
| 9466 | Lisp_Object name; | 9466 | Lisp_Object name; |
| 9467 | Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ | 9467 | Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ |
diff --git a/src/data.c b/src/data.c index a239a89c2d4..cf01d38036d 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2503,18 +2503,18 @@ enum arithop | |||
| 2503 | Amin | 2503 | Amin |
| 2504 | }; | 2504 | }; |
| 2505 | 2505 | ||
| 2506 | static Lisp_Object float_arith_driver (double, size_t, enum arithop, | 2506 | static Lisp_Object float_arith_driver (double, ptrdiff_t, enum arithop, |
| 2507 | size_t, Lisp_Object *); | 2507 | ptrdiff_t, Lisp_Object *); |
| 2508 | static Lisp_Object | 2508 | static Lisp_Object |
| 2509 | arith_driver (enum arithop code, size_t nargs, register Lisp_Object *args) | 2509 | arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) |
| 2510 | { | 2510 | { |
| 2511 | register Lisp_Object val; | 2511 | register Lisp_Object val; |
| 2512 | register size_t argnum; | 2512 | ptrdiff_t argnum; |
| 2513 | register EMACS_INT accum = 0; | 2513 | register EMACS_INT accum = 0; |
| 2514 | register EMACS_INT next; | 2514 | register EMACS_INT next; |
| 2515 | 2515 | ||
| 2516 | int overflow = 0; | 2516 | int overflow = 0; |
| 2517 | size_t ok_args; | 2517 | ptrdiff_t ok_args; |
| 2518 | EMACS_INT ok_accum; | 2518 | EMACS_INT ok_accum; |
| 2519 | 2519 | ||
| 2520 | switch (SWITCH_ENUM_CAST (code)) | 2520 | switch (SWITCH_ENUM_CAST (code)) |
| @@ -2618,8 +2618,8 @@ arith_driver (enum arithop code, size_t nargs, register Lisp_Object *args) | |||
| 2618 | #define isnan(x) ((x) != (x)) | 2618 | #define isnan(x) ((x) != (x)) |
| 2619 | 2619 | ||
| 2620 | static Lisp_Object | 2620 | static Lisp_Object |
| 2621 | float_arith_driver (double accum, register size_t argnum, enum arithop code, | 2621 | float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, |
| 2622 | size_t nargs, register Lisp_Object *args) | 2622 | ptrdiff_t nargs, Lisp_Object *args) |
| 2623 | { | 2623 | { |
| 2624 | register Lisp_Object val; | 2624 | register Lisp_Object val; |
| 2625 | double next; | 2625 | double next; |
| @@ -2681,7 +2681,7 @@ float_arith_driver (double accum, register size_t argnum, enum arithop code, | |||
| 2681 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, | 2681 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, |
| 2682 | doc: /* Return sum of any number of arguments, which are numbers or markers. | 2682 | doc: /* Return sum of any number of arguments, which are numbers or markers. |
| 2683 | usage: (+ &rest NUMBERS-OR-MARKERS) */) | 2683 | usage: (+ &rest NUMBERS-OR-MARKERS) */) |
| 2684 | (size_t nargs, Lisp_Object *args) | 2684 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2685 | { | 2685 | { |
| 2686 | return arith_driver (Aadd, nargs, args); | 2686 | return arith_driver (Aadd, nargs, args); |
| 2687 | } | 2687 | } |
| @@ -2691,7 +2691,7 @@ DEFUN ("-", Fminus, Sminus, 0, MANY, 0, | |||
| 2691 | With one arg, negates it. With more than one arg, | 2691 | With one arg, negates it. With more than one arg, |
| 2692 | subtracts all but the first from the first. | 2692 | subtracts all but the first from the first. |
| 2693 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | 2693 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) |
| 2694 | (size_t nargs, Lisp_Object *args) | 2694 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2695 | { | 2695 | { |
| 2696 | return arith_driver (Asub, nargs, args); | 2696 | return arith_driver (Asub, nargs, args); |
| 2697 | } | 2697 | } |
| @@ -2699,7 +2699,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | |||
| 2699 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, | 2699 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, |
| 2700 | doc: /* Return product of any number of arguments, which are numbers or markers. | 2700 | doc: /* Return product of any number of arguments, which are numbers or markers. |
| 2701 | usage: (* &rest NUMBERS-OR-MARKERS) */) | 2701 | usage: (* &rest NUMBERS-OR-MARKERS) */) |
| 2702 | (size_t nargs, Lisp_Object *args) | 2702 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2703 | { | 2703 | { |
| 2704 | return arith_driver (Amult, nargs, args); | 2704 | return arith_driver (Amult, nargs, args); |
| 2705 | } | 2705 | } |
| @@ -2708,9 +2708,9 @@ DEFUN ("/", Fquo, Squo, 2, MANY, 0, | |||
| 2708 | doc: /* Return first argument divided by all the remaining arguments. | 2708 | doc: /* Return first argument divided by all the remaining arguments. |
| 2709 | The arguments must be numbers or markers. | 2709 | The arguments must be numbers or markers. |
| 2710 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | 2710 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) |
| 2711 | (size_t nargs, Lisp_Object *args) | 2711 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2712 | { | 2712 | { |
| 2713 | size_t argnum; | 2713 | ptrdiff_t argnum; |
| 2714 | for (argnum = 2; argnum < nargs; argnum++) | 2714 | for (argnum = 2; argnum < nargs; argnum++) |
| 2715 | if (FLOATP (args[argnum])) | 2715 | if (FLOATP (args[argnum])) |
| 2716 | return float_arith_driver (0, 0, Adiv, nargs, args); | 2716 | return float_arith_driver (0, 0, Adiv, nargs, args); |
| @@ -2792,7 +2792,7 @@ DEFUN ("max", Fmax, Smax, 1, MANY, 0, | |||
| 2792 | doc: /* Return largest of all the arguments (which must be numbers or markers). | 2792 | doc: /* Return largest of all the arguments (which must be numbers or markers). |
| 2793 | The value is always a number; markers are converted to numbers. | 2793 | The value is always a number; markers are converted to numbers. |
| 2794 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2794 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2795 | (size_t nargs, Lisp_Object *args) | 2795 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2796 | { | 2796 | { |
| 2797 | return arith_driver (Amax, nargs, args); | 2797 | return arith_driver (Amax, nargs, args); |
| 2798 | } | 2798 | } |
| @@ -2801,7 +2801,7 @@ DEFUN ("min", Fmin, Smin, 1, MANY, 0, | |||
| 2801 | doc: /* Return smallest of all the arguments (which must be numbers or markers). | 2801 | doc: /* Return smallest of all the arguments (which must be numbers or markers). |
| 2802 | The value is always a number; markers are converted to numbers. | 2802 | The value is always a number; markers are converted to numbers. |
| 2803 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2803 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2804 | (size_t nargs, Lisp_Object *args) | 2804 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2805 | { | 2805 | { |
| 2806 | return arith_driver (Amin, nargs, args); | 2806 | return arith_driver (Amin, nargs, args); |
| 2807 | } | 2807 | } |
| @@ -2810,7 +2810,7 @@ DEFUN ("logand", Flogand, Slogand, 0, MANY, 0, | |||
| 2810 | doc: /* Return bitwise-and of all the arguments. | 2810 | doc: /* Return bitwise-and of all the arguments. |
| 2811 | Arguments may be integers, or markers converted to integers. | 2811 | Arguments may be integers, or markers converted to integers. |
| 2812 | usage: (logand &rest INTS-OR-MARKERS) */) | 2812 | usage: (logand &rest INTS-OR-MARKERS) */) |
| 2813 | (size_t nargs, Lisp_Object *args) | 2813 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2814 | { | 2814 | { |
| 2815 | return arith_driver (Alogand, nargs, args); | 2815 | return arith_driver (Alogand, nargs, args); |
| 2816 | } | 2816 | } |
| @@ -2819,7 +2819,7 @@ DEFUN ("logior", Flogior, Slogior, 0, MANY, 0, | |||
| 2819 | doc: /* Return bitwise-or of all the arguments. | 2819 | doc: /* Return bitwise-or of all the arguments. |
| 2820 | Arguments may be integers, or markers converted to integers. | 2820 | Arguments may be integers, or markers converted to integers. |
| 2821 | usage: (logior &rest INTS-OR-MARKERS) */) | 2821 | usage: (logior &rest INTS-OR-MARKERS) */) |
| 2822 | (size_t nargs, Lisp_Object *args) | 2822 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2823 | { | 2823 | { |
| 2824 | return arith_driver (Alogior, nargs, args); | 2824 | return arith_driver (Alogior, nargs, args); |
| 2825 | } | 2825 | } |
| @@ -2828,7 +2828,7 @@ DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, | |||
| 2828 | doc: /* Return bitwise-exclusive-or of all the arguments. | 2828 | doc: /* Return bitwise-exclusive-or of all the arguments. |
| 2829 | Arguments may be integers, or markers converted to integers. | 2829 | Arguments may be integers, or markers converted to integers. |
| 2830 | usage: (logxor &rest INTS-OR-MARKERS) */) | 2830 | usage: (logxor &rest INTS-OR-MARKERS) */) |
| 2831 | (size_t nargs, Lisp_Object *args) | 2831 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2832 | { | 2832 | { |
| 2833 | return arith_driver (Alogxor, nargs, args); | 2833 | return arith_driver (Alogxor, nargs, args); |
| 2834 | } | 2834 | } |
diff --git a/src/dbusbind.c b/src/dbusbind.c index d8d0c7c2ef0..f662d5b38a2 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -1078,7 +1078,7 @@ object is returned instead of a list containing this single Lisp object. | |||
| 1078 | => "i686" | 1078 | => "i686" |
| 1079 | 1079 | ||
| 1080 | usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */) | 1080 | usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */) |
| 1081 | (size_t nargs, register Lisp_Object *args) | 1081 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1082 | { | 1082 | { |
| 1083 | Lisp_Object bus, service, path, interface, method; | 1083 | Lisp_Object bus, service, path, interface, method; |
| 1084 | Lisp_Object result; | 1084 | Lisp_Object result; |
| @@ -1090,7 +1090,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 1090 | DBusError derror; | 1090 | DBusError derror; |
| 1091 | unsigned int dtype; | 1091 | unsigned int dtype; |
| 1092 | int timeout = -1; | 1092 | int timeout = -1; |
| 1093 | size_t i = 5; | 1093 | ptrdiff_t i = 5; |
| 1094 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1094 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1095 | 1095 | ||
| 1096 | /* Check parameters. */ | 1096 | /* Check parameters. */ |
| @@ -1143,7 +1143,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 1143 | { | 1143 | { |
| 1144 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1144 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1145 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1145 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1146 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), | 1146 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 4, |
| 1147 | SDATA (format2 ("%s", args[i], Qnil)), | 1147 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1148 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1148 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1149 | ++i; | 1149 | ++i; |
| @@ -1151,7 +1151,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 1151 | else | 1151 | else |
| 1152 | { | 1152 | { |
| 1153 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1153 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1154 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-4), | 1154 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 4, |
| 1155 | SDATA (format2 ("%s", args[i], Qnil))); | 1155 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1156 | } | 1156 | } |
| 1157 | 1157 | ||
| @@ -1260,7 +1260,7 @@ Example: | |||
| 1260 | -| i686 | 1260 | -| i686 |
| 1261 | 1261 | ||
| 1262 | usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */) | 1262 | usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */) |
| 1263 | (size_t nargs, register Lisp_Object *args) | 1263 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1264 | { | 1264 | { |
| 1265 | Lisp_Object bus, service, path, interface, method, handler; | 1265 | Lisp_Object bus, service, path, interface, method, handler; |
| 1266 | Lisp_Object result; | 1266 | Lisp_Object result; |
| @@ -1271,7 +1271,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1271 | unsigned int dtype; | 1271 | unsigned int dtype; |
| 1272 | dbus_uint32_t serial; | 1272 | dbus_uint32_t serial; |
| 1273 | int timeout = -1; | 1273 | int timeout = -1; |
| 1274 | size_t i = 6; | 1274 | ptrdiff_t i = 6; |
| 1275 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1275 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1276 | 1276 | ||
| 1277 | /* Check parameters. */ | 1277 | /* Check parameters. */ |
| @@ -1326,7 +1326,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1326 | { | 1326 | { |
| 1327 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1327 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1328 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1328 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1329 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), | 1329 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 4, |
| 1330 | SDATA (format2 ("%s", args[i], Qnil)), | 1330 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1331 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1331 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1332 | ++i; | 1332 | ++i; |
| @@ -1334,7 +1334,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1334 | else | 1334 | else |
| 1335 | { | 1335 | { |
| 1336 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1336 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1337 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i - 4), | 1337 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 4, |
| 1338 | SDATA (format2 ("%s", args[i], Qnil))); | 1338 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1339 | } | 1339 | } |
| 1340 | 1340 | ||
| @@ -1386,7 +1386,7 @@ DEFUN ("dbus-method-return-internal", Fdbus_method_return_internal, | |||
| 1386 | This is an internal function, it shall not be used outside dbus.el. | 1386 | This is an internal function, it shall not be used outside dbus.el. |
| 1387 | 1387 | ||
| 1388 | usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | 1388 | usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) |
| 1389 | (size_t nargs, register Lisp_Object *args) | 1389 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1390 | { | 1390 | { |
| 1391 | Lisp_Object bus, service; | 1391 | Lisp_Object bus, service; |
| 1392 | struct gcpro gcpro1, gcpro2; | 1392 | struct gcpro gcpro1, gcpro2; |
| @@ -1395,7 +1395,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1395 | DBusMessageIter iter; | 1395 | DBusMessageIter iter; |
| 1396 | dbus_uint32_t serial; | 1396 | dbus_uint32_t serial; |
| 1397 | unsigned int ui_serial, dtype; | 1397 | unsigned int ui_serial, dtype; |
| 1398 | size_t i; | 1398 | ptrdiff_t i; |
| 1399 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1399 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1400 | 1400 | ||
| 1401 | /* Check parameters. */ | 1401 | /* Check parameters. */ |
| @@ -1435,7 +1435,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1435 | { | 1435 | { |
| 1436 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1436 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1437 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1437 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1438 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-2), | 1438 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 2, |
| 1439 | SDATA (format2 ("%s", args[i], Qnil)), | 1439 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1440 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1440 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1441 | ++i; | 1441 | ++i; |
| @@ -1443,7 +1443,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1443 | else | 1443 | else |
| 1444 | { | 1444 | { |
| 1445 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1445 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1446 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-2), | 1446 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 2, |
| 1447 | SDATA (format2 ("%s", args[i], Qnil))); | 1447 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1448 | } | 1448 | } |
| 1449 | 1449 | ||
| @@ -1475,7 +1475,7 @@ DEFUN ("dbus-method-error-internal", Fdbus_method_error_internal, | |||
| 1475 | This is an internal function, it shall not be used outside dbus.el. | 1475 | This is an internal function, it shall not be used outside dbus.el. |
| 1476 | 1476 | ||
| 1477 | usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | 1477 | usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) |
| 1478 | (size_t nargs, register Lisp_Object *args) | 1478 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1479 | { | 1479 | { |
| 1480 | Lisp_Object bus, service; | 1480 | Lisp_Object bus, service; |
| 1481 | struct gcpro gcpro1, gcpro2; | 1481 | struct gcpro gcpro1, gcpro2; |
| @@ -1484,7 +1484,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1484 | DBusMessageIter iter; | 1484 | DBusMessageIter iter; |
| 1485 | dbus_uint32_t serial; | 1485 | dbus_uint32_t serial; |
| 1486 | unsigned int ui_serial, dtype; | 1486 | unsigned int ui_serial, dtype; |
| 1487 | size_t i; | 1487 | ptrdiff_t i; |
| 1488 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1488 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1489 | 1489 | ||
| 1490 | /* Check parameters. */ | 1490 | /* Check parameters. */ |
| @@ -1525,7 +1525,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1525 | { | 1525 | { |
| 1526 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1526 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1527 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1527 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1528 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-2), | 1528 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 2, |
| 1529 | SDATA (format2 ("%s", args[i], Qnil)), | 1529 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1530 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1530 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1531 | ++i; | 1531 | ++i; |
| @@ -1533,7 +1533,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1533 | else | 1533 | else |
| 1534 | { | 1534 | { |
| 1535 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1535 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1536 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-2), | 1536 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 2, |
| 1537 | SDATA (format2 ("%s", args[i], Qnil))); | 1537 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1538 | } | 1538 | } |
| 1539 | 1539 | ||
| @@ -1588,7 +1588,7 @@ Example: | |||
| 1588 | "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs") | 1588 | "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs") |
| 1589 | 1589 | ||
| 1590 | usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | 1590 | usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) |
| 1591 | (size_t nargs, register Lisp_Object *args) | 1591 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1592 | { | 1592 | { |
| 1593 | Lisp_Object bus, service, path, interface, signal; | 1593 | Lisp_Object bus, service, path, interface, signal; |
| 1594 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 1594 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| @@ -1596,7 +1596,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1596 | DBusMessage *dmessage; | 1596 | DBusMessage *dmessage; |
| 1597 | DBusMessageIter iter; | 1597 | DBusMessageIter iter; |
| 1598 | unsigned int dtype; | 1598 | unsigned int dtype; |
| 1599 | size_t i; | 1599 | ptrdiff_t i; |
| 1600 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1600 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1601 | 1601 | ||
| 1602 | /* Check parameters. */ | 1602 | /* Check parameters. */ |
| @@ -1640,7 +1640,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1640 | { | 1640 | { |
| 1641 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1641 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1642 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1642 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1643 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), | 1643 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 4, |
| 1644 | SDATA (format2 ("%s", args[i], Qnil)), | 1644 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1645 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1645 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1646 | ++i; | 1646 | ++i; |
| @@ -1648,7 +1648,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1648 | else | 1648 | else |
| 1649 | { | 1649 | { |
| 1650 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1650 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1651 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-4), | 1651 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 4, |
| 1652 | SDATA (format2 ("%s", args[i], Qnil))); | 1652 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1653 | } | 1653 | } |
| 1654 | 1654 | ||
| @@ -1919,11 +1919,11 @@ Example: | |||
| 1919 | => :already-owner. | 1919 | => :already-owner. |
| 1920 | 1920 | ||
| 1921 | usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) | 1921 | usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) |
| 1922 | (size_t nargs, register Lisp_Object *args) | 1922 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1923 | { | 1923 | { |
| 1924 | Lisp_Object bus, service; | 1924 | Lisp_Object bus, service; |
| 1925 | DBusConnection *connection; | 1925 | DBusConnection *connection; |
| 1926 | size_t i; | 1926 | ptrdiff_t i; |
| 1927 | unsigned int value; | 1927 | unsigned int value; |
| 1928 | unsigned int flags = 0; | 1928 | unsigned int flags = 0; |
| 1929 | int result; | 1929 | int result; |
| @@ -2019,13 +2019,13 @@ INTERFACE, SIGNAL and HANDLER must not be nil. Example: | |||
| 2019 | `dbus-unregister-object' for removing the registration. | 2019 | `dbus-unregister-object' for removing the registration. |
| 2020 | 2020 | ||
| 2021 | usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */) | 2021 | usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */) |
| 2022 | (size_t nargs, register Lisp_Object *args) | 2022 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2023 | { | 2023 | { |
| 2024 | Lisp_Object bus, service, path, interface, signal, handler; | 2024 | Lisp_Object bus, service, path, interface, signal, handler; |
| 2025 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; | 2025 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; |
| 2026 | Lisp_Object uname, key, key1, value; | 2026 | Lisp_Object uname, key, key1, value; |
| 2027 | DBusConnection *connection; | 2027 | DBusConnection *connection; |
| 2028 | size_t i; | 2028 | ptrdiff_t i; |
| 2029 | char rule[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; | 2029 | char rule[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; |
| 2030 | char x[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; | 2030 | char x[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; |
| 2031 | DBusError derror; | 2031 | DBusError derror; |
| @@ -2095,7 +2095,7 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG | |||
| 2095 | if (!NILP (args[i])) | 2095 | if (!NILP (args[i])) |
| 2096 | { | 2096 | { |
| 2097 | CHECK_STRING (args[i]); | 2097 | CHECK_STRING (args[i]); |
| 2098 | sprintf (x, ",arg%lu='%s'", (unsigned long) (i-6), | 2098 | sprintf (x, ",arg%"pD"d='%s'", i - 6, |
| 2099 | SDATA (args[i])); | 2099 | SDATA (args[i])); |
| 2100 | strcat (rule, x); | 2100 | strcat (rule, x); |
| 2101 | } | 2101 | } |
diff --git a/src/editfns.c b/src/editfns.c index 12e82c428ad..9678d4da6a2 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -96,7 +96,7 @@ static void general_insert_function (void (*) (const char *, EMACS_INT), | |||
| 96 | void (*) (Lisp_Object, EMACS_INT, | 96 | void (*) (Lisp_Object, EMACS_INT, |
| 97 | EMACS_INT, EMACS_INT, | 97 | EMACS_INT, EMACS_INT, |
| 98 | EMACS_INT, int), | 98 | EMACS_INT, int), |
| 99 | int, size_t, Lisp_Object *); | 99 | int, ptrdiff_t, Lisp_Object *); |
| 100 | static Lisp_Object subst_char_in_region_unwind (Lisp_Object); | 100 | static Lisp_Object subst_char_in_region_unwind (Lisp_Object); |
| 101 | static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); | 101 | static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); |
| 102 | static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, | 102 | static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, |
| @@ -1858,7 +1858,7 @@ Years before 1970 are not guaranteed to work. On some systems, | |||
| 1858 | year values as low as 1901 do work. | 1858 | year values as low as 1901 do work. |
| 1859 | 1859 | ||
| 1860 | usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) | 1860 | usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) |
| 1861 | (size_t nargs, register Lisp_Object *args) | 1861 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1862 | { | 1862 | { |
| 1863 | time_t value; | 1863 | time_t value; |
| 1864 | struct tm tm; | 1864 | struct tm tm; |
| @@ -2194,9 +2194,9 @@ general_insert_function (void (*insert_func) | |||
| 2194 | void (*insert_from_string_func) | 2194 | void (*insert_from_string_func) |
| 2195 | (Lisp_Object, EMACS_INT, EMACS_INT, | 2195 | (Lisp_Object, EMACS_INT, EMACS_INT, |
| 2196 | EMACS_INT, EMACS_INT, int), | 2196 | EMACS_INT, EMACS_INT, int), |
| 2197 | int inherit, size_t nargs, Lisp_Object *args) | 2197 | int inherit, ptrdiff_t nargs, Lisp_Object *args) |
| 2198 | { | 2198 | { |
| 2199 | register size_t argnum; | 2199 | ptrdiff_t argnum; |
| 2200 | register Lisp_Object val; | 2200 | register Lisp_Object val; |
| 2201 | 2201 | ||
| 2202 | for (argnum = 0; argnum < nargs; argnum++) | 2202 | for (argnum = 0; argnum < nargs; argnum++) |
| @@ -2258,7 +2258,7 @@ buffer; to accomplish this, apply `string-as-multibyte' to the string | |||
| 2258 | and insert the result. | 2258 | and insert the result. |
| 2259 | 2259 | ||
| 2260 | usage: (insert &rest ARGS) */) | 2260 | usage: (insert &rest ARGS) */) |
| 2261 | (size_t nargs, register Lisp_Object *args) | 2261 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2262 | { | 2262 | { |
| 2263 | general_insert_function (insert, insert_from_string, 0, nargs, args); | 2263 | general_insert_function (insert, insert_from_string, 0, nargs, args); |
| 2264 | return Qnil; | 2264 | return Qnil; |
| @@ -2277,7 +2277,7 @@ If the current buffer is unibyte, multibyte strings are converted | |||
| 2277 | to unibyte for insertion. | 2277 | to unibyte for insertion. |
| 2278 | 2278 | ||
| 2279 | usage: (insert-and-inherit &rest ARGS) */) | 2279 | usage: (insert-and-inherit &rest ARGS) */) |
| 2280 | (size_t nargs, register Lisp_Object *args) | 2280 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2281 | { | 2281 | { |
| 2282 | general_insert_function (insert_and_inherit, insert_from_string, 1, | 2282 | general_insert_function (insert_and_inherit, insert_from_string, 1, |
| 2283 | nargs, args); | 2283 | nargs, args); |
| @@ -2294,7 +2294,7 @@ If the current buffer is unibyte, multibyte strings are converted | |||
| 2294 | to unibyte for insertion. | 2294 | to unibyte for insertion. |
| 2295 | 2295 | ||
| 2296 | usage: (insert-before-markers &rest ARGS) */) | 2296 | usage: (insert-before-markers &rest ARGS) */) |
| 2297 | (size_t nargs, register Lisp_Object *args) | 2297 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2298 | { | 2298 | { |
| 2299 | general_insert_function (insert_before_markers, | 2299 | general_insert_function (insert_before_markers, |
| 2300 | insert_from_string_before_markers, 0, | 2300 | insert_from_string_before_markers, 0, |
| @@ -2313,7 +2313,7 @@ If the current buffer is unibyte, multibyte strings are converted | |||
| 2313 | to unibyte for insertion. | 2313 | to unibyte for insertion. |
| 2314 | 2314 | ||
| 2315 | usage: (insert-before-markers-and-inherit &rest ARGS) */) | 2315 | usage: (insert-before-markers-and-inherit &rest ARGS) */) |
| 2316 | (size_t nargs, register Lisp_Object *args) | 2316 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2317 | { | 2317 | { |
| 2318 | general_insert_function (insert_before_markers_and_inherit, | 2318 | general_insert_function (insert_before_markers_and_inherit, |
| 2319 | insert_from_string_before_markers, 1, | 2319 | insert_from_string_before_markers, 1, |
| @@ -3386,7 +3386,7 @@ any existing message; this lets the minibuffer contents show. See | |||
| 3386 | also `current-message'. | 3386 | also `current-message'. |
| 3387 | 3387 | ||
| 3388 | usage: (message FORMAT-STRING &rest ARGS) */) | 3388 | usage: (message FORMAT-STRING &rest ARGS) */) |
| 3389 | (size_t nargs, Lisp_Object *args) | 3389 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3390 | { | 3390 | { |
| 3391 | if (NILP (args[0]) | 3391 | if (NILP (args[0]) |
| 3392 | || (STRINGP (args[0]) | 3392 | || (STRINGP (args[0]) |
| @@ -3414,7 +3414,7 @@ If the first argument is nil or the empty string, clear any existing | |||
| 3414 | message; let the minibuffer contents show. | 3414 | message; let the minibuffer contents show. |
| 3415 | 3415 | ||
| 3416 | usage: (message-box FORMAT-STRING &rest ARGS) */) | 3416 | usage: (message-box FORMAT-STRING &rest ARGS) */) |
| 3417 | (size_t nargs, Lisp_Object *args) | 3417 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3418 | { | 3418 | { |
| 3419 | if (NILP (args[0])) | 3419 | if (NILP (args[0])) |
| 3420 | { | 3420 | { |
| @@ -3471,7 +3471,7 @@ If the first argument is nil or the empty string, clear any existing | |||
| 3471 | message; let the minibuffer contents show. | 3471 | message; let the minibuffer contents show. |
| 3472 | 3472 | ||
| 3473 | usage: (message-or-box FORMAT-STRING &rest ARGS) */) | 3473 | usage: (message-or-box FORMAT-STRING &rest ARGS) */) |
| 3474 | (size_t nargs, Lisp_Object *args) | 3474 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3475 | { | 3475 | { |
| 3476 | #ifdef HAVE_MENUS | 3476 | #ifdef HAVE_MENUS |
| 3477 | if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) | 3477 | if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) |
| @@ -3495,11 +3495,11 @@ First argument is the string to copy. | |||
| 3495 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text | 3495 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text |
| 3496 | properties to add to the result. | 3496 | properties to add to the result. |
| 3497 | usage: (propertize STRING &rest PROPERTIES) */) | 3497 | usage: (propertize STRING &rest PROPERTIES) */) |
| 3498 | (size_t nargs, Lisp_Object *args) | 3498 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3499 | { | 3499 | { |
| 3500 | Lisp_Object properties, string; | 3500 | Lisp_Object properties, string; |
| 3501 | struct gcpro gcpro1, gcpro2; | 3501 | struct gcpro gcpro1, gcpro2; |
| 3502 | size_t i; | 3502 | ptrdiff_t i; |
| 3503 | 3503 | ||
| 3504 | /* Number of args must be odd. */ | 3504 | /* Number of args must be odd. */ |
| 3505 | if ((nargs & 1) == 0) | 3505 | if ((nargs & 1) == 0) |
| @@ -3584,9 +3584,9 @@ decimal point itself is omitted. For %s and %S, the precision | |||
| 3584 | specifier truncates the string to the given width. | 3584 | specifier truncates the string to the given width. |
| 3585 | 3585 | ||
| 3586 | usage: (format STRING &rest OBJECTS) */) | 3586 | usage: (format STRING &rest OBJECTS) */) |
| 3587 | (size_t nargs, register Lisp_Object *args) | 3587 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3588 | { | 3588 | { |
| 3589 | EMACS_INT n; /* The number of the next arg to substitute */ | 3589 | ptrdiff_t n; /* The number of the next arg to substitute */ |
| 3590 | char initial_buffer[4000]; | 3590 | char initial_buffer[4000]; |
| 3591 | char *buf = initial_buffer; | 3591 | char *buf = initial_buffer; |
| 3592 | EMACS_INT bufsize = sizeof initial_buffer; | 3592 | EMACS_INT bufsize = sizeof initial_buffer; |
| @@ -3635,7 +3635,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3635 | 3635 | ||
| 3636 | /* Allocate the info and discarded tables. */ | 3636 | /* Allocate the info and discarded tables. */ |
| 3637 | { | 3637 | { |
| 3638 | EMACS_INT i; | 3638 | ptrdiff_t i; |
| 3639 | if ((SIZE_MAX - formatlen) / sizeof (struct info) <= nargs) | 3639 | if ((SIZE_MAX - formatlen) / sizeof (struct info) <= nargs) |
| 3640 | memory_full (SIZE_MAX); | 3640 | memory_full (SIZE_MAX); |
| 3641 | SAFE_ALLOCA (info, struct info *, (nargs + 1) * sizeof *info + formatlen); | 3641 | SAFE_ALLOCA (info, struct info *, (nargs + 1) * sizeof *info + formatlen); |
| @@ -3674,7 +3674,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3674 | while (format != end) | 3674 | while (format != end) |
| 3675 | { | 3675 | { |
| 3676 | /* The values of N and FORMAT when the loop body is entered. */ | 3676 | /* The values of N and FORMAT when the loop body is entered. */ |
| 3677 | EMACS_INT n0 = n; | 3677 | ptrdiff_t n0 = n; |
| 3678 | char *format0 = format; | 3678 | char *format0 = format; |
| 3679 | 3679 | ||
| 3680 | /* Bytes needed to represent the output of this conversion. */ | 3680 | /* Bytes needed to represent the output of this conversion. */ |
diff --git a/src/eval.c b/src/eval.c index a9703fc0aa0..65cd87cd8ed 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -139,7 +139,7 @@ Lisp_Object Vsignaling_function; | |||
| 139 | 139 | ||
| 140 | int handling_signal; | 140 | int handling_signal; |
| 141 | 141 | ||
| 142 | static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *); | 142 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 143 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | 143 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; |
| 144 | static int interactive_p (int); | 144 | static int interactive_p (int); |
| 145 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); | 145 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); |
| @@ -1052,7 +1052,7 @@ usage: (let VARLIST BODY...) */) | |||
| 1052 | Lisp_Object *temps, tem, lexenv; | 1052 | Lisp_Object *temps, tem, lexenv; |
| 1053 | register Lisp_Object elt, varlist; | 1053 | register Lisp_Object elt, varlist; |
| 1054 | int count = SPECPDL_INDEX (); | 1054 | int count = SPECPDL_INDEX (); |
| 1055 | register size_t argnum; | 1055 | ptrdiff_t argnum; |
| 1056 | struct gcpro gcpro1, gcpro2; | 1056 | struct gcpro gcpro1, gcpro2; |
| 1057 | USE_SAFE_ALLOCA; | 1057 | USE_SAFE_ALLOCA; |
| 1058 | 1058 | ||
| @@ -1608,8 +1608,8 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), | |||
| 1608 | and ARGS as second argument. */ | 1608 | and ARGS as second argument. */ |
| 1609 | 1609 | ||
| 1610 | Lisp_Object | 1610 | Lisp_Object |
| 1611 | internal_condition_case_n (Lisp_Object (*bfun) (size_t, Lisp_Object *), | 1611 | internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), |
| 1612 | size_t nargs, | 1612 | ptrdiff_t nargs, |
| 1613 | Lisp_Object *args, | 1613 | Lisp_Object *args, |
| 1614 | Lisp_Object handlers, | 1614 | Lisp_Object handlers, |
| 1615 | Lisp_Object (*hfun) (Lisp_Object)) | 1615 | Lisp_Object (*hfun) (Lisp_Object)) |
| @@ -2336,7 +2336,7 @@ eval_sub (Lisp_Object form) | |||
| 2336 | { | 2336 | { |
| 2337 | /* Pass a vector of evaluated arguments. */ | 2337 | /* Pass a vector of evaluated arguments. */ |
| 2338 | Lisp_Object *vals; | 2338 | Lisp_Object *vals; |
| 2339 | register size_t argnum = 0; | 2339 | ptrdiff_t argnum = 0; |
| 2340 | USE_SAFE_ALLOCA; | 2340 | USE_SAFE_ALLOCA; |
| 2341 | 2341 | ||
| 2342 | SAFE_ALLOCA_LISP (vals, XINT (numargs)); | 2342 | SAFE_ALLOCA_LISP (vals, XINT (numargs)); |
| @@ -2466,9 +2466,9 @@ DEFUN ("apply", Fapply, Sapply, 2, MANY, 0, | |||
| 2466 | Then return the value FUNCTION returns. | 2466 | Then return the value FUNCTION returns. |
| 2467 | Thus, (apply '+ 1 2 '(3 4)) returns 10. | 2467 | Thus, (apply '+ 1 2 '(3 4)) returns 10. |
| 2468 | usage: (apply FUNCTION &rest ARGUMENTS) */) | 2468 | usage: (apply FUNCTION &rest ARGUMENTS) */) |
| 2469 | (size_t nargs, Lisp_Object *args) | 2469 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2470 | { | 2470 | { |
| 2471 | register size_t i, numargs; | 2471 | ptrdiff_t i, numargs; |
| 2472 | register Lisp_Object spread_arg; | 2472 | register Lisp_Object spread_arg; |
| 2473 | register Lisp_Object *funcall_args; | 2473 | register Lisp_Object *funcall_args; |
| 2474 | Lisp_Object fun, retval; | 2474 | Lisp_Object fun, retval; |
| @@ -2550,7 +2550,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2550 | /* Run hook variables in various ways. */ | 2550 | /* Run hook variables in various ways. */ |
| 2551 | 2551 | ||
| 2552 | static Lisp_Object | 2552 | static Lisp_Object |
| 2553 | funcall_nil (size_t nargs, Lisp_Object *args) | 2553 | funcall_nil (ptrdiff_t nargs, Lisp_Object *args) |
| 2554 | { | 2554 | { |
| 2555 | Ffuncall (nargs, args); | 2555 | Ffuncall (nargs, args); |
| 2556 | return Qnil; | 2556 | return Qnil; |
| @@ -2571,10 +2571,10 @@ hook; they should use `run-mode-hooks' instead. | |||
| 2571 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2571 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2572 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2572 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2573 | usage: (run-hooks &rest HOOKS) */) | 2573 | usage: (run-hooks &rest HOOKS) */) |
| 2574 | (size_t nargs, Lisp_Object *args) | 2574 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2575 | { | 2575 | { |
| 2576 | Lisp_Object hook[1]; | 2576 | Lisp_Object hook[1]; |
| 2577 | register size_t i; | 2577 | ptrdiff_t i; |
| 2578 | 2578 | ||
| 2579 | for (i = 0; i < nargs; i++) | 2579 | for (i = 0; i < nargs; i++) |
| 2580 | { | 2580 | { |
| @@ -2600,7 +2600,7 @@ as that may change. | |||
| 2600 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2600 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2601 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2601 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2602 | usage: (run-hook-with-args HOOK &rest ARGS) */) | 2602 | usage: (run-hook-with-args HOOK &rest ARGS) */) |
| 2603 | (size_t nargs, Lisp_Object *args) | 2603 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2604 | { | 2604 | { |
| 2605 | return run_hook_with_args (nargs, args, funcall_nil); | 2605 | return run_hook_with_args (nargs, args, funcall_nil); |
| 2606 | } | 2606 | } |
| @@ -2620,13 +2620,13 @@ However, if they all return nil, we return nil. | |||
| 2620 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2620 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2621 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2621 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2622 | usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) | 2622 | usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) |
| 2623 | (size_t nargs, Lisp_Object *args) | 2623 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2624 | { | 2624 | { |
| 2625 | return run_hook_with_args (nargs, args, Ffuncall); | 2625 | return run_hook_with_args (nargs, args, Ffuncall); |
| 2626 | } | 2626 | } |
| 2627 | 2627 | ||
| 2628 | static Lisp_Object | 2628 | static Lisp_Object |
| 2629 | funcall_not (size_t nargs, Lisp_Object *args) | 2629 | funcall_not (ptrdiff_t nargs, Lisp_Object *args) |
| 2630 | { | 2630 | { |
| 2631 | return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; | 2631 | return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; |
| 2632 | } | 2632 | } |
| @@ -2645,13 +2645,13 @@ Then we return nil. However, if they all return non-nil, we return non-nil. | |||
| 2645 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2645 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2646 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2646 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2647 | usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) | 2647 | usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) |
| 2648 | (size_t nargs, Lisp_Object *args) | 2648 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2649 | { | 2649 | { |
| 2650 | return NILP (run_hook_with_args (nargs, args, funcall_not)) ? Qt : Qnil; | 2650 | return NILP (run_hook_with_args (nargs, args, funcall_not)) ? Qt : Qnil; |
| 2651 | } | 2651 | } |
| 2652 | 2652 | ||
| 2653 | static Lisp_Object | 2653 | static Lisp_Object |
| 2654 | run_hook_wrapped_funcall (size_t nargs, Lisp_Object *args) | 2654 | run_hook_wrapped_funcall (ptrdiff_t nargs, Lisp_Object *args) |
| 2655 | { | 2655 | { |
| 2656 | Lisp_Object tmp = args[0], ret; | 2656 | Lisp_Object tmp = args[0], ret; |
| 2657 | args[0] = args[1]; | 2657 | args[0] = args[1]; |
| @@ -2669,7 +2669,7 @@ it calls WRAP-FUNCTION with arguments FUN and ARGS. | |||
| 2669 | As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped' | 2669 | As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped' |
| 2670 | aborts and returns that value. | 2670 | aborts and returns that value. |
| 2671 | usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */) | 2671 | usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */) |
| 2672 | (size_t nargs, Lisp_Object *args) | 2672 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2673 | { | 2673 | { |
| 2674 | return run_hook_with_args (nargs, args, run_hook_wrapped_funcall); | 2674 | return run_hook_with_args (nargs, args, run_hook_wrapped_funcall); |
| 2675 | } | 2675 | } |
| @@ -2682,8 +2682,8 @@ usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */) | |||
| 2682 | except that it isn't necessary to gcpro ARGS[0]. */ | 2682 | except that it isn't necessary to gcpro ARGS[0]. */ |
| 2683 | 2683 | ||
| 2684 | Lisp_Object | 2684 | Lisp_Object |
| 2685 | run_hook_with_args (size_t nargs, Lisp_Object *args, | 2685 | run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, |
| 2686 | Lisp_Object (*funcall) (size_t nargs, Lisp_Object *args)) | 2686 | Lisp_Object (*funcall) (ptrdiff_t nargs, Lisp_Object *args)) |
| 2687 | { | 2687 | { |
| 2688 | Lisp_Object sym, val, ret = Qnil; | 2688 | Lisp_Object sym, val, ret = Qnil; |
| 2689 | struct gcpro gcpro1, gcpro2, gcpro3; | 2689 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -2956,16 +2956,16 @@ DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, | |||
| 2956 | Return the value that function returns. | 2956 | Return the value that function returns. |
| 2957 | Thus, (funcall 'cons 'x 'y) returns (x . y). | 2957 | Thus, (funcall 'cons 'x 'y) returns (x . y). |
| 2958 | usage: (funcall FUNCTION &rest ARGUMENTS) */) | 2958 | usage: (funcall FUNCTION &rest ARGUMENTS) */) |
| 2959 | (size_t nargs, Lisp_Object *args) | 2959 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2960 | { | 2960 | { |
| 2961 | Lisp_Object fun, original_fun; | 2961 | Lisp_Object fun, original_fun; |
| 2962 | Lisp_Object funcar; | 2962 | Lisp_Object funcar; |
| 2963 | size_t numargs = nargs - 1; | 2963 | ptrdiff_t numargs = nargs - 1; |
| 2964 | Lisp_Object lisp_numargs; | 2964 | Lisp_Object lisp_numargs; |
| 2965 | Lisp_Object val; | 2965 | Lisp_Object val; |
| 2966 | struct backtrace backtrace; | 2966 | struct backtrace backtrace; |
| 2967 | register Lisp_Object *internal_args; | 2967 | register Lisp_Object *internal_args; |
| 2968 | register size_t i; | 2968 | ptrdiff_t i; |
| 2969 | 2969 | ||
| 2970 | QUIT; | 2970 | QUIT; |
| 2971 | if ((consing_since_gc > gc_cons_threshold | 2971 | if ((consing_since_gc > gc_cons_threshold |
| @@ -3119,14 +3119,13 @@ static Lisp_Object | |||
| 3119 | apply_lambda (Lisp_Object fun, Lisp_Object args) | 3119 | apply_lambda (Lisp_Object fun, Lisp_Object args) |
| 3120 | { | 3120 | { |
| 3121 | Lisp_Object args_left; | 3121 | Lisp_Object args_left; |
| 3122 | size_t numargs; | 3122 | ptrdiff_t i, numargs; |
| 3123 | register Lisp_Object *arg_vector; | 3123 | register Lisp_Object *arg_vector; |
| 3124 | struct gcpro gcpro1, gcpro2, gcpro3; | 3124 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 3125 | register size_t i; | ||
| 3126 | register Lisp_Object tem; | 3125 | register Lisp_Object tem; |
| 3127 | USE_SAFE_ALLOCA; | 3126 | USE_SAFE_ALLOCA; |
| 3128 | 3127 | ||
| 3129 | numargs = XINT (Flength (args)); | 3128 | numargs = XFASTINT (Flength (args)); |
| 3130 | SAFE_ALLOCA_LISP (arg_vector, numargs); | 3129 | SAFE_ALLOCA_LISP (arg_vector, numargs); |
| 3131 | args_left = args; | 3130 | args_left = args; |
| 3132 | 3131 | ||
| @@ -3162,12 +3161,12 @@ apply_lambda (Lisp_Object fun, Lisp_Object args) | |||
| 3162 | FUN must be either a lambda-expression or a compiled-code object. */ | 3161 | FUN must be either a lambda-expression or a compiled-code object. */ |
| 3163 | 3162 | ||
| 3164 | static Lisp_Object | 3163 | static Lisp_Object |
| 3165 | funcall_lambda (Lisp_Object fun, size_t nargs, | 3164 | funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, |
| 3166 | register Lisp_Object *arg_vector) | 3165 | register Lisp_Object *arg_vector) |
| 3167 | { | 3166 | { |
| 3168 | Lisp_Object val, syms_left, next, lexenv; | 3167 | Lisp_Object val, syms_left, next, lexenv; |
| 3169 | int count = SPECPDL_INDEX (); | 3168 | int count = SPECPDL_INDEX (); |
| 3170 | size_t i; | 3169 | ptrdiff_t i; |
| 3171 | int optional, rest; | 3170 | int optional, rest; |
| 3172 | 3171 | ||
| 3173 | if (CONSP (fun)) | 3172 | if (CONSP (fun)) |
| @@ -3584,7 +3583,7 @@ Output stream used is value of `standard-output'. */) | |||
| 3584 | } | 3583 | } |
| 3585 | else | 3584 | else |
| 3586 | { | 3585 | { |
| 3587 | size_t i; | 3586 | ptrdiff_t i; |
| 3588 | for (i = 0; i < backlist->nargs; i++) | 3587 | for (i = 0; i < backlist->nargs; i++) |
| 3589 | { | 3588 | { |
| 3590 | if (i) write_string (" ", -1); | 3589 | if (i) write_string (" ", -1); |
| @@ -3644,7 +3643,7 @@ void | |||
| 3644 | mark_backtrace (void) | 3643 | mark_backtrace (void) |
| 3645 | { | 3644 | { |
| 3646 | register struct backtrace *backlist; | 3645 | register struct backtrace *backlist; |
| 3647 | register size_t i; | 3646 | ptrdiff_t i; |
| 3648 | 3647 | ||
| 3649 | for (backlist = backtrace_list; backlist; backlist = backlist->next) | 3648 | for (backlist = backtrace_list; backlist; backlist = backlist->next) |
| 3650 | { | 3649 | { |
| @@ -344,7 +344,7 @@ Symbols are also allowed; their print names are used instead. */) | |||
| 344 | return i1 < SCHARS (s2) ? Qt : Qnil; | 344 | return i1 < SCHARS (s2) ? Qt : Qnil; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | static Lisp_Object concat (size_t nargs, Lisp_Object *args, | 347 | static Lisp_Object concat (ptrdiff_t nargs, Lisp_Object *args, |
| 348 | enum Lisp_Type target_type, int last_special); | 348 | enum Lisp_Type target_type, int last_special); |
| 349 | 349 | ||
| 350 | /* ARGSUSED */ | 350 | /* ARGSUSED */ |
| @@ -374,7 +374,7 @@ The result is a list whose elements are the elements of all the arguments. | |||
| 374 | Each argument may be a list, vector or string. | 374 | Each argument may be a list, vector or string. |
| 375 | The last argument is not copied, just used as the tail of the new list. | 375 | The last argument is not copied, just used as the tail of the new list. |
| 376 | usage: (append &rest SEQUENCES) */) | 376 | usage: (append &rest SEQUENCES) */) |
| 377 | (size_t nargs, Lisp_Object *args) | 377 | (ptrdiff_t nargs, Lisp_Object *args) |
| 378 | { | 378 | { |
| 379 | return concat (nargs, args, Lisp_Cons, 1); | 379 | return concat (nargs, args, Lisp_Cons, 1); |
| 380 | } | 380 | } |
| @@ -384,7 +384,7 @@ DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0, | |||
| 384 | The result is a string whose elements are the elements of all the arguments. | 384 | The result is a string whose elements are the elements of all the arguments. |
| 385 | Each argument may be a string or a list or vector of characters (integers). | 385 | Each argument may be a string or a list or vector of characters (integers). |
| 386 | usage: (concat &rest SEQUENCES) */) | 386 | usage: (concat &rest SEQUENCES) */) |
| 387 | (size_t nargs, Lisp_Object *args) | 387 | (ptrdiff_t nargs, Lisp_Object *args) |
| 388 | { | 388 | { |
| 389 | return concat (nargs, args, Lisp_String, 0); | 389 | return concat (nargs, args, Lisp_String, 0); |
| 390 | } | 390 | } |
| @@ -394,7 +394,7 @@ DEFUN ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, | |||
| 394 | The result is a vector whose elements are the elements of all the arguments. | 394 | The result is a vector whose elements are the elements of all the arguments. |
| 395 | Each argument may be a list, vector or string. | 395 | Each argument may be a list, vector or string. |
| 396 | usage: (vconcat &rest SEQUENCES) */) | 396 | usage: (vconcat &rest SEQUENCES) */) |
| 397 | (size_t nargs, Lisp_Object *args) | 397 | (ptrdiff_t nargs, Lisp_Object *args) |
| 398 | { | 398 | { |
| 399 | return concat (nargs, args, Lisp_Vectorlike, 0); | 399 | return concat (nargs, args, Lisp_Vectorlike, 0); |
| 400 | } | 400 | } |
| @@ -436,13 +436,13 @@ with the original. */) | |||
| 436 | a string and has text properties to be copied. */ | 436 | a string and has text properties to be copied. */ |
| 437 | struct textprop_rec | 437 | struct textprop_rec |
| 438 | { | 438 | { |
| 439 | int argnum; /* refer to ARGS (arguments of `concat') */ | 439 | ptrdiff_t argnum; /* refer to ARGS (arguments of `concat') */ |
| 440 | EMACS_INT from; /* refer to ARGS[argnum] (argument string) */ | 440 | EMACS_INT from; /* refer to ARGS[argnum] (argument string) */ |
| 441 | EMACS_INT to; /* refer to VAL (the target string) */ | 441 | EMACS_INT to; /* refer to VAL (the target string) */ |
| 442 | }; | 442 | }; |
| 443 | 443 | ||
| 444 | static Lisp_Object | 444 | static Lisp_Object |
| 445 | concat (size_t nargs, Lisp_Object *args, | 445 | concat (ptrdiff_t nargs, Lisp_Object *args, |
| 446 | enum Lisp_Type target_type, int last_special) | 446 | enum Lisp_Type target_type, int last_special) |
| 447 | { | 447 | { |
| 448 | Lisp_Object val; | 448 | Lisp_Object val; |
| @@ -452,7 +452,7 @@ concat (size_t nargs, Lisp_Object *args, | |||
| 452 | EMACS_INT toindex_byte = 0; | 452 | EMACS_INT toindex_byte = 0; |
| 453 | register EMACS_INT result_len; | 453 | register EMACS_INT result_len; |
| 454 | register EMACS_INT result_len_byte; | 454 | register EMACS_INT result_len_byte; |
| 455 | register size_t argnum; | 455 | ptrdiff_t argnum; |
| 456 | Lisp_Object last_tail; | 456 | Lisp_Object last_tail; |
| 457 | Lisp_Object prev; | 457 | Lisp_Object prev; |
| 458 | int some_multibyte; | 458 | int some_multibyte; |
| @@ -463,7 +463,7 @@ concat (size_t nargs, Lisp_Object *args, | |||
| 463 | here, and copy the text properties after the concatenation. */ | 463 | here, and copy the text properties after the concatenation. */ |
| 464 | struct textprop_rec *textprops = NULL; | 464 | struct textprop_rec *textprops = NULL; |
| 465 | /* Number of elements in textprops. */ | 465 | /* Number of elements in textprops. */ |
| 466 | int num_textprops = 0; | 466 | ptrdiff_t num_textprops = 0; |
| 467 | USE_SAFE_ALLOCA; | 467 | USE_SAFE_ALLOCA; |
| 468 | 468 | ||
| 469 | tail = Qnil; | 469 | tail = Qnil; |
| @@ -2217,9 +2217,9 @@ DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0, | |||
| 2217 | doc: /* Concatenate any number of lists by altering them. | 2217 | doc: /* Concatenate any number of lists by altering them. |
| 2218 | Only the last argument is not altered, and need not be a list. | 2218 | Only the last argument is not altered, and need not be a list. |
| 2219 | usage: (nconc &rest LISTS) */) | 2219 | usage: (nconc &rest LISTS) */) |
| 2220 | (size_t nargs, Lisp_Object *args) | 2220 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2221 | { | 2221 | { |
| 2222 | register size_t argnum; | 2222 | ptrdiff_t argnum; |
| 2223 | register Lisp_Object tail, tem, val; | 2223 | register Lisp_Object tail, tem, val; |
| 2224 | 2224 | ||
| 2225 | val = tail = Qnil; | 2225 | val = tail = Qnil; |
| @@ -2342,9 +2342,8 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) | |||
| 2342 | { | 2342 | { |
| 2343 | Lisp_Object len; | 2343 | Lisp_Object len; |
| 2344 | register EMACS_INT leni; | 2344 | register EMACS_INT leni; |
| 2345 | int nargs; | 2345 | ptrdiff_t i, nargs; |
| 2346 | register Lisp_Object *args; | 2346 | register Lisp_Object *args; |
| 2347 | register EMACS_INT i; | ||
| 2348 | struct gcpro gcpro1; | 2347 | struct gcpro gcpro1; |
| 2349 | Lisp_Object ret; | 2348 | Lisp_Object ret; |
| 2350 | USE_SAFE_ALLOCA; | 2349 | USE_SAFE_ALLOCA; |
| @@ -2748,7 +2747,7 @@ DEFUN ("widget-apply", Fwidget_apply, Swidget_apply, 2, MANY, 0, | |||
| 2748 | doc: /* Apply the value of WIDGET's PROPERTY to the widget itself. | 2747 | doc: /* Apply the value of WIDGET's PROPERTY to the widget itself. |
| 2749 | ARGS are passed as extra arguments to the function. | 2748 | ARGS are passed as extra arguments to the function. |
| 2750 | usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) | 2749 | usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) |
| 2751 | (size_t nargs, Lisp_Object *args) | 2750 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2752 | { | 2751 | { |
| 2753 | /* This function can GC. */ | 2752 | /* This function can GC. */ |
| 2754 | Lisp_Object newargs[3]; | 2753 | Lisp_Object newargs[3]; |
| @@ -3353,7 +3352,7 @@ static Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; | |||
| 3353 | /* Function prototypes. */ | 3352 | /* Function prototypes. */ |
| 3354 | 3353 | ||
| 3355 | static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); | 3354 | static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); |
| 3356 | static size_t get_key_arg (Lisp_Object, size_t, Lisp_Object *, char *); | 3355 | static ptrdiff_t get_key_arg (Lisp_Object, ptrdiff_t, Lisp_Object *, char *); |
| 3357 | static void maybe_resize_hash_table (struct Lisp_Hash_Table *); | 3356 | static void maybe_resize_hash_table (struct Lisp_Hash_Table *); |
| 3358 | static int sweep_weak_table (struct Lisp_Hash_Table *, int); | 3357 | static int sweep_weak_table (struct Lisp_Hash_Table *, int); |
| 3359 | 3358 | ||
| @@ -3396,10 +3395,10 @@ next_almost_prime (EMACS_INT n) | |||
| 3396 | 0. This function is used to extract a keyword/argument pair from | 3395 | 0. This function is used to extract a keyword/argument pair from |
| 3397 | a DEFUN parameter list. */ | 3396 | a DEFUN parameter list. */ |
| 3398 | 3397 | ||
| 3399 | static size_t | 3398 | static ptrdiff_t |
| 3400 | get_key_arg (Lisp_Object key, size_t nargs, Lisp_Object *args, char *used) | 3399 | get_key_arg (Lisp_Object key, ptrdiff_t nargs, Lisp_Object *args, char *used) |
| 3401 | { | 3400 | { |
| 3402 | size_t i; | 3401 | ptrdiff_t i; |
| 3403 | 3402 | ||
| 3404 | for (i = 1; i < nargs; i++) | 3403 | for (i = 1; i < nargs; i++) |
| 3405 | if (!used[i - 1] && EQ (args[i - 1], key)) | 3404 | if (!used[i - 1] && EQ (args[i - 1], key)) |
| @@ -4297,12 +4296,12 @@ WEAK. WEAK t is equivalent to `key-and-value'. Default value of WEAK | |||
| 4297 | is nil. | 4296 | is nil. |
| 4298 | 4297 | ||
| 4299 | usage: (make-hash-table &rest KEYWORD-ARGS) */) | 4298 | usage: (make-hash-table &rest KEYWORD-ARGS) */) |
| 4300 | (size_t nargs, Lisp_Object *args) | 4299 | (ptrdiff_t nargs, Lisp_Object *args) |
| 4301 | { | 4300 | { |
| 4302 | Lisp_Object test, size, rehash_size, rehash_threshold, weak; | 4301 | Lisp_Object test, size, rehash_size, rehash_threshold, weak; |
| 4303 | Lisp_Object user_test, user_hash; | 4302 | Lisp_Object user_test, user_hash; |
| 4304 | char *used; | 4303 | char *used; |
| 4305 | size_t i; | 4304 | ptrdiff_t i; |
| 4306 | 4305 | ||
| 4307 | /* The vector `used' is used to keep track of arguments that | 4306 | /* The vector `used' is used to keep track of arguments that |
| 4308 | have been consumed. */ | 4307 | have been consumed. */ |
diff --git a/src/font.c b/src/font.c index 326c9d80e44..ecb61ab6a53 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3829,10 +3829,10 @@ be an OpenType font whose GPOS table of `thai' script's default | |||
| 3829 | language system must contain `mark' feature. | 3829 | language system must contain `mark' feature. |
| 3830 | 3830 | ||
| 3831 | usage: (font-spec ARGS...) */) | 3831 | usage: (font-spec ARGS...) */) |
| 3832 | (size_t nargs, Lisp_Object *args) | 3832 | (ptrdiff_t nargs, Lisp_Object *args) |
| 3833 | { | 3833 | { |
| 3834 | Lisp_Object spec = font_make_spec (); | 3834 | Lisp_Object spec = font_make_spec (); |
| 3835 | size_t i; | 3835 | ptrdiff_t i; |
| 3836 | 3836 | ||
| 3837 | for (i = 0; i < nargs; i += 2) | 3837 | for (i = 0; i < nargs; i += 2) |
| 3838 | { | 3838 | { |
diff --git a/src/frame.c b/src/frame.c index 34474417efa..27a31fac3e7 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2807,7 +2807,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) | |||
| 2807 | /* Record in these vectors all the parms specified. */ | 2807 | /* Record in these vectors all the parms specified. */ |
| 2808 | Lisp_Object *parms; | 2808 | Lisp_Object *parms; |
| 2809 | Lisp_Object *values; | 2809 | Lisp_Object *values; |
| 2810 | size_t i, p; | 2810 | ptrdiff_t i, p; |
| 2811 | int left_no_change = 0, top_no_change = 0; | 2811 | int left_no_change = 0, top_no_change = 0; |
| 2812 | int icon_left_no_change = 0, icon_top_no_change = 0; | 2812 | int icon_left_no_change = 0, icon_top_no_change = 0; |
| 2813 | int size_changed = 0; | 2813 | int size_changed = 0; |
diff --git a/src/keyboard.c b/src/keyboard.c index 20ad7d0ce95..e7a0598e839 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1901,7 +1901,7 @@ safe_run_hooks_error (Lisp_Object error_data) | |||
| 1901 | } | 1901 | } |
| 1902 | 1902 | ||
| 1903 | static Lisp_Object | 1903 | static Lisp_Object |
| 1904 | safe_run_hook_funcall (size_t nargs, Lisp_Object *args) | 1904 | safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) |
| 1905 | { | 1905 | { |
| 1906 | eassert (nargs == 1); | 1906 | eassert (nargs == 1); |
| 1907 | if (CONSP (Vinhibit_quit)) | 1907 | if (CONSP (Vinhibit_quit)) |
diff --git a/src/lisp.h b/src/lisp.h index 3f6a84f8fa3..83534e55433 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1039,7 +1039,7 @@ struct Lisp_Subr | |||
| 1039 | Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); | 1039 | Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 1040 | Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); | 1040 | Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 1041 | Lisp_Object (*aUNEVALLED) (Lisp_Object args); | 1041 | Lisp_Object (*aUNEVALLED) (Lisp_Object args); |
| 1042 | Lisp_Object (*aMANY) (size_t, Lisp_Object *); | 1042 | Lisp_Object (*aMANY) (ptrdiff_t, Lisp_Object *); |
| 1043 | } function; | 1043 | } function; |
| 1044 | short min_args, max_args; | 1044 | short min_args, max_args; |
| 1045 | const char *symbol_name; | 1045 | const char *symbol_name; |
| @@ -1896,7 +1896,7 @@ typedef struct { | |||
| 1896 | 1896 | ||
| 1897 | /* Note that the weird token-substitution semantics of ANSI C makes | 1897 | /* Note that the weird token-substitution semantics of ANSI C makes |
| 1898 | this work for MANY and UNEVALLED. */ | 1898 | this work for MANY and UNEVALLED. */ |
| 1899 | #define DEFUN_ARGS_MANY (size_t, Lisp_Object *) | 1899 | #define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *) |
| 1900 | #define DEFUN_ARGS_UNEVALLED (Lisp_Object) | 1900 | #define DEFUN_ARGS_UNEVALLED (Lisp_Object) |
| 1901 | #define DEFUN_ARGS_0 (void) | 1901 | #define DEFUN_ARGS_0 (void) |
| 1902 | #define DEFUN_ARGS_1 (Lisp_Object) | 1902 | #define DEFUN_ARGS_1 (Lisp_Object) |
| @@ -2161,7 +2161,7 @@ struct gcpro | |||
| 2161 | volatile Lisp_Object *var; | 2161 | volatile Lisp_Object *var; |
| 2162 | 2162 | ||
| 2163 | /* Number of consecutive protected variables. */ | 2163 | /* Number of consecutive protected variables. */ |
| 2164 | size_t nvars; | 2164 | ptrdiff_t nvars; |
| 2165 | 2165 | ||
| 2166 | #ifdef DEBUG_GCPRO | 2166 | #ifdef DEBUG_GCPRO |
| 2167 | int level; | 2167 | int level; |
| @@ -2922,9 +2922,9 @@ EXFUN (Frun_hooks, MANY); | |||
| 2922 | EXFUN (Frun_hook_with_args, MANY); | 2922 | EXFUN (Frun_hook_with_args, MANY); |
| 2923 | EXFUN (Frun_hook_with_args_until_failure, MANY); | 2923 | EXFUN (Frun_hook_with_args_until_failure, MANY); |
| 2924 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); | 2924 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 2925 | extern Lisp_Object run_hook_with_args (size_t nargs, Lisp_Object *args, | 2925 | extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, |
| 2926 | Lisp_Object (*funcall) | 2926 | Lisp_Object (*funcall) |
| 2927 | (size_t nargs, Lisp_Object *args)); | 2927 | (ptrdiff_t nargs, Lisp_Object *args)); |
| 2928 | EXFUN (Fprogn, UNEVALLED); | 2928 | EXFUN (Fprogn, UNEVALLED); |
| 2929 | EXFUN (Finteractive_p, 0); | 2929 | EXFUN (Finteractive_p, 0); |
| 2930 | EXFUN (Fthrow, 2) NO_RETURN; | 2930 | EXFUN (Fthrow, 2) NO_RETURN; |
| @@ -2956,7 +2956,7 @@ extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_ | |||
| 2956 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2956 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2957 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2957 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2958 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2958 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2959 | extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (size_t, Lisp_Object *), size_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2959 | extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2960 | extern void specbind (Lisp_Object, Lisp_Object); | 2960 | extern void specbind (Lisp_Object, Lisp_Object); |
| 2961 | extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); | 2961 | extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); |
| 2962 | extern Lisp_Object unbind_to (int, Lisp_Object); | 2962 | extern Lisp_Object unbind_to (int, Lisp_Object); |
| @@ -2966,7 +2966,7 @@ extern void verror (const char *, va_list) | |||
| 2966 | extern void do_autoload (Lisp_Object, Lisp_Object); | 2966 | extern void do_autoload (Lisp_Object, Lisp_Object); |
| 2967 | extern Lisp_Object un_autoload (Lisp_Object); | 2967 | extern Lisp_Object un_autoload (Lisp_Object); |
| 2968 | extern void init_eval_once (void); | 2968 | extern void init_eval_once (void); |
| 2969 | extern Lisp_Object safe_call (size_t, Lisp_Object *); | 2969 | extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object *); |
| 2970 | extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); | 2970 | extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); |
| 2971 | extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); | 2971 | extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 2972 | extern void init_eval (void); | 2972 | extern void init_eval (void); |
| @@ -3348,7 +3348,7 @@ extern void mark_byte_stack (void); | |||
| 3348 | #endif | 3348 | #endif |
| 3349 | extern void unmark_byte_stack (void); | 3349 | extern void unmark_byte_stack (void); |
| 3350 | extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, | 3350 | extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, |
| 3351 | Lisp_Object, int, Lisp_Object *); | 3351 | Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 3352 | 3352 | ||
| 3353 | /* Defined in macros.c */ | 3353 | /* Defined in macros.c */ |
| 3354 | extern Lisp_Object Qexecute_kbd_macro; | 3354 | extern Lisp_Object Qexecute_kbd_macro; |
diff --git a/src/process.c b/src/process.c index 9ff7dd198dd..5a26bf43146 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1272,11 +1272,11 @@ the command through a shell and redirect one of them using the shell | |||
| 1272 | syntax. | 1272 | syntax. |
| 1273 | 1273 | ||
| 1274 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | 1274 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) |
| 1275 | (size_t nargs, register Lisp_Object *args) | 1275 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1276 | { | 1276 | { |
| 1277 | Lisp_Object buffer, name, program, proc, current_dir, tem; | 1277 | Lisp_Object buffer, name, program, proc, current_dir, tem; |
| 1278 | register unsigned char **new_argv; | 1278 | register unsigned char **new_argv; |
| 1279 | register size_t i; | 1279 | ptrdiff_t i; |
| 1280 | int count = SPECPDL_INDEX (); | 1280 | int count = SPECPDL_INDEX (); |
| 1281 | 1281 | ||
| 1282 | buffer = args[1]; | 1282 | buffer = args[1]; |
| @@ -2436,7 +2436,7 @@ Examples: | |||
| 2436 | \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) | 2436 | \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) |
| 2437 | 2437 | ||
| 2438 | usage: (serial-process-configure &rest ARGS) */) | 2438 | usage: (serial-process-configure &rest ARGS) */) |
| 2439 | (size_t nargs, Lisp_Object *args) | 2439 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2440 | { | 2440 | { |
| 2441 | struct Lisp_Process *p; | 2441 | struct Lisp_Process *p; |
| 2442 | Lisp_Object contact = Qnil; | 2442 | Lisp_Object contact = Qnil; |
| @@ -2554,7 +2554,7 @@ Examples: | |||
| 2554 | \(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) | 2554 | \(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) |
| 2555 | 2555 | ||
| 2556 | usage: (make-serial-process &rest ARGS) */) | 2556 | usage: (make-serial-process &rest ARGS) */) |
| 2557 | (size_t nargs, Lisp_Object *args) | 2557 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2558 | { | 2558 | { |
| 2559 | int fd = -1; | 2559 | int fd = -1; |
| 2560 | Lisp_Object proc, contact, port; | 2560 | Lisp_Object proc, contact, port; |
| @@ -2832,7 +2832,7 @@ The original argument list, modified with the actual connection | |||
| 2832 | information, is available via the `process-contact' function. | 2832 | information, is available via the `process-contact' function. |
| 2833 | 2833 | ||
| 2834 | usage: (make-network-process &rest ARGS) */) | 2834 | usage: (make-network-process &rest ARGS) */) |
| 2835 | (size_t nargs, Lisp_Object *args) | 2835 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2836 | { | 2836 | { |
| 2837 | Lisp_Object proc; | 2837 | Lisp_Object proc; |
| 2838 | Lisp_Object contact; | 2838 | Lisp_Object contact; |
| @@ -3148,7 +3148,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3148 | 3148 | ||
| 3149 | for (lres = res; lres; lres = lres->ai_next) | 3149 | for (lres = res; lres; lres = lres->ai_next) |
| 3150 | { | 3150 | { |
| 3151 | size_t optn; | 3151 | ptrdiff_t optn; |
| 3152 | int optbits; | 3152 | int optbits; |
| 3153 | 3153 | ||
| 3154 | #ifdef WINDOWSNT | 3154 | #ifdef WINDOWSNT |
diff --git a/src/xdisp.c b/src/xdisp.c index ad99fd41ffb..5a0b0060fa3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2138,7 +2138,7 @@ safe_eval_handler (Lisp_Object arg) | |||
| 2138 | redisplay during the evaluation. */ | 2138 | redisplay during the evaluation. */ |
| 2139 | 2139 | ||
| 2140 | Lisp_Object | 2140 | Lisp_Object |
| 2141 | safe_call (size_t nargs, Lisp_Object *args) | 2141 | safe_call (ptrdiff_t nargs, Lisp_Object *args) |
| 2142 | { | 2142 | { |
| 2143 | Lisp_Object val; | 2143 | Lisp_Object val; |
| 2144 | 2144 | ||
| @@ -16571,7 +16571,7 @@ With ARG, turn tracing on if and only if ARG is positive. */) | |||
| 16571 | DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", | 16571 | DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", |
| 16572 | doc: /* Like `format', but print result to stderr. | 16572 | doc: /* Like `format', but print result to stderr. |
| 16573 | usage: (trace-to-stderr STRING &rest OBJECTS) */) | 16573 | usage: (trace-to-stderr STRING &rest OBJECTS) */) |
| 16574 | (size_t nargs, Lisp_Object *args) | 16574 | (ptrdiff_t nargs, Lisp_Object *args) |
| 16575 | { | 16575 | { |
| 16576 | Lisp_Object s = Fformat (nargs, args); | 16576 | Lisp_Object s = Fformat (nargs, args); |
| 16577 | fprintf (stderr, "%s", SDATA (s)); | 16577 | fprintf (stderr, "%s", SDATA (s)); |