Lines Matching refs:stdin
44 /* read a single line from stdin, replace the '\n' with '\0' */
54 FLOCKFILE(lk, stdin);
56 _SET_ORIENTATION_BYTE(stdin);
58 if (!(stdin->_flag & (_IOREAD | _IORW))) {
64 if (stdin->_base == NULL) {
65 if ((bufend = _findbuf(stdin)) == 0) {
71 bufend = _bufend(stdin);
75 if (stdin->_cnt <= 0) /* empty buffer */
77 if (__filbuf(stdin) != EOF) {
78 stdin->_ptr--; /* put back the character */
79 stdin->_cnt++;
86 n = stdin->_cnt;
87 if ((p = (char *)memccpy(ptr, (char *)stdin->_ptr, '\n',
91 stdin->_cnt -= n;
92 stdin->_ptr += n;
93 if (_needsync(stdin, bufend))
94 _bufsync(stdin, bufend);