source: trunk/src/lib/curses.cc @ 441

Last change on this file since 441 was 406, checked in by epyon, 10 years ago
  • code compiles cleanly on maximum warning level
File size: 839 bytes
Line 
1// Copyright (C) 2013-2015 ChaosForge Ltd
2// http://chaosforge.org/
3//
4// This file is part of Nova libraries.
5// For conditions of distribution and use, see copying.txt file in root folder.
6
7#include "nv/lib/curses.hh"
8
9#if defined( NV_CURSES_DYNAMIC )
10
11#include "nv/core/library.hh"
12
13#define FILE void
14#define NV_CURSES_FUN( rtype, fname, fparams ) rtype (*fname) fparams = nullptr;
15#include <nv/lib/detail/curses_functions.inc>
16#undef NV_CURSES_FUN
17
18bool nv::load_curses_library( const char* path )
19{
20        static nv::library curses_library;
21        if ( curses_library.is_open() ) return true;
22        curses_library.open( path );
23
24#       define NV_CURSES_FUN( rtype, fname, fparams ) void_assign( ::fname, curses_library.get(#fname) );
25#       include <nv/lib/detail/curses_functions.inc>
26#       undef NV_CURSES_FUN
27        return true;
28}
29#endif
Note: See TracBrowser for help on using the repository browser.