mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Get rid of pnUtils PCH stuff.
--HG-- rename : Sources/Plasma/NucleusLib/pnUtils/Private/Unix/pnUtUxStr.cpp => Sources/Plasma/NucleusLib/pnUtils/Unix/pnUtUxStr.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Unix/pnUtUxSync.cpp => Sources/Plasma/NucleusLib/pnUtils/Unix/pnUtUxSync.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Unix/pnUtUxUuid.cpp => Sources/Plasma/NucleusLib/pnUtils/Unix/pnUtUxUuid.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/W32Int.h => Sources/Plasma/NucleusLib/pnUtils/Win32/W32Int.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Addr.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Addr.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Dll.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Dll.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Misc.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Path.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Str.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Str.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Sync.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Sync.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Time.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Time.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Uuid.cpp => Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAddr.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAddr.h => Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAllIncludes.h => Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtArray.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h => Sources/Plasma/NucleusLib/pnUtils/pnUtArray.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtBase64.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBase64.h => Sources/Plasma/NucleusLib/pnUtils/pnUtBase64.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtBigNum.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtBigNum.h => Sources/Plasma/NucleusLib/pnUtils/pnUtBigNum.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtCmd.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCmd.h => Sources/Plasma/NucleusLib/pnUtils/pnUtCmd.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCoreLib.h => Sources/Plasma/NucleusLib/pnUtils/pnUtCoreLib.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtCrypt.h => Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtHash.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtHash.h => Sources/Plasma/NucleusLib/pnUtils/pnUtHash.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtList.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtList.h => Sources/Plasma/NucleusLib/pnUtils/pnUtList.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMath.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtMath.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMath.h => Sources/Plasma/NucleusLib/pnUtils/pnUtMath.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMisc.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtMisc.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtMisc.h => Sources/Plasma/NucleusLib/pnUtils/pnUtMisc.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPath.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtPath.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPath.h => Sources/Plasma/NucleusLib/pnUtils/pnUtPath.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPragma.h => Sources/Plasma/NucleusLib/pnUtils/pnUtPragma.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtPriQ.h => Sources/Plasma/NucleusLib/pnUtils/pnUtPriQ.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRand.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtRand.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRand.h => Sources/Plasma/NucleusLib/pnUtils/pnUtRand.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtRef.h => Sources/Plasma/NucleusLib/pnUtils/pnUtRef.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSkipList.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSkipList.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSort.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSort.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtSpareList.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSpareList.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSpareList.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtStr.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtStr.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtStr.h => Sources/Plasma/NucleusLib/pnUtils/pnUtStr.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSync.h => Sources/Plasma/NucleusLib/pnUtils/pnUtSync.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTime.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtTime.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTime.h => Sources/Plasma/NucleusLib/pnUtils/pnUtTime.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTls.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtTls.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTls.h => Sources/Plasma/NucleusLib/pnUtils/pnUtTls.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtTypes.h => Sources/Plasma/NucleusLib/pnUtils/pnUtTypes.h rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.cpp => Sources/Plasma/NucleusLib/pnUtils/pnUtUuid.cpp rename : Sources/Plasma/NucleusLib/pnUtils/Private/pnUtUuid.h => Sources/Plasma/NucleusLib/pnUtils/pnUtUuid.h
This commit is contained in:
@ -2,88 +2,81 @@ include_directories("../../CoreLib")
|
|||||||
include_directories("../../NucleusLib")
|
include_directories("../../NucleusLib")
|
||||||
|
|
||||||
set(pnUtils_HEADERS
|
set(pnUtils_HEADERS
|
||||||
Intern.h
|
|
||||||
Pch.h
|
Pch.h
|
||||||
pnUtils.h
|
pnUtils.h
|
||||||
)
|
pnUtCoreLib.h
|
||||||
|
pnUtAddr.h
|
||||||
set(pnUtils_PRIVATE
|
pnUtAllIncludes.h
|
||||||
Private/pnUtAddr.h
|
pnUtArray.h
|
||||||
Private/pnUtAddr.cpp
|
pnUtBase64.h
|
||||||
Private/pnUtAllIncludes.h
|
pnUtBigNum.h
|
||||||
Private/pnUtArray.h
|
pnUtCmd.h
|
||||||
Private/pnUtArray.cpp
|
pnUtCrypt.h
|
||||||
Private/pnUtBase64.h
|
pnUtHash.h
|
||||||
Private/pnUtBase64.cpp
|
pnUtList.h
|
||||||
Private/pnUtBigNum.h
|
pnUtMath.h
|
||||||
Private/pnUtBigNum.cpp
|
pnUtMisc.h
|
||||||
Private/pnUtCmd.h
|
pnUtPath.h
|
||||||
Private/pnUtCmd.cpp
|
pnUtPragma.h
|
||||||
Private/pnUtCoreLib.h
|
pnUtPriQ.h
|
||||||
Private/pnUtCrypt.h
|
pnUtRand.h
|
||||||
Private/pnUtCrypt.cpp
|
pnUtRef.h
|
||||||
Private/pnUtHash.h
|
pnUtSkipList.h
|
||||||
Private/pnUtHash.cpp
|
pnUtSort.h
|
||||||
Private/pnUtList.h
|
pnUtSpareList.h
|
||||||
Private/pnUtList.cpp
|
pnUtStr.h
|
||||||
Private/pnUtMath.h
|
pnUtSync.h
|
||||||
Private/pnUtMath.cpp
|
pnUtTime.h
|
||||||
Private/pnUtMisc.h
|
pnUtTls.h
|
||||||
Private/pnUtMisc.cpp
|
pnUtUuid.h
|
||||||
Private/pnUtPath.h
|
|
||||||
Private/pnUtPath.cpp
|
|
||||||
Private/pnUtPragma.h
|
|
||||||
Private/pnUtPriQ.h
|
|
||||||
Private/pnUtRand.h
|
|
||||||
Private/pnUtRand.cpp
|
|
||||||
Private/pnUtRef.h
|
|
||||||
Private/pnUtSkipList.h
|
|
||||||
Private/pnUtSort.h
|
|
||||||
Private/pnUtSpareList.h
|
|
||||||
Private/pnUtSpareList.cpp
|
|
||||||
Private/pnUtStr.h
|
|
||||||
Private/pnUtStr.cpp
|
|
||||||
Private/pnUtSubst.h
|
|
||||||
Private/pnUtSubst.cpp
|
|
||||||
Private/pnUtSync.h
|
|
||||||
Private/pnUtTime.h
|
|
||||||
Private/pnUtTime.cpp
|
|
||||||
Private/pnUtTls.h
|
|
||||||
Private/pnUtTls.cpp
|
|
||||||
Private/pnUtUuid.h
|
|
||||||
Private/pnUtUuid.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(pnUtils_SOURCES
|
set(pnUtils_SOURCES
|
||||||
pnUtils.cpp
|
pnUtAddr.cpp
|
||||||
|
pnUtArray.cpp
|
||||||
|
pnUtBase64.cpp
|
||||||
|
pnUtBigNum.cpp
|
||||||
|
pnUtCmd.cpp
|
||||||
|
pnUtHash.cpp
|
||||||
|
pnUtList.cpp
|
||||||
|
pnUtMath.cpp
|
||||||
|
pnUtMisc.cpp
|
||||||
|
pnUtPath.cpp
|
||||||
|
pnUtRand.cpp
|
||||||
|
pnUtSpareList.cpp
|
||||||
|
pnUtStr.cpp
|
||||||
|
pnUtTime.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(pnUtils_WIN32
|
set(pnUtils_WIN32
|
||||||
Private/Win32/pnUtW32Addr.cpp
|
Win32/pnUtW32Addr.cpp
|
||||||
Private/Win32/pnUtW32Misc.cpp
|
Win32/pnUtW32Misc.cpp
|
||||||
Private/Win32/pnUtW32Path.cpp
|
Win32/pnUtW32Path.cpp
|
||||||
Private/Win32/pnUtW32Str.cpp
|
Win32/pnUtW32Str.cpp
|
||||||
Private/Win32/pnUtW32Sync.cpp
|
Win32/pnUtW32Sync.cpp
|
||||||
Private/Win32/pnUtW32Time.cpp
|
Win32/pnUtW32Time.cpp
|
||||||
Private/Win32/pnUtW32Uuid.cpp
|
Win32/pnUtW32Uuid.cpp
|
||||||
|
|
||||||
|
pnUtCrypt.cpp
|
||||||
|
pnUtTls.cpp
|
||||||
|
pnUtUuid.cpp
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(pnUtils_UNIX
|
set(pnUtils_UNIX
|
||||||
Private/Unix/pnUtUxStr.cpp
|
Unix/pnUtUxStr.cpp
|
||||||
Private/Unix/pnUtUxSync.cpp
|
#Unix/pnUtUxSync.cpp
|
||||||
Private/Unix/pnUtUxUuid.cpp
|
#Unix/pnUtUxUuid.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(pnUtils STATIC ${pnUtils_HEADERS} ${pnUtils_PRIVATE} ${pnUtils_SOURCES}
|
add_library(pnUtils STATIC ${pnUtils_HEADERS} ${pnUtils_SOURCES}
|
||||||
${pnUtils_UNIX} ${pnUtils_WIN32})
|
${pnUtils_UNIX} ${pnUtils_WIN32})
|
||||||
|
|
||||||
source_group("Header Files" FILES ${pnUtils_HEADERS})
|
source_group("Header Files" FILES ${pnUtils_HEADERS})
|
||||||
source_group("Source Files" FILES ${pnUtils_SOURCES})
|
source_group("Source Files" FILES ${pnUtils_SOURCES})
|
||||||
source_group("Private" FILES ${pnUtils_PRIVATE})
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
source_group("Private\\Win32" FILES ${pnUtils_WIN32})
|
source_group("Win32" FILES ${pnUtils_WIN32})
|
||||||
else()
|
else()
|
||||||
source_group("Private\\Unix" FILES ${pnUtils_UNIX})
|
source_group("Unix" FILES ${pnUtils_UNIX})
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
/*==LICENSE==*
|
|
||||||
|
|
||||||
CyanWorlds.com Engine - MMOG client, server and tools
|
|
||||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Additional permissions under GNU GPL version 3 section 7
|
|
||||||
|
|
||||||
If you modify this Program, or any covered work, by linking or
|
|
||||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
|
||||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
|
||||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
|
||||||
(or a modified version of those libraries),
|
|
||||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
|
||||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
|
||||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
|
||||||
licensors of this Program grant you additional
|
|
||||||
permission to convey the resulting work. Corresponding Source for a
|
|
||||||
non-source form of such a combination shall include the source code for
|
|
||||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
|
||||||
work.
|
|
||||||
|
|
||||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|
||||||
or by snail mail at:
|
|
||||||
Cyan Worlds, Inc.
|
|
||||||
14617 N Newport Hwy
|
|
||||||
Mead, WA 99021
|
|
||||||
|
|
||||||
*==LICENSE==*/
|
|
||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Intern.h
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_INTERN_H
|
|
||||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Intern.h included more than once"
|
|
||||||
#endif
|
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_INTERN_H
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* Crypt
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
namespace Crypt {
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
class KeyBase {
|
|
||||||
public:
|
|
||||||
virtual void Codec (bool encrypt, ARRAY(uint8_t) * dest, unsigned sourceBytes, const void * sourceData) = 0;
|
|
||||||
virtual unsigned GetBlockSize () const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Crypt
|
|
@ -45,14 +45,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PCH_H
|
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PCH_H
|
||||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Pch.h included more than once"
|
|
||||||
#endif
|
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PCH_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PCH_H
|
||||||
|
|
||||||
#include "Private/pnUtAllIncludes.h"
|
#include "pnUtCoreLib.h" // must be first in list
|
||||||
#include "Intern.h"
|
#include "pnUtPragma.h"
|
||||||
|
|
||||||
#include "pnProduct/pnProduct.h"
|
#include "pnProduct/pnProduct.h"
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
@ -66,4 +63,4 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <malloc.h> // _alloca
|
#endif
|
||||||
|
@ -1,302 +0,0 @@
|
|||||||
/*==LICENSE==*
|
|
||||||
|
|
||||||
CyanWorlds.com Engine - MMOG client, server and tools
|
|
||||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Additional permissions under GNU GPL version 3 section 7
|
|
||||||
|
|
||||||
If you modify this Program, or any covered work, by linking or
|
|
||||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
|
||||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
|
||||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
|
||||||
(or a modified version of those libraries),
|
|
||||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
|
||||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
|
||||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
|
||||||
licensors of this Program grant you additional
|
|
||||||
permission to convey the resulting work. Corresponding Source for a
|
|
||||||
non-source form of such a combination shall include the source code for
|
|
||||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
|
||||||
work.
|
|
||||||
|
|
||||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|
||||||
or by snail mail at:
|
|
||||||
Cyan Worlds, Inc.
|
|
||||||
14617 N Newport Hwy
|
|
||||||
Mead, WA 99021
|
|
||||||
|
|
||||||
*==LICENSE==*/
|
|
||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
#include "../Pch.h"
|
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
#define SUBST_BLOCK SubstParsedData<chartype>::SubstBlock<chartype>
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* Internal functions
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
template <typename chartype>
|
|
||||||
bool IVarSubstitute (
|
|
||||||
ARRAY(chartype) * dst,
|
|
||||||
const chartype src[],
|
|
||||||
unsigned varCount,
|
|
||||||
const chartype * varNames[], // [varCount]
|
|
||||||
const chartype * varValues[] // [varCount]
|
|
||||||
) {
|
|
||||||
ASSERT(dst);
|
|
||||||
ASSERT(src);
|
|
||||||
ASSERT(varNames);
|
|
||||||
ASSERT(varValues);
|
|
||||||
|
|
||||||
dst->Reserve(StrLen(src) * 5/4);
|
|
||||||
|
|
||||||
bool result = true;
|
|
||||||
while (*src) {
|
|
||||||
// Copy non-substituted strings and escape %% symbols
|
|
||||||
if ((*src != L'%') || (*++src == L'%')) {
|
|
||||||
dst->Push(*src++);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find variable definition
|
|
||||||
const chartype * varStart = src;
|
|
||||||
const chartype * varEnd = StrChr(varStart, L'%');
|
|
||||||
if (!varEnd) {
|
|
||||||
// Skip % character and continue
|
|
||||||
result = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate variable name length
|
|
||||||
chartype varBuffer[256];
|
|
||||||
if (varEnd - varStart >= arrsize(varBuffer)) {
|
|
||||||
result = false;
|
|
||||||
src = varEnd + 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy variable name excluding trailing '%'
|
|
||||||
StrCopy(varBuffer, varStart, varEnd - varStart + 1);
|
|
||||||
src = varEnd + 1;
|
|
||||||
|
|
||||||
// Find the variable value and perform substitution
|
|
||||||
bool found = false;
|
|
||||||
for (unsigned i = 0; i < varCount; ++i) {
|
|
||||||
if (StrCmp(varBuffer, varNames[i]))
|
|
||||||
continue;
|
|
||||||
dst->Add(varValues[i], StrLen(varValues[i]));
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check that variable definition exists
|
|
||||||
result = result && found;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Terminate string
|
|
||||||
dst->Push(0);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
template <typename chartype>
|
|
||||||
bool IParseForSubst (
|
|
||||||
SubstParsedData<chartype> * dest,
|
|
||||||
const chartype src[]
|
|
||||||
) {
|
|
||||||
const chartype * current = src;
|
|
||||||
bool result = true;
|
|
||||||
while (*current) {
|
|
||||||
// Copy non-substituted strings and escape %% symbols
|
|
||||||
if ((*current != L'%') || (*++current == L'%')) {
|
|
||||||
current++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find variable definition
|
|
||||||
const chartype * varStart = current;
|
|
||||||
const chartype * varEnd = StrChr(varStart, L'%');
|
|
||||||
if (!varEnd) {
|
|
||||||
// Skip % character and continue
|
|
||||||
result = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We've found a variable, copy the current data to a new object
|
|
||||||
if (current != src) {
|
|
||||||
int strLen = (current - src) - 1;
|
|
||||||
SUBST_BLOCK * block = new SUBST_BLOCK;
|
|
||||||
block->isVar = false;
|
|
||||||
block->strLen = strLen;
|
|
||||||
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
|
|
||||||
memcpy(block->data, src, strLen * sizeof(chartype));
|
|
||||||
|
|
||||||
dest->blocks.Add(block);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate variable name length
|
|
||||||
chartype varBuffer[256];
|
|
||||||
if (varEnd - varStart >= arrsize(varBuffer)) {
|
|
||||||
result = false;
|
|
||||||
src = current = varEnd + 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy variable name excluding trailing '%'
|
|
||||||
int strLen = (varEnd - varStart);
|
|
||||||
SUBST_BLOCK * block = new SUBST_BLOCK;
|
|
||||||
block->isVar = true;
|
|
||||||
block->strLen = strLen;
|
|
||||||
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
|
|
||||||
memcpy(block->data, varStart, strLen * sizeof(chartype));
|
|
||||||
|
|
||||||
dest->blocks.Add(block);
|
|
||||||
|
|
||||||
src = current = varEnd + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check and see if there's any data remaining
|
|
||||||
if (current != src) {
|
|
||||||
int strLen = (current - src);
|
|
||||||
SUBST_BLOCK * block = new SUBST_BLOCK;
|
|
||||||
block->isVar = false;
|
|
||||||
block->strLen = strLen;
|
|
||||||
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
|
|
||||||
memcpy(block->data, src, strLen * sizeof(chartype));
|
|
||||||
|
|
||||||
dest->blocks.Add(block);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
template <typename chartype>
|
|
||||||
bool IVarSubstPreParsed (
|
|
||||||
ARRAY(chartype) * dst,
|
|
||||||
const SubstParsedData<chartype> * src,
|
|
||||||
unsigned varCount,
|
|
||||||
const chartype * varNames[], // [varCount]
|
|
||||||
const chartype * varValues[] // [varCount]
|
|
||||||
) {
|
|
||||||
unsigned approxTotalSize = 0;
|
|
||||||
for (unsigned i = 0; i < src->blocks.Count(); ++i) {
|
|
||||||
approxTotalSize += src->blocks[i]->strLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
dst->Reserve(approxTotalSize * 5/4);
|
|
||||||
|
|
||||||
bool foundAll = true;
|
|
||||||
for (unsigned blockIndex = 0; blockIndex < src->blocks.Count(); ++blockIndex) {
|
|
||||||
SUBST_BLOCK * block = src->blocks[blockIndex];
|
|
||||||
if (block->isVar) {
|
|
||||||
bool found = false;
|
|
||||||
for (unsigned varIndex = 0; varIndex < varCount; ++varIndex) {
|
|
||||||
if (StrCmp(block->data, varNames[varIndex])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
dst->Add(varValues[varIndex], StrLen(varValues[varIndex]));
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
foundAll &= found;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dst->Add(block->data, block->strLen);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dst->Push(0);
|
|
||||||
|
|
||||||
return foundAll;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* Exports
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
bool ParseForSubst (
|
|
||||||
SubstParsedData<wchar_t> * dest,
|
|
||||||
const wchar_t src[]
|
|
||||||
) {
|
|
||||||
return IParseForSubst(dest, src);
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
bool ParseForSubst (
|
|
||||||
SubstParsedData<char> * dest,
|
|
||||||
const char src[]
|
|
||||||
) {
|
|
||||||
return IParseForSubst(dest, src);
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(wchar_t) * dst,
|
|
||||||
const wchar_t src[],
|
|
||||||
unsigned varCount,
|
|
||||||
const wchar_t * varNames[], // [varCount]
|
|
||||||
const wchar_t * varValues[] // [varCount]
|
|
||||||
) {
|
|
||||||
return IVarSubstitute(dst, src, varCount, varNames, varValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(char) * dst,
|
|
||||||
const char src[],
|
|
||||||
unsigned varCount,
|
|
||||||
const char * varNames[], // [varCount]
|
|
||||||
const char * varValues[] // [varCount]
|
|
||||||
) {
|
|
||||||
return IVarSubstitute(dst, src, varCount, varNames, varValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(wchar_t) * dst,
|
|
||||||
const SubstParsedData<wchar_t> * src,
|
|
||||||
unsigned varCount,
|
|
||||||
const wchar_t * varNames[], // [varCount]
|
|
||||||
const wchar_t * varValues[] // [varCount]
|
|
||||||
) {
|
|
||||||
return IVarSubstPreParsed(dst, src, varCount, varNames, varValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(char) * dst,
|
|
||||||
const SubstParsedData<char> * src,
|
|
||||||
unsigned varCount,
|
|
||||||
const char * varNames[], // [varCount]
|
|
||||||
const char * varValues[] // [varCount]
|
|
||||||
) {
|
|
||||||
return IVarSubstPreParsed(dst, src, varCount, varNames, varValues);
|
|
||||||
}
|
|
@ -1,119 +0,0 @@
|
|||||||
/*==LICENSE==*
|
|
||||||
|
|
||||||
CyanWorlds.com Engine - MMOG client, server and tools
|
|
||||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program 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 General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Additional permissions under GNU GPL version 3 section 7
|
|
||||||
|
|
||||||
If you modify this Program, or any covered work, by linking or
|
|
||||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
|
||||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
|
||||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
|
||||||
(or a modified version of those libraries),
|
|
||||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
|
||||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
|
||||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
|
||||||
licensors of this Program grant you additional
|
|
||||||
permission to convey the resulting work. Corresponding Source for a
|
|
||||||
non-source form of such a combination shall include the source code for
|
|
||||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
|
||||||
work.
|
|
||||||
|
|
||||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|
||||||
or by snail mail at:
|
|
||||||
Cyan Worlds, Inc.
|
|
||||||
14617 N Newport Hwy
|
|
||||||
Mead, WA 99021
|
|
||||||
|
|
||||||
*==LICENSE==*/
|
|
||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.h
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSUBST_H
|
|
||||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.h included more than once"
|
|
||||||
#endif
|
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSUBST_H
|
|
||||||
|
|
||||||
template<typename chartype>
|
|
||||||
struct SubstParsedData {
|
|
||||||
template<typename char_type>
|
|
||||||
struct SubstBlock {
|
|
||||||
bool isVar;
|
|
||||||
char_type * data;
|
|
||||||
unsigned strLen;
|
|
||||||
|
|
||||||
SubstBlock()
|
|
||||||
: isVar(false)
|
|
||||||
, data(nil)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
~SubstBlock() {
|
|
||||||
free(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ARRAY(SubstBlock<chartype>*) blocks;
|
|
||||||
|
|
||||||
~SubstParsedData() {
|
|
||||||
for (unsigned i = 0; i < blocks.Count(); ++i) {
|
|
||||||
SubstBlock<chartype> * block = blocks[i];
|
|
||||||
delete block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
bool ParseForSubst (
|
|
||||||
SubstParsedData<wchar_t> * dest,
|
|
||||||
const wchar_t src[]
|
|
||||||
);
|
|
||||||
bool ParseForSubst (
|
|
||||||
SubstParsedData<char> * dest,
|
|
||||||
const char src[]
|
|
||||||
);
|
|
||||||
|
|
||||||
// Return value is for validation purposes only; it may be ignored
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(wchar_t) * dst,
|
|
||||||
const wchar_t src[],
|
|
||||||
unsigned varCount,
|
|
||||||
const wchar_t * varNames[], // [varCount]
|
|
||||||
const wchar_t * varValues[] // [varCount]
|
|
||||||
);
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(char) * dst,
|
|
||||||
const char src[],
|
|
||||||
unsigned varCount,
|
|
||||||
const char * varNames[], // [varCount]
|
|
||||||
const char * varValues[] // [varCount]
|
|
||||||
);
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(wchar_t) * dst,
|
|
||||||
const SubstParsedData<wchar_t> * src,
|
|
||||||
unsigned varCount,
|
|
||||||
const wchar_t * varNames[], // [varCount]
|
|
||||||
const wchar_t * varValues[] // [varCount]
|
|
||||||
);
|
|
||||||
bool VarSubstitute (
|
|
||||||
ARRAY(char) * dst,
|
|
||||||
const SubstParsedData<char> * src,
|
|
||||||
unsigned varCount,
|
|
||||||
const char * varNames[], // [varCount]
|
|
||||||
const char * varValues[] // [varCount]
|
|
||||||
);
|
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../../Pch.h"
|
#include "../pnUtStr.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HS_BUILD_FOR_UNIX
|
#ifdef HS_BUILD_FOR_UNIX
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../../Pch.h"
|
#include "../pnUtSync.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
#ifdef HS_BUILD_FOR_UNIX
|
#ifdef HS_BUILD_FOR_UNIX
|
||||||
|
|
@ -45,9 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../../Pch.h"
|
#include "../pnUtUUID.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtAddr.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTADDR_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTADDR_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtArray.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
@ -45,11 +45,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTARRAY_H
|
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTARRAY_H
|
||||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtArray.h included more than once"
|
|
||||||
#endif
|
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTARRAY_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTARRAY_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtSort.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
@ -1081,3 +1081,4 @@ void TSortArray<T,C,K,OFFSET>::Sort () {
|
|||||||
SortKey(elem1) > SortKey(elem2)
|
SortKey(elem1) > SortKey(elem2)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtBase64.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTBASE64_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTBASE64_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtBigNum.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTBIGNUM_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTBIGNUM_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtCmd.h"
|
||||||
#pragma hdrstop
|
#include "pnUtMisc.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@ -61,7 +61,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#define TOGGLES L"+-"
|
#define TOGGLES L"+-"
|
||||||
#define ALL WHITESPACE FLAGS SEPARATORS TOGGLES
|
#define ALL WHITESPACE FLAGS SEPARATORS TOGGLES
|
||||||
|
|
||||||
|
#if HS_BUILD_FOR_WIN32
|
||||||
static const unsigned kMaxTokenLength = MAX_PATH;
|
static const unsigned kMaxTokenLength = MAX_PATH;
|
||||||
|
#else
|
||||||
|
static const unsigned kMaxTokenLength = 1024;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct CmdArgData {
|
struct CmdArgData {
|
||||||
CmdArgDef def;
|
CmdArgDef def;
|
@ -50,6 +50,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTCMD_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTCMD_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtArray.h"
|
||||||
|
#include "pnUtStr.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtCrypt.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
@ -50,6 +50,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTCRYPT_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTCRYPT_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtArray.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,9 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtHash.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
@ -91,4 +89,4 @@ const uint32_t CHashValue::s_hashTable[] = {
|
|||||||
0x4f23137b, 0x9dfd6434, 0xd1e25d94, 0xbad4c88a, 0x0746edf9, 0x8103a9aa, 0xc8c73617, 0xe0f2759a,
|
0x4f23137b, 0x9dfd6434, 0xd1e25d94, 0xbad4c88a, 0x0746edf9, 0x8103a9aa, 0xc8c73617, 0xe0f2759a,
|
||||||
0x00161c79, 0xd4545360, 0x1763cc5b, 0x296361fa, 0xbc35858d, 0xdaed5e93, 0x0b9d0aed, 0x01c45a64,
|
0x00161c79, 0xd4545360, 0x1763cc5b, 0x296361fa, 0xbc35858d, 0xdaed5e93, 0x0b9d0aed, 0x01c45a64,
|
||||||
};
|
};
|
||||||
|
|
@ -50,6 +50,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTHASH_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTHASH_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtList.h"
|
||||||
|
#include "pnUtArray.h"
|
||||||
|
#include "pnUtMath.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtList.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTLIST_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTLIST_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtMath.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTMATH_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTMATH_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtMisc.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTMISC_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTMISC_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtArray.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtPath.h"
|
||||||
#pragma hdrstop
|
#include "pnUtStr.h"
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
@ -50,6 +50,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTPATH_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTPATH_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtArray.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTPRIQ_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTPRIQ_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtRand.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTRAND_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTRAND_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtSpareList.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
@ -50,6 +50,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSPARELIST_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSPARELIST_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
|
|
||||||
#ifdef HS_DEBUGGING
|
#ifdef HS_DEBUGGING
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtStr.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@ -522,7 +521,7 @@ const wchar_t * StrChrR (const wchar_t str[], wchar_t ch) {
|
|||||||
unsigned StrPrintf (char * dest, unsigned count, const char format[], ...) {
|
unsigned StrPrintf (char * dest, unsigned count, const char format[], ...) {
|
||||||
va_list argList;
|
va_list argList;
|
||||||
va_start(argList, format);
|
va_start(argList, format);
|
||||||
int result = _vsnprintf((char *)dest, count, (const char *)format, argList);
|
int result = hsVsnprintf((char *)dest, count, (const char *)format, argList);
|
||||||
va_end(argList);
|
va_end(argList);
|
||||||
return IStrPrintfValidate(dest, count, result);
|
return IStrPrintfValidate(dest, count, result);
|
||||||
}
|
}
|
||||||
@ -531,20 +530,20 @@ unsigned StrPrintf (char * dest, unsigned count, const char format[], ...) {
|
|||||||
unsigned StrPrintf (wchar_t * dest, unsigned count, const wchar_t format[], ...) {
|
unsigned StrPrintf (wchar_t * dest, unsigned count, const wchar_t format[], ...) {
|
||||||
va_list argList;
|
va_list argList;
|
||||||
va_start(argList, format);
|
va_start(argList, format);
|
||||||
int result = _vsnwprintf(dest, count, format, argList);
|
int result = hsVsnwprintf(dest, count, format, argList);
|
||||||
va_end(argList);
|
va_end(argList);
|
||||||
return IStrPrintfValidate(dest, count, result);
|
return IStrPrintfValidate(dest, count, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
unsigned StrPrintfV (char * dest, unsigned count, const char format[], va_list args) {
|
unsigned StrPrintfV (char * dest, unsigned count, const char format[], va_list args) {
|
||||||
int result = _vsnprintf(dest, count, format, args);
|
int result = hsVsnprintf(dest, count, format, args);
|
||||||
return IStrPrintfValidate(dest, count, result);
|
return IStrPrintfValidate(dest, count, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
unsigned StrPrintfV (wchar_t * dest, unsigned count, const wchar_t format[], va_list args) {
|
unsigned StrPrintfV (wchar_t * dest, unsigned count, const wchar_t format[], va_list args) {
|
||||||
int result = _vsnwprintf(dest, count, format, args);
|
int result = hsVsnwprintf(dest, count, format, args);
|
||||||
return IStrPrintfValidate(dest, count, result);
|
return IStrPrintfValidate(dest, count, result);
|
||||||
}
|
}
|
||||||
|
|
@ -50,6 +50,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSTR_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSTR_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
#include "pnUtArray.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSYNC_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTSYNC_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtTime.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTTIME_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTTIME_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtTls.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTTLS_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTTLS_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "../Pch.h"
|
#include "pnUtUuid.h"
|
||||||
#pragma hdrstop
|
|
||||||
|
|
||||||
|
|
||||||
const Uuid kNilGuid;
|
const Uuid kNilGuid;
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#endif
|
#endif
|
||||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTUUID_H
|
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTUUID_H
|
||||||
|
|
||||||
|
#include "Pch.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
Reference in New Issue
Block a user