Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #163 from lioncash/dsp-func-typo
Fix a typo in DSPSymbols. (DisasssembleRange -> DisassembleRange)
  • Loading branch information
delroth committed Mar 13, 2014
2 parents ede4655 + 0edda2b commit 107d4ca
Showing 1 changed file with 7 additions and 38 deletions.
45 changes: 7 additions & 38 deletions Source/Core/Core/HW/DSPLLE/DSPSymbols.cpp
Expand Up @@ -2,6 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.

#include <cctype>
#include <list>
#include <map>
#include <string>
Expand All @@ -14,7 +15,8 @@
#include "Core/DSP/DSPDisassembler.h"
#include "Core/HW/DSPLLE/DSPSymbols.h"

namespace DSPSymbols {
namespace DSPSymbols
{

DSPSymbolDB g_dsp_symbol_db;

Expand Down Expand Up @@ -73,42 +75,9 @@ Symbol *DSPSymbolDB::GetSymbolFromAddr(u32 addr)
return nullptr;
}

// lower case only
bool IsHexDigit(char c)
{
switch (c)
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
return true;
default:
return false;
}
}

bool IsAlpha(char c)
void DisassembleRange(u16 start, u16 end)
{
return (c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z');
}

void DisasssembleRange(u16 start, u16 end)
{

// TODO: ?
}

bool ReadAnnotatedAssembly(const char *filename)
Expand Down Expand Up @@ -141,7 +110,7 @@ bool ReadAnnotatedAssembly(const char *filename)
for (unsigned int i = 0; i < strlen(line); i++)
{
const char c = line[i];
if (IsHexDigit(c))
if (isxdigit(c))
{
if (first_hex == -1)
{
Expand All @@ -165,7 +134,7 @@ bool ReadAnnotatedAssembly(const char *filename)
{
first_hex = -1;
}
if (IsAlpha(c))
if (isalpha(c))
break;
}
}
Expand Down

0 comments on commit 107d4ca

Please sign in to comment.