summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-04-30 10:55:18 +0200
committerJim Meyering <meyering@redhat.com>2012-05-02 10:31:53 +0200
commit57e0a882ef70712f79e7255aa5c1f8ba27b4c33e (patch)
tree2e974fbd9ee44c5cf95067d4f37efb42100e48e3 /src/ls.c
parentb8a6996e258a2c30de40fb20cab0d17a38c3eff2 (diff)
downloadcoreutils-57e0a882ef70712f79e7255aa5c1f8ba27b4c33e.tar.xz
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.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c20
1 files changed, 10 insertions, 10 deletions
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 (&current_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;