arminbiere / runlim

Other
12 stars 4 forks source link

runlim.c: fix some missing options in switch #3

Closed mtzguido closed 1 year ago

mtzguido commented 1 year ago

'r' and 'v' are currently not handled by the switch, causing this code to attempt opening a log file (with NULL name) when invoked as runlim -r or runlim -v.

mtzguido commented 1 year ago

Just noticed this fixes #2. Also wondering if using GNU getopt would be better? I could make the change if there is interest.

arminbiere commented 1 year ago

Thanks for reporting. I went over the code and fixed it. I think the current option handling is in principle fine. Also note that we do not want to work on the options of the program after the program as in 'runlim -r 1 date --help', which should print the help message of the 'date' command.

mtzguido commented 1 year ago

Thanks for reporting. I went over the code and fixed it.

Thanks!

I think the current option handling is in principle fine. Also note that we do not want to work on the options of the program after the program as in 'runlim -r 1 date --help', which should print the help message of the 'date' command.

GNU getopt can do that, but there's also no big reason to change.