+/*
+ * We are really keeping a directory stack, but since all the
+ * elements of it share a common prefix, we can make do with one
+ * string. We keep only the current directory path, with an associated
+ * array of mtime's, one for each '/' in the path. A negative mtime
+ * means no mtime. The mtime's are offset by one (first index 1, not
+ * 0) because calling this with the null string causes mtime[0] to be set.
+ *
+ * This stack algorithm is not guaranteed to work for tapes created
+ * with the 'r' option, but the vast majority of tapes with
+ * directories are not. This avoids saving every directory record on
+ * the tape and setting all the times at the end.
+ */
+char dirstack[NAMSIZ];
+#define NTIM (NAMSIZ/2+1) /* a/b/c/d/... */
+time_t mtime[NTIM];