summaryrefslogtreecommitdiff
path: root/lib/string.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 17:49:12 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 18:03:23 +0200
commitaf678af0d5c9ef3d8afdc0789b33dd0c40b6d6e5 (patch)
tree4d786cd3fecdbb370f1ceee5daecd3aa62fc205b /lib/string.h
parent286e2011d22ea6914d5f2db5de3f11911a1fb663 (diff)
parent8e433d6a529a883d566dc1d5a4afe0f1e2750baf (diff)
Merge remote-tracking branch 'origin/master' into int-new
Diffstat (limited to 'lib/string.h')
-rw-r--r--lib/string.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/string.h b/lib/string.h
index 218f7b1c..9af49b9e 100644
--- a/lib/string.h
+++ b/lib/string.h
@@ -24,4 +24,12 @@ void buffer_puts(buffer *buf, const char *str);
int patmatch(const byte *pat, const byte *str);
+static inline char *xbasename(const char *str)
+{
+ char *s = strrchr(str, '/');
+ return s ? s+1 : (char *) str;
+}
+
+#define ROUTER_ID_64_LENGTH 23
+
#endif