Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c5101a77
Commit
c5101a77
authored
Mar 26, 2011
by
Paul Eggert
Browse files
Variadic C functions now count arguments with size_t, not int.
parent
dd3f25f7
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
208 additions
and
181 deletions
+208
-181
src/ChangeLog
src/ChangeLog
+19
-0
src/alloc.c
src/alloc.c
+7
-7
src/callint.c
src/callint.c
+3
-2
src/callproc.c
src/callproc.c
+7
-7
src/character.c
src/character.c
+6
-4
src/charset.c
src/charset.c
+4
-3
src/coding.c
src/coding.c
+9
-9
src/data.c
src/data.c
+16
-15
src/dbusbind.c
src/dbusbind.c
+26
-25
src/editfns.c
src/editfns.c
+19
-19
src/eval.c
src/eval.c
+43
-39
src/fns.c
src/fns.c
+30
-33
src/font.c
src/font.c
+2
-2
src/frame.c
src/frame.c
+2
-2
src/lisp.h
src/lisp.h
+5
-5
src/process.c
src/process.c
+8
-7
src/xdisp.c
src/xdisp.c
+2
-2
No files found.
src/ChangeLog
View file @
c5101a77
2011-03-27 Paul Eggert <eggert@cs.ucla.edu>
Variadic C functions now count arguments with size_t, not int.
This avoids an unnecessary limitation on 64-bit machines, which
caused (substring ...) to crash on large vectors (Bug#8344).
* lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
(DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
All variadic functions changed accordingly.
(struct gcpro.nvars): Now size_t, not int. All uses changed.
* data.c (arith_driver, float_arith_driver): Likewise.
* editfns.c (general_insert_function): Likewise.
* eval.c (struct backtrace.nargs, interactive_p)
(internal_condition_case_n, run_hook_with_args, apply_lambda)
(funcall_lambda, mark_backtrace): Likewise.
* fns.c (concat): Likewise.
* frame.c (x_set_frame_parameters): Likewise.
* fns.c (get_key_arg): Now accepts and returns size_t, and returns
0 if not found, not -1. All callers changed.
2011-03-26 Paul Eggert <eggert@cs.ucla.edu>
* alloc.c (garbage_collect): Don't assume stack size fits in int.
src/alloc.c
View file @
c5101a77
...
...
@@ -2707,7 +2707,7 @@ DEFUN ("list", Flist, Slist, 0, MANY, 0,
doc
:
/* Return a newly created list with specified arguments as elements.
Any number of arguments, even zero arguments, are allowed.
usage: (list &rest OBJECTS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
register
Lisp_Object
val
;
val
=
Qnil
;
...
...
@@ -2923,10 +2923,10 @@ DEFUN ("vector", Fvector, Svector, 0, MANY, 0,
doc
:
/* Return a newly created vector with specified arguments as elements.
Any number of arguments, even zero arguments, are allowed.
usage: (vector &rest OBJECTS) */
)
(
register
in
t
nargs
,
Lisp_Object
*
args
)
(
register
size_
t
nargs
,
Lisp_Object
*
args
)
{
register
Lisp_Object
len
,
val
;
register
in
t
i
;
register
size_
t
i
;
register
struct
Lisp_Vector
*
p
;
XSETFASTINT
(
len
,
nargs
);
...
...
@@ -2945,10 +2945,10 @@ stack size, (optional) doc string, and (optional) interactive spec.
The first four arguments are required; at most six have any
significance.
usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */
)
(
register
in
t
nargs
,
Lisp_Object
*
args
)
(
register
size_
t
nargs
,
Lisp_Object
*
args
)
{
register
Lisp_Object
len
,
val
;
register
in
t
i
;
register
size_
t
i
;
register
struct
Lisp_Vector
*
p
;
XSETFASTINT
(
len
,
nargs
);
...
...
@@ -4230,7 +4230,7 @@ static void
check_gcpros
(
void
)
{
struct
gcpro
*
p
;
in
t
i
;
size_
t
i
;
for
(
p
=
gcprolist
;
p
;
p
=
p
->
next
)
for
(
i
=
0
;
i
<
p
->
nvars
;
++
i
)
...
...
@@ -4839,7 +4839,7 @@ returns nil, because real GC can't be done. */)
{
register
struct
specbinding
*
bind
;
char
stack_top_variable
;
register
in
t
i
;
register
size_
t
i
;
int
message_p
;
Lisp_Object
total
[
8
];
int
count
=
SPECPDL_INDEX
();
...
...
src/callint.c
View file @
c5101a77
...
...
@@ -265,8 +265,9 @@ invoke it. If KEYS is omitted or nil, the return value of
recorded as a call to the function named callint_argfuns[varies[i]]. */
int
*
varies
;
register
int
i
,
j
;
int
count
,
foo
;
register
size_t
i
,
j
;
size_t
count
;
int
foo
;
char
prompt1
[
100
];
char
*
tem1
;
int
arg_from_tty
=
0
;
...
...
src/callproc.c
View file @
c5101a77
...
...
@@ -177,7 +177,7 @@ and returns a numeric exit status or a signal description string.
If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
infile
,
buffer
,
current_dir
,
path
;
volatile
int
display_p_volatile
;
...
...
@@ -221,7 +221,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
/* Decide the coding-system for giving arguments. */
{
Lisp_Object
val
,
*
args2
;
in
t
i
;
size_
t
i
;
/* If arguments are supplied, we may have to encode them. */
if
(
nargs
>=
5
)
...
...
@@ -373,10 +373,10 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
path
=
Fsubstring
(
path
,
make_number
(
2
),
Qnil
);
new_argv_volatile
=
new_argv
=
(
const
unsigned
char
**
)
alloca
(
max
(
2
,
nargs
-
2
)
*
sizeof
(
char
*
));
alloca
(
(
nargs
>
4
?
nargs
-
2
:
2
)
*
sizeof
(
char
*
));
if
(
nargs
>
4
)
{
register
in
t
i
;
register
size_
t
i
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
,
gcpro4
,
gcpro5
;
GCPRO5
(
infile
,
buffer
,
current_dir
,
path
,
error_file
);
...
...
@@ -643,7 +643,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
{
if
(
EQ
(
coding_systems
,
Qt
))
{
in
t
i
;
size_
t
i
;
args2
=
(
Lisp_Object
*
)
alloca
((
nargs
+
1
)
*
sizeof
*
args2
);
args2
[
0
]
=
Qcall_process
;
...
...
@@ -864,7 +864,7 @@ and returns a numeric exit status or a signal description string.
If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
struct
gcpro
gcpro1
;
Lisp_Object
filename_string
;
...
...
@@ -873,7 +873,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
/* Qt denotes we have not yet called Ffind_operation_coding_system. */
Lisp_Object
coding_systems
;
Lisp_Object
val
,
*
args2
;
in
t
i
;
size_
t
i
;
char
*
tempfile
;
Lisp_Object
tmpdir
,
pattern
;
...
...
src/character.c
View file @
c5101a77
...
...
@@ -893,9 +893,10 @@ DEFUN ("string", Fstring, Sstring, 0, MANY, 0,
doc
:
/*
Concatenate all the argument characters and make the result a string.
usage: (string &rest CHARACTERS) */
)
(
in
t
n
,
Lisp_Object
*
args
)
(
size_
t
n
,
Lisp_Object
*
args
)
{
int
i
,
c
;
size_t
i
;
int
c
;
unsigned
char
*
buf
,
*
p
;
Lisp_Object
str
;
USE_SAFE_ALLOCA
;
...
...
@@ -918,9 +919,10 @@ usage: (string &rest CHARACTERS) */)
DEFUN
(
"unibyte-string"
,
Funibyte_string
,
Sunibyte_string
,
0
,
MANY
,
0
,
doc
:
/* Concatenate all the argument bytes and make the result a unibyte string.
usage: (unibyte-string &rest BYTES) */
)
(
in
t
n
,
Lisp_Object
*
args
)
(
size_
t
n
,
Lisp_Object
*
args
)
{
int
i
,
c
;
size_t
i
;
int
c
;
unsigned
char
*
buf
,
*
p
;
Lisp_Object
str
;
USE_SAFE_ALLOCA
;
...
...
src/charset.c
View file @
c5101a77
...
...
@@ -845,7 +845,7 @@ DEFUN ("define-charset-internal", Fdefine_charset_internal,
Sdefine_charset_internal
,
charset_arg_max
,
MANY
,
0
,
doc
:
/* For internal use only.
usage: (define-charset-internal ...) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
/* Charset attr vector. */
Lisp_Object
attrs
;
...
...
@@ -2171,11 +2171,12 @@ DEFUN ("set-charset-priority", Fset_charset_priority, Sset_charset_priority,
1
,
MANY
,
0
,
doc
:
/* Assign higher priority to the charsets given as arguments.
usage: (set-charset-priority &rest charsets) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
Lisp_Object
new_head
,
old_list
,
arglist
[
2
];
Lisp_Object
list_2022
,
list_emacs_mule
;
int
i
,
id
;
size_t
i
;
int
id
;
old_list
=
Fcopy_sequence
(
Vcharset_ordered_list
);
new_head
=
Qnil
;
...
...
src/coding.c
View file @
c5101a77
...
...
@@ -9300,7 +9300,7 @@ function to call for FILENAME, that function should examine the
contents of BUFFER instead of reading the file.
usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
(
in
t nargs, Lisp_Object *args)
(
size_
t nargs, Lisp_Object *args)
{
Lisp_Object operation, target_idx, target, val;
register Lisp_Object chain;
...
...
@@ -9309,17 +9309,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
error ("Too few arguments");
operation = args[0];
if (!SYMBOLP (operation)
|| !
INTEGER
P (target_idx = Fget (operation, Qtarget_idx)))
|| !
NATNUM
P (target_idx = Fget (operation, Qtarget_idx)))
error ("Invalid first argument");
if (nargs < 1 + XINT (target_idx))
if (nargs < 1 + X
FAST
INT (target_idx))
error ("Too few arguments for operation: %s",
SDATA (SYMBOL_NAME (operation)));
target = args[XINT (target_idx) + 1];
target = args[X
FAST
INT (target_idx) + 1];
if (!(STRINGP (target)
|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
&& STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
error ("Invalid %dth argument", XINT (target_idx) + 1);
error ("Invalid %dth argument", X
FAST
INT (target_idx) + 1);
if (CONSP (target))
target = XCAR (target);
...
...
@@ -9376,9 +9376,9 @@ If multiple coding systems belong to the same category,
all but the first one are ignored.
usage: (set-coding-system-priority &rest coding-systems) */)
(
in
t nargs, Lisp_Object *args)
(
size_
t nargs, Lisp_Object *args)
{
in
t i, j;
size_
t i, j;
int changed[coding_category_max];
enum coding_category priorities[coding_category_max];
...
...
@@ -9421,7 +9421,7 @@ usage: (set-coding-system-priority &rest coding-systems) */)
/* Update `coding-category-list'. */
Vcoding_category_list = Qnil;
for (i = coding_category_max
- 1
; i >
=
0;
i--
)
for (i = coding_category_max; i
--
> 0; )
Vcoding_category_list
= Fcons (AREF (Vcoding_category_table, priorities[i]),
Vcoding_category_list);
...
...
@@ -9482,7 +9482,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal,
Sdefine_coding_system_internal, coding_arg_max, MANY, 0,
doc: /* For internal use only.
usage: (define-coding-system-internal ...) */)
(
in
t nargs, Lisp_Object *args)
(
size_
t nargs, Lisp_Object *args)
{
Lisp_Object name;
Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */
...
...
src/data.c
View file @
c5101a77
...
...
@@ -2474,13 +2474,13 @@ enum arithop
Amin
};
static
Lisp_Object
float_arith_driver
(
double
,
in
t
,
enum
arithop
,
in
t
,
Lisp_Object
*
);
static
Lisp_Object
float_arith_driver
(
double
,
size_
t
,
enum
arithop
,
size_
t
,
Lisp_Object
*
);
static
Lisp_Object
arith_driver
(
enum
arithop
code
,
in
t
nargs
,
register
Lisp_Object
*
args
)
arith_driver
(
enum
arithop
code
,
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
register
Lisp_Object
val
;
register
in
t
argnum
;
register
size_
t
argnum
;
register
EMACS_INT
accum
=
0
;
register
EMACS_INT
next
;
...
...
@@ -2562,7 +2562,8 @@ arith_driver (enum arithop code, int nargs, register Lisp_Object *args)
#define isnan(x) ((x) != (x))
static
Lisp_Object
float_arith_driver
(
double
accum
,
register
int
argnum
,
enum
arithop
code
,
int
nargs
,
register
Lisp_Object
*
args
)
float_arith_driver
(
double
accum
,
register
size_t
argnum
,
enum
arithop
code
,
size_t
nargs
,
register
Lisp_Object
*
args
)
{
register
Lisp_Object
val
;
double
next
;
...
...
@@ -2624,7 +2625,7 @@ float_arith_driver (double accum, register int argnum, enum arithop code, int na
DEFUN
(
"+"
,
Fplus
,
Splus
,
0
,
MANY
,
0
,
doc
:
/* Return sum of any number of arguments, which are numbers or markers.
usage: (+ &rest NUMBERS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Aadd
,
nargs
,
args
);
}
...
...
@@ -2634,7 +2635,7 @@ DEFUN ("-", Fminus, Sminus, 0, MANY, 0,
With one arg, negates it. With more than one arg,
subtracts all but the first from the first.
usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Asub
,
nargs
,
args
);
}
...
...
@@ -2642,7 +2643,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */)
DEFUN
(
"*"
,
Ftimes
,
Stimes
,
0
,
MANY
,
0
,
doc
:
/* Return product of any number of arguments, which are numbers or markers.
usage: (* &rest NUMBERS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Amult
,
nargs
,
args
);
}
...
...
@@ -2651,9 +2652,9 @@ DEFUN ("/", Fquo, Squo, 2, MANY, 0,
doc
:
/* Return first argument divided by all the remaining arguments.
The arguments must be numbers or markers.
usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
in
t
argnum
;
size_
t
argnum
;
for
(
argnum
=
2
;
argnum
<
nargs
;
argnum
++
)
if
(
FLOATP
(
args
[
argnum
]))
return
float_arith_driver
(
0
,
0
,
Adiv
,
nargs
,
args
);
...
...
@@ -2735,7 +2736,7 @@ DEFUN ("max", Fmax, Smax, 1, MANY, 0,
doc
:
/* Return largest of all the arguments (which must be numbers or markers).
The value is always a number; markers are converted to numbers.
usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Amax
,
nargs
,
args
);
}
...
...
@@ -2744,7 +2745,7 @@ DEFUN ("min", Fmin, Smin, 1, MANY, 0,
doc
:
/* Return smallest of all the arguments (which must be numbers or markers).
The value is always a number; markers are converted to numbers.
usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Amin
,
nargs
,
args
);
}
...
...
@@ -2753,7 +2754,7 @@ DEFUN ("logand", Flogand, Slogand, 0, MANY, 0,
doc
:
/* Return bitwise-and of all the arguments.
Arguments may be integers, or markers converted to integers.
usage: (logand &rest INTS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Alogand
,
nargs
,
args
);
}
...
...
@@ -2762,7 +2763,7 @@ DEFUN ("logior", Flogior, Slogior, 0, MANY, 0,
doc
:
/* Return bitwise-or of all the arguments.
Arguments may be integers, or markers converted to integers.
usage: (logior &rest INTS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Alogior
,
nargs
,
args
);
}
...
...
@@ -2771,7 +2772,7 @@ DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,
doc
:
/* Return bitwise-exclusive-or of all the arguments.
Arguments may be integers, or markers converted to integers.
usage: (logxor &rest INTS-OR-MARKERS) */
)
(
in
t
nargs
,
Lisp_Object
*
args
)
(
size_
t
nargs
,
Lisp_Object
*
args
)
{
return
arith_driver
(
Alogxor
,
nargs
,
args
);
}
...
...
src/dbusbind.c
View file @
c5101a77
...
...
@@ -1051,7 +1051,7 @@ object is returned instead of a list containing this single Lisp object.
=> "i686"
usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
service
,
path
,
interface
,
method
;
Lisp_Object
result
;
...
...
@@ -1063,7 +1063,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI
DBusError
derror
;
unsigned
int
dtype
;
int
timeout
=
-
1
;
in
t
i
=
5
;
size_
t
i
=
5
;
char
signature
[
DBUS_MAXIMUM_SIGNATURE_LENGTH
];
/* Check parameters. */
...
...
@@ -1116,7 +1116,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
+
1
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s %s"
,
i
-
4
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s %s"
,
(
unsigned
long
)
(
i
-
4
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)),
SDATA
(
format2
(
"%s"
,
args
[
i
+
1
],
Qnil
)));
++
i
;
...
...
@@ -1124,7 +1124,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI
else
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s"
,
i
-
4
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s"
,
(
unsigned
long
)
(
i
-
4
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)));
}
...
...
@@ -1233,7 +1233,7 @@ HANDLER is called.
-| i686
usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
service
,
path
,
interface
,
method
,
handler
;
Lisp_Object
result
;
...
...
@@ -1243,7 +1243,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
DBusMessageIter
iter
;
unsigned
int
dtype
;
int
timeout
=
-
1
;
in
t
i
=
6
;
size_
t
i
=
6
;
char
signature
[
DBUS_MAXIMUM_SIGNATURE_LENGTH
];
/* Check parameters. */
...
...
@@ -1298,7 +1298,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
+
1
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s %s"
,
i
-
4
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s %s"
,
(
unsigned
long
)
(
i
-
4
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)),
SDATA
(
format2
(
"%s"
,
args
[
i
+
1
],
Qnil
)));
++
i
;
...
...
@@ -1306,7 +1306,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
else
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s"
,
i
-
4
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s"
,
(
unsigned
long
)
(
i
-
4
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)));
}
...
...
@@ -1357,7 +1357,7 @@ DEFUN ("dbus-method-return-internal", Fdbus_method_return_internal,
This is an internal function, it shall not be used outside dbus.el.
usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
serial
,
service
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
;
...
...
@@ -1365,7 +1365,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */)
DBusMessage
*
dmessage
;
DBusMessageIter
iter
;
unsigned
int
dtype
;
in
t
i
;
size_
t
i
;
char
signature
[
DBUS_MAXIMUM_SIGNATURE_LENGTH
];
/* Check parameters. */
...
...
@@ -1405,7 +1405,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */)
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
+
1
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s %s"
,
i
-
2
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s %s"
,
(
unsigned
long
)
(
i
-
2
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)),
SDATA
(
format2
(
"%s"
,
args
[
i
+
1
],
Qnil
)));
++
i
;
...
...
@@ -1413,7 +1413,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */)
else
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s"
,
i
-
2
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s"
,
(
unsigned
long
)
(
i
-
2
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)));
}
...
...
@@ -1445,7 +1445,7 @@ DEFUN ("dbus-method-error-internal", Fdbus_method_error_internal,
This is an internal function, it shall not be used outside dbus.el.
usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
serial
,
service
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
;
...
...
@@ -1453,7 +1453,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */)
DBusMessage
*
dmessage
;
DBusMessageIter
iter
;
unsigned
int
dtype
;
in
t
i
;
size_
t
i
;
char
signature
[
DBUS_MAXIMUM_SIGNATURE_LENGTH
];
/* Check parameters. */
...
...
@@ -1494,7 +1494,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */)
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
+
1
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s %s"
,
i
-
2
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s %s"
,
(
unsigned
long
)
(
i
-
2
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)),
SDATA
(
format2
(
"%s"
,
args
[
i
+
1
],
Qnil
)));
++
i
;
...
...
@@ -1502,7 +1502,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */)
else
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s"
,
i
-
2
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s"
,
(
unsigned
long
)
(
i
-
2
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)));
}
...
...
@@ -1557,7 +1557,7 @@ type symbols, see Info node `(dbus)Type Conversion'.
"org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs")
usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
service
,
path
,
interface
,
signal
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
,
gcpro4
,
gcpro5
;
...
...
@@ -1565,7 +1565,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */)
DBusMessage
*
dmessage
;
DBusMessageIter
iter
;
unsigned
int
dtype
;
in
t
i
;
size_
t
i
;
char
signature
[
DBUS_MAXIMUM_SIGNATURE_LENGTH
];
/* Check parameters. */
...
...
@@ -1609,7 +1609,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */)
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
+
1
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s %s"
,
i
-
4
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s %s"
,
(
unsigned
long
)
(
i
-
4
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)),
SDATA
(
format2
(
"%s"
,
args
[
i
+
1
],
Qnil
)));
++
i
;
...
...
@@ -1617,7 +1617,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */)
else
{
XD_DEBUG_VALID_LISP_OBJECT_P
(
args
[
i
]);
XD_DEBUG_MESSAGE
(
"Parameter%
d
%s"
,
i
-
4
,
XD_DEBUG_MESSAGE
(
"Parameter%
lu
%s"
,
(
unsigned
long
)
(
i
-
4
)
,
SDATA
(
format2
(
"%s"
,
args
[
i
],
Qnil
)));
}
...
...
@@ -1885,11 +1885,11 @@ placed in the queue.
=> :already-owner.
usage: (dbus-register-service BUS SERVICE &rest FLAGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
service
;
DBusConnection
*
connection
;
unsigned
in
t
i
;
size_
t
i
;
unsigned
int
value
;
unsigned
int
flags
=
0
;
int
result
;
...
...
@@ -1985,13 +1985,13 @@ INTERFACE, SIGNAL and HANDLER must not be nil. Example:
`dbus-unregister-object' for removing the registration.
usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
Lisp_Object
bus
,
service
,
path
,
interface
,
signal
,
handler
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
,
gcpro4
,
gcpro5
,
gcpro6
;
Lisp_Object
uname
,
key
,
key1
,
value
;
DBusConnection
*
connection
;
in
t
i
;
size_
t
i
;
char
rule
[
DBUS_MAXIMUM_MATCH_RULE_LENGTH
];
char
x
[
DBUS_MAXIMUM_MATCH_RULE_LENGTH
];
DBusError
derror
;
...
...
@@ -2061,7 +2061,8 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG
if
(
!
NILP
(
args
[
i
]))
{
CHECK_STRING
(
args
[
i
]);
sprintf
(
x
,
",arg%d='%s'"
,
i
-
6
,
SDATA
(
args
[
i
]));
sprintf
(
x
,
",arg%lu='%s'"
,
(
unsigned
long
)
(
i
-
6
),
SDATA
(
args
[
i
]));
strcat
(
rule
,
x
);
}
...
...
src/editfns.c
View file @
c5101a77
...
...
@@ -101,7 +101,7 @@ static void general_insert_function (void (*) (const char *, EMACS_INT),
void
(
*
)
(
Lisp_Object
,
EMACS_INT
,
EMACS_INT
,
EMACS_INT
,
EMACS_INT
,
int
),
int
,
in
t
,
Lisp_Object
*
);
int
,
size_
t
,
Lisp_Object
*
);
static
Lisp_Object
subst_char_in_region_unwind
(
Lisp_Object
);
static
Lisp_Object
subst_char_in_region_unwind_1
(
Lisp_Object
);
static
void
transpose_markers
(
EMACS_INT
,
EMACS_INT
,
EMACS_INT
,
EMACS_INT
,
...
...
@@ -1871,7 +1871,7 @@ Years before 1970 are not guaranteed to work. On some systems,
year values as low as 1901 do work.
usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
time_t
value
;
struct
tm
tm
;
...
...
@@ -2207,9 +2207,9 @@ general_insert_function (void (*insert_func)
void
(
*
insert_from_string_func
)
(
Lisp_Object
,
EMACS_INT
,
EMACS_INT
,
EMACS_INT
,
EMACS_INT
,
int
),
int
inherit
,
in
t
nargs
,
Lisp_Object
*
args
)
int
inherit
,
size_
t
nargs
,
Lisp_Object
*
args
)
{
register
in
t
argnum
;
register
size_
t
argnum
;
register
Lisp_Object
val
;
for
(
argnum
=
0
;
argnum
<
nargs
;
argnum
++
)
...
...
@@ -2272,7 +2272,7 @@ buffer; to accomplish this, apply `string-as-multibyte' to the string
and insert the result.
usage: (insert &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
general_insert_function
(
insert
,
insert_from_string
,
0
,
nargs
,
args
);
return
Qnil
;
...
...
@@ -2291,7 +2291,7 @@ If the current buffer is unibyte, multibyte strings are converted
to unibyte for insertion.
usage: (insert-and-inherit &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
general_insert_function
(
insert_and_inherit
,
insert_from_string
,
1
,
nargs
,
args
);
...
...
@@ -2308,7 +2308,7 @@ If the current buffer is unibyte, multibyte strings are converted
to unibyte for insertion.
usage: (insert-before-markers &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)
{
general_insert_function
(
insert_before_markers
,
insert_from_string_before_markers
,
0
,
...
...
@@ -2327,7 +2327,7 @@ If the current buffer is unibyte, multibyte strings are converted
to unibyte for insertion.
usage: (insert-before-markers-and-inherit &rest ARGS) */
)
(
in
t
nargs
,
register
Lisp_Object
*
args
)
(
size_
t
nargs
,
register
Lisp_Object
*
args
)