Topic: Big problem with Sys( ), possibly a bug (1 of 3), Read 32 times
Conf: Error messages, Crashes
From: Christian Ziemski
Date: Friday, May 12, 2006 08:59 AM


I'm on a new PC (with XP) now and did a fresh install of VEDIT 6.15.1.

Unfortunately {Misc, More macros, COMPDIR} sometimes fails now.


The reason seems to be a problem in VEDIT's Sys() command.

On my old PC I didn't have that problem because I had the environment variable TEMP set to C:\TMP.
On the new one it is TEMP=C:\DOCUME~1\ZIEMSK~1\LOCALS~1\Temp.

The relevant setting in VEDIT is: Config( F_TEMP_DIR, "Temp file directory", 5 )

And so some pathes within macros are much longer too. E.g. in COMPDIR.VDM...



I stripped down the problem to the following test cases:


Reg_Set(15, ^dir "c:\vedit\macros" /one > "c:\tmp\testddddddddddddd111111111111111111111111111112.txt"^)
Sys('"|@(15)"',DOS+MAX)

===> is o.k.


Reg_Set(15, ^dir "c:\vedit\macros" /one > "c:\tmp\testddddddddddddd1111111111111111111111111111112.txt"^)
Sys('"|@(15)"',DOS+MAX)

===> no file is created


Reg_Set(15, ^dir "c:\vedit\macros" /one > "c:\tmp\testddddddddddddd11111111111111111111111111111112.txt"^)
Sys('"|@(15)"',DOS+MAX)

===> no file is created


Reg_Set(15, ^dir "c:\vedit\macros" /one > "c:\tmp\testddddddddddddd111111111111111111111111111111112.txt"^)
Sys('"|@(15)"',DOS+MAX)

===> Error message in the DOS box: "Program too big to fit in memory"
===> no file is created



As far as I can tell the reason for the failure is not the length of
the filename but the length of the string passed to/by Sys().


Christian

 


Topic: Re: Big problem with Sys( ), possibly a bug (2 of 3), Read 33 times
Conf: Error messages, Crashes
From: Ted Green
Date: Friday, May 12, 2006 11:44 AM

At 09:00 AM 5/12/2006, you wrote:
>As far as I can tell the reason for the failure is not the length of
>the filename but the length of the string passed to/by Sys().

The biggest string that can be passed to the Sys(...,DOS) command is around 100 chars. (VEDIT internally creates a complete command which cannot be more than 128 chars.) This is an old DOS limitation, which still exists in the Windows DOS-Box. I recently expanded the Sys() command, without the DOS option, to work with string of 1000 chars.

As I recall, you are shelling out with a DOS "Dir" command to get each file's date and size. The best solution is to use the new File_Stamp_Date() command to get each file date within the macro.

Ted.

 


Topic: Re: Big problem with Sys( ), possibly a bug (3 of 3), Read 35 times
Conf: Error messages, Crashes
From: Christian Ziemski
Date: Friday, May 12, 2006 12:31 PM

Ted:

On Fri, 12 May 2006 11:44:00 -0400, you wrote:

>The biggest string that can be passed to the Sys(...,DOS) command is
>around 100 chars.
>This is an old DOS limitation, which still exists in the Windows
>DOS-Box.

Grrrmmbbll. I hate those limitations.
In those old days it might have been o.k. but today???

In another message you wrote:
> Whoever implemented DOS 2.0 with backslashes should be shot into
> high orbit and then into the sun.

Agreed. And not only the backslash guys! :-)


>As I recall, you are shelling out with a DOS "Dir" command to get
>each file's date and size. The best solution is to use the new
>File_Stamp_Date() command to get each file date within the macro.

I'll have a look at that.


Christian