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.
This commit is contained in:
nobuh 2023-06-07 23:08:33 +09:00
parent 4be07cb2ee
commit d47be2dd9e
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -25,5 +25,5 @@ void outputDsp(unsigned char dsp);
char getch_screen(void);
void select_screen(void);
int nrow, ncol;
extern int nrow, ncol;