Merge remote-tracking branch 'origin/7.28'

This commit is contained in:
John Cupitt 2012-07-16 14:41:12 +01:00
commit 34602a082a
5 changed files with 25 additions and 13 deletions

View File

@ -28,6 +28,8 @@
* - redone as a class
* 1/2/12
* - complex ==, != were broken
* 16/7/12
* - im1 > im2, im1 >= im2 were broken
*/
/*
@ -88,18 +90,16 @@ static int
vips_relational_build( VipsObject *object )
{
VipsRelational *relational = (VipsRelational *) object;
VipsArithmetic *arithmetic = (VipsArithmetic *) object;
VipsBinary *binary = (VipsBinary *) object;
if( relational->relational == VIPS_OPERATION_RELATIONAL_MORE ) {
relational->relational = VIPS_OPERATION_RELATIONAL_LESS;
VIPS_SWAP( VipsImage *,
arithmetic->ready[0], arithmetic->ready[1] );
VIPS_SWAP( VipsImage *, binary->left, binary->right );
}
if( relational->relational == VIPS_OPERATION_RELATIONAL_MOREEQ ) {
relational->relational = VIPS_OPERATION_RELATIONAL_LESSEQ;
VIPS_SWAP( VipsImage *,
arithmetic->ready[0], arithmetic->ready[1] );
VIPS_SWAP( VipsImage *, binary->left, binary->right );
}
if( VIPS_OBJECT_CLASS( vips_relational_parent_class )->build( object ) )

View File

@ -57,7 +57,7 @@ typedef VipsUnaryClass VipsSignClass;
G_DEFINE_TYPE( VipsSign, vips_sign, VIPS_TYPE_UNARY );
#define CSIGN( TYPE ) { \
TYPE *p = (TYPE *) in; \
TYPE *p = (TYPE *) in[0]; \
TYPE *q = (TYPE *) out; \
int x; \
\
@ -82,7 +82,7 @@ G_DEFINE_TYPE( VipsSign, vips_sign, VIPS_TYPE_UNARY );
}
#define SIGN( TYPE ) { \
TYPE *p = (TYPE *) in; \
TYPE *p = (TYPE *) in[0]; \
signed char *q = (signed char *) out; \
int x; \
\

View File

@ -237,7 +237,7 @@ vips_foreign_save_jpeg_buffer_build( VipsObject *object )
area = vips_area_new_blob( (VipsCallbackFn) vips_free, obuf, olen );
g_object_set( file, "buf", area, NULL );
g_object_set( file, "buffer", area, NULL );
return( 0 );
}

View File

@ -206,7 +206,7 @@ vips_foreign_save_png_buffer_build( VipsObject *object )
area = vips_area_new_blob( (VipsCallbackFn) vips_free, obuf, olen );
g_object_set( object, "buf", area, NULL );
g_object_set( object, "buffer", area, NULL );
return( 0 );
}

View File

@ -565,16 +565,28 @@ vips_filename_suffix_match( const char *path, const char *suffixes[] )
char *
vips_getnextoption( char **in )
{
char *p = *in;
char *q = p;
char *p;
char *q;
p = *in;
q = p;
if( !p || !*p )
return( NULL );
/* Find the next ',' not prefixed with a '\'.
/* Find the next ',' not prefixed with a '\'. If the first character
* of p is ',', there can't be a previous escape character.
*/
while( (p = strchr( p, ',' )) && p[-1] == '\\' )
for(;;) {
if( !(p = strchr( p, ',' )) )
break;
if( p == q )
break;
if( p[-1] != '\\' )
break;
p += 1;
}
if( p ) {
/* Another option follows this one .. set up to pick that out