From 459655b06ba8e3a15e52c9e9c0e8fd936a5e2673 Mon Sep 17 00:00:00 2001 From: sabetts Date: Fri, 15 Sep 2000 04:27:08 +0000 Subject: Added a standard error reporting function PRINT_ERROR and a standard debug output function PRINT_DEBUG. --- src/list.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/list.c') 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 -- cgit v1.2.3