summaryrefslogtreecommitdiff
path: root/src/list.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/list.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/list.c')
-rw-r--r--src/list.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/list.c b/src/list.c
index ff54d34..fa66e36 100644
--- a/src/list.c
+++ b/src/list.c
@@ -122,7 +122,7 @@ add_to_window_list (screen_info *s, Window w)
new_window->hints = XAllocSizeHints ();
new_window->colormap = DefaultColormap (dpy, s->screen_num);
new_window->transient = XGetTransientForHint (dpy, new_window->w, &new_window->transient_for);
- PRINT_DEBUG ("transient %d\n", new_window->transient);
+ PRINT_DEBUG (("transient %d\n", new_window->transient));
update_window_gravity (new_window);
@@ -377,7 +377,7 @@ unhide_transient_for (rp_window *win)
transient_for = find_window (win->transient_for);
if (transient_for == NULL)
{
- PRINT_DEBUG ("Can't find transient_for for '%s'", win->name );
+ PRINT_DEBUG (("Can't find transient_for for '%s'", win->name ));
return;
}
@@ -386,7 +386,7 @@ unhide_transient_for (rp_window *win)
set_frames_window (frame, transient_for);
maximize (transient_for);
- PRINT_DEBUG ("unhide transient window: %s\n", transient_for->name);
+ PRINT_DEBUG (("unhide transient window: %s\n", transient_for->name));
unhide_window_below (transient_for);
@@ -417,13 +417,13 @@ hide_transient_for_between (rp_window *win, rp_window *last)
transient_for = find_window (win->transient_for);
if (transient_for == last)
{
- PRINT_DEBUG ("Can't find transient_for for '%s'", win->name );
+ PRINT_DEBUG (("Can't find transient_for for '%s'", win->name ));
return;
}
if (find_windows_frame (transient_for) == NULL)
{
- PRINT_DEBUG ("hide transient window: %s\n", transient_for->name);
+ PRINT_DEBUG (("hide transient window: %s\n", transient_for->name));
hide_window (transient_for);
}
@@ -478,8 +478,8 @@ set_active_window (rp_window *win)
last_win = set_frames_window (win->scr->rp_current_frame, win);
- if (last_win) PRINT_DEBUG ("last window: %s\n", window_name (last_win));
- PRINT_DEBUG ("new window: %s\n", window_name (win));
+ if (last_win) PRINT_DEBUG (("last window: %s\n", window_name (last_win)));
+ PRINT_DEBUG (("new window: %s\n", window_name (win)));
/* Make sure the window comes up full screen */
maximize (win);
@@ -638,7 +638,7 @@ get_window_list (char *fmt, char *delim, struct sbuf *buffer,
list_for_each_entry (w,&rp_mapped_window,node)
{
- PRINT_DEBUG ("%d-%s\n", w->number, window_name (w));
+ PRINT_DEBUG (("%d-%s\n", w->number, window_name (w)));
if (w == current_window())
*mark_start = strlen (sbuf_get (buffer));