summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-09-15 04:27:08 +0000
committersabetts <sabetts>2000-09-15 04:27:08 +0000
commit459655b06ba8e3a15e52c9e9c0e8fd936a5e2673 (patch)
tree350d862dd9fb99fd4f538578629cd35b97c08301 /src/list.c
parentf8d987c9c391855fcc263a3adb93483705afe35b (diff)
downloadratpoison-459655b06ba8e3a15e52c9e9c0e8fd936a5e2673.zip
Added a standard error reporting function PRINT_ERROR and a standard
debug output function PRINT_DEBUG.
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/list.c b/src/list.c
index ee04b34..0393923 100644
--- a/src/list.c
+++ b/src/list.c
@@ -35,7 +35,7 @@ add_to_window_list (screen_info *s, Window w)
new_window = malloc (sizeof (rp_window));
if (new_window == NULL)
{
- fprintf (stderr, "list.c:add_to_window_list():Out of memory!\n");
+ PRINT_ERROR ("Out of memory!\n");
exit (EXIT_FAILURE);
}
new_window->w = w;
@@ -48,7 +48,7 @@ add_to_window_list (screen_info *s, Window w)
if ((new_window->name = malloc (strlen ("Unnamed") + 1)) == NULL)
{
- fprintf (stderr, "list.c:add_to_window_list():Out of memory.\n");
+ PRINT_ERROR ("Out of memory!\n");
exit (EXIT_FAILURE);
}
strcpy (new_window->name, "Unnamed");
@@ -96,9 +96,7 @@ remove_from_window_list (rp_window *w)
if (rp_current_window == w) rp_current_window = NULL;
free (w);
-#ifdef DEBUG
- printf ("Removed window from list.\n");
-#endif
+ PRINT_DEBUG ("Removed window from list.\n");
}
void