+#endif /* DEBUG_QFA */
+ break;
+#ifdef USE_QFA
+ case 'P':
+#ifdef DEBUG_QFA
+ tistart = time(NULL);
+#endif
+ setup();
+ msg("writing QFA positions to %s\n", gTapeposfile);
+ if ((gTapeposfd = open(gTapeposfile, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0)
+ errx(1, "can't create tapeposfile\n");
+ /* print QFA-file header */
+ sprintf(gTps, "%s\n%s\n%ld\n\n", QFA_MAGIC, QFA_VERSION,(unsigned long)spcl.c_date);
+ if (write(gTapeposfd, gTps, strlen(gTps)) != strlen(gTps))
+ errx(1, "can't write tapeposfile\n");
+ sprintf(gTps, "ino\ttapeno\ttapepos\n");
+ if (write(gTapeposfd, gTps, strlen(gTps)) != strlen(gTps))
+ errx(1, "can't write tapeposfile\n");
+
+ extractdirs(1);
+ initsymtable((char *)0);
+ for (;;) {
+ NEXTFILE(p);
+ if (!p)
+ break;
+ canon(p, name, sizeof(name));
+ ino = dirlookup(name);
+ if (ino == 0)
+ continue;
+ if (mflag)
+ pathcheck(name);
+ treescan(name, ino, addfile);
+ }
+ createfiles();
+#ifdef DEBUG_QFA
+ tiend = time(NULL);
+ titaken = tiend - tistart;
+ msg("writing QFA positions took %d:%02d:%02d\n", titaken / 3600,
+ (titaken % 3600) / 60, titaken % 60);
+#endif /* DEBUG_QFA */