diff options
author | Ali H. Fardan <raiz@firemail.cc> | 2016-09-04 00:10:49 +0300 |
---|---|---|
committer | Ali H. Fardan <raiz@firemail.cc> | 2016-09-04 00:10:49 +0300 |
commit | d3d8b8ee03a773b7f2cd1aad16ee43d9784e5139 (patch) | |
tree | 937881a7854b70d2175bf206d97a6b34840373fe /concat.h | |
parent | de4f20ace35037a510aafcf49a3d78637d7248b6 (diff) | |
download | slstatus-d3d8b8ee03a773b7f2cd1aad16ee43d9784e5139.tar.gz |
added daemonization support
Diffstat (limited to 'concat.h')
-rw-r--r-- | concat.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/concat.h b/concat.h new file mode 100644 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; +} |