revise arg names

use _ everywhere (we have a few uses of - as a separator)
This commit is contained in:
John Cupitt 2022-05-07 14:50:05 +01:00
parent cdcafbc4c5
commit 460a19b78e
6 changed files with 19 additions and 19 deletions

View File

@ -25,7 +25,7 @@
* 1/4/18 * 1/4/18
* - drop incompatible ICC profiles before save * - drop incompatible ICC profiles before save
* 24/7/21 * 24/7/21
* - add fail-on * - add fail_on
*/ */
/* /*
@ -1197,7 +1197,7 @@ vips_foreign_load_class_init( VipsForeignLoadClass *class )
G_STRUCT_OFFSET( VipsForeignLoad, access ), G_STRUCT_OFFSET( VipsForeignLoad, access ),
VIPS_TYPE_ACCESS, VIPS_ACCESS_RANDOM ); VIPS_TYPE_ACCESS, VIPS_ACCESS_RANDOM );
VIPS_ARG_ENUM( class, "fail-on", 109, VIPS_ARG_ENUM( class, "fail_on", 109,
_( "Fail on" ), _( "Fail on" ),
_( "Error level to fail on" ), _( "Error level to fail on" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,

View File

@ -111,7 +111,7 @@
* 13/9/20 * 13/9/20
* - set resolution unit from JFIF * - set resolution unit from JFIF
* 24/7/21 * 24/7/21
* - add fail-on support * - add fail_on support
*/ */
/* /*

View File

@ -5,7 +5,7 @@
* 29/11/11 * 29/11/11
* - split to make load, load from buffer and load from file * - split to make load, load from buffer and load from file
* 24/7/21 * 24/7/21
* - add fail-on support * - add fail_on support
*/ */
/* /*
@ -470,7 +470,7 @@ vips_foreign_load_jpeg_buffer_init( VipsForeignLoadJpegBuffer *buffer )
* |[ * |[
* vips_jpegload( "fred.jpg", &out, * vips_jpegload( "fred.jpg", &out,
* "shrink", 8, * "shrink", 8,
* "fail-on", VIPS_FAIL_ON_TRUNCATED, * "fail_on", VIPS_FAIL_ON_TRUNCATED,
* NULL ); * NULL );
* ]| * ]|
* *

View File

@ -906,7 +906,7 @@ vips_foreign_load_openslide_class_init( VipsForeignLoadOpenslideClass *class )
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, associated ), G_STRUCT_OFFSET( VipsForeignLoadOpenslide, associated ),
NULL ); NULL );
VIPS_ARG_BOOL( class, "attach-associated", 13, VIPS_ARG_BOOL( class, "attach_associated", 13,
_( "Attach associated" ), _( "Attach associated" ),
_( "Attach all associated images" ), _( "Attach all associated images" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,

View File

@ -9,7 +9,7 @@
* 18/7/20 * 18/7/20
* - add @profile param to match tiff, jpg, etc. * - add @profile param to match tiff, jpg, etc.
* 30/7/21 * 30/7/21
* - rename "reduction-effort" as "effort" * - rename "reduction_effort" as "effort"
*/ */
/* /*
@ -220,7 +220,7 @@ vips_foreign_save_webp_class_init( VipsForeignSaveWebpClass *class )
G_STRUCT_OFFSET( VipsForeignSaveWebp, profile ), G_STRUCT_OFFSET( VipsForeignSaveWebp, profile ),
NULL ); NULL );
VIPS_ARG_INT( class, "reduction-effort", 21, VIPS_ARG_INT( class, "reduction_effort", 21,
_( "Reduction effort" ), _( "Reduction effort" ),
_( "Level of CPU effort to reduce file size" ), _( "Level of CPU effort to reduce file size" ),
VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED, VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED,

View File

@ -36,7 +36,7 @@
* 14/4/22 * 14/4/22
* - add a seq to thumbnail_image to stop cache thrashing * - add a seq to thumbnail_image to stop cache thrashing
* 28/4/22 * 28/4/22
* - add fail-on * - add fail_on
*/ */
/* /*
@ -1020,7 +1020,7 @@ vips_thumbnail_class_init( VipsThumbnailClass *class )
G_STRUCT_OFFSET( VipsThumbnail, intent ), G_STRUCT_OFFSET( VipsThumbnail, intent ),
VIPS_TYPE_INTENT, VIPS_INTENT_RELATIVE ); VIPS_TYPE_INTENT, VIPS_INTENT_RELATIVE );
VIPS_ARG_ENUM( class, "fail-on", 121, VIPS_ARG_ENUM( class, "fail_on", 121,
_( "Fail on" ), _( "Fail on" ),
_( "Error level to fail on" ), _( "Error level to fail on" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
@ -1095,7 +1095,7 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor )
if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) ) { if( vips_isprefix( "VipsForeignLoadJpeg", thumbnail->loader ) ) {
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"shrink", (int) factor, "shrink", (int) factor,
NULL ) ); NULL ) );
} }
@ -1103,7 +1103,7 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor )
thumbnail->loader ) ) { thumbnail->loader ) ) {
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"level", (int) factor, "level", (int) factor,
NULL ) ); NULL ) );
} }
@ -1112,7 +1112,7 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor )
vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) { vips_isprefix( "VipsForeignLoadWebp", thumbnail->loader ) ) {
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"scale", 1.0 / factor, "scale", 1.0 / factor,
NULL ) ); NULL ) );
} }
@ -1122,7 +1122,7 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor )
if( thumbnail->page_pyramid ) if( thumbnail->page_pyramid )
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"page", (int) factor, "page", (int) factor,
NULL ) ); NULL ) );
else else
@ -1137,32 +1137,32 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor )
if( thumbnail->subifd_pyramid ) if( thumbnail->subifd_pyramid )
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"subifd", (int) factor, "subifd", (int) factor,
NULL ) ); NULL ) );
else if( thumbnail->page_pyramid ) else if( thumbnail->page_pyramid )
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"page", (int) factor, "page", (int) factor,
NULL ) ); NULL ) );
else else
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
NULL ) ); NULL ) );
} }
else if( vips_isprefix( "VipsForeignLoadHeif", thumbnail->loader ) ) { else if( vips_isprefix( "VipsForeignLoadHeif", thumbnail->loader ) ) {
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
"thumbnail", (int) factor, "thumbnail", (int) factor,
NULL ) ); NULL ) );
} }
else { else {
return( vips_image_new_from_file( file->filename, return( vips_image_new_from_file( file->filename,
"access", VIPS_ACCESS_SEQUENTIAL, "access", VIPS_ACCESS_SEQUENTIAL,
"fail-on", thumbnail->fail_on, "fail_on", thumbnail->fail_on,
NULL ) ); NULL ) );
} }
} }