Hi guys,

I don't have any solution to the problem but while on the topic of FreeCOM
and batch file parameters, I have discovered an issue which I believe is a
genuine bug.

Create a batch file, for example:

ECHO %1 %2 %3 %4 %5 %6 %7 %8 %9

Then run it with a parameter like "http://www.example.com/";. It will print

http: //www.example.com /

while MS-DOS and Windows will print it unmodified.

I can confirm this but I think it's _not_a_bug_, rather intentionally different behavior. (I know, this also means compatibility problems.) Apparently, COMMAND.COM cuts apart switches in the command line into stand-alone arguments. Your example is considered as:
1. a command "http:";
2. a switch "//www.example.com", with double switch characters;
3. a switch "/", an empty switch.

You can prove this by adding "switchar=$" (only one "c"!) to [fd]config.sys which changes the system-wide switch character to "$". Now your example will be printed as "http://www.example.com/"; but "http:$$www.example.com$" will be similary cut into pieces as "http: $$www.example.com $".

Always enclose "suspicious" command line arguments into quotation marks so that they won't be reinterpreted in unexpected ways and that's not even DOS- or COMMAND.COM-specific.

Joe
--
KOVÁCS Balázs aka Joe Forster/STA; s...@c64.rulez.org; http://sta.c64.org
Don't E-mail spam, HTML or uncompressed files! More contacts on homepage
------------------------------------------------------------------------------
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

Reply via email to