]> git.cameronkatri.com Git - bsd-progress.git/commitdiff
Use IEC 60027-2 prefixes for 2^n based prefixes.
authorlukem <lukem@NetBSD.org>
Thu, 12 Apr 2007 06:50:39 +0000 (06:50 +0000)
committerlukem <lukem@NetBSD.org>
Thu, 12 Apr 2007 06:50:39 +0000 (06:50 +0000)
strsuftoll.c

index a4d157fc897cfbe68b3aceff83480d5f85e755f3..8cb0b6defd12b689bb2aaa08e5d659575a887b79 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: strsuftoll.c,v 1.6 2004/03/05 05:58:29 lukem Exp $     */
+/*     $NetBSD: strsuftoll.c,v 1.7 2007/04/12 06:50:39 lukem Exp $     */
 /*-
  * Copyright (c) 2001-2002,2004 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -74,7 +74,7 @@
 #include <sys/cdefs.h>
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strsuftoll.c,v 1.6 2004/03/05 05:58:29 lukem Exp $");
+__RCSID("$NetBSD: strsuftoll.c,v 1.7 2007/04/12 06:50:39 lukem Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef _LIBC
@@ -171,28 +171,28 @@ strsuftollx(const char *desc, const char *val,
                break;
        case 'k':
                t = num;
-               num *= 1024;                    /* 1 kilobyte */
+               num *= 1024;                    /* 1 kibibyte */
                if (t > num)
                        goto erange;
                ++expr;
                break;
        case 'm':
                t = num;
-               num *= 1048576;                 /* 1 megabyte */
+               num *= 1048576;                 /* 1 mebibyte */
                if (t > num)
                        goto erange;
                ++expr;
                break;
        case 'g':
                t = num;
-               num *= 1073741824;              /* 1 gigabyte */
+               num *= 1073741824;              /* 1 gibibyte */
                if (t > num)
                        goto erange;
                ++expr;
                break;
        case 't':
                t = num;
-               num *= 1099511627776LL;         /* 1 terabyte */
+               num *= 1099511627776LL;         /* 1 tebibyte */
                if (t > num)
                        goto erange;
                ++expr;