Last bit of string cleanup. string.h finally gone.

This commit is contained in:
Ben Vanik
2014-08-17 11:48:29 -07:00
parent 383d3acbb0
commit 24fe169f36
28 changed files with 148 additions and 236 deletions

View File

@@ -111,11 +111,6 @@ void xe_xex2_release(xe_xex2_ref xex) {
xe_ref_release((xe_ref)xex, (xe_ref_dealloc_t)xe_xex2_dealloc);
}
const xechar_t* xe_xex2_get_name(xe_xex2_ref xex) {
// TODO(benvanik): get name.
return NULL;
}
const xe_xex2_header_t* xe_xex2_get_header(xe_xex2_ref xex) {
return &xex->header;
}
@@ -264,8 +259,8 @@ int xe_xex2_read_header(const uint8_t *addr, const size_t length,
for (size_t i = 0, j = 0; i < string_table_size;) {
assert_true(j <= 0xFF);
if (j == name_index) {
xestrcpya(library->name, poly::countof(library->name),
string_table + i);
std::strncpy(library->name, string_table + i,
poly::countof(library->name));
break;
}
if (string_table[i] == 0) {

View File

@@ -51,7 +51,6 @@ xe_xex2_ref xe_xex2_load(xe::Memory* memory,
xe_xex2_ref xe_xex2_retain(xe_xex2_ref xex);
void xe_xex2_release(xe_xex2_ref xex);
const xechar_t *xe_xex2_get_name(xe_xex2_ref xex);
const xe_xex2_header_t *xe_xex2_get_header(xe_xex2_ref xex);
const PESection* xe_xex2_get_pe_section(xe_xex2_ref xex, const char* name);