Lines Matching refs:buffer
72 static size_t line_length(const char *buffer, int bytestocheck) in line_length() argument
76 while(*buffer != '\n' && --bytestocheck) { in line_length()
78 buffer++; in line_length()
80 if(*buffer != '\n') { in line_length()
110 static int readline(char **buffer, size_t *bufsize, size_t *length, in readline() argument
116 if(!*buffer) { in readline()
117 *buffer = calloc(1, 128); in readline()
118 if(!*buffer) in readline()
126 if(!fgets(*buffer + offset, bytestoread, stream)) in readline()
129 *length = offset + line_length(*buffer + offset, bytestoread); in readline()
130 if(*(*buffer + *length - 1) == '\n') in readline()
136 newptr = realloc(*buffer, *bufsize * 2); in readline()
140 *buffer = newptr; in readline()
282 char *buffer = NULL; in getpart() local
313 while((error = readline(&buffer, &bufsize, &datalen, stream)) == GPE_OK) { in getpart()
315 ptr = buffer; in getpart()
320 show(("=> %s", buffer)); in getpart()
321 error = appenddata(outbuf, outlen, &outalloc, buffer, datalen, in getpart()
415 show(("* ignoring (%s)", buffer)); in getpart()
467 show(("=> %s", buffer)); in getpart()
468 error = appenddata(outbuf, outlen, &outalloc, buffer, datalen, base64); in getpart()
475 free(buffer); in getpart()