• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lua/5.2.4/0011-linenoise.patch
Francois PerradFrancois Perrad committed 077193b6b3a08 Mar 2015
Raw file
Source viewDiff to previous
 
1
Add support of linenoise (replace readline)
2
​
3
see discussion, http://lua-users.org/lists/lua-l/2010-03/msg00879.html
4
​
5
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
6
​
7
Index: b/src/lua.c
8
===================================================================
9
--- a/src/lua.c
10
+++ b/src/lua.c
11
@@ -72,6 +72,15 @@
12
           add_history(lua_tostring(L, idx));  /* add it to history */
13
 #define lua_freeline(L,b)  ((void)L, free(b))
14
 
15
+#elif defined(LUA_USE_LINENOISE)
16
+
17
+#include <linenoise.h>
18
+#define lua_readline(L,b,p)    ((void)L, ((b)=linenoise(p)) != NULL)
19
+#define lua_saveline(L,idx) \
20
+   if (lua_rawlen(L,idx) > 0)  /* non-empty line? */ \
21
+     linenoiseHistoryAdd(lua_tostring(L, idx));  /* add it to history */
22
+#define lua_freeline(L,b)  ((void)L, free(b))
23
+
24
 #elif !defined(lua_readline)
25
 
26
 #define lua_readline(L,b,p) \
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.