|
|
d2d94ae |
diff --git a/headers/saphire/saphire_inner.h b/headers/saphire/saphire_inner.h
|
|
|
d2d94ae |
index 2143e25..95f9040 100644
|
|
|
d2d94ae |
--- a/headers/saphire/saphire_inner.h
|
|
|
d2d94ae |
+++ b/headers/saphire/saphire_inner.h
|
|
|
d2d94ae |
@@ -149,6 +149,7 @@ typedef struct {
|
|
|
d2d94ae |
sClass* running_class;
|
|
|
d2d94ae |
} sRunInfo;
|
|
|
d2d94ae |
|
|
|
d2d94ae |
+BOOL statment_tree_internal_commands(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, int j, char* title, BOOL input, char* sname, int sline);
|
|
|
d2d94ae |
BOOL statment_tree_internal_commands_fselector(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
BOOL statment_tree_internal_commands_object(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
BOOL statment_tree_internal_commands_ref(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
@@ -297,6 +298,7 @@ BOOL statment_tree_internal_commands_condition_ge(sRunInfo* runinfo, sCommand* c
|
|
|
d2d94ae |
BOOL statment_tree_internal_commands_condition_nt(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
BOOL statment_tree_internal_commands_condition_ot(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
BOOL statment_tree_internal_commands_condition_ef(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
+int statment_tree_internal_commands_write_lf(sWFd* nextout, enum eLineField lf);
|
|
|
d2d94ae |
|
|
|
d2d94ae |
typedef BOOL (*fInternalCommand)(sRunInfo* runinfo, sCommand* command, int* rcode, vector_obj* argv, vector_obj* blocks, sWFd* nextout, sRFd* nextin, int nexterr, char* title, char* sname, int sline, BOOL input, int j);
|
|
|
d2d94ae |
|
|
|
d2d94ae |
@@ -663,6 +665,8 @@ void sHash_delete(sHash* self);
|
|
|
d2d94ae |
string_obj* saphire_get_hash_item(sHash* hash, char* key);
|
|
|
d2d94ae |
void saphire_put_hash_item(sHash* hash, char* key, string_obj* item);
|
|
|
d2d94ae |
void saphire_erase_hash_element(sHash* hash, char* key);
|
|
|
d2d94ae |
+void saphire_clear_array_element(sAry* v);
|
|
|
d2d94ae |
+void saphire_erase_array_element(sAry* v, int index);
|
|
|
d2d94ae |
|
|
|
d2d94ae |
typedef struct {
|
|
|
d2d94ae |
sStatments* mStatments;
|
|
|
d2d94ae |
@@ -682,6 +686,7 @@ void burry_stack_frame(sAry* fun_argv_before, string_obj** sname_strace, int* li
|
|
|
d2d94ae |
////////////////////////////////////////////////////////////
|
|
|
d2d94ae |
|
|
|
d2d94ae |
BOOL vcat_expand_env(string_obj* pipeout, char* env, vector_obj* numbers,char* sname, int line);
|
|
|
d2d94ae |
+int str_lflen(enum eLineField lf, char* str);
|
|
|
d2d94ae |
|
|
|
d2d94ae |
////////////////////////////////////////////////////////////
|
|
|
d2d94ae |
/// from saphire_parser.c
|
|
|
d2d94ae |
diff --git a/src/saphire_commands.c b/src/saphire_commands.c
|
|
|
d2d94ae |
index 51fec4b..a0450da 100644
|
|
|
d2d94ae |
--- a/src/saphire_commands.c
|
|
|
d2d94ae |
+++ b/src/saphire_commands.c
|
|
|
d2d94ae |
@@ -1,3 +1,5 @@
|
|
|
d2d94ae |
+#define _GNU_SOURCE /* wcswidth */
|
|
|
d2d94ae |
+
|
|
|
d2d94ae |
#include "config.h"
|
|
|
d2d94ae |
#include <errno.h>
|
|
|
d2d94ae |
#include <time.h>
|
|
|
d2d94ae |
@@ -15,6 +17,7 @@
|
|
|
d2d94ae |
#include <signal.h>
|
|
|
d2d94ae |
#include <limits.h>
|
|
|
d2d94ae |
#include <dirent.h>
|
|
|
d2d94ae |
+#include <wchar.h>
|
|
|
d2d94ae |
|
|
|
d2d94ae |
#if defined(HAVE_CURSES_H)
|
|
|
d2d94ae |
#include <curses.h>
|
|
|
d2d94ae |
diff --git a/src/saphire_commands_string.c b/src/saphire_commands_string.c
|
|
|
d2d94ae |
index c52fe65..ebb3e53 100644
|
|
|
d2d94ae |
--- a/src/saphire_commands_string.c
|
|
|
d2d94ae |
+++ b/src/saphire_commands_string.c
|
|
|
d2d94ae |
@@ -1,3 +1,5 @@
|
|
|
d2d94ae |
+#define _GNU_SOURCE /* strcasestr, asprintf */
|
|
|
d2d94ae |
+
|
|
|
d2d94ae |
#include "config.h"
|
|
|
d2d94ae |
#include <errno.h>
|
|
|
d2d94ae |
#include <time.h>
|
|
|
d2d94ae |
@@ -15,6 +17,7 @@
|
|
|
d2d94ae |
#include <signal.h>
|
|
|
d2d94ae |
#include <limits.h>
|
|
|
d2d94ae |
#include <dirent.h>
|
|
|
d2d94ae |
+#include <ctype.h>
|
|
|
d2d94ae |
|
|
|
d2d94ae |
#if defined(HAVE_CURSES_H)
|
|
|
d2d94ae |
#include <curses.h>
|
|
|
d2d94ae |
diff --git a/src/saphire_curses.c b/src/saphire_curses.c
|
|
|
d2d94ae |
index 3d79fb6..6bfa095 100644
|
|
|
d2d94ae |
--- a/src/saphire_curses.c
|
|
|
d2d94ae |
+++ b/src/saphire_curses.c
|
|
|
d2d94ae |
@@ -1,3 +1,5 @@
|
|
|
d2d94ae |
+#define _GNU_SOURCE /* wcswidth */
|
|
|
d2d94ae |
+
|
|
|
d2d94ae |
#include <termios.h>
|
|
|
d2d94ae |
#include <sys/ioctl.h>
|
|
|
d2d94ae |
#include <sys/types.h>
|
|
|
d2d94ae |
@@ -19,6 +21,7 @@
|
|
|
d2d94ae |
#include <curses.h>
|
|
|
d2d94ae |
#elif defined(HAVE_NCURSES_H)
|
|
|
d2d94ae |
#include <ncurses.h>
|
|
|
d2d94ae |
+#include <term.h>
|
|
|
d2d94ae |
#elif defined(HAVE_NCURSES_NCURSES_H)
|
|
|
d2d94ae |
#include <ncurses/ncurses.h>
|
|
|
d2d94ae |
#endif
|
|
|
d2d94ae |
diff --git a/src/saphire_kanji.c b/src/saphire_kanji.c
|
|
|
d2d94ae |
index 03bb46e..8cf6d6d 100644
|
|
|
d2d94ae |
--- a/src/saphire_kanji.c
|
|
|
d2d94ae |
+++ b/src/saphire_kanji.c
|
|
|
d2d94ae |
@@ -1,3 +1,5 @@
|
|
|
d2d94ae |
+#define _GNU_SOURCE /* wcswidth */
|
|
|
d2d94ae |
+
|
|
|
d2d94ae |
#include "config.h"
|
|
|
d2d94ae |
#include "saphire/saphire_debug.h"
|
|
|
d2d94ae |
#include "saphire/saphire_kanji.h"
|
|
|
d2d94ae |
@@ -6,6 +8,7 @@
|
|
|
d2d94ae |
#include <stdlib.h>
|
|
|
d2d94ae |
#include <string.h>
|
|
|
d2d94ae |
#include <stdio.h>
|
|
|
d2d94ae |
+#include <wchar.h>
|
|
|
d2d94ae |
|
|
|
d2d94ae |
char* gKanjiCodeString[6] = {
|
|
|
d2d94ae |
"eucjp", "sjis", "utf8", "utf8-mac", "byte", "unknown"
|
|
|
d2d94ae |
diff --git a/src/saphire_main.c b/src/saphire_main.c
|
|
|
d2d94ae |
index 522c480..8dcc07d 100644
|
|
|
d2d94ae |
--- a/src/saphire_main.c
|
|
|
d2d94ae |
+++ b/src/saphire_main.c
|
|
|
d2d94ae |
@@ -9,6 +9,8 @@
|
|
|
d2d94ae |
#include <sys/msg.h>
|
|
|
d2d94ae |
#include <signal.h>
|
|
|
d2d94ae |
#include <limits.h>
|
|
|
d2d94ae |
+#include <ctype.h>
|
|
|
d2d94ae |
+#include <oniguruma.h>
|
|
|
d2d94ae |
|
|
|
d2d94ae |
#include "saphire/saphire.h"
|
|
|
d2d94ae |
#include "saphire/saphire_inner.h"
|
|
|
d2d94ae |
diff --git a/src/saphire_vm.c b/src/saphire_vm.c
|
|
|
d2d94ae |
index e12772c..6a0b5f1 100644
|
|
|
d2d94ae |
--- a/src/saphire_vm.c
|
|
|
d2d94ae |
+++ b/src/saphire_vm.c
|
|
|
d2d94ae |
@@ -11,8 +11,10 @@
|
|
|
d2d94ae |
#include <sys/types.h>
|
|
|
d2d94ae |
#include <sys/ipc.h>
|
|
|
d2d94ae |
#include <sys/msg.h>
|
|
|
d2d94ae |
+#include <sys/stat.h>
|
|
|
d2d94ae |
#include <signal.h>
|
|
|
d2d94ae |
#include <dirent.h>
|
|
|
d2d94ae |
+#include <time.h>
|
|
|
d2d94ae |
|
|
|
d2d94ae |
#include <limits.h>
|
|
|
d2d94ae |
|