resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
511 stars 51 forks source link

getopt_long() style cleanup #257

Closed guijan closed 1 year ago

guijan commented 1 year ago

Alphabetically sort getopt_long()'s optstring, struct option array (by the short options), and switch statement's cases.

Align the text of all the members in our struct option array's initializer.

Remove 2 useless cases. getopt_long() will never return 0 with our usage, and if it does, the behavior of the 0 case isn't what we want. Also change the '?' case to default so scrot hard errors in the unlikelihood that our assumptions are broken, and remove the duplicate (and previously useless because it never happened) default.

Remove an useless comment (/ actions /).

Sort variable declarations by order of use.