wmii/lib/libstuff/util/join.c
Kris Maglione 7da961ec6c Add group and default-tags keys to /rules.
Update issue #178
Status: Fixed
If you don't want grouping behavior for a client, set group=0 for
that client in /rules. This will inhibit the affinity for tags and
for columns.
2010-06-01 22:38:33 -04:00

28 lines
418 B
C

/* Copyright ©2008-2010 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include <fmt.h>
#include "util.h"
char*
join(char **list, char *sep, Fmt *f) {
Fmt fmt;
char **p;
if(f == nil) {
f = &fmt;
if(fmtstrinit(f) < 0)
abort();
}
for(p=list; *p; p++) {
if(p != list)
fmtstrcpy(f, sep);
fmtstrcpy(f, *p);
}
if(f != &fmt)
return nil;
return fmtstrflush(f);
}