Mercurial > hg > forks > pwpunix
changeset 57:7d4f6c33a6ac
Warning cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 28 May 2010 15:24:04 +0300 |
parents | 5d819ba6891c |
children | 6bddfed775f8 |
files | pwplib/colorterm.c pwplib/tty.c pwplib/tty.h |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/pwplib/colorterm.c Thu May 27 22:48:37 2010 +0300 +++ b/pwplib/colorterm.c Fri May 28 15:24:04 2010 +0300 @@ -9,6 +9,7 @@ #include <termios.h> #include "pwplib.h" +#include "convert.h" #include "tty.h" #ifdef howmany @@ -127,7 +128,7 @@ } } - tty_write(tmp,d-tmp); + tty_write(tmp, d - tmp); TEMPFREE(tmp); return d-tmp;
--- a/pwplib/tty.c Thu May 27 22:48:37 2010 +0300 +++ b/pwplib/tty.c Fri May 28 15:24:04 2010 +0300 @@ -51,12 +51,11 @@ pwp_tty.width=80; } -void tty_write(char *data, int lgt) +void tty_write(void *data, int lgt) { - if(lgt<0)lgt=strlen(data); - - write(pwp_tty.fd,data,lgt); - pwplib.timer_counter+=lgt; + if (lgt < 0) lgt = strlen((char *) data); + write(pwp_tty.fd, data, lgt); + pwplib.timer_counter += lgt; } /******************************************************************/