Last change
on this file since 288 was
218,
checked in by epyon, 12 years ago
|
- curses library headers and support added
|
File size:
811 bytes
|
Rev | Line | |
---|
[218] | 1 | // Copyright (C) 2013 ChaosForge / Kornel Kisielewicz
|
---|
| 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
| 4 | // This file is part of NV Libraries.
|
---|
| 5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
| 6 |
|
---|
| 7 | #include "nv/lib/curses.hh"
|
---|
| 8 |
|
---|
| 9 | #if defined( NV_CURSES_DYNAMIC )
|
---|
| 10 |
|
---|
| 11 | #include "nv/library.hh"
|
---|
| 12 |
|
---|
| 13 | #define NV_CURSES_FUN( rtype, fname, fparams ) rtype (*fname) fparams = nullptr; |
---|
| 14 | #include <nv/lib/detail/curses_functions.inc>
|
---|
| 15 | #undef NV_CURSES_FUN |
---|
| 16 |
|
---|
| 17 | bool nv::load_curses_library( const char* path )
|
---|
| 18 | {
|
---|
| 19 | static nv::library curses_library;
|
---|
| 20 | if ( curses_library.is_open() ) return true;
|
---|
| 21 | curses_library.open( path );
|
---|
| 22 |
|
---|
| 23 | # define NV_CURSES_FUN( rtype, fname, fparams ) *(void **) (&fname) = curses_library.get(#fname); |
---|
| 24 | # include <nv/lib/detail/curses_functions.inc>
|
---|
| 25 | # undef NV_CURSES_FUN |
---|
| 26 | return true;
|
---|
| 27 | }
|
---|
| 28 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.