Commit dc22f25e authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(printchar): Declare `work' as unsigned char.

(internal_with_output_to_temp_buffer): Protoype parameter
FUNCTION.
(Ferror_message_string): Remove extra argument of
print_error_message.
(write_string): Define as returning nothing.
(write_string_1): Likewise.
(print_error_message): Likewise.
parent 9d815fd9
...@@ -318,7 +318,7 @@ printchar (ch, fun) ...@@ -318,7 +318,7 @@ printchar (ch, fun)
if (EQ (fun, Qnil)) if (EQ (fun, Qnil))
{ {
int len; int len;
char work[4], *str; unsigned char work[4], *str;
QUIT; QUIT;
len = CHAR_STRING (ch, work, str); len = CHAR_STRING (ch, work, str);
...@@ -483,6 +483,7 @@ strout (ptr, size, printcharfun) ...@@ -483,6 +483,7 @@ strout (ptr, size, printcharfun)
It isn't safe to use strout in many cases, It isn't safe to use strout in many cases,
because printing one char can relocate. */ because printing one char can relocate. */
void
print_string (string, printcharfun) print_string (string, printcharfun)
Lisp_Object string; Lisp_Object string;
Lisp_Object printcharfun; Lisp_Object printcharfun;
...@@ -524,6 +525,7 @@ PRINTCHARFUN defaults to the value of `standard-output' (which see).") ...@@ -524,6 +525,7 @@ PRINTCHARFUN defaults to the value of `standard-output' (which see).")
on the default output stream. on the default output stream.
Do not use this on the contents of a Lisp string. */ Do not use this on the contents of a Lisp string. */
void
write_string (data, size) write_string (data, size)
char *data; char *data;
int size; int size;
...@@ -542,6 +544,7 @@ write_string (data, size) ...@@ -542,6 +544,7 @@ write_string (data, size)
on a specified stream PRINTCHARFUN. on a specified stream PRINTCHARFUN.
Do not use this on the contents of a Lisp string. */ Do not use this on the contents of a Lisp string. */
void
write_string_1 (data, size, printcharfun) write_string_1 (data, size, printcharfun)
char *data; char *data;
int size; int size;
...@@ -579,7 +582,7 @@ temp_output_buffer_setup (bufname) ...@@ -579,7 +582,7 @@ temp_output_buffer_setup (bufname)
Lisp_Object Lisp_Object
internal_with_output_to_temp_buffer (bufname, function, args) internal_with_output_to_temp_buffer (bufname, function, args)
char *bufname; char *bufname;
Lisp_Object (*function) (); Lisp_Object (*function) P_ ((Lisp_Object));
Lisp_Object args; Lisp_Object args;
{ {
int count = specpdl_ptr - specpdl; int count = specpdl_ptr - specpdl;
...@@ -820,7 +823,7 @@ DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, ...@@ -820,7 +823,7 @@ DEFUN ("error-message-string", Ferror_message_string, Serror_message_string,
&& NILP (XCONS (XCONS (obj)->cdr)->cdr)) && NILP (XCONS (XCONS (obj)->cdr)->cdr))
return XCONS (XCONS (obj)->cdr)->car; return XCONS (XCONS (obj)->cdr)->car;
print_error_message (obj, Vprin1_to_string_buffer, NULL); print_error_message (obj, Vprin1_to_string_buffer);
set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); set_buffer_internal (XBUFFER (Vprin1_to_string_buffer));
value = Fbuffer_string (); value = Fbuffer_string ();
...@@ -836,6 +839,7 @@ DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, ...@@ -836,6 +839,7 @@ DEFUN ("error-message-string", Ferror_message_string, Serror_message_string,
/* Print an error message for the error DATA /* Print an error message for the error DATA
onto Lisp output stream STREAM (suitable for the print functions). */ onto Lisp output stream STREAM (suitable for the print functions). */
void
print_error_message (data, stream) print_error_message (data, stream)
Lisp_Object data, stream; Lisp_Object data, stream;
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment