119 |
} |
} |
120 |
|
|
121 |
static const char *cache_type_str[] = { "<Unknown>", |
static const char *cache_type_str[] = { "<Unknown>", |
122 |
"Traditional Cache|Traditional|Geocache", "Multi-cache|Multi", |
"Traditional Cache|Traditional|Geocache", "Multi-cache|Multi|Multicache", |
123 |
"Unknown Cache|Other", |
"Unknown Cache|Other|Unknown", |
124 |
"Virtual Cache|Virtual", "Webcam Cache|Webcam", "Event Cache|Event|Geocoins:", |
"Virtual Cache|Virtual", "Webcam Cache|Webcam", "Event Cache|Event|Geocoins:", |
125 |
"Letterbox Hybrid|Letterbox", "Earthcache", "Wherigo Cache", |
"Letterbox Hybrid|Letterbox", "Earthcache", "Wherigo Cache", |
126 |
"Mega-Event Cache", "Cache In Trash Out Event", |
"Mega-Event Cache", "Cache In Trash Out Event", |
273 |
printf(" date: %d.%d.%d\n", log->day, log->month, log->year); |
printf(" date: %d.%d.%d\n", log->day, log->month, log->year); |
274 |
printf(" type: %s\n", log_type_str[log->type+1]); |
printf(" type: %s\n", log_type_str[log->type+1]); |
275 |
printf(" finder: %s\n", log->finder->name); |
printf(" finder: %s\n", log->finder->name); |
276 |
|
printf(" id: #%u\n", log->id); |
277 |
// printf(" text: %s\n", log->text); |
// printf(" text: %s\n", log->text); |
278 |
} |
} |
279 |
|
|
441 |
return NULL; |
return NULL; |
442 |
|
|
443 |
/* create a new log entry */ |
/* create a new log entry */ |
444 |
log_t *log = malloc(sizeof(log_t)); |
log_t *log = g_new0(log_t, 1); |
445 |
memset(log, 0, sizeof(log_t)); |
|
446 |
|
char *prop = (char*)xmlTextReaderGetAttribute(reader, BAD_CAST "id"); |
447 |
|
if(prop) |
448 |
|
log->id = atoi(prop); |
449 |
|
|
450 |
/* process all sub-nodes */ |
/* process all sub-nodes */ |
451 |
int depth = xmlTextReaderDepth(reader); |
int depth = xmlTextReaderDepth(reader); |
1327 |
} |
} |
1328 |
|
|
1329 |
return num; |
return num; |
1330 |
|
} |
1331 |
|
|
1332 |
|
/* return number of caches in all gpx files */ |
1333 |
|
int gpx_total_caches_global(gpx_t *gpx) { |
1334 |
|
int num = 0; |
1335 |
|
while(gpx) { |
1336 |
|
num += gpx_total_caches(gpx); |
1337 |
|
gpx = gpx->next; |
1338 |
|
} |
1339 |
|
|
1340 |
|
return num; |
1341 |
} |
} |
1342 |
|
|
1343 |
int gpx_number_of_waypoints(wpt_t *wpt) { |
int gpx_number_of_waypoints(wpt_t *wpt) { |