On Sat, 18 Feb 2017, Denis St-Lau wrote:
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
representation)
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 !
Regards,
The logical way in which removing commas from DIR ought to be handled, in
my opinion, is to use the NO_SEP variable, à la PC DOS 6.3 and 7. That
said, your program is probably liable to break on MS-DOS 6.2x as well as
it does on FreeDOS, as 6.2 introduced the comma separators.
I don't know if FreeCOM has a comparable feature.
-uso.
------------------------------------------------------------------------------
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
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel