Commit 1c019905 authored by Paul Eggert's avatar Paul Eggert
Browse files

Improve --without-x GCC pacification

* src/composite.c (autocmp_chars):
* src/conf_post.h (DebPrint) [HAVE_NTGUI && !DebPrint && !EMACSDEBUG]:
Use simpler ((void) 0) for no-op expression returning void.
* src/dispextern.h [HAVE_WINDOW_SYSTEM]:
Include fontset.h, for face_for_char.
(FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_FOR_CHAR):
Now inline functions instead of macros.  This avoids the need for
all those casts to void.
(FACE_SUITABLE_FOR_ASCII_CHAR_P): Omit 2nd (unused) arg.
All uses changed.
* src/frame.c (Ficonify_frame, Fset_frame_position):
* src/xdisp.c (Fmove_point_visually, show_mouse_face):
* src/xdisp.c (note_mode_line_or_margin_highlight)
(note_mouse_highlight):
Assume HAVE_WINDOW_SYSTEM for simplicity, since the code should
now work either way without generating warnings.
* src/frame.c (display_available) [HAVE_WINDOW_SYSTEM]: New function.
(window_system_available) [HAVE_WINDOW_SYSTEM]: Move to frame.h.
(decode_window_system_frame): Use check_window_system instead of
rolling the code ourself.  Return needed only if HAVE_WINDOW_SYSTEM.
(decode_window_system_frame, check_window_system):
Merge the HAVE_WINDOW_SYSTEM and !HAVE_WINDOW_SYSTEM versions into one.
* src/frame.c (Ficonify_frame, Fset_frame_position):
* src/xdisp.c (show_mouse_face, define_frame_cursor1)
(note_mouse_highlight):
Narrow the scope of the HAVE_WINDOW_SYSTEM #ifdef;
this is a better way to pacify GCC.
* src/xdisp.c (x_set_left_fringe, x_set_right_fringe)
(x_set_right_divider_width, x_set_bottom_divider_width):
* src/xfns.c (x_set_internal_border_width):
Don’t use what are now function calls as lvalues.
* src/frame.h (WINDOW_SYSTEM_RETURN): New macro.
(decode_window_system_frame, check_window_system):
Use it, to avoid the need for duplicate declarations.
(window_system_available): Now an inline function.
(display_available): New decl.
(frame_dimension): New inline function.
(FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH)
(FRAME_RIGHT_FRINGE_WIDTH, FRAME_TOTAL_FRINGE_WIDTH)
(FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH)
(FRAME_BOTTOM_DIVIDER_WIDTH):
Use it, to avoid the need for duplicate definitions.
Now inline functions instead of macros.
* src/gnutls.c (gnutls_log_function2i): Remove.
* src/gnutls.h (GNUTLS_LOG2i): Use ‘message’ directly.
This avoids complaints about gnutls_log_function2i being defined
and not used on older platforms that do not need to call GNUTLS_LOG2i.
* src/image.c (DefaultDepthOfScreen) [0]: Remove unused macro.
* src/lisp.h (AUTO_STRING_WITH_LEN): Revert change from ‘type id =
expr’ to ‘type id; id = expr’, as this would suppress valid
jump-misses-init diagnostics.  Let’s find a better way to address
the problem.
* src/vm-limit.c (__MALLOC_HOOK_VOLATILE):
Define only if needed.
* src/xdisp.c (handle_single_display_spec):
Simplify fringe_bitmap computation.
(define_frame_cursor1): Do nothing unless in a window system.
All callers changed and simplified.
* src/xfaces.c (realize_default_face):
Use a simpler way to pacify GCC when a return value is not used
on some platforms.
parent c98bc982
...@@ -867,11 +867,7 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ...@@ -867,11 +867,7 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
Lisp_Object string) Lisp_Object string)
{ {
ptrdiff_t count = SPECPDL_INDEX (); ptrdiff_t count = SPECPDL_INDEX ();
#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (win->frame); struct frame *f = XFRAME (win->frame);
#else
(void) XFRAME (win->frame);
#endif
Lisp_Object pos = make_number (charpos); Lisp_Object pos = make_number (charpos);
ptrdiff_t to; ptrdiff_t to;
ptrdiff_t pt = PT, pt_byte = PT_BYTE; ptrdiff_t pt = PT, pt_byte = PT_BYTE;
...@@ -895,7 +891,6 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ...@@ -895,7 +891,6 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
if (len <= 0) if (len <= 0)
return unbind_to (count, Qnil); return unbind_to (count, Qnil);
to = limit = charpos + len; to = limit = charpos + len;
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)) if (FRAME_WINDOW_P (f))
{ {
font_object = font_range (charpos, bytepos, &to, win, face, string); font_object = font_range (charpos, bytepos, &to, win, face, string);
...@@ -906,7 +901,6 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ...@@ -906,7 +901,6 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
return unbind_to (count, Qnil); return unbind_to (count, Qnil);
} }
else else
#endif /* not HAVE_WINDOW_SYSTEM */
font_object = win->frame; font_object = win->frame;
lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object, lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
string); string);
......
...@@ -211,8 +211,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ ...@@ -211,8 +211,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
extern void _DebPrint (const char *fmt, ...); extern void _DebPrint (const char *fmt, ...);
# define DebPrint(stuff) _DebPrint stuff # define DebPrint(stuff) _DebPrint stuff
# else # else
/* Avoid compiler warnings about empty body of 'if' statement. */ # define DebPrint(stuff) ((void) 0)
# define DebPrint(stuff) do {} while (false)
# endif # endif
#endif #endif
......
...@@ -82,6 +82,7 @@ typedef XImagePtr XImagePtr_or_DC; ...@@ -82,6 +82,7 @@ typedef XImagePtr XImagePtr_or_DC;
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
# include <time.h> # include <time.h>
# include "fontset.h"
#endif #endif
#ifndef HAVE_WINDOW_SYSTEM #ifndef HAVE_WINDOW_SYSTEM
...@@ -1825,31 +1826,32 @@ struct face_cache ...@@ -1825,31 +1826,32 @@ struct face_cache
? FACE_FROM_ID (F, ID) \ ? FACE_FROM_ID (F, ID) \
: NULL) : NULL)
/* True if FACE is suitable for displaying ASCII characters. */
INLINE bool
FACE_SUITABLE_FOR_ASCII_CHAR_P (struct face *face)
{
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
return face == face->ascii_face;
/* Non-zero if FACE is suitable for displaying character CHAR. */ #else
return true;
#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \ #endif
((FACE) == (FACE)->ascii_face) }
/* Return the id of the realized face on frame F that is like the face /* Return the id of the realized face on frame F that is like the face
FACE, but is suitable for displaying character CHAR at buffer or FACE, but is suitable for displaying character CHARACTER at buffer or
string position POS. OBJECT is the string object, or nil for string position POS. OBJECT is the string object, or nil for
buffer. This macro is only meaningful for multibyte character buffer. This macro is only meaningful for multibyte character
CHAR. */ CHAR. */
INLINE int
#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \ FACE_FOR_CHAR (struct frame *f, struct face *face, int character,
face_for_char ((F), (FACE), (CHAR), (POS), (OBJECT)) ptrdiff_t pos, Lisp_Object object)
{
#else /* not HAVE_WINDOW_SYSTEM */ #ifdef HAVE_WINDOW_SYSTEM
return face_for_char (f, face, character, pos, object);
#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \ #else
((void) (FACE), (void) (CHAR), true) return face->id;
#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \ #endif
((void) (F), (void) (FACE), (void) (CHAR), (void) (POS), \ }
(void) (OBJECT), (FACE)->id)
#endif /* not HAVE_WINDOW_SYSTEM */
/* Return true if G contains a valid character code. */ /* Return true if G contains a valid character code. */
INLINE bool INLINE bool
......
...@@ -106,39 +106,32 @@ decode_any_frame (register Lisp_Object frame) ...@@ -106,39 +106,32 @@ decode_any_frame (register Lisp_Object frame)
} }
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
bool bool
window_system_available (struct frame *f) display_available (void)
{ {
return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : x_display_list != NULL; return x_display_list != NULL;
} }
#endif
struct frame * struct frame *
decode_window_system_frame (Lisp_Object frame) decode_window_system_frame (Lisp_Object frame)
{ {
struct frame *f = decode_live_frame (frame); struct frame *f = decode_live_frame (frame);
check_window_system (f);
if (!window_system_available (f)) #ifdef HAVE_WINDOW_SYSTEM
error ("Window system frame should be used");
return f; return f;
#endif
} }
#else /* not HAVE_WINDOW_SYSTEM */
_Noreturn void
decode_window_system_frame (Lisp_Object frame)
{
error ("Window system is not in use");
}
_Noreturn
#endif /* not HAVE_WINDOW_SYSTEM */
void void
check_window_system (struct frame *f) check_window_system (struct frame *f)
{ {
if (!window_system_available (f)) #ifdef HAVE_WINDOW_SYSTEM
error (f ? "Window system frame should be used" if (window_system_available (f))
: "Window system is not in use or not initialized"); return;
#endif
error (f ? "Window system frame should be used"
: "Window system is not in use or not initialized");
} }
/* Return the value of frame parameter PROP in frame FRAME. */ /* Return the value of frame parameter PROP in frame FRAME. */
...@@ -2137,20 +2130,18 @@ DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, ...@@ -2137,20 +2130,18 @@ DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame,
If omitted, FRAME defaults to the currently selected frame. */) If omitted, FRAME defaults to the currently selected frame. */)
(Lisp_Object frame) (Lisp_Object frame)
{ {
#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = decode_live_frame (frame); struct frame *f = decode_live_frame (frame);
#else
(void) decode_live_frame (frame);
#endif
/* Don't allow minibuf_window to remain on an iconified frame. */ /* Don't allow minibuf_window to remain on an iconified frame. */
check_minibuf_window (frame, EQ (minibuf_window, selected_window)); check_minibuf_window (frame, EQ (minibuf_window, selected_window));
/* I think this should be done with a hook. */ /* I think this should be done with a hook. */
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)) if (FRAME_WINDOW_P (f))
{
#ifdef HAVE_WINDOW_SYSTEM
x_iconify_frame (f); x_iconify_frame (f);
#endif #endif
}
/* Make menu bar update for the Buffers and Frames menus. */ /* Make menu bar update for the Buffers and Frames menus. */
windows_or_buffers_changed = 17; windows_or_buffers_changed = 17;
...@@ -3013,20 +3004,18 @@ or bottom edge of the outer frame of FRAME relative to the right or ...@@ -3013,20 +3004,18 @@ or bottom edge of the outer frame of FRAME relative to the right or
bottom edge of FRAME's display. */) bottom edge of FRAME's display. */)
(Lisp_Object frame, Lisp_Object x, Lisp_Object y) (Lisp_Object frame, Lisp_Object x, Lisp_Object y)
{ {
#ifdef HAVE_WINDOW_SYSTEM struct frame *f = decode_live_frame (frame);
register struct frame *f = decode_live_frame (frame);
#else
(void) decode_live_frame (frame);
#endif
CHECK_TYPE_RANGED_INTEGER (int, x); CHECK_TYPE_RANGED_INTEGER (int, x);
CHECK_TYPE_RANGED_INTEGER (int, y); CHECK_TYPE_RANGED_INTEGER (int, y);
/* I think this should be done with a hook. */ /* I think this should be done with a hook. */
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)) if (FRAME_WINDOW_P (f))
x_set_offset (f, XINT (x), XINT (y), 1); {
#ifdef HAVE_WINDOW_SYSTEM
x_set_offset (f, XINT (x), XINT (y), 1);
#endif #endif
}
return Qt; return Qt;
} }
...@@ -3755,8 +3744,8 @@ x_set_left_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value ...@@ -3755,8 +3744,8 @@ x_set_left_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
if (new_width != old_width) if (new_width != old_width)
{ {
FRAME_LEFT_FRINGE_WIDTH (f) = new_width; f->left_fringe_width = new_width;
FRAME_FRINGE_COLS (f) /* Round up. */ f->fringe_cols /* Round up. */
= (new_width + FRAME_RIGHT_FRINGE_WIDTH (f) + unit - 1) / unit; = (new_width + FRAME_RIGHT_FRINGE_WIDTH (f) + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0) if (FRAME_X_WINDOW (f) != 0)
...@@ -3779,8 +3768,8 @@ x_set_right_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu ...@@ -3779,8 +3768,8 @@ x_set_right_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
if (new_width != old_width) if (new_width != old_width)
{ {
FRAME_RIGHT_FRINGE_WIDTH (f) = new_width; f->right_fringe_width = new_width;
FRAME_FRINGE_COLS (f) /* Round up. */ f->fringe_cols /* Round up. */
= (new_width + FRAME_LEFT_FRINGE_WIDTH (f) + unit - 1) / unit; = (new_width + FRAME_LEFT_FRINGE_WIDTH (f) + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0) if (FRAME_X_WINDOW (f) != 0)
...@@ -3809,13 +3798,11 @@ void ...@@ -3809,13 +3798,11 @@ void
x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{ {
int old = FRAME_RIGHT_DIVIDER_WIDTH (f); int old = FRAME_RIGHT_DIVIDER_WIDTH (f);
CHECK_TYPE_RANGED_INTEGER (int, arg); CHECK_TYPE_RANGED_INTEGER (int, arg);
FRAME_RIGHT_DIVIDER_WIDTH (f) = XINT (arg); int new = max (0, XINT (arg));
if (FRAME_RIGHT_DIVIDER_WIDTH (f) < 0) if (new != old)
FRAME_RIGHT_DIVIDER_WIDTH (f) = 0;
if (FRAME_RIGHT_DIVIDER_WIDTH (f) != old)
{ {
f->right_divider_width = new;
adjust_frame_size (f, -1, -1, 4, 0, Qright_divider_width); adjust_frame_size (f, -1, -1, 4, 0, Qright_divider_width);
adjust_frame_glyphs (f); adjust_frame_glyphs (f);
SET_FRAME_GARBAGED (f); SET_FRAME_GARBAGED (f);
...@@ -3827,13 +3814,11 @@ void ...@@ -3827,13 +3814,11 @@ void
x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{ {
int old = FRAME_BOTTOM_DIVIDER_WIDTH (f); int old = FRAME_BOTTOM_DIVIDER_WIDTH (f);
CHECK_TYPE_RANGED_INTEGER (int, arg); CHECK_TYPE_RANGED_INTEGER (int, arg);
FRAME_BOTTOM_DIVIDER_WIDTH (f) = XINT (arg); int new = max (0, XINT (arg));
if (FRAME_BOTTOM_DIVIDER_WIDTH (f) < 0) if (new != old)
FRAME_BOTTOM_DIVIDER_WIDTH (f) = 0;
if (FRAME_BOTTOM_DIVIDER_WIDTH (f) != old)
{ {
f->bottom_divider_width = new;
adjust_frame_size (f, -1, -1, 4, 0, Qbottom_divider_width); adjust_frame_size (f, -1, -1, 4, 0, Qbottom_divider_width);
adjust_frame_glyphs (f); adjust_frame_glyphs (f);
SET_FRAME_GARBAGED (f); SET_FRAME_GARBAGED (f);
......
...@@ -1102,23 +1102,37 @@ extern Lisp_Object selected_frame; ...@@ -1102,23 +1102,37 @@ extern Lisp_Object selected_frame;
extern int frame_default_tool_bar_height; extern int frame_default_tool_bar_height;
#endif #endif
#ifdef HAVE_WINDOW_SYSTEM
# define WINDOW_SYSTEM_RETURN
#else
# define WINDOW_SYSTEM_RETURN _Noreturn
#endif
extern WINDOW_SYSTEM_RETURN struct frame *
decode_window_system_frame (Lisp_Object);
extern struct frame *decode_live_frame (Lisp_Object); extern struct frame *decode_live_frame (Lisp_Object);
extern struct frame *decode_any_frame (Lisp_Object); extern struct frame *decode_any_frame (Lisp_Object);
extern struct frame *make_initial_frame (void); extern struct frame *make_initial_frame (void);
extern struct frame *make_frame (bool); extern struct frame *make_frame (bool);
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
extern void check_window_system (struct frame *);
extern struct frame *decode_window_system_frame (Lisp_Object);
extern struct frame *make_minibuffer_frame (void); extern struct frame *make_minibuffer_frame (void);
extern struct frame *make_frame_without_minibuffer (Lisp_Object, extern struct frame *make_frame_without_minibuffer (Lisp_Object,
struct kboard *, struct kboard *,
Lisp_Object); Lisp_Object);
extern bool window_system_available (struct frame *); extern bool display_available (void);
#else /* not HAVE_WINDOW_SYSTEM */ #endif
extern _Noreturn void check_window_system (struct frame *);
extern _Noreturn void decode_window_system_frame (Lisp_Object); INLINE bool
#define window_system_available(f) ((void) (f), false) window_system_available (struct frame *f)
#endif /* HAVE_WINDOW_SYSTEM */ {
#ifdef HAVE_WINDOW_SYSTEM
return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : display_available ();
#else
return false;
#endif
}
extern WINDOW_SYSTEM_RETURN void check_window_system (struct frame *);
extern void frame_make_pointer_invisible (struct frame *); extern void frame_make_pointer_invisible (struct frame *);
extern void frame_make_pointer_visible (struct frame *); extern void frame_make_pointer_visible (struct frame *);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
...@@ -1152,46 +1166,68 @@ extern Lisp_Object Vframe_list; ...@@ -1152,46 +1166,68 @@ extern Lisp_Object Vframe_list;
This value currently equals the average width of the default font of F. */ This value currently equals the average width of the default font of F. */
#define FRAME_COLUMN_WIDTH(F) ((F)->column_width) #define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
/* Pixel width of areas used to display truncation marks, continuation /* Get a frame's window system dimension. If no window system, this is 0. */
marks, overlay arrows. This is 0 for terminal frames. */
INLINE int
frame_dimension (int x)
{
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
return x;
#else
return 0;
#endif
}
/* Total width of fringes reserved for drawing truncation bitmaps, /* Total width of fringes reserved for drawing truncation bitmaps,
continuation bitmaps and alike. The width is in canonical char continuation bitmaps and alike. The width is in canonical char
units of the frame. This must currently be the case because window units of the frame. This must currently be the case because window
sizes aren't pixel values. If it weren't the case, we wouldn't be sizes aren't pixel values. If it weren't the case, we wouldn't be
able to split windows horizontally nicely. */ able to split windows horizontally nicely. */
#define FRAME_FRINGE_COLS(F) ((F)->fringe_cols) INLINE int
FRAME_FRINGE_COLS (struct frame *f)
{
return frame_dimension (f->fringe_cols);
}
/* Pixel-width of the left and right fringe. */ /* Pixel-width of the left and right fringe. */
#define FRAME_LEFT_FRINGE_WIDTH(F) ((F)->left_fringe_width) INLINE int
#define FRAME_RIGHT_FRINGE_WIDTH(F) ((F)->right_fringe_width) FRAME_LEFT_FRINGE_WIDTH (struct frame *f)
{
return frame_dimension (f->left_fringe_width);
}
INLINE int
FRAME_RIGHT_FRINGE_WIDTH (struct frame *f)
{
return frame_dimension (f->right_fringe_width);
}
/* Total width of fringes in pixels. */ /* Total width of fringes in pixels. */
#define FRAME_TOTAL_FRINGE_WIDTH(F) \ INLINE int
(FRAME_LEFT_FRINGE_WIDTH (F) + FRAME_RIGHT_FRINGE_WIDTH (F)) FRAME_TOTAL_FRINGE_WIDTH (struct frame *f)
{
return FRAME_LEFT_FRINGE_WIDTH (f) + FRAME_RIGHT_FRINGE_WIDTH (f);
}
/* Pixel-width of internal border lines */ /* Pixel-width of internal border lines */
#define FRAME_INTERNAL_BORDER_WIDTH(F) ((F)->internal_border_width) INLINE int
FRAME_INTERNAL_BORDER_WIDTH (struct frame *f)
{
return frame_dimension (f->internal_border_width);
}
/* Pixel-size of window border lines */ /* Pixel-size of window border lines */
#define FRAME_RIGHT_DIVIDER_WIDTH(F) ((F)->right_divider_width) INLINE int
#define FRAME_BOTTOM_DIVIDER_WIDTH(F) ((F)->bottom_divider_width) FRAME_RIGHT_DIVIDER_WIDTH (struct frame *f)
{
#else /* not HAVE_WINDOW_SYSTEM */ return frame_dimension (f->right_divider_width);
}
#define FRAME_FRINGE_COLS(F) ((void) (F), 0) INLINE int
#define FRAME_TOTAL_FRINGE_WIDTH(F) ((void) (F), 0) FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
#define FRAME_LEFT_FRINGE_WIDTH(F) ((void) (F), 0) {
#define FRAME_RIGHT_FRINGE_WIDTH(F) ((void) (F), 0) return frame_dimension (f->bottom_divider_width);
#define FRAME_INTERNAL_BORDER_WIDTH(F) ((void) (F), 0) }
#define FRAME_RIGHT_DIVIDER_WIDTH(F) ((void) (F), 0)
#define FRAME_BOTTOM_DIVIDER_WIDTH(F) ((void) (F), 0)
#endif /* not HAVE_WINDOW_SYSTEM */
/*********************************************************************** /***********************************************************************
Conversion between canonical units and pixels Conversion between canonical units and pixels
......
...@@ -383,13 +383,6 @@ gnutls_log_function2 (int level, const char *string, const char *extra) ...@@ -383,13 +383,6 @@ gnutls_log_function2 (int level, const char *string, const char *extra)
message ("gnutls.c: [%d] %s %s", level, string, extra); message ("gnutls.c: [%d] %s %s", level, string, extra);
} }
/* Log a message and an integer. */
static void
gnutls_log_function2i (int level, const char *string, int extra)
{
message ("gnutls.c: [%d] %s %d", level, string, extra);
}
int int
gnutls_try_handshake (struct Lisp_Process *proc) gnutls_try_handshake (struct Lisp_Process *proc)
{ {
......
...@@ -71,7 +71,7 @@ typedef enum ...@@ -71,7 +71,7 @@ typedef enum
#define GNUTLS_LOG2i(level, max, string, extra) \ #define GNUTLS_LOG2i(level, max, string, extra) \
do { \ do { \
if ((level) <= (max)) \ if ((level) <= (max)) \
gnutls_log_function2i (level, "(Emacs) " string, extra); \ message ("gnutls.c: [%d] %s %d", level, string, extra); \
} while (false) } while (false)
extern ptrdiff_t extern ptrdiff_t
......
...@@ -80,9 +80,6 @@ typedef struct w32_bitmap_record Bitmap_Record; ...@@ -80,9 +80,6 @@ typedef struct w32_bitmap_record Bitmap_Record;
#define PIX_MASK_DRAW 1 #define PIX_MASK_DRAW 1
#define x_defined_color w32_defined_color #define x_defined_color w32_defined_color
#if 0 /* unused */
#define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits)
#endif
#endif /* HAVE_NTGUI */ #endif /* HAVE_NTGUI */
......
...@@ -4634,10 +4634,8 @@ enum ...@@ -4634,10 +4634,8 @@ enum
STR's value is not necessarily copied. The resulting Lisp string STR's value is not necessarily copied. The resulting Lisp string
should not be modified or made visible to user code. */ should not be modified or made visible to user code. */
/* Avoid initializing NAME to prevent "jump-misses-init" compiler
warnings. */
#define AUTO_STRING_WITH_LEN(name, str, len) \ #define AUTO_STRING_WITH_LEN(name, str, len) \
Lisp_Object name; name = \ Lisp_Object name = \
(USE_STACK_STRING \ (USE_STACK_STRING \
? (make_lisp_ptr \ ? (make_lisp_ptr \
((&(union Aligned_String) \ ((&(union Aligned_String) \
......
...@@ -54,10 +54,10 @@ char data_start[1] = { 1 }; ...@@ -54,10 +54,10 @@ char data_start[1] = { 1 };
#ifdef HAVE_MALLOC_H #ifdef HAVE_MALLOC_H
# include <malloc.h> # include <malloc.h>
#endif #endif
#ifndef __MALLOC_HOOK_VOLATILE
# define __MALLOC_HOOK_VOLATILE volatile
#endif
#ifndef HAVE_MALLOC_H #ifndef HAVE_MALLOC_H
# ifndef __MALLOC_HOOK_VOLATILE
# define __MALLOC_HOOK_VOLATILE volatile
# endif
extern void *(*__morecore) (ptrdiff_t); extern void *(*__morecore) (ptrdiff_t);
extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);
#endif #endif
......
...@@ -5040,11 +5040,9 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, ...@@ -5040,11 +5040,9 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
return 1; return 1;
   
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
int fringe_bitmap;
value = XCAR (XCDR (spec)); value = XCAR (XCDR (spec));
if (!SYMBOLP (value) int fringe_bitmap = SYMBOLP (value) ? lookup_fringe_bitmap (value) : 0;
|| !(fringe_bitmap = lookup_fringe_bitmap (value))) if (! fringe_bitmap)
/* If we return here, POSITION has been advanced /* If we return here, POSITION has been advanced
across the text with this property. */ across the text with this property. */
{ {
...@@ -21691,9 +21689,7 @@ Value is the new character position of point. */) ...@@ -21691,9 +21689,7 @@ Value is the new character position of point. */)
int pt_x, target_x, pixel_width, pt_vpos; int pt_x, target_x, pixel_width, pt_vpos;
bool at_eol_p; bool at_eol_p;
bool overshoot_expected = false; bool overshoot_expected = false;
#ifdef HAVE_WINDOW_SYSTEM
bool target_is_eol_p = false; bool target_is_eol_p = false;
#endif
   
/* Setup the arena. */ /* Setup the arena. */
SET_TEXT_POS (pt, PT, PT_BYTE); SET_TEXT_POS (pt, PT, PT_BYTE);
...@@ -21808,9 +21804,7 @@ Value is the new character position of point. */) ...@@ -21808,9 +21804,7 @@ Value is the new character position of point. */)
{ {
move_it_by_lines (&it, -1); move_it_by_lines (&it, -1);
target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f); target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f);
#ifdef HAVE_WINDOW_SYSTEM
target_is_eol_p = true; target_is_eol_p = true;
#endif
/* Under word-wrap, we don't know the x coordinate of /* Under word-wrap, we don't know the x coordinate of
the last character displayed on the previous line, the last character displayed on the previous line,
which immediately precedes the wrap point. To find which immediately precedes the wrap point. To find
...@@ -21851,7 +21845,6 @@ Value is the new character position of point. */) ...@@ -21851,7 +21845,6 @@ Value is the new character position of point. */)
}