aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog10
-rw-r--r--src/window.c27
-rw-r--r--src/window.h8
3 files changed, 28 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 257fdb3af96..1814a699b4b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * window.c (window_resize_check, window_resize_apply)
4 (window_from_coordinates, recombine_windows, set_window_buffer)
5 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
6 (Fsplit_window_internal, Fdelete_window_internal)
7 (freeze_window_starts): Use bool for booleans.
8 * window.h (window_frame_coordinates, resize_frame_windows)
9 (freeze_window_starts, set_window_buffer): Adjust prototypes.
10
12013-03-17 Stefan Monnier <monnier@iro.umontreal.ca> 112013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * dispnew.c (bitch_at_user): Use `user-error'. 13 * dispnew.c (bitch_at_user): Use `user-error'.
diff --git a/src/window.c b/src/window.c
index 940e0f7565a..df7878f42e5 100644
--- a/src/window.c
+++ b/src/window.c
@@ -84,8 +84,8 @@ static int foreach_window_1 (struct window *,
84 int (* fn) (struct window *, void *), 84 int (* fn) (struct window *, void *),
85 void *); 85 void *);
86static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); 86static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object);
87static int window_resize_check (struct window *, int); 87static int window_resize_check (struct window *, bool);
88static void window_resize_apply (struct window *, int); 88static void window_resize_apply (struct window *, bool);
89static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); 89static Lisp_Object select_window (Lisp_Object, Lisp_Object, int);
90static void select_window_1 (Lisp_Object, bool); 90static void select_window_1 (Lisp_Object, bool);
91 91
@@ -1368,7 +1368,7 @@ check_window_containing (struct window *w, void *user_data)
1368 1368
1369Lisp_Object 1369Lisp_Object
1370window_from_coordinates (struct frame *f, int x, int y, 1370window_from_coordinates (struct frame *f, int x, int y,
1371 enum window_part *part, int tool_bar_p) 1371 enum window_part *part, bool tool_bar_p)
1372{ 1372{
1373 Lisp_Object window; 1373 Lisp_Object window;
1374 struct check_window_data cw; 1374 struct check_window_data cw;
@@ -2055,7 +2055,7 @@ recombine_windows (Lisp_Object window)
2055{ 2055{
2056 struct window *w, *p, *c; 2056 struct window *w, *p, *c;
2057 Lisp_Object parent, child; 2057 Lisp_Object parent, child;
2058 int horflag; 2058 bool horflag;
2059 2059
2060 w = XWINDOW (window); 2060 w = XWINDOW (window);
2061 parent = w->parent; 2061 parent = w->parent;
@@ -3148,7 +3148,8 @@ If FRAME is omitted or nil, it defaults to the selected frame. */)
3148 reset from the buffer's local settings. */ 3148 reset from the buffer's local settings. */
3149 3149
3150void 3150void
3151set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int keep_margins_p) 3151set_window_buffer (Lisp_Object window, Lisp_Object buffer,
3152 bool run_hooks_p, bool keep_margins_p)
3152{ 3153{
3153 struct window *w = XWINDOW (window); 3154 struct window *w = XWINDOW (window);
3154 struct buffer *b = XBUFFER (buffer); 3155 struct buffer *b = XBUFFER (buffer);
@@ -3406,7 +3407,7 @@ temp_output_buffer_show (register Lisp_Object buf)
3406 WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only 3407 WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only
3407 horizontal child). */ 3408 horizontal child). */
3408static void 3409static void
3409make_parent_window (Lisp_Object window, int horflag) 3410make_parent_window (Lisp_Object window, bool horflag)
3410{ 3411{
3411 Lisp_Object parent; 3412 Lisp_Object parent;
3412 register struct window *o, *p; 3413 register struct window *o, *p;
@@ -3519,7 +3520,7 @@ Note: This function does not operate on any child windows of WINDOW. */)
3519 `window-min-height' or `window-min-width'. It does check that window 3520 `window-min-height' or `window-min-width'. It does check that window
3520 sizes do not drop below one line (two columns). */ 3521 sizes do not drop below one line (two columns). */
3521static int 3522static int
3522window_resize_check (struct window *w, int horflag) 3523window_resize_check (struct window *w, bool horflag)
3523{ 3524{
3524 struct window *c; 3525 struct window *c;
3525 3526
@@ -3600,7 +3601,7 @@ window_resize_check (struct window *w, int horflag)
3600 This function does not perform any error checks. Make sure you have 3601 This function does not perform any error checks. Make sure you have
3601 run window_resize_check on W before applying this function. */ 3602 run window_resize_check on W before applying this function. */
3602static void 3603static void
3603window_resize_apply (struct window *w, int horflag) 3604window_resize_apply (struct window *w, bool horflag)
3604{ 3605{
3605 struct window *c; 3606 struct window *c;
3606 int pos; 3607 int pos;
@@ -3681,7 +3682,7 @@ be applied on the Elisp level. */)
3681{ 3682{
3682 struct frame *f = decode_live_frame (frame); 3683 struct frame *f = decode_live_frame (frame);
3683 struct window *r = XWINDOW (FRAME_ROOT_WINDOW (f)); 3684 struct window *r = XWINDOW (FRAME_ROOT_WINDOW (f));
3684 int horflag = !NILP (horizontal); 3685 bool horflag = !NILP (horizontal);
3685 3686
3686 if (!window_resize_check (r, horflag) 3687 if (!window_resize_check (r, horflag)
3687 || ! EQ (r->new_total, 3688 || ! EQ (r->new_total,
@@ -3711,7 +3712,7 @@ be applied on the Elisp level. */)
3711 satisfy the request. The result will be meaningful if and only if 3712 satisfy the request. The result will be meaningful if and only if
3712 F's windows have meaningful sizes when you call this. */ 3713 F's windows have meaningful sizes when you call this. */
3713void 3714void
3714resize_frame_windows (struct frame *f, int size, int horflag) 3715resize_frame_windows (struct frame *f, int size, bool horflag)
3715{ 3716{
3716 Lisp_Object root = f->root_window; 3717 Lisp_Object root = f->root_window;
3717 struct window *r = XWINDOW (root); 3718 struct window *r = XWINDOW (root);
@@ -3825,7 +3826,7 @@ set correctly. See the code of `split-window' for how this is done. */)
3825 register Lisp_Object new, frame, reference; 3826 register Lisp_Object new, frame, reference;
3826 register struct window *o, *p, *n, *r; 3827 register struct window *o, *p, *n, *r;
3827 struct frame *f; 3828 struct frame *f;
3828 int horflag 3829 bool horflag
3829 /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */ 3830 /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */
3830 = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright); 3831 = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright);
3831 int combination_limit = 0; 3832 int combination_limit = 0;
@@ -3994,7 +3995,7 @@ Signal an error when WINDOW is the only window on its frame. */)
3994 register Lisp_Object parent, sibling, frame, root; 3995 register Lisp_Object parent, sibling, frame, root;
3995 struct window *w, *p, *s, *r; 3996 struct window *w, *p, *s, *r;
3996 struct frame *f; 3997 struct frame *f;
3997 int horflag; 3998 bool horflag;
3998 int before_sibling = 0; 3999 int before_sibling = 0;
3999 4000
4000 w = decode_any_window (window); 4001 w = decode_any_window (window);
@@ -6527,7 +6528,7 @@ freeze_window_start (struct window *w, void *freeze_p)
6527 means freeze the window start. */ 6528 means freeze the window start. */
6528 6529
6529void 6530void
6530freeze_window_starts (struct frame *f, int freeze_p) 6531freeze_window_starts (struct frame *f, bool freeze_p)
6531{ 6532{
6532 foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0)); 6533 foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0));
6533} 6534}
diff --git a/src/window.h b/src/window.h
index dcef37abb4c..4af8dbf1591 100644
--- a/src/window.h
+++ b/src/window.h
@@ -891,10 +891,10 @@ extern Lisp_Object Vmouse_event;
891 891
892extern Lisp_Object make_window (void); 892extern Lisp_Object make_window (void);
893extern Lisp_Object window_from_coordinates (struct frame *, int, int, 893extern Lisp_Object window_from_coordinates (struct frame *, int, int,
894 enum window_part *, int); 894 enum window_part *, bool);
895extern void resize_frame_windows (struct frame *, int, int); 895extern void resize_frame_windows (struct frame *, int, bool);
896extern void delete_all_child_windows (Lisp_Object); 896extern void delete_all_child_windows (Lisp_Object);
897extern void freeze_window_starts (struct frame *, int); 897extern void freeze_window_starts (struct frame *, bool);
898extern void grow_mini_window (struct window *, int); 898extern void grow_mini_window (struct window *, int);
899extern void shrink_mini_window (struct window *); 899extern void shrink_mini_window (struct window *);
900extern int window_relative_x_coord (struct window *, enum window_part, int); 900extern int window_relative_x_coord (struct window *, enum window_part, int);
@@ -906,7 +906,7 @@ void run_window_configuration_change_hook (struct frame *f);
906 it's not allowed. */ 906 it's not allowed. */
907 907
908void set_window_buffer (Lisp_Object window, Lisp_Object buffer, 908void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
909 int run_hooks_p, int keep_margins_p); 909 bool run_hooks_p, bool keep_margins_p);
910 910
911/* This is the window where the echo area message was displayed. It 911/* This is the window where the echo area message was displayed. It
912 is always a minibuffer window, but it may not be the same window 912 is always a minibuffer window, but it may not be the same window