diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-06-20 10:09:56 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-06-20 10:09:56 +0000 |
commit | 7ac3e2a7d2c23ea71adeb56d8afbe1b1cbeee4df (patch) | |
tree | c9fe5fa4426d7334d8486a3a7e59c64a43d2ef9e /drv_Curses.c | |
parent | e4626159694ea6774386faa2f0d2fb517de1eb8b (diff) | |
download | lcd4linux-7ac3e2a7d2c23ea71adeb56d8afbe1b1cbeee4df.tar.gz |
[lcd4linux @ 2004-06-20 10:09:52 by reinelt]
'const'ified the whole source
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@476 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r-- | drv_Curses.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drv_Curses.c b/drv_Curses.c index 7550e6b..7b1be2d 100644 --- a/drv_Curses.c +++ b/drv_Curses.c @@ -1,4 +1,4 @@ -/* $Id: drv_Curses.c,v 1.5 2004/06/06 06:51:59 reinelt Exp $ +/* $Id: drv_Curses.c,v 1.6 2004/06/20 10:09:54 reinelt Exp $ * * pure ncurses based text driver * @@ -26,6 +26,10 @@ * * * $Log: drv_Curses.c,v $ + * Revision 1.6 2004/06/20 10:09:54 reinelt + * + * 'const'ified the whole source + * * Revision 1.5 2004/06/06 06:51:59 reinelt * * do not display end splash screen if quiet=1 @@ -96,8 +100,9 @@ static void drv_Curs_clear (void) } -static void drv_Curs_write (int row, int col, unsigned char *data, int len) +static void drv_Curs_write (const int row, const int col, const unsigned char *data, const int len) { + int l = len; char *p; while ((p = strpbrk(data, "\r\n")) != NULL) { @@ -105,15 +110,15 @@ static void drv_Curs_write (int row, int col, unsigned char *data, int len) } if (col < DCOLS) { - if (DCOLS-col < len ) len = DCOLS-col; - mvwprintw(w, row+1 , col+1, "%.*s", DCOLS-col, data); + if (DCOLS-col < l ) l = DCOLS-col; + mvwprintw(w, row+1 , col+1, "%.*s", l, data); wmove(w, DROWS+1, 0); wrefresh(w); } } -static void drv_Curs_defchar (int ascii, unsigned char *buffer) +static void drv_Curs_defchar (const int ascii, const unsigned char *buffer) { // empty } @@ -161,7 +166,7 @@ int curses_error(char *buffer) } -static int drv_Curs_start (char *section, int quiet) +static int drv_Curs_start (const char *section, const int quiet) { char *s; @@ -245,7 +250,7 @@ int drv_Curs_list (void) // initialize driver & display -int drv_Curs_init (char *section, int quiet) +int drv_Curs_init (const char *section, const int quiet) { WIDGET_CLASS wc; int ret; @@ -296,7 +301,7 @@ int drv_Curs_init (char *section, int quiet) // close driver & display -int drv_Curs_quit (int quiet) { +int drv_Curs_quit (const int quiet) { info("%s: shutting down.", Name); |