X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=conio.c;h=8c33917e897521dac3b0e18abc619be5e9f2d410;hb=14c898877ad4032c54f25ce683ac916a73c660b2;hp=27c38c3842786bcbe93d2aeb9134a649e4fc9bc4;hpb=e29006d00a2962f32312e31bf142f77a99bde04d;p=super-star-trek.git diff --git a/conio.c b/conio.c index 27c38c3..8c33917 100644 --- a/conio.c +++ b/conio.c @@ -31,7 +31,6 @@ char color_warning=1; int directvideo; WINDOW *conio_scr; -#ifdef SERGEEV /* Some internals... */ static int colortab(int a) /* convert LINUX Color code to DOS-standard */ { @@ -47,7 +46,6 @@ static int colortab(int a) /* convert LINUX Color code to DOS-standard */ } return COLOR_BLACK; } -#endif /* SERGEEV */ static void docolor (int color) /* Set DOS-like text mode colors */ { @@ -61,9 +59,8 @@ static void docolor (int color) /* Set DOS-like text mode colors */ wattron(conio_scr,COLOR_PAIR(1+(color&7)+((color&112)>>1))); } -#ifdef SERGEEV /* Call this before any call to linux conio - except the port functions ! */ -void __attribute__((constructor)) initconio (void) /* This is needed, because ncurses needs to be initialized */ +void initconio (void) { int x,y; short pair; @@ -93,7 +90,6 @@ void __attribute__((constructor)) initconio (void) /* This is needed, because nc textcolor(7); textbackground(0); } -#endif /* SERGEEV */ /* Call this on exiting your program */ void doneconio (void) @@ -309,20 +305,24 @@ void textmode (int mode) int wherex (void) { +#ifdef SERGEEV int y; int x; getyx(conio_scr,y,x); x++; return(x); +#endif /* SERGEEV */ } int wherey (void) { +#ifdef SERGEEV int y; int x; getyx(conio_scr,y,x); y++; return(y); +#endif /* SERGEEV */ } void window (int left,int top,int right,int bottom)