MCPcopy Create free account
hub / github.com/NetHack/NetHack / get_scr_size

Function get_scr_size

outdated/sys/atari/tos.c:237–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237void
238get_scr_size()
239{
240#ifdef MINT
241#include <ioctl.h>
242 struct winsize win;
243 char *tmp;
244
245 if ((tmp = nh_getenv("LINES")))
246 LI = atoi(tmp);
247 else if ((tmp = nh_getenv("ROWS")))
248 LI = atoi(tmp);
249 if (tmp && (tmp = nh_getenv("COLUMNS")))
250 CO = atoi(tmp);
251 else {
252 ioctl(0, TIOCGWINSZ, &win);
253 LI = win.ws_row;
254 CO = win.ws_col;
255 }
256#else
257 init_aline();
258 LI = (*((WORD *) (_a_line + -42L))) + 1;
259 CO = (*((WORD *) (_a_line + -44L))) + 1;
260#endif
261}
262
263#define BIGBUF 8192
264

Callers 1

dosuspendFunction · 0.70

Calls 2

init_alineFunction · 0.85
nh_getenvFunction · 0.50

Tested by

no test coverage detected