]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - testbn.c
Unix buildinfo: stop saying 'GTK' in pure CLI utilities.
[PuTTY.git] / testbn.c
index 55471bd24c0ac163a0b13c16402c1c5328a9103a..05f62767c5cb32bf854892d8c389f7db4e88bbec 100644 (file)
--- a/testbn.c
+++ b/testbn.c
@@ -12,6 +12,7 @@
 #include <ctype.h>
 
 #include "ssh.h"
+#include "sshbn.h"
 
 void modalfatalbox(const char *p, ...)
 {
@@ -32,12 +33,17 @@ int random_byte(void)
 
 #define fromxdigit(c) ( (c)>'9' ? ((c)&0xDF) - 'A' + 10 : (c) - '0' )
 
+/* For Unix in particular, but harmless if this main() is reused elsewhere */
+const int buildinfo_gtk_relevant = FALSE;
+
 int main(int argc, char **argv)
 {
     char *buf;
     int line = 0;
     int passes = 0, fails = 0;
 
+    printf("BIGNUM_INT_BITS = %d\n", (int)BIGNUM_INT_BITS);
+
     while ((buf = fgetline(stdin)) != NULL) {
         int maxlen = strlen(buf);
         unsigned char *data = snewn(maxlen, unsigned char);
@@ -52,7 +58,7 @@ int main(int argc, char **argv)
 
         while (*bufp && !isspace((unsigned char)*bufp))
             bufp++;
-        if (bufp)
+        if (*bufp)
             *bufp++ = '\0';
 
         while (*bufp) {
@@ -79,8 +85,6 @@ int main(int argc, char **argv)
                 val = val * 16 + fromxdigit(start[i+1]);
                 *q++ = val;
             }
-
-            ptrs[ptrnum] = q;
         }
 
         if (!strcmp(buf, "mul")) {