*
*/
+#include <stdarg.h>
+
/* Pass a null-terminated list of strings, and it concatenates them
into a single string. Warning - it assumes the result is a file
name or URL, and will canonicalize the result accordingly
(i.e. replace \ with /, collapse multiple /// to a single /, etc.) */
-char * concat (char *s, ...);
+char * concat (const char *s, ...);
+char * vconcat (const char *, va_list);
/* convert slashes to backslashes */
char * backslash (char *s);
+
+/* Used when treating / and \ as equivalent. */
+#define SLASH_P(ch) \
+ ({ \
+ char __c = (ch); \
+ ((__c) == '/' || (__c) == '\\'); \
+ })