Attachment 'Geany.c'
Download 1 #include <stdio.h>
2 #include <libiberty.h>
3 #include <string.h>
4 #include <unistd.h>
5 #include <stdlib.h>
6
7 #define SEP "\\"
8
9 int main(int argc, char *argv[]) {
10 int res;
11 char *exe = lrealpath(argv[0]);
12 char *path = xstrndup(exe, strrchr(exe, SEP[0])-exe);
13 char *geany = concat(path,SEP,"GeanyPortable",SEP,"GeanyPortable",NULL);
14 char *bin = concat(path,SEP,"bin",NULL);
15 if(! (res = putenv(concat("PATH=",bin,";",getenv("PATH"),NULL)))) {
16 res = execv(geany, argv);
17 }
18 perror(geany);
19 return res;
20 }
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.