#include <stdio.h>
#include <signal.h>
#include <fcntl.h>
+#include <stdlib.h>
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
void static restore_tty_state(void);
static RETSIGTYPE sigint_handler(int);
-char *getpassword(prompt)
+char *fm_getpassword(prompt)
char *prompt;
{
#if !(defined(HAVE_TCSETATTR) || defined(HAVE_TERMIO_H) || defined(HAVE_STTY))
char *getpass();
return getpass(prompt);
#else
- fputs(_("ERROR: no support for getpassword() routine\n"),stderr);
+ fputs(GT_("ERROR: no support for getpassword() routine\n"),stderr);
exit(1);
#endif
#else
signal(SIGINT, sig);
}
if (fi != stdin)
- fclose(fi);
+ fclose(fi); /* not checking should be safe, file mode was "r" */
return(pbuf);
#endif /* !(defined(HAVE_TCSETATTR) || ... */
static RETSIGTYPE sigint_handler(int signum)
{
restore_tty_state();
- report(stderr, 1, 0, _("\nCaught signal... bailing out.\n"));
+ report(stderr, GT_("\nCaught SIGINT... bailing out.\n"));
+ exit(1);
}
/* getpass.c ends here */