#include #include #include #include vlong _drawflength(int fd) { struct stat s; if(fstat(fd, &s) < 0) return -1; return s.st_size; }