Commit e3b27b31 authored by Paul Eggert's avatar Paul Eggert

Don't publish debugger-only interfaces to other modules.

* lisp.h (safe_debug_print, debug_output_compilation_hack):
(verify_bytepos, count_markers): Move decls to the only modules
that need them.
* region-cache.h (pp_cache): Likewise.
* window.h (check_all_windows): Likewise.
* marker.c, print.c, region-cache.c, window.c: Decls moved here.
parent 99968708
2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
Don't publish debugger-only interfaces to other modules.
* lisp.h (safe_debug_print, debug_output_compilation_hack):
(verify_bytepos, count_markers): Move decls to the only modules
that need them.
* region-cache.h (pp_cache): Likewise.
* window.h (check_all_windows): Likewise.
* marker.c, print.c, region-cache.c, window.c: Decls moved here.
* sysdep.c (croak): Now static, if
defined TIOCNOTTY || defined USG5 || defined CYGWIN.
* syssignal.h (croak): Declare only if not static.
......
......@@ -2743,7 +2743,6 @@ extern void syms_of_chartab (void);
/* Defined in print.c */
extern Lisp_Object Vprin1_to_string_buffer;
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 (Fterpri, 1);
......@@ -2751,7 +2750,6 @@ 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) EXTERNALLY_VISIBLE;
extern void temp_output_buffer_setup (const char *);
extern int print_level;
extern Lisp_Object Qprint_escape_newlines;
......@@ -2967,14 +2965,12 @@ extern EMACS_INT marker_byte_position (Lisp_Object);
extern void clear_charpos_cache (struct buffer *);
extern EMACS_INT charpos_to_bytepos (EMACS_INT);
extern EMACS_INT buf_charpos_to_bytepos (struct buffer *, EMACS_INT);
extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE;
extern EMACS_INT buf_bytepos_to_charpos (struct buffer *, EMACS_INT);
extern void unchain_marker (struct Lisp_Marker *marker);
extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT);
extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object,
EMACS_INT, EMACS_INT);
extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE;
extern void syms_of_marker (void);
/* Defined in fileio.c */
......
......@@ -242,6 +242,7 @@ buf_charpos_to_bytepos (struct buffer *b, EMACS_INT charpos)
/* Used for debugging: recompute the bytepos corresponding to CHARPOS
in the simplest, most reliable way. */
extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE;
EMACS_INT
verify_bytepos (EMACS_INT charpos)
{
......@@ -864,6 +865,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
/* For debugging -- count the markers in buffer BUF. */
extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE;
int
count_markers (struct buffer *buf)
{
......
......@@ -738,6 +738,7 @@ to make it write to the debugging output. */)
/* This function is never called. Its purpose is to prevent
print_output_debug_flag from being optimized away. */
exterr void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE;
void
debug_output_compilation_hack (int x)
{
......@@ -798,6 +799,7 @@ debug_print (Lisp_Object arg)
fprintf (stderr, "\r\n");
}
void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
void
safe_debug_print (Lisp_Object arg)
{
......
......@@ -781,6 +781,7 @@ int region_cache_backward (struct buffer *buf, struct region_cache *c,
/* Debugging: pretty-print a cache to the standard error output. */
void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE;
void
pp_cache (struct region_cache *c)
{
......
......@@ -110,6 +110,3 @@ extern int region_cache_backward (struct buffer *BUF,
struct region_cache *CACHE,
EMACS_INT POS,
EMACS_INT *NEXT);
/* For debugging. */
void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE;
......@@ -2338,6 +2338,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame
/* Used for debugging. Abort if any window has a dead buffer. */
extern void check_all_windows (void) EXTERNALLY_VISIBLE;
void
check_all_windows (void)
{
......
......@@ -776,7 +776,6 @@ extern void freeze_window_starts (struct frame *, int);
extern void grow_mini_window (struct window *, int);
extern void shrink_mini_window (struct window *);
extern int window_relative_x_coord (struct window *, enum window_part, int);
extern void check_all_windows (void) EXTERNALLY_VISIBLE;
void run_window_configuration_change_hook (struct frame *f);
......
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