diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-05-06 15:13:08 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-05-06 15:13:08 +0200 |
commit | 581f9cd397846e170ec2fdbf4521a6a040852b94 (patch) | |
tree | 24bbf918622a72fffb3d9d3a64d4b45089908b49 /soldep/inc | |
parent | 73c36a2ac1535ca8984165ce2719a6a22e036e9d (diff) |
CWS gnumake2: don't create static libs in tools
Diffstat (limited to 'soldep/inc')
-rw-r--r-- | soldep/inc/dep.hxx | 2 | ||||
-rw-r--r-- | soldep/inc/prodmap.hxx | 4 | ||||
-rw-r--r-- | soldep/inc/soldep/appdef.hxx (renamed from soldep/inc/appdef.hxx) | 0 | ||||
-rw-r--r-- | soldep/inc/soldep/command.hxx | 165 | ||||
-rw-r--r-- | soldep/inc/soldep/connctr.hxx | 4 | ||||
-rw-r--r-- | soldep/inc/soldep/listmacr.hxx | 60 | ||||
-rw-r--r-- | soldep/inc/soldep/objwin.hxx | 2 | ||||
-rw-r--r-- | soldep/inc/soldep/prj.hxx | 15 | ||||
-rw-r--r-- | soldep/inc/soldep/sstring.hxx | 105 |
9 files changed, 339 insertions, 18 deletions
diff --git a/soldep/inc/dep.hxx b/soldep/inc/dep.hxx index f7ef15ace882..4e7d4b80ec3e 100644 --- a/soldep/inc/dep.hxx +++ b/soldep/inc/dep.hxx @@ -28,7 +28,7 @@ #ifndef _DEP_HXX #define _DEP_HXX -#include <bootstrp/sstring.hxx> +#include <soldep/sstring.hxx> class SByteExtStringList : public SByteStringList { diff --git a/soldep/inc/prodmap.hxx b/soldep/inc/prodmap.hxx index 97b554b9e52d..ac39b97b5bc3 100644 --- a/soldep/inc/prodmap.hxx +++ b/soldep/inc/prodmap.hxx @@ -28,9 +28,7 @@ #ifndef PRODUCT_MAPPER_HXX #define PRODUCT_MAPPER_HXX -#ifndef _SSTRING_HXX -#include <bootstrp/sstring.hxx> -#endif +#include <soldep/sstring.hxx> class GenericInformation; class GenericInformationList; diff --git a/soldep/inc/appdef.hxx b/soldep/inc/soldep/appdef.hxx index cc8d5d0f2f8b..cc8d5d0f2f8b 100644 --- a/soldep/inc/appdef.hxx +++ b/soldep/inc/soldep/appdef.hxx diff --git a/soldep/inc/soldep/command.hxx b/soldep/inc/soldep/command.hxx new file mode 100644 index 000000000000..e0d8f1e39aeb --- /dev/null +++ b/soldep/inc/soldep/command.hxx @@ -0,0 +1,165 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef COMMAND_HXX +#define COMMAND_HXX + +#include <iostream> + +#include <tools/stream.hxx> +#define STRLEN 100 +#ifndef UNX +#define TMPNAME "\\command.tmp" +#else +#define TMPNAME "/tmp/command.tmp" +#endif + +/** Different types of spawnable programs +*/ +enum ExeType +{ + EXE, /// programm is a native executable + BAT, /// programm is a DOS-Batch + BTM /// programm is a 4DOS-Batch +}; + +#define COMMAND_NOTFOUND 0x0001 +#define COMMAND_TOOBIG 0x0002 +#define COMMAND_INVALID 0x0004 +#define COMMAND_NOEXEC 0x0008 +#define COMMAND_NOMEM 0x0010 +#define COMMAND_UNKNOWN 0x0020 + +#ifdef WNT +#define COMMAND_SHELL "4nt.exe" +#endif +#ifdef OS2 +#define COMMAND_SHELL "4os2.exe" +#endif +#ifdef UNX +#define COMMAND_SHELL "csh" +#endif + +class CommandLine; +class LogWindow; + +class CommandLine +{ +friend class ChildProcess; +private: + char *CommandBuffer; + char *ComShell; + char **ppArgv; + BOOL bTmpWrite; + +public: + CommandLine(BOOL bTmpWrite = FALSE); + CommandLine(const char *, BOOL bTmpWrite = FALSE); + CommandLine(const CommandLine&, BOOL bTmpWrite = FALSE); + virtual ~CommandLine(); + + int nArgc; + + CommandLine& operator=(const CommandLine&); + CommandLine& operator=(const char *); + void BuildCommand(const char *); + char** GetCommand(void) { return ppArgv; } + void Strtokens(const char *); + void Print(); +}; + +static ByteString thePath( "PATH" ); + +/** Declares and spawns a child process. + The spawned programm could be a native executable or a schell script. +*/ +class CCommand +{ +private: + ByteString aCommandLine; + ByteString aCommand; + char *pArgv; + char **ppArgv; + ULONG nArgc; + int nError; + +protected: + void ImplInit(); + void Initpp( ULONG nCount, ByteString &rStr ); + +public: + /** Creates the process specified without spawning it + @param rString specifies the programm or shell scrip + */ + CCommand( ByteString &rString ); + + /** Creates the process specified without spawning it + @param pChar specifies the programm or shell scrip + */ + CCommand( const char *pChar ); + + /** Try to find the given programm in specified path + @param sEnv specifies the current search path, defaulted by environment + @param sItem specifies the system shell + @return the Location (when programm was found) + */ + static ByteString Search( ByteString sEnv = thePath, + ByteString sItem = COMMAND_SHELL ); + + /** Spawns the Process + @return 0 when spawned without errors, otherwise a error code + */ + operator int(); + + ByteString GetCommandLine_() { return aCommandLine; } + ByteString GetCommand() { return aCommand; } + + char** GetCommandStr() { return ppArgv; } +}; + +#define COMMAND_EXECUTE_WINDOW 0x0000001 +#define COMMAND_EXECUTE_CONSOLE 0x0000002 +#define COMMAND_EXECUTE_HIDDEN 0x0000004 +#define COMMAND_EXECUTE_START 0x0000008 +#define COMMAND_EXECUTE_WAIT 0x0000010 +#define COMMAND_EXECUTE_REMOTE 0x1000000 + +typedef ULONG CommandBits; + +/** Allowes to spawn programms hidden, waiting etc. + @see CCommand +*/ +class CCommandd : public CCommand +{ + CommandBits nFlag; +public: + CCommandd( ByteString &rString, CommandBits nBits ); + CCommandd( const char *pChar, CommandBits nBits ); + operator int(); +}; + +#endif diff --git a/soldep/inc/soldep/connctr.hxx b/soldep/inc/soldep/connctr.hxx index 40ef986245e5..1982e252acf8 100644 --- a/soldep/inc/soldep/connctr.hxx +++ b/soldep/inc/soldep/connctr.hxx @@ -30,10 +30,8 @@ #define _FMRWRK_CONNCTR_HXX -#ifndef _SV_WINDOW_HXX #include <vcl/window.hxx> -#endif -#include <bootstrp/listmacr.hxx> +#include <soldep/listmacr.hxx> #include <tools/stream.hxx> class DepWin; diff --git a/soldep/inc/soldep/listmacr.hxx b/soldep/inc/soldep/listmacr.hxx new file mode 100644 index 000000000000..8c678ff32275 --- /dev/null +++ b/soldep/inc/soldep/listmacr.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _LISTMACR_HXX +#define _LISTMACR_HXX + +#define DECL_DEST_LIST( TmpListType, ListType, PointerType ) \ +DECLARE_LIST(TmpListType, PointerType) \ +class ListType : public TmpListType \ +{ \ +public: \ + void ClearAndDelete() \ + { \ + while ( Count()) { \ + PointerType pTmp = GetObject(( ULONG ) 0 ); \ + delete pTmp; \ + Remove(( ULONG ) 0 ); \ + } \ + } \ + ~ListType() \ + { \ + ClearAndDelete(); \ + } \ +}; \ + +#endif + + + + + + + + + + diff --git a/soldep/inc/soldep/objwin.hxx b/soldep/inc/soldep/objwin.hxx index e7bc94826858..b3170a76ce11 100644 --- a/soldep/inc/soldep/objwin.hxx +++ b/soldep/inc/soldep/objwin.hxx @@ -33,7 +33,7 @@ #endif #include <vcl/menu.hxx> #include <vcl/timer.hxx> -#include <bootstrp/listmacr.hxx> +#include <soldep/listmacr.hxx> #include <tools/stream.hxx> #include <soldep/connctr.hxx> diff --git a/soldep/inc/soldep/prj.hxx b/soldep/inc/soldep/prj.hxx index b04d6ac1fe4e..caca67bb4d17 100644 --- a/soldep/inc/soldep/prj.hxx +++ b/soldep/inc/soldep/prj.hxx @@ -30,9 +30,7 @@ #include <tools/fsys.hxx> #include <tools/stream.hxx> -#ifndef _LISTMACR_HXX -#include <bootstrp/listmacr.hxx> -#endif +#include <soldep/listmacr.hxx> #include <vos/mutex.hxx> #include <tools/string.hxx> @@ -401,8 +399,7 @@ public: Star(); Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); Star( SolarFileList *pSolarFiles ); - Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); + Star( GenericInformationList *pStandLst, ByteString &rVersion ); ~Star(); @@ -425,10 +422,8 @@ public: BOOL NeedsUpdate(); SolarFileList* NeedsFilesForUpdate(); void ReplaceFileEntry( StarFileList *pStarFiles, StarFile* pFile ); - void UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bRead = FALSE, - BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); - void FullReload( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bRead = FALSE, - BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); + void UpdateFileList( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bRead = FALSE ); + void FullReload( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bRead = FALSE ); void GenerateFileLoadList( SolarFileList *pSolarFiles ); BOOL CheckFileLoadList(SolarFileList *pSolarFiles); @@ -460,7 +455,7 @@ public: StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, ByteString &rMinor, - BOOL bReadComments = FALSE, BOOL bLocal = FALSE, const char *pSourceRoot = NULL ); + BOOL bReadComments = FALSE ); void CleanUp(); diff --git a/soldep/inc/soldep/sstring.hxx b/soldep/inc/soldep/sstring.hxx new file mode 100644 index 000000000000..933770887e37 --- /dev/null +++ b/soldep/inc/soldep/sstring.hxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SSTRING_HXX +#define _SSTRING_HXX + +#include <tools/string.hxx> +#include <tools/list.hxx> + +#define NOT_THERE LIST_ENTRY_NOTFOUND + +#define SStringList SUniStringList +#define StringList UniStringList + +DECLARE_LIST( ByteStringList, ByteString* ) +DECLARE_LIST( UniStringList, UniString* ) + +class SvStream; + +// --------------------- +// - class SStringList - +// --------------------- + +class SByteStringList : public ByteStringList +{ +public: + SByteStringList(); + ~SByteStringList(); + + // neuen ByteString in Liste einfuegen + ULONG PutString( ByteString* ); + ByteString* RemoveString( const ByteString& rName ); + + // Position des ByteString in Liste, wenn nicht enthalten, dann + // return = NOT_THERE + ULONG IsString( ByteString* ); + + // Vorgaenger ermitteln ( auch wenn selbst noch nicht in + // Liste enthalten + ULONG GetPrevString( ByteString* ); + void CleanUp(); + + SByteStringList& operator<< ( SvStream& rStream ); + SByteStringList& operator>> ( SvStream& rStream ); +}; + +// --------------------- +// - class SUniStringList - +// --------------------- + +class SUniStringList : public UniStringList +{ +public: + SUniStringList(); + ~SUniStringList(); + + // neuen UniString in Liste einfuegen + ULONG PutString( UniString* ); + UniString* RemoveString( const UniString& rName ); + + // Position des UniString in Liste, wenn nicht enthalten, dann + // return = NOT_THERE + ULONG IsString( UniString* ); + + // Vorgaenger ermitteln ( auch wenn selbst noch nicht in + // Liste enthalten + ULONG GetPrevString( UniString* ); +}; + +class Text +{ +protected: + String aString; + +public: + Text( char* pChar ); + Text( String &rStr ) { aString = rStr; } + void Stderr(); +}; + +#endif |