simple_time: simple_time.o
+vimstart: vimstart.o
+
clean:
rm -rf errno_speak simple_time *.o
--- /dev/null
+#include <unistd.h>
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ close(0); /* close stdin */
+
+ /* duplicate stdin from stderr */
+ if (dup(2) < 0) {
+ perror("dup failed:");
+ return 1;
+ }
+ execvp("/usr/bin/vim", argv);
+ perror("could not execute program");
+ return 1;
+}
--- /dev/null
+#!/bin/bash
+
+die() {
+ echo $@
+ exit 1
+}
+
+VIMSTART=`dirname $0`/vimstart
+[ -e "${VIMSTART}" ] || die "can't find vimstart program"
+
+FILES=""
+while read LINE; do
+ if [ -e "${LINE}" ]; then
+ FILES="${FILES} ${LINE}"
+ else
+ echo "no such file as '${LINE}'"
+ fi
+done
+
+${VIMSTART} ${FILES}