Initial revision

This commit is contained in:
rsc 2003-09-30 17:47:42 +00:00
parent ed7c8e8d02
commit 76193d7cb0
223 changed files with 32479 additions and 0 deletions

16
src/libdraw/unix.c Normal file
View file

@ -0,0 +1,16 @@
#include <sys/stat.h>
#include <u.h>
#include <libc.h>
#include <draw.h>
vlong
flength(int fd)
{
struct stat s;
if(fstat(fd, &s) < 0)
return -1;
return s.st_size;
}