summaryrefslogtreecommitdiffstats
path: root/lib/hdr_fpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hdr_fpath.c')
-rw-r--r--lib/hdr_fpath.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/hdr_fpath.c b/lib/hdr_fpath.c
new file mode 100644
index 0000000..064a828
--- /dev/null
+++ b/lib/hdr_fpath.c
@@ -0,0 +1,37 @@
+#include "dao.h"
+
+
+void
+hdr_fpath(fpath, folder, hdr)
+ char *fpath;
+ char *folder;
+ HDR *hdr;
+{
+ char *str;
+ int cc, chrono;
+
+ while (cc = *folder++)
+ {
+ *fpath++ = cc;
+ if (cc == '/')
+ str = fpath;
+ }
+
+ chrono = hdr->chrono;
+ folder = hdr->xname;
+ cc = *folder;
+ if (cc != '@')
+ cc = radix32[chrono & 31];
+
+ if (*str == '.')
+ {
+ *str++ = cc;
+ *str++ = '/';
+ }
+ else
+ {
+ str[-2] = cc;
+ }
+
+ strcpy(str, hdr->xname);
+}