]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: adjust comments to avoid FP match on binary-operator-at-EOL
authorJim Meyering <meyering@redhat.com>
Mon, 30 Apr 2012 08:55:18 +0000 (10:55 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 2 May 2012 08:31:53 +0000 (10:31 +0200)
* 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
src/ls.c
src/runcon.c

index ffd6ff37aecf9c7911f287291a850a26a9ec94e9..aaea9fffda77982f4ce0180ec5f5f49ccd4bf0c2 100644 (file)
@@ -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:
index 800f8138cf0cc00c4811561f36e2c2d5f1a213de..397e4ea928ccd7ec555a6d9a19a1f1becc1a318c 100644 (file)
--- 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;
 
index 29bf0e502b73a5f2fb3832ab09d754991aad9120..875441f3008b6e3305268be708fe8740fbd64a5f 100644 (file)
@@ -15,9 +15,9 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /*
- * 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.
  *