[initbanner] protect against USE_DEFLATE=off

This commit is contained in:
nick black 2021-11-17 01:15:06 -05:00
parent 3b6e08333f
commit e03554870e
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -1,4 +1,6 @@
#ifdef USE_DEFLATE
#include <libdeflate.h> #include <libdeflate.h>
#endif
#include "internal.h" #include "internal.h"
// only invoked without suppress banners flag. prints various warnings based on // only invoked without suppress banners flag. prints various warnings based on
@ -82,7 +84,13 @@ int init_banner(const notcurses* nc, fbuf* f){
#else #else
#error "No __BYTE_ORDER__ definition" #error "No __BYTE_ORDER__ definition"
#endif #endif
clreol, ncver, LIBDEFLATE_VERSION_STRING, gpm_version()); clreol, ncver,
#ifdef USE_DEFLATE
LIBDEFLATE_VERSION_STRING,
#else
"n/a",
#endif
gpm_version());
fbuf_puts(f, clreol); // for ncvisual banner fbuf_puts(f, clreol); // for ncvisual banner
ncvisual_printbanner(f); ncvisual_printbanner(f);
init_banner_warnings(nc, f, clreol); init_banner_warnings(nc, f, clreol);