summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/actions/hide_show.c1
-rw-r--r--src/actions/subtotal.c2
-rw-r--r--src/cmds/cmds.c1
-rw-r--r--src/cmds/cmds_normal.c1
-rw-r--r--src/file.c1
-rw-r--r--src/formats/ods.c1
-rwxr-xr-xsrc/gram.y1
-rw-r--r--src/graph.c1
-rw-r--r--src/lua.c1
-rw-r--r--src/main.c10
-rw-r--r--src/sheet.c1
11 files changed, 20 insertions, 1 deletions
diff --git a/src/actions/hide_show.c b/src/actions/hide_show.c
index 23add6b..f85a8df 100644
--- a/src/actions/hide_show.c
+++ b/src/actions/hide_show.c
@@ -43,6 +43,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include "../sc.h"
#include "../macros.h"
diff --git a/src/actions/subtotal.c b/src/actions/subtotal.c
index 2466dda..6d5c8fd 100644
--- a/src/actions/subtotal.c
+++ b/src/actions/subtotal.c
@@ -43,6 +43,7 @@
*/
#include <wchar.h>
+#include <string.h>
#include "../sc.h"
#include "../macros.h"
#include "../cmds/cmds.h"
@@ -51,7 +52,6 @@
/*
#include <sys/types.h>
-#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
diff --git a/src/cmds/cmds.c b/src/cmds/cmds.c
index ba2fba8..a865de5 100644
--- a/src/cmds/cmds.c
+++ b/src/cmds/cmds.c
@@ -43,6 +43,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include <ctype.h> // for isdigit
#include <wchar.h>
#include <wctype.h>
diff --git a/src/cmds/cmds_normal.c b/src/cmds/cmds_normal.c
index 62e0adc..56c7e15 100644
--- a/src/cmds/cmds_normal.c
+++ b/src/cmds/cmds_normal.c
@@ -44,6 +44,7 @@
#include <ctype.h>
#include <stdlib.h>
+#include <string.h>
#include "cmds.h"
#include "cmds_edit.h"
diff --git a/src/file.c b/src/file.c
index 570c2fe..966f983 100644
--- a/src/file.c
+++ b/src/file.c
@@ -51,6 +51,7 @@
#include <signal.h>
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <wchar.h>
#include <sys/wait.h>
diff --git a/src/formats/ods.c b/src/formats/ods.c
index a2e701a..47515cd 100644
--- a/src/formats/ods.c
+++ b/src/formats/ods.c
@@ -47,6 +47,7 @@
*/
#ifdef ODS
+#include <string.h>
#include <errno.h>
#include <zip.h>
#include <libxml/parser.h>
diff --git a/src/gram.y b/src/gram.y
index a79e495..ca51a86 100755
--- a/src/gram.y
+++ b/src/gram.y
@@ -1,5 +1,6 @@
%{
#include <stdlib.h>
+#include <string.h>
#include "sc.h"
#include "cmds/cmds.h"
diff --git a/src/graph.c b/src/graph.c
index ad435f5..9996e36 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -59,6 +59,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <setjmp.h>
#include <math.h>
diff --git a/src/lua.c b/src/lua.c
index 04a78b2..ed21469 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -61,6 +61,7 @@
#include <ctype.h>
#include <unistd.h>
#include <stdlib.h>
+#include <string.h>
#include <wchar.h>
#include "sc.h"
diff --git a/src/main.c b/src/main.c
index e83dad3..4a036a8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -63,6 +63,7 @@
#include "macros.h"
#include "tui.h"
#include "input.h"
+#include "cmds/cmds_visual.h"
#include "marks.h"
#include "format.h"
#include "maps.h"
@@ -655,6 +656,14 @@ void sig_cont() {
* \return none
*/
void sig_int() {
+ sc_info("Got SIGINT.%s" , curmode != NORMAL_MODE ? " Back to NORMAL_MODE" : " Press «:q<Enter>» to quit sc-im");
+ if (get_bufsize(buffer)) break_waitcmd_loop(buffer);
+ if (curmode == VISUAL_MODE) exit_visualmode();
+ chg_mode('.');
+ inputline[0] = L'\0'; // clean inputline
+ flush_buf(buffer);
+ ui_update(TRUE);
+ /*
if ( ! get_conf_int("debug")) {
sc_error("Got SIGINT. Press «:q<Enter>» to quit sc-im");
} else if (get_bufsize(buffer)) {
@@ -662,6 +671,7 @@ void sig_int() {
} else {
shall_quit = 2;
}
+ */
return;
}
diff --git a/src/sheet.c b/src/sheet.c
index 6782d94..d15dd4d 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -44,6 +44,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include "sheet.h"
#include "file.h"
#include "yank.h"