32-bit fixes for various diagnostics

pull/1145/head
nick black 4 years ago
parent be6362d74f
commit 725ecc9267
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -844,7 +844,7 @@ int ncblit_bgrx(const void* data, int linesize, const struct ncvisual_options* v
int ncblit_rgba(const void* data, int linesize, const struct ncvisual_options* vopts){
if(vopts->flags > NCVISUAL_OPTION_BLEND){
fprintf(stderr, "Warning: unknown ncvisual options %016lx\n", vopts->flags);
fprintf(stderr, "Warning: unknown ncvisual options %016jx\n", (uintmax_t)vopts->flags);
}
if(linesize <= 0 || (size_t)linesize < vopts->lenx * sizeof(uint32_t)){
return -1;

@ -101,7 +101,7 @@ ncfdplane_create_internal(ncplane* n, const ncfdplane_options* opts, int fd,
ncfdplane_callback cbfxn, ncfdplane_done_cb donecbfxn,
bool thread){
if(opts->flags > 0){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
ncfdplane* ret = malloc(sizeof(*ret));
if(ret == NULL){
@ -302,7 +302,7 @@ ncsubproc* ncsubproc_createv(ncplane* n, const ncsubproc_options* opts,
return NULL;
}
if(opts->flags > 0){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
int fd = -1;
ncsubproc* ret = malloc(sizeof(*ret));
@ -337,7 +337,7 @@ ncsubproc* ncsubproc_createvp(ncplane* n, const ncsubproc_options* opts,
return NULL;
}
if(opts->flags > 0){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
int fd = -1;
ncsubproc* ret = malloc(sizeof(*ret));
@ -372,7 +372,7 @@ ncsubproc* ncsubproc_createvpe(ncplane* n, const ncsubproc_options* opts,
return NULL;
}
if(opts->flags > 0){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
int fd = -1;
ncsubproc* ret = malloc(sizeof(*ret));

@ -458,11 +458,11 @@ program_block_drawing_chars(const notcurses* nc, struct consolefontdesc* cfd,
}
}
if(candidate == 0){
logwarn(nc, "Ran out of replaceable glyphs for U+%04x\n", shimmers[s].w);
logwarn(nc, "Ran out of replaceable glyphs for U+%04lx\n", (long)shimmers[s].w);
return -1;
}
if(shimmers[s].glyphfxn(cfd, candidate)){
logwarn(nc, "Error replacing glyph for U+%04x at %u\n", shimmers[s].w, candidate);
logwarn(nc, "Error replacing glyph for U+%04lx at %u\n", (long)shimmers[s].w, candidate);
return -1;
}
if(add_to_map(nc, map, shimmers[s].w, candidate)){

@ -306,7 +306,7 @@ ncmenu* ncmenu_create(ncplane* n, const ncmenu_options* opts){
return NULL;
}
if(opts->flags > NCMENU_OPTION_HIDING){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
int totalheight = 1;
int totalwidth = 2; // start with two-character margin on the left

@ -337,7 +337,7 @@ make_ncpile(notcurses* nc, ncplane* n){
ncplane* ncplane_new_internal(notcurses* nc, ncplane* n,
const ncplane_options* nopts){
if(nopts->flags > NCPLANE_OPTION_HORALIGNED){
logwarn(nc, "Provided unsupported flags %016lx\n", nopts->flags);
logwarn(nc, "Provided unsupported flags %016jx\n", (uintmax_t)nopts->flags);
}
if(nopts->rows <= 0 || nopts->cols <= 0){
logerror(nc, "Won't create denormalized plane (r=%d, c=%d)\n",
@ -985,7 +985,7 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
return NULL;
}
if(opts->flags >= (NCOPTION_NO_FONT_CHANGES << 1u)){
fprintf(stderr, "Warning: unknown Notcurses options %016lx\n", opts->flags);
fprintf(stderr, "Warning: unknown Notcurses options %016jx\n", (uintmax_t)opts->flags);
}
notcurses* ret = malloc(sizeof(*ret));
if(ret == NULL){

@ -21,7 +21,7 @@ class ncppplot {
opts = &zeroed;
}
if(opts->flags > NCPLOT_OPTION_DETECTMAXONLY){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
//struct notcurses* nc = n->nc;
// if miny == maxy (enabling domain detection), they both must be equal to 0

@ -6,7 +6,7 @@ ncreader* ncreader_create(ncplane* n, const ncreader_options* opts){
opts = &zeroed;
}
if(opts->flags > NCREADER_OPTION_CURSOR){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
ncreader* nr = malloc(sizeof(*nr));
if(nr == NULL){

@ -718,7 +718,7 @@ validate_ncreel_opts(ncplane* n, const ncreel_options* ropts){
return false;
}
if(ropts->flags > NCREEL_OPTION_CIRCULAR){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", ropts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)ropts->flags);
}
if(ropts->flags & NCREEL_OPTION_CIRCULAR){
if(!(ropts->flags & NCREEL_OPTION_INFINITESCROLL)){

@ -833,7 +833,7 @@ ncmultiselector* ncmultiselector_create(ncplane* n, const ncmultiselector_option
opts = &zeroed;
}
if(opts->flags > 0){
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016lx\n", opts->flags);
logwarn(ncplane_notcurses(n), "Provided unsupported flags %016jx\n", (uintmax_t)opts->flags);
}
unsigned itemcount = 0;
if(opts->items){

@ -364,7 +364,7 @@ auto ncvisual_from_bgra(const void* bgra, int rows, int rowstride,
auto ncvisual_render(notcurses* nc, ncvisual* ncv,
const struct ncvisual_options* vopts) -> ncplane* {
if(vopts && vopts->flags > NCVISUAL_OPTION_BLEND){
fprintf(stderr, "Warning: unknown ncvisual options %016lx\n", vopts->flags);
fprintf(stderr, "Warning: unknown ncvisual options %016jx\n", (uintmax_t)vopts->flags);
}
int lenx = vopts ? vopts->lenx : 0;
int leny = vopts ? vopts->leny : 0;

@ -21,7 +21,7 @@ int main(int argc, char **argv){
return EXIT_FAILURE;
}
int width = wcwidth(w);
printf("w(0x%05x): %d %lc\n", w, width, w);
printf("w(0x%05lx): %d %lc\n", (long)w, width, w);
arg += conv;
}
}

Loading…
Cancel
Save