diff util.h @ 51:07b6887d3557

pasterd: split into individual pages While here add a similar mini.css theme as in imgup.
author David Demelier <markand@malikania.fr>
date Mon, 21 Dec 2020 18:22:44 +0100
parents f455893bf0b0
children fba88439ec0a
line wrap: on
line diff
--- a/util.h	Mon Apr 27 12:08:16 2020 +0200
+++ b/util.h	Mon Dec 21 18:22:44 2020 +0100
@@ -19,10 +19,17 @@
 #ifndef PASTER_UTIL_H
 #define PASTER_UTIL_H
 
+#include <stddef.h>
 #include <stdnoreturn.h>
+#include <time.h>
+
+#define NELEM(x) (sizeof (x) / sizeof (x)[0])
 
 struct tm;
 
+extern const char *languages[];
+extern const size_t languagesz;
+
 noreturn void
 die(const char *, ...);
 
@@ -35,4 +42,13 @@
 const char *
 bstrftime(const char *, const struct tm *);
 
+const char *
+path(const char *);
+
+void
+replace(char **, const char *);
+
+const char *
+ttl(time_t, long long int);
+
 #endif /* !PASTER_UTIL_H */