From: Richard M. Stallman Date: Tue, 7 Jun 1994 15:19:33 +0000 (+0000) Subject: (rootrelativepath) [MSDOS]: Define, expanding to dynamic X-Git-Tag: emacs-19.34~8033 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35ebc5cf90670c92f1676a0d4f1ae3419e90cbed;p=emacs.git (rootrelativepath) [MSDOS]: Define, expanding to dynamic location of data directory. --- diff --git a/lib-src/yow.c b/lib-src/yow.c index cbcf9f4c84c..0f289a19358 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c @@ -18,6 +18,18 @@ #define YOW_FILE "yow.lines" #endif +#ifdef MSDOS +#define rootrelativepath(rel) \ +({\ + static char res[BUFSIZE], *p;\ + strcpy (res, argv[0]);\ + p = res + strlen (res);\ + while (p != res && *p != '/' && *p != '\\' && *p != ':') p--;\ + strcpy (p + 1, "../");\ + strcpy (p + 4, rel);\ + &res;}) +#endif + main (argc, argv) int argc; char *argv[];