mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Applied new coding standard, see http://github.com/mangos/mangos/wikis/codingstandards for more.
This commit is contained in:
parent
899d7dec74
commit
92441a0241
21 changed files with 68 additions and 68 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -30,25 +30,25 @@ noinst_LIBRARIES = libmangosshared.a
|
|||
|
||||
# libmangosshared library will later be reused by ...
|
||||
libmangosshared_a_SOURCES = \
|
||||
Base.cpp \
|
||||
Base.h \
|
||||
ByteBuffer.h \
|
||||
Common.cpp \
|
||||
Common.h \
|
||||
Errors.h \
|
||||
Log.cpp \
|
||||
Log.h \
|
||||
MemoryLeaks.cpp \
|
||||
MemoryLeaks.h \
|
||||
Mthread.cpp \
|
||||
Mthread.h \
|
||||
ProgressBar.cpp \
|
||||
ProgressBar.h \
|
||||
Timer.h \
|
||||
Util.cpp \
|
||||
Util.h \
|
||||
WorldPacket.h \
|
||||
svn_revision.h
|
||||
Base.cpp \
|
||||
Base.h \
|
||||
ByteBuffer.h \
|
||||
Common.cpp \
|
||||
Common.h \
|
||||
Errors.h \
|
||||
Log.cpp \
|
||||
Log.h \
|
||||
MemoryLeaks.cpp \
|
||||
MemoryLeaks.h \
|
||||
Mthread.cpp \
|
||||
Mthread.h \
|
||||
ProgressBar.cpp \
|
||||
ProgressBar.h \
|
||||
Timer.h \
|
||||
Util.cpp \
|
||||
Util.h \
|
||||
WorldPacket.h \
|
||||
svn_revision.h
|
||||
|
||||
# Get svn revision
|
||||
SVN_REVISION_FILE = svn_revision.h
|
||||
|
|
@ -59,21 +59,21 @@ CLEANFILES = $(SVN_REVISION_FILE)
|
|||
FORCE:
|
||||
|
||||
$(SVN_REVISION_FILE) : $(top_builddir)/src/tools/gensvnrevision/gensvnrevision FORCE
|
||||
$(top_builddir)/src/tools/gensvnrevision/gensvnrevision $(top_srcdir)
|
||||
$(top_builddir)/src/tools/gensvnrevision/gensvnrevision $(top_srcdir)
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
# Disabled packet logger
|
||||
EXTRA_DIST = \
|
||||
PacketLog.cpp \
|
||||
PacketLog.h
|
||||
PacketLog.cpp \
|
||||
PacketLog.h
|
||||
|
||||
# System configuration
|
||||
EXTRA_DIST += \
|
||||
SystemConfig.h
|
||||
SystemConfig.h
|
||||
|
||||
# System Win32 files
|
||||
EXTRA_DIST += \
|
||||
ServiceWin32.cpp \
|
||||
ServiceWin32.h \
|
||||
WheatyExceptionReport.cpp \
|
||||
WheatyExceptionReport.h
|
||||
ServiceWin32.cpp \
|
||||
ServiceWin32.h \
|
||||
WheatyExceptionReport.cpp \
|
||||
WheatyExceptionReport.h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005,2006 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -48,7 +48,7 @@ inline uint32 getMSTime()
|
|||
inline uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime)
|
||||
{
|
||||
// getMSTime() have limited data range and this is case when it overflow in this tick
|
||||
if (oldMSTime > newMSTime)
|
||||
if (oldMSTime > newMSTime)
|
||||
return (0xFFFFFFFF - oldMSTime) + newMSTime;
|
||||
else
|
||||
return newMSTime - oldMSTime;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
typedef ZThread::ThreadLocal<MTRand> MTRandTSS;
|
||||
|
||||
/* NOTE: Not sure if static initialization is ok for TSS objects ,
|
||||
* as I see zthread uses custom implementation of the TSS
|
||||
* as I see zthread uses custom implementation of the TSS
|
||||
* ,and in the consturctor there is no code ,so I suppose its ok
|
||||
* If its not ok ,change it to use singleton.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -99,7 +99,7 @@ bool Utf8toWStr(std::string utf8str, std::wstring& wstr);
|
|||
// in wsize==max size of buffer, out wsize==real string size
|
||||
bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize);
|
||||
inline bool Utf8toWStr(std::string utf8str, wchar_t* wstr, size_t& wsize)
|
||||
{
|
||||
{
|
||||
return Utf8toWStr(utf8str.c_str(), utf8str.size(), wstr, wsize);
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ inline bool isEastAsianCharacter(wchar_t wchar)
|
|||
return true;
|
||||
if(wchar >= 0x31F0 && wchar <= 0x31FF) // Katakana Phonetic Ext.
|
||||
return true;
|
||||
if(wchar >= 0x3400 && wchar <= 0x4DB5) // CJK Ideographs Ext. A
|
||||
if(wchar >= 0x3400 && wchar <= 0x4DB5) // CJK Ideographs Ext. A
|
||||
return true;
|
||||
if(wchar >= 0x4E00 && wchar <= 0x9FC3) // Unified CJK Ideographs
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -330,22 +330,22 @@ void WheatyExceptionReport::PrintSystemInfo()
|
|||
//===========================================================================
|
||||
void WheatyExceptionReport::printTracesForAllThreads()
|
||||
{
|
||||
HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
|
||||
THREADENTRY32 te32;
|
||||
|
||||
HANDLE hThreadSnap = INVALID_HANDLE_VALUE;
|
||||
THREADENTRY32 te32;
|
||||
|
||||
DWORD dwOwnerPID = GetCurrentProcessId();
|
||||
m_hProcess = GetCurrentProcess();
|
||||
// Take a snapshot of all running threads
|
||||
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
||||
if( hThreadSnap == INVALID_HANDLE_VALUE )
|
||||
return;
|
||||
|
||||
// Fill in the size of the structure before using it.
|
||||
te32.dwSize = sizeof(THREADENTRY32 );
|
||||
|
||||
// Take a snapshot of all running threads
|
||||
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
||||
if( hThreadSnap == INVALID_HANDLE_VALUE )
|
||||
return;
|
||||
|
||||
// Fill in the size of the structure before using it.
|
||||
te32.dwSize = sizeof(THREADENTRY32 );
|
||||
|
||||
// Retrieve information about the first thread,
|
||||
// and exit if unsuccessful
|
||||
if( !Thread32First( hThreadSnap, &te32 ) )
|
||||
if( !Thread32First( hThreadSnap, &te32 ) )
|
||||
{
|
||||
CloseHandle( hThreadSnap ); // Must clean up the
|
||||
// snapshot object!
|
||||
|
|
@ -355,8 +355,8 @@ void WheatyExceptionReport::printTracesForAllThreads()
|
|||
// Now walk the thread list of the system,
|
||||
// and display information about each thread
|
||||
// associated with the specified process
|
||||
do
|
||||
{
|
||||
do
|
||||
{
|
||||
if( te32.th32OwnerProcessID == dwOwnerPID )
|
||||
{
|
||||
CONTEXT context;
|
||||
|
|
@ -368,7 +368,7 @@ void WheatyExceptionReport::printTracesForAllThreads()
|
|||
}
|
||||
CloseHandle(threadHandle);
|
||||
}
|
||||
} while( Thread32Next(hThreadSnap, &te32 ) );
|
||||
} while( Thread32Next(hThreadSnap, &te32 ) );
|
||||
|
||||
// Don't forget to clean up the snapshot object.
|
||||
CloseHandle( hThreadSnap );
|
||||
|
|
@ -604,7 +604,7 @@ bool bWriteVariables, HANDLE pThreadHandle) // true if local/par
|
|||
{
|
||||
_tprintf( _T("\r\nCall stack:\r\n") );
|
||||
|
||||
_tprintf( _T("Address Frame Function SourceFile\r\n") );
|
||||
_tprintf( _T("Address Frame Function SourceFile\r\n") );
|
||||
|
||||
DWORD dwMachineType = 0;
|
||||
// Could use SymSetOptions here to add the SYMOPT_DEFERRED_LOADS flag
|
||||
|
|
@ -906,10 +906,10 @@ char* Name)
|
|||
|
||||
// BasicType basicType = GetBasicType(children.ChildId[i], modBase );
|
||||
//
|
||||
// pszCurrBuffer += sprintf( pszCurrBuffer, rgBaseType[basicType]);
|
||||
// pszCurrBuffer += sprintf( pszCurrBuffer, rgBaseType[basicType]);
|
||||
//
|
||||
// Emit the variable name
|
||||
// pszCurrBuffer += sprintf( pszCurrBuffer, "\'%s\'", Name );
|
||||
// pszCurrBuffer += sprintf( pszCurrBuffer, "\'%s\'", Name );
|
||||
|
||||
pszCurrBuffer = FormatOutputValue( pszCurrBuffer, basicType,
|
||||
length, (PVOID)dwFinalOffset );
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue