]> git.decadent.org.uk Git - ap-utils.git/blobdiff - lib/wep.c
Merge commit 'upstream/1.5'
[ap-utils.git] / lib / wep.c
index a9590f739cef7c8e7012516af8b19f16f398eb6d..1cda0e8c3a0c619622973a8de51358fb02f3d1ab 100644 (file)
--- a/lib/wep.c
+++ b/lib/wep.c
@@ -24,8 +24,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include "ap-utils.h"
-#include "ap-curses.h"
 
+#define PRIVSETTINGS _("Privacy Settings")
 #define ENCRYPT _("[E] Standard encryption mechanism: ")
 #define ALLOW _("[A] Allow unencrypted: ")
 #define DEFAULT _("[K] Default WEP key: ")
@@ -76,7 +76,7 @@ void wep()
     varbinds[1].type = NULL_VALUE;
     varbinds[1].len_val = 0;
     print_help(WAIT_RET);
-    if (snmp(varbinds, 2, GET) <= 0) {
+    if (snmp(varbinds, 2, GET) < 2) {
        print_helperr(ERR_RET);
        goto exit;
     }
@@ -84,7 +84,7 @@ void wep()
     wepid = *(varbinds[1].value);
     print_help(_("EK1234 - set; W - write conf; Q - quit to menu"));
 
-    print_title(_("Privacy Settings"));
+    print_top(NULL, PRIVSETTINGS);
 
     sprintf(message, "%s%s", ENCRYPT, weps[wep - 1]);
     mvwaddstr(main_sub, 0, 0, message);
@@ -186,7 +186,7 @@ void wep()
   exit:
     getch();
   quit:
-    print_title("");
+    print_top(NULL, NULL);
     clear_main(0);
 }
 
@@ -236,7 +236,7 @@ void nwn_wep()
     varbinds[3].len_val = 0;
                        
     print_help(WAIT_RET);
-    if (snmp(varbinds, 4, GET) <= 0) {
+    if (snmp(varbinds, 4, GET) < 4) {
        print_helperr(ERR_RET);
        goto exit;
     }
@@ -246,7 +246,7 @@ void nwn_wep()
     wepid=*(varbinds[3].value);
     print_help(_("AEPK1234 - set options; W - write conf; Q - quit to menu"));
 
-    print_title(_("Privacy Settings"));
+    print_top(NULL, PRIVSETTINGS);
 
     sprintf(message, "%s%s", ENCRYPT, weps[wep - 1]);
     mvwaddstr(main_sub, 1, 0, message);
@@ -415,6 +415,6 @@ void nwn_wep()
   exit:
     getch();
   quit:
-    print_title("");
+    print_top(NULL, NULL);
     clear_main(0);
 }