From: Paul Eggert Date: Thu, 14 Apr 2011 02:04:54 +0000 (-0700) Subject: * print.c: Make symbols static if they're not exported. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~313 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad64fc978bc5a83e25827ab4f55d4cbc8d0dd25a;p=emacs.git * print.c: Make symbols static if they're not exported. (print_depth, new_backquote_output, being_printed, print_buffer): (print_buffer_size, print_buffer_pos, print_buffer_pos_byte): (print_interval, print_number_index, initial_stderr_stream): Now static. * lisp.h (Fprinc): Remove decl. (debug_output_compilation_hack): Mark as externally visible. --- diff --git a/src/ChangeLog b/src/ChangeLog index 37225e11f76..78d3f0dacd2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-14 Paul Eggert + * print.c: Make symbols static if they're not exported. + (print_depth, new_backquote_output, being_printed, print_buffer): + (print_buffer_size, print_buffer_pos, print_buffer_pos_byte): + (print_interval, print_number_index, initial_stderr_stream): + Now static. + * lisp.h (Fprinc): Remove decl. + (debug_output_compilation_hack): Mark as externally visible. + * sysdep.c (croak): Move decl from here to syssignal.h. * syssignal.h (croak): Put it here, so the API can be checked when 'croak' is called from dissociate_if_controlling_tty. diff --git a/src/lisp.h b/src/lisp.h index 288f08e37ce..718f590b55a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2748,13 +2748,12 @@ extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE; EXFUN (Fprin1, 2); EXFUN (Fprin1_to_string, 2); -EXFUN (Fprinc, 2); EXFUN (Fterpri, 1); EXFUN (Fprint, 2); EXFUN (Ferror_message_string, 1); extern Lisp_Object Qstandard_output; extern Lisp_Object Qexternal_debugging_output; -extern void debug_output_compilation_hack (int); +extern void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE; extern void temp_output_buffer_setup (const char *); extern int print_level; extern Lisp_Object Qprint_escape_newlines; diff --git a/src/print.c b/src/print.c index 82040555921..8bc8f98ccee 100644 --- a/src/print.c +++ b/src/print.c @@ -58,25 +58,25 @@ static Lisp_Object Qfloat_output_format; #endif /* Avoid actual stack overflow in print. */ -int print_depth; +static int print_depth; /* Level of nesting inside outputting backquote in new style. */ -int new_backquote_output; +static int new_backquote_output; /* Detect most circularities to print finite output. */ #define PRINT_CIRCLE 200 -Lisp_Object being_printed[PRINT_CIRCLE]; +static Lisp_Object being_printed[PRINT_CIRCLE]; /* When printing into a buffer, first we put the text in this block, then insert it all at once. */ -char *print_buffer; +static char *print_buffer; /* Size allocated in print_buffer. */ -EMACS_INT print_buffer_size; +static EMACS_INT print_buffer_size; /* Chars stored in print_buffer. */ -EMACS_INT print_buffer_pos; +static EMACS_INT print_buffer_pos; /* Bytes stored in print_buffer. */ -EMACS_INT print_buffer_pos_byte; +static EMACS_INT print_buffer_pos_byte; Lisp_Object Qprint_escape_newlines; static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; @@ -89,8 +89,8 @@ static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; N the object has been printed so we can refer to it as #N#. print_number_index holds the largest N already used. N has to be striclty larger than 0 since we need to distinguish -N. */ -int print_number_index; -void print_interval (INTERVAL interval, Lisp_Object printcharfun); +static int print_number_index; +static void print_interval (INTERVAL interval, Lisp_Object printcharfun); /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; @@ -636,7 +636,7 @@ A printed representation of an object is text which describes that object. */) return unbind_to (count, object); } -DEFUE ("princ", Fprinc, Sprinc, 1, 2, 0, +DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0, doc: /* Output the printed representation of OBJECT, any Lisp object. No quoting characters are used; no delimiters are printed around the contents of strings. @@ -751,7 +751,7 @@ debug_output_compilation_hack (int x) #define WITH_REDIRECT_DEBUGGING_OUTPUT 1 -FILE *initial_stderr_stream = NULL; +static FILE *initial_stderr_stream = NULL; DEFUN ("redirect-debugging-output", Fredirect_debugging_output, Sredirect_debugging_output, 1, 2,