1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_idl.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <stdlib.h> 32*cdf0e10cSrcweir #include <stdio.h> 33*cdf0e10cSrcweir #include <string.h> 34*cdf0e10cSrcweir #include <ctype.h> 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir #include <command.hxx> 37*cdf0e10cSrcweir #include <globals.hxx> 38*cdf0e10cSrcweir #include <database.hxx> 39*cdf0e10cSrcweir #include <tools/fsys.hxx> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir /************************************************************************* 42*cdf0e10cSrcweir |* 43*cdf0e10cSrcweir |* Syntaxbeschreibung 44*cdf0e10cSrcweir |* 45*cdf0e10cSrcweir *************************************************************************/ 46*cdf0e10cSrcweir char const * SyntaxStrings[] = { 47*cdf0e10cSrcweir "basic-type:", 48*cdf0e10cSrcweir "\tvoid| char| int| float| double|", 49*cdf0e10cSrcweir "\tUINT16| INT16| UINT32| INT32| BOOL|", 50*cdf0e10cSrcweir "\tBYTE| String| SbxObject", 51*cdf0e10cSrcweir "", 52*cdf0e10cSrcweir "{ import \"filename\" }\n", 53*cdf0e10cSrcweir "module definition:", 54*cdf0e10cSrcweir "module", 55*cdf0e10cSrcweir "\tunique id range (ask MM)", 56*cdf0e10cSrcweir "modul-name", 57*cdf0e10cSrcweir "'['", 58*cdf0e10cSrcweir "\tSlotIdFile( \"filename\" )", 59*cdf0e10cSrcweir "']'", 60*cdf0e10cSrcweir "'{'", 61*cdf0e10cSrcweir "\t{ include \"filename\" }\n", 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir "\titem definition:", 64*cdf0e10cSrcweir "\titem type item-name;\n", 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir "\ttype definition:", 67*cdf0e10cSrcweir "\tstruct | union identifier", 68*cdf0e10cSrcweir "\t'{'", 69*cdf0e10cSrcweir "\t\t{ type idetifier }", 70*cdf0e10cSrcweir "\t'}'", 71*cdf0e10cSrcweir "\t|", 72*cdf0e10cSrcweir "\tenum identifier", 73*cdf0e10cSrcweir "\t'{'", 74*cdf0e10cSrcweir "\t\t{ identifier, }", 75*cdf0e10cSrcweir "\t'}'", 76*cdf0e10cSrcweir "\t|", 77*cdf0e10cSrcweir "\ttypedef type identifier\n", 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir "\titem-method:", 80*cdf0e10cSrcweir "\titem identifier item-method-args\n", 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir "\titem-method-args:", 83*cdf0e10cSrcweir "\t( { item parameter-name SLOT_ID } )\n", 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir "\tslot definition:", 86*cdf0e10cSrcweir "\titem identifier SLOT_ID [ item-method-args ]", 87*cdf0e10cSrcweir "\t'['\n", 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir "\t\titem-method-args", 90*cdf0e10cSrcweir "\t\tAccelConfig, MenuConfig, StatusBarConfig, ToolbarConfig", 91*cdf0e10cSrcweir "\t\tAutomation*", 92*cdf0e10cSrcweir "\t\tAutoUpdate", 93*cdf0e10cSrcweir // "\t\tCachable*, Volatile", 94*cdf0e10cSrcweir "\t\tContainer", 95*cdf0e10cSrcweir "\t\tDefault = Identifier", 96*cdf0e10cSrcweir "\t\tExecMethod = Identifier", 97*cdf0e10cSrcweir "\t\tExport*", 98*cdf0e10cSrcweir "\t\tFastCall", 99*cdf0e10cSrcweir "\t\tGet, Set", 100*cdf0e10cSrcweir "\t\tGroupId = Identifier", 101*cdf0e10cSrcweir "\t\tHasCoreId", 102*cdf0e10cSrcweir "\t\tHasDialog", 103*cdf0e10cSrcweir "\t\tIsCollection", 104*cdf0e10cSrcweir "\t\tImageRotation", 105*cdf0e10cSrcweir "\t\tImageReflection", 106*cdf0e10cSrcweir "\t\tPseudoPrefix = Identifier", 107*cdf0e10cSrcweir "\t\tPseudoSlots", 108*cdf0e10cSrcweir "\t\tReadOnly", 109*cdf0e10cSrcweir "\t\tReadOnlyDoc*", 110*cdf0e10cSrcweir "\t\tRecordPerSet*, RecordPerItem, RecordManual, NoRecord", 111*cdf0e10cSrcweir "\t\tRecordAbsolute", 112*cdf0e10cSrcweir "\t\tStateMethod = Identifier", 113*cdf0e10cSrcweir "\t\tSynchron*, Asynchron", 114*cdf0e10cSrcweir "\t\tToggle", 115*cdf0e10cSrcweir "\t']'\n", 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir "\tinterface definition:", 118*cdf0e10cSrcweir "\tshell | interface identifier ':' interface", 119*cdf0e10cSrcweir "\t'{'", 120*cdf0e10cSrcweir "\t\t{ slot }", 121*cdf0e10cSrcweir "\t'}'\n", 122*cdf0e10cSrcweir "---syntax example is sfx.idl---\n", 123*cdf0e10cSrcweir NULL }; 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir char CommandLineSyntax[] = 126*cdf0e10cSrcweir "-fs<slotmap file> -fl<listing file>\n" 127*cdf0e10cSrcweir "-fo<odl file> -fd<data base file>\n" 128*cdf0e10cSrcweir "-fi<item implementation> -ft<type library file> (not OLE)\n" 129*cdf0e10cSrcweir "-fr<ressource file> -fm<makefile target file>\n" 130*cdf0e10cSrcweir "-fC<c++ source file> -fH<c++ header file>\n" 131*cdf0e10cSrcweir "-fc<c source file> -fh<c header file>\n" 132*cdf0e10cSrcweir "-rsc <*.srs header line>\n" 133*cdf0e10cSrcweir "-help, ? @<file> response file\n" 134*cdf0e10cSrcweir " <filenames>\n"; 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir /************************************************************************* 137*cdf0e10cSrcweir |* 138*cdf0e10cSrcweir |* Init() 139*cdf0e10cSrcweir |* 140*cdf0e10cSrcweir |* Beschreibung 141*cdf0e10cSrcweir |* Ersterstellung MM 15.12.94 142*cdf0e10cSrcweir |* Letzte Aenderung MM 15.12.94 143*cdf0e10cSrcweir |* 144*cdf0e10cSrcweir *************************************************************************/ 145*cdf0e10cSrcweir void Init() 146*cdf0e10cSrcweir { 147*cdf0e10cSrcweir if( !IDLAPP->pHashTable ) 148*cdf0e10cSrcweir IDLAPP->pHashTable = new SvStringHashTable( 2801 ); 149*cdf0e10cSrcweir if( !IDLAPP->pGlobalNames ) 150*cdf0e10cSrcweir IDLAPP->pGlobalNames = new SvGlobalHashNames(); 151*cdf0e10cSrcweir } 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir /************************************************************************* 154*cdf0e10cSrcweir |* 155*cdf0e10cSrcweir |* DeInit() 156*cdf0e10cSrcweir |* 157*cdf0e10cSrcweir |* Beschreibung 158*cdf0e10cSrcweir |* 159*cdf0e10cSrcweir *************************************************************************/ 160*cdf0e10cSrcweir void DeInit() 161*cdf0e10cSrcweir { 162*cdf0e10cSrcweir delete IDLAPP; 163*cdf0e10cSrcweir } 164*cdf0e10cSrcweir 165*cdf0e10cSrcweir /************************************************************************* 166*cdf0e10cSrcweir |* 167*cdf0e10cSrcweir |* DeInit() 168*cdf0e10cSrcweir |* 169*cdf0e10cSrcweir |* Beschreibung 170*cdf0e10cSrcweir |* 171*cdf0e10cSrcweir *************************************************************************/ 172*cdf0e10cSrcweir sal_Bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) 173*cdf0e10cSrcweir { 174*cdf0e10cSrcweir for( sal_uInt16 n = 0; n < rCommand.aInFileList.Count(); n++ ) 175*cdf0e10cSrcweir { 176*cdf0e10cSrcweir String aFileName ( *rCommand.aInFileList.GetObject( n ) ); 177*cdf0e10cSrcweir SvFileStream aStm( aFileName, STREAM_STD_READ | STREAM_NOCREATE ); 178*cdf0e10cSrcweir if( aStm.GetError() == SVSTREAM_OK ) 179*cdf0e10cSrcweir { 180*cdf0e10cSrcweir if( pDataBase->IsBinaryFormat( aStm ) ) 181*cdf0e10cSrcweir { 182*cdf0e10cSrcweir pDataBase->Load( aStm ); 183*cdf0e10cSrcweir if( aStm.GetError() != SVSTREAM_OK ) 184*cdf0e10cSrcweir { 185*cdf0e10cSrcweir ByteString aStr; 186*cdf0e10cSrcweir if( aStm.GetError() == SVSTREAM_FILEFORMAT_ERROR ) 187*cdf0e10cSrcweir aStr = "error: incompatible format, file "; 188*cdf0e10cSrcweir else if( aStm.GetError() == SVSTREAM_WRONGVERSION ) 189*cdf0e10cSrcweir aStr = "error: wrong version, file "; 190*cdf0e10cSrcweir else 191*cdf0e10cSrcweir aStr = "error during load, file "; 192*cdf0e10cSrcweir aStr += ByteString( aFileName, RTL_TEXTENCODING_UTF8 ); 193*cdf0e10cSrcweir fprintf( stderr, "%s\n", aStr.GetBuffer() ); 194*cdf0e10cSrcweir return sal_False; 195*cdf0e10cSrcweir } 196*cdf0e10cSrcweir } 197*cdf0e10cSrcweir else 198*cdf0e10cSrcweir { 199*cdf0e10cSrcweir SvTokenStream aTokStm( aStm, aFileName ); 200*cdf0e10cSrcweir if( !pDataBase->ReadSvIdl( aTokStm, sal_False, rCommand.aPath ) ) 201*cdf0e10cSrcweir return sal_False; 202*cdf0e10cSrcweir } 203*cdf0e10cSrcweir } 204*cdf0e10cSrcweir else 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir const ByteString aStr( aFileName, RTL_TEXTENCODING_UTF8 ); 207*cdf0e10cSrcweir fprintf( stderr, "unable to read input file: %s\n", aStr.GetBuffer() ); 208*cdf0e10cSrcweir return sal_False; 209*cdf0e10cSrcweir } 210*cdf0e10cSrcweir } 211*cdf0e10cSrcweir return sal_True; 212*cdf0e10cSrcweir } 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir /************************************************************************* 215*cdf0e10cSrcweir |* 216*cdf0e10cSrcweir |* SvCommand::SvCommand() 217*cdf0e10cSrcweir |* 218*cdf0e10cSrcweir |* Beschreibung 219*cdf0e10cSrcweir |* 220*cdf0e10cSrcweir *************************************************************************/ 221*cdf0e10cSrcweir static sal_Bool ResponseFile( StringList * pList, int argc, char ** argv ) 222*cdf0e10cSrcweir { 223*cdf0e10cSrcweir // Programmname 224*cdf0e10cSrcweir pList->Insert( new String( String::CreateFromAscii(*argv) ), LIST_APPEND ); 225*cdf0e10cSrcweir for( int i = 1; i < argc; i++ ) 226*cdf0e10cSrcweir { 227*cdf0e10cSrcweir if( '@' == **(argv +i) ) 228*cdf0e10cSrcweir { // wenn @, dann Response-Datei 229*cdf0e10cSrcweir SvFileStream aStm( String::CreateFromAscii((*(argv +i)) +1), STREAM_STD_READ | STREAM_NOCREATE ); 230*cdf0e10cSrcweir if( aStm.GetError() != SVSTREAM_OK ) 231*cdf0e10cSrcweir return sal_False; 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir ByteString aStr; 234*cdf0e10cSrcweir while( aStm.ReadLine( aStr ) ) 235*cdf0e10cSrcweir { 236*cdf0e10cSrcweir sal_uInt16 n = 0; 237*cdf0e10cSrcweir sal_uInt16 nPos = 1; 238*cdf0e10cSrcweir while( n != nPos ) 239*cdf0e10cSrcweir { 240*cdf0e10cSrcweir while( aStr.GetChar(n) && isspace( aStr.GetChar(n) ) ) 241*cdf0e10cSrcweir n++; 242*cdf0e10cSrcweir nPos = n; 243*cdf0e10cSrcweir while( aStr.GetChar(n) && !isspace( aStr.GetChar(n) ) ) 244*cdf0e10cSrcweir n++; 245*cdf0e10cSrcweir if( n != nPos ) 246*cdf0e10cSrcweir pList->Insert( new String( String::CreateFromAscii( aStr.Copy( nPos, n - nPos ).GetBuffer() ) ), LIST_APPEND ); 247*cdf0e10cSrcweir } 248*cdf0e10cSrcweir } 249*cdf0e10cSrcweir } 250*cdf0e10cSrcweir else if( argv[ i ] ) 251*cdf0e10cSrcweir pList->Insert( new String( String::CreateFromAscii( argv[ i ] ) ), LIST_APPEND ); 252*cdf0e10cSrcweir } 253*cdf0e10cSrcweir return sal_True; 254*cdf0e10cSrcweir } 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir /************************************************************************* 257*cdf0e10cSrcweir |* SvCommand::SvCommand() 258*cdf0e10cSrcweir |* 259*cdf0e10cSrcweir |* Beschreibung 260*cdf0e10cSrcweir *************************************************************************/ 261*cdf0e10cSrcweir SvCommand::SvCommand( int argc, char ** argv ) 262*cdf0e10cSrcweir : nVerbosity(1), nFlags( 0 ) 263*cdf0e10cSrcweir { 264*cdf0e10cSrcweir StringList aList; 265*cdf0e10cSrcweir 266*cdf0e10cSrcweir if( ResponseFile( &aList, argc, argv ) ) 267*cdf0e10cSrcweir for( sal_uLong i = 1; i < aList.Count(); i++ ) 268*cdf0e10cSrcweir { 269*cdf0e10cSrcweir String aParam( *aList.GetObject( i ) ); 270*cdf0e10cSrcweir sal_Unicode aFirstChar( aParam.GetChar(0) ); 271*cdf0e10cSrcweir if( '-' == aFirstChar ) 272*cdf0e10cSrcweir { 273*cdf0e10cSrcweir aParam.Erase( 0, 1 ); 274*cdf0e10cSrcweir aFirstChar = aParam.GetChar(0); 275*cdf0e10cSrcweir if( aFirstChar == 'F' || aFirstChar == 'f' ) 276*cdf0e10cSrcweir { 277*cdf0e10cSrcweir aParam.Erase( 0, 1 ); 278*cdf0e10cSrcweir aFirstChar = aParam.GetChar(0); 279*cdf0e10cSrcweir String aName( aParam.Copy( 1 ) ); 280*cdf0e10cSrcweir if( 's' == aFirstChar ) 281*cdf0e10cSrcweir { // Name der Slot-Ausgabe 282*cdf0e10cSrcweir aSlotMapFile = aName; 283*cdf0e10cSrcweir } 284*cdf0e10cSrcweir else if( 'l' == aFirstChar ) 285*cdf0e10cSrcweir { // Name der Listing 286*cdf0e10cSrcweir aListFile = aName; 287*cdf0e10cSrcweir } 288*cdf0e10cSrcweir else if( 'i' == aFirstChar ) 289*cdf0e10cSrcweir { // Name der Item-Datei 290*cdf0e10cSrcweir // aSfxItemFile = aName; 291*cdf0e10cSrcweir } 292*cdf0e10cSrcweir else if( 'o' == aFirstChar ) 293*cdf0e10cSrcweir { // Name der ODL-Datei 294*cdf0e10cSrcweir // aODLFile = aName; 295*cdf0e10cSrcweir } 296*cdf0e10cSrcweir else if( 'd' == aFirstChar ) 297*cdf0e10cSrcweir { // Name der Datenbasis-Datei 298*cdf0e10cSrcweir aDataBaseFile = aName; 299*cdf0e10cSrcweir } 300*cdf0e10cSrcweir else if( 'D' == aFirstChar ) 301*cdf0e10cSrcweir { // Name der Docu-Datei f"ur das API 302*cdf0e10cSrcweir // aDocuFile = aName; 303*cdf0e10cSrcweir } 304*cdf0e10cSrcweir else if( 'C' == aFirstChar ) 305*cdf0e10cSrcweir { // Name der cxx-Datei 306*cdf0e10cSrcweir // aCxxFile = aName; 307*cdf0e10cSrcweir } 308*cdf0e10cSrcweir else if( 'H' == aFirstChar ) 309*cdf0e10cSrcweir { // Name der hxx-Datei 310*cdf0e10cSrcweir // aHxxFile = aName; 311*cdf0e10cSrcweir } 312*cdf0e10cSrcweir else if( 'c' == aFirstChar ) 313*cdf0e10cSrcweir { // Name der C-Header-Datei 314*cdf0e10cSrcweir // aCSourceFile = aName; 315*cdf0e10cSrcweir } 316*cdf0e10cSrcweir else if( 'h' == aFirstChar ) 317*cdf0e10cSrcweir { // Name der C-Header-Datei 318*cdf0e10cSrcweir // aCHeaderFile = aName; 319*cdf0e10cSrcweir } 320*cdf0e10cSrcweir else if( 't' == aFirstChar ) 321*cdf0e10cSrcweir { // Name der Info-Datei 322*cdf0e10cSrcweir // aCallingFile = aName; 323*cdf0e10cSrcweir } 324*cdf0e10cSrcweir else if( 'm' == aFirstChar ) 325*cdf0e10cSrcweir { // Name der Info-Datei 326*cdf0e10cSrcweir aTargetFile = aName; 327*cdf0e10cSrcweir } 328*cdf0e10cSrcweir else if( 'r' == aFirstChar ) 329*cdf0e10cSrcweir { // Name der Resource-Datei 330*cdf0e10cSrcweir // aSrcFile = aName; 331*cdf0e10cSrcweir } 332*cdf0e10cSrcweir else if( 'z' == aFirstChar ) 333*cdf0e10cSrcweir { // Name der HelpId-Datei 334*cdf0e10cSrcweir aHelpIdFile = aName; 335*cdf0e10cSrcweir } 336*cdf0e10cSrcweir else if( 'y' == aFirstChar ) 337*cdf0e10cSrcweir { // Name der CSV-Datei 338*cdf0e10cSrcweir aCSVFile = aName; 339*cdf0e10cSrcweir } 340*cdf0e10cSrcweir else if( 'x' == aFirstChar ) 341*cdf0e10cSrcweir { // Name der IDL-Datei fuer die CSV-Datei 342*cdf0e10cSrcweir aExportFile = aName; 343*cdf0e10cSrcweir } 344*cdf0e10cSrcweir else 345*cdf0e10cSrcweir { 346*cdf0e10cSrcweir printf( 347*cdf0e10cSrcweir "unknown switch: %s\n", 348*cdf0e10cSrcweir rtl::OUStringToOString( 349*cdf0e10cSrcweir aParam, RTL_TEXTENCODING_UTF8).getStr()); 350*cdf0e10cSrcweir exit( -1 ); 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir } 353*cdf0e10cSrcweir else if( aParam.EqualsIgnoreCaseAscii( "help" ) || aParam.EqualsIgnoreCaseAscii( "?" ) ) 354*cdf0e10cSrcweir { // Hilfe 355*cdf0e10cSrcweir printf( "%s", CommandLineSyntax ); 356*cdf0e10cSrcweir } 357*cdf0e10cSrcweir else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) ) 358*cdf0e10cSrcweir { 359*cdf0e10cSrcweir nVerbosity = 0; 360*cdf0e10cSrcweir } 361*cdf0e10cSrcweir else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) ) 362*cdf0e10cSrcweir { 363*cdf0e10cSrcweir nVerbosity = 2; 364*cdf0e10cSrcweir } 365*cdf0e10cSrcweir else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) ) 366*cdf0e10cSrcweir { // Hilfe 367*cdf0e10cSrcweir int j = 0; 368*cdf0e10cSrcweir while(SyntaxStrings[j]) 369*cdf0e10cSrcweir printf("%s\n",SyntaxStrings[j++]); 370*cdf0e10cSrcweir } 371*cdf0e10cSrcweir else if( aParam.EqualsIgnoreCaseAscii( "i", 0, 1 ) ) 372*cdf0e10cSrcweir { // Include-Pfade definieren 373*cdf0e10cSrcweir String aName( aParam.Copy( 1 ) ); 374*cdf0e10cSrcweir if( aPath.Len() ) 375*cdf0e10cSrcweir aPath += DirEntry::GetSearchDelimiter(); 376*cdf0e10cSrcweir aPath += aName; 377*cdf0e10cSrcweir } 378*cdf0e10cSrcweir else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) ) 379*cdf0e10cSrcweir { // erste Zeile im *.srs File 380*cdf0e10cSrcweir if( aList.GetObject( i +1 ) ) 381*cdf0e10cSrcweir { 382*cdf0e10cSrcweir aSrsLine = ByteString( *aList.GetObject( i +1 ), RTL_TEXTENCODING_UTF8 ); 383*cdf0e10cSrcweir i++; 384*cdf0e10cSrcweir } 385*cdf0e10cSrcweir } 386*cdf0e10cSrcweir else 387*cdf0e10cSrcweir { 388*cdf0e10cSrcweir // temporary compatibility hack 389*cdf0e10cSrcweir printf( 390*cdf0e10cSrcweir "unknown switch: %s\n", 391*cdf0e10cSrcweir rtl::OUStringToOString( 392*cdf0e10cSrcweir aParam, RTL_TEXTENCODING_UTF8).getStr()); 393*cdf0e10cSrcweir exit( -1 ); 394*cdf0e10cSrcweir } 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir else 397*cdf0e10cSrcweir { 398*cdf0e10cSrcweir aInFileList.Insert( new String( aParam ), LIST_APPEND ); 399*cdf0e10cSrcweir } 400*cdf0e10cSrcweir } 401*cdf0e10cSrcweir else 402*cdf0e10cSrcweir { 403*cdf0e10cSrcweir printf( "%s", CommandLineSyntax ); 404*cdf0e10cSrcweir } 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir String * pStr = aList.First(); 407*cdf0e10cSrcweir while( pStr ) 408*cdf0e10cSrcweir { 409*cdf0e10cSrcweir delete pStr; 410*cdf0e10cSrcweir pStr = aList.Next(); 411*cdf0e10cSrcweir } 412*cdf0e10cSrcweir 413*cdf0e10cSrcweir ByteString aInc( getenv( "INCLUDE" ) ); 414*cdf0e10cSrcweir // Include Environmentvariable anhaengen 415*cdf0e10cSrcweir if( aInc.Len() ) 416*cdf0e10cSrcweir { 417*cdf0e10cSrcweir if( aPath.Len() ) 418*cdf0e10cSrcweir aPath += DirEntry::GetSearchDelimiter(); 419*cdf0e10cSrcweir aPath += String::CreateFromAscii( aInc.GetBuffer() ); 420*cdf0e10cSrcweir } 421*cdf0e10cSrcweir } 422*cdf0e10cSrcweir 423*cdf0e10cSrcweir /************************************************************************* 424*cdf0e10cSrcweir |* 425*cdf0e10cSrcweir |* SvCommand::~SvCommand() 426*cdf0e10cSrcweir |* 427*cdf0e10cSrcweir |* Beschreibung 428*cdf0e10cSrcweir |* 429*cdf0e10cSrcweir *************************************************************************/ 430*cdf0e10cSrcweir SvCommand::~SvCommand() 431*cdf0e10cSrcweir { 432*cdf0e10cSrcweir // ByteString Liste freigeben 433*cdf0e10cSrcweir String * pStr; 434*cdf0e10cSrcweir while( NULL != (pStr = aInFileList.Remove()) ) 435*cdf0e10cSrcweir delete pStr; 436*cdf0e10cSrcweir } 437*cdf0e10cSrcweir 438