/* splice.h by Michael Thorpe 2004-11-04 */ #ifndef _SPLICE_H #define _SPLICE_H #include /**********************************************************************/ /* splice takes a file's fd and a position within that file and reads */ /* oldlen bytes from the file at that position into old, and replaces */ /* them with the newlen bytes found in new. oldlen or newlen need not */ /* be the same and can be 0. old can be 0 if you don't want old data. */ /* Returns: */ /* 0 for success */ /* -1 for corrupting error */ /* 1 for noncorrupting error */ /**********************************************************************/ int splice(int f,off_t pos,void *old,size_t oldlen,void *new,size_t newlen); #endif