* [including the GNU Public Licence.]
*/
-#if !defined(MSDOS) && !defined(VMS)
+#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
#include <unistd.h>
/* If unistd.h defines _POSIX_VERSION, we conclude that we
* are on a POSIX system and have sigaction and termios. */
#define NX509_SIG 32
#endif
-#ifndef NOPROTO
static void read_till_nl(FILE *);
static void recsig(int);
static void pushsig(void);
#if defined(MSDOS) && !defined(WIN16)
static int noecho_fgets(char *buf, int size, FILE *tty);
#endif
-#else
-static void read_till_nl();
-static void recsig();
-static void pushsig();
-static void popsig();
-#if defined(MSDOS) && !defined(WIN16)
-static int noecho_fgets();
-#endif
-#endif
-
#ifdef SIGACTION
static struct sigaction savsig[NX509_SIG];
#else
#endif
static jmp_buf save;
-int des_read_pw_string(buf, length, prompt, verify)
-char *buf;
-int length;
-const char *prompt;
-int verify;
+int des_read_pw_string(char *buf, int length, const char *prompt,
+ int verify)
{
char buff[BUFSIZ];
int ret;
#ifndef WIN16
-static void read_till_nl(in)
-FILE *in;
+static void read_till_nl(FILE *in)
{
#define SIZE 4
char buf[SIZE+1];
/* return 0 if ok, 1 (or -1) otherwise */
-int des_read_pw(buf, buff, size, prompt, verify)
-char *buf;
-char *buff;
-int size;
-const char *prompt;
-int verify;
+int des_read_pw(char *buf, char *buff, int size, const char *prompt,
+ int verify)
{
#ifdef VMS
struct IOSB iosb;
#else /* WIN16 */
-int des_read_pw(buf, buff, size, prompt, verify)
-char *buf;
-char *buff;
-int size;
-char *prompt;
-int verify;
+int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
{
memset(buf,0,size);
memset(buff,0,size);
#endif
-static void pushsig()
+static void pushsig(void)
{
int i;
#ifdef SIGACTION
#endif
}
-static void popsig()
+static void popsig(void)
{
int i;
}
}
-static void recsig(i)
-int i;
+static void recsig(int i)
{
longjmp(save,1);
#ifdef LINT
}
#if defined(MSDOS) && !defined(WIN16)
-static int noecho_fgets(buf,size,tty)
-char *buf;
-int size;
-FILE *tty;
+static int noecho_fgets(char *buf, int size, FILE *tty)
{
int i;
char *p;