Mailinglist Archive: yast-commit (711 mails)
| < Previous | Next > |
[yast-commit] r48674 - /branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc
- From: aschnell@xxxxxxxxxxxxxxxx
- Date: Fri, 27 Jun 2008 19:36:22 -0000
- Message-id: <20080627193622.41ADC3B732@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Fri Jun 27 21:36:21 2008
New Revision: 48674
URL: http://svn.opensuse.org/viewcvs/yast?rev=48674&view=rev
Log:
- playing with locales
Modified:
branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc
Modified: branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc?rev=48674&r1=48673&r2=48674&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc (original)
+++ branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc Fri Jun 27
21:36:21 2008
@@ -6384,7 +6384,7 @@
static int numSuffixes()
{
- return 5;
+ return 6;
}
@@ -6411,6 +6411,10 @@
case 4:
/* TeraByte abbreviated */
return classic ? "TB" : _("TB");
+
+ case 5:
+ /* PetaByte abbreviated */
+ return classic ? "PB" : _("PB");
}
return string("error");
@@ -6420,7 +6424,7 @@
string Storage::byteToHumanString(unsigned long long size, bool classic, int
precision,
bool omit_zeroes) const
{
- const locale loc = locale::classic();
+ const locale loc = classic ? locale::classic() : locale();
double f = (double)(size);
int suffix = 0;
@@ -6449,7 +6453,7 @@
bool Storage::humanStringToByte(const string& str, bool classic, unsigned long
long& size) const
{
- const locale loc = locale::classic();
+ const locale loc = classic ? locale::classic() : locale();
istringstream s(boost::trim_copy(str, loc));
s.imbue(loc);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Fri Jun 27 21:36:21 2008
New Revision: 48674
URL: http://svn.opensuse.org/viewcvs/yast?rev=48674&view=rev
Log:
- playing with locales
Modified:
branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc
Modified: branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc?rev=48674&r1=48673&r2=48674&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc (original)
+++ branches/tmp/aschnell/part-redesign/libstorage/src/Storage.cc Fri Jun 27
21:36:21 2008
@@ -6384,7 +6384,7 @@
static int numSuffixes()
{
- return 5;
+ return 6;
}
@@ -6411,6 +6411,10 @@
case 4:
/* TeraByte abbreviated */
return classic ? "TB" : _("TB");
+
+ case 5:
+ /* PetaByte abbreviated */
+ return classic ? "PB" : _("PB");
}
return string("error");
@@ -6420,7 +6424,7 @@
string Storage::byteToHumanString(unsigned long long size, bool classic, int
precision,
bool omit_zeroes) const
{
- const locale loc = locale::classic();
+ const locale loc = classic ? locale::classic() : locale();
double f = (double)(size);
int suffix = 0;
@@ -6449,7 +6453,7 @@
bool Storage::humanStringToByte(const string& str, bool classic, unsigned long
long& size) const
{
- const locale loc = locale::classic();
+ const locale loc = classic ? locale::classic() : locale();
istringstream s(boost::trim_copy(str, loc));
s.imbue(loc);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |