]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed compiler warnings on linux and added two new helper scripts
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 7 Jan 2019 16:55:43 +0000 (11:55 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 7 Jan 2019 16:55:43 +0000 (11:55 -0500)
TODO.md
bin/grepn [new file with mode: 0755]
bin/jmpsrc [new file with mode: 0755]
src/lib/x11.c
src/tide.c

diff --git a/TODO.md b/TODO.md
index 2c1d1a00a1b6320a326f3434633d1c6f0efc7e0a..5d0835a87873cbb9c6383bc5098534659018d7c8 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -13,8 +13,6 @@
 * tide: Kill - add a 'Kill' tag to kill the most recent job
 * tide: gap buffer does not handle UTF-8 currently
 * edit: hangs after launching an empty tide instance then trying to open already open file
-* script: jump between header and source
-* script: grep to a new window/tag region
 
 ## BACKLOG
 
diff --git a/bin/grepn b/bin/grepn
new file mode 100755 (executable)
index 0000000..3192711
--- /dev/null
+++ b/bin/grepn
@@ -0,0 +1,2 @@
+#!/bin/sh
+grep -n "$@"
\ No newline at end of file
diff --git a/bin/jmpsrc b/bin/jmpsrc
new file mode 100755 (executable)
index 0000000..0f6b342
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+filename=$(basename -- "$file")
+extension="${filename##*.}"
+
+if [ "$extension" == "c" ]; then
+    filename="${filename%.*}.h"
+elif [ "$extension" == "h" ]; then
+    filename="${filename%.*}.c"
+fi
+
+file="$(find . -type f -name "$filename" | pick)"
+[ "" != "$file" ] && edit "$file"
index 91e0012f8a6b5bdf01fc9fb46a7b611c3a08021a..69807dcbd72cde6c31713eb9309251e00b5cd584 100644 (file)
@@ -1,5 +1,8 @@
 #include <x11.h>
 #include <locale.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 
 int x11_init(XConf* x) {
     signal(SIGPIPE, SIG_IGN); // Ignore the SIGPIPE signal
index e5e1bf13566446f338fa7eedd4bd3ef77faafc86..f5ab85a0df2d565f00bd4cc8a1fe18a35ff2d22a 100644 (file)
@@ -9,6 +9,8 @@
 #include <ctype.h>
 #include <unistd.h>
 #include <locale.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 
 #define INCLUDE_DEFS
 #include "config.h"