open-watcom / open-watcom-v2

Open Watcom V2.0 - Source code repository, Wiki, Latest Binary build, Archived builds including all installers for download.
Other
956 stars 157 forks source link

OW tools commandline handling related issues #1209

Open winspool opened 7 months ago

winspool commented 7 months ago

As someone, who does not know the ugly Open Watcom commandline options, i need the commandline help a lot.

The usual way on Linux is "--help" unfortunately, the OpenWatcom tools do not support "--help" at all.

A common way on DOS/Windows is "-?" or "/?" or as an alternative "-h" or "/h". But this also does not work well in OpenWatcom.

For the OpenWatcom tools, options to get the commandline help is very strange: Sometimes, "-?" is needed, sometimes, "-?" gives a failure message, sometimes "-h" is needed, sometimes, "-h" gives a failure message, sometimes, starting a tool without args is needed sometimes, starting a tool without args gives a failure message sometimes, "-Help" is needed, sometimes, i did not find a way to get a commandline option help.

Even worse, sometimes the commandline help has a hint to print the help message, and when i use it, i get either a failure message, a crash or the Program starts normally. Examples: wcc386 -h wasm -h wd -Help wdw -Help

That was the case, before the commandline option code was touched and it is still the case. (I know, that updating the commandline parsing code is still not finished, but this issue should be fixed, when touching the code)

Help options between the gui version and the console version are sometimes different: "wd.exe" crashes with "-?" or "-h" or "-Help" "wdw.exe -Help" does not print the online Help, but starts

At least, "vi.exe" and "viw.exe" accept "-?"

jmalak commented 7 months ago

It is known problem. It is reason for replacing hand-crafted command line parser by optencod utility generated code in OW tools. It requires enhancement of optencod utility to be enough flexible to replace various features of hand-crafted parsers by general solution. It is important to hold backward compatibility for new solution. I did it for main tools but have no time to do it for any tools, because it is low-priority. Tools with new parser should work with -h or -? and on non-NIX platforms with /h or /? too.