From 1338a264d57ad5f74ce6f8283966020a8e978d2e Mon Sep 17 00:00:00 2001 From: reinelt Date: Sat, 26 Jun 2004 09:27:21 +0000 Subject: [lcd4linux @ 2004-06-26 09:27:20 by reinelt] added '-W' to CFLAGS changed all C++ comments to C ones ('//' => '/* */') cleaned up a lot of signed/unsigned mistakes git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@480 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- plugin_test.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'plugin_test.c') diff --git a/plugin_test.c b/plugin_test.c index 5fc35ea..2c075b1 100644 --- a/plugin_test.c +++ b/plugin_test.c @@ -1,4 +1,4 @@ -/* $Id: plugin_test.c,v 1.1 2004/06/07 06:56:55 reinelt Exp $ +/* $Id: plugin_test.c,v 1.2 2004/06/26 09:27:21 reinelt Exp $ * * Handy functions for testing displays and debugging code. * @@ -26,6 +26,12 @@ * * * $Log: plugin_test.c,v $ +* Revision 1.2 2004/06/26 09:27:21 reinelt +* +* added '-W' to CFLAGS +* changed all C++ comments to C ones ('//' => '/* */') +* cleaned up a lot of signed/unsigned mistakes +* * Revision 1.1 2004/06/07 06:56:55 reinelt * * added test plugin from Andy Baxter @@ -49,10 +55,11 @@ int plugin_init_test (void); #endif -// used for testing bars - keeps values for a series of 10 bars, -// which are incremented and decremented between 0 and rmax by -// amount rdelta every time they are read. Starting value is rstart. -// rbar gives the number of the test bar. +/* used for testing bars - keeps values for a series of 10 bars, + * which are incremented and decremented between 0 and rmax by + * amount rdelta every time they are read. Starting value is rstart. + * rbar gives the number of the test bar. + */ static void my_test_bar (RESULT *result, RESULT *rbar, RESULT *rmax, RESULT *rstart, RESULT *rdelta) { @@ -64,19 +71,19 @@ static void my_test_bar (RESULT *result, RESULT *rbar, RESULT *rmax, max=R2N(rmax); delta=R2N(rdelta); - // the maths is just to stop double rounding errors and bad values. + /* the maths is just to stop double rounding errors and bad values. */ bar=((int)floor(R2N(rbar)+0.1)) % 10; if ( fabs(delta) > 0.1 ) { - // don't move or init the bar if delta=0 (the widget is only browsing) + /* don't move or init the bar if delta=0 (the widget is only browsing) */ if (values[bar] == -1) { - // first time called. + /* first time called. */ values[bar]=R2N(rstart); deltas[bar]=delta; }; values[bar]+=deltas[bar]; }; if (values[bar] < 0 || values[bar] > max ) { - // turn around. + /* turn around. */ deltas[bar]= -deltas[bar]; values[bar]+= deltas[bar]; }; @@ -85,8 +92,9 @@ static void my_test_bar (RESULT *result, RESULT *rbar, RESULT *rmax, } -// like above, but just switches a value between 1 and -1. Can use to test -// visibility of icons. +/* like above, but just switches a value between 1 and -1. Can use to test + * visibility of icons. + */ static void my_test_onoff (RESULT *result, RESULT *arg1) { static int on[10] = {1,1,1,1,1,1,1,1,1,1}; @@ -112,5 +120,5 @@ int plugin_init_test (void) void plugin_exit_test(void) { - // empty + /* empty */ } -- cgit v1.2.3