]> git.marmaro.de Git - mmh/blobdiff - sbr/getpass.c
Got rid of four warnings in Shantonu's new getpass.c. Needed to #include
[mmh] / sbr / getpass.c
index cca32f621c182afd39877afb387be1c4761aa855..a8238fb2b0f36a930f67aea1c18014c2f9a2aed1 100644 (file)
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#include <stdlib.h>   /* for calloc() */
 #include <termios.h>
 #include <termios.h>
+#include <unistd.h>   /* for ttyname() */
+#include "h/mh.h"     /* for adios() */
 
 #define PASSWORD_LEN 128
 
 
 #define PASSWORD_LEN 128
 
 #endif
 
 char *
 #endif
 
 char *
-getpass(char *prompt)
+getpass(const char *prompt)
 {
   struct termios oterm, term;
 {
   struct termios oterm, term;
-  char ch;
+  int ch;
   char *p, *ttystring, *buf;
   FILE *fout, *fin;
 
   char *p, *ttystring, *buf;
   FILE *fout, *fin;