delete some dead code
I'm kinda sorta able to get lcurses running on NetBSD 9.2 without this particular hack.
This commit is contained in:
parent
a5a8c1b936
commit
e4f934db6b
|
@ -24,12 +24,6 @@
|
|||
#include <ncurses.h>
|
||||
#include <term.h>
|
||||
|
||||
/* NetBSD's default curses implementation is not quite complete. This
|
||||
disables those missing functions unless linked to ncurses instead. */
|
||||
#if defined NCURSES_VERSION || !defined __NetBSD__
|
||||
# define LCURSES_POSIX_COMPLIANT 1
|
||||
#endif
|
||||
|
||||
#include "../lua.h"
|
||||
#include "../lualib.h"
|
||||
#include "../lauxlib.h"
|
||||
|
|
|
@ -632,7 +632,6 @@ Pripoffline(lua_State *L)
|
|||
static int rip = 0;
|
||||
int top_line = lua_toboolean(L, 1);
|
||||
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
if (!lua_isfunction(L, 2))
|
||||
{
|
||||
lua_pushliteral(L, "invalid callback passed as second parameter");
|
||||
|
@ -662,9 +661,6 @@ Pripoffline(lua_State *L)
|
|||
|
||||
/* and tell curses we are going to take the line */
|
||||
return pushokresult(ripoffline(top_line ? 1 : -1, ripoffline_cb));
|
||||
#else
|
||||
return binding_notimplemented(L, "ripoffline", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -800,11 +796,7 @@ static int
|
|||
Pslk_init(lua_State *L)
|
||||
{
|
||||
int fmt = checkint(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_init(fmt));
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_init", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -823,11 +815,7 @@ Pslk_set(lua_State *L)
|
|||
int labnum = checkint(L, 1);
|
||||
const char* label = luaL_checkstring(L, 2);
|
||||
int fmt = checkint(L, 3);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_set(labnum, label, fmt));
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_set", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -841,11 +829,7 @@ Refresh the soft label key area.
|
|||
static int
|
||||
Pslk_refresh(lua_State *L)
|
||||
{
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_refresh());
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_refresh", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -859,11 +843,7 @@ Copy the soft label key area backing screen to the virtual screen.
|
|||
static int
|
||||
Pslk_noutrefresh(lua_State *L)
|
||||
{
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_noutrefresh());
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_noutrefresh", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -878,11 +858,7 @@ static int
|
|||
Pslk_label(lua_State *L)
|
||||
{
|
||||
int labnum = checkint(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushstringresult(slk_label(labnum));
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_label", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -896,11 +872,7 @@ Clears the soft labels from the screen.
|
|||
static int
|
||||
Pslk_clear(lua_State *L)
|
||||
{
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_clear());
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_clear", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -914,11 +886,7 @@ Restores the soft labels to the screen.
|
|||
static int
|
||||
Pslk_restore(lua_State *L)
|
||||
{
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_restore());
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_restore", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -931,11 +899,7 @@ Mark the soft label key area for refresh.
|
|||
static int
|
||||
Pslk_touch(lua_State *L)
|
||||
{
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_touch());
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_touch", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -950,11 +914,7 @@ static int
|
|||
Pslk_attron(lua_State *L)
|
||||
{
|
||||
chtype attrs = checkch(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_attron(attrs));
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_attron", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -969,11 +929,7 @@ static int
|
|||
Pslk_attroff(lua_State *L)
|
||||
{
|
||||
chtype attrs = checkch(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_attroff(attrs));
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_attroff", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -988,11 +944,7 @@ static int
|
|||
Pslk_attrset(lua_State *L)
|
||||
{
|
||||
chtype attrs = checkch(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
return pushokresult(slk_attrset(attrs));
|
||||
#else
|
||||
return binding_notimplemented(L, "slk_attrset", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -265,12 +265,8 @@ static int
|
|||
Wsyncok(lua_State *L)
|
||||
{
|
||||
WINDOW *w = checkwin(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
int bf = lua_toboolean(L, 2);
|
||||
return pushokresult(syncok(w, bf));
|
||||
#else
|
||||
return binding_notimplemented(L, "syncok", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1127,13 +1123,9 @@ static int
|
|||
Wimmedok(lua_State *L)
|
||||
{
|
||||
WINDOW *w = checkwin(L, 1);
|
||||
#if LCURSES_POSIX_COMPLIANT
|
||||
int bf = lua_toboolean(L, 2);
|
||||
immedok(w, bf);
|
||||
return 0;
|
||||
#else
|
||||
return binding_notimplemented(L, "immedok", "curses");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue