home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / stdlib / getpass.txh < prev    next >
Encoding:
Text File  |  1995-07-23  |  801 b   |  29 lines

  1. @node getpass, misc
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. char * getpass(const char *prompt)
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function reads up to a Newline (CR or LF) or EOF (Ctrl-D or Ctrl-Z)
  13. from the standard input, without an echo, after prompting with a
  14. null-terminated string @var{prompt}.  It returns the string of at most 8
  15. characters typed by the user.  Pressing Ctrl-C or Ctrl-Break will cause
  16. the calling program to @code{exit(1)}.
  17.  
  18. @subheading Return Value
  19.   
  20. A pointer to a static buffer which holds the user's response.  The buffer
  21. will be overwritten by each new call.  In case of any error in the lower
  22. I/O routines, a NULL pointer will be returned.
  23.  
  24. @subheading Example
  25.  
  26. @example
  27. char *password = getpass("Password: ");
  28. @end example
  29.