Subversion Repositories public

Rev

Rev 216 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 216 Rev 246
Line 15... Line 15...
15
  D1009 * d1009;
15
  D1009 * d1009;
16
  D1010 * d1010;
16
  D1010 * d1010;
17
 
17
 
18
  int ok = 1;
18
  int ok = 1;
19
 
19
 
-
 
20
  if (!run) return 0;
-
 
21
 
20
  switch ( run->type ) {
22
  switch ( run->type ) {
21
  case data_D1000:
23
  case data_D1000:
22
    d1000            = run->data;
24
    d1000            = run->data;
23
    *track_index     = d1000->track_index;
25
    *track_index     = d1000->track_index;
24
    *first_lap_index = d1000->first_lap_index;
26
    *first_lap_index = d1000->first_lap_index;
Line 53... Line 55...
53
  D1011 * d1011;
55
  D1011 * d1011;
54
  D1015 * d1015;
56
  D1015 * d1015;
55
 
57
 
56
  int ok = 1;
58
  int ok = 1;
57
 
59
 
-
 
60
  if (!lap) return 0;
-
 
61
 
58
  switch ( lap->type ) {
62
  switch ( lap->type ) {
59
  case data_D1001:
63
  case data_D1001:
60
    d1001      = lap->data;
64
    d1001      = lap->data;
61
    *lap_index = d1001->index;
65
    *lap_index = d1001->index;
62
    break;
66
    break;
Line 85... Line 89...
85
  D1011 * d1011;
89
  D1011 * d1011;
86
  D1015 * d1015;
90
  D1015 * d1015;
87
 
91
 
88
  int ok = 1;
92
  int ok = 1;
89
 
93
 
-
 
94
  if (!lap) return 0;
-
 
95
 
90
  switch ( lap->type ) {
96
  switch ( lap->type ) {
91
  case data_D1001:
97
  case data_D1001:
92
    d1001       = lap->data;
98
    d1001       = lap->data;
93
    *start_time = d1001->start_time + TIME_OFFSET;
99
    *start_time = d1001->start_time + TIME_OFFSET;
94
    break;
100
    break;
Line 118... Line 124...
118
  D311 *             d311;
124
  D311 *             d311;
119
  int                done = 0;
125
  int                done = 0;
120
 
126
 
121
  /* Look for a data_D311 with an index that matches. */
127
  /* Look for a data_D311 with an index that matches. */
122
 
128
 
-
 
129
  if (!points) return NULL;
-
 
130
 
123
  for ( n = points->head; n != NULL; n = n->next ) {    
131
  for ( n = points->head; n != NULL; n = n->next ) {    
124
    if ( n->data != NULL ) {
132
    if ( n->data != NULL ) {
125
      switch ( n->data->type ) {
133
      switch ( n->data->type ) {
126
      case data_D311:
134
      case data_D311:
127
	if ( track == NULL ) {
135
	if ( track == NULL ) {
Line 182... Line 190...
182
  char *              filedir = NULL;
190
  char *              filedir = NULL;
183
  char                path[PATH_MAX];
191
  char                path[PATH_MAX];
184
  char                filepath[BUFSIZ];
192
  char                filepath[BUFSIZ];
185
  struct tm *         tbuf;
193
  struct tm *         tbuf;
186
 
194
 
-
 
195
  if (!garmin) return;
-
 
196
 
187
  if ( (filedir = getenv("GARMIN_SAVE_RUNS")) != NULL ) {
197
  if ( (filedir = getenv("GARMIN_SAVE_RUNS")) != NULL ) {
188
    filedir = realpath(filedir,path);
198
    filedir = realpath(filedir,path);
189
    if ( filedir == NULL ) {
199
    if ( filedir == NULL ) {
190
      printf("GARMIN_SAVE_RUNS: %s: %s\n",
200
      printf("GARMIN_SAVE_RUNS: %s: %s\n",
191
	     getenv("GARMIN_SAVE_RUNS"),strerror(errno));
201
	     getenv("GARMIN_SAVE_RUNS"),strerror(errno));