@node getlongpass, misc @subheading Syntax @example #include int getlongpass(const char *prompt, char *password, int max_length) @end example @subheading Description This function reads up to a Newline (CR or LF) or EOF (Ctrl-D or Ctrl-Z) from the standard input, without an echo, after prompting with a null-terminated string @var{prompt}. It puts a null-terminated string of at most @var{max_length - 1} first characters typed by the user into a buffer pointed to by @var{password}. Pressing Ctrl-C or Ctrl-Break will cause the calling program to @code{exit(1)}. @subheading Return Value Zero if successful, -1 on error (and @var{errno} is set to an appropriate value). @subheading Portability @portability !ansi, !posix @subheading Example @example char password[MAX_PASS]; (void)getlongpass("Password: ", password, MAX_PASS); @end example