Xinqi Bao's Git

added daemonization support
[slstatus.git] / concat.h
diff --git a/concat.h b/concat.h
new file mode 100644 (file)
index 0000000..9f138d7
--- /dev/null
+++ b/concat.h
@@ -0,0 +1,19 @@
+/*
+ * Thanks to lloyd for contribution
+ */
+
+extern char concat[4096];
+
+extern void
+ccat(const unsigned short int count, ...)
+{
+       va_list ap;
+       unsigned short int i;
+       concat[0] = '\0';
+
+       va_start(ap, count);
+       for(i = 0; i < count; i++)
+               strlcat(concat, va_arg(ap, char *), sizeof(concat));
+       va_end(ap);
+       return;
+}