Last change
on this file since 366 was
319,
checked in by epyon, 11 years ago
|
- created core module and moved all free source files there
- took the opportunity to update all copyright lines and minor cleanup
- minor fixes
- not all examples are up to date
|
File size:
808 bytes
|
Rev | Line | |
---|
[319] | 1 | // Copyright (C) 2013-2014 ChaosForge Ltd
|
---|
[218] | 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 |
|
---|
[319] | 11 | #include "nv/core/library.hh"
|
---|
[218] | 12 |
|
---|
[319] | 13 | #define NV_CURSES_FUN( rtype, fname, fparams ) rtype (*fname) fparams = nullptr;
|
---|
[218] | 14 | #include <nv/lib/detail/curses_functions.inc>
|
---|
[319] | 15 | #undef NV_CURSES_FUN
|
---|
[218] | 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 |
|
---|
[319] | 23 | # define NV_CURSES_FUN( rtype, fname, fparams ) *(void **) (&fname) = curses_library.get(#fname);
|
---|
[218] | 24 | # include <nv/lib/detail/curses_functions.inc>
|
---|
[319] | 25 | # undef NV_CURSES_FUN
|
---|
[218] | 26 | return true;
|
---|
| 27 | }
|
---|
| 28 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.