Mercurial > hg > nnchat
comparison nnchat.c @ 376:1617d0a0c58e
Use getmaxy() instead of getmaxyx().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 28 Jun 2011 21:46:18 +0300 |
parents | b9f0bdad6285 |
children | 7c28f38cb6dd |
comparison
equal
deleted
inserted
replaced
375:c300ed52886c | 376:1617d0a0c58e |
---|---|
421 } | 421 } |
422 | 422 |
423 | 423 |
424 BOOL updateMainWin(BOOL force) | 424 BOOL updateMainWin(BOOL force) |
425 { | 425 { |
426 int w, h, offs; | 426 int h, offs; |
427 qringbuf_t *buf; | 427 qringbuf_t *buf; |
428 | 428 |
429 /* Check pointers */ | 429 /* Check pointers */ |
430 if (mainWin == NULL || currWin == NULL) | 430 if (mainWin == NULL || currWin == NULL) |
431 return FALSE; | 431 return FALSE; |
434 if (!force && !currWin->dirty) | 434 if (!force && !currWin->dirty) |
435 return FALSE; | 435 return FALSE; |
436 | 436 |
437 /* Compute how many lines from backbuffer fit on the screen */ | 437 /* Compute how many lines from backbuffer fit on the screen */ |
438 buf = currWin->data; | 438 buf = currWin->data; |
439 getmaxyx(mainWin, h, w); | 439 h = getmaxy(mainWin); |
440 | 440 |
441 /* Clear and redraw window */ | 441 /* Clear and redraw window */ |
442 werase(mainWin); | 442 werase(mainWin); |
443 scrollok(mainWin, 1); | 443 scrollok(mainWin, 1); |
444 for (offs = buf->size - h - currWin->pos; offs >= 0 && offs < buf->size - currWin->pos && offs < buf->size; offs++) { | 444 for (offs = buf->size - h - currWin->pos; offs >= 0 && offs < buf->size - currWin->pos && offs < buf->size; offs++) { |