From 642a6876014bae7372c52308a998270ff62efe3e Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 24 Apr 2020 04:13:53 -0400 Subject: [PATCH] openimageio: extract version #453 --- src/lib/internal.h | 4 ++++ src/lib/notcurses.c | 4 ++-- src/lib/oiio.cpp | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/internal.h b/src/lib/internal.h index feb37f70f..df3377c4e 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -18,6 +18,10 @@ extern "C" { #include #include #include +#else +#ifdef USE_OIIO +const char* oiio_version(void); +#endif #endif #include diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 27fb25cba..871909a31 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -936,15 +936,15 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){ LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO, LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO, LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO); - fflush(stdout); #else #ifdef USE_OIIO - // FIXME + printf(" openimageio %s\n", oiio_version()); #else term_fg_palindex(ret, ret->ttyfp, ret->colors <= 88 ? 1 % ret->colors : 0xcb); fprintf(stderr, "\n Warning! Notcurses was built without multimedia support\n"); #endif #endif + fflush(stdout); term_fg_palindex(ret, ret->ttyfp, ret->colors <= 88 ? 1 % ret->colors : 0xcb); if(!ret->RGBflag){ // FIXME fprintf(stderr, "\n Warning! Colors subject to https://github.com/dankamongmen/notcurses/issues/4"); diff --git a/src/lib/oiio.cpp b/src/lib/oiio.cpp index fb1f24014..ea60f51a7 100644 --- a/src/lib/oiio.cpp +++ b/src/lib/oiio.cpp @@ -1,5 +1,6 @@ #include "version.h" #ifdef USE_OIIO +#include #include #include "internal.h" @@ -125,6 +126,10 @@ void ncvisual_destroy(ncvisual* ncv){ } } +const char* oiio_version(void){ + return OIIO_VERSION_STRING; +} + } // extern "C" #endif