bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: rename the si_present variable in sort to iec_present


From: Pádraig Brady
Subject: [PATCH] maint: rename the si_present variable in sort to iec_present
Date: Thu, 04 Mar 2010 10:58:19 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2

commit a7b4fa01ddde3f09eb642cb6378e16522917f8e0
Author: Pádraig Brady <address@hidden>
Date:   Thu Mar 4 10:54:21 2010 +0000

    maint: rename the si_present variable in sort to iec_present

    * src/sort.c: The units containing 'i' are actually IEC not SI.

diff --git a/src/sort.c b/src/sort.c
index 02b2351..5a937dd 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -181,7 +181,7 @@ struct keyfield
                                    Handle numbers in exponential notation. */
   bool human_numeric;          /* Flag for sorting by human readable
                                    units with either SI xor IEC prefixes. */
-  int si_present;              /* Flag for checking for mixed SI and IEC. */
+  int iec_present;             /* Flag for checking for mixed SI and IEC. */
   bool month;                  /* Flag for comparison by month name. */
   bool reverse;                        /* Reverse the sense of comparison. */
   bool version;                        /* sort by version number */
@@ -1754,10 +1754,10 @@ numcompare (const char *a, const char *b)
 static void
 check_mixed_SI_IEC (char prefix, struct keyfield *key)
 {
-  int si_present = prefix == 'i';
-  if (key->si_present != -1 && si_present != key->si_present)
+  int iec_present = prefix == 'i';
+  if (key->iec_present != -1 && iec_present != key->iec_present)
     error (SORT_FAILURE, 0, _("both SI and IEC prefixes present on units"));
-  key->si_present = si_present;
+  key->iec_present = iec_present;
 }

 /* Return an integer which represents the order of magnitude of
@@ -3211,7 +3211,7 @@ key_init (struct keyfield *key)
 {
   memset (key, 0, sizeof *key);
   key->eword = SIZE_MAX;
-  key->si_present = -1;
+  key->iec_present = -1;
   return key;
 }

@@ -3328,7 +3328,7 @@ main (int argc, char **argv)
   gkey.ignore = NULL;
   gkey.translate = NULL;
   gkey.numeric = gkey.general_numeric = gkey.human_numeric = false;
-  gkey.si_present = -1;
+  gkey.iec_present = -1;
   gkey.random = gkey.version = false;
   gkey.month = gkey.reverse = false;
   gkey.skipsblanks = gkey.skipeblanks = false;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]