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/lib... ============================================================================== --- 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);
yast-commit@lists.opensuse.org