From 57e0a882ef70712f79e7255aa5c1f8ba27b4c33e Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 30 Apr 2012 10:55:18 +0200 Subject: maint: adjust comments to avoid FP match on binary-operator-at-EOL * src/ls.c (print_long_format): Reformat comment to avoid "==" at end of line. Also, "sortkey" is not a word: s/sortkey/sort key/. * src/ioblksize.h: Likewise, for "|" from a shell snippet. * src/runcon.c: Likewise, for "|" in grammar-like usage. --- src/ioblksize.h | 4 ++-- src/ls.c | 20 ++++++++++---------- src/runcon.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/ioblksize.h b/src/ioblksize.h index ffd6ff37a..aaea9fffd 100644 --- a/src/ioblksize.h +++ b/src/ioblksize.h @@ -28,8 +28,8 @@ bs=$((1024*2**$i)) printf "%7s=" $bs timeout --foreground -sINT 2 \ - dd bs=$bs if=/dev/zero of=/dev/null 2>&1 | - sed -n 's/.* \([0-9.]* [GM]B\/s\)/\1/p' + dd bs=$bs if=/dev/zero of=/dev/null 2>&1 \ + | sed -n 's/.* \([0-9.]* [GM]B\/s\)/\1/p' done With the results shown for these systems: diff --git a/src/ls.c b/src/ls.c index 800f8138c..397e4ea92 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3443,13 +3443,13 @@ static int rev_xstrcoll_df_version (V a, V b) { DIRFIRST_CHECK (a, b); return cmp_version (b, a); } -/* We have 2^3 different variants for each sortkey function +/* We have 2^3 different variants for each sort-key function (for 3 independent sort modes). The function pointers stored in this array must be dereferenced as: sort_variants[sort_key][use_strcmp][reverse][dirs_first] - Note that the order in which sortkeys are listed in the function pointer + Note that the order in which sort keys are listed in the function pointer array below is defined by the order of the elements in the time_type and sort_type enums! */ @@ -3493,14 +3493,14 @@ static qsortFunc const sort_functions[][2][2][2] = LIST_SORTFUNCTION_VARIANTS (atime) }; -/* The number of sortkeys is calculated as - the number of elements in the sort_type enum (i.e. sort_numtypes) + +/* The number of sort keys is calculated as the sum of + the number of elements in the sort_type enum (i.e. sort_numtypes) the number of elements in the time_type enum (i.e. time_numtypes) - 1 This is because when sort_type==sort_time, we have up to - time_numtypes possible sortkeys. + time_numtypes possible sort keys. This line verifies at compile-time that the array of sort functions has been - initialized for all possible sortkeys. */ + initialized for all possible sort keys. */ verify (ARRAY_CARDINALITY (sort_functions) == sort_numtypes + time_numtypes - 1 ); @@ -3918,10 +3918,10 @@ print_long_format (const struct fileinfo *f) gettime (¤t_time); } - /* Consider a time to be recent if it is within the past six - months. A Gregorian year has 365.2425 * 24 * 60 * 60 == - 31556952 seconds on the average. Write this value as an - integer constant to avoid floating point hassles. */ + /* Consider a time to be recent if it is within the past six months. + A Gregorian year has 365.2425 * 24 * 60 * 60 == 31556952 seconds + on the average. Write this value as an integer constant to + avoid floating point hassles. */ six_months_ago.tv_sec = current_time.tv_sec - 31556952 / 2; six_months_ago.tv_nsec = current_time.tv_nsec; diff --git a/src/runcon.c b/src/runcon.c index 29bf0e502..875441f30 100644 --- a/src/runcon.c +++ b/src/runcon.c @@ -15,9 +15,9 @@ along with this program. If not, see . */ /* - * runcon [ context | - * ( [ -c ] [ -r role ] [-t type] [ -u user ] [ -l levelrange ] ) - * command [arg1 [arg2 ...] ] + * runcon [ context + * | ( [ -c ] [ -r role ] [-t type] [ -u user ] [ -l levelrange ] ) + * command [arg1 [arg2 ...] ] * * attempt to run the specified command with the specified context. * -- cgit v1.2.3-54-g00ecf