Fix ncurses compatibility: remove internal structure access
- Remove direct access to curscr->_cury and curscr->_curx - Replace with public API call move() for cursor positioning - Fixes critical build failure on modern systems with ncurses 6.x - Build now succeeds on macOS arm64 See MODERNIZATION_LOG.md for detailed reasoning and impact analysis.
This commit is contained in:
11
main.c
11
main.c
@@ -66,9 +66,9 @@ main(int argc, char **argv, char **envp)
|
||||
|
||||
open_score();
|
||||
|
||||
/*
|
||||
* Drop setuid/setgid after opening the scoreboard file.
|
||||
*/
|
||||
/*
|
||||
* Drop setuid/setgid after opening the scoreboard file.
|
||||
*/
|
||||
|
||||
md_normaluser();
|
||||
|
||||
@@ -192,7 +192,7 @@ rnd(int range)
|
||||
* roll:
|
||||
* Roll a number of dice
|
||||
*/
|
||||
int
|
||||
int
|
||||
roll(int number, int sides)
|
||||
{
|
||||
int dtotal = 0;
|
||||
@@ -237,9 +237,8 @@ tstp(int ignored)
|
||||
wrefresh(curscr);
|
||||
getyx(curscr, y, x);
|
||||
mvcur(y, x, oy, ox);
|
||||
move(oy, ox); /* Use public API instead of internal structure access */
|
||||
fflush(stdout);
|
||||
curscr->_cury = oy;
|
||||
curscr->_curx = ox;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user