From 9f0fa60e12deccb5162f892f1c13839f57e10535 Mon Sep 17 00:00:00 2001 From: marschap Date: Sun, 10 Dec 2006 09:44:39 +0000 Subject: [PATCH] more doxygen --- clients/lcdproc/util.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/clients/lcdproc/util.c b/clients/lcdproc/util.c index 58d23bb..12bc339 100644 --- a/clients/lcdproc/util.c +++ b/clients/lcdproc/util.c @@ -30,7 +30,12 @@ #include "util.h" -/** print a memory value with the correct unit to a given string */ +/** Print a memory value with the correct unit to a given string. + * \param *dst String to print the value to. + * \param value Value to print. + * \param roundlimit Set < 1.0 if precision of original input value is not sufficient. + * \return dst + */ char * sprintf_memory(char *dst, double value, double roundlimit) { @@ -50,7 +55,11 @@ sprintf_memory(char *dst, double value, double roundlimit) } -/** print a percentage value to a given string */ +/** Print a percentage value to a given string. + * \param *dst String to print the percentage value to. + * \param percent Value to print. + * \return dst + */ char * sprintf_percent(char *dst, double percent) { @@ -63,10 +72,13 @@ sprintf_percent(char *dst, double percent) return dst; } -/** converts a value with unit value + +/** Convert a value with unit value. * does not do formatting - * base : should be 1000 for decimal and 1024 for binary units - * roundlimit : set < 1.0 if precision of original input value is not sufficient + * \param *value Pointer to the value to be scaled + * \param base Base used for scaling (e.g. 1000 for decimal, 1024 for binary units) + * \param roundlimit Set < 1.0 if precision of original input value is not sufficient + * \return Unit string to be used when displaying value */ char * convert_double(double *value, int base, double roundlimit)