Author: aschnell
Date: Sat Jul 26 17:46:44 2008
New Revision: 49434
URL: http://svn.opensuse.org/viewcvs/yast?rev=49434&view=rev
Log:
- use boost to_lower functions
Modified:
trunk/storage/libstorage/src/AppUtil.cc
trunk/storage/libstorage/src/AppUtil.h
trunk/storage/libstorage/src/Dasd.cc
trunk/storage/libstorage/src/Disk.cc
trunk/storage/libstorage/src/Storage.cc
Modified: trunk/storage/libstorage/src/AppUtil.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=49434&r1=49433&r2=49434&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.cc (original)
+++ trunk/storage/libstorage/src/AppUtil.cc Sat Jul 26 17:46:44 2008
@@ -476,13 +476,6 @@
return( 0 );
}
-void tolower( string& s )
- {
- for( string::iterator i=s.begin(); i!=s.end(); i++ )
- {
- *i = std::tolower(*i);
- }
- }
void getFindMap( const char* path, map& m, bool unique )
{
@@ -583,6 +576,7 @@
return( ret );
}
+
string sformat(const char* format, ...)
{
char* result;
@@ -686,7 +680,7 @@
for(int i = 0; i < numSuffixes(); i++)
{
- if (suffix == boost::to_lower_copy(getSuffix(i, classic)))
+ if (suffix == boost::to_lower_copy(getSuffix(i, classic), loc))
{
size = f;
return true;
Modified: trunk/storage/libstorage/src/AppUtil.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.h?rev=49434&r1=49433&r2=49434&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.h (original)
+++ trunk/storage/libstorage/src/AppUtil.h Sat Jul 26 17:46:44 2008
@@ -25,7 +25,6 @@
bool searchFile(AsciiFile& File_Cr, string Pat_Cv, string& Line_Cr);
bool searchFile(AsciiFile& File_Cr, string Pat_Cv, string& Line_Cr,
int& StartLine_ir);
-void tolower( string& s );
void timeMark(const char*const Text_pcv, bool PrintDiff_bi = true);
void createPath(string Path_Cv);
bool checkNormalFile(string Path_Cv);
Modified: trunk/storage/libstorage/src/Dasd.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dasd.cc?rev=49434&r1=49433&r2=49434&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Dasd.cc (original)
+++ trunk/storage/libstorage/src/Dasd.cc Sat Jul 26 17:46:44 2008
@@ -8,6 +8,7 @@
#include <string>
#include <sstream>
#include <iomanip>
+#include
#include "y2storage/SystemCmd.h"
#include "y2storage/ProcPart.h"
@@ -62,8 +63,7 @@
string tmp = *Cmd.getLine(0, true);
y2milestone( "Format line:%s", tmp.c_str() );
tmp = tmp.erase( 0, tmp.find( ':' ) + 1 );
- tmp = extractNthWord( 4, tmp );
- tolower( tmp );
+ tmp = boost::to_lower_copy(extractNthWord(4, tmp), locale::classic());
if( tmp == "cdl" )
fmt = DASDF_CDL;
else if( tmp == "ldl" )
Modified: trunk/storage/libstorage/src/Disk.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=49434&r1=49433&r2=49434&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Disk.cc (original)
+++ trunk/storage/libstorage/src/Disk.cc Sat Jul 26 17:46:44 2008
@@ -2,15 +2,15 @@
Textdomain "storage"
*/
-#include <iostream>
+#include
+#include /* for BLKGETSIZE */
+#include /* for HDIO_GETGEO */
+#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
-
-#include
-#include /* for BLKGETSIZE */
-#include /* for HDIO_GETGEO */
+#include
#include "y2storage/Region.h"
#include "y2storage/Partition.h"
@@ -684,7 +684,7 @@
id = Partition::ID_LINUX;
boot = TInfo.find( ",boot," ) != string::npos;
string OrigTInfo = TInfo;
- tolower( TInfo );
+ boost::to_lower(TInfo, locale::classic());
if( ext_possible )
{
if( PartitionType == "extended" )
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=49434&r1=49433&r2=49434&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Sat Jul 26 17:46:44 2008
@@ -17,6 +17,7 @@
#include <fstream>
#include <sstream>
#include <iostream>
+#include
#include
#include
@@ -159,8 +160,7 @@
y2mil( "ls:" << ls );
if( ls.size()==2 )
{
- string val = ls.back();
- tolower(val);
+ string val = boost::to_lower_copy(ls.back(), locale::classic());
if( val == "id" )
setDefaultMountBy( MOUNTBY_ID );
else if( val == "path" )
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org