mirror of
https://github.com/0intro/wmii
synced 2024-11-22 13:52:17 +03:00
22 lines
398 B
C
22 lines
398 B
C
/* Copyright ©2008-2010 Kris Maglione <maglione.k at Gmail>
|
|
* See LICENSE file for license details.
|
|
*/
|
|
#include <fmt.h>
|
|
#include "util.h"
|
|
|
|
int
|
|
unmask(Fmt *f, long mask, char **table, long sep) {
|
|
int i, nfmt;
|
|
|
|
nfmt = f->nfmt;
|
|
for(i=0; table[i]; i++)
|
|
if(*table[i] && (mask & (1<<i))) {
|
|
if(f->nfmt > nfmt)
|
|
fmtrune(f, sep);
|
|
if(fmtstrcpy(f, table[i]))
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|
|
|