Lines Matching defs:buffer
58 /* Size of buffer increments when reading from pipe */
201 char *buffer, *perrfile;
226 buffer = (char *)calloc(len, sizeof (char));
227 if (buffer == NULL) {
233 alen = snprintf(buffer, len, "(%s) 2>%s", cmd, errfile);
235 alen = snprintf(buffer, len, "%s 2>%s", cmd, errfile);
244 pp = popen(buffer, mode);
246 free(buffer);
306 char *buffer;
316 /* reset return results buffer pointer */
358 buffer = calloc(1, bufferSize);
359 if (buffer == (char *)NULL) {
408 perror(a_cmd); /* Emit error msg - ends up in callers buffer */
420 * Spin reading data from the child into the buffer - when the read eofs
427 /* read as much child data as there is available buffer space */
429 bytesRead = read(ipipe[0], buffer + bufferIndex,
457 /* at least 1 byte read: expand buffer if at end */
461 buffer = realloc(buffer,
463 (void) memset(buffer + bufferIndex, 0,
500 if (!*buffer) {
501 /* No contents in output buffer - discard */
502 free(buffer);
505 free(buffer);
508 *r_results = buffer;