Timeline for A dice roller in C
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 1, 2020 at 17:18 | comment | added | chux | @WilliamPursell Agree that incorrect usage should not result in a long response. Will ponder the other ideas. | |
| Apr 1, 2020 at 15:23 | comment | added | William Pursell | You should never print usage in response to an incorrect call line. A simple, succinct error message is far better. If you want to treat an incorrect call as a request for usage, then print it to stdout and do not consider it an error. (IMO, that is only appropriate if called with no arguments.) wrp.github.io/blog/2020/02/21/succinct-err-messages.html | |
| Mar 27, 2020 at 15:15 | vote | accept | phillbush | ||
| Mar 27, 2020 at 13:28 | comment | added | phillbush | Do you think it would be better if I gather all separate's printf at the final of rolldice() and better the readability at the price of adding another, redundant loop? | |
| Mar 27, 2020 at 12:21 | comment | added | phillbush | I am following suckless philosophy and OpenBSD practice of considering a dedicated -h bloat, since the program can handle it by default without a special option. Most UNIX programs (except the GNU ones) do not have -h but will show usage() when calling with -h. | |
| Mar 27, 2020 at 12:03 | comment | added | chux | @barthooper Yes, I see that now. Detail idea: For getopt(), I like the default to result in a usage() and a prompt EXIT_FAILURE, whereas -h results in usage() and EXIT_SUCCESS. | |
| Mar 27, 2020 at 11:57 | comment | added | phillbush | The program does support -h. When passing -h (or any other option other than -s) it will show usage(). | |
| Mar 27, 2020 at 2:38 | history | answered | chux | CC BY-SA 4.0 |