From: Michael D. Lowis Date: Mon, 7 Jan 2019 16:55:43 +0000 (-0500) Subject: fixed compiler warnings on linux and added two new helper scripts X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=303b9f296bd8c644ebbb3973f40032d0b5cced11;p=projs%2Ftide.git fixed compiler warnings on linux and added two new helper scripts --- diff --git a/TODO.md b/TODO.md index 2c1d1a0..5d0835a 100644 --- 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 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 index 0000000..0f6b342 --- /dev/null +++ b/bin/jmpsrc @@ -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" diff --git a/src/lib/x11.c b/src/lib/x11.c index 91e0012..69807dc 100644 --- a/src/lib/x11.c +++ b/src/lib/x11.c @@ -1,5 +1,8 @@ #include #include +#include +#include +#include int x11_init(XConf* x) { signal(SIGPIPE, SIG_IGN); // Ignore the SIGPIPE signal diff --git a/src/tide.c b/src/tide.c index e5e1bf1..f5ab85a 100644 --- a/src/tide.c +++ b/src/tide.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include #define INCLUDE_DEFS #include "config.h"