From 2afea979877ae12226ab397355f3bf8c8e124e91 Mon Sep 17 00:00:00 2001 From: "Ali H. Fardan" Date: Thu, 8 Sep 2016 04:31:49 +0300 Subject: used ccat() from concat.h for string concatenation --- concat.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 concat.h (limited to 'concat.h') diff --git a/concat.h b/concat.h new file mode 100644 index 0000000..7f2ea46 --- /dev/null +++ b/concat.h @@ -0,0 +1,19 @@ +/* + * Thanks to lloyd for contribution + */ + +extern char concat[8192]; + +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; +} -- cgit v1.2.3