From 4be07cb2ee10ca957dc3448bc938a96aca083b65 Mon Sep 17 00:00:00 2001 From: nobuh Date: Wed, 7 Jun 2023 15:17:25 +0900 Subject: [PATCH 1/2] chmod -x on src files --- AUTHORS | 0 CHANGELOG | 0 COPYING | 0 README | 0 SAMPLE_PROGRAMS | 0 src/keyboard.c | 0 src/keyboard.h | 0 src/m6502.c | 0 src/m6502.h | 0 src/main.c | 0 src/makefile | 0 src/memory.c | 0 src/memory.h | 0 src/msgbuf.c | 0 src/msgbuf.h | 0 src/pia6820.c | 0 src/pia6820.h | 0 src/screen.c | 0 src/screen.h | 0 19 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 AUTHORS mode change 100755 => 100644 CHANGELOG mode change 100755 => 100644 COPYING mode change 100755 => 100644 README mode change 100755 => 100644 SAMPLE_PROGRAMS mode change 100755 => 100644 src/keyboard.c mode change 100755 => 100644 src/keyboard.h mode change 100755 => 100644 src/m6502.c mode change 100755 => 100644 src/m6502.h mode change 100755 => 100644 src/main.c mode change 100755 => 100644 src/makefile mode change 100755 => 100644 src/memory.c mode change 100755 => 100644 src/memory.h mode change 100755 => 100644 src/msgbuf.c mode change 100755 => 100644 src/msgbuf.h mode change 100755 => 100644 src/pia6820.c mode change 100755 => 100644 src/pia6820.h mode change 100755 => 100644 src/screen.c mode change 100755 => 100644 src/screen.h diff --git a/AUTHORS b/AUTHORS old mode 100755 new mode 100644 diff --git a/CHANGELOG b/CHANGELOG old mode 100755 new mode 100644 diff --git a/COPYING b/COPYING old mode 100755 new mode 100644 diff --git a/README b/README old mode 100755 new mode 100644 diff --git a/SAMPLE_PROGRAMS b/SAMPLE_PROGRAMS old mode 100755 new mode 100644 diff --git a/src/keyboard.c b/src/keyboard.c old mode 100755 new mode 100644 diff --git a/src/keyboard.h b/src/keyboard.h old mode 100755 new mode 100644 diff --git a/src/m6502.c b/src/m6502.c old mode 100755 new mode 100644 diff --git a/src/m6502.h b/src/m6502.h old mode 100755 new mode 100644 diff --git a/src/main.c b/src/main.c old mode 100755 new mode 100644 diff --git a/src/makefile b/src/makefile old mode 100755 new mode 100644 diff --git a/src/memory.c b/src/memory.c old mode 100755 new mode 100644 diff --git a/src/memory.h b/src/memory.h old mode 100755 new mode 100644 diff --git a/src/msgbuf.c b/src/msgbuf.c old mode 100755 new mode 100644 diff --git a/src/msgbuf.h b/src/msgbuf.h old mode 100755 new mode 100644 diff --git a/src/pia6820.c b/src/pia6820.c old mode 100755 new mode 100644 diff --git a/src/pia6820.h b/src/pia6820.h old mode 100755 new mode 100644 diff --git a/src/screen.c b/src/screen.c old mode 100755 new mode 100644 diff --git a/src/screen.h b/src/screen.h old mode 100755 new mode 100644 From d47be2dd9e11f4ed8a1fa2b8e63945e55ba6d75c Mon Sep 17 00:00:00 2001 From: nobuh Date: Wed, 7 Jun 2023 23:08:33 +0900 Subject: [PATCH 2/2] fix make: multiple definition of nrow and ncol make fail by the error /usr/bin/ld: main.o:(.bss+0x0): multiple definition of `nrow'; memory.o:(.bss+0x0): first defined here /usr/bin/ld: main.o:(.bss+0x4): multiple definition of `ncol'; memory.o:(.bss+0x4): first defined here fix definition of the global variables nrow and ncol. --- src/screen.c | 2 ++ src/screen.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 629acbc..3113604 100644 --- a/src/screen.c +++ b/src/screen.c @@ -36,6 +36,8 @@ static int indexX, indexY; static WINDOW *screen; static long long interval_start; /* interval start time in u sec */ +int nrow, ncol; + char getch_screen(void) { return (char)wgetch(screen); diff --git a/src/screen.h b/src/screen.h index 88bdbb3..3324fad 100644 --- a/src/screen.h +++ b/src/screen.h @@ -25,5 +25,5 @@ void outputDsp(unsigned char dsp); char getch_screen(void); void select_screen(void); -int nrow, ncol; +extern int nrow, ncol;