// Copyright (C) 2013 ChaosForge / Kornel Kisielewicz // http://chaosforge.org/ // // This file is part of NV Libraries. // For conditions of distribution and use, see copyright notice in nv.hh #include "nv/lib/curses.hh" #if defined( NV_CURSES_DYNAMIC ) #include "nv/library.hh" #define NV_CURSES_FUN( rtype, fname, fparams ) rtype (*fname) fparams = nullptr; #include #undef NV_CURSES_FUN bool nv::load_curses_library( const char* path ) { static nv::library curses_library; if ( curses_library.is_open() ) return true; curses_library.open( path ); # define NV_CURSES_FUN( rtype, fname, fparams ) *(void **) (&fname) = curses_library.get(#fname); # include # undef NV_CURSES_FUN return true; } #endif