9 void file_put(int fd
, char *s
)
13 size_t size
= strlen(s
);
14 while (size
> n
&& (c
= write(fd
, s
+ n
, size
- n
)) >= 0)
18 static struct fmt_ops
*get_ops(char *name
)
20 if (!strcmp(name
, "latex"))
22 if (!strcmp(name
, "html"))
27 int main(int argc
, char **argv
)
33 while ((c
= getopt(argc
, argv
, "m:")) != -1) {
40 fprintf(stderr
, "bad command line option\n");
44 if (!(ops
= get_ops(mode
))) {
45 fprintf(stderr
, "unknown output format\n");
48 txt
= txt_alloc(STDIN_FILENO
);
49 fmt(STDOUT_FILENO
, txt
, ops
);