]> andersk Git - moira.git/commitdiff
compile on Solaris
authormar <mar>
Thu, 29 Apr 1993 14:52:48 +0000 (14:52 +0000)
committermar <mar>
Thu, 29 Apr 1993 14:52:48 +0000 (14:52 +0000)
clients/moira/menu.c

index a5fc30034d3a2843f37d8bb8a56fb4960aa8dd6c..17c01cc092110675f9d286bb8852cc3326c07406 100644 (file)
@@ -27,10 +27,9 @@ static char rcsid_menu_c[] = "$Header$";
 #include <stdio.h>
 #include <signal.h>
 #include <curses.h>
-#ifdef _AUX_SOURCE
-#include <sys/termio.h>
-#include <sys/ttychars.h>
-#endif /* _AUX_SOURCE */
+#ifdef POSIX
+#include <sys/termios.h>
+#endif /* POSIX */
 #include <ctype.h>
 #include <strings.h>
 #ifndef sun
@@ -597,20 +596,20 @@ int Password_input(prompt, buf, buflen)
        }
     }
     else {
-#ifdef _AUX_SOURCE
-       struct termio ttybuf, nttybuf;
+#ifdef POSIX
+       struct termios ttybuf, nttybuf;
 #else
        struct sgttyb ttybuf, nttybuf;
-#endif /* _AUX_SOURCE */
+#endif /* POSIX */
        printf("%s", prompt);
        /* turn off echoing */
-#ifdef _AUX_SOURCE
-       (void) ioctl(0, TCGETA, (char *)&ttybuf);
+#ifdef POSIX
+       tcgetattr(0, &ttybuf);
        nttybuf = ttybuf;
        nttybuf.c_lflag &= ~ECHO;
-       (void)ioctl(0, TCSETA, (char *)&nttybuf);
+       tcsetattr(0, TCSANOW, &nttybuf);
        if (gets(buf) == NULL) {
-           (void) ioctl(0, TCSETA, (char *)&ttybuf);
+           tcsetattr(0, TCSANOW, &ttybuf);
            putchar('\n');
            return 0;
        }
@@ -628,7 +627,7 @@ int Password_input(prompt, buf, buflen)
        }
        putchar('\n');
        (void) ioctl(0, TIOCSETP, (char *)&ttybuf);
-#endif /* _AUX_SOURCE */
+#endif /* POSIX */
        Start_paging();
        return 1;
     }
This page took 0.076423 seconds and 5 git commands to generate.