2 * ctxt - a simple and fast plain text formatter
4 * Copyright (C) 2009-2010 Ali Gholami Rudi
6 * This program is released under GNU GPL version 2.
15 static struct fmt_ops
*get_ops(char *name
)
17 if (!strcmp(name
, "troff"))
19 if (!strcmp(name
, "latex"))
21 if (!strcmp(name
, "html"))
27 "usage: ctxt [-m mode] <plaintext >formatted\n\n"
28 " mode: latex, html or troff (default: latex)\n";
30 int main(int argc
, char **argv
)
37 for (i
= 1; i
< argc
; i
++) {
38 if (!strcmp("-m", argv
[i
]) && i
+ 1 < argc
) {
44 if (!(ops
= get_ops(mode
)))
45 die("unknown output format\n");
48 format(doc
, txt
, ops
);