From: Jim Meyering Date: Thu, 6 Jan 2000 08:35:21 +0000 (+0000) Subject: (apply_suffix): Comment. X-Git-Tag: FILEUTILS-4_0n~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2315cbdeaa313420942c5dc7730e46d737ed5be0;p=thirdparty%2Fcoreutils.git (apply_suffix): Comment. --- diff --git a/src/sleep.c b/src/sleep.c index 5d4596414f..27385aea71 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; }