Diff of /trunk/src/osm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 171 by harbaum, Tue Apr 28 10:29:52 2009 UTC revision 175 by harbaum, Wed Jun 10 09:24:47 2009 UTC
# Line 1065  static osm_t *process_file(const char *f Line 1065  static osm_t *process_file(const char *f
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);
# Line 1073  osm_t *osm_parse(char *filename) { Line 1073  osm_t *osm_parse(char *filename) {
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;

Legend:
Removed from v.171  
changed lines
  Added in v.175