Test system included into Android build

This commit is contained in:
Andrey Kamaev
2011-04-11 14:47:06 +00:00
parent 1a02877ab7
commit b906ad3108
17 changed files with 91 additions and 78 deletions

View File

@@ -349,6 +349,23 @@ string format( const char* fmt, ... )
return string(buf);
}
string tempfile( const char* suffix )
{
char buf[L_tmpnam];
char* name = 0;
#if ANDROID
strcpy(buf, "/sdcard/__opencv_temp_XXXXXX");
name = mktemp(buf);
#else
name = tmpnam(buf);
#endif
if (*name == '\\')
++name;
if (suffix != 0)
return string(buf) + suffix;
return buf;
}
static CvErrorCallback customErrorCallback = 0;
static void* customErrorCallbackData = 0;
static bool breakOnError = false;