better bool CLI options

This commit is contained in:
John Cupitt 2011-05-17 11:35:29 +01:00
parent 0c1034de44
commit 9afe09a68f
2 changed files with 4 additions and 2 deletions

View File

@ -218,7 +218,8 @@ vips_arithmetic_compile( VipsArithmeticClass *class )
printf( "vips_arithmetic_compile: " );
for( i = 0; i < IM_BANDFMT_LAST; i++ )
if( class->vector_program[i] )
printf( "%s ", VIPS_ENUM_NICK( VIPS_TYPE_FORMAT, i ) );
printf( "%s ",
VIPS_ENUM_NICK( VIPS_TYPE_BAND_FORMAT, i ) );
printf( "\n" );
#endif /*DEBUG*/
}

View File

@ -476,7 +476,8 @@ vips_call_options_add( VipsObject *object,
entry[0].long_name = g_param_spec_get_name( pspec );
entry[0].short_name = g_param_spec_get_name( pspec )[0];
entry[0].flags = G_OPTION_FLAG_OPTIONAL_ARG;
if( G_IS_PARAM_SPEC_BOOLEAN( pspec ) )
entry[0].flags = G_OPTION_FLAG_NO_ARG;
entry[0].arg = G_OPTION_ARG_CALLBACK;
entry[0].arg_data = (gpointer) vips_call_options_set;
entry[0].description = g_param_spec_get_blurb( pspec );