1. command_line() bug in DOS interpreter
- Posted by Juergen Luethje <j.lue at gmx.de> Jan 26, 2006
- 491 views
When running the following code with ex.exe 2.5, CMD[2] is missing the path (tested on Windows 98)!
include misc.e constant CMD = command_line() pretty_print(1, CMD, {3}) puts(1, "\nPress Enter ...") if getc(0) then end if
Regards, Juergen
2. Re: command_line() bug in DOS interpreter
- Posted by Greg Haberek <ghaberek at gmail.com> Jan 26, 2006
- 470 views
> When running the following code with ex.exe 2.5, > CMD[2] is missing the path (tested on Windows 98)! That means the file is in the current directory. Here's the Reference Manual example:
-- The user types: ex myprog myfile.dat 12345 "the end" cmd = command_line() -- cmd will be: {"C:\EUPHORIA\BIN\EX.EXE", "myprog", "myfile.dat", "12345", "the end"}
note it just says "myprog" - use current_dir() to obtain the path. ~Greg
3. Re: command_line() bug in DOS interpreter
- Posted by Vincent <darkvincentdude at yahoo.com> Jan 26, 2006
- 480 views
Juergen Luethje wrote: > > When running the following code with ex.exe 2.5, > CMD[2] is missing the path (tested on Windows 98)! > > }}} <eucode> > include misc.e > constant CMD = command_line() > pretty_print(1, CMD, {3}) > puts(1, "\nPress Enter ...") > if getc(0) then end if > </eucode> {{{ > > Regards, > Juergen { "C:\EUPHORIA\BIN\EX.EXE", "C:\DOCUME~1\Vincent\Desktop\ag.ex" } Press Enter ... Whats the problem? Somtimes second index of command_line() will only have what you typed in the interpreter command line, it depends on how you open the program. If you double clicked it, it should always be full path. My include system (I'm still working on but almost done) builds the full path of the main file when it isn't supplied via interpreter command line with the help of chdir() and current_dir(). A simular method works with the actual including of files. I've just fixed my problem with DOS LFN. I've made it so you have to use 8.3 truncated paths (which would have spaces, etc. with LFN) when typing in a program to load from the DOS command line for (DOS Eu only), loading from the interpreter command line (DOS Eu only) and including files (DOS Eu only). It will fail with a normal error dump if you try. Windows Eu will still support LFN in these cases, and you could still use LFN with DOS programs so long as any include statement paths are 8.3 compliant (this include main and relative paths with foward directories too). I've been doing major regression testing on the system on DOS, DOS prompt, Windows, and Linux. Everything works fine, but I want to do it again when I'm done with my new changes. FreeBSD is presumed to work if Linux works, but I suspect Robert will scrutinize my system for any weaknesses on all platforms. I want my system perfect before I send it out and thats exactly what it will be by the end of this weekend. Regards, Vincent