50 lines
1.3 KiB
Plaintext
50 lines
1.3 KiB
Plaintext
$OpenBSD: patch-src_bindings_cc,v 1.5 2016/04/18 07:15:14 ajacoutot Exp $
|
|
|
|
Unbreak with glib2 >=2.48.0
|
|
|
|
--- src/bindings.cc.orig Tue Sep 16 19:29:01 2014
|
|
+++ src/bindings.cc Mon Apr 18 09:10:24 2016
|
|
@@ -19,7 +19,7 @@
|
|
|
|
|
|
#include <algorithm>
|
|
-#include <cursesw.h>
|
|
+#include <curses.h>
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include <map>
|
|
@@ -724,9 +724,9 @@ int show_help(lua_State * L)
|
|
*/
|
|
if (str == NULL)
|
|
{
|
|
- if ( CFile::exists( "/usr/share/lumail/lumail.help" ))
|
|
+ if ( CFile::exists( "${LOCALBASE}/share/lumail/lumail.help" ))
|
|
{
|
|
- lua_pushstring(L, "/usr/share/lumail/lumail.help" );
|
|
+ lua_pushstring(L, "${LOCALBASE}/share/lumail/lumail.help" );
|
|
show_file_contents( L );
|
|
CLua::Instance()->execute( "global_mode( \"text\" )" );
|
|
return 0;
|
|
@@ -784,19 +784,14 @@ int sleep(lua_State *L )
|
|
return 0;
|
|
}
|
|
|
|
-
|
|
/**
|
|
* Stuff input into the input-buffer.
|
|
*/
|
|
int stuff(lua_State * L)
|
|
{
|
|
- UTFString str = NULL;
|
|
+ const char *str = lua_tostring(L, -1);
|
|
|
|
- if (lua_isstring(L, -1))
|
|
- str = lua_tostring(L, 1);
|
|
-
|
|
-
|
|
- if ((str == NULL) || (str.empty()) )
|
|
+ if (str == NULL)
|
|
return luaL_error(L, "Missing argument to stuff(..)");
|
|
|
|
CInput::Instance()->add( UTFString( str ) );
|