diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-19 20:27:03 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-19 20:27:03 -0400 |
commit | d2690bc70d707b7a3a49839787d20eabc138e391 (patch) | |
tree | 7380cef4de76a01ee10581744c721d4d6d77338a /src/add_window.c | |
parent | 248be9688c23f249f1ecf1860f6f4cb09e56fab2 (diff) |
use new warning-message functions in the remaining places where suitable,
since -q option can be used to silence those if wanted
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/add_window.c')
-rw-r--r-- | src/add_window.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/add_window.c b/src/add_window.c index e6bde43..b4189e1 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -170,9 +170,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp) /* allocate space for the twm window */ tmp_win = calloc(1, sizeof(TwmWindow)); if (tmp_win == NULL) { - fprintf(stderr, - "%s: Unable to allocate memory to manage window ID %lx.\n", - ProgramName, w); + twmWarning("Unable to allocate memory to manage window ID %lx.", w); return NULL; } tmp_win->w = w; @@ -1304,8 +1302,7 @@ CreateWindowTitlebarButtons(TwmWindow *tmp_win) if (nb > 0) { tmp_win->titlebuttons = malloc((size_t) nb * sizeof(TBWindow)); if (!tmp_win->titlebuttons) { - fprintf(stderr, "%s: unable to allocate %d titlebuttons\n", - ProgramName, nb); + twmWarning("unable to allocate %d titlebuttons", nb); } else { TBWindow *tbw; @@ -1497,9 +1494,9 @@ FetchWmColormapWindows(TwmWindow *tmp) malloc(sizeof(Window) * (size_t) (number_cmap_windows + 1)); if (!new_cmap_windows) { - fprintf(stderr, - "%s: unable to allocate %d element colormap window array\n", - ProgramName, number_cmap_windows + 1); + twmWarning + ("unable to allocate %d element colormap window array", + number_cmap_windows + 1); goto done; } new_cmap_windows[0] = tmp->w; /* add to front */ |