diff options
author | james <> | 2008-02-04 02:05:06 +0000 |
---|---|---|
committer | james <> | 2008-02-04 02:05:06 +0000 |
commit | c4b7eff58a98590defd94bdbd39a7798521b55a1 (patch) | |
tree | 283863d2eeac8e8a79142e16c37e31dca38f43fb /src/crt.c | |
parent | e45109d0e28411913f65e5aa16911e19217d2312 (diff) | |
download | sympathy-c4b7eff58a98590defd94bdbd39a7798521b55a1.tar.gz sympathy-c4b7eff58a98590defd94bdbd39a7798521b55a1.tar.bz2 sympathy-c4b7eff58a98590defd94bdbd39a7798521b55a1.zip |
*** empty log message ***
Diffstat (limited to 'src/crt.c')
-rw-r--r-- | src/crt.c | 46 |
1 files changed, 28 insertions, 18 deletions
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.2 2008/02/04 02:05:06 james + * *** empty log message *** + * * Revision 1.1 2008/02/03 23:31:25 james * *** empty log message *** * @@ -17,35 +20,42 @@ static char rcsid[] = "$Id$"; #include "project.h" -void crt_cls(CRT *c) +void +crt_cls (CRT * c) { -int i; + int i; -for (i=0;i<CRT_CELS;++i) { - c->screen[i].chr=' '; - c->screen[i].chr=CRT_ATTR_NORMAL; -} + for (i = 0; i < CRT_CELS; ++i) + { + c->screen[i].chr = ' '; + c->screen[i].chr = CRT_ATTR_NORMAL; + } } -void crt_reset(CRT *c) +void +crt_reset (CRT * c) { -crt_cls(c); + crt_cls (c); -crt->pos.x=0; -crt->pos.y=0; -crt->hide_cursor=1; + c->pos.x = 0; + c->pos.y = 0; + c->hide_cursor = 1; } -void crt_insert(CRT *c,CRT_CA ca) +void +crt_insert (CRT * c, CRT_CA ca) { -if (c->pos.x<0) c->pos.x=0; -if (c->pos.x>=CRT_COLS) c->pos.x=CRT_COLS-1; -if (c->pos.y<0) c->pos.y=0; -if (c->pos.y>=CRT_ROWS) c->pos.y=CRT_ROWS-1; + if (c->pos.x < 0) + c->pos.x = 0; + if (c->pos.x >= CRT_COLS) + c->pos.x = CRT_COLS - 1; + if (c->pos.y < 0) + c->pos.y = 0; + if (c->pos.y >= CRT_ROWS) + c->pos.y = CRT_ROWS - 1; -crt->screen[CRT_ADDR(c->pos.y,c->pos.x)]=ca; + c->screen[CRT_ADDR (c->pos.y, c->pos.x)] = ca; } - |