@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <sys/wait.h>
+#include <unistd.h>
#include <konf/buf.h>
#include <lub/string.h>
@@ -27,7 +28,7 @@ CLISH_PLUGIN_SYM(clish_plugin_lua_action)
lua_State *L = clish_shell__get_udata(shell, LUA_UDATA);
konf_buf_t *buf;
pid_t childpid;
- int res = 0, origstdout = -1, fd[2];
+ int res = 0, fd[2];
if (!script) /* Nothing to do */
return (0);
@@ -6,7 +6,7 @@
#include "private.h"
-extern char *scripts_path = NULL;
+char *scripts_path = NULL;
static bool_t
load_scripts(lua_State *L, char *path)
@@ -1,4 +1,6 @@
+#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
@@ -8,7 +10,6 @@ static char * trim(char *str)
const char *first = str;
char *last = str + strlen(str) - 1;
char *new = NULL;
- int i = 0;
while (first < last && isspace(*first))
++first;