diff --git a/include/ncpp/Direct.hh b/include/ncpp/Direct.hh index 1d93f5042..0bd30dd7a 100644 --- a/include/ncpp/Direct.hh +++ b/include/ncpp/Direct.hh @@ -164,6 +164,11 @@ namespace ncpp return ncdirect_raster_frame (direct, faken, static_cast(align)); } + int streamfile (const char* filename, ncstreamcb streamer, struct ncvisual_options* vopts, void* curry) const NOEXCEPT_MAYBE + { + return error_guard (ncdirect_stream(direct, filename, streamer, vopts, curry), -1); + } + bool putstr (uint64_t channels, const char* utf8) const NOEXCEPT_MAYBE { return error_guard (ncdirect_putstr (direct, channels, utf8), -1); diff --git a/src/lib/direct.c b/src/lib/direct.c index ff7e65999..f252d36d7 100644 --- a/src/lib/direct.c +++ b/src/lib/direct.c @@ -408,7 +408,7 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){ } return 0; } - fprintf(stderr, "rasterizing %dx%d+%d\n", dimy, dimx, xoff); +//fprintf(stderr, "rasterizing %dx%d+%d\n", dimy, dimx, xoff); // save the existing style and colors const bool fgdefault = ncdirect_fg_default_p(n); const bool bgdefault = ncdirect_bg_default_p(n); @@ -1143,7 +1143,7 @@ int ncdirect_stream(ncdirect* n, const char* filename, ncstreamcb streamer, } ncdirect_raster_frame(n, v, (vopts->flags & NCVISUAL_OPTION_HORALIGNED) ? vopts->x : 0); streamer(ncv, vopts, NULL, curry); - }while(ncvisual_decode(ncv)); + }while(ncvisual_decode(ncv) == 0); ncvisual_destroy(ncv); return 0; }