- ret = sscanf(line, "%c %hx %hx %hx", &type, &tick, &a, &b);
- if (ret != 4)
- continue;
+ l = line;
+ for (nword = 0; nword < 64; nword++) {
+ words[nword] = strtok_r(l, " \t\n", &saveptr);
+ l = NULL;
+ if (words[nword] == NULL)
+ break;
+ }
+ if (nword == 4) {
+ type = words[0][0];
+ tick = strtoul(words[1], NULL, 16);
+ a = strtoul(words[2], NULL, 16);
+ b = strtoul(words[2], NULL, 16);
+ } else if (nword >= 36 && strcmp(words[0], "CALL") == 0) {
+ tick = atoi(words[10]);
+ if (!ao_flight_started) {
+ type = 'F';
+ a = atoi(words[26]);
+ ao_flight_started = 1;
+ } else {
+ type = 'A';
+ a = atoi(words[12]);
+ b = atoi(words[14]);
+ }
+ }