Hi all,

There is an incompatibility issue with the "File Selection" dialogs of one of 
our legacy engineering MS-DOS programs. We don't have the source code of the 
program but I know it was written in Borland Turbo-Basic a long time ago. For 
years I thought it was a flaw in the FreeDOS compatibility. In fact I found 
recently this is because the output of the "dir" command is dumped in a 
temporary text file and parsed by the program in a fragile way. I discovered 
three requirements for this program to work. The display of the "dir" command 
must be formatted in a way that :

1 - The file dates must be printed with a 2 digits year representation
2 - The file times must be printed without the AM/PM flag (24 hours 
3 - The thousands delimiter of the file sizes must be a blank space (" ") 
instead of a comma (",")

The first requirement is easy to handle in autoexec.bat with: SET DIRCMD=/-4.  
The second and third requirements need an appropriate fdconfig.sys setting, for 
example:  !Country = 002, 863, C:\FDOS\BIN\Country.sys

But when installing FreeDOS 1.2 in DosBox, we can't configure the fdconfig.sys. 
I want to use the program this way in order to operate it automatically with a 
Python script on the Host machine while sharing files and directories. So now 
I'm trying to patch and recompile the FreeCom's COMMAND.COM program to meet the 
above requirements.

I am not proficient in C but all seems to happen in the DisplaySingleDirEntry() 
function of the DIR.C file. At least I can remove the AM/PM flag with an ugly 
"p[strlen(p)-1] = 0;" just before the "fputs(p, stdout);" at line of code n°884.

The compilation works well but now I struggle to modify the thousand delimiter. 
I thought it could be easy with the convert() function of NUM_FMT.C (see 
temp[30 - c++] = nlsBuf->thousendsSep[0];) but it have no effects and I don't 
see how to change the country settings.

Does someone have an idea how this could be done?

By the way, I really like the FDIMPLES provided with the new FreeDOS 1.2 !


Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Freedos-devel mailing list

Reply via email to