Diff of /trunk/src/gpx.c

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

revision 137 by harbaum, Mon Oct 19 18:21:20 2009 UTC revision 138 by harbaum, Tue Oct 20 13:25:04 2009 UTC
# Line 273  void gpx_display_log(log_t *log) { Line 273  void gpx_display_log(log_t *log) {
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    
# Line 440  static log_t *process_gpx_wpt_gc_logs_lo Line 441  static log_t *process_gpx_wpt_gc_logs_lo
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);

Legend:
Removed from v.137  
changed lines
  Added in v.138