#include "libtf.h" #define LINE tf_printf("Line: \"%s\"\n", read_line(err, mc, fd)) void err(t_const_string msg) { tf_printf("[error: %s]\n", msg); } int main() { t_memclass mc = mem_newclass(err); int fd; tf_printf("2 bad value errors:\n"); fd = -2; LINE; fd = 32767; LINE; tf_printf("1 file error:\n"); fd = 100; LINE; tf_printf("Copy what you say for 5 lines:\n"); fd = 0; LINE; LINE; LINE; LINE; LINE; mem_freeall(mc); }