initial gvim-wrapper program
This commit is contained in:
commit
e7b6791a4c
6
Makefile
Normal file
6
Makefile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
TARGET := gvim-wrapper
|
||||||
|
CFLAGS := -mno-cygwin -std=gnu99
|
||||||
|
LDFLAGS := -mno-cygwin
|
||||||
|
|
||||||
|
all: $(TARGET)
|
18
gvim-wrapper.c
Normal file
18
gvim-wrapper.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
const char **new_argv = malloc(sizeof(char *) * (argc + 2));
|
||||||
|
int i = 0;
|
||||||
|
new_argv[i++] = "gvim";
|
||||||
|
new_argv[i++] = "--remote-tab-silent";
|
||||||
|
for (int n = 1; n < argc; n++)
|
||||||
|
{
|
||||||
|
new_argv[i++] = argv[n];
|
||||||
|
}
|
||||||
|
new_argv[i++] = NULL;
|
||||||
|
execv("C:\\apps\\Vim\\vim73\\gvim.exe", new_argv);
|
||||||
|
return -1;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user