Fixed Widgets functions return value and their parsing to exit codes to be the same convention
Most functions in Widgets
follow the convention of the return value is a bool
signifying whether the dialog was "accepted", and then main()
converts it to a POSIX exit code (where 0 is considered success, unlike C "booleans") using the phrase return retcode ? 0 : 1;
- but in some cases this is not followed, either:
- The return value is defined as int even though it is still internally a boolean
- The return value is understood at
main()
to be the desired exit code - The return value is an int that is supposed to be the exit code (and then possibly handled incorrectly at
main()
)
This MR attempts to align all calls to use the initial convention - the Widgets
function return code is boolean where true
would result in a POSIX exit code set to 0 and false
would result in the POSIX exit code set to 1.