used ccat() from concat.h for string concatenation

This commit is contained in:
Ali H. Fardan
2016-09-08 04:31:49 +03:00
parent 113979e5b8
commit 2afea97987
2 changed files with 35 additions and 25 deletions

19
concat.h Normal file
View File

@ -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;
}