projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert the accidental removal of mod_libavcodec in r2286.
[synfig.git]
/
ETL
/
trunk
/
ETL
/
_stringf.h
diff --git
a/ETL/trunk/ETL/_stringf.h
b/ETL/trunk/ETL/_stringf.h
index
aaa87fd
..
120c326
100644
(file)
--- a/
ETL/trunk/ETL/_stringf.h
+++ b/
ETL/trunk/ETL/_stringf.h
@@
-41,8
+41,10
@@
#endif
#ifdef WIN32
#endif
#ifdef WIN32
+#define POPEN_BINARY_READ_TYPE "rb"
#define POPEN_BINARY_WRITE_TYPE "wb"
#else
#define POPEN_BINARY_WRITE_TYPE "wb"
#else
+#define POPEN_BINARY_READ_TYPE "r"
#define POPEN_BINARY_WRITE_TYPE "w"
#endif
#define POPEN_BINARY_WRITE_TYPE "w"
#endif
@@
-89,9
+91,12
@@
vstrprintf(const char *format, va_list args)
#ifdef HAVE_VASPRINTF // This is the preferred method (and safest)
char *buffer;
std::string ret;
#ifdef HAVE_VASPRINTF // This is the preferred method (and safest)
char *buffer;
std::string ret;
- vasprintf(&buffer,format,args);
- ret=buffer;
- free(buffer);
+ int i=vasprintf(&buffer,format,args);
+ if (i>-1)
+ {
+ ret=buffer;
+ free(buffer);
+ }
return ret;
#else
#ifdef HAVE_VSNPRINTF // This is the secondary method (Safe, but bulky)
return ret;
#else
#ifdef HAVE_VSNPRINTF // This is the secondary method (Safe, but bulky)
@@
-196,10
+201,12
@@
dirname(const std::string &str)
break;
if(iter==str.begin())
break;
if(iter==str.begin())
+ {
if (*iter==ETL_DIRECTORY_SEPARATOR)
return "/";
else
return ".";
if (*iter==ETL_DIRECTORY_SEPARATOR)
return "/";
else
return ".";
+ }
return std::string(str.begin(),iter);
}
return std::string(str.begin(),iter);
}