metamath / metamath-exe

Metamath program - source code for the Metamath executable
GNU General Public License v2.0
77 stars 25 forks source link

Remove g_printHelp flag #82

Closed neunenak closed 2 years ago

neunenak commented 2 years ago

The help functions were previously setting a flag g_printHelp for each block of help commands to print based on the string input from the user to the help command. The H() function was then internally checking that g_printHelp flag to determine whether to print its argument, or do nothing.

It's clearer to have the help-printing functions check the input string, and then just print the appropriate block then and there. This allows for the removal of the g_printHelp global flag altogether, and makes the underlying logic easier to understand.