mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
add *.user, Win32, and x64 build dir to ignore list for DebuggerUICommon and Unit Tests
add *.aps to ignore list for DolphinWX dir add eol-style native to 120 or so files git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3689 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,119 +1,119 @@
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// 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, version 2.0.
|
||||
|
||||
// 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 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// Stubs to make DSPCore compile as part of DSPSpy.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Thread.h"
|
||||
|
||||
void *AllocateMemoryPages(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void FreeMemoryPages(void *pages, size_t size)
|
||||
{
|
||||
free(pages);
|
||||
}
|
||||
|
||||
void WriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
bool DSPHost_OnThread()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Well, it's just RAM right? :)
|
||||
u8 DSPHost_ReadHostMemory(u32 address)
|
||||
{
|
||||
u8 *ptr = (u8*)address;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void DSPHost_WriteHostMemory(u8 value, u32 addr) {}
|
||||
|
||||
|
||||
void DSPHost_CodeLoaded(const u8 *code, int size)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
CriticalSection::CriticalSection(int)
|
||||
{
|
||||
}
|
||||
CriticalSection::~CriticalSection()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Enter()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Leave()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace File
|
||||
{
|
||||
|
||||
bool WriteStringToFile(bool text_file, const std::string &str, const char *filename)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "w" : "wb");
|
||||
if (!f)
|
||||
return false;
|
||||
size_t len = str.size();
|
||||
if (len != fwrite(str.data(), 1, str.size(), f))
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReadFileToString(bool text_file, const char *filename, std::string &str)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "r" : "rb");
|
||||
if (!f)
|
||||
return false;
|
||||
fseek(f, 0, SEEK_END);
|
||||
size_t len = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
char *buf = new char[len + 1];
|
||||
buf[fread(buf, 1, len, f)] = 0;
|
||||
str = std::string(buf, len);
|
||||
fclose(f);
|
||||
delete [] buf;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// 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, version 2.0.
|
||||
|
||||
// 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 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// Stubs to make DSPCore compile as part of DSPSpy.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Thread.h"
|
||||
|
||||
void *AllocateMemoryPages(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void FreeMemoryPages(void *pages, size_t size)
|
||||
{
|
||||
free(pages);
|
||||
}
|
||||
|
||||
void WriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
bool DSPHost_OnThread()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Well, it's just RAM right? :)
|
||||
u8 DSPHost_ReadHostMemory(u32 address)
|
||||
{
|
||||
u8 *ptr = (u8*)address;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void DSPHost_WriteHostMemory(u8 value, u32 addr) {}
|
||||
|
||||
|
||||
void DSPHost_CodeLoaded(const u8 *code, int size)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
CriticalSection::CriticalSection(int)
|
||||
{
|
||||
}
|
||||
CriticalSection::~CriticalSection()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Enter()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Leave()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace File
|
||||
{
|
||||
|
||||
bool WriteStringToFile(bool text_file, const std::string &str, const char *filename)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "w" : "wb");
|
||||
if (!f)
|
||||
return false;
|
||||
size_t len = str.size();
|
||||
if (len != fwrite(str.data(), 1, str.size(), f))
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReadFileToString(bool text_file, const char *filename, std::string &str)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "r" : "rb");
|
||||
if (!f)
|
||||
return false;
|
||||
fseek(f, 0, SEEK_END);
|
||||
size_t len = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
char *buf = new char[len + 1];
|
||||
buf[fread(buf, 1, len, f)] = 0;
|
||||
str = std::string(buf, len);
|
||||
fclose(f);
|
||||
delete [] buf;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user