some definition changes
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#ifndef NRJWORD
|
||||
#ifndef NRJWORD /* we emulate NRJ16 by default */
|
||||
#define NRJWORD unsigned short
|
||||
#endif
|
||||
#define NRJWSIZE (sizeof(NRJWORD) << 3)
|
||||
#define NRJSIZE (1 << NRJWSIZE)
|
||||
#define MAXADDR ((NRJWORD) (NRJSIZE - 1))
|
||||
|
||||
int kbhit() {
|
||||
int kbhit() { /* our best attempt to detect a keypress on a POSIX system */
|
||||
struct timeval tv = { 0L, 0L };
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
@@ -66,7 +66,7 @@ int main(int argc, char* argv[]) {
|
||||
fseek(prog, 0, SEEK_END);
|
||||
int flen = ftell(prog);
|
||||
fseek(prog, 0, SEEK_SET);
|
||||
fread(mem, NRJWSIZE, (flen/NRJWSIZE) & MAXADDR, prog);
|
||||
fread(mem, sizeof(NRJWORD), (flen/sizeof(NRJWORD)) & MAXADDR, prog);
|
||||
fclose(prog);
|
||||
/* prepare the terminal */
|
||||
tcgetattr(STDIN_FILENO, &tty_opts_backup);
|
||||
|
||||
Reference in New Issue
Block a user