Lines Matching defs:buffer
57 /* Size of buffer increments when reading from pipe */
224 char *buffer, *perrfile;
249 buffer = (char *)calloc(len, sizeof (char));
250 if (buffer == NULL) {
256 alen = snprintf(buffer, len, "(%s) 2>%s", cmd, errfile);
258 alen = snprintf(buffer, len, "%s 2>%s", cmd, errfile);
267 pp = popen(buffer, mode);
269 free(buffer);
329 char *buffer;
339 /* reset return results buffer pointer */
381 buffer = calloc(1, bufferSize);
382 if (buffer == (char *)NULL) {
431 perror(a_cmd); /* Emit error msg - ends up in callers buffer */
443 * Spin reading data from the child into the buffer - when the read eofs
450 /* read as much child data as there is available buffer space */
452 bytesRead = read(ipipe[0], buffer + bufferIndex,
480 /* at least 1 byte read: expand buffer if at end */
484 buffer = realloc(buffer,
486 (void) memset(buffer + bufferIndex, 0,
523 if (!*buffer) {
524 /* No contents in output buffer - discard */
525 free(buffer);
528 free(buffer);
531 *r_results = buffer;
703 /* if it fit in the built in buffer, use that */