diff options
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 94 |
1 files changed, 27 insertions, 67 deletions
diff --git a/src/print.c b/src/print.c index dedd58b99e3..76ce467eed0 100644 --- a/src/print.c +++ b/src/print.c @@ -168,7 +168,7 @@ extern int noninteractive_need_newline; extern int minibuffer_auto_raise; -void print_interval (); +void print_interval (INTERVAL interval, Lisp_Object printcharfun); /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ int print_output_debug_flag = 1; @@ -287,8 +287,7 @@ int print_output_debug_flag = 1; when there is a recursive call to print. */ static Lisp_Object -print_unwind (saved_text) - Lisp_Object saved_text; +print_unwind (Lisp_Object saved_text) { bcopy (SDATA (saved_text), print_buffer, SCHARS (saved_text)); return Qnil; @@ -301,9 +300,7 @@ print_unwind (saved_text) argument. */ static void -printchar (ch, fun) - unsigned int ch; - Lisp_Object fun; +printchar (unsigned int ch, Lisp_Object fun) { if (!NILP (fun) && !EQ (fun, Qt)) call1 (fun, make_number (ch)); @@ -353,11 +350,7 @@ printchar (ch, fun) to data in a Lisp string. Otherwise that is not safe. */ static void -strout (ptr, size, size_byte, printcharfun, multibyte) - char *ptr; - int size, size_byte; - Lisp_Object printcharfun; - int multibyte; +strout (char *ptr, int size, int size_byte, Lisp_Object printcharfun, int multibyte) { if (size < 0) size_byte = size = strlen (ptr); @@ -440,9 +433,7 @@ strout (ptr, size, size_byte, printcharfun, multibyte) because printing one char can relocate. */ static void -print_string (string, printcharfun) - Lisp_Object string; - Lisp_Object printcharfun; +print_string (Lisp_Object string, Lisp_Object printcharfun) { if (EQ (printcharfun, Qt) || NILP (printcharfun)) { @@ -549,9 +540,7 @@ PRINTCHARFUN defaults to the value of `standard-output' (which see). */) Do not use this on the contents of a Lisp string. */ void -write_string (data, size) - char *data; - int size; +write_string (char *data, int size) { PRINTDECLARE; Lisp_Object printcharfun; @@ -568,10 +557,7 @@ write_string (data, size) Do not use this on the contents of a Lisp string. */ void -write_string_1 (data, size, printcharfun) - char *data; - int size; - Lisp_Object printcharfun; +write_string_1 (char *data, int size, Lisp_Object printcharfun) { PRINTDECLARE; @@ -582,8 +568,7 @@ write_string_1 (data, size, printcharfun) void -temp_output_buffer_setup (bufname) - const char *bufname; +temp_output_buffer_setup (const char *bufname) { int count = SPECPDL_INDEX (); register struct buffer *old = current_buffer; @@ -616,10 +601,7 @@ temp_output_buffer_setup (bufname) } Lisp_Object -internal_with_output_to_temp_buffer (bufname, function, args) - const char *bufname; - Lisp_Object (*function) (Lisp_Object); - Lisp_Object args; +internal_with_output_to_temp_buffer (const char *bufname, Lisp_Object (*function) (Lisp_Object), Lisp_Object args) { int count = SPECPDL_INDEX (); Lisp_Object buf, val; @@ -695,10 +677,10 @@ usage: (with-output-to-temp-buffer BUFNAME BODY...) */) } -static void print (); -static void print_preprocess (); -static void print_preprocess_string (); -static void print_object (); +static void print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); +static void print_preprocess (Lisp_Object obj); +static void print_preprocess_string (INTERVAL interval, Lisp_Object arg); +static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, doc: /* Output a newline to stream PRINTCHARFUN. @@ -919,8 +901,7 @@ to make it write to the debugging output. */) print_output_debug_flag from being optimized away. */ void -debug_output_compilation_hack (x) - int x; +debug_output_compilation_hack (int x) { print_output_debug_flag = x; } @@ -974,16 +955,14 @@ append to existing target file. */) /* This is the interface for debugging printing. */ void -debug_print (arg) - Lisp_Object arg; +debug_print (Lisp_Object arg) { Fprin1 (arg, Qexternal_debugging_output); fprintf (stderr, "\r\n"); } void -safe_debug_print (arg) - Lisp_Object arg; +safe_debug_print (Lisp_Object arg) { int valid = valid_lisp_object_p (arg); @@ -1037,10 +1016,7 @@ error message is constructed. */) CALLER is the Lisp function inside which the error was signaled. */ void -print_error_message (data, stream, context, caller) - Lisp_Object data, stream; - char *context; - Lisp_Object caller; +print_error_message (Lisp_Object data, Lisp_Object stream, char *context, Lisp_Object caller) { Lisp_Object errname, errmsg, file_error, tail; struct gcpro gcpro1; @@ -1125,9 +1101,7 @@ print_error_message (data, stream, context, caller) */ void -float_to_string (buf, data) - unsigned char *buf; - double data; +float_to_string (unsigned char *buf, double data) { unsigned char *cp; int width; @@ -1250,10 +1224,7 @@ float_to_string (buf, data) static void -print (obj, printcharfun, escapeflag) - Lisp_Object obj; - register Lisp_Object printcharfun; - int escapeflag; +print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag) { new_backquote_output = 0; @@ -1312,8 +1283,7 @@ print (obj, printcharfun, escapeflag) The status fields of Vprint_number_table mean whether each object appears more than once in OBJ: Qnil at the first time, and Qt after that . */ static void -print_preprocess (obj) - Lisp_Object obj; +print_preprocess (Lisp_Object obj) { int i; EMACS_INT size; @@ -1433,9 +1403,7 @@ print_preprocess (obj) } static void -print_preprocess_string (interval, arg) - INTERVAL interval; - Lisp_Object arg; +print_preprocess_string (INTERVAL interval, Lisp_Object arg) { print_preprocess (interval->plist); } @@ -1445,7 +1413,7 @@ print_preprocess_string (interval, arg) Lisp_Object Vprint_charset_text_property; extern Lisp_Object Qdefault; -static void print_check_string_charset_prop (); +static void print_check_string_charset_prop (INTERVAL interval, Lisp_Object string); #define PRINT_STRING_NON_CHARSET_FOUND 1 #define PRINT_STRING_UNSAFE_CHARSET_FOUND 2 @@ -1454,9 +1422,7 @@ static void print_check_string_charset_prop (); static int print_check_string_result; static void -print_check_string_charset_prop (interval, string) - INTERVAL interval; - Lisp_Object string; +print_check_string_charset_prop (INTERVAL interval, Lisp_Object string) { Lisp_Object val; @@ -1503,8 +1469,7 @@ print_check_string_charset_prop (interval, string) static Lisp_Object print_prune_charset_plist; static Lisp_Object -print_prune_string_charset (string) - Lisp_Object string; +print_prune_string_charset (Lisp_Object string) { print_check_string_result = 0; traverse_intervals (STRING_INTERVALS (string), 0, @@ -1528,10 +1493,7 @@ print_prune_string_charset (string) } static void -print_object (obj, printcharfun, escapeflag) - Lisp_Object obj; - register Lisp_Object printcharfun; - int escapeflag; +print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag) { char buf[40]; @@ -2307,9 +2269,7 @@ print_object (obj, printcharfun, escapeflag) This is part of printing a string that has text properties. */ void -print_interval (interval, printcharfun) - INTERVAL interval; - Lisp_Object printcharfun; +print_interval (INTERVAL interval, Lisp_Object printcharfun) { if (NILP (interval->plist)) return; @@ -2324,7 +2284,7 @@ print_interval (interval, printcharfun) void -syms_of_print () +syms_of_print (void) { Qtemp_buffer_setup_hook = intern_c_string ("temp-buffer-setup-hook"); staticpro (&Qtemp_buffer_setup_hook); |