Lines Matching defs:rbuff
117 static int pty_stop_parent(int waserr, int cntrl, GetLine *gl, char *rbuff);
421 char *rbuff=NULL; /* A buffer for reading from the pseudo terminal */
427 return pty_stop_parent(1, cntrl, gl, rbuff);
432 rbuff = (char *) malloc(PTY_MAX_READ+1);
433 if(!rbuff)
434 return pty_stop_parent(1, cntrl, gl, rbuff);
435 rbuff[0] = '\0';
440 if(gl_watch_fd(gl, cntrl, GLFD_READ, pty_read_from_program, rbuff))
441 return pty_stop_parent(1, cntrl, gl, rbuff);
446 while((line=gl_get_line(gl, rbuff, NULL, 0))) {
448 return pty_stop_parent(1, cntrl, gl, rbuff);
449 rbuff[0] = '\0';
451 return pty_stop_parent(0, cntrl, gl, rbuff);
467 * rbuff char * The buffer used to accumulate bytes read from
472 static int pty_stop_parent(int waserr, int cntrl, GetLine *gl, char *rbuff)
486 if(rbuff)
487 free(rbuff);
572 char *rbuff = (char *) data;
586 int len = strlen(rbuff);
590 int nnew = read(fd, rbuff + len, PTY_MAX_READ - len);
597 rbuff[len] = '\0';
601 nlptr = strrchr(rbuff, '\n');
602 crptr = strrchr(rbuff, '\r');
616 nextp = rbuff + len;
625 * If there was already some text in rbuff before this function
635 (void) pty_write_to_fd(STDOUT_FILENO, rbuff, nextp - rbuff);
649 memmove(rbuff, nextp, len - (nextp - rbuff) + 1);
655 gl_replace_prompt(gl, rbuff);