7 buffer = (
char*)malloc(bufSize);
8 if(!buffer)bufSize >>= 1;
9 }
while(--retry > 0 && buffer == NULL);
10 if(!buffer)lastErrNo = errno;
25 file =
::open(name, O_WRONLY|O_CREAT|O_TRUNC, mode);
37 if(!buffer)
return false;
40 if(::
write(file, buffer, pos) != pos)
53 char *buf = (
char*)src;
55 if(!buffer)
return false;
58 delta = (size - pos) > wsize ? wsize : (size - pos);
59 memcpy(buffer + pos, buf, delta);
65 if(::
write(file, buffer, size) != size)