Improved help text

This commit is contained in:
AnnaSnoeijs 2025-06-06 21:31:59 +02:00
parent d3833fb4a0
commit be33c08738

View file

@ -88,18 +88,14 @@ int main( int argc, char *argv[] ){
break; break;
case 'h': // --help case 'h': // --help
printf( "Usage: %s [OPTIONS]\n\n", argv[0] ); printf( "Usage: %s [OPTIONS]\n\n", argv[0] );
for( int i = 0; long_options[i].name != NULL; i++ ){ printf(
if( long_options[i].val != '\0' ) " -h --help Print this help text\n"
printf( " -%c ", long_options[i].val ); " -l --license Print the LICENSE file\n"
else printf( " " ); " --version Print the version string\n"
if( long_options[i].has_arg ) "\n"
printf( "n" ); " -c n --columns n Set the amount of columns\n"
else printf( " " ); " -r n --rows n Set the amount of rows\n"
printf( " --%s ", long_options[i].name ); );
if( long_options[i].has_arg )
printf( "n\n" );
else printf( "\n" );
}
return 0; return 0;
case 'l': // --license case 'l': // --license
for( for(