aboutsummaryrefslogtreecommitdiffstats
path: root/runtest.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-07-04 16:47:58 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-07-04 16:47:58 +0000
commitf7d1660d80d442df9c20c43d56ec6fb5a777a24d (patch)
tree3ed872631edb03e2db21cd191148966b62c4495e /runtest.c
parent9e09c1441f0b67d4e359d73dd2e349410688d7a2 (diff)
downloadandroid_external_libxml2-f7d1660d80d442df9c20c43d56ec6fb5a777a24d.tar.gz
android_external_libxml2-f7d1660d80d442df9c20c43d56ec6fb5a777a24d.tar.bz2
android_external_libxml2-f7d1660d80d442df9c20c43d56ec6fb5a777a24d.zip
windows_sucks++ , Daniel
Diffstat (limited to 'runtest.c')
-rw-r--r--runtest.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/runtest.c b/runtest.c
index 52dcf952..2b29d2f2 100644
--- a/runtest.c
+++ b/runtest.c
@@ -110,9 +110,22 @@ static int glob(const char *pattern, int flags,
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
unsigned int nb_paths = 0;
+ char directory[500], *tmp;
+ int len;
if ((pattern == NULL) || (pglob == NULL)) return(-1);
+ strncpy(499, directory, pattern);
+ for (len = strlen(directory);len >= 0;len--) {
+ if (directory[len] == '/') {
+ directory[len + 1] = 0;
+ break;
+ }
+ }
+ if (len <= 0)
+ len = 0;
+
+
ret = pglob;
memset(ret, 0, sizeof(glob_t));
@@ -125,7 +138,8 @@ static int glob(const char *pattern, int flags,
FindClose(hFind);
return(-1);
}
- ret->gl_pathv[ret->gl_pathc] = strdup(FindFileData.cFileName);
+ strncpy(499 - len, directory + len, FindFileData.cFileName);
+ ret->gl_pathv[ret->gl_pathc] = strdup(directory);
if (ret->gl_pathv[ret->gl_pathc] == NULL)
goto done;
ret->gl_pathc++;
@@ -139,7 +153,8 @@ static int glob(const char *pattern, int flags,
ret->gl_pathv = tmp;
nb_paths *= 2;
}
- ret->gl_pathv[ret->gl_pathc] = strdup(FindFileData.cFileName);
+ strncpy(499 - len, directory + len, FindFileData.cFileName);
+ ret->gl_pathv[ret->gl_pathc] = strdup(directory);
if (ret->gl_pathv[ret->gl_pathc] == NULL)
break;
ret->gl_pathc++;
@@ -3710,7 +3725,6 @@ testThread(void)
xmlLoadCatalog(catalog);
nb_tests++;
- nb_tests++;
for (i = 0; i < num_threads; i++) {
results[i] = NULL;
tid[i] = (pthread_t) - 1;
@@ -3769,6 +3783,7 @@ testThread(void)
xmlInitParser();
for (repeat = 0; repeat < TEST_REPEAT_COUNT; repeat++) {
xmlLoadCatalog(catalog);
+ nb_tests++;
for (i = 0; i < num_threads; i++) {
results[i] = 0;