Lines Matching refs:buffer

216 	char        buffer [4096];
258 if (boundaryLength > (ssize_t) sizeof (buffer) / 2)
267 bufferOffset = data->Position(); // File offset of the start of the buffer.
268 bufferIndex = 0; // Current position we are examining in the buffer.
269 bufferSize = 0; // Amount of data actually in the buffer, not including NUL.
277 // Refill the buffer if the remaining amount of data is less than a
281 // Shuffle the remaining bit of data in the buffer over to the front.
283 memmove (buffer, buffer + bufferIndex, bufferSize - bufferIndex);
288 // Fill up the rest of the buffer with more data. Also leave space
289 // for a NUL byte just past the last data in the buffer so that
292 if (amountToRead > (ssize_t) sizeof (buffer) - 1 - bufferSize)
293 amountToRead = sizeof (buffer) - 1 - bufferSize;
295 amountRead = data->Read (buffer + bufferSize, amountToRead);
300 buffer [bufferSize] = 0; // Add an end of string NUL byte.
304 // for in the buffer. It starts with a newline (officially CRLF but we
317 if (buffer[bufferIndex] == '\r' && buffer[bufferIndex + 1] == '\n') {
320 } else if (buffer[bufferIndex] == '\n') {
328 if (buffer[bufferIndex] == '-' && buffer[bufferIndex + 1] == '-') {
336 if (strncmp (buffer + bufferIndex, _boundary, boundaryLength) != 0) {
342 if (buffer[bufferIndex] == '-' && buffer[bufferIndex + 1] == '-') {
351 if (buffer[bufferIndex] == '\r' && buffer[bufferIndex + 1] == '\n')
353 else if (buffer[bufferIndex] == '\n')
355 else if (buffer[bufferIndex] != 0 /* End of file is like a newline */) {
424 uint8 buffer[1024];
429 begin += sizeof(buffer)) {
430 length = (((off_t)part->end - begin) >= (off_t)sizeof(buffer))
431 ? sizeof(buffer) : (part->end - begin);
433 _io_data->ReadAt(begin,buffer,length);
434 amountWritten = render_to->Write(buffer,length);