tex: move tex fmt_ops to tex.c
[ctxt.git] / ctxt.c
blobda6afe1ae52f6f32dab3aa4f4a6376d824409b65
1 #include <stdlib.h>
2 #include <string.h>
3 #include <unistd.h>
4 #include "ctxt.h"
5 #include "util.h"
7 void file_put(int fd, char *s)
9 int c = 0;
10 int n = 0;
11 size_t size = strlen(s);
12 while (size > n && (c = write(fd, s + n, size - n)) >= 0)
13 n += c;
16 int main(int argc, char **argv)
18 struct txt *txt = txt_alloc(STDIN_FILENO);
19 fmt(STDOUT_FILENO, txt, &latex_ops);
20 txt_free(txt);
21 return 0;