}
file_error core_fopen(const TCHAR *filename, UINT32 openflags, core_file **file)
{
- TCHAR *mode;
+ const TCHAR *mode;
if (openflags & OPEN_FLAG_CREATE)
mode = _T("wb");
static bool abr_loaded;
static tinyxml2::XMLDocument abr_xml[2];
-static TCHAR* abr_files[] = { _T("brainfile.xml"), _T("catlist.xml"), NULL };
+static const TCHAR* abr_files[] = { _T("brainfile.xml"), _T("catlist.xml"), NULL };
static void abrcheck(struct diskinfo *di)
{
static const TCHAR *epsonprintername;
static HFONT curFont;
static float curFontHorizPoints, curFontVertPoints;
-static TCHAR *curFontName;
+static const TCHAR *curFontName;
static HDC memHDC;
static LPOUTLINETEXTMETRIC otm;
#else
static int selectfont(Bit16u style)
{
- static TCHAR *thisFontName;
+ static const TCHAR *thisFontName;
static float thisFontHorizPoints;
static float thisFontVertPoints;
static Bit16u thisStyle;
{
Real64 horizPoints = 10.5;
Real64 vertPoints = 10.5;
- TCHAR *fontName;
+ const TCHAR *fontName;
if (curFont != NULL)
#ifdef WINFONT
static int currpage, pages;
static int pagetype;
-TCHAR *pname[] = { _T("OUT1"), _T("OUT2"), _T("MEM1"), _T("MEM2"), _T("DASM1"), _T("DASM2"), _T("BRKPTS"), _T("MISC"), _T("CUSTOM") };
+const TCHAR *pname[] = { _T("OUT1"), _T("OUT2"), _T("MEM1"), _T("MEM2"), _T("DASM1"), _T("DASM2"), _T("BRKPTS"), _T("MISC"), _T("CUSTOM") };
static int pstatuscolor[MAXPAGES];
static int dbgwnd_minx = 800, dbgwnd_miny = 600;
#include "direct3d.h"
-static TCHAR *D3DHEAD = _T("-");
+static const TCHAR *D3DHEAD = _T("-");
static bool showoverlay = true;
static int slicecnt;
return 1;
}
-static TCHAR *D3D_ErrorText (HRESULT error)
+static const TCHAR *D3D_ErrorText (HRESULT error)
{
return _T("");
}
return -1;
}
-static TCHAR *hdz[] = { _T("hdz"), _T("zip"), _T("rar"), _T("7z"), NULL };
+static const TCHAR *hdz[] = { _T("hdz"), _T("zip"), _T("rar"), _T("7z"), NULL };
static int progressdialogreturn;
static int progressdialogactive;
int state = 0;
memset(cmd, 0, 6); // TEST UNIT READY
- TCHAR *infotxt;
+ const TCHAR *infotxt;
if (do_scsi_in(h, cmd, 6, data, 0, true) < 0) {
state = 1;
infotxt = _T("Realtek hack, insert card.");
poscheck (hfd, len);
memcpy (hfd->cache, buffer, len);
if (hfd->handle_valid == HDF_HANDLE_WIN32_NORMAL) {
- TCHAR *name = hfd->emptyname == NULL ? _T("<unknown>") : hfd->emptyname;
+ const TCHAR *name = hfd->emptyname == NULL ? _T("<unknown>") : hfd->emptyname;
if (offset == 0) {
if (!hfd->handle->firstwrite && (hfd->flags & HFD_FLAGS_REALDRIVE) && !(hfd->flags & HFD_FLAGS_REALDRIVEPARTITION)) {
hfd->handle->firstwrite = true;
TCHAR tmp[32];
uae_u64 size = udi->size;
int nomedia = udi->nomedia;
- TCHAR *dang = _T("?");
- TCHAR *rw = _T("RW");
+ const TCHAR *dang = _T("?");
+ const TCHAR *rw = _T("RW");
bool noaccess = false;
if (outflags) {
FILE *fp = NULL;
int failed = 0;
int screenshot_max = 1000; // limit 999 iterations / screenshots
- TCHAR *format = _T("%s%s%s%03d.%s");
+ const TCHAR *format = _T("%s%s%s%03d.%s");
bool alpha = usealpha();
HBITMAP offscreen_bitmap = NULL; // bitmap that is converted to a DIB
/* HtmlHelp Initialization - optional component */
int WIN32_InitHtmlHelp (void)
{
- TCHAR *chm = _T("WinUAE.chm");
+ const TCHAR *chm = _T("WinUAE.chm");
int result = 0;
_stprintf(help_file, _T("%s%s"), start_path_data, chm);
if (!zfile_exists (help_file))
{ 0x400, _T("guidll.dll") },
{ 0, NULL }
};
-static TCHAR *getlanguagename(DWORD id)
+static const TCHAR *getlanguagename(DWORD id)
{
int i;
for (i = 0; langs[i].name; i++) {
#if LANG_DLL > 0
TCHAR dllbuf[MAX_DPATH];
- TCHAR *dllname;
+ const TCHAR *dllname;
dllname = getlanguagename (language);
if (dllname) {
DWORD dwVersionHandle, dwFileVersionInfoSize;
HMODULE h;
PFN_GetKey pfnGetKey;
int size;
- TCHAR *libname = _T("amigaforever.dll");
+ const TCHAR *libname = _T("amigaforever.dll");
h = WIN32_LoadLibrary(libname);
if (!h) {
return 1;
}
-static int shell_associate_2 (const TCHAR *extension, TCHAR *shellcommand, TCHAR *command, struct contextcommand *cc, const TCHAR *perceivedtype,
+static int shell_associate_2 (const TCHAR *extension, const TCHAR *shellcommand, const TCHAR *command, struct contextcommand *cc, const TCHAR *perceivedtype,
const TCHAR *description, const TCHAR *ext2, int icon)
{
TCHAR rpath1[MAX_DPATH], rpath2[MAX_DPATH], progid2[MAX_DPATH];
regclosetree (fkey);
return 1;
}
-static int shell_associate (const TCHAR *extension, TCHAR *command, struct contextcommand *cc, const TCHAR *perceivedtype, const TCHAR *description, const TCHAR *ext2, int icon)
+static int shell_associate (const TCHAR *extension, const TCHAR *command, struct contextcommand *cc, const TCHAR *perceivedtype, const TCHAR *description, const TCHAR *ext2, int icon)
{
int v = shell_associate_2 (extension, NULL, command, cc, perceivedtype, description, ext2, icon);
if (!_tcscmp (extension, _T(".uae")))
}
#if WINUAEPUBLICBETA > 0
-static TCHAR *BETAMESSAGE = {
+static const TCHAR *BETAMESSAGE = {
_T("This is unstable beta software. Click cancel if you are not comfortable using software that is incomplete and can have serious programming errors.")
};
#endif
TCHAR file_name[MAX_DPATH] = _T("");
TCHAR init_path[MAX_DPATH] = _T("");
BOOL result = FALSE;
- TCHAR *amiga_path = NULL, *initialdir = NULL, *defext = NULL;
+ TCHAR* amiga_path = NULL, * initialdir = NULL;
+ const TCHAR *defext = NULL;
TCHAR *p, *nextp;
int all = 1;
int next;
{
int id;
BOOL state;
- TCHAR *display;
- TCHAR *url;
+ const TCHAR *display;
+ const TCHAR *url;
} urlinfo;
static urlinfo urls[] =
setautocomplete (hDlg, ids[i]);
}
-static void wsetpath (HWND hDlg, TCHAR *name, DWORD d, TCHAR *def)
+static void wsetpath (HWND hDlg, const TCHAR *name, DWORD d, const TCHAR *def)
{
TCHAR tmp[MAX_DPATH];
static void init_displays_combo (HWND hDlg, bool rtg)
{
- TCHAR *adapter = _T("");
+ const TCHAR *adapter = _T("");
struct MultiDisplay *md = Displays;
int cnt = 0, cnt2 = 0;
int displaynum;
{
struct MultiDisplay *md = Displays;
LRESULT posn;
- TCHAR *adapter = _T("");
+ const TCHAR *adapter = _T("");
int cnt = 0, cnt2 = 0;
int displaynum;
int id = rtg ? IDC_RTG_DISPLAYSELECT : IDC_DISPLAYSELECT;
static void misc_kbled (HWND hDlg, int v, int nv)
{
- TCHAR *defname = v == IDC_KBLED1 ? _T("(NumLock)") : v == IDC_KBLED2 ? _T("(CapsLock)") : _T("(ScrollLock)");
+ const TCHAR *defname = v == IDC_KBLED1 ? _T("(NumLock)") : v == IDC_KBLED2 ? _T("(CapsLock)") : _T("(ScrollLock)");
SendDlgItemMessage (hDlg, v, CB_RESETCONTENT, 0, 0L);
SendDlgItemMessage (hDlg, v, CB_ADDSTRING, 0, (LPARAM)defname);
SendDlgItemMessage (hDlg, v, CB_ADDSTRING, 0, (LPARAM)_T("POWER"));
};
struct filterpreset {
- TCHAR *name;
+ const TCHAR *name;
int conf[27];
};
static const struct filterpreset filterpresets[] =
extern char *current_device_name;
-int device_get_config_int(char *name);
-char *device_get_config_string(char *name);
+int device_get_config_int(const char *name);
+char *device_get_config_string(const char *name);
enum
{
DEVICE_PS1 = 0x80 /*Device is only for IBM PS/1 Model 2011*/
};
-int model_get_config_int(char *s);
-char *model_get_config_string(char *s);
+int model_get_config_int(const char *s);
+char *model_get_config_string(const char *s);
#endif
{ "[386SX] AMI 386SX clone", ROM_AMI386SX, "ami386", { { "386SX", cpus_i386SX }, { "386DX", cpus_i386DX }, { "486", cpus_i486 } }, MODEL_GFX_NONE | MODEL_AT | MODEL_HAS_IDE, 512, 16384, 128, model_init, NULL },
};
-int rom_present(char *s)
+int rom_present(const char *s)
{
return 0;
}
#define _ROM_H_
FILE *romfopen(char *fn, char *mode);
-int rom_present(char *fn);
+int rom_present(const char *fn);
typedef struct rom_t
{
void x86illegal();
void x86seg_reset();
-void x86gpf(char *s, uint16_t error);
+void x86gpf(const char *s, uint16_t error);
void resetx86();
void softresetx86();
}
}
}
-void x86gpf(char *s, uint16_t error)
+void x86gpf(const char *s, uint16_t error)
{
// pclog("GPF %04X\n", error);
cpu_state.abrt = ABRT_GPF;
abrt_error = error;
}
-void x86ss(char *s, uint16_t error)
+void x86ss(const char *s, uint16_t error)
{
// pclog("SS %04X\n", error);
cpu_state.abrt = ABRT_SS;
abrt_error = error;
}
-void x86ts(char *s, uint16_t error)
+void x86ts(const char *s, uint16_t error)
{
// pclog("TS %04X\n", error);
cpu_state.abrt = ABRT_TS;
abrt_error = error;
}
-void x86np(char *s, uint16_t error)
+void x86np(const char *s, uint16_t error)
{
// pclog("NP %04X : %s\n", error, s);
cpu_state.abrt = ABRT_NP;
static int x86_global_settings;
-int device_get_config_int(char *s)
+int device_get_config_int(const char *s)
{
if (!strcmp(s, "bilinear")) {
return 1;