Skip to content

Conversation

@jjuhl
Copy link
Contributor

@jjuhl jjuhl commented Jan 26, 2026

The macros exist for a reason; not all systems use the same integer values to signal success or failure. Although all systems that TGUI currently supports use a 0 return from main to indicate success and everything else as failure, that's not universal. For example, VMS uses 1 to indicate success.

In the future TGUI may be ported to systems where the EXIT_SUCCESS/EXIT_FAILURE macros are relevant, so that's one reason to use them and also; they are just a lot more expressive/readable and make perfectly clear what's being returned, so that's another reason to use them.

The macros exist for a reason; not all systems use the same integer
values to signal success or failure.  Although all systems that TGUI
currently supports use a 0 return from main to indicate success and
everything else as failure, that's not universal. For example, VMS
uses 1 to indicate success.

In the future TGUI may be ported to systems where the
EXIT_SUCCESS/EXIT_FAILURE macros are relevant, so that's one reason to
use them and also; they are just a lot more expressive/readable and
make perfectly clear what's being returned, so that's another reason
to use them.
@texus texus merged commit ef7de90 into texus:1.x Jan 26, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants