ref: b8442cf99bf3c724441a5abca9f6497eb6407add
dir: /test.c/
#include <u.h> #include <libc.h> #include <bio.h> #include "otf.h" void main(int argc, char **argv) { TableDirectory td; Biobuf *out; Otf *o; int i; otfinit(); out = Bfdopen(1, OWRITE); for(i = 1; i < argc; i++){ Bprint(out, "%s\n", argv[i]); if((o = otfopen(argv[i])) == nil){ fprint(2, "%r\n"); }else if(read_TableDirectory(o, &td) != 0){ fprint(2, "%s: %r\n", argv[i]); } else { print_TableDirectory(out, indentΔ, o, &td); } otfclose(o); } Bterm(out); exits(nil); }