NebulousLabs / Sia-GPU-Miner

A GPU Miner for Sia
MIT License
151 stars 79 forks source link

Print platform information and remove getopt #21

Closed JoshVorick closed 9 years ago

DavidVorick commented 9 years ago

no seg faults please

DavidVorick commented 9 years ago

return errors for invalid settings please

JoshVorick commented 9 years ago

The replacement for getopt isn't perfect, but I think it now covers all the big bases. Meaning no seg faults, exits on unknown flag (see line 289-293 to see where the implementation is a bit hacky). But it works how it should in all common use cases (correct and incorrect).

DavidVorick commented 9 years ago

./sia-gpu-miner --help

"Please use a valid flag. Use "--help" for options

./sia-gpu-miner -h

"Please use a valid flag. Use "--help" for options

DavidVorick commented 9 years ago

actually, I get that for all flags. Please test your program before committing.

JoshVorick commented 9 years ago

The error for all flags being invalid was because I started i at 0 and "./sia-gpu-miner" is an invalid flag. Oops. Fixed it though.