again, re-add some windows stuff Revert "possibly controversial commit: remove all windows sources, keeping only the windows cmake so that we can generate an sln to edit the code"

This reverts commit 48ba7961eb.
This commit is contained in:
DarthArgus
2016-07-23 18:01:50 -07:00
parent efaaa4bb42
commit 9b369713e1
173 changed files with 16448 additions and 0 deletions
@@ -0,0 +1,9 @@
// ======================================================================
//
// FirstSharedRegex.cpp
// Copyright 2003 Sony Online Entertainment, Inc.
// All Rights Reserved.
//
// ======================================================================
#include "sharedRegex/FirstSharedRegex.h"
@@ -0,0 +1,57 @@
// ======================================================================
//
// RegexServices.cpp
// Copyright 2003 Sony Online Entertainment, Inc.
// All Rights Reserved.
//
// ======================================================================
#include "sharedRegex/FirstSharedRegex.h"
#include "sharedRegex/RegexServices.h"
// ======================================================================
static void * __cdecl localAllocate(size_t size, uint32 owner, bool array, bool leakTest)
{
return MemoryManager::allocate(size, owner, array, leakTest);
}
static __declspec(naked) void * regexAllocate(size_t)
{
_asm
{
// setup local call stack
push ebp
mov ebp, esp
// MemoryManager::alloc(size, [return address], false, true)
push 1
push 0
mov eax, dword ptr [ebp+4]
push eax
mov eax, dword ptr [ebp+8]
push eax
call localAllocate
add esp, 12
mov esp, ebp
pop ebp
ret
}
}
// ----------------------------------------------------------------------
void *RegexServices::allocateMemory(size_t byteCount)
{
return regexAllocate(byteCount);
}
// ----------------------------------------------------------------------
void RegexServices::freeMemory(void *pointer)
{
MemoryManager::free(pointer, false);
}
// ======================================================================
@@ -0,0 +1,25 @@
// ======================================================================
//
// RegexServices.h
// Copyright 2003 Sony Online Entertainment, Inc.
// All Rights Reserved.
//
// ======================================================================
#ifndef INCLUDED_RegexServices_H
#define INCLUDED_RegexServices_H
// ======================================================================
class RegexServices
{
public:
static void *allocateMemory(size_t byteCount);
static void freeMemory(void *pointer);
};
// ======================================================================
#endif