diff options
Diffstat (limited to 'tools/bootstrp/rscdep.cxx')
-rw-r--r-- | tools/bootstrp/rscdep.cxx | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx index 7bcf036f6fa4..1ebd9e85ac9a 100644 --- a/tools/bootstrp/rscdep.cxx +++ b/tools/bootstrp/rscdep.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,6 @@ #include "sal/main.h" #include <tools/string.hxx> -#include <tools/list.hxx> #include <tools/fsys.hxx> #include <tools/stream.hxx> @@ -78,8 +78,6 @@ void RscHrcDep::Execute() CppDep::Execute(); } -//static String aDelim; - int main( int argc, char** argv ) { int c; @@ -105,12 +103,10 @@ int main( int argc, char** argv ) if ( aBuf[0] == '-' && aBuf[1] == 'p' && aBuf[2] == '=' ) { strcpy(pFileNamePrefix, &aBuf[3]); - //break; } if ( aBuf[0] == '-' && aBuf[1] == 'f' && aBuf[2] == 'o' && aBuf[3] == '=' ) { strcpy(pOutputFileName, &aBuf[4]); - //break; } if ( aBuf[0] == '-' && aBuf[1] == 'f' && aBuf[2] == 'p' && aBuf[3] == '=' ) { @@ -118,16 +114,13 @@ int main( int argc, char** argv ) String aName( pSrsFileName, gsl_getSystemTextEncoding()); DirEntry aDest( aName ); aSrsBaseName = aDest.GetBase(); - //break; } if (aBuf[0] == '-' && aBuf[1] == 'i' ) { - //printf("Include : %s\n", &aBuf[2] ); pDep->AddSearchPath( &aBuf[2] ); } if (aBuf[0] == '-' && aBuf[1] == 'I' ) { - //printf("Include : %s\n", &aBuf[2] ); pDep->AddSearchPath( &aBuf[2] ); } if (aBuf[0] == '@' ) @@ -142,12 +135,10 @@ int main( int argc, char** argv ) if ( aBuf[0] == '-' && aBuf[1] == 'p' && aBuf[2] == '=' ) { strcpy(pFileNamePrefix, &aBuf[3]); - //break; } if ( aBuf2[0] == '-' && aBuf2[1] == 'f' && aBuf2[2] == 'o' ) { strcpy(pOutputFileName, &aBuf2[3]); - //break; } if ( aBuf2[0] == '-' && aBuf2[1] == 'f' && aBuf2[2] == 'p' ) { @@ -155,16 +146,13 @@ int main( int argc, char** argv ) String aName( pSrsFileName, gsl_getSystemTextEncoding()); DirEntry aDest( aName ); aSrsBaseName = aDest.GetBase(); - //break; } if (aBuf2[0] == '-' && aBuf2[1] == 'i' ) { - //printf("Include : %s\n", &aBuf[2] ); pDep->AddSearchPath( &aBuf2[2] ); } if (aBuf2[0] == '-' && aBuf2[1] == 'I' ) { - //printf("Include : %s\n", &aBuf[2] ); pDep->AddSearchPath( &aBuf2[2] ); } if (( aBuf2[0] != '-' ) && ( aBuf2[0] != '@' )) @@ -217,20 +205,7 @@ int main( int argc, char** argv ) } - DirEntry aEntry("."); - aEntry.ToAbs(); -// String aCwd = aEntry.GetName(); String aCwd(pFileNamePrefix, gsl_getSystemTextEncoding()); -/* sal_uInt16 nPos; -#ifndef UNX - while ( (nPos = aCwd.Search('\\') != STRING_NOTFOUND )) -#else - while ( (nPos = aCwd.Search('/') != STRING_NOTFOUND )) -#endif - { - String attt = aCwd.Copy( 0, nPos ); - aCwd.Erase( 0, nPos ); - } */ SvFileStream aOutStream; String aOutputFileName( pOutputFileName, gsl_getSystemTextEncoding()); DirEntry aOutEntry( aOutputFileName ); @@ -242,7 +217,6 @@ int main( int argc, char** argv ) aFileName += String(".", gsl_getSystemTextEncoding()); aFileName += aSrsBaseName; aFileName += String(".dprr", gsl_getSystemTextEncoding()); - //fprintf( stderr, "OutFileName : %s \n",aFileName.GetStr()); aOutStream.Open( aFileName, STREAM_WRITE ); ByteString aString; @@ -272,7 +246,7 @@ int main( int argc, char** argv ) aString += aRespArg; pDep->Execute(); ByteStringList *pLst = pDep->GetDepList(); - sal_uIntPtr nCount = pLst->Count(); + size_t nCount = pLst->size(); if ( nCount == 0 ) { aOutStream.WriteLine( aString ); @@ -283,9 +257,9 @@ int main( int argc, char** argv ) aOutStream.WriteLine( aString ); } - for ( sal_uIntPtr j=0; j<nCount; j++ ) + for ( size_t j = 0; j < nCount; j++ ) { - ByteString *pStr = pLst->GetObject(j); + ByteString *pStr = (*pLst)[ j ]; pStr->SearchAndReplaceAll('\\', ByteString( aDelim, RTL_TEXTENCODING_ASCII_US )); if ( j != (nCount-1) ) *pStr += ByteString( "\\" ); @@ -297,3 +271,4 @@ int main( int argc, char** argv ) return 0; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |