#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)getpass.c 5.2 (Berkeley) %G%";
#endif LIBC_SCCS and not lint
if ((fi
= fdopen(open("/dev/tty", 2), "r")) == NULL
)
setbuf(fi
, (char *)NULL
);
sig
= signal(SIGINT
, SIG_IGN
);
ioctl(fileno(fi
), TIOCGETP
, &ttyb
);
ioctl(fileno(fi
), TIOCSETP
, &ttyb
);
fprintf(stderr
, "%s", prompt
); fflush(stderr
);
for (p
=pbuf
; (c
= getc(fi
))!='\n' && c
!=EOF
;) {
fprintf(stderr
, "\n"); fflush(stderr
);
ioctl(fileno(fi
), TIOCSETP
, &ttyb
);