More string swapping and cleaning up main().

This commit is contained in:
Ben Vanik
2014-08-16 16:34:04 -07:00
parent 18ee972b47
commit 7c5fa88661
41 changed files with 326 additions and 413 deletions

View File

@@ -1,35 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/core/path.h>
void xe_path_join(const xechar_t* left, const xechar_t* right,
xechar_t* out_path, size_t out_path_size) {
#if XE_WCHAR
xesnprintf(out_path, out_path_size, L"%ls%c%ls",
left, poly::path_separator, right);
#else
xesnprintf(out_path, out_path_size, L"%s%c%s",
left, poly::path_separator, right);
#endif // XE_WCHAR
}
void xe_path_get_absolute(const xechar_t* path, xechar_t* out_abs_path,
size_t abs_path_size) {
#if XE_PLATFORM_WIN32
#if XE_WCHAR
_wfullpath(out_abs_path, path, abs_path_size);
#else
_fullpath(out_abs_path, path, abs_path_size);
#endif // XE_WCHAR
#else
realpath(path, out_abs_path);
#endif // WIN32
}

View File

@@ -1,25 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_CORE_PATH_H_
#define XENIA_CORE_PATH_H_
#include <xenia/common.h>
#include <xenia/core/pal.h>
#include <xenia/core/ref.h>
void xe_path_join(const xechar_t* left, const xechar_t* right,
xechar_t* out_path, size_t out_path_size);
void xe_path_get_absolute(const xechar_t* path, xechar_t* out_abs_path,
size_t abs_path_size);
const xechar_t* xe_path_get_tmp(const xechar_t* prefix);
#endif // XENIA_CORE_PATH_H_

View File

@@ -1,16 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/core/path.h>
const xechar_t* xe_path_get_tmp(const xechar_t* prefix) {
//
assert_always();
}

View File

@@ -1,17 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/core/path.h>
const xechar_t* xe_path_get_tmp(const xechar_t* prefix) {
//
assert_always();
return NULL;
}

View File

@@ -5,8 +5,6 @@
'hash.h',
'mmap.h',
'pal.h',
'path.cc',
'path.h',
'ref.cc',
'ref.h',
'run_loop.h',
@@ -17,7 +15,6 @@
['OS == "mac" or OS == "linux"', {
'sources': [
'mmap_posix.cc',
'path_posix.cc',
'socket_posix.cc',
],
}],
@@ -35,7 +32,6 @@
'sources': [
'mmap_win.cc',
'pal_win.cc',
'path_win.cc',
'run_loop_win.cc',
'socket_win.cc',
],