+ else if (!strcmp(token, "PREGAP")) {
+ if (sscanf(linebuf, " PREGAP %8s", time) == 1) {
+ tok2msf(time, dummy);
+ sector_offs += msf2sec(dummy);
+ }
+ pregapOffset = -1; // mark to fill track start_offset
+ }
+ else if (!strcmp(token, "FILE")) {
+ sscanf(linebuf, " FILE \"%[^\"]\"", tmpb);
+
+ // absolute path?
+ ti[numtracks + 1].handle = fopen(tmpb, "rb");
+ if (ti[numtracks + 1].handle == NULL) {
+ // relative to .cue?
+ tmp = strrchr(tmpb, '\\');
+ if (tmp == NULL)
+ tmp = strrchr(tmpb, '/');
+ if (tmp != NULL)
+ tmp++;
+ else
+ tmp = tmpb;
+ strncpy(incue_fname, tmp, incue_max_len);
+ ti[numtracks + 1].handle = fopen(filepath, "rb");
+ }