diff options
| author | Dmitry Antipov | 2014-07-28 12:07:55 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-07-28 12:07:55 +0400 |
| commit | 34c6b847fbad20b026ee878f6c3b97ab481f6a92 (patch) | |
| tree | f4879868963f8c3ced8511301cc2c2b2d852a039 /src | |
| parent | a7947cd8742b236b90d054dbaf3e43ab6677ec0b (diff) | |
| download | emacs-34c6b847fbad20b026ee878f6c3b97ab481f6a92.tar.gz emacs-34c6b847fbad20b026ee878f6c3b97ab481f6a92.zip | |
Fix --without-x build and pacify --enable-gcc-warnings.
Problems reported in Bug#18122 and Bug#18124.
* frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
(frame_windows_min_size): Now static.
* frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
Define as no-op.
(adjust_frame_size): Always declare prototype.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/frame.c | 7 | ||||
| -rw-r--r-- | src/frame.h | 6 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7edd4f329b0..f74a46c4ad2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -23,6 +23,14 @@ | |||
| 23 | * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise. | 23 | * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise. |
| 24 | * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function. | 24 | * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function. |
| 25 | 25 | ||
| 26 | Fix --without-x build and pacify --enable-gcc-warnings. | ||
| 27 | Problems reported in Bug#18122 and Bug#18124. | ||
| 28 | * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM. | ||
| 29 | (frame_windows_min_size): Now static. | ||
| 30 | * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]: | ||
| 31 | Define as no-op. | ||
| 32 | (adjust_frame_size): Always declare prototype. | ||
| 33 | |||
| 26 | 2014-07-28 Paul Eggert <eggert@cs.ucla.edu> | 34 | 2014-07-28 Paul Eggert <eggert@cs.ucla.edu> |
| 27 | 35 | ||
| 28 | * frame.c (x_set_frame_parameters): Don't use uninitialized locals. | 36 | * frame.c (x_set_frame_parameters): Don't use uninitialized locals. |
diff --git a/src/frame.c b/src/frame.c index d32aa0368f0..cc0d77e54c8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -194,9 +194,8 @@ check_window_system (struct frame *f) | |||
| 194 | : "Window system is not in use or not initialized"); | 194 | : "Window system is not in use or not initialized"); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | |||
| 198 | /* Return the value of frame parameter PROP in frame FRAME. */ | 197 | /* Return the value of frame parameter PROP in frame FRAME. */ |
| 199 | #ifdef HAVE_WINDOW_SYSTEM | 198 | |
| 200 | Lisp_Object | 199 | Lisp_Object |
| 201 | get_frame_param (register struct frame *frame, Lisp_Object prop) | 200 | get_frame_param (register struct frame *frame, Lisp_Object prop) |
| 202 | { | 201 | { |
| @@ -207,8 +206,6 @@ get_frame_param (register struct frame *frame, Lisp_Object prop) | |||
| 207 | return tem; | 206 | return tem; |
| 208 | return Fcdr (tem); | 207 | return Fcdr (tem); |
| 209 | } | 208 | } |
| 210 | #endif | ||
| 211 | |||
| 212 | 209 | ||
| 213 | /* Return 1 if `frame-inhibit-implied-resize' is non-nil or fullscreen | 210 | /* Return 1 if `frame-inhibit-implied-resize' is non-nil or fullscreen |
| 214 | state of frame F would be affected by a vertical (horizontal if | 211 | state of frame F would be affected by a vertical (horizontal if |
| @@ -367,7 +364,7 @@ predicates which report frame's specific UI-related capabilities. */) | |||
| 367 | return type; | 364 | return type; |
| 368 | } | 365 | } |
| 369 | 366 | ||
| 370 | int | 367 | static int |
| 371 | frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object pixelwise) | 368 | frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object pixelwise) |
| 372 | { | 369 | { |
| 373 | return XINT (call3 (Qframe_windows_min_size, frame, horizontal, pixelwise)); | 370 | return XINT (call3 (Qframe_windows_min_size, frame, horizontal, pixelwise)); |
diff --git a/src/frame.h b/src/frame.h index fde815c3b84..51597c4bcdb 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -866,6 +866,7 @@ default_pixels_per_inch_y (void) | |||
| 866 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((void) f, 0) | 866 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((void) f, 0) |
| 867 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) ((void) f, 0) | 867 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) ((void) f, 0) |
| 868 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) f, 0) | 868 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) f, 0) |
| 869 | #define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) ((void) f, 0) | ||
| 869 | 870 | ||
| 870 | #endif /* HAVE_WINDOW_SYSTEM */ | 871 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 871 | 872 | ||
| @@ -1108,6 +1109,7 @@ extern void frame_make_pointer_invisible (struct frame *); | |||
| 1108 | extern void frame_make_pointer_visible (struct frame *); | 1109 | extern void frame_make_pointer_visible (struct frame *); |
| 1109 | extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); | 1110 | extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); |
| 1110 | extern bool frame_inhibit_resize (struct frame *, bool); | 1111 | extern bool frame_inhibit_resize (struct frame *, bool); |
| 1112 | extern void adjust_frame_size (struct frame *, int, int, int, bool); | ||
| 1111 | 1113 | ||
| 1112 | extern Lisp_Object Vframe_list; | 1114 | extern Lisp_Object Vframe_list; |
| 1113 | 1115 | ||
| @@ -1376,10 +1378,6 @@ extern Lisp_Object Qrun_hook_with_args; | |||
| 1376 | /* The class of this X application. */ | 1378 | /* The class of this X application. */ |
| 1377 | #define EMACS_CLASS "Emacs" | 1379 | #define EMACS_CLASS "Emacs" |
| 1378 | 1380 | ||
| 1379 | /* If these are not in frame.c they are in xterm.c, w32term.c, etc. */ | ||
| 1380 | extern void adjust_frame_size (struct frame *, int, int, int, bool); | ||
| 1381 | extern int frame_windows_min_size (Lisp_Object, Lisp_Object, Lisp_Object); | ||
| 1382 | |||
| 1383 | extern void x_set_scroll_bar_default_width (struct frame *); | 1381 | extern void x_set_scroll_bar_default_width (struct frame *); |
| 1384 | extern void x_set_scroll_bar_default_height (struct frame *); | 1382 | extern void x_set_scroll_bar_default_height (struct frame *); |
| 1385 | extern void x_set_offset (struct frame *, int, int, int); | 1383 | extern void x_set_offset (struct frame *, int, int, int); |