1 #include "l.h" 2 3 void* mysbrk(ulong size)4mysbrk(ulong size) 5 { 6 return sbrk(size); 7 } 8 9 int fileexists(char * s)10fileexists(char *s) 11 { 12 uchar dirbuf[400]; 13 14 /* it's fine if stat result doesn't fit in dirbuf, since even then the file exists */ 15 return stat(s, dirbuf, sizeof(dirbuf)) >= 0; 16 } 17