[ooo-build-commit] .: l10ntools/scripts l10ntools/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Oct 1 06:49:34 PDT 2010


 l10ntools/scripts/localize.pl  |    2 +-
 l10ntools/source/directory.cxx |   23 ++++++++++-------------
 2 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 187ff545e30c57095c5fc0887e32e6c71f0eb59b
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Oct 1 15:48:41 2010 +0200

    Fixed some encoding issues in tools used by localize

diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 3c53bab..e242aa2 100644
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -488,7 +488,7 @@ sub collectfiles{
         }else{
             $command = $binpath."localize_sl";
         }
-        print $command;
+        print $command . "\n";
         # -e
         # if ( -x $command ){
         if( $command ){
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index 17b3aa6..4dbc483 100644
--- a/l10ntools/source/directory.cxx
+++ b/l10ntools/source/directory.cxx
@@ -187,30 +187,27 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
     struct stat     statbuf2;
     struct dirent   *dirp;
     DIR             *dir;
-    //int             ret;
-    //char            *ptr;
 
     if( sFullpath.getLength() < 1 ) return;
 
-    rtl::OString   sFullpathext = rtl::OUStringToOString( sFullpath , RTL_TEXTENCODING_UTF8 , sFullpath.getLength() ).getStr();
-    //printf("%s\n",sFullpathext.getStr());
+    rtl::OString   sFullpathext = rtl::OUStringToOString( sFullpath , RTL_TEXTENCODING_UTF8 );
     const char*    path         = sFullpathext.getStr();
    
     // stat
-    if( stat( path  , &statbuf ) < 0 ){   printf("warning: Can not stat %s" , path ); return; }// error }
+    if( stat( path  , &statbuf ) < 0 ){   printf("warning: Can not stat %s" , path ); return; }
     
-    if( S_ISDIR(statbuf.st_mode ) == 0 ) {  return; }// error }   return; // not dir
+    if( S_ISDIR(statbuf.st_mode ) == 0 ) {  return; }
 
-    if( (dir = opendir( path ) ) == NULL  ) {printf("readerror 2 in %s \n",path); return; } // error } return; // error
+    if( (dir = opendir( path ) ) == NULL  ) {printf("readerror 2 in %s \n",path); return; }
     dirholder aHolder(dir);
     
-    sFullpathext += rtl::OString( "/" );
-
     const rtl::OString sDot ( "." ) ;
     const rtl::OString sDDot( ".." );
     
-    if ( chdir( path ) == -1 ) { printf("chdir error in %s \n",path); return; } // error
+    if ( chdir( path ) == -1 ) { printf("chdir error in %s \n",path); return; }
     
+    sFullpathext += rtl::OString( "/" );
+
     while(  ( dirp = readdir( dir ) ) != NULL )
     {
         rtl::OString sEntryName(  dirp->d_name );
@@ -225,7 +222,7 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
         // stat new entry
         if( lstat( sEntity.getStr() , &statbuf2 ) < 0 )
         {
-            printf("error on entry %s\n" , sEntity.getStr() ) ; // error
+            printf("error on entry %s\n" , sEntity.getStr() ) ;
             continue;
         }
 
@@ -261,8 +258,8 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
                          }
         }
     }
-    if ( chdir( ".." ) == -1 ) { printf("chdir error in .. \n"); return; } // error
-    if( aHolder.close() < 0 )   return ; // error
+    if ( chdir( ".." ) == -1 ) { printf("chdir error in .. \n"); return; }
+    if( aHolder.close() < 0 )   return ;
 
     std::sort( aFileVec.begin() , aFileVec.end() , File::lessFile );
     std::sort( aDirVec.begin()  , aDirVec.end()  , Directory::lessDir  );


More information about the ooo-build-commit mailing list