2 Copyright © 2017, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
13 #include "__posixc_intbase.h"
15 /*****************************************************************************
26 (obsolete) prompt for a password.
33 This function returns a pointer to a static buffer
34 containing (the first PASS_MAX bytes of) the password without the
35 trailing newline, terminated by a null byte ('\0').
37 Function is not re-entrant. Results will be overwritten by
48 ******************************************************************************/
50 struct PosixCBase
*PosixCBase
= __aros_getbase_PosixCBase();
51 struct PosixCIntBase
*PosixCIntBase
= (struct PosixCIntBase
*)PosixCBase
;
54 /* quick and ugly... */
56 ((fputs(prompt
, PosixCBase
->_stdout
) != EOF
) &&
57 (fputs("\n", PosixCBase
->_stdout
) != EOF
)))
59 fflush(PosixCBase
->_stdout
);
61 s
= fgets(PosixCIntBase
->passbuffer
, PASS_MAX
, PosixCBase
->_stdin
);
64 /* strip trailing \n */
65 size_t sl
= strlen(s
);
66 if ( (sl
> 0) && (s
[sl
-1] == '\n') )