Removed LPCTSTR typedef

This commit is contained in:
Uwe Seimet
2021-08-25 21:49:33 +02:00
parent 4f7490f5bb
commit 050a59e3d4
6 changed files with 12 additions and 13 deletions
+2 -2
View File
@@ -99,8 +99,8 @@ void SCSIHD_NEC::Open(const Filepath& path)
}
// Determine parameters by extension
LPCTSTR ext = path.GetFileExt();
if (strcasecmp(ext, _T(".HDN")) == 0) {
const char *ext = path.GetFileExt();
if (!strcasecmp(ext, _T(".HDN"))) {
// Assuming sector size 512, number of sectors 25, number of heads 8 as default settings
imgoffset = 0;
imgsize = size;
+3 -3
View File
@@ -104,7 +104,7 @@ BOOL Fileio::Save(const Filepath& path, void *buffer, int size)
// オープン
//
//---------------------------------------------------------------------------
BOOL Fileio::Open(LPCTSTR fname, OpenMode mode, BOOL directIO)
BOOL Fileio::Open(const char *fname, OpenMode mode, BOOL directIO)
{
mode_t omode;
@@ -161,7 +161,7 @@ BOOL Fileio::Open(LPCTSTR fname, OpenMode mode, BOOL directIO)
// オープン
//
//---------------------------------------------------------------------------
BOOL Fileio::Open(LPCTSTR fname, OpenMode mode)
BOOL Fileio::Open(const char *fname, OpenMode mode)
{
return Open(fname, mode, FALSE);
@@ -183,7 +183,7 @@ BOOL Fileio::Open(const Filepath& path, OpenMode mode)
// オープン
//
//---------------------------------------------------------------------------
BOOL Fileio::OpenDIO(LPCTSTR fname, OpenMode mode)
BOOL Fileio::OpenDIO(const char *fname, OpenMode mode)
{
// O_DIRECT付きでオープン
+3 -3
View File
@@ -52,11 +52,11 @@ public:
BOOL Save(const Filepath& path, void *buffer, int size);
// RAMセーブ
BOOL Open(LPCTSTR fname, OpenMode mode);
BOOL Open(const char *fname, OpenMode mode);
// オープン
BOOL Open(const Filepath& path, OpenMode mode);
// オープン
BOOL OpenDIO(LPCTSTR fname, OpenMode mode);
BOOL OpenDIO(const char *fname, OpenMode mode);
// オープン
BOOL OpenDIO(const Filepath& path, OpenMode mode);
// オープン
@@ -76,7 +76,7 @@ public:
// 有効チェック
private:
BOOL Open(LPCTSTR fname, OpenMode mode, BOOL directIO);
BOOL Open(const char *fname, OpenMode mode, BOOL directIO);
// オープン
int handle; // ファイルハンドル
+2 -2
View File
@@ -135,14 +135,14 @@ void Filepath::Split()
// The returned pointer is temporary. Copy immediately.
//
//---------------------------------------------------------------------------
LPCTSTR Filepath::GetFileExt() const
const char *Filepath::GetFileExt() const
{
// 固定バッファへ合成
strcpy(FileExt, m_szExt);
// LPCTSTRとして返す
return (LPCTSTR)FileExt;
return (const char *)FileExt;
}
//---------------------------------------------------------------------------
+2 -2
View File
@@ -40,9 +40,9 @@ public:
// クリア
void SetPath(const char *path);
// ファイル設定(ユーザ) MBCS用
LPCTSTR GetPath() const { return m_szPath; }
const char *GetPath() const { return m_szPath; }
// パス名取得
LPCTSTR GetFileExt() const;
const char *GetFileExt() const;
// ショート名取得(LPCTSTR)
BOOL Save(Fileio *fio, int ver);
// セーブ
-1
View File
@@ -108,7 +108,6 @@ typedef uint32_t DWORD;
typedef int BOOL;
typedef char TCHAR;
typedef char *LPTSTR;
typedef const char *LPCTSTR;
#if !defined(FALSE)
#define FALSE 0