1065 |
|
|
1066 |
#include <sys/time.h> |
#include <sys/time.h> |
1067 |
|
|
1068 |
osm_t *osm_parse(char *filename) { |
osm_t *osm_parse(char *path, char *filename) { |
1069 |
|
|
1070 |
struct timeval start; |
struct timeval start; |
1071 |
gettimeofday(&start, NULL); |
gettimeofday(&start, NULL); |
1073 |
LIBXML_TEST_VERSION; |
LIBXML_TEST_VERSION; |
1074 |
|
|
1075 |
// use stream parser |
// use stream parser |
1076 |
osm_t *osm = process_file(filename); |
osm_t *osm = NULL; |
1077 |
|
if(filename[0] == '/') |
1078 |
|
osm = process_file(filename); |
1079 |
|
else { |
1080 |
|
char *full = g_strjoin(NULL, path, filename, NULL); |
1081 |
|
osm = process_file(full); |
1082 |
|
g_free(full); |
1083 |
|
} |
1084 |
|
|
1085 |
xmlCleanupParser(); |
xmlCleanupParser(); |
1086 |
|
|
1087 |
struct timeval end; |
struct timeval end; |