#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <shellapi.h>
#include <sys/types.h>
#include <sys/stat.h>
char cmd[256];
char *path;
char *s;
+ int argc;
+ LPWSTR *argv;
shellpath = getenv ("PATH");
if (!shellpath || !(path = buildpath ("lefty"))) {
if (!(path = buildpath ("lefty")))
exit (1);
}
+ argv = CommandLineToArgvW(lpCmdLine, &argc);
+ if (argc == 1 && strcmp(argv[0], "-?") == 0) {
+ fprintf(stderr, "usage: lneato [-V] [-lm (sync|async)] [-el (0|1)] <filename>\n");
+ exit(0);
+ }
if (lpCmdLine[0] == 0)
sprintf (cmd, "%s -e \"load('dotty.lefty');dotty.protogt.lserver='neato';dotty.simple(null);\"", path);
else