Kaynağa Gözat

Now builds clean with make CC=gcc CFLAGS=-Wall

Dave Vandervies 17 yıl önce
ebeveyn
işleme
e5d50a9c04
3 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 1 1
      mndecode.c
  2. 4 2
      mnemonic.c
  3. 1 1
      mnencode.c

+ 1 - 1
mndecode.c

@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include "mnemonic.h"
 
-main ()
+int main ()
 {
   char buf[0x90000];
   mn_byte outbuf[0x10000];

+ 4 - 2
mnemonic.c

@@ -22,6 +22,8 @@
 
 */
 
+#include <string.h>
+
 #include "mnemonic.h"
 
 /*
@@ -128,7 +130,7 @@ mn_encode_word (void *src, int srcsize, int n)
 static int
 isletter (char c)
 {
-  return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z';
+  return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
 }
 
 /*
@@ -325,7 +327,7 @@ mn_decode_word_index (mn_index index, void *dest, int destsize, int *offset)
 	}
       else
 	{			/* catch invalid encodings */
-	  if (index >= 1625 || index == 1624 && x > 1312671)
+	  if (index >= 1625 || (index == 1624 && x > 1312671))
 	    {
 	      *offset = MN_EENCODING;
 	      return *offset;

+ 1 - 1
mnencode.c

@@ -2,7 +2,7 @@
 #include <string.h>
 #include "mnemonic.h"
 
-main ()
+int main ()
 {
   mn_byte buf[0x10000];
   char outbuf[0x90000];