diff options
-rw-r--r-- | badroff.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -50,9 +50,13 @@ char* center(char* text){ memcpy(str+min, text, len); return str; } +char* setwidth(char* txt){ + sscanf(txt, "%d", &width); + return NULL; +} -char* cmds[] = {"CT "}; -char* (*call[])(char* txt) = {center}; +char* cmds[] = {"CT ", "W "}; +char* (*call[])(char* txt) = {center, setwidth}; char* cmd(void){ char* dat = popstrbuf(inbuf, chrfill('\n')); |