- Subject: Re: jed-0.99-18 + slang-2.1.2 = Run-Time Error
- From: Robert Riebisch <rr@xxxxxxxxxxxxxxxx>
- Date: Fri, 21 Sep 2007 21:39:56 +0200
"John E. Davis" wrote:
> Or you can use slang-2.0.7 for jed-0.99-18-- that would be my
> preference. I do not believe jed uses any slang-2.1 feature, e.g.,
> qualifiers (<http://www.jedsoft.org/slang/doc/html/slang-9.html#ss9.8>).
Please see <http://www.bttr-software.de/forum/forum_entry.php?id=769>
for my announcement "JED 0.99.18 (stable) + S-Lang 2.0.7 available". :-)
> >Also I would like to contribute a little `main.c' patch for DJGPP similar
> >to get_win32_root(). May I send it to the list zipped or in private mail?
>
> That's fine.
I just attach it here uncompressed.
> >And you're still looking for volunteers, aren't you? ;-)
>
> Please feel free to rewrite it.
This may take a while, because I'm always short of time. *g*
Robert Riebisch
--
BTTR Software
http://www.bttr-software.de/
diff -Nurd jed-orig/src/main.c jed/src/main.c
--- jed-orig/src/main.c 2006-12-16 17:59:16 +0100
+++ jed/src/main.c 2007-09-21 21:25:44 +0200
@@ -139,6 +139,30 @@
}
#endif
+#ifdef __DJGPP__
+# include <crt0.h>
+int _crt0_startup_flags = _CRT0_FLAG_USE_DOS_SLASHES;
+
+static char *get_dos_root(char *pgm)
+{
+ static char base_path[JED_MAX_PATH_LEN];
+ char *p;
+
+ strcpy(base_path, pgm);
+ /* drop file name */
+ p = strrchr(base_path, '\\');
+ if (p != NULL)
+ {
+ *p = '\0';
+ /* drop also 'bin' */
+ p = strrchr(base_path, '\\');
+ if (p != NULL)
+ *p = '\0';
+ }
+ return base_path;
+}
+#endif
+
static void set_jed_root (char *pgm)
{
@@ -163,6 +187,10 @@
if (jr == NULL)
jr = get_win32_root ();
#endif
+#ifdef __DJGPP__
+ if (jr == NULL)
+ jr = get_dos_root (pgm);
+#endif
if (jr != NULL)
{
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]