From 2315cbdeaa313420942c5dc7730e46d737ed5be0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 6 Jan 2000 08:35:21 +0000 Subject: (apply_suffix): Comment. --- src/sleep.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sleep.c b/src/sleep.c index 5d4596414..27385aea7 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -83,11 +83,14 @@ point number.\n\ } exit (status); } - -/* FIXME: describe */ +/* Given a floating point value *X, and a suffix character, SUFFIX_CHAR, + scale *X by the multiplier implied by SUFFIX_CHAR. SUFFIX_CHAR may + be the NUL byte or `s' to denote seconds, `m' for minutes, `h' for + hours, or `d' for days. If SUFFIX_CHAR is invalid, don't modify *X + and return nonzero. Otherwise return zero. */ static int -apply_suffix (double *s, char suffix_char) +apply_suffix (double *x, char suffix_char) { unsigned int multiplier; @@ -113,7 +116,7 @@ apply_suffix (double *s, char suffix_char) if (multiplier == 0) return 1; - *s *= multiplier; + *x *= multiplier; return 0; } -- cgit v1.2.3-70-g09d2