diff --git a/ChangeLog b/ChangeLog index f30b5d75..c156b0ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,7 @@ - added matio as a dependency - added Matlab save file read - added Radiance file read +- better file-not-found messages 11/9/08 started 7.16.3 - oop typo in manpage for im_project() diff --git a/TODO b/TODO index ec2c1f81..960c81d6 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,8 @@ +- im_rad2vips should be radiance.c? same for im_mat2vips? new naming + convention + - move im_shrink & friends to resample? match_linear, match_linear_search? @@ -22,11 +25,6 @@ - update the Portfiles on the mac and on the website from the macports ones -- try - - vips im_copy skdjjfhwlfj t.v - - stupid error message (does not say "file not found") diff --git a/libsrc/format/format.c b/libsrc/format/format.c index 3737c0ae..0c2165a0 100644 --- a/libsrc/format/format.c +++ b/libsrc/format/format.c @@ -265,16 +265,16 @@ vips_format_for_file( const char *name ) im_filename_split( name, filename, options ); if( !im_existsf( "%s", filename ) ) { - im_error( "vips_format_for_file", - _( "\"%s\" is not readable" ), filename ); + im_error( "format_for_file", + _( "file \"%s\" not found" ), filename ); return( NULL ); } if( !(format = (VipsFormatClass *) vips_format_map( (VSListMap2Fn) format_for_file_sub, (void *) name, (void *) filename )) ) { - im_error( "vips_format_for_file", - _( "\"%s\" is not in a supported format" ), filename ); + im_error( "format_for_file", + _( "file \"%s\" not a known format" ), filename ); return( NULL ); } diff --git a/libsrc/iofuncs/error_exit.c b/libsrc/iofuncs/error_exit.c index da2a3064..370c848d 100644 --- a/libsrc/iofuncs/error_exit.c +++ b/libsrc/iofuncs/error_exit.c @@ -69,7 +69,7 @@ error_exit( const char *fmt, ... ) va_end( ap ); fprintf( stderr, "\n" ); - fprintf( stderr, "%s", im_errorstring() ); + fprintf( stderr, "%s", im_error_buffer() ); exit( 1 ); } diff --git a/libsrc/iofuncs/im_open.c b/libsrc/iofuncs/im_open.c index 3cd0da81..9c7bd4b0 100644 --- a/libsrc/iofuncs/im_open.c +++ b/libsrc/iofuncs/im_open.c @@ -380,12 +380,8 @@ im_open( const char *filename, const char *mode ) format->header, format->load, filename )) ) return( NULL ); } - else { - im_error( "im_open", - _( "\"%s\" is not in a recognised format" ), - filename ); + else return( NULL ); - } break; case 'w': diff --git a/libsrc/iofuncs/object.c b/libsrc/iofuncs/object.c index 48db8c49..a68d7442 100644 --- a/libsrc/iofuncs/object.c +++ b/libsrc/iofuncs/object.c @@ -999,10 +999,8 @@ vips_object_new_from_string_set( VipsObject *object, void *a, void *b ) VipsObject * vips_object_new_from_string( const char *basename, const char *p ) { - VipsToken token; char string[PATH_MAX]; GType type; - VipsObject *object; if( !(p = vips__token_need( p, VIPS_TOKEN_STRING, string, PATH_MAX )) || !(type = vips_type_find( basename, string )) ) diff --git a/src/iofuncs/header.c b/src/iofuncs/header.c index 8a0cdbf3..27cc9168 100644 --- a/src/iofuncs/header.c +++ b/src/iofuncs/header.c @@ -90,7 +90,7 @@ print_error( const char *fmt, ... ) va_start( ap, fmt ); vfprintf( stderr, fmt, ap ); va_end( ap ); - fprintf( stderr, "\n%s\n", im_error_buffer() ); + fprintf( stderr, "\n%s", im_error_buffer() ); im_error_clear(); }