From c996157f0ebd5b8ccf99a66049d2bf21b1ad35cb Mon Sep 17 00:00:00 2001 From: mrdudz Date: Sun, 25 May 2025 02:53:34 +0200 Subject: [PATCH] update conio test to reflect the state of cpeek implementation(s) --- targettest/conio.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/targettest/conio.c b/targettest/conio.c index 8ebb15bd5..db7752857 100644 --- a/targettest/conio.c +++ b/targettest/conio.c @@ -42,12 +42,15 @@ static char grid[5][5] = { {CH_LLCORNER, CH_HLINE, CH_BTEE, CH_HLINE, CH_LRCORNER} }; +#define LINE_COLORTEST 3 +#define LINE_PEEKTEST 11 + void colortest(void) { unsigned int i, j; cputsxy(0, 2, "Colors:" ); for (i = 0; i < 3; ++i) { - gotoxy(i, 3 + i); + gotoxy(i, LINE_COLORTEST + i); for (j = 0; j < NUMCOLS; ++j) { (void)textcolor(j); cputc('X'); @@ -55,8 +58,6 @@ void colortest(void) } } -#define LINE_PEEKTEST 11 - void peektest(void) { int j; @@ -69,13 +70,24 @@ void peektest(void) (void)textcolor(j); revers((j >> 1)&1); cputc('a' + j); - rbuf[j] = (j >> 1)&1; + buf[j] ='#'; + cbuf[j] = 1; + rbuf[j] = 0; } for (j = 0; j < NUMCOLS; ++j) { gotoxy(j, LINE_PEEKTEST); +// TODO: cpeekc() implementation missing for those: +#if !defined(__TELESTRAT__) buf[j] = cpeekc(); +#endif +// TODO: cpeekcolor() implementation missing for those: +#if !defined(__TELESTRAT__) cbuf[j] = cpeekcolor(); +#endif +// TODO: cpeekrevers() implementation missing for those: +#if !defined(__TELESTRAT__) rbuf[j] = cpeekrevers(); +#endif } gotoxy(0, (LINE_PEEKTEST+1)); for (j = 0; j < NUMCOLS; ++j) { @@ -83,7 +95,14 @@ void peektest(void) revers(rbuf[j]); cputc(buf[j]); } -#if !defined (__OSIC1P__) +// TODO: cpeeks() implementation missing for those: +#if !defined(__APPLE2__) && \ + !defined(__APPLE2ENH__) && \ + !defined(__ATARI__) && \ + !defined(__CX16__) && \ + !defined(__NES__) && \ + !defined(__TELESTRAT__) && \ + !defined(__OSIC1P__) gotoxy(0, LINE_PEEKTEST); cpeeks(buf, NUMCOLS); (void)textcolor(1);