64bit compiler warning fixes

This commit is contained in:
dschmenk 2014-05-12 07:16:04 -07:00
parent 0fc91eee85
commit a7db164fd4
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h>
#include "tokens.h" #include "tokens.h"
#include "symbols.h" #include "symbols.h"

View File

@ -1,7 +1,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
#include <ctype.h>
typedef unsigned char code; typedef unsigned char code;
typedef unsigned char byte; typedef unsigned char byte;
@ -433,7 +435,7 @@ void call(uword pc)
break; break;
case 6: // LIBRARY STDLIB::PUTSZ case 6: // LIBRARY STDLIB::PUTSZ
s = POP; s = POP;
while (c = mem_data[s++]) while ((c = mem_data[s++]))
{ {
if (c == 0x0D) if (c == 0x0D)
c = '\n'; c = '\n';
@ -446,9 +448,8 @@ void call(uword pc)
break; break;
case 8: // LIBRARY STDLIB::GETS case 8: // LIBRARY STDLIB::GETS
gets(sz); gets(sz);
i = 0; for (i = 0; sz[i]; i++)
while (sz[i]) mem_data[0x200 + i] = sz[i];
mem_data[0x200 + i++] = sz[i];
mem_data[0x200 + i] = 0; mem_data[0x200 + i] = 0;
mem_data[0x1FF] = i; mem_data[0x1FF] = i;
PUSH(i); PUSH(i);