This commit is contained in:
John Cupitt 2010-06-24 16:41:01 +00:00
parent 3f8259e390
commit b56ad5ec7f
3 changed files with 22 additions and 8 deletions

View File

@ -4,6 +4,7 @@
- oops, moreconst and moreeqconst were the same
- better buffer handling in sinkdisc for single-line images
- less chatty errors from "vips"
- oops, don't rename "copy_set" as "copy_", thanks Ole
12/5/10 started 7.22.0
- bump and rename

5
TODO
View File

@ -1,7 +1,4 @@
- drop "set" suffix renames im_copy_set as copy_ argh
I guess this causes nip2 problems as well? or we call the full name I guess
- regenerate c++ and python bindings, 7.22 branch needs copy_set fix
- lcms2 needs testing

View File

@ -34,6 +34,7 @@
* - drop _f postfixes, drop many postfixes
* 24/6/10
* - less chatty error messages
* - oops, don't rename "copy_set" as "copy_"
*/
/*
@ -463,7 +464,10 @@ drop_postfix( char *str, const char *postfix )
static void
c2cpp_name( const char *in, char *out )
{
static const char *postfix[] = {
static const char *dont_drop[] = {
"_set",
};
static const char *drop[] = {
"_vec",
"const",
"tra",
@ -481,12 +485,24 @@ c2cpp_name( const char *in, char *out )
else
strcpy( out, in );
/* Repeatedly drop postfixes while we can.
/* Repeatedly drop postfixes while we can. Stop if we see a dont_drop
* postfix.
*/
do {
gboolean found;
found = FALSE;
for( i = 0; i < IM_NUMBER( dont_drop ); i++ )
if( ispostfix( dont_drop[i], out ) ) {
found = TRUE;
break;
}
if( found )
break;
changed = FALSE;
for( i = 0; i < IM_NUMBER( postfix ); i++ )
changed |= drop_postfix( out, postfix[i] );
for( i = 0; i < IM_NUMBER( drop ); i++ )
changed |= drop_postfix( out, drop[i] );
} while( changed );
}