shithub: fnt

ref: 63f6a9277db89582f0a247e55e781f8c64871ed0
dir: /test.c/

View raw version
#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Δ, &td);
		}
		otfclose(o);
	}
	Bterm(out);

	exits(nil);
}