diff options
author | sabetts <sabetts> | 2000-09-15 04:27:08 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2000-09-15 04:27:08 +0000 |
commit | 459655b06ba8e3a15e52c9e9c0e8fd936a5e2673 (patch) | |
tree | 350d862dd9fb99fd4f538578629cd35b97c08301 /src/list.c | |
parent | f8d987c9c391855fcc263a3adb93483705afe35b (diff) | |
download | ratpoison-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.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 |