aboutsummaryrefslogtreecommitdiff
path: root/badroff.c
diff options
context:
space:
mode:
Diffstat (limited to 'badroff.c')
-rw-r--r--badroff.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/badroff.c b/badroff.c
index 522b305..084fa53 100644
--- a/badroff.c
+++ b/badroff.c
@@ -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'));