#else
#include "compat_getopt.h"
#endif
+#ifdef WIN32
+#include <windows.h>
+#include <iostream.h>
+#include "Shlwapi.h"
+#endif
char *Info[] = {
"gvpr", /* Program */
return argc;
}
+
+#ifdef WIN32
+#define PATHSEP '\\'
+#define LISTSEP ';'
+#else
+#define PATHSEP '/'
+#define LISTSEP ':'
+#endif
+
/* resolve:
* Translate -f arg parameter into a pathname.
* If arg contains '/', return arg.
Sfio_t *fp;
size_t sz;
+#ifdef WIN32
+ if (!PathIsRelative (arg))
+#else
if (strchr(arg, '/'))
+#endif
return arg;
path = getenv("GPRPATH");
error(ERROR_FATAL, "Could not open buffer");
while (*path && !fname) {
- if (*path == ':') { /* skip colons */
+ if (*path == LISTSEP) { /* skip colons */
path++;
continue;
}
- cp = strchr(path, ':');
+ cp = strchr(path, LISTSEP);
if (cp) {
sz = (size_t) (cp - path);
sfwrite(fp, path, sz);
sz = sfprintf(fp, path);
path += sz;
}
- sfputc(fp, '/');
+ sfputc(fp, PATHSEP);
sfprintf(fp, arg);
s = sfstruse(fp);