summaryrefslogtreecommitdiff
path: root/src/split.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-02-23 01:40:42 +0000
committersabetts <sabetts>2003-02-23 01:40:42 +0000
commit49ca20c9fc7807d612ef9925c110e8da6c3c1a8f (patch)
treef532251c2f3835e9ecd81f46e17900e95603be52 /src/split.c
parent5e4c6e4a9729e1ec546535cfc6ee264768c6b987 (diff)
downloadratpoison-49ca20c9fc7807d612ef9925c110e8da6c3c1a8f.zip
* configure.in: don't check for variable argument support in
preprocessor. * src/ratpoison.h (PRINT_LINE): new macro. (PRE_PRINT_LOCATION): remove macro (PRINT_ERROR): takes one argument which is the argument list ,parens and all, to be passed to printf. Callers updated. * src/actions.c (cmd_number): use list delete entry macro (cmd_number): likewise (cmd_escape): use list looping macro (cmd_escape): likewise (cmd_defpadding): likewise (cmd_defborder): likewise * src/events.c (mapping_notify): use list looping macro (mapping_notify): likewise * src/list.c: rename rp_unmapped_window_sentinel to rp_unmapped_window and rp_mapped_window_sentinel to rp_mapped_window. Use LIST_HEAD to create them. externs updated. (add_to_window_list): use list add entry macro. (find_window_in_list): list head is of type list_head. Prototype and callers updated. (find_window_in_list): use list looping macro (init_window_list): remove function (find_window_number): use list looping macro (find_window_name): likewise (find_window_prev): use list previous entry macro (find_window_next): use list next entry macro (find_window_other): use list looping macro (append_to_list): remove function (insert_into_list): use list looping macro (insert_into_list): use list add entry macro (remove_from_list): remove function (get_window_list): use list looping macro * src/main.c (main): do not call init_window_list() * src/manage.c (unmanage): use list delete macro (map_window): likewise (withdraw_window): use list moving macro to move entry to another list. (hide_others): use list looping macro * src/split.c (num_frames): use list looping macro (frames_screen): likewise (maximize_all_windows_in_frame): likewise (delete_frame_from_list): remove function (create_initial_frame): remove list init code. Add current frame to screen's frame list. (init_frame_list): use list init macro (find_last_frame): use list looping macro (find_windows_frame): likewise (find_frame_next): use list next entry macro (find_frame_prev): use list previous entry macro (find_window_for_frame): use list looping macro (split_frame): use list add entry macro (remove_all_splits): use list looping macro (resize_frame_vertically): likewise (resize_frame_horizontally): likewise (total_frame_area): likewise (frame_overlaps): likewise (remove_frame): likewise (find_frame_up): likewise (find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise
Diffstat (limited to 'src/split.c')
-rw-r--r--src/split.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/split.c b/src/split.c
index 68f6cfb..1d276c4 100644
--- a/src/split.c
+++ b/src/split.c
@@ -287,7 +287,7 @@ split_frame (rp_window_frame *frame, int way, int pixels)
win = find_window_for_frame (new_frame);
if (win)
{
- PRINT_DEBUG ("Found a window for the frame!\n");
+ PRINT_DEBUG (("Found a window for the frame!\n"));
set_frames_window (new_frame, win);
@@ -297,7 +297,7 @@ split_frame (rp_window_frame *frame, int way, int pixels)
}
else
{
- PRINT_DEBUG ("No window fits the frame.\n");
+ PRINT_DEBUG (("No window fits the frame.\n"));
set_frames_window (new_frame, NULL);
}
@@ -655,7 +655,7 @@ remove_frame (rp_window_frame *frame)
s = frames_screen (frame);
area = total_frame_area(s);
- PRINT_DEBUG ("Total Area: %d\n", area);
+ PRINT_DEBUG (("Total Area: %d\n", area));
list_del (&frame->node);
hide_window (frame->win);
@@ -668,11 +668,11 @@ remove_frame (rp_window_frame *frame)
if (cur->win)
{
- PRINT_DEBUG ("Trying frame containing window '%s'\n", window_name (cur->win));
+ PRINT_DEBUG (("Trying frame containing window '%s'\n", window_name (cur->win)));
}
else
{
- PRINT_DEBUG ("Trying some empty frame\n");
+ PRINT_DEBUG (("Trying some empty frame\n"));
}
/* Backup the frame */
@@ -686,8 +686,8 @@ remove_frame (rp_window_frame *frame)
cur->height += frame->height;
}
- PRINT_DEBUG ("Attempting vertical Frame y=%d height=%d\n", cur->y, cur->height);
- PRINT_DEBUG ("New Total Area: %d\n", total_frame_area(s));
+ PRINT_DEBUG (("Attempting vertical Frame y=%d height=%d\n", cur->y, cur->height));
+ PRINT_DEBUG (("New Total Area: %d\n", total_frame_area(s)));
/* If the area is bigger than before, the frame takes up too
much space. If the current frame and the deleted frame DON'T
@@ -698,14 +698,14 @@ remove_frame (rp_window_frame *frame)
frame but obviously didn't fit. */
if (total_frame_area(s) > area || !frames_overlap (cur, frame) || frame_overlaps (cur))
{
- PRINT_DEBUG ("Didn't fit vertically\n");
+ PRINT_DEBUG (("Didn't fit vertically\n"));
/* Restore the current window's frame */
memcpy (cur, &tmp_frame, sizeof (rp_window_frame));
}
else
{
- PRINT_DEBUG ("It fit vertically!!\n");
+ PRINT_DEBUG (("It fit vertically!!\n"));
/* update the frame backup */
memcpy (&tmp_frame, cur, sizeof (rp_window_frame));
@@ -720,20 +720,20 @@ remove_frame (rp_window_frame *frame)
cur->width += frame->width;
}
- PRINT_DEBUG ("Attempting horizontal Frame x=%d width=%d\n", cur->x, cur->width);
- PRINT_DEBUG ("New Total Area: %d\n", total_frame_area(s));
+ PRINT_DEBUG (("Attempting horizontal Frame x=%d width=%d\n", cur->x, cur->width));
+ PRINT_DEBUG (("New Total Area: %d\n", total_frame_area(s)));
/* Same test as the vertical test, above. */
if (total_frame_area(s) > area || !frames_overlap (cur, frame) || frame_overlaps (cur))
{
- PRINT_DEBUG ("Didn't fit horizontally\n");
+ PRINT_DEBUG (("Didn't fit horizontally\n"));
/* Restore the current window's frame */
memcpy (cur, &tmp_frame, sizeof (rp_window_frame));
}
else
{
- PRINT_DEBUG ("It fit horizontally!!\n");
+ PRINT_DEBUG (("It fit horizontally!!\n"));
fits = 1;
}