+char *zap_slashes (char *name);
+char *normalize_filename (int cdidx, const char *name);
+void normalize_filename_x (char *name);
+void replace_prefix (char **pname, const char *samp, size_t slen,
+ const char *repl, size_t rlen);
+char *tar_savedir (const char *name, int must_exist);
+
+typedef struct namebuf *namebuf_t;
+namebuf_t namebuf_create (const char *dir);
+void namebuf_free (namebuf_t buf);
+char *namebuf_name (namebuf_t buf, const char *name);
+void namebuf_add_dir (namebuf_t buf, const char *name);
+char *namebuf_finish (namebuf_t buf);
+
+const char *tar_dirname (void);
+
+/* Represent N using a signed integer I such that (uintmax_t) I == N.
+ With a good optimizing compiler, this is equivalent to (intmax_t) i
+ and requires zero machine instructions. */
+#if ! (UINTMAX_MAX / 2 <= INTMAX_MAX)
+# error "represent_uintmax returns intmax_t to represent uintmax_t"
+#endif
+COMMON_INLINE intmax_t
+represent_uintmax (uintmax_t n)
+{
+ if (n <= INTMAX_MAX)
+ return n;
+ else
+ {
+ /* Avoid signed integer overflow on picky platforms. */
+ intmax_t nd = n - INTMAX_MIN;
+ return nd + INTMAX_MIN;
+ }
+}
+
+enum { SYSINT_BUFSIZE =
+ max (UINTMAX_STRSIZE_BOUND, INT_BUFSIZE_BOUND (intmax_t)) };
+char *sysinttostr (uintmax_t, intmax_t, uintmax_t, char buf[SYSINT_BUFSIZE]);
+intmax_t strtosysint (char const *, char **, intmax_t, uintmax_t);