mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-04-12 12:37:08 +00:00
Remove TCHAR and <tchar.h> (PR #1373)
. Replace TCHAR -> char. . Remove <tchar.h> and related functions.
This commit is contained in:
parent
1f3e253c4b
commit
168e868677
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "../Windows/AppleWin.h"
|
||||
#include "../resource/resource.h"
|
||||
|
||||
static const TCHAR g_szGPL[] =
|
||||
static const char g_szGPL[] =
|
||||
"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; either version 2 of the License, or (at your option) any later version.\r\n\
|
||||
\r\n\
|
||||
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 for more details.\r\n\
|
||||
|
@ -37,14 +37,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
CPageAdvanced* CPageAdvanced::ms_this = 0; // reinit'd in ctor
|
||||
|
||||
enum CLONECHOICE {MENUITEM_CLONEMIN, MENUITEM_PRAVETS82=MENUITEM_CLONEMIN, MENUITEM_PRAVETS8M, MENUITEM_PRAVETS8A, MENUITEM_TK30002E, MENUITEM_BASE64A, MENUITEM_CLONEMAX};
|
||||
const TCHAR CPageAdvanced::m_CloneChoices[] =
|
||||
const char CPageAdvanced::m_CloneChoices[] =
|
||||
TEXT("Pravets 82\0") // Bulgarian
|
||||
TEXT("Pravets 8M\0") // Bulgarian
|
||||
TEXT("Pravets 8A\0") // Bulgarian
|
||||
TEXT("TK3000 //e\0") // Brazilian
|
||||
TEXT("Base 64A\0"); // Taiwanese
|
||||
|
||||
const TCHAR CPageAdvanced::m_gameIOConnectorChoices[] =
|
||||
const char CPageAdvanced::m_gameIOConnectorChoices[] =
|
||||
"Empty\0"
|
||||
"SDS DataKey - SpeedStar\0" /* Protection dongle for Southwestern Data Systems "SpeedStar" Applesoft Compiler */
|
||||
"Cortechs Corp - CodeWriter\0" /* Protection key for Dynatech Microsoftware / Cortechs Corp "CodeWriter" */
|
||||
|
@ -38,8 +38,8 @@ private:
|
||||
void InitGameIOConnectorDropdownMenu(HWND hWnd);
|
||||
|
||||
static CPageAdvanced* ms_this;
|
||||
static const TCHAR m_CloneChoices[];
|
||||
static const TCHAR m_gameIOConnectorChoices[];
|
||||
static const char m_CloneChoices[];
|
||||
static const char m_gameIOConnectorChoices[];
|
||||
|
||||
const PAGETYPE m_Page;
|
||||
CPropertySheetHelper& m_PropertySheetHelper;
|
||||
|
@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
CPageConfig* CPageConfig::ms_this = 0; // reinit'd in ctor
|
||||
|
||||
enum APPLEIICHOICE {MENUITEM_IIORIGINAL, MENUITEM_IIPLUS, MENUITEM_IIJPLUS, MENUITEM_IIE, MENUITEM_ENHANCEDIIE, MENUITEM_CLONE};
|
||||
const TCHAR CPageConfig::m_ComputerChoices[] =
|
||||
const char CPageConfig::m_ComputerChoices[] =
|
||||
TEXT("Apple ][ (Original)\0")
|
||||
TEXT("Apple ][+\0")
|
||||
TEXT("Apple ][ J-Plus\0")
|
||||
|
@ -34,7 +34,7 @@ private:
|
||||
bool IsOkToBenchmark(HWND hWnd, const bool bConfigChanged);
|
||||
|
||||
static CPageConfig* ms_this;
|
||||
static const TCHAR m_ComputerChoices[];
|
||||
static const char m_ComputerChoices[];
|
||||
|
||||
const PAGETYPE m_Page;
|
||||
CPropertySheetHelper& m_PropertySheetHelper;
|
||||
|
@ -37,11 +37,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
CPageDisk* CPageDisk::ms_this = 0; // reinit'd in ctor
|
||||
|
||||
const TCHAR CPageDisk::m_defaultDiskOptions[] =
|
||||
const char CPageDisk::m_defaultDiskOptions[] =
|
||||
TEXT("Select Disk...\0")
|
||||
TEXT("Eject Disk\0");
|
||||
|
||||
const TCHAR CPageDisk::m_defaultHDDOptions[] =
|
||||
const char CPageDisk::m_defaultHDDOptions[] =
|
||||
TEXT("Select Hard Disk Image...\0")
|
||||
TEXT("Unplug Hard Disk Image\0");
|
||||
|
||||
@ -193,7 +193,7 @@ INT_PTR CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARA
|
||||
|
||||
InitComboHDD(hWnd, SLOT7);
|
||||
|
||||
TCHAR PathToCiderPress[MAX_PATH];
|
||||
char PathToCiderPress[MAX_PATH];
|
||||
RegLoadString(TEXT(REG_CONFIG), REGVALUE_CIDERPRESSLOC, 1, PathToCiderPress, MAX_PATH, TEXT(""));
|
||||
SendDlgItemMessage(hWnd, IDC_CIDERPRESS_FILENAME ,WM_SETTEXT, 0, (LPARAM)PathToCiderPress);
|
||||
|
||||
|
@ -35,8 +35,8 @@ private:
|
||||
UINT RemovalConfirmation(UINT uCommand);
|
||||
|
||||
static CPageDisk* ms_this;
|
||||
static const TCHAR m_defaultDiskOptions[];
|
||||
static const TCHAR m_defaultHDDOptions[];
|
||||
static const char m_defaultDiskOptions[];
|
||||
static const char m_defaultHDDOptions[];
|
||||
|
||||
const PAGETYPE m_Page;
|
||||
CPropertySheetHelper& m_PropertySheetHelper;
|
||||
|
@ -34,22 +34,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
CPageInput* CPageInput::ms_this = 0; // reinit'd in ctor
|
||||
|
||||
// Joystick option choices - NOTE maximum text length is MaxMenuChoiceLen = 40
|
||||
const TCHAR CPageInput::m_szJoyChoice0[] = TEXT("Disabled\0");
|
||||
const TCHAR CPageInput::m_szJoyChoice1[] = TEXT("PC Joystick #1\0");
|
||||
const TCHAR CPageInput::m_szJoyChoice2[] = TEXT("PC Joystick #2\0");
|
||||
const TCHAR CPageInput::m_szJoyChoice3[] = TEXT("Keyboard (cursors)\0");
|
||||
const TCHAR CPageInput::m_szJoyChoice4[] = TEXT("Keyboard (numpad)\0");
|
||||
const TCHAR CPageInput::m_szJoyChoice5[] = TEXT("Mouse\0");
|
||||
const TCHAR CPageInput::m_szJoyChoice6[] = TEXT("PC Joystick #1 Thumbstick 2\0");
|
||||
const char CPageInput::m_szJoyChoice0[] = TEXT("Disabled\0");
|
||||
const char CPageInput::m_szJoyChoice1[] = TEXT("PC Joystick #1\0");
|
||||
const char CPageInput::m_szJoyChoice2[] = TEXT("PC Joystick #2\0");
|
||||
const char CPageInput::m_szJoyChoice3[] = TEXT("Keyboard (cursors)\0");
|
||||
const char CPageInput::m_szJoyChoice4[] = TEXT("Keyboard (numpad)\0");
|
||||
const char CPageInput::m_szJoyChoice5[] = TEXT("Mouse\0");
|
||||
const char CPageInput::m_szJoyChoice6[] = TEXT("PC Joystick #1 Thumbstick 2\0");
|
||||
|
||||
const TCHAR* const CPageInput::m_pszJoy0Choices[J0C_MAX] = {
|
||||
const char* const CPageInput::m_pszJoy0Choices[J0C_MAX] = {
|
||||
CPageInput::m_szJoyChoice0,
|
||||
CPageInput::m_szJoyChoice1, // PC Joystick #1
|
||||
CPageInput::m_szJoyChoice3,
|
||||
CPageInput::m_szJoyChoice4,
|
||||
CPageInput::m_szJoyChoice5 };
|
||||
|
||||
const TCHAR* const CPageInput::m_pszJoy1Choices[J1C_MAX] = {
|
||||
const char* const CPageInput::m_pszJoy1Choices[J1C_MAX] = {
|
||||
CPageInput::m_szJoyChoice0,
|
||||
CPageInput::m_szJoyChoice2, // PC Joystick #2
|
||||
CPageInput::m_szJoyChoice3,
|
||||
@ -57,22 +57,22 @@ const TCHAR* const CPageInput::m_pszJoy1Choices[J1C_MAX] = {
|
||||
CPageInput::m_szJoyChoice5,
|
||||
CPageInput::m_szJoyChoice6 };
|
||||
|
||||
const TCHAR CPageInput::m_szCPMSlotChoice_Slot4[] = TEXT("Slot 4\0");
|
||||
const TCHAR CPageInput::m_szCPMSlotChoice_Slot5[] = TEXT("Slot 5\0");
|
||||
const TCHAR CPageInput::m_szCPMSlotChoice_Unplugged[] = TEXT("Unplugged\0");
|
||||
const TCHAR CPageInput::m_szCPMSlotChoice_Unavailable[] = TEXT("Unavailable\0");
|
||||
const char CPageInput::m_szCPMSlotChoice_Slot4[] = TEXT("Slot 4\0");
|
||||
const char CPageInput::m_szCPMSlotChoice_Slot5[] = TEXT("Slot 5\0");
|
||||
const char CPageInput::m_szCPMSlotChoice_Unplugged[] = TEXT("Unplugged\0");
|
||||
const char CPageInput::m_szCPMSlotChoice_Unavailable[] = TEXT("Unavailable\0");
|
||||
|
||||
const TCHAR CPageInput::m_szFourPlaySlotChoice_Slot3[] = TEXT("Slot 3\0");
|
||||
const TCHAR CPageInput::m_szFourPlaySlotChoice_Slot4[] = TEXT("Slot 4\0");
|
||||
const TCHAR CPageInput::m_szFourPlaySlotChoice_Slot5[] = TEXT("Slot 5\0");
|
||||
const TCHAR CPageInput::m_szFourPlaySlotChoice_Unplugged[] = TEXT("Unplugged\0");
|
||||
const TCHAR CPageInput::m_szFourPlaySlotChoice_Unavailable[] = TEXT("Unavailable\0");
|
||||
const char CPageInput::m_szFourPlaySlotChoice_Slot3[] = TEXT("Slot 3\0");
|
||||
const char CPageInput::m_szFourPlaySlotChoice_Slot4[] = TEXT("Slot 4\0");
|
||||
const char CPageInput::m_szFourPlaySlotChoice_Slot5[] = TEXT("Slot 5\0");
|
||||
const char CPageInput::m_szFourPlaySlotChoice_Unplugged[] = TEXT("Unplugged\0");
|
||||
const char CPageInput::m_szFourPlaySlotChoice_Unavailable[] = TEXT("Unavailable\0");
|
||||
|
||||
const TCHAR CPageInput::m_szSNESMAXSlotChoice_Slot3[] = TEXT("Slot 3\0");
|
||||
const TCHAR CPageInput::m_szSNESMAXSlotChoice_Slot4[] = TEXT("Slot 4\0");
|
||||
const TCHAR CPageInput::m_szSNESMAXSlotChoice_Slot5[] = TEXT("Slot 5\0");
|
||||
const TCHAR CPageInput::m_szSNESMAXSlotChoice_Unplugged[] = TEXT("Unplugged\0");
|
||||
const TCHAR CPageInput::m_szSNESMAXSlotChoice_Unavailable[] = TEXT("Unavailable\0");
|
||||
const char CPageInput::m_szSNESMAXSlotChoice_Slot3[] = TEXT("Slot 3\0");
|
||||
const char CPageInput::m_szSNESMAXSlotChoice_Slot4[] = TEXT("Slot 4\0");
|
||||
const char CPageInput::m_szSNESMAXSlotChoice_Slot5[] = TEXT("Slot 5\0");
|
||||
const char CPageInput::m_szSNESMAXSlotChoice_Unplugged[] = TEXT("Unplugged\0");
|
||||
const char CPageInput::m_szSNESMAXSlotChoice_Unavailable[] = TEXT("Unavailable\0");
|
||||
|
||||
INT_PTR CALLBACK CPageInput::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
@ -333,11 +333,11 @@ void CPageInput::InitOptions(HWND hWnd)
|
||||
|
||||
void CPageInput::InitJoystickChoices(HWND hWnd, int nJoyNum, int nIdcValue)
|
||||
{
|
||||
TCHAR* pnzJoystickChoices;
|
||||
char* pnzJoystickChoices;
|
||||
int *pnJoyTranslationTbl;
|
||||
int nJoyTranslationTblSize;
|
||||
unsigned short nJC_DISABLED, nJC_JOYSTICK, nJC_KEYBD_CURSORS, nJC_KEYBD_NUMPAD, nJC_MOUSE, nJC_MAX;
|
||||
TCHAR** ppszJoyChoices;
|
||||
char** ppszJoyChoices;
|
||||
int nOtherJoyNum = nJoyNum == JN_JOYSTICK0 ? JN_JOYSTICK1 : JN_JOYSTICK0;
|
||||
|
||||
if (nJoyNum == JN_JOYSTICK0)
|
||||
@ -351,7 +351,7 @@ void CPageInput::InitJoystickChoices(HWND hWnd, int nJoyNum, int nIdcValue)
|
||||
nJC_KEYBD_NUMPAD = J0C_KEYBD_NUMPAD;
|
||||
nJC_MOUSE = J0C_MOUSE;
|
||||
nJC_MAX = J0C_MAX;
|
||||
ppszJoyChoices = (TCHAR**) m_pszJoy0Choices;
|
||||
ppszJoyChoices = (char**) m_pszJoy0Choices;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -364,10 +364,10 @@ void CPageInput::InitJoystickChoices(HWND hWnd, int nJoyNum, int nIdcValue)
|
||||
nJC_KEYBD_NUMPAD = J1C_KEYBD_NUMPAD;
|
||||
nJC_MOUSE = J1C_MOUSE;
|
||||
nJC_MAX = J1C_MAX;
|
||||
ppszJoyChoices = (TCHAR**) m_pszJoy1Choices;
|
||||
ppszJoyChoices = (char**) m_pszJoy1Choices;
|
||||
}
|
||||
|
||||
TCHAR* pszMem = pnzJoystickChoices;
|
||||
char* pszMem = pnzJoystickChoices;
|
||||
int nIdx = 0;
|
||||
memset(pnJoyTranslationTbl, -1, nJoyTranslationTblSize);
|
||||
|
||||
|
@ -61,37 +61,37 @@ private:
|
||||
static CPageInput* ms_this;
|
||||
static const UINT MaxMenuChoiceLen = 40;
|
||||
|
||||
static const TCHAR m_szJoyChoice0[];
|
||||
static const TCHAR m_szJoyChoice1[];
|
||||
static const TCHAR m_szJoyChoice2[];
|
||||
static const TCHAR m_szJoyChoice3[];
|
||||
static const TCHAR m_szJoyChoice4[];
|
||||
static const TCHAR m_szJoyChoice5[];
|
||||
static const TCHAR m_szJoyChoice6[];
|
||||
static const TCHAR* const m_pszJoy0Choices[J0C_MAX];
|
||||
static const TCHAR* const m_pszJoy1Choices[J1C_MAX];
|
||||
static const char m_szJoyChoice0[];
|
||||
static const char m_szJoyChoice1[];
|
||||
static const char m_szJoyChoice2[];
|
||||
static const char m_szJoyChoice3[];
|
||||
static const char m_szJoyChoice4[];
|
||||
static const char m_szJoyChoice5[];
|
||||
static const char m_szJoyChoice6[];
|
||||
static const char* const m_pszJoy0Choices[J0C_MAX];
|
||||
static const char* const m_pszJoy1Choices[J1C_MAX];
|
||||
|
||||
static const TCHAR m_szCPMSlotChoice_Slot4[];
|
||||
static const TCHAR m_szCPMSlotChoice_Slot5[];
|
||||
static const TCHAR m_szCPMSlotChoice_Unplugged[];
|
||||
static const TCHAR m_szCPMSlotChoice_Unavailable[];
|
||||
static const char m_szCPMSlotChoice_Slot4[];
|
||||
static const char m_szCPMSlotChoice_Slot5[];
|
||||
static const char m_szCPMSlotChoice_Unplugged[];
|
||||
static const char m_szCPMSlotChoice_Unavailable[];
|
||||
|
||||
static const TCHAR m_szFourPlaySlotChoice_Slot3[];
|
||||
static const TCHAR m_szFourPlaySlotChoice_Slot4[];
|
||||
static const TCHAR m_szFourPlaySlotChoice_Slot5[];
|
||||
static const TCHAR m_szFourPlaySlotChoice_Unplugged[];
|
||||
static const TCHAR m_szFourPlaySlotChoice_Unavailable[];
|
||||
static const char m_szFourPlaySlotChoice_Slot3[];
|
||||
static const char m_szFourPlaySlotChoice_Slot4[];
|
||||
static const char m_szFourPlaySlotChoice_Slot5[];
|
||||
static const char m_szFourPlaySlotChoice_Unplugged[];
|
||||
static const char m_szFourPlaySlotChoice_Unavailable[];
|
||||
|
||||
static const TCHAR m_szSNESMAXSlotChoice_Slot3[];
|
||||
static const TCHAR m_szSNESMAXSlotChoice_Slot4[];
|
||||
static const TCHAR m_szSNESMAXSlotChoice_Slot5[];
|
||||
static const TCHAR m_szSNESMAXSlotChoice_Unplugged[];
|
||||
static const TCHAR m_szSNESMAXSlotChoice_Unavailable[];
|
||||
static const char m_szSNESMAXSlotChoice_Slot3[];
|
||||
static const char m_szSNESMAXSlotChoice_Slot4[];
|
||||
static const char m_szSNESMAXSlotChoice_Slot5[];
|
||||
static const char m_szSNESMAXSlotChoice_Unplugged[];
|
||||
static const char m_szSNESMAXSlotChoice_Unavailable[];
|
||||
|
||||
int m_nJoy0ChoiceTranlationTbl[J0C_MAX];
|
||||
TCHAR m_joystick0choices[J0C_MAX * MaxMenuChoiceLen];
|
||||
char m_joystick0choices[J0C_MAX * MaxMenuChoiceLen];
|
||||
int m_nJoy1ChoiceTranlationTbl[J1C_MAX];
|
||||
TCHAR m_joystick1choices[J1C_MAX * MaxMenuChoiceLen];
|
||||
char m_joystick1choices[J1C_MAX * MaxMenuChoiceLen];
|
||||
|
||||
const PAGETYPE m_Page;
|
||||
CPropertySheetHelper& m_PropertySheetHelper;
|
||||
@ -105,17 +105,17 @@ private:
|
||||
UINT m_uMouseRestrictToWindow;
|
||||
|
||||
enum CPMCHOICE {CPM_SLOT4=0, CPM_SLOT5, CPM_UNPLUGGED, CPM_UNAVAILABLE, _CPM_MAX_CHOICES};
|
||||
TCHAR m_szCPMSlotChoices[_CPM_MAX_CHOICES * MaxMenuChoiceLen];
|
||||
char m_szCPMSlotChoices[_CPM_MAX_CHOICES * MaxMenuChoiceLen];
|
||||
CPMCHOICE m_CPMChoice;
|
||||
CPMCHOICE m_CPMComboItemToChoice[_CPM_MAX_CHOICES];
|
||||
|
||||
enum FOURPLAYCHOICE {FOURPLAY_SLOT3=0, FOURPLAY_SLOT4, FOURPLAY_SLOT5, FOURPLAY_UNPLUGGED, FOURPLAY_UNAVAILABLE, _FOURPLAY_MAX_CHOICES};
|
||||
TCHAR m_szFourPlaySlotChoices[_FOURPLAY_MAX_CHOICES * MaxMenuChoiceLen];
|
||||
char m_szFourPlaySlotChoices[_FOURPLAY_MAX_CHOICES * MaxMenuChoiceLen];
|
||||
FOURPLAYCHOICE m_FourPlayChoice;
|
||||
FOURPLAYCHOICE m_FourPlayComboItemToChoice[_FOURPLAY_MAX_CHOICES];
|
||||
|
||||
enum SNESMAXCHOICE {SNESMAX_SLOT3=0, SNESMAX_SLOT4, SNESMAX_SLOT5, SNESMAX_UNPLUGGED, SNESMAX_UNAVAILABLE, _SNESMAX_MAX_CHOICES};
|
||||
TCHAR m_szSNESMAXSlotChoices[_SNESMAX_MAX_CHOICES * MaxMenuChoiceLen];
|
||||
char m_szSNESMAXSlotChoices[_SNESMAX_MAX_CHOICES * MaxMenuChoiceLen];
|
||||
SNESMAXCHOICE m_SNESMAXChoice;
|
||||
SNESMAXCHOICE m_SNESMAXComboItemToChoice[_SNESMAX_MAX_CHOICES];
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
CPageSound* CPageSound::ms_this = 0; // reinit'd in ctor
|
||||
|
||||
const TCHAR CPageSound::m_soundchoices[] = TEXT("Disabled\0")
|
||||
const char CPageSound::m_soundchoices[] = TEXT("Disabled\0")
|
||||
TEXT("Sound Card\0");
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ private:
|
||||
|
||||
static const UINT VOLUME_MIN = 0;
|
||||
static const UINT VOLUME_MAX = 59;
|
||||
static const TCHAR m_soundchoices[];
|
||||
static const char m_soundchoices[];
|
||||
static const char m_soundCardChoices[];
|
||||
static const char m_soundCardChoicesEx[];
|
||||
static const char m_soundCardChoice_Unavailable[];
|
||||
|
@ -94,7 +94,7 @@ void CPropertySheetHelper::FillComboBox(HWND window, int controlid, LPCTSTR choi
|
||||
while (choices && *choices)
|
||||
{
|
||||
SendMessage(combowindow, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)choices);
|
||||
choices += _tcslen(choices)+1;
|
||||
choices += strlen(choices)+1;
|
||||
}
|
||||
|
||||
if (SendMessage(combowindow, CB_SETCURSEL, currentchoice, 0) == CB_ERR && currentchoice != -1)
|
||||
@ -139,9 +139,9 @@ void CPropertySheetHelper::SetSlot(UINT slot, SS_CARDTYPE newCardType)
|
||||
// Used by:
|
||||
// . CPageDisk: IDC_CIDERPRESS_BROWSE
|
||||
// . CPageAdvanced: IDC_PRINTER_DUMP_FILENAME_BROWSE
|
||||
std::string CPropertySheetHelper::BrowseToFile(HWND hWindow, const TCHAR* pszTitle, const TCHAR* REGVALUE, const TCHAR* FILEMASKS)
|
||||
std::string CPropertySheetHelper::BrowseToFile(HWND hWindow, const char* pszTitle, const char* REGVALUE, const char* FILEMASKS)
|
||||
{
|
||||
TCHAR szFilename[MAX_PATH];
|
||||
char szFilename[MAX_PATH];
|
||||
RegLoadString(REG_CONFIG, REGVALUE, 1, szFilename, MAX_PATH, TEXT(""));
|
||||
std::string pathname = szFilename;
|
||||
|
||||
@ -178,7 +178,7 @@ void CPropertySheetHelper::SaveStateUpdate()
|
||||
}
|
||||
|
||||
// NB. OK'ing this property sheet will call SaveStateUpdate()->Snapshot_SetFilename() with this new path & filename
|
||||
int CPropertySheetHelper::SaveStateSelectImage(HWND hWindow, const TCHAR* pszTitle, bool bSave)
|
||||
int CPropertySheetHelper::SaveStateSelectImage(HWND hWindow, const char* pszTitle, bool bSave)
|
||||
{
|
||||
// Whenever harddisks/disks are inserted (or removed) and *if path has changed* then:
|
||||
// . Snapshot's path & Snapshot's filename will be updated to reflect the new defaults.
|
||||
|
@ -14,9 +14,9 @@ public:
|
||||
virtual ~CPropertySheetHelper(){}
|
||||
|
||||
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
|
||||
std::string BrowseToFile(HWND hWindow, const TCHAR* pszTitle, const TCHAR* REGVALUE, const TCHAR* FILEMASKS);
|
||||
std::string BrowseToFile(HWND hWindow, const char* pszTitle, const char* REGVALUE, const char* FILEMASKS);
|
||||
void SaveStateUpdate();
|
||||
int SaveStateSelectImage(HWND hWindow, const TCHAR* pszTitle, bool bSave);
|
||||
int SaveStateSelectImage(HWND hWindow, const char* pszTitle, bool bSave);
|
||||
void PostMsgAfterClose(HWND hWnd, PAGETYPE page);
|
||||
|
||||
void ResetPageMask(void) { m_bmPages = 0; } // Req'd because cancelling doesn't clear the page-mask
|
||||
|
@ -184,11 +184,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#if OLD_FONT
|
||||
// Font
|
||||
TCHAR g_sFontNameDefault[ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
TCHAR g_sFontNameConsole[ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
TCHAR g_sFontNameDisasm [ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
TCHAR g_sFontNameInfo [ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
TCHAR g_sFontNameBranch [ MAX_FONT_NAME ] = TEXT("Webdings");
|
||||
char g_sFontNameDefault[ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
char g_sFontNameConsole[ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
char g_sFontNameDisasm [ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
char g_sFontNameInfo [ MAX_FONT_NAME ] = TEXT("Courier New");
|
||||
char g_sFontNameBranch [ MAX_FONT_NAME ] = TEXT("Webdings");
|
||||
HFONT g_hFontWebDings = (HFONT)0;
|
||||
#endif
|
||||
int g_iFontSpacing = FONT_SPACING_CLEAN;
|
||||
@ -648,7 +648,7 @@ Update_t CmdBookmarkClear (int nArgs)
|
||||
int iArg;
|
||||
for (iArg = 1; iArg <= nArgs; iArg++ )
|
||||
{
|
||||
if (! _tcscmp(g_aArgs[nArgs].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName))
|
||||
if (! strcmp(g_aArgs[nArgs].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName))
|
||||
{
|
||||
_Bookmark_Reset();
|
||||
break;
|
||||
@ -706,7 +706,7 @@ Update_t CmdBookmarkLoad (int nArgs)
|
||||
// strcpy( sMiniFileName, pFileName );
|
||||
// strcat( sMiniFileName, ".aws" ); // HACK: MAGIC STRING
|
||||
|
||||
// _tcscpy(sFileName, g_sCurrentDir); //
|
||||
// strcpy(sFileName, g_sCurrentDir); //
|
||||
// strcat(sFileName, sMiniFileName);
|
||||
}
|
||||
|
||||
@ -1007,14 +1007,14 @@ Update_t CmdBreakOpcode (int nArgs) // Breakpoint IFF Full-speed!
|
||||
if (nArgs > 1)
|
||||
return HelpLastCommand();
|
||||
|
||||
TCHAR sAction[ CONSOLE_WIDTH ] = TEXT("Current"); // default to display
|
||||
char sAction[ CONSOLE_WIDTH ] = TEXT("Current"); // default to display
|
||||
|
||||
if (nArgs == 1)
|
||||
{
|
||||
int iOpcode = g_aArgs[ 1] .nValue;
|
||||
g_iDebugBreakOnOpcode = iOpcode & 0xFF;
|
||||
|
||||
_tcscpy( sAction, TEXT("Setting") );
|
||||
strcpy( sAction, TEXT("Setting") );
|
||||
|
||||
if (iOpcode >= NUM_OPCODES)
|
||||
{
|
||||
@ -1062,12 +1062,12 @@ Update_t CmdBreakOnInterrupt (int nArgs)
|
||||
if (nArgs == 1 && nActive == -1)
|
||||
return HelpLastCommand();
|
||||
|
||||
TCHAR sAction[CONSOLE_WIDTH] = TEXT("Current"); // default to display
|
||||
char sAction[CONSOLE_WIDTH] = TEXT("Current"); // default to display
|
||||
|
||||
if (nArgs == 1)
|
||||
{
|
||||
g_bDebugBreakOnInterrupt = (iParam == PARAM_ON) ? true : false;
|
||||
_tcscpy(sAction, TEXT("Setting"));
|
||||
strcpy(sAction, TEXT("Setting"));
|
||||
}
|
||||
|
||||
ConsoleBufferPushFormat("%s Break on Interrupt: %s"
|
||||
@ -1880,7 +1880,7 @@ void _BWZ_ClearViaArgs ( int nArgs, Breakpoint_t * aBreakWatchZero, const int nM
|
||||
{
|
||||
iSlot = g_aArgs[nArgs].nValue;
|
||||
|
||||
if (! _tcscmp(g_aArgs[nArgs].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName))
|
||||
if (! strcmp(g_aArgs[nArgs].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName))
|
||||
{
|
||||
_BWZ_RemoveAll( aBreakWatchZero, nMax, nTotal );
|
||||
break;
|
||||
@ -1907,7 +1907,7 @@ void _BWZ_EnableDisableViaArgs ( int nArgs, Breakpoint_t * aBreakWatchZero, cons
|
||||
{
|
||||
iSlot = g_aArgs[nArgs].nValue;
|
||||
|
||||
if (! _tcscmp(g_aArgs[nArgs].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName))
|
||||
if (! strcmp(g_aArgs[nArgs].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName))
|
||||
{
|
||||
for ( ; iSlot < nMax; iSlot++ )
|
||||
{
|
||||
@ -2150,8 +2150,8 @@ Update_t CmdAssemble (int nArgs)
|
||||
int iArg = 1;
|
||||
|
||||
// undocumented ASM *
|
||||
if ((! _tcscmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName )) ||
|
||||
(! _tcscmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName )) )
|
||||
if ((! strcmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName )) ||
|
||||
(! strcmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName )) )
|
||||
{
|
||||
_CmdAssembleHashDump();
|
||||
}
|
||||
@ -2714,7 +2714,7 @@ Update_t CmdConfigLoad (int nArgs)
|
||||
{
|
||||
// TODO: CmdConfigRun( gaFileNameConfig )
|
||||
|
||||
// TCHAR sFileNameConfig[ MAX_PATH ];
|
||||
// char sFileNameConfig[ MAX_PATH ];
|
||||
if (! nArgs)
|
||||
{
|
||||
|
||||
@ -2854,7 +2854,7 @@ Update_t CmdConfigDisasm (int nArgs)
|
||||
|
||||
bool bDisplayCurrentSettings = false;
|
||||
|
||||
// if (! _tcscmp( g_aArgs[ 1 ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName ))
|
||||
// if (! strcmp( g_aArgs[ 1 ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName ))
|
||||
if (! nArgs)
|
||||
{
|
||||
bDisplayCurrentSettings = true;
|
||||
@ -4658,8 +4658,8 @@ Update_t CmdMemorySave (int nArgs)
|
||||
// (g_aArgs[ iArgComma2 ].eToken != TOKEN_COLON))
|
||||
// return Help_Arg_1( CMD_MEMORY_SAVE );
|
||||
|
||||
TCHAR sLoadSaveFilePath[ MAX_PATH ];
|
||||
_tcscpy( sLoadSaveFilePath, g_sCurrentDir ); // g_sProgramDir
|
||||
char sLoadSaveFilePath[ MAX_PATH ];
|
||||
strcpy( sLoadSaveFilePath, g_sCurrentDir ); // g_sProgramDir
|
||||
|
||||
RangeType_t eRange;
|
||||
eRange = Range_Get( nAddressStart, nAddress2, iArgAddress );
|
||||
@ -5897,7 +5897,7 @@ Update_t _CmdMemorySearch (int nArgs, bool bTextIsAscii = true )
|
||||
}
|
||||
else
|
||||
{
|
||||
TCHAR *pByte = pArg->sArg;
|
||||
char *pByte = pArg->sArg;
|
||||
|
||||
if (pArg->bType & TYPE_QUOTED_1)
|
||||
{
|
||||
@ -6070,7 +6070,7 @@ Update_t CmdRegisterSet (int nArgs)
|
||||
}
|
||||
else
|
||||
{
|
||||
TCHAR *pName = g_aArgs[1].sArg;
|
||||
char *pName = g_aArgs[1].sArg;
|
||||
int iParam;
|
||||
if (FindParam( pName, MATCH_EXACT, iParam, _PARAM_REGS_BEGIN, _PARAM_REGS_END ))
|
||||
{
|
||||
@ -6418,7 +6418,7 @@ Update_t CmdOutputRun (int nArgs)
|
||||
for ( int iLine = 0; iLine < nLine; iLine++ )
|
||||
{
|
||||
script.GetLine( iLine, g_pConsoleInput, CONSOLE_WIDTH-2 );
|
||||
g_nConsoleInputChars = _tcslen( g_pConsoleInput );
|
||||
g_nConsoleInputChars = strlen( g_pConsoleInput );
|
||||
bUpdateDisplay |= DebuggerProcessCommand( false );
|
||||
}
|
||||
}
|
||||
@ -6531,7 +6531,7 @@ bool ParseAssemblyListing ( bool bBytesToMemory, bool bAddSymbols )
|
||||
|
||||
uint32_t nAddress = INVALID_ADDRESS;
|
||||
|
||||
_tcscpy( sLine, sText );
|
||||
strcpy( sLine, sText );
|
||||
char *p = sLine;
|
||||
p = strstr( sLine, ":" );
|
||||
if (p)
|
||||
@ -6575,7 +6575,7 @@ bool ParseAssemblyListing ( bool bBytesToMemory, bool bAddSymbols )
|
||||
g_aSourceDebug[ (WORD) nAddress ] = iLine; // g_nSourceAssemblyLines;
|
||||
}
|
||||
|
||||
_tcscpy( sLine, sText );
|
||||
strcpy( sLine, sText );
|
||||
if (bAddSymbols)
|
||||
{
|
||||
// Add user symbol: symbolname EQU $address
|
||||
@ -7443,7 +7443,7 @@ Update_t CmdWindow (int nArgs)
|
||||
return Help_Arg_1( CMD_WINDOW );
|
||||
|
||||
int iParam;
|
||||
TCHAR *pName = g_aArgs[1].sArg;
|
||||
char *pName = g_aArgs[1].sArg;
|
||||
int nFound = FindParam( pName, MATCH_EXACT, iParam, _PARAM_WINDOW_BEGIN, _PARAM_WINDOW_END );
|
||||
if (nFound)
|
||||
{
|
||||
@ -7676,7 +7676,7 @@ Update_t CmdZeroPagePointer (int nArgs)
|
||||
int FindParam (LPCTSTR pLookupName, Match_e eMatch, int & iParam_, int iParamBegin, int iParamEnd, const bool bCaseSensitive /* false */ )
|
||||
{
|
||||
int nFound = 0;
|
||||
int nLen = _tcslen( pLookupName );
|
||||
int nLen = strlen( pLookupName );
|
||||
int iParam = 0;
|
||||
|
||||
if (! nLen)
|
||||
@ -7692,8 +7692,8 @@ int FindParam (LPCTSTR pLookupName, Match_e eMatch, int & iParam_, int iParamBeg
|
||||
// while (iParam < NUM_PARAMS )
|
||||
for (iParam = iParamBegin; iParam <= iParamEnd; iParam++ )
|
||||
{
|
||||
TCHAR *pParamName = g_aParameters[iParam].m_sName;
|
||||
int eCompare = _tcscmp(pLookupName, pParamName);
|
||||
char *pParamName = g_aParameters[iParam].m_sName;
|
||||
int eCompare = strcmp(pLookupName, pParamName);
|
||||
if (! eCompare) // exact match?
|
||||
{
|
||||
nFound++;
|
||||
@ -7706,7 +7706,7 @@ int FindParam (LPCTSTR pLookupName, Match_e eMatch, int & iParam_, int iParamBeg
|
||||
if (eMatch == MATCH_FUZZY)
|
||||
{
|
||||
#if ALLOW_INPUT_LOWERCASE
|
||||
TCHAR aLookup[ 256 ] = "";
|
||||
char aLookup[ 256 ] = "";
|
||||
for ( int i = 0; i < nLen; i++ )
|
||||
{
|
||||
aLookup[ i ] = toupper( pLookupName[ i ] );
|
||||
@ -7714,19 +7714,19 @@ int FindParam (LPCTSTR pLookupName, Match_e eMatch, int & iParam_, int iParamBeg
|
||||
#endif
|
||||
for (iParam = iParamBegin; iParam <= iParamEnd; iParam++ )
|
||||
{
|
||||
TCHAR *pParamName = g_aParameters[ iParam ].m_sName;
|
||||
char *pParamName = g_aParameters[ iParam ].m_sName;
|
||||
// _tcsnccmp
|
||||
|
||||
#if ALLOW_INPUT_LOWERCASE
|
||||
if (! _tcsncmp(aLookup, pParamName ,nLen))
|
||||
if (! strncmp(aLookup, pParamName ,nLen))
|
||||
#else
|
||||
if (! _tcsncmp(pLookupName, pParamName ,nLen))
|
||||
if (! strncmp(pLookupName, pParamName ,nLen))
|
||||
#endif
|
||||
{
|
||||
nFound++;
|
||||
iParam_ = g_aParameters[iParam].iCommand;
|
||||
|
||||
if (!_tcsicmp(pLookupName, pParamName)) // exact match?
|
||||
if (!_stricmp(pLookupName, pParamName)) // exact match?
|
||||
{
|
||||
nFound = 1; // Exact match takes precidence over fuzzy matches
|
||||
break;
|
||||
@ -7743,7 +7743,7 @@ int FindCommand ( LPCTSTR pName, CmdFuncPtr_t & pFunction_, int * iCommand_ )
|
||||
g_vPotentialCommands.clear();
|
||||
|
||||
int nFound = 0;
|
||||
int nLen = _tcslen( pName );
|
||||
int nLen = strlen( pName );
|
||||
int iCommand = 0;
|
||||
|
||||
if (! nLen)
|
||||
@ -7755,9 +7755,9 @@ int FindCommand ( LPCTSTR pName, CmdFuncPtr_t & pFunction_, int * iCommand_ )
|
||||
|
||||
while ((iCommand < NUM_COMMANDS_WITH_ALIASES)) // && (name[0] >= g_aCommands[iCommand].aName[0])) Command no longer in Alphabetical order
|
||||
{
|
||||
TCHAR *pCommandName = g_aCommands[iCommand].m_sName;
|
||||
char *pCommandName = g_aCommands[iCommand].m_sName;
|
||||
// int iCmp = strcasecmp( sCommand, pCommandName, nLen )
|
||||
if (! _tcsncmp(sCommand, pCommandName, nLen))
|
||||
if (! strncmp(sCommand, pCommandName, nLen))
|
||||
{
|
||||
pFunction_ = g_aCommands[iCommand].pFunction;
|
||||
if (pFunction_)
|
||||
@ -7772,8 +7772,8 @@ int FindCommand ( LPCTSTR pName, CmdFuncPtr_t & pFunction_, int * iCommand_ )
|
||||
|
||||
if (iCommand_)
|
||||
*iCommand_ = iCommand;
|
||||
// !_tcscmp
|
||||
if (!_tcsicmp(sCommand, pCommandName)) // exact match?
|
||||
// !strcmp
|
||||
if (!_stricmp(sCommand, pCommandName)) // exact match?
|
||||
{
|
||||
// if (iCommand_)
|
||||
// *iCommand_ = iCommand;
|
||||
@ -8995,7 +8995,7 @@ void DebugInitialize ()
|
||||
const char *pHelp = g_aCommands[ iCmd ].pHelpSummary;
|
||||
if (pHelp)
|
||||
{
|
||||
int nLen = _tcslen( pHelp ) + 2;
|
||||
int nLen = strlen( pHelp ) + 2;
|
||||
if (nLen > (CONSOLE_WIDTH-1))
|
||||
{
|
||||
ConsoleBufferPushFormat( "Warning: %s help is %d chars", pHelp, nLen );
|
||||
@ -9058,7 +9058,7 @@ void DebugReset (void)
|
||||
|
||||
// Add character to the input line
|
||||
//===========================================================================
|
||||
void DebuggerInputConsoleChar ( TCHAR ch )
|
||||
void DebuggerInputConsoleChar ( char ch )
|
||||
{
|
||||
_ASSERT(g_nAppMode == MODE_DEBUG);
|
||||
|
||||
@ -9101,7 +9101,7 @@ void DebuggerInputConsoleChar ( TCHAR ch )
|
||||
// TODO: must fix param matching to ignore case
|
||||
#if ALLOW_INPUT_LOWERCASE
|
||||
#else
|
||||
ch = (TCHAR)CharUpper((LPTSTR)ch);
|
||||
ch = (char)CharUpper((LPTSTR)ch);
|
||||
#endif
|
||||
}
|
||||
ConsoleInputChar( ch );
|
||||
|
@ -51,7 +51,7 @@
|
||||
extern Breakpoint_t g_aBreakpoints[ MAX_BREAKPOINTS ];
|
||||
|
||||
extern const char *g_aBreakpointSource [ NUM_BREAKPOINT_SOURCES ];
|
||||
extern const TCHAR *g_aBreakpointSymbols[ NUM_BREAKPOINT_OPERATORS ];
|
||||
extern const char *g_aBreakpointSymbols[ NUM_BREAKPOINT_OPERATORS ];
|
||||
|
||||
extern int g_nDebugBreakOnInvalid ;
|
||||
extern int g_iDebugBreakOnOpcode ;
|
||||
@ -71,7 +71,7 @@
|
||||
bool operator() ( const Command_t & rLHS, const Command_t & rRHS ) const
|
||||
{
|
||||
// return true if lhs<rhs
|
||||
return (_tcscmp( rLHS.m_sName, rRHS.m_sName ) <= 0) ? true : false;
|
||||
return (strcmp( rLHS.m_sName, rRHS.m_sName ) <= 0) ? true : false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -178,7 +178,7 @@
|
||||
void DebugInitialize ();
|
||||
void DebugReset(void);
|
||||
|
||||
void DebuggerInputConsoleChar( TCHAR ch );
|
||||
void DebuggerInputConsoleChar( char ch );
|
||||
void DebuggerProcessKey( int keycode );
|
||||
|
||||
void DebuggerUpdate();
|
||||
|
@ -899,9 +899,9 @@ bool _6502_IsOpcodeValid ( int iOpcode )
|
||||
|
||||
|
||||
//===========================================================================
|
||||
Hash_t AssemblerHashMnemonic ( const TCHAR * pMnemonic )
|
||||
Hash_t AssemblerHashMnemonic ( const char * pMnemonic )
|
||||
{
|
||||
const TCHAR *pText = pMnemonic;
|
||||
const char *pText = pMnemonic;
|
||||
Hash_t nMnemonicHash = 0;
|
||||
int iHighBits;
|
||||
|
||||
@ -944,7 +944,7 @@ void AssemblerHashOpcodes ()
|
||||
|
||||
for ( iOpcode = 0; iOpcode < NUM_OPCODES; iOpcode++ )
|
||||
{
|
||||
const TCHAR *pMnemonic = g_aOpcodes65C02[ iOpcode ].sMnemonic;
|
||||
const char *pMnemonic = g_aOpcodes65C02[ iOpcode ].sMnemonic;
|
||||
nMnemonicHash = AssemblerHashMnemonic( pMnemonic );
|
||||
g_aOpcodesHash[ iOpcode ] = nMnemonicHash;
|
||||
#if DEBUG_ASSEMBLER
|
||||
@ -965,8 +965,8 @@ void AssemblerHashDirectives ()
|
||||
for ( iOpcode = 0; iOpcode < NUM_ASM_M_DIRECTIVES; iOpcode++ )
|
||||
{
|
||||
int iNopcode = FIRST_M_DIRECTIVE + iOpcode;
|
||||
//. const TCHAR *pMnemonic = g_aAssemblerDirectivesMerlin[ iOpcode ].m_pMnemonic;
|
||||
const TCHAR *pMnemonic = g_aAssemblerDirectives[ iNopcode ].m_pMnemonic;
|
||||
//. const char *pMnemonic = g_aAssemblerDirectivesMerlin[ iOpcode ].m_pMnemonic;
|
||||
const char *pMnemonic = g_aAssemblerDirectives[ iNopcode ].m_pMnemonic;
|
||||
nMnemonicHash = AssemblerHashMnemonic( pMnemonic );
|
||||
g_aAssemblerDirectives[ iNopcode ].m_nHash = nMnemonicHash;
|
||||
}
|
||||
@ -1507,7 +1507,7 @@ bool Assemble( int iArg, int nArgs, WORD nAddress )
|
||||
|
||||
m_nAsmBaseAddress = nAddress;
|
||||
|
||||
TCHAR *pMnemonic = g_aArgs[ iArg ].sArg;
|
||||
char *pMnemonic = g_aArgs[ iArg ].sArg;
|
||||
Hash_t nMnemonicHash = AssemblerHashMnemonic( pMnemonic );
|
||||
|
||||
#if DEBUG_ASSEMBLER
|
||||
|
@ -206,7 +206,7 @@ extern int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ];
|
||||
bool _6502_IsOpcodeValid( int nOpcode );
|
||||
|
||||
// Assembler
|
||||
Hash_t AssemblerHashMnemonic ( const TCHAR * pMnemonic );
|
||||
Hash_t AssemblerHashMnemonic ( const char * pMnemonic );
|
||||
// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, std::vector<int> & vOpcodes );
|
||||
void _CmdAssembleHashDump ();
|
||||
|
||||
|
@ -516,7 +516,7 @@ void ConsoleInputReset ()
|
||||
|
||||
ConsoleInputClear();
|
||||
|
||||
// _tcscpy( g_aConsoleInput, g_sConsolePrompt ); // Assembler can change prompt
|
||||
// strcpy( g_aConsoleInput, g_sConsolePrompt ); // Assembler can change prompt
|
||||
g_aConsoleInput[0] = g_sConsolePrompt[0];
|
||||
g_nConsolePromptLen = 1;
|
||||
|
||||
|
@ -468,8 +468,8 @@ Update_t CmdHelpSpecific (int nArgs)
|
||||
bool bCategory = false;
|
||||
bool bDisplayCategory = true;
|
||||
|
||||
if ((! _tcscmp( g_aArgs[1].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName)) ||
|
||||
(! _tcscmp( g_aArgs[1].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName)) )
|
||||
if ((! strcmp( g_aArgs[1].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName)) ||
|
||||
(! strcmp( g_aArgs[1].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName)) )
|
||||
{
|
||||
bAllCommands = true;
|
||||
nArgs = NUM_COMMANDS;
|
||||
@ -1473,8 +1473,8 @@ Update_t CmdVersion (int nArgs)
|
||||
for (int iArg = 1; iArg <= g_nArgRaw; iArg++ )
|
||||
{
|
||||
// * PARAM_WILDSTAR -> ? PARAM_MEM_SEARCH_WILD
|
||||
if ((! _tcscmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName )) ||
|
||||
(! _tcscmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName )) )
|
||||
if ((! strcmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_WILDSTAR ].m_sName )) ||
|
||||
(! strcmp( g_aArgs[ iArg ].sArg, g_aParameters[ PARAM_MEM_SEARCH_WILD ].m_sName )) )
|
||||
{
|
||||
ConsoleBufferPushFormat( " Arg: %" SIZE_T_FMT " bytes * %d = %" SIZE_T_FMT " bytes",
|
||||
sizeof(Arg_t), MAX_ARGS, sizeof(g_aArgs) );
|
||||
|
@ -39,14 +39,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Arg_t g_aArgRaw[ MAX_ARGS ]; // pre-processing
|
||||
Arg_t g_aArgs [ MAX_ARGS ]; // post-processing (cooked)
|
||||
|
||||
const TCHAR TCHAR_LF = TEXT('\x0D');
|
||||
const TCHAR TCHAR_CR = TEXT('\x0A');
|
||||
const TCHAR TCHAR_SPACE = TEXT(' ');
|
||||
const TCHAR TCHAR_TAB = TEXT('\t');
|
||||
// const TCHAR TCHAR_QUOTED = TEXT('"');
|
||||
const TCHAR TCHAR_QUOTE_DOUBLE = TEXT('"');
|
||||
const TCHAR TCHAR_QUOTE_SINGLE = TEXT('\'');
|
||||
const TCHAR TCHAR_ESCAPE = TEXT('\x1B');
|
||||
const char TCHAR_LF = TEXT('\x0D');
|
||||
const char TCHAR_CR = TEXT('\x0A');
|
||||
const char TCHAR_SPACE = TEXT(' ');
|
||||
const char TCHAR_TAB = TEXT('\t');
|
||||
// const char TCHAR_QUOTED = TEXT('"');
|
||||
const char TCHAR_QUOTE_DOUBLE = TEXT('"');
|
||||
const char TCHAR_QUOTE_SINGLE = TEXT('\'');
|
||||
const char TCHAR_ESCAPE = TEXT('\x1B');
|
||||
|
||||
|
||||
// NOTE: ArgToken_e and g_aTokens must match!
|
||||
@ -104,14 +104,14 @@ int _Arg_1( int nValue )
|
||||
//===========================================================================
|
||||
int _Arg_1( LPTSTR pName )
|
||||
{
|
||||
int nLen = _tcslen( g_aArgs[1].sArg );
|
||||
int nLen = strlen( g_aArgs[1].sArg );
|
||||
if (nLen < MAX_ARG_LEN)
|
||||
{
|
||||
_tcscpy( g_aArgs[1].sArg, pName );
|
||||
strcpy( g_aArgs[1].sArg, pName );
|
||||
}
|
||||
else
|
||||
{
|
||||
_tcsncpy( g_aArgs[1].sArg, pName, MAX_ARG_LEN );
|
||||
strncpy( g_aArgs[1].sArg, pName, MAX_ARG_LEN );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -205,12 +205,12 @@ bool ArgsGetValue ( Arg_t *pArg, WORD * pAddressValue_, const int nBase )
|
||||
if (pArg == NULL)
|
||||
return false;
|
||||
|
||||
TCHAR *pSrc = & (pArg->sArg[ 0 ]);
|
||||
TCHAR *pEnd = NULL;
|
||||
char *pSrc = & (pArg->sArg[ 0 ]);
|
||||
char *pEnd = NULL;
|
||||
|
||||
if (pAddressValue_)
|
||||
{
|
||||
*pAddressValue_ = (WORD)(_tcstoul( pSrc, &pEnd, nBase) & _6502_MEM_END);
|
||||
*pAddressValue_ = (WORD)(strtoul( pSrc, &pEnd, nBase) & _6502_MEM_END);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ bool ArgsGetImmediateValue ( Arg_t *pArg, WORD * pAddressValue_ )
|
||||
|
||||
// Read console input, process the raw args, turning them into tokens and types.
|
||||
//===========================================================================
|
||||
int ArgsGet ( TCHAR * pInput )
|
||||
int ArgsGet ( char * pInput )
|
||||
{
|
||||
LPCTSTR pSrc = pInput;
|
||||
LPCTSTR pEnd = NULL;
|
||||
@ -313,7 +313,7 @@ int ArgsGet ( TCHAR * pInput )
|
||||
//if (iTokenSrc == TOKEN_QUOTE_DOUBLE)
|
||||
// nLen = nBuf;
|
||||
nLen = MIN( nBuf, MAX_ARG_LEN ); // NOTE: see Arg_t.sArg[] // GH#481
|
||||
_tcsncpy( pArg->sArg, pSrc, nLen );
|
||||
strncpy( pArg->sArg, pSrc, nLen );
|
||||
pArg->sArg[ nLen ] = 0;
|
||||
pArg->nArgLen = nLen;
|
||||
pArg->eToken = iTokenSrc;
|
||||
@ -393,7 +393,7 @@ bool ArgsGetRegisterValue ( Arg_t *pArg, WORD * pAddressValue_ )
|
||||
else
|
||||
if (iReg == BP_SRC_REG_PC)
|
||||
{
|
||||
if ((pArg->nArgLen == 2) && (_tcscmp( pArg->sArg, g_aBreakpointSource[ iReg ] ) == 0))
|
||||
if ((pArg->nArgLen == 2) && (strcmp( pArg->sArg, g_aBreakpointSource[ iReg ] ) == 0))
|
||||
{
|
||||
*pAddressValue_ = regs.pc ; bStatus = true; break;
|
||||
}
|
||||
@ -408,8 +408,8 @@ bool ArgsGetRegisterValue ( Arg_t *pArg, WORD * pAddressValue_ )
|
||||
void ArgsRawParse ( void )
|
||||
{
|
||||
const int BASE = 16; // hex
|
||||
TCHAR *pSrc = NULL;
|
||||
TCHAR *pEnd = NULL;
|
||||
char *pSrc = NULL;
|
||||
char *pEnd = NULL;
|
||||
|
||||
int iArg = 1;
|
||||
Arg_t *pArg = & g_aArgRaw[ iArg ];
|
||||
@ -423,7 +423,7 @@ void ArgsRawParse ( void )
|
||||
{
|
||||
pSrc = & (pArg->sArg[ 0 ]);
|
||||
|
||||
nAddressArg = (WORD)(_tcstoul( pSrc, &pEnd, BASE) & _6502_MEM_END);
|
||||
nAddressArg = (WORD)(strtoul( pSrc, &pEnd, BASE) & _6502_MEM_END);
|
||||
nAddressValue = nAddressArg;
|
||||
|
||||
bool bFound = false;
|
||||
@ -461,8 +461,8 @@ void ArgsRawParse ( void )
|
||||
int ArgsCook ( const int nArgs )
|
||||
{
|
||||
const int BASE = 16; // hex
|
||||
TCHAR *pSrc = NULL;
|
||||
TCHAR *pEnd2 = NULL;
|
||||
char *pSrc = NULL;
|
||||
char *pEnd2 = NULL;
|
||||
|
||||
int nArg = nArgs;
|
||||
int iArg = 1;
|
||||
@ -761,7 +761,7 @@ int ArgsCook ( const int nArgs )
|
||||
}
|
||||
else // not an operator, try (1) address, (2) symbol lookup
|
||||
{
|
||||
nAddressArg = (WORD)(_tcstoul( pSrc, &pEnd2, BASE) & _6502_MEM_END);
|
||||
nAddressArg = (WORD)(strtoul( pSrc, &pEnd2, BASE) & _6502_MEM_END);
|
||||
|
||||
if (! (pArg->bType & TYPE_NO_REG))
|
||||
{
|
||||
@ -804,7 +804,7 @@ const char * ParserFindToken( const char *pSrc, const TokenTable_t *aTokens, con
|
||||
if (! pSrc)
|
||||
return NULL;
|
||||
|
||||
const TCHAR *pName = NULL;
|
||||
const char *pName = NULL;
|
||||
int iToken;
|
||||
|
||||
// Look-ahead for <=
|
||||
@ -840,12 +840,12 @@ const char * ParserFindToken( const char *pSrc, const TokenTable_t *aTokens, con
|
||||
|
||||
|
||||
//===========================================================================
|
||||
const TCHAR * FindTokenOrAlphaNumeric ( const TCHAR *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ )
|
||||
const char * FindTokenOrAlphaNumeric ( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ )
|
||||
{
|
||||
if ( pToken_ )
|
||||
*pToken_ = NO_TOKEN;
|
||||
|
||||
const TCHAR *pEnd = pSrc;
|
||||
const char *pEnd = pSrc;
|
||||
|
||||
if (pSrc && (*pSrc))
|
||||
{
|
||||
@ -866,7 +866,7 @@ const TCHAR * FindTokenOrAlphaNumeric ( const TCHAR *pSrc, const TokenTable_t *a
|
||||
|
||||
|
||||
//===========================================================================
|
||||
void TextConvertTabsToSpaces( TCHAR *pDeTabified_, LPCTSTR pText, const int nDstSize, int nTabStop )
|
||||
void TextConvertTabsToSpaces( char *pDeTabified_, LPCTSTR pText, const int nDstSize, int nTabStop )
|
||||
{
|
||||
int TAB_SPACING = 8;
|
||||
int TAB_SPACING_1 = 16;
|
||||
@ -937,9 +937,9 @@ void TextConvertTabsToSpaces( TCHAR *pDeTabified_, LPCTSTR pText, const int nDst
|
||||
|
||||
// @return Length of new string
|
||||
//===========================================================================
|
||||
int RemoveWhiteSpaceReverse ( TCHAR *pSrc )
|
||||
int RemoveWhiteSpaceReverse ( char *pSrc )
|
||||
{
|
||||
int nLen = _tcslen( pSrc );
|
||||
int nLen = strlen( pSrc );
|
||||
char *pDst = pSrc + nLen;
|
||||
while (nLen--)
|
||||
{
|
||||
|
@ -4,9 +4,9 @@
|
||||
#include "Util_Text.h"
|
||||
|
||||
const char * ParserFindToken( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
|
||||
const TCHAR * FindTokenOrAlphaNumeric ( const TCHAR *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
|
||||
const char * FindTokenOrAlphaNumeric ( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
|
||||
int RemoveWhiteSpaceReverse( char *pSrc );
|
||||
void TextConvertTabsToSpaces( TCHAR *pDeTabified_, LPCTSTR pText, const int nDstSize, int nTabStop = 0 );
|
||||
void TextConvertTabsToSpaces( char *pDeTabified_, LPCTSTR pText, const int nDstSize, int nTabStop = 0 );
|
||||
|
||||
inline const char* SkipUntilToken( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e *pToken_ )
|
||||
{
|
||||
@ -29,16 +29,16 @@ inline const char* SkipUntilToken( const char *pSrc, const TokenTable_t *aTokens
|
||||
extern Arg_t g_aArgRaw[ MAX_ARGS ]; // pre-processing
|
||||
extern Arg_t g_aArgs [ MAX_ARGS ]; // post-processing
|
||||
|
||||
extern const TCHAR * g_pConsoleFirstArg; // = 0; // points to first arg
|
||||
extern const char * g_pConsoleFirstArg; // = 0; // points to first arg
|
||||
|
||||
extern const TokenTable_t g_aTokens[ NUM_TOKENS ];
|
||||
|
||||
extern const TCHAR TCHAR_LF ;//= 0x0D;
|
||||
extern const TCHAR TCHAR_CR ;//= 0x0A;
|
||||
extern const TCHAR TCHAR_SPACE ;//= TEXT(' ');
|
||||
extern const TCHAR TCHAR_TAB ;//= TEXT('\t');
|
||||
extern const TCHAR TCHAR_QUOTE_DOUBLE;
|
||||
extern const TCHAR TCHAR_QUOTE_SINGLE;
|
||||
extern const char TCHAR_LF ;//= 0x0D;
|
||||
extern const char TCHAR_CR ;//= 0x0A;
|
||||
extern const char TCHAR_SPACE ;//= TEXT(' ');
|
||||
extern const char TCHAR_TAB ;//= TEXT('\t');
|
||||
extern const char TCHAR_QUOTE_DOUBLE;
|
||||
extern const char TCHAR_QUOTE_SINGLE;
|
||||
|
||||
// Prototypes _______________________________________________________________
|
||||
|
||||
@ -52,7 +52,7 @@ inline const char* SkipUntilToken( const char *pSrc, const TokenTable_t *aTokens
|
||||
|
||||
bool ArgsGetValue ( Arg_t *pArg, WORD * pAddressValue_, const int nBase = 16 );
|
||||
bool ArgsGetImmediateValue ( Arg_t *pArg, WORD * pAddressValue_ );
|
||||
int ArgsGet ( TCHAR * pInput );
|
||||
int ArgsGet ( char * pInput );
|
||||
bool ArgsGetRegisterValue ( Arg_t *pArg, WORD * pAddressValue_ );
|
||||
void ArgsRawParse ( void );
|
||||
int ArgsCook ( const int nArgs ); // const int bProcessMask );
|
||||
|
@ -182,7 +182,7 @@ bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable
|
||||
SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin();
|
||||
while (iSymbol != g_aSymbols[iTable].end())
|
||||
{
|
||||
if (!_tcsicmp( iSymbol->second.c_str(), pSymbol))
|
||||
if (!_stricmp( iSymbol->second.c_str(), pSymbol))
|
||||
{
|
||||
if (pAddress_)
|
||||
{
|
||||
@ -221,15 +221,15 @@ WORD GetAddressFromSymbol (const char* pSymbol)
|
||||
//===========================================================================
|
||||
bool String2Address( LPCTSTR pText, WORD & nAddress_ )
|
||||
{
|
||||
TCHAR sHexApple[ CONSOLE_WIDTH ];
|
||||
char sHexApple[ CONSOLE_WIDTH ];
|
||||
|
||||
if (pText[0] == '$')
|
||||
{
|
||||
if (!TextIsHexString( pText+1))
|
||||
return false;
|
||||
|
||||
_tcscpy( sHexApple, "0x" );
|
||||
_tcsncpy( sHexApple+2, pText+1, MAX_SYMBOLS_LEN - 3 );
|
||||
strcpy( sHexApple, "0x" );
|
||||
strncpy( sHexApple+2, pText+1, MAX_SYMBOLS_LEN - 3 );
|
||||
sHexApple[2 + (MAX_SYMBOLS_LEN - 3) - 1] = 0;
|
||||
pText = sHexApple;
|
||||
}
|
||||
@ -241,14 +241,14 @@ bool String2Address( LPCTSTR pText, WORD & nAddress_ )
|
||||
if (!TextIsHexString( pText+2))
|
||||
return false;
|
||||
|
||||
TCHAR *pEnd;
|
||||
nAddress_ = (WORD) _tcstol( pText, &pEnd, 16 );
|
||||
char *pEnd;
|
||||
nAddress_ = (WORD) strtol( pText, &pEnd, 16 );
|
||||
return true;
|
||||
}
|
||||
if (TextIsHexString( pText ))
|
||||
{
|
||||
TCHAR *pEnd;
|
||||
nAddress_ = (WORD) _tcstol( pText, &pEnd, 16 );
|
||||
char *pEnd;
|
||||
nAddress_ = (WORD) strtol( pText, &pEnd, 16 );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -877,7 +877,7 @@ void SymbolUpdate ( SymbolTable_Index_e eSymbolTable, const char *pSymbolName, W
|
||||
if (bRemoveSymbol)
|
||||
pSymbolName = g_aArgs[2].sArg;
|
||||
|
||||
size_t nSymLen = _tcslen( pSymbolName );
|
||||
size_t nSymLen = strlen( pSymbolName );
|
||||
if (nSymLen < MAX_SYMBOLS_LEN)
|
||||
{
|
||||
WORD nAddressPrev;
|
||||
@ -964,7 +964,7 @@ Update_t _CmdSymbolsUpdate( int nArgs, int bSymbolTables )
|
||||
bool bRemoveSymbol = false;
|
||||
bool bUpdateSymbol = false;
|
||||
|
||||
TCHAR *pSymbolName = g_aArgs[1].sArg;
|
||||
char *pSymbolName = g_aArgs[1].sArg;
|
||||
WORD nAddress = g_aArgs[3].nValue;
|
||||
|
||||
if ((nArgs == 2)
|
||||
|
@ -149,7 +149,7 @@ bool _CmdConfigFont(int iFont, LPCSTR pFontName, int iPitchFamily, int nFontHeig
|
||||
if (iFont == FONT_DISASM_DEFAULT)
|
||||
_UpdateWindowFontHeights(nFontHeight);
|
||||
|
||||
_tcsncpy(pFont->_sFontName, pFontName, MAX_FONT_NAME - 1);
|
||||
strncpy(pFont->_sFontName, pFontName, MAX_FONT_NAME - 1);
|
||||
pFont->_sFontName[MAX_FONT_NAME - 1] = 0;
|
||||
|
||||
Win32Frame& win32Frame = Win32Frame::GetWin32Frame();
|
||||
@ -160,7 +160,7 @@ bool _CmdConfigFont(int iFont, LPCSTR pFontName, int iPitchFamily, int nFontHeig
|
||||
GetTextMetrics(hDC, &tm);
|
||||
|
||||
SIZE size;
|
||||
TCHAR sText[] = "W";
|
||||
char sText[] = "W";
|
||||
int nLen = 1;
|
||||
|
||||
int nFontWidthAvg;
|
||||
@ -271,8 +271,8 @@ Update_t CmdConfigFont(int nArgs)
|
||||
iArg = 1;
|
||||
|
||||
// FONT * is undocumented, like VERSION *
|
||||
if ((!_tcscmp(g_aArgs[iArg].sArg, g_aParameters[PARAM_WILDSTAR].m_sName)) ||
|
||||
(!_tcscmp(g_aArgs[iArg].sArg, g_aParameters[PARAM_MEM_SEARCH_WILD].m_sName)))
|
||||
if ((!strcmp(g_aArgs[iArg].sArg, g_aParameters[PARAM_WILDSTAR].m_sName)) ||
|
||||
(!strcmp(g_aArgs[iArg].sArg, g_aParameters[PARAM_MEM_SEARCH_WILD].m_sName)))
|
||||
{
|
||||
ConsoleBufferPushFormat("Lines: %d Font Px: %d Line Px: %d"
|
||||
, g_nDisasmDisplayLines
|
||||
@ -451,7 +451,7 @@ Update_t CmdConfigSetFont(int nArgs)
|
||||
{
|
||||
#if OLD_FONT
|
||||
HFONT hFont = (HFONT)0;
|
||||
TCHAR* pFontName = NULL;
|
||||
char* pFontName = NULL;
|
||||
int nHeight = g_nFontHeight;
|
||||
int iFontTarget = FONT_DISASM_DEFAULT;
|
||||
int iFontPitch = FIXED_PITCH | FF_MODERN;
|
||||
|
@ -1826,8 +1826,8 @@ bool Disk2InterfaceCard::UserSelectNewDiskImage(const int drive, LPCSTR pszFilen
|
||||
return false;
|
||||
}
|
||||
|
||||
TCHAR directory[MAX_PATH];
|
||||
TCHAR filename[MAX_PATH];
|
||||
char directory[MAX_PATH];
|
||||
char filename[MAX_PATH];
|
||||
|
||||
StringCbCopy(filename, MAX_PATH, pszFilename);
|
||||
|
||||
|
@ -261,14 +261,14 @@ UINT ImageGetMaxNibblesPerTrack(ImageInfo* const pImageInfo)
|
||||
|
||||
void GetImageTitle(LPCTSTR pPathname, std::string & pImageName, std::string & pFullName)
|
||||
{
|
||||
TCHAR imagetitle[ MAX_DISK_FULL_NAME+1 ];
|
||||
char imagetitle[ MAX_DISK_FULL_NAME+1 ];
|
||||
LPCTSTR startpos = pPathname;
|
||||
|
||||
// imagetitle = <FILENAME.EXT>
|
||||
if (_tcsrchr(startpos, TEXT(PATH_SEPARATOR)))
|
||||
startpos = _tcsrchr(startpos, TEXT(PATH_SEPARATOR))+1;
|
||||
if (strrchr(startpos, TEXT(PATH_SEPARATOR)))
|
||||
startpos = strrchr(startpos, TEXT(PATH_SEPARATOR))+1;
|
||||
|
||||
_tcsncpy(imagetitle, startpos, MAX_DISK_FULL_NAME);
|
||||
strncpy(imagetitle, startpos, MAX_DISK_FULL_NAME);
|
||||
imagetitle[MAX_DISK_FULL_NAME] = 0;
|
||||
|
||||
// if imagetitle contains a lowercase char, then found=1 (why?)
|
||||
@ -283,7 +283,7 @@ void GetImageTitle(LPCTSTR pPathname, std::string & pImageName, std::string & pF
|
||||
}
|
||||
|
||||
if ((!found) && (loop > 2))
|
||||
CharLowerBuff(imagetitle+1, _tcslen(imagetitle+1));
|
||||
CharLowerBuff(imagetitle+1, strlen(imagetitle+1));
|
||||
|
||||
// pFullName = <FILENAME.EXT>
|
||||
pFullName = imagetitle;
|
||||
@ -291,8 +291,8 @@ void GetImageTitle(LPCTSTR pPathname, std::string & pImageName, std::string & pF
|
||||
if (imagetitle[0])
|
||||
{
|
||||
LPTSTR dot = imagetitle;
|
||||
if (_tcsrchr(dot, TEXT('.')))
|
||||
dot = _tcsrchr(dot, TEXT('.'));
|
||||
if (strrchr(dot, TEXT('.')))
|
||||
dot = strrchr(dot, TEXT('.'));
|
||||
if (dot > imagetitle)
|
||||
*dot = 0;
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ public:
|
||||
CDoImage(void) {}
|
||||
virtual ~CDoImage(void) {}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
if (!IsValidImageSize(dwImageSize))
|
||||
return eMismatch;
|
||||
@ -690,7 +690,7 @@ public:
|
||||
CPoImage(void) {}
|
||||
virtual ~CPoImage(void) {}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
if (!IsValidImageSize(dwImageSize))
|
||||
return eMismatch;
|
||||
@ -757,7 +757,7 @@ public:
|
||||
|
||||
static const UINT NIB1_TRACK_SIZE = NIBBLES_PER_TRACK_NIB;
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
if (dwImageSize < NIB1_TRACK_SIZE*TRACKS_STANDARD || dwImageSize % NIB1_TRACK_SIZE != 0 || dwImageSize > NIB1_TRACK_SIZE*TRACKS_MAX)
|
||||
return eMismatch;
|
||||
@ -824,7 +824,7 @@ public:
|
||||
|
||||
static const UINT NIB2_TRACK_SIZE = 6384;
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
if (dwImageSize != NIB2_TRACK_SIZE*TRACKS_STANDARD)
|
||||
return eMismatch;
|
||||
@ -861,12 +861,12 @@ public:
|
||||
CHDVImage(void) {}
|
||||
virtual ~CHDVImage(void) {}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
m_uNumTracksInImage = dwImageSize / TRACK_DENIBBLIZED_SIZE; // Set to non-zero
|
||||
|
||||
// An HDV image can be any size (so if Ext == ".hdv" then accept any size)
|
||||
if (*pszExt && !_tcscmp(pszExt, ".hdv"))
|
||||
if (*pszExt && !strcmp(pszExt, ".hdv"))
|
||||
return eMatch;
|
||||
|
||||
if (dwImageSize < UNIDISK35_800K_SIZE)
|
||||
@ -902,7 +902,7 @@ public:
|
||||
CIIeImage(void) : m_pHeader(NULL) {}
|
||||
virtual ~CIIeImage(void) { delete [] m_pHeader; }
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
if (strncmp((const char *)pImage, "SIMSYSTEM_IIE", 13) || (*(pImage+13) > 3))
|
||||
return eMismatch;
|
||||
@ -1016,7 +1016,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
uint32_t dwLength = *(LPWORD)(pImage+2);
|
||||
bool bRes = (((dwLength+4) == dwImageSize) ||
|
||||
@ -1071,7 +1071,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
return (*(LPDWORD)pImage == 0x214C470A) ? eMatch : eMismatch; // "!LG\x0A"
|
||||
}
|
||||
@ -1135,7 +1135,7 @@ public:
|
||||
CWOZ1Image(void) {}
|
||||
virtual ~CWOZ1Image(void) {}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
CWOZHelper::WOZHeader* pWozHdr = (CWOZHelper::WOZHeader*) pImage;
|
||||
|
||||
@ -1256,7 +1256,7 @@ public:
|
||||
CWOZ2Image(void) {}
|
||||
virtual ~CWOZ2Image(void) {}
|
||||
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt)
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt)
|
||||
{
|
||||
CWOZHelper::WOZHeader* pWozHdr = (CWOZHelper::WOZHeader*) pImage;
|
||||
|
||||
@ -1546,29 +1546,29 @@ eDetectResult CWOZHelper::ProcessChunks(ImageInfo* pImageInfo, uint32_t& dwOffse
|
||||
// - harddisk-normal-create also doesn't create a max size image-buffer
|
||||
|
||||
// DETERMINE THE FILE'S EXTENSION AND CONVERT IT TO LOWERCASE
|
||||
void CImageHelperBase::GetCharLowerExt(TCHAR* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize)
|
||||
void CImageHelperBase::GetCharLowerExt(char* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize)
|
||||
{
|
||||
LPCTSTR pImageFileExt = pszImageFilename;
|
||||
|
||||
if (_tcsrchr(pImageFileExt, TEXT(PATH_SEPARATOR)))
|
||||
pImageFileExt = _tcsrchr(pImageFileExt, TEXT(PATH_SEPARATOR))+1;
|
||||
if (strrchr(pImageFileExt, TEXT(PATH_SEPARATOR)))
|
||||
pImageFileExt = strrchr(pImageFileExt, TEXT(PATH_SEPARATOR))+1;
|
||||
|
||||
if (_tcsrchr(pImageFileExt, TEXT('.')))
|
||||
pImageFileExt = _tcsrchr(pImageFileExt, TEXT('.'));
|
||||
if (strrchr(pImageFileExt, TEXT('.')))
|
||||
pImageFileExt = strrchr(pImageFileExt, TEXT('.'));
|
||||
|
||||
_tcsncpy(pszExt, pImageFileExt, uExtSize);
|
||||
strncpy(pszExt, pImageFileExt, uExtSize);
|
||||
pszExt[uExtSize - 1] = 0;
|
||||
|
||||
CharLowerBuff(pszExt, _tcslen(pszExt));
|
||||
CharLowerBuff(pszExt, strlen(pszExt));
|
||||
}
|
||||
|
||||
void CImageHelperBase::GetCharLowerExt2(TCHAR* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize)
|
||||
void CImageHelperBase::GetCharLowerExt2(char* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize)
|
||||
{
|
||||
TCHAR szFilename[MAX_PATH];
|
||||
_tcsncpy(szFilename, pszImageFilename, MAX_PATH);
|
||||
char szFilename[MAX_PATH];
|
||||
strncpy(szFilename, pszImageFilename, MAX_PATH);
|
||||
szFilename[MAX_PATH - 1] = 0;
|
||||
|
||||
TCHAR* pLastDot = _tcsrchr(szFilename, TEXT('.'));
|
||||
char* pLastDot = strrchr(szFilename, TEXT('.'));
|
||||
if (pLastDot)
|
||||
*pLastDot = 0;
|
||||
|
||||
@ -1614,7 +1614,7 @@ ImageError_e CImageHelperBase::CheckGZipFile(LPCTSTR pszImageFilename, ImageInfo
|
||||
//
|
||||
|
||||
// Strip .gz then try to determine the file's extension and convert it to lowercase
|
||||
TCHAR szExt[_MAX_EXT] = "";
|
||||
char szExt[_MAX_EXT] = "";
|
||||
GetCharLowerExt2(szExt, pszImageFilename, _MAX_EXT);
|
||||
|
||||
uint32_t dwSize = nLen;
|
||||
@ -1700,7 +1700,7 @@ ImageError_e CImageHelperBase::CheckZipFile(LPCTSTR pszImageFilename, ImageInfo*
|
||||
throw eIMAGE_ERROR_ZIP;
|
||||
|
||||
// Determine the file's extension and convert it to lowercase
|
||||
TCHAR szExt[_MAX_EXT] = "";
|
||||
char szExt[_MAX_EXT] = "";
|
||||
GetCharLowerExt(szExt, szFilename, _MAX_EXT);
|
||||
|
||||
uint32_t dwSize = nLen;
|
||||
@ -1826,7 +1826,7 @@ ImageError_e CImageHelperBase::CheckNormalFile(LPCTSTR pszImageFilename, ImageIn
|
||||
return eIMAGE_ERROR_UNABLE_TO_OPEN;
|
||||
|
||||
// Determine the file's extension and convert it to lowercase
|
||||
TCHAR szExt[_MAX_EXT] = "";
|
||||
char szExt[_MAX_EXT] = "";
|
||||
GetCharLowerExt(szExt, pszImageFilename, _MAX_EXT);
|
||||
|
||||
uint32_t dwSize = GetFileSize(hFile, NULL);
|
||||
@ -1961,7 +1961,7 @@ ImageError_e CImageHelperBase::Open( LPCTSTR pszImageFilename,
|
||||
if (Err != eIMAGE_ERROR_NONE)
|
||||
return Err;
|
||||
|
||||
TCHAR szFilename[MAX_PATH] = { 0 };
|
||||
char szFilename[MAX_PATH] = { 0 };
|
||||
DWORD uNameLen = GetFullPathName(pszImageFilename, MAX_PATH, szFilename, NULL);
|
||||
pImageInfo->szFilename = szFilename;
|
||||
if (uNameLen == 0 || uNameLen >= MAX_PATH)
|
||||
@ -2024,7 +2024,7 @@ CDiskImageHelper::CDiskImageHelper(void) :
|
||||
m_vecImageTypes.push_back( new CPrgImage );
|
||||
}
|
||||
|
||||
CImageBase* CDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo)
|
||||
CImageBase* CDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const char* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo)
|
||||
{
|
||||
dwOffset = 0;
|
||||
m_MacBinaryHelper.DetectHdr(pImage, dwSize, dwOffset);
|
||||
@ -2054,7 +2054,7 @@ CImageBase* CDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR
|
||||
{
|
||||
for (UINT uLoop=0; uLoop < GetNumImages() && imageType == eImageUNKNOWN; uLoop++)
|
||||
{
|
||||
if (*pszExt && _tcsstr(GetImage(uLoop)->GetRejectExtensions(), pszExt))
|
||||
if (*pszExt && strstr(GetImage(uLoop)->GetRejectExtensions(), pszExt))
|
||||
continue;
|
||||
|
||||
eDetectResult Result = GetImage(uLoop)->Detect(pImage, dwSize, pszExt);
|
||||
@ -2113,7 +2113,7 @@ CImageBase* CDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR
|
||||
return pImageType;
|
||||
}
|
||||
|
||||
CImageBase* CDiskImageHelper::GetImageForCreation(const TCHAR* pszExt, uint32_t* pCreateImageSize)
|
||||
CImageBase* CDiskImageHelper::GetImageForCreation(const char* pszExt, uint32_t* pCreateImageSize)
|
||||
{
|
||||
// WE CREATE ONLY DOS ORDER (DO), 6656-NIBBLE (NIB) OR WOZ2 (WOZ) FORMAT FILES
|
||||
for (UINT uLoop = 0; uLoop < GetNumImages(); uLoop++)
|
||||
@ -2121,7 +2121,7 @@ CImageBase* CDiskImageHelper::GetImageForCreation(const TCHAR* pszExt, uint32_t*
|
||||
if (!GetImage(uLoop)->AllowCreate())
|
||||
continue;
|
||||
|
||||
if (*pszExt && _tcsstr(GetImage(uLoop)->GetCreateExtensions(), pszExt))
|
||||
if (*pszExt && strstr(GetImage(uLoop)->GetCreateExtensions(), pszExt))
|
||||
{
|
||||
CImageBase* pImageType = GetImage(uLoop);
|
||||
|
||||
@ -2159,7 +2159,7 @@ CHardDiskImageHelper::CHardDiskImageHelper(void) :
|
||||
m_vecImageTypes.push_back( new CHDVImage );
|
||||
}
|
||||
|
||||
CImageBase* CHardDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo)
|
||||
CImageBase* CHardDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const char* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo)
|
||||
{
|
||||
dwOffset = 0;
|
||||
m_Result2IMG = m_2IMGHelper.DetectHdr(pImage, dwSize, dwOffset);
|
||||
@ -2168,7 +2168,7 @@ CImageBase* CHardDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const T
|
||||
|
||||
for (UINT uLoop=0; uLoop < GetNumImages() && ImageType == eImageUNKNOWN; uLoop++)
|
||||
{
|
||||
if (*pszExt && _tcsstr(GetImage(uLoop)->GetRejectExtensions(), pszExt))
|
||||
if (*pszExt && strstr(GetImage(uLoop)->GetRejectExtensions(), pszExt))
|
||||
continue;
|
||||
|
||||
eDetectResult Result = GetImage(uLoop)->Detect(pImage, dwSize, pszExt);
|
||||
@ -2196,7 +2196,7 @@ CImageBase* CHardDiskImageHelper::Detect(LPBYTE pImage, uint32_t dwSize, const T
|
||||
return pImageType;
|
||||
}
|
||||
|
||||
CImageBase* CHardDiskImageHelper::GetImageForCreation(const TCHAR* pszExt, uint32_t* pCreateImageSize)
|
||||
CImageBase* CHardDiskImageHelper::GetImageForCreation(const char* pszExt, uint32_t* pCreateImageSize)
|
||||
{
|
||||
// NB. Not supported for HardDisks
|
||||
// - Would need to create a default 16-block file like CiderPress
|
||||
@ -2206,7 +2206,7 @@ CImageBase* CHardDiskImageHelper::GetImageForCreation(const TCHAR* pszExt, uint3
|
||||
if (!GetImage(uLoop)->AllowCreate())
|
||||
continue;
|
||||
|
||||
if (*pszExt && _tcsstr(GetImage(uLoop)->GetCreateExtensions(), pszExt))
|
||||
if (*pszExt && strstr(GetImage(uLoop)->GetCreateExtensions(), pszExt))
|
||||
{
|
||||
CImageBase* pImageType = GetImage(uLoop);
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
virtual ~CImageBase(void);
|
||||
|
||||
virtual bool Boot(ImageInfo* pImageInfo) { return false; }
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const TCHAR* pszExt) = 0;
|
||||
virtual eDetectResult Detect(const LPBYTE pImage, const uint32_t dwImageSize, const char* pszExt) = 0;
|
||||
virtual void Read(ImageInfo* pImageInfo, const float phase, LPBYTE pTrackImageBuffer, int* pNibbles, UINT* pBitCount, bool enhanceDisk) { }
|
||||
virtual bool Read(ImageInfo* pImageInfo, UINT nBlock, LPBYTE pBlockBuffer) { return false; }
|
||||
virtual void Write(ImageInfo* pImageInfo, const float phase, LPBYTE pTrackImageBuffer, int nNibbles) { }
|
||||
@ -380,8 +380,8 @@ public:
|
||||
void Close(ImageInfo* pImageInfo);
|
||||
bool WOZUpdateInfo(ImageInfo* pImageInfo, uint32_t& dwOffset);
|
||||
|
||||
virtual CImageBase* Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo) = 0;
|
||||
virtual CImageBase* GetImageForCreation(const TCHAR* pszExt, uint32_t* pCreateImageSize) = 0;
|
||||
virtual CImageBase* Detect(LPBYTE pImage, uint32_t dwSize, const char* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo) = 0;
|
||||
virtual CImageBase* GetImageForCreation(const char* pszExt, uint32_t* pCreateImageSize) = 0;
|
||||
virtual UINT GetMaxImageSize(void) = 0;
|
||||
virtual UINT GetMinDetectSize(const UINT uImageSize, bool* pTempDetectBuffer) = 0;
|
||||
|
||||
@ -389,8 +389,8 @@ protected:
|
||||
ImageError_e CheckGZipFile(LPCTSTR pszImageFilename, ImageInfo* pImageInfo);
|
||||
ImageError_e CheckZipFile(LPCTSTR pszImageFilename, ImageInfo* pImageInfo, std::string& strFilenameInZip);
|
||||
ImageError_e CheckNormalFile(LPCTSTR pszImageFilename, ImageInfo* pImageInfo, const bool bCreateIfNecessary);
|
||||
void GetCharLowerExt(TCHAR* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize);
|
||||
void GetCharLowerExt2(TCHAR* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize);
|
||||
void GetCharLowerExt(char* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize);
|
||||
void GetCharLowerExt2(char* pszExt, LPCTSTR pszImageFilename, const UINT uExtSize);
|
||||
void SetImageInfo(ImageInfo* pImageInfo, FileType_e fileType, uint32_t dwOffset, CImageBase* pImageType, uint32_t dwSize);
|
||||
|
||||
UINT GetNumImages(void) { return m_vecImageTypes.size(); };
|
||||
@ -425,8 +425,8 @@ public:
|
||||
CDiskImageHelper(void);
|
||||
virtual ~CDiskImageHelper(void) {}
|
||||
|
||||
virtual CImageBase* Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo);
|
||||
virtual CImageBase* GetImageForCreation(const TCHAR* pszExt, uint32_t* pCreateImageSize);
|
||||
virtual CImageBase* Detect(LPBYTE pImage, uint32_t dwSize, const char* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo);
|
||||
virtual CImageBase* GetImageForCreation(const char* pszExt, uint32_t* pCreateImageSize);
|
||||
virtual UINT GetMaxImageSize(void);
|
||||
virtual UINT GetMinDetectSize(const UINT uImageSize, bool* pTempDetectBuffer);
|
||||
|
||||
@ -448,8 +448,8 @@ public:
|
||||
CHardDiskImageHelper(void);
|
||||
virtual ~CHardDiskImageHelper(void) {}
|
||||
|
||||
virtual CImageBase* Detect(LPBYTE pImage, uint32_t dwSize, const TCHAR* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo);
|
||||
virtual CImageBase* GetImageForCreation(const TCHAR* pszExt, uint32_t* pCreateImageSize);
|
||||
virtual CImageBase* Detect(LPBYTE pImage, uint32_t dwSize, const char* pszExt, uint32_t& dwOffset, ImageInfo* pImageInfo);
|
||||
virtual CImageBase* GetImageForCreation(const char* pszExt, uint32_t* pCreateImageSize);
|
||||
virtual UINT GetMaxImageSize(void);
|
||||
virtual UINT GetMinDetectSize(const UINT uImageSize, bool* pTempDetectBuffer);
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ void FrameBase::Video_TakeScreenShot(const Video::VideoScreenShot_e ScreenShotTy
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void FrameBase::Video_SaveScreenShot(const Video::VideoScreenShot_e ScreenShotType, const TCHAR* pScreenShotFileName)
|
||||
void FrameBase::Video_SaveScreenShot(const Video::VideoScreenShot_e ScreenShotType, const char* pScreenShotFileName)
|
||||
{
|
||||
FILE* pFile = fopen(pScreenShotFileName, "wb");
|
||||
if (pFile)
|
||||
@ -128,7 +128,7 @@ std::string FrameBase::Util_MakeScreenShotFileName() const
|
||||
}
|
||||
|
||||
// Returns TRUE if file exists, else FALSE
|
||||
bool FrameBase::Util_TestScreenShotFileName(const TCHAR* pFileName)
|
||||
bool FrameBase::Util_TestScreenShotFileName(const char* pFileName)
|
||||
{
|
||||
bool bFileExists = false;
|
||||
FILE* pFile = fopen(pFileName, "rt");
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
virtual std::string Video_GetScreenShotFolder() const = 0;
|
||||
void Video_TakeScreenShot(const Video::VideoScreenShot_e ScreenShotType);
|
||||
void Video_SaveScreenShot(const Video::VideoScreenShot_e ScreenShotType, const TCHAR* pScreenShotFileName);
|
||||
void Video_SaveScreenShot(const Video::VideoScreenShot_e ScreenShotType, const char* pScreenShotFileName);
|
||||
void SetDisplayPrintScreenFileName(bool state) { g_bDisplayPrintScreenFileName = state; }
|
||||
void Video_ResetScreenshotCounter(const std::string& pDiskImageFileName);
|
||||
|
||||
@ -78,7 +78,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string Util_MakeScreenShotFileName() const;
|
||||
bool Util_TestScreenShotFileName(const TCHAR* pFileName);
|
||||
bool Util_TestScreenShotFileName(const char* pFileName);
|
||||
|
||||
bool g_bShowPrintScreenWarningDialog;
|
||||
|
||||
|
@ -461,8 +461,8 @@ bool HarddiskInterfaceCard::Insert(const int iDrive, const std::string& pathname
|
||||
|
||||
bool HarddiskInterfaceCard::SelectImage(const int drive, LPCSTR pszFilename)
|
||||
{
|
||||
TCHAR directory[MAX_PATH];
|
||||
TCHAR filename[MAX_PATH];
|
||||
char directory[MAX_PATH];
|
||||
char filename[MAX_PATH];
|
||||
|
||||
StringCbCopy(filename, MAX_PATH, pszFilename);
|
||||
|
||||
|
@ -1912,22 +1912,22 @@ void MemInitializeROM(void)
|
||||
|
||||
if (pData == NULL)
|
||||
{
|
||||
TCHAR sRomFileName[ MAX_PATH ];
|
||||
char sRomFileName[ MAX_PATH ];
|
||||
switch (g_Apple2Type)
|
||||
{
|
||||
case A2TYPE_APPLE2: _tcscpy(sRomFileName, TEXT("APPLE2.ROM" )); break;
|
||||
case A2TYPE_APPLE2PLUS: _tcscpy(sRomFileName, TEXT("APPLE2_PLUS.ROM" )); break;
|
||||
case A2TYPE_APPLE2JPLUS: _tcscpy(sRomFileName, TEXT("APPLE2_JPLUS.ROM" )); break;
|
||||
case A2TYPE_APPLE2E: _tcscpy(sRomFileName, TEXT("APPLE2E.ROM" )); break;
|
||||
case A2TYPE_APPLE2EENHANCED:_tcscpy(sRomFileName, TEXT("APPLE2E_ENHANCED.ROM")); break;
|
||||
case A2TYPE_PRAVETS82: _tcscpy(sRomFileName, TEXT("PRAVETS82.ROM" )); break;
|
||||
case A2TYPE_PRAVETS8M: _tcscpy(sRomFileName, TEXT("PRAVETS8M.ROM" )); break;
|
||||
case A2TYPE_PRAVETS8A: _tcscpy(sRomFileName, TEXT("PRAVETS8C.ROM" )); break;
|
||||
case A2TYPE_TK30002E: _tcscpy(sRomFileName, TEXT("TK3000e.ROM" )); break;
|
||||
case A2TYPE_BASE64A: _tcscpy(sRomFileName, TEXT("BASE64A.ROM" )); break;
|
||||
case A2TYPE_APPLE2: strcpy(sRomFileName, TEXT("APPLE2.ROM" )); break;
|
||||
case A2TYPE_APPLE2PLUS: strcpy(sRomFileName, TEXT("APPLE2_PLUS.ROM" )); break;
|
||||
case A2TYPE_APPLE2JPLUS: strcpy(sRomFileName, TEXT("APPLE2_JPLUS.ROM" )); break;
|
||||
case A2TYPE_APPLE2E: strcpy(sRomFileName, TEXT("APPLE2E.ROM" )); break;
|
||||
case A2TYPE_APPLE2EENHANCED:strcpy(sRomFileName, TEXT("APPLE2E_ENHANCED.ROM")); break;
|
||||
case A2TYPE_PRAVETS82: strcpy(sRomFileName, TEXT("PRAVETS82.ROM" )); break;
|
||||
case A2TYPE_PRAVETS8M: strcpy(sRomFileName, TEXT("PRAVETS8M.ROM" )); break;
|
||||
case A2TYPE_PRAVETS8A: strcpy(sRomFileName, TEXT("PRAVETS8C.ROM" )); break;
|
||||
case A2TYPE_TK30002E: strcpy(sRomFileName, TEXT("TK3000e.ROM" )); break;
|
||||
case A2TYPE_BASE64A: strcpy(sRomFileName, TEXT("BASE64A.ROM" )); break;
|
||||
default:
|
||||
{
|
||||
_tcscpy(sRomFileName, TEXT("Unknown type!"));
|
||||
strcpy(sRomFileName, TEXT("Unknown type!"));
|
||||
GetPropertySheet().ConfigSaveApple2Type(A2TYPE_APPLE2EENHANCED);
|
||||
}
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ bool ParallelPrinterCard::CheckPrint(void)
|
||||
m_inactivity = 0;
|
||||
if (m_file == NULL)
|
||||
{
|
||||
//TCHAR filepath[MAX_PATH * 2];
|
||||
//_tcsncpy(filepath, g_sProgramDir, MAX_PATH);
|
||||
//char filepath[MAX_PATH * 2];
|
||||
//strncpy(filepath, g_sProgramDir, MAX_PATH);
|
||||
//_tcsncat(filepath, _T("Printer.txt"), MAX_PATH);
|
||||
//file = fopen(filepath, "wb");
|
||||
if (m_bPrinterAppend )
|
||||
|
@ -96,13 +96,13 @@ BOOL RegLoadString (LPCTSTR section, LPCTSTR key, BOOL peruser, LPTSTR buffer, u
|
||||
|
||||
//===========================================================================
|
||||
BOOL RegLoadValue (LPCTSTR section, LPCTSTR key, BOOL peruser, uint32_t* value) {
|
||||
TCHAR buffer[32];
|
||||
char buffer[32];
|
||||
if (!RegLoadString(section, key, peruser, buffer, 32))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*value = (uint32_t)_ttoi(buffer);
|
||||
*value = (uint32_t)atoi(buffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ void RegSaveString (LPCTSTR section, LPCTSTR key, BOOL peruser, const std::strin
|
||||
0,
|
||||
REG_SZ,
|
||||
(CONST LPBYTE)buffer.c_str(),
|
||||
(buffer.size() + 1) * sizeof(TCHAR));
|
||||
(buffer.size() + 1) * sizeof(char));
|
||||
RegCloseKey(keyhandle);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
#ifdef __MINGW32__
|
||||
#define STRSAFE_NO_DEPRECATE
|
||||
#endif
|
||||
#include <tchar.h>
|
||||
|
||||
#include <crtdbg.h>
|
||||
// <strmif.h> has the correct IReferenceClock definition that works for both x86 and x64,
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <tchar.h>
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
#include "uilib.h"
|
||||
|
@ -236,7 +236,7 @@ void LoadConfiguration(bool loadImages)
|
||||
|
||||
//
|
||||
|
||||
TCHAR szFilename[MAX_PATH];
|
||||
char szFilename[MAX_PATH];
|
||||
|
||||
//
|
||||
|
||||
|
@ -30,7 +30,7 @@ enum VideoType_e
|
||||
, VT_DEFAULT = VT_COLOR_TV
|
||||
};
|
||||
|
||||
extern TCHAR g_aVideoChoices[];
|
||||
extern char g_aVideoChoices[];
|
||||
|
||||
enum VideoStyle_e
|
||||
{
|
||||
|
@ -344,7 +344,7 @@ void EnterMessageLoop(void)
|
||||
|
||||
static void GetProgramDirectory(void)
|
||||
{
|
||||
TCHAR programDir[MAX_PATH];
|
||||
char programDir[MAX_PATH];
|
||||
GetModuleFileName((HINSTANCE)0, programDir, MAX_PATH);
|
||||
programDir[MAX_PATH-1] = 0;
|
||||
|
||||
|
@ -404,7 +404,7 @@ void Win32Frame::DisplayLogo(void)
|
||||
}
|
||||
|
||||
// DRAW THE VERSION NUMBER
|
||||
TCHAR sFontName[] = TEXT("Arial");
|
||||
char sFontName[] = TEXT("Arial");
|
||||
HFONT font = CreateFont(-20, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET,
|
||||
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
|
||||
VARIABLE_PITCH | 4 | FF_SWISS,
|
||||
|
@ -330,7 +330,7 @@ void Win32Frame::DrawButton (HDC passdc, int number) {
|
||||
|
||||
ExtTextOut(dc,x+offset+22,rect.top,ETO_CLIPPED,&rect,
|
||||
pszBaseName,
|
||||
MIN(8,_tcslen(pszBaseName)),
|
||||
MIN(8,strlen(pszBaseName)),
|
||||
NULL);
|
||||
}
|
||||
if (!passdc)
|
||||
@ -1135,7 +1135,7 @@ LRESULT Win32Frame::WndProc(
|
||||
if (GetCardMgr().QuerySlot(SLOT6) == CT_Disk2)
|
||||
{
|
||||
Disk2InterfaceCard& disk2Card = dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT6));
|
||||
TCHAR filename[MAX_PATH];
|
||||
char filename[MAX_PATH];
|
||||
DragQueryFile((HDROP)wparam,0,filename,sizeof(filename));
|
||||
POINT point;
|
||||
DragQueryPoint((HDROP)wparam,&point);
|
||||
@ -1377,7 +1377,7 @@ LRESULT Win32Frame::WndProc(
|
||||
}
|
||||
else if (g_nAppMode == MODE_DEBUG)
|
||||
{
|
||||
DebuggerInputConsoleChar((TCHAR)wparam);
|
||||
DebuggerInputConsoleChar((char)wparam);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2108,7 +2108,7 @@ void Win32Frame::ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
||||
|
||||
// This is the default installation path of CiderPress.
|
||||
// It shall not be left blank, otherwise an explorer window will be open.
|
||||
TCHAR PathToCiderPress[MAX_PATH];
|
||||
char PathToCiderPress[MAX_PATH];
|
||||
RegLoadString(
|
||||
TEXT("Configuration"),
|
||||
REGVALUE_CIDERPRESSLOC,
|
||||
|
@ -1359,7 +1359,7 @@ int SyncEvents_test(void)
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int res = 1;
|
||||
init();
|
||||
|
@ -6,7 +6,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
@ -712,7 +712,7 @@ int GH451_test(void)
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int res = 1;
|
||||
init();
|
||||
|
@ -6,7 +6,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user