deprecate vips_popen()
it didn't work well on win, and we no longer use it anyway
This commit is contained in:
parent
cb1634dd31
commit
58b6d73a70
@ -5692,3 +5692,14 @@ vips_get_option_group( void )
|
||||
|
||||
return( option_group );
|
||||
}
|
||||
|
||||
/* We used to use this for system() back in the day. But it's awkward to make
|
||||
* it work properly on win32, so this is nonw deprecated.
|
||||
*/
|
||||
FILE *
|
||||
vips_popenf( const char *fmt, const char *mode, ... )
|
||||
{
|
||||
vips_error( "popenf", "%s", _( "deprecated" ) );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
|
@ -286,8 +286,6 @@ int vips_mkdirf( const char *name, ... )
|
||||
int vips_rmdirf( const char *name, ... )
|
||||
__attribute__((format(printf, 1, 2)));
|
||||
int vips_rename( const char *old_name, const char *new_name );
|
||||
FILE *vips_popenf( const char *fmt, const char *mode, ... )
|
||||
__attribute__((format(printf, 1, 3)));
|
||||
|
||||
/**
|
||||
* VipsToken:
|
||||
|
@ -1221,6 +1221,9 @@ GOptionGroup *vips_get_option_group( void );
|
||||
*/
|
||||
VipsWindow *vips_window_ref( VipsImage *im, int top, int height );
|
||||
|
||||
FILE *vips_popenf( const char *fmt, const char *mode, ... )
|
||||
__attribute__((format(printf, 1, 3)));
|
||||
|
||||
/* This stuff is very, very old and should not be used by anyone now.
|
||||
*/
|
||||
#ifdef VIPS_ENABLE_ANCIENT
|
||||
|
@ -1191,40 +1191,6 @@ vips_isdirf( const char *name, ... )
|
||||
return( result );
|
||||
}
|
||||
|
||||
#ifdef OS_WIN32
|
||||
#ifndef popen
|
||||
#define popen(b,m) _popen(b,m)
|
||||
#endif
|
||||
#ifndef pclose
|
||||
#define pclose(f) _pclose(f)
|
||||
#endif
|
||||
#endif /*OS_WIN32*/
|
||||
|
||||
/* Do popen(), with printf-style args.
|
||||
*/
|
||||
FILE *
|
||||
vips_popenf( const char *fmt, const char *mode, ... )
|
||||
{
|
||||
va_list args;
|
||||
char buf[VIPS_PATH_MAX];
|
||||
FILE *fp;
|
||||
|
||||
va_start( args, mode );
|
||||
(void) vips_vsnprintf( buf, VIPS_PATH_MAX, fmt, args );
|
||||
va_end( args );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips_popenf: running: %s\n", buf );
|
||||
#endif /*DEBUG*/
|
||||
|
||||
if( !(fp = popen( buf, mode )) ) {
|
||||
vips_error( "popenf", "%s", strerror( errno ) );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
return( fp );
|
||||
}
|
||||
|
||||
/* Make a directory.
|
||||
*/
|
||||
int
|
||||
|
@ -94,10 +94,6 @@
|
||||
#include <expat.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef OS_WIN32
|
||||
#include <windows.h>
|
||||
#endif /*OS_WIN32*/
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/internal.h>
|
||||
#include <vips/debug.h>
|
||||
|
Loading…
Reference in New Issue
Block a user