diff --git a/src/cdrom/cdrom.c b/src/cdrom/cdrom.c index 93d1b79..acb2202 100644 --- a/src/cdrom/cdrom.c +++ b/src/cdrom/cdrom.c @@ -9,7 +9,7 @@ * Implementation of the CD-ROM drive with SCSI(-like) * commands, for both ATAPI and SCSI usage. * - * Version: @(#)cdrom.c 1.0.2 2018/03/04 + * Version: @(#)cdrom.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -45,6 +45,7 @@ #include #define HAVE_STDARG_H #include "../emu.h" +#include "../version.h" #include "../config.h" #include "../timer.h" #include "../device.h" diff --git a/src/cdrom/cdrom_dosbox.cpp b/src/cdrom/cdrom_dosbox.cpp index 8111cf8..d5fc216 100644 --- a/src/cdrom/cdrom_dosbox.cpp +++ b/src/cdrom/cdrom_dosbox.cpp @@ -8,7 +8,7 @@ * * CD-ROM image file handling module. * - * Version: @(#)cdrom_dosbox.cpp 1.0.1 2018/02/14 + * Version: @(#)cdrom_dosbox.cpp 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -284,7 +284,7 @@ bool CDROM_Interface_Image::LoadIsoFile(char* filename) tracks.clear(); // data track - Track track = {0, 0, 0, 0, 0, 0, 0, false, NULL}; + Track track = {0, 0, 0, 0, 0, 0, 0, 0, false, NULL}; bool error; track.file = new BinaryFile(filename, error); if (error) { @@ -364,7 +364,7 @@ static string dirname(char * file) { bool CDROM_Interface_Image::LoadCueSheet(char *cuefile) { - Track track = {0, 0, 0, 0, 0, 0, 0, false, NULL}; + Track track = {0, 0, 0, 0, 0, 0, 0, 0, false, NULL}; tracks.clear(); uint64_t shift = 0; uint64_t currPregap = 0; diff --git a/src/cpu/codegen_ops_fpu.h b/src/cpu/codegen_ops_fpu.h index 2224489..feef639 100644 --- a/src/cpu/codegen_ops_fpu.h +++ b/src/cpu/codegen_ops_fpu.h @@ -666,7 +666,7 @@ static uint32_t ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint3 return op_pc; \ } -opFLDimm(1, 1.0) +opFLDimm(1, (1.0)) opFLDimm(L2T, 3.3219280948873623) opFLDimm(L2E, 1.4426950408889634); opFLDimm(PI, 3.141592653589793); diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 44cdede..3cda4e8 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -9,7 +9,7 @@ * Implementation of the IDE emulation for hard disks and ATAPI * CD-ROM devices. * - * Version: @(#)hdc_ide.c 1.0.4 2018/03/05 + * Version: @(#)hdc_ide.c 1.0.5 2018/03/07 * * Authors: Miran Grca, * Sarah Walker, @@ -46,6 +46,7 @@ #include #define HAVE_STDARG_H #include "../emu.h" +#include "../version.h" #include "../cpu/cpu.h" #include "../machine/machine.h" #include "../io.h" diff --git a/src/emu.h b/src/emu.h index b19f2f5..b3e1169 100644 --- a/src/emu.h +++ b/src/emu.h @@ -8,7 +8,7 @@ * * Main include file for the application. * - * Version: @(#)emu.h 1.0.4 2018/03/02 + * Version: @(#)emu.h 1.0.5 2018/03/07 * * Author: Fred N. van Kempen, * @@ -54,12 +54,6 @@ #define SCREEN_RES_X 640 #define SCREEN_RES_Y 480 -/* Version info. */ -#define EMU_NAME "VARCem" -#define EMU_NAME_W L"VARCem" -#define EMU_VERSION "0.1.0" -#define EMU_VERSION_W L"0.1.0" - /* Filename and pathname info. */ #define NVR_PATH L"nvr" #define ROMS_PATH L"roms" @@ -155,6 +149,8 @@ extern int serial_do_log; extern int nic_do_log; #endif +extern char emu_title[128]; /* full name of application */ +extern char emu_version[128]; /* version ID string */ extern wchar_t emu_path[1024]; /* emu installation path */ extern wchar_t usr_path[1024]; /* path (dir) of user data */ extern wchar_t cfg_path[1024]; /* full path of config file */ @@ -173,9 +169,7 @@ extern void pclog_ex(const char *fmt, va_list); #endif extern void pclog(const char *fmt, ...); extern void fatal(const char *fmt, ...); -extern void set_screen_size(int x, int y); -extern void set_screen_size_natural(void); -extern void pc_reload(wchar_t *fn); +extern void pc_version(const char *platform); extern int pc_init_modules(void); extern int pc_init(int argc, wchar_t *argv[]); extern void pc_close(void *threadid); @@ -183,11 +177,14 @@ extern void pc_reset_hard_close(void); extern void pc_reset_hard_init(void); extern void pc_reset_hard(void); extern void pc_reset(int hard); +extern void pc_reload(wchar_t *fn); extern void pc_full_speed(void); extern void pc_speed_changed(void); extern void pc_thread(void *param); extern void pc_start(void); extern void pc_onesec(void); +extern void set_screen_size(int x, int y); +extern void set_screen_size_natural(void); #ifdef __cplusplus } diff --git a/src/machine/m_at_430fx.c b/src/machine/m_at_430fx.c index cef28f4..6d6d964 100644 --- a/src/machine/m_at_430fx.c +++ b/src/machine/m_at_430fx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430FX PCISet chip. * - * Version: @(#)m_at_430fx.c 1.0.2 2018/03/04 + * Version: @(#)m_at_430fx.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -49,7 +49,7 @@ #include "../keyboard.h" #include "../intel_piix.h" #include "../intel_flash.h" -#include "../sio.h" +#include "../sio/sio.h" #include "../video/video.h" #include "../video/vid_s3.h" #include "../video/vid_cl54xx.h" diff --git a/src/machine/m_at_430hx.c b/src/machine/m_at_430hx.c index 7f09f5a..22789e3 100644 --- a/src/machine/m_at_430hx.c +++ b/src/machine/m_at_430hx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430HX PCISet chip. * - * Version: @(#)m_at_430hx.c 1.0.1 2018/02/14 + * Version: @(#)m_at_430hx.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -49,7 +49,7 @@ #include "../keyboard.h" #include "../intel_piix.h" #include "../intel_flash.h" -#include "../sio.h" +#include "../sio/sio.h" #include "machine.h" diff --git a/src/machine/m_at_430lx_nx.c b/src/machine/m_at_430lx_nx.c index 0c4b0b4..391036e 100644 --- a/src/machine/m_at_430lx_nx.c +++ b/src/machine/m_at_430lx_nx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430LX and 430NX PCISet chips. * - * Version: @(#)m_at_430lx_nx.c 1.0.1 2018/02/14 + * Version: @(#)m_at_430lx_nx.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -50,7 +50,7 @@ #include "../intel.h" #include "../intel_flash.h" #include "../intel_sio.h" -#include "../sio.h" +#include "../sio/sio.h" #include "machine.h" diff --git a/src/machine/m_at_430vx.c b/src/machine/m_at_430vx.c index d43e849..d42896c 100644 --- a/src/machine/m_at_430vx.c +++ b/src/machine/m_at_430vx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430VX PCISet chip. * - * Version: @(#)m_at_430vx.c 1.0.1 2018/02/14 + * Version: @(#)m_at_430vx.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -48,7 +48,7 @@ #include "../device.h" #include "../intel_piix.h" #include "../intel_flash.h" -#include "../sio.h" +#include "../sio/sio.h" #include "machine.h" diff --git a/src/machine/m_at_440fx.c b/src/machine/m_at_440fx.c index 0e45a10..60efad4 100644 --- a/src/machine/m_at_440fx.c +++ b/src/machine/m_at_440fx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 440FX PCISet chip. * - * Version: @(#)m_at_440fx.c 1.0.1 2018/02/14 + * Version: @(#)m_at_440fx.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -49,7 +49,7 @@ #include "../keyboard.h" #include "../intel_piix.h" #include "../intel_flash.h" -#include "../sio.h" +#include "../sio/sio.h" #include "machine.h" diff --git a/src/machine/m_at_sis_85c471.c b/src/machine/m_at_sis_85c471.c index 8bf9bb8..7535bab 100644 --- a/src/machine/m_at_sis_85c471.c +++ b/src/machine/m_at_sis_85c471.c @@ -12,7 +12,7 @@ * * Used by DTK PKM-0038S E-2 * - * Version: @(#)m_at_sis85c471.c 1.0.1 2018/02/14 + * Version: @(#)m_at_sis85c471.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, diff --git a/src/machine/m_at_sis_85c496.c b/src/machine/m_at_sis_85c496.c index 0460785..742b68e 100644 --- a/src/machine/m_at_sis_85c496.c +++ b/src/machine/m_at_sis_85c496.c @@ -8,7 +8,7 @@ * * Implementation of the SiS 85C496 chipset. * - * Version: @(#)m_at_sis_85c496.c 1.0.1 2018/02/14 + * Version: @(#)m_at_sis_85c496.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -48,7 +48,7 @@ #include "../device.h" #include "../mem.h" #include "../memregs.h" -#include "../sio.h" +#include "../sio/sio.h" #include "../disk/hdc.h" #include "machine.h" diff --git a/src/machine/m_at_t3100e_vid.c b/src/machine/m_at_t3100e_vid.c index e06579f..3f1e7df 100644 --- a/src/machine/m_at_t3100e_vid.c +++ b/src/machine/m_at_t3100e_vid.c @@ -22,7 +22,7 @@ * 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO * 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400 * - * Version: @(#)m_at_t3100e_vid.c 1.0.2 2018/03/05 + * Version: @(#)m_at_t3100e_vid.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -84,7 +84,7 @@ static uint32_t normcols[256][2]; * Bits 0,1: Font set (not currently implemented) */ static uint8_t st_video_options; -static uint8_t st_display_internal = -1; +static int8_t st_display_internal = -1; void t3100e_video_options_set(uint8_t options) { diff --git a/src/machine/m_xt_t1000_vid.c b/src/machine/m_xt_t1000_vid.c index 37d734e..71321d9 100644 --- a/src/machine/m_xt_t1000_vid.c +++ b/src/machine/m_xt_t1000_vid.c @@ -9,7 +9,7 @@ * Implementation of the Toshiba T1000 plasma display, which * has a fixed resolution of 640x200 pixels. * - * Version: @(#)m_xt_t1000_vid.c 1.0.2 2018/03/05 + * Version: @(#)m_xt_t1000_vid.c 1.0.3 2018/03/06 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -69,7 +69,7 @@ static uint8_t language; * Bit 0: Thin font */ static uint8_t st_video_options; -static uint8_t st_display_internal = -1; +static int8_t st_display_internal = -1; void t1000_video_options_set(uint8_t options) { @@ -79,12 +79,12 @@ void t1000_video_options_set(uint8_t options) void t1000_display_set(uint8_t internal) { - st_display_internal = internal; + st_display_internal = (int8_t)internal; } uint8_t t1000_display_get() { - return st_display_internal; + return (uint8_t)st_display_internal; } diff --git a/src/machine/machine.c b/src/machine/machine.c index 21686c0..2c9d88f 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -8,7 +8,7 @@ * * Handling of the emulated machines. * - * Version: @(#)machine.c 1.0.4 2018/03/04 + * Version: @(#)machine.c 1.0.5 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -75,9 +75,9 @@ machine_init(void) /* Load the machine's ROM BIOS. */ wcscpy(temp, MACHINES_PATH); - plat_path_slash(temp); + plat_append_slash(temp); wcscat(temp, machines[machine].bios_path); - (void)rom_load_bios(temp, 0); + if (! rom_load_bios(temp, 0)) return; /* Activate the ROM BIOS. */ mem_add_bios(); @@ -95,7 +95,7 @@ machine_available(int id) int i; wcscpy(temp, MACHINES_PATH); - plat_path_slash(temp); + plat_append_slash(temp); wcscat(temp, machines[id].bios_path); i = rom_load_bios(temp, 1); diff --git a/src/pc.c b/src/pc.c index 31010da..0e11daa 100644 --- a/src/pc.c +++ b/src/pc.c @@ -8,7 +8,7 @@ * * Main emulator module where most things are controlled. * - * Version: @(#)pc.c 1.0.5 2018/03/04 + * Version: @(#)pc.c 1.0.6 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -46,6 +46,7 @@ #include #define HAVE_STDARG_H #include "emu.h" +#include "version.h" #include "config.h" #include "cpu/cpu.h" #ifdef USE_DYNAREC @@ -175,6 +176,8 @@ int clockrate; int gfx_present[GFX_MAX]; /* should not be here */ +char emu_title[128]; /* full name of application */ +char emu_version[128]; /* version ID string */ wchar_t emu_path[1024]; /* emu installation path */ wchar_t usr_path[1024]; /* path (dir) of user data */ wchar_t cfg_path[1024]; /* full path of config file */ @@ -289,6 +292,33 @@ fatal(const char *fmt, ...) } +/* Set the application version ID string. */ +void +pc_version(const char *platform) +{ + char temp[128]; + + sprintf(emu_title, "%s for %s", EMU_NAME, platform); + + sprintf(emu_version, "%s", EMU_VERSION); + +#ifdef BUILD + sprintf(temp, " (Build %d", BUILD); + strcat(emu_version, temp); +#ifdef COMMIT + sprintf(temp, " [Commit #%x])", COMMIT); + strcat(emu_version, temp); +#endif + strcat(emu_version, ")"); +#endif + +#ifdef UPSTREAM + sprintf(temp, " [Upstream #%x]", UPSTREAM); + strcat(emu_version, temp); +#endif +} + + /* * Perform initial startup of the PC. * @@ -319,18 +349,18 @@ pc_init(int argc, wchar_t *argv[]) */ wcscpy(path, emu_path); p = plat_get_basename(path); - plat_path_slash(path); + plat_append_slash(path); wcscat(path, ROMS_PATH); if (! plat_dir_check(path)) { /* No 'roms' folder found, so go up one level. */ if (p != NULL) *p = L'\0'; - plat_path_slash(path); + plat_append_slash(path); wcscat(path, ROMS_PATH); if (plat_dir_check(path)) { if (p != NULL) *p = L'\0'; - plat_path_slash(path); + plat_append_slash(path); wcscpy(emu_path, path); } } @@ -351,23 +381,24 @@ pc_init(int argc, wchar_t *argv[]) if (!wcscasecmp(argv[c], L"--help") || !wcscasecmp(argv[c], L"-?")) { usage: + printf("\n%s version %s\n", emu_title, emu_version); printf("\nUsage: varcem [options] [cfg-file]\n\n"); printf("Valid options are:\n\n"); - printf("-? or --help - show this information\n"); - printf("-C or --dumpcfg - dump config file after loading\n"); + printf(" -? or --help - show this information\n"); + printf(" -C or --dumpcfg - dump config file after loading\n"); #ifdef _WIN32 - printf("-D or --debug - force debug output logging\n"); + printf(" -D or --debug - force debug output logging\n"); #endif - printf("-F or --fullscreen - start in fullscreen mode\n"); - printf("-M or --memdump - dump memory on exit\n"); - printf("-L or --logfile path - set 'path' to be the logfile\n"); - printf("-P or --vmpath path - set 'path' to be root for vm\n"); + printf(" -F or --fullscreen - start in fullscreen mode\n"); + printf(" -M or --memdump - dump memory on exit\n"); + printf(" -L or --logfile path - set 'path' to be the logfile\n"); + printf(" -P or --vmpath path - set 'path' to be root for vm\n"); #ifdef USE_WX - printf("-R or --fps num - set render speed to 'num' fps\n"); + printf(" -R or --fps num - set render speed to 'num' fps\n"); #endif - printf("-S or --settings - show only the settings dialog\n"); + printf(" -S or --settings - show only the settings dialog\n"); #ifdef _WIN32 - printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n"); + printf(" -H or --hwnd id,hwnd - sends back the main dialog's hwnd\n"); #endif printf("\nA config file can be specified. If none is, the default file will be used.\n"); return(0); @@ -443,7 +474,7 @@ usage: * Add it to the current working directory * to convert it (back) to an absolute path. */ - plat_path_slash(usr_path); + plat_append_slash(usr_path); wcscat(usr_path, path); } else { /* @@ -455,7 +486,7 @@ usage: } /* Make sure we have a trailing backslash. */ - plat_path_slash(usr_path); + plat_append_slash(usr_path); /* Grab the name of the configuration file. */ if (cfg == NULL) @@ -490,7 +521,7 @@ usage: wcscat(usr_path, cfg); /* Make sure we have a trailing backslash. */ - plat_path_slash(usr_path); + plat_append_slash(usr_path); } /* At this point, we can safely create the full path name. */ @@ -503,8 +534,8 @@ usage: (void)time(&now); info = localtime(&now); strftime(temp, sizeof(temp), "%Y/%m/%d %H:%M:%S", info); - pclog("#\n# %ls v%ls logfile, created %s\n#\n", - EMU_NAME_W, EMU_VERSION_W, temp); + pclog("#\n# %s v%s\n\n# Logfile created %s\n#\n", + emu_title, emu_version, temp); pclog("# Emulator path: %ls\n", emu_path); pclog("# Userfiles path: %ls\n", usr_path); pclog("# Configuration file: %ls\n#\n\n", cfg_path); @@ -948,8 +979,7 @@ pc_close(thread_t *ptr) void pc_thread(void *param) { - wchar_t temp[200], wcpu[2048]; - wchar_t wmachine[2048]; + wchar_t temp[200]; uint64_t start_time, end_time; uint32_t old_time, new_time; int status_update_needed; @@ -1057,12 +1087,10 @@ pc_thread(void *param) } if (title_update) { - mbstowcs(wmachine, machine_getname(), strlen(machine_getname())+1); - mbstowcs(wcpu, machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective].name, - strlen(machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective].name)+1); swprintf(temp, sizeof_w(temp), - L"%ls v%ls - %i%% - %ls - %ls - %ls", - EMU_NAME_W,EMU_VERSION_W,fps,wmachine,wcpu, + L"%S v%S - %i%% - %S - %S - %s", + EMU_NAME,emu_version,fps,machine_getname(), + machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective].name, (!mouse_capture) ? plat_get_string(IDS_2077) : (mouse_get_buttons() > 2) ? plat_get_string(IDS_2078) : plat_get_string(IDS_2079)); diff --git a/src/plat.h b/src/plat.h index 6da068d..1e98b3b 100644 --- a/src/plat.h +++ b/src/plat.h @@ -8,7 +8,7 @@ * * Define the various platform support functions. * - * Version: @(#)plat.h 1.0.3 2018/03/02 + * Version: @(#)plat.h 1.0.4 2018/03/07 * * Author: Fred N. van Kempen, * @@ -97,7 +97,6 @@ GLOBAL int dopause, /* system is paused */ mouse_capture; /* mouse is captured in app */ GLOBAL uint64_t timer_freq; GLOBAL int infocus; -GLOBAL char emu_version[128]; /* version ID string */ /* System-related functions. */ @@ -111,8 +110,7 @@ extern wchar_t *plat_get_basename(wchar_t *path); extern wchar_t *plat_get_filename(wchar_t *path); extern wchar_t *plat_get_extension(wchar_t *path); extern void plat_append_filename(wchar_t *dest, wchar_t *s1, wchar_t *s2); -extern void plat_put_backslash(wchar_t *path); -extern void plat_path_slash(wchar_t *path); +extern void plat_append_slash(wchar_t *path); extern int plat_path_abs(wchar_t *path); extern int plat_dir_check(wchar_t *path); extern int plat_dir_create(wchar_t *path); diff --git a/src/rom.c b/src/rom.c index c529142..fce0a1b 100644 --- a/src/rom.c +++ b/src/rom.c @@ -13,7 +13,7 @@ * - c386sx16 BIOS fails checksum * - the loadfont() calls should be done elsewhere * - * Version: @(#)rom.c 1.0.5 2018/03/04 + * Version: @(#)rom.c 1.0.6 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -64,7 +64,7 @@ rom_fopen(wchar_t *fn) wchar_t temp[1024]; wcscpy(temp, emu_path); - plat_put_backslash(temp); + plat_append_slash(temp); wcscat(temp, fn); return(plat_fopen(temp, L"rb")); @@ -77,7 +77,7 @@ rom_getfile(wchar_t *fn, wchar_t *s, int size) FILE *f; wcscpy(s, emu_path); - plat_put_backslash(s); + plat_append_slash(s); wcscat(s, fn); f = plat_fopen(s, L"rb"); diff --git a/src/rom_load.c b/src/rom_load.c index 7a2c3e0..1318fd2 100644 --- a/src/rom_load.c +++ b/src/rom_load.c @@ -17,7 +17,7 @@ * or to use a generic handler, and then pass it a pointer * to a command table. For now, we don't. * - * Version: @(#)rom_load.c 1.0.2 2018/03/01 + * Version: @(#)rom_load.c 1.0.3 2018/03/07 * * Author: Fred N. van Kempen, * @@ -314,8 +314,8 @@ rom_load_bios(wchar_t *fn, int test_only) int c, i; /* Generate the full script pathname. */ - wcscpy(script, ROMS_PATH); plat_path_slash(script); - wcscat(script, fn); plat_path_slash(script); + wcscpy(script, ROMS_PATH); plat_append_slash(script); + wcscat(script, fn); plat_append_slash(script); wcscpy(path, script); wcscat(script, BIOS_FILE); diff --git a/src/scsi/scsi_disk.c b/src/scsi/scsi_disk.c index 4bb848a..f7bbc59 100644 --- a/src/scsi/scsi_disk.c +++ b/src/scsi/scsi_disk.c @@ -8,7 +8,7 @@ * * Emulation of SCSI fixed and removable disks. * - * Version: @(#)scsi_disk.c 1.0.1 2018/02/14 + * Version: @(#)scsi_disk.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -42,6 +42,7 @@ #include #define HAVE_STDARG_H #include "../emu.h" +#include "../version.h" #include "../timer.h" #include "../device.h" #include "../nvr.h" diff --git a/src/scsi/scsi_ncr53c810.c b/src/scsi/scsi_ncr53c810.c index b6e482e..edfaee2 100644 --- a/src/scsi/scsi_ncr53c810.c +++ b/src/scsi/scsi_ncr53c810.c @@ -326,6 +326,7 @@ sextract32(uint32_t value, int start, int length) } +#if NOTUSED static __inline uint32_t deposit32(uint32_t value, int start, int length, uint32_t fieldval) @@ -334,6 +335,7 @@ deposit32(uint32_t value, int start, int length, mask = (~0U >> (32 - length)) << start; return (value & ~mask) | ((fieldval << start) & mask); } +#endif static __inline int @@ -600,7 +602,7 @@ ncr53c810_do_dma(ncr53c810_t *dev, int out, uint8_t id) sd = &SCSIDevices[id][dev->current_lun]; - if ((((id) == -1) && !scsi_device_present(id, dev->current_lun))) { + if (((id == 0xff) && !scsi_device_present(id, dev->current_lun))) { ncr53c810_log("(ID=%02i LUN=%02i) SCSI Command 0x%02x: Device not present when attempting to do DMA\n", id, dev->current_lun, dev->last_command); return; } @@ -681,7 +683,7 @@ ncr53c810_do_command(ncr53c810_t *dev, uint8_t id) dev->command_complete = 0; sd = &SCSIDevices[id][dev->current_lun]; - if (((id == -1) || !scsi_device_present(id, dev->current_lun))) { + if (((id == 0xff) || !scsi_device_present(id, dev->current_lun))) { ncr53c810_log("(ID=%02i LUN=%02i) SCSI Command 0x%02x: Bad Selection\n", id, dev->current_lun, buf[0]); ncr53c810_bad_selection(dev, id); return; diff --git a/src/sio.h b/src/sio/sio.h similarity index 100% rename from src/sio.h rename to src/sio/sio.h diff --git a/src/sio_detect.c b/src/sio/sio_detect.c similarity index 94% rename from src/sio_detect.c rename to src/sio/sio_detect.c index b217ab4..69e5204 100644 --- a/src/sio_detect.c +++ b/src/sio/sio_detect.c @@ -8,7 +8,7 @@ * * Super I/O chip detection code. * - * Version: @(#)sio_detect.c 1.0.1 2018/02/14 + * Version: @(#)sio_detect.c 1.0.2 2018/03/07 * * Author: Miran Grca, * @@ -36,11 +36,11 @@ #include #include #include -#include "emu.h" -#include "device.h" -#include "io.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../device.h" +#include "../io.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" #include "sio.h" diff --git a/src/sio_fdc37c669.c b/src/sio/sio_fdc37c669.c similarity index 96% rename from src/sio_fdc37c669.c rename to src/sio/sio_fdc37c669.c index 52297b2..5e965c0 100644 --- a/src/sio_fdc37c669.c +++ b/src/sio/sio_fdc37c669.c @@ -8,7 +8,7 @@ * * Implementation of the SMC FDC37C669 Super I/O Chip. * - * Version: @(#)sio_fdc37c669.c 1.0.1 2018/02/14 + * Version: @(#)sio_fdc37c669.c 1.0.2 2018/03/07 * * Author: Miran Grca, * @@ -36,16 +36,16 @@ #include #include #include -#include "emu.h" -#include "io.h" -#include "device.h" -#include "pci.h" -#include "lpt.h" -#include "serial.h" -#include "disk/hdc.h" -#include "disk/hdc_ide.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../io.h" +#include "../device.h" +#include "../pci.h" +#include "../lpt.h" +#include "../serial.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" +#include "../disk/hdc.h" +#include "../disk/hdc_ide.h" #include "sio.h" diff --git a/src/sio_fdc37c66x.c b/src/sio/sio_fdc37c66x.c similarity index 96% rename from src/sio_fdc37c66x.c rename to src/sio/sio_fdc37c66x.c index 420baf6..2372c01 100644 --- a/src/sio_fdc37c66x.c +++ b/src/sio/sio_fdc37c66x.c @@ -9,7 +9,7 @@ * Implementation of the SMC FDC37C663 and FDC37C665 Super * I/O Chips. * - * Version: @(#)sio_fdc37c66x.c 1.0.1 2018/02/14 + * Version: @(#)sio_fdc37c66x.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -41,16 +41,16 @@ #include #include #include -#include "emu.h" -#include "io.h" -#include "device.h" -#include "pci.h" -#include "lpt.h" -#include "serial.h" -#include "disk/hdc.h" -#include "disk/hdc_ide.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../io.h" +#include "../device.h" +#include "../pci.h" +#include "../lpt.h" +#include "../serial.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" +#include "../disk/hdc.h" +#include "../disk/hdc_ide.h" #include "sio.h" diff --git a/src/sio_fdc37c93x.c b/src/sio/sio_fdc37c93x.c similarity index 97% rename from src/sio_fdc37c93x.c rename to src/sio/sio_fdc37c93x.c index 421c001..01cf0a6 100644 --- a/src/sio_fdc37c93x.c +++ b/src/sio/sio_fdc37c93x.c @@ -9,7 +9,7 @@ * Implementation of the SMC FDC37C932FR and FDC37C935 Super * I/O Chips. * - * Version: @(#)sio_fdc37c93x.c 1.0.1 2018/02/14 + * Version: @(#)sio_fdc37c93x.c 1.0.2 2018/03/07 * * Author: Miran Grca, * @@ -37,16 +37,16 @@ #include #include #include -#include "emu.h" -#include "io.h" -#include "device.h" -#include "pci.h" -#include "lpt.h" -#include "serial.h" -#include "disk/hdc.h" -#include "disk/hdc_ide.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../io.h" +#include "../device.h" +#include "../pci.h" +#include "../lpt.h" +#include "../serial.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" +#include "../disk/hdc.h" +#include "../disk/hdc_ide.h" #include "sio.h" diff --git a/src/sio_pc87306.c b/src/sio/sio_pc87306.c similarity index 97% rename from src/sio_pc87306.c rename to src/sio/sio_pc87306.c index a811290..f082bb4 100644 --- a/src/sio_pc87306.c +++ b/src/sio/sio_pc87306.c @@ -8,7 +8,7 @@ * * Emulation of the NatSemi PC87306 Super I/O chip. * - * Version: @(#)sio_pc87306.c 1.0.1 2018/02/14 + * Version: @(#)sio_pc87306.c 1.0.2 2018/03/07 * * Author: Miran Grca, * @@ -36,16 +36,16 @@ #include #include #include -#include "emu.h" -#include "io.h" -#include "device.h" -#include "pci.h" -#include "lpt.h" -#include "serial.h" -#include "disk/hdc.h" -#include "disk/hdc_ide.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../io.h" +#include "../device.h" +#include "../pci.h" +#include "../lpt.h" +#include "../serial.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" +#include "../disk/hdc.h" +#include "../disk/hdc_ide.h" #include "sio.h" diff --git a/src/sio_um8669f.c b/src/sio/sio_um8669f.c similarity index 97% rename from src/sio_um8669f.c rename to src/sio/sio_um8669f.c index cb9fcda..47aeda4 100644 --- a/src/sio_um8669f.c +++ b/src/sio/sio_um8669f.c @@ -29,7 +29,7 @@ * 70 - IRQ * 74 - DMA * - * Version: @(#)sio_um8669f.c 1.0.1 2018/02/14 + * Version: @(#)sio_um8669f.c 1.0.2 2018/03/07 * * Author: Miran Grca, * Sarah Walker, @@ -59,14 +59,14 @@ #include #include #include -#include "emu.h" -#include "device.h" -#include "io.h" -#include "pci.h" -#include "lpt.h" -#include "serial.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../device.h" +#include "../io.h" +#include "../pci.h" +#include "../lpt.h" +#include "../serial.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" #include "sio.h" diff --git a/src/sio_w83877f.c b/src/sio/sio_w83877f.c similarity index 98% rename from src/sio_w83877f.c rename to src/sio/sio_w83877f.c index 45555ed..ec4fe82 100644 --- a/src/sio_w83877f.c +++ b/src/sio/sio_w83877f.c @@ -11,7 +11,7 @@ * Winbond W83877F Super I/O Chip * Used by the Award 430HX * - * Version: @(#)sio_w83877f.c 1.0.1 2018/02/14 + * Version: @(#)sio_w83877f.c 1.0.2 2018/03/07 * * Author: Miran Grca, * @@ -39,17 +39,17 @@ #include #include #include -#include "emu.h" -#include "machine/machine.h" -#include "device.h" -#include "io.h" -#include "pci.h" -#include "mem.h" -#include "rom.h" -#include "lpt.h" -#include "serial.h" -#include "floppy/fdd.h" -#include "floppy/fdc.h" +#include "../emu.h" +#include "../machine/machine.h" +#include "../device.h" +#include "../io.h" +#include "../pci.h" +#include "../mem.h" +#include "../rom.h" +#include "../lpt.h" +#include "../serial.h" +#include "../floppy/fdd.h" +#include "../floppy/fdc.h" #include "sio.h" diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..8a00f60 --- /dev/null +++ b/src/version.h @@ -0,0 +1,77 @@ +/* + * VARCem Virtual Archaelogical Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. + * + * This file is part of the VARCem Project. + * + * Define application version and build info. + * + * Version: @(#)version.h 1.0.1 2018/03/07 + * + * Author: Fred N. van Kempen, + * + * Copyright 2018 Fred N. van Kempen. + * + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: + * + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. + * + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef EMU_VERSION_H +# define EMU_VERSION_H + + +/* Application name. */ +#define EMU_NAME "VARCem" + +/* Version info. */ +#define EMU_VER_MAJOR 0 +#define EMU_VER_MINOR 1 +#define EMU_VER_REV 2 + + +/* Standard C preprocessor macros. */ +#define STR_HLP(x) #x +#define STR(x) STR_HLP(x) + + +/* These are used in the application. */ +#define EMU_VER_NUM EMU_VER_MAJOR.EMU_VER_MINOR.EMU_VER_REV +#define EMU_VER_NUM_4 EMU_VER_MAJOR.EMU_VER_MINOR.EMU_VER_REV.0 +#define EMU_VERSION STR(EMU_VER_NUM) +#define EMU_VERSION_4 STR(EMU_VER_NUM_4) + + +/* Global variables. */ + + + + +#endif /*EMU_VERSION_H*/ diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index e7b9491..3e2781d 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -9,7 +9,7 @@ * Emulation of select Cirrus Logic cards (CL-GD 5428, * CL-GD 5429, 5430, 5434 and 5436 are supported). * - * Version: @(#)vid_cl54xx.c 1.0.4 2018/03/04 + * Version: @(#)vid_cl54xx.c 1.0.5 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -2094,7 +2094,7 @@ gd54xx_start_blit(uint32_t cpu_dat, int count, gd54xx_t *gd54xx, svga_t *svga) switch (gd54xx->blt.rop) { case 0x00: dst = 0; break; case 0x05: dst = src & dst; break; - case 0x06: dst = dst; break; + case 0x06: dst = dst; break; // FIXME?? case 0x09: dst = src & ~dst; break; case 0x0b: dst = ~ dst; break; case 0x0d: dst = src; break; diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index ffc3f40..02b4d37 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -8,7 +8,7 @@ * * SVGA renderers. * - * Version: @(#)vid_svga_render.c 1.0.3 2018/03/05 + * Version: @(#)vid_svga_render.c 1.0.4 2018/03/06 * * Authors: Fred N. van Kempen, * Miran Grca, diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 6c26c06..64ccd3d 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -8,7 +8,7 @@ # # Makefile for Windows systems using the MinGW32 environment. # -# Version: @(#)Makefile.mingw 1.0.7 2018/03/05 +# Version: @(#)Makefile.mingw 1.0.8 2018/03/07 # # Author: Fred N. van Kempen, # @@ -192,7 +192,7 @@ endif # Nothing should need changing from here on.. # ######################################################################### VPATH := $(EXPATH) . cpu \ - cdrom disk floppy game machine \ + cdrom disk floppy game sio machine \ sound \ sound/munt sound/munt/c_interface sound/munt/sha1 \ sound/munt/srchelper \ @@ -218,6 +218,7 @@ ifneq ($(CROSS), n) CPP := /usr/bin/$(MINGW)-g++ -m32 CC := /usr/bin/$(MINGW)-gcc -m32 endif + PREPROC := /usr/bin/$(MINGW)-cpp WINDRES := /usr/bin/$(MINGW)-windres SYSINC := -I/usr/$(MINGW)/include -Iwin/mingw/include @@ -231,6 +232,7 @@ else CPP := g++ -m32 CC := gcc -m32 endif + PREPROC := cpp WINDRES := windres SYSINC := -Iwin/mingw/include @@ -242,15 +244,24 @@ DEPFILE := win/.depends # Set up the correct toolchain flags. OPTS := $(EXTRAS) $(STUFF) +ifdef BUILD + OPTS += -DBUILD=$(BUILD) +endif +ifdef COMMIT + OPTS += -DCOMMIT=0x$(COMMIT) +endif +ifdef UPSTREAM + OPTS += -DUPSTREAM=0x$(UPSTREAM) +endif ifdef EXFLAGS -OPTS += $(EXFLAGS) + OPTS += $(EXFLAGS) endif ifdef EXINC -OPTS += -I$(EXINC) + OPTS += -I$(EXINC) endif -OPTS += $(SYSINC) + OPTS += $(SYSINC) ifneq ($(CROSS), n) - OPTS += -DUSE_CROSS + OPTS += -DUSE_CROSS endif ifeq ($(X64), y) ifeq ($(OPTIM), y) @@ -275,7 +286,7 @@ else ifeq ($(OPTIM), y) AOPTIM := -mtune=native ifndef COPTIM - COPTIM := -O6 + COPTIM := -O3 endif else ifndef COPTIM @@ -637,7 +648,10 @@ endif all: $(PROG).exe pcap_if.exe -VARCem.res: VARCem.rc +VARCem.res: VARCem.rc VARCem.mpp + @echo Generating Manifest file.. + @-rm -f win/VARCem.manifest 2>NUL + @$(PREPROC) -P win/VARCem.mpp >win/VARCem.manifest @echo Processing $< @$(WINDRES) $(RFLAGS) $(EXTRAS) -i $< -o VARCem.res @@ -675,6 +689,7 @@ clobber: clean @echo Cleaning executables.. @-rm -f *.d 2>NUL @-rm -f *.exe 2>NUL + @-rm -f win/*.manifest 2>NUL # @-rm -f $(DEPFILE) 2>NUL ifneq ($(AUTODEP), y) diff --git a/src/win/VARCem.manifest b/src/win/VARCem.mpp similarity index 92% rename from src/win/VARCem.manifest rename to src/win/VARCem.mpp index 08c241b..e6585e7 100644 --- a/src/win/VARCem.manifest +++ b/src/win/VARCem.mpp @@ -1,7 +1,8 @@ +#include "../version.h" * Miran Grca, @@ -38,6 +38,7 @@ #define IN_RESOURCE_H #include "resource.h" #include "../emu.h" +#include "../version.h" #include "../plat.h" #undef IN_RESOURCE_H @@ -236,17 +237,26 @@ END // // Dialog // -DLG_ABOUT DIALOG DISCARDABLE 0, 0, 209, 114 +DLG_ABOUT DIALOG DISCARDABLE 0, 0, 250, 170 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About VARCem" FONT 9, "Segoe UI" BEGIN - DEFPUSHBUTTON "OK",IDOK,129,94,71,12 - ICON 100,IDC_ABOUT_ICON,7,7,20,20 - LTEXT "Virtual Archaelogical Computer EMulator\n\nBased on earlier works like PCem and 86Box.\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen, TheCollector1995, reenigne, JohnElliott, greatpsycho, and others.\n\nSee LICENSE.txt for more information.", - IDC_ABOUT_ICON,54,7,146,73 - CONTROL "",IDC_ABOUT_ICON,"Static",SS_BLACKFRAME | SS_SUNKEN,0, - 86,208,1 + ICON 100,IDC_ABOUT_ICON,5,5,20,20 + CTEXT "",IDT_TITLE,55,10,195,20 + CTEXT "Virtual Archaelogical Computer EMulator", + IDC_ABOUT_ICON,55,30,195,10 + CTEXT "",IDT_VERSION,55,40,195,10 + CONTROL "",IDC_ABOUT_ICON,"Static",SS_BLACKFRAME | SS_SUNKEN, + 57,52,190,1 + LTEXT "Authors:", IDC_ABOUT_ICON,5,60,40,10 + LTEXT "Fred N. van Kempen, Miran Grca, Sarah Walker, TheCollector1995, reenigne, John Elliott, greatpsycho, and others.", + IDC_ABOUT_ICON,5,70,240,30 + LTEXT "Based on earlier works like 86Box, PCem, MAME, DOSbox and Qemu.", + IDC_ABOUT_ICON,5,100,240,20 + LTEXT "Released under the BSD 3-Clause License, and the GNU General Public License (version 2 or up) for existing, imported code from other projects. See LICENSE.txt for more information.", + IDC_ABOUT_ICON,5,120,240,30 + DEFPUSHBUTTON "OK",IDOK,169,150,71,12 END DLG_STATUS DIALOG DISCARDABLE 0, 0, 186, 386 @@ -1063,8 +1073,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,1,0,0 - PRODUCTVERSION 0,1,0,0 + FILEVERSION EMU_VER_MAJOR,EMU_VER_MINOR,EMU_VER_REV,0 + PRODUCTVERSION EMU_VER_MAJOR,EMU_VER_MINOR,EMU_VER_REV,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -1079,18 +1089,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "IRC #VARCem on FreeNode\0" - VALUE "FileDescription", "VARCem - Virtual Archaelogical Computer EMulator\0" - VALUE "FileVersion", "0.1.0\0" - VALUE "InternalName", "VARCem\0" - VALUE "LegalCopyright", "Copyright Fred N. van Kempen and others, 2007-2018, Released under the BSD 3-Clause License\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "VARCem.exe\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "VARCem Emulator\0" - VALUE "ProductVersion", "0.1.0\0" - VALUE "SpecialBuild", "\0" + VALUE "CompanyName", "IRC #VARCem on FreeNode" + VALUE "FileDescription", "VARCem - Virtual Archaelogical Computer EMulator" + VALUE "FileVersion", EMU_VERSION + VALUE "InternalName", EMU_NAME + VALUE "LegalCopyright", "Copyright Fred N. van Kempen and others, 2007-2018, Released under a mixed BSD 3-Clause and GPL License" + VALUE "OriginalFilename", "VARCem.exe" + VALUE "ProductName", "VARCem Emulator" + VALUE "ProductVersion", EMU_VERSION +#ifndef RELEASE_BUILD + VALUE "SpecialBuild", "Internal Development Build" +#endif END END BLOCK "VarFileInfo" diff --git a/src/win/resource.h b/src/win/resource.h index 96d75d6..5c4819d 100644 --- a/src/win/resource.h +++ b/src/win/resource.h @@ -8,7 +8,7 @@ * * Windows resource defines. * - * Version: @(#)resource.h 1.0.3 2018/03/01 + * Version: @(#)resource.h 1.0.4 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -110,6 +110,8 @@ #define IDT_1756 1756 /* Channel: */ #define IDT_1757 1757 /* Progress: */ #define IDT_1758 1758 /* ZIP drives: */ +#define IDT_TITLE 1759 /* "VARCem for Plaform" */ +#define IDT_VERSION 1760 /* "version.." */ /* * To try to keep these organized, we now group the diff --git a/src/win/win.c b/src/win/win.c index 1454933..f401009 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -8,7 +8,7 @@ * * Platform main support module for Windows. * - * Version: @(#)win.c 1.0.3 2018/03/02 + * Version: @(#)win.c 1.0.5 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -46,6 +46,7 @@ #include #include #include "../emu.h" +#include "../version.h" #include "../config.h" #include "../device.h" #include "../mouse.h" @@ -270,7 +271,7 @@ CreateConsole(int init) if (! AttachConsole(ATTACH_PARENT_PROCESS)) { /* Parent has no console, create one. */ if (! AllocConsole()) { -#ifdef DEBUG +#ifdef _DEBUG fp = fopen("error.txt", "w"); fprintf(fp, "AllocConsole failed: %lu\n", GetLastError()); fclose(fp); @@ -280,7 +281,7 @@ CreateConsole(int init) } if ((h = GetStdHandle(STD_OUTPUT_HANDLE)) == NULL) { -#ifdef DEBUG +#ifdef _DEBUG fp = fopen("error.txt", "w"); fprintf(fp, "GetStdHandle(OUT) failed: %lu\n", GetLastError()); fclose(fp); @@ -291,7 +292,7 @@ CreateConsole(int init) if (i != -1) { fp = _fdopen(i, "w"); if (fp == NULL) { -#ifdef DEBUG +#ifdef _DEBUG fp = fopen("error.txt", "w"); fprintf(fp, "FdOpen(%i) failed: %lu\n", i, GetLastError()); fclose(fp); @@ -301,7 +302,7 @@ CreateConsole(int init) setvbuf(fp, NULL, _IONBF, 1); *stdout = *fp; } else { -#ifdef DEBUG +#ifdef _DEBUG fp = fopen("error.txt", "w"); fprintf(fp, "GetOSfHandle(%p) failed: %lu\n", h, GetLastError()); fclose(fp); @@ -409,8 +410,8 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow) /* We need this later. */ hinstance = hInst; - /* Set the application version ID string. */ - sprintf(emu_version, "%s v%s", EMU_NAME, EMU_VERSION); + /* Initialize the version data. CrashDump needs it early. */ + pc_version("Windows"); #ifdef USE_CRASHDUMP /* Enable crash dump services. */ @@ -523,7 +524,7 @@ plat_remove(wchar_t *path) /* Make sure a path ends with a trailing (back)slash. */ void -plat_path_slash(wchar_t *path) +plat_append_slash(wchar_t *path) { if ((path[wcslen(path)-1] != L'\\') && (path[wcslen(path)-1] != L'/')) { @@ -600,16 +601,6 @@ plat_append_filename(wchar_t *dest, wchar_t *s1, wchar_t *s2) } -void -plat_put_backslash(wchar_t *path) -{ - int c = wcslen(path) - 1; - - if (path[c] != L'/' && path[c] != L'\\') - path[c] = L'/'; -} - - int plat_dir_check(wchar_t *path) { diff --git a/src/win/win.h b/src/win/win.h index fb03bf4..9624744 100644 --- a/src/win/win.h +++ b/src/win/win.h @@ -8,7 +8,7 @@ * * Platform support defintions for Win32. * - * Version: @(#)win.h 1.0.3 2018/03/01 + * Version: @(#)win.h 1.0.4 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -43,14 +43,6 @@ extern "C" { #endif -#define UNICODE -#if 0 -# ifdef _WIN32_WINNT -# undef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 -# endif -#endif -#include #include "resource.h" @@ -151,14 +143,16 @@ extern void StatusBarCreate(HWND hwndParent, uintptr_t idStatus, /* Functions in win_dialog.c: */ +extern void dialog_center(HWND hdlg); + +extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title); + extern int file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, int save); extern int file_dlg(HWND hwnd, WCHAR *f, char *fn, int save); extern int file_dlg_mb(HWND hwnd, char *f, char *fn, int save); extern int file_dlg_w_st(HWND hwnd, int i, WCHAR *fn, int save); extern int file_dlg_st(HWND hwnd, int i, char *fn, int save); -extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title); - #ifdef __cplusplus } diff --git a/src/win/win_about.c b/src/win/win_about.c index 64a458f..f17c66f 100644 --- a/src/win/win_about.c +++ b/src/win/win_about.c @@ -8,7 +8,7 @@ * * Handle the About dialog. * - * Version: @(#)win_about.c 1.0.2 2018/02/21 + * Version: @(#)win_about.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -34,9 +34,8 @@ * Boston, MA 02111-1307 * USA. */ -#define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include @@ -47,6 +46,31 @@ #include "win.h" +static void +set_font_bold(HWND hdlg, int item) +{ + LOGFONT logFont; + HFONT font; + HWND h; + + /* Get a handle to the speficied control in the dialog. */ + h = GetDlgItem(hdlg, item); + + /* Get that control's current font, and create a LOGFONT for it. */ + font = (HFONT)SendMessage(h, WM_GETFONT, 0, 0); + GetObject(font, sizeof(logFont), &logFont); + + /* Modify the font to have BOLD enabled. */ + logFont.lfWeight = FW_BOLD; + logFont.lfHeight *= 2; + logFont.lfWidth *= 2; + font = CreateFontIndirect(&logFont); + + /* Set the new font for the control. */ + SendMessage(h, WM_SETFONT, (WPARAM)font, 0); +} + + #ifdef __amd64__ static LRESULT CALLBACK #else @@ -54,21 +78,30 @@ static BOOL CALLBACK #endif AboutDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) { + char temp[128]; HWND h; switch (message) { case WM_INITDIALOG: - plat_pause(1); + /* Center in the main window. */ + dialog_center(hdlg); + h = GetDlgItem(hdlg, IDC_ABOUT_ICON); SendMessage(h, STM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)LoadImage(hinstance,(PCTSTR)100,IMAGE_ICON,64,64,0)); + SendDlgItemMessage(hdlg, IDT_TITLE, WM_SETTEXT, + (WPARAM)NULL, (LPARAM)emu_title); + set_font_bold(hdlg, IDT_TITLE); + + sprintf(temp, "v%s", emu_version); + SendDlgItemMessage(hdlg, IDT_VERSION, WM_SETTEXT, + (WPARAM)NULL, (LPARAM)temp); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: EndDialog(hdlg, 0); - plat_pause(0); return TRUE; default: @@ -84,5 +117,9 @@ AboutDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) void AboutDialogCreate(HWND hwnd) { + plat_pause(1); + DialogBox(hinstance, (LPCTSTR)DLG_ABOUT, hwnd, AboutDialogProcedure); + + plat_pause(0); } diff --git a/src/win/win_cdrom.c b/src/win/win_cdrom.c index cc33b81..7dfbf0d 100644 --- a/src/win/win_cdrom.c +++ b/src/win/win_cdrom.c @@ -8,7 +8,7 @@ * * Handle the platform-side of CDROM drives. * - * Version: @(#)win_cdrom.c 1.0.3 2018/02/24 + * Version: @(#)win_cdrom.c 1.0.4 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -35,8 +35,8 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/win/win_cdrom_ioctl.c b/src/win/win_cdrom_ioctl.c index b73dbe3..0499dba 100644 --- a/src/win/win_cdrom_ioctl.c +++ b/src/win/win_cdrom_ioctl.c @@ -9,7 +9,7 @@ * Implementation of the CD-ROM host drive IOCTL interface for * Windows using SCSI Passthrough Direct. * - * Version: @(#)cdrom_ioctl.c 1.0.2 2018/03/04 + * Version: @(#)cdrom_ioctl.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, diff --git a/src/win/win_crashdump.c b/src/win/win_crashdump.c index c9c03be..f38dde1 100644 --- a/src/win/win_crashdump.c +++ b/src/win/win_crashdump.c @@ -8,13 +8,13 @@ * * Handle generation of crash-dump reports. * - * Version: @(#)win_crashdump.c 1.0.3 2018/02/24 + * Version: @(#)win_crashdump.c 1.0.4 2018/03/07 * * Authors: Fred N. van Kempen, - * Riley (Rain-chan), + * Riley (Rai-chan), * * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2017 Riley (Rain-chan), + * Copyright 2016-2017 Riley (Rai-chan). * * 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 @@ -35,6 +35,7 @@ * USA. */ #define _WIN32_WINNT 0x0501 +#define WIN32_LEAN_AND_MEAN #include #include #include @@ -42,8 +43,8 @@ #include #include #include "../emu.h" +#include "../version.h" #include "../plat.h" -#include "win.h" #define ExceptionHandlerBufferSize (10240) diff --git a/src/win/win_d3d.cpp b/src/win/win_d3d.cpp index b84b552..6b9d13e 100644 --- a/src/win/win_d3d.cpp +++ b/src/win/win_d3d.cpp @@ -8,7 +8,7 @@ * * Rendering module for Microsoft Direct3D 9. * - * Version: @(#)win_d3d.cpp 1.0.3 2018/02/26 + * Version: @(#)win_d3d.cpp 1.0.4 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -36,9 +36,14 @@ * Boston, MA 02111-1307 * USA. */ +#define UNICODE +#include +#include +#include #include #include #include "../emu.h" +#include "../version.h" #include "../device.h" #include "../video/video.h" #include "../plat.h" @@ -470,7 +475,7 @@ d3d_init_fs(HWND h) d3d_hwnd = h; /*FIXME: should be done once, in win.c */ - _swprintf(title, L"%s v%s", EMU_NAME_W, EMU_VERSION_W); + _swprintf(title, L"%s v%s", TEXT(EMU_NAME), TEXT(EMU_VERSION)); d3d_device_window = CreateWindowEx ( 0, SUB_CLASS_NAME, diff --git a/src/win/win_d3d.h b/src/win/win_d3d.h index 5fe162f..033d3a4 100644 --- a/src/win/win_d3d.h +++ b/src/win/win_d3d.h @@ -8,7 +8,7 @@ * * Direct3D 9 rendererer and screenshots taking. * - * Version: @(#)win_d3d.h 1.0.2 2018/02/21 + * Version: @(#)win_d3d.h 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -38,9 +38,6 @@ */ #ifndef WIN_D3D_H # define WIN_D3D_H -# define UNICODE -# include -# include #ifdef __cplusplus diff --git a/src/win/win_ddraw.cpp b/src/win/win_ddraw.cpp index b4748b3..298f4f4 100644 --- a/src/win/win_ddraw.cpp +++ b/src/win/win_ddraw.cpp @@ -11,7 +11,7 @@ * NOTES: This code should be re-merged into a single init() with a * 'fullscreen' argument, indicating FS mode is requested. * - * Version: @(#)win_ddraw.cpp 1.0.1 2018/02/14 + * Version: @(#)win_ddraw.cpp 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -39,20 +39,19 @@ * Boston, MA 02111-1307 * USA. */ +#define UNICODE +#include +#include #include #include -#define UNICODE -#define BITMAP WINDOWS_BITMAP -#include -#undef BITMAP #include "../emu.h" #include "../device.h" #include "../video/video.h" #include "../plat.h" #include "../ui.h" +#include "win.h" #include "win_ddraw.h" #include "win_png.h" -#include "win.h" static LPDIRECTDRAW lpdd = NULL; diff --git a/src/win/win_ddraw.h b/src/win/win_ddraw.h index 1b360df..448dcba 100644 --- a/src/win/win_ddraw.h +++ b/src/win/win_ddraw.h @@ -8,7 +8,7 @@ * * Definitions for the DirectDraw 9 rendering module. * - * Version: @(#)win_ddraw.h 1.0.2 2018/02/21 + * Version: @(#)win_ddraw.h 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -38,8 +38,6 @@ */ #ifndef WIN_DDRAW_H # define WIN_DDRAW_H -# define UNICODE -# include #ifdef __cplusplus diff --git a/src/win/win_devconf.c b/src/win/win_devconf.c index bb6f2d3..91c3f77 100644 --- a/src/win/win_devconf.c +++ b/src/win/win_devconf.c @@ -8,7 +8,7 @@ * * Imlementation of the Device Configuration dialog. * - * Version: @(#)win_devconf.c 1.0.2 2018/02/24 + * Version: @(#)win_devconf.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -36,8 +36,12 @@ * Boston, MA 02111-1307 * USA. */ +#define UNICODE +#define WIN32_LEAN_AND_MEAN +#include #include #include +#include #include #include #include "../emu.h" @@ -47,7 +51,6 @@ #include "../plat_midi.h" #include "../ui.h" #include "win.h" -#include static device_t *config_device; diff --git a/src/win/win_dialog.c b/src/win/win_dialog.c index f778fc7..07ec1cf 100644 --- a/src/win/win_dialog.c +++ b/src/win/win_dialog.c @@ -8,7 +8,7 @@ * * Implementation of server several dialogs. * - * Version: @(#)win_dialog.c 1.0.2 2018/03/01 + * Version: @(#)win_dialog.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -37,8 +37,8 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include @@ -46,6 +46,7 @@ #include #include #include "../emu.h" +#include "../version.h" #include "../device.h" #include "../plat.h" #include "../ui.h" @@ -68,6 +69,33 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData) } +void +dialog_center(HWND hdlg) +{ + RECT r, r1, r2; + HWND owner; + + /* Get handle to owner window. Use desktop if needed. */ + if ((owner = GetParent(hdlg)) == NULL) + owner = GetDesktopWindow(); + + /* Get owner and dialog rects. */ + GetWindowRect(hdlg, &r1); + GetWindowRect(owner, &r2); + CopyRect(&r, &r2); + + /* Center the dialog within the owner's space. */ + OffsetRect(&r1, -r1.left, -r1.top); + OffsetRect(&r, -r.left, -r.top); + OffsetRect(&r, -r1.right, -r1.bottom); + + /* Move the dialog window. */ + SetWindowPos(hdlg, HWND_TOP, + r2.left + (r.right / 2), r2.top + (r.bottom / 2), + 0, 0, SWP_NOSIZE); +} + + wchar_t * BrowseFolder(wchar_t *saved_path, wchar_t *title) { @@ -110,7 +138,7 @@ ui_msgbox(int flags, void *arg) switch(flags & 0x1f) { case MBX_INFO: /* just an informational message */ fl = (MB_OK | MB_ICONINFORMATION); - cap = EMU_NAME_W; + cap = TEXT(EMU_NAME); break; case MBX_ERROR: /* error message */ @@ -125,12 +153,12 @@ ui_msgbox(int flags, void *arg) case MBX_QUESTION: /* question */ fl = (MB_YESNOCANCEL | MB_ICONQUESTION); - cap = EMU_NAME_W; + cap = TEXT(EMU_NAME); break; case MBX_CONFIG: /* configuration */ fl = (MB_YESNO | MB_ICONERROR); - cap = EMU_NAME_W; + cap = plat_get_string(IDS_2050); /* "Configuration Error" */ break; } diff --git a/src/win/win_dynld.c b/src/win/win_dynld.c index 7f6f388..48919b0 100644 --- a/src/win/win_dynld.c +++ b/src/win/win_dynld.c @@ -8,7 +8,7 @@ * * Try to load a support DLL. * - * Version: @(#)win_dynld.c 1.0.1 2018/02/14 + * Version: @(#)win_dynld.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * @@ -44,12 +44,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define WIN32_LEAN_AND_MEAN +#include #include #include #include #include #include -#include #include "../emu.h" #include "../plat_dynld.h" diff --git a/src/win/win_joystick.cpp b/src/win/win_joystick.cpp index 9a839ff..015aa91 100644 --- a/src/win/win_joystick.cpp +++ b/src/win/win_joystick.cpp @@ -11,7 +11,7 @@ * NOTE: Hacks currently needed to compile with MSVC; DX needs to * be updated to 11 or 12 or so. --FvK * - * Version: @(#)win_joystick.cpp 1.0.2 2018/02/21 + * Version: @(#)win_joystick.cpp 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -39,6 +39,7 @@ * Boston, MA 02111-1307 * USA. */ +#include #define DIRECTINPUT_VERSION 0x0800 #include #ifndef DIDEVTYPE_JOYSTICK @@ -47,9 +48,9 @@ */ # define DIDEVTYPE_JOYSTICK 4 #endif -#include #include #include +#include #include "../emu.h" #include "../device.h" #include "../plat.h" diff --git a/src/win/win_jsconf.c b/src/win/win_jsconf.c index 857c952..11e75e2 100644 --- a/src/win/win_jsconf.c +++ b/src/win/win_jsconf.c @@ -8,7 +8,7 @@ * * Implementation of the Joystick Configuration dialog. * - * Version: @(#)win_jsconf.c 1.0.1 2018/02/14 + * Version: @(#)win_jsconf.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -36,10 +36,11 @@ * Boston, MA 02111-1307 * USA. */ +#define WIN32_LEAN_AND_MEAN #include -#include #include #include +#include #include #include #include "../emu.h" diff --git a/src/win/win_keyboard.c b/src/win/win_keyboard.c index a301fd8..ab01027 100644 --- a/src/win/win_keyboard.c +++ b/src/win/win_keyboard.c @@ -8,7 +8,7 @@ * * Windows raw keyboard input handler. * - * Version: @(#)win_keyboard.c 1.0.2 2018/02/21 + * Version: @(#)win_keyboard.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -35,9 +35,9 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #define _WIN32_WINNT 0x0501 #include -#include #include #include #include diff --git a/src/win/win_midi.c b/src/win/win_midi.c index 072b87e..1cf481b 100644 --- a/src/win/win_midi.c +++ b/src/win/win_midi.c @@ -8,7 +8,7 @@ * * Implementation of the System MIDI interface. * - * Version: @(#)win_midi.c 1.0.1 2018/02/14 + * Version: @(#)win_midi.c 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -36,6 +36,7 @@ * Boston, MA 02111-1307 * USA. */ +#define WIN32_LEAN_AND_MEAN #include #include #include @@ -47,6 +48,7 @@ #include "../sound/midi.h" #include "../plat.h" #include "../plat_midi.h" +#include "win.h" int midi_id = 0; diff --git a/src/win/win_mouse.cpp b/src/win/win_mouse.cpp index 6084b83..54eb7e0 100644 --- a/src/win/win_mouse.cpp +++ b/src/win/win_mouse.cpp @@ -8,7 +8,7 @@ * * Mouse interface to host device. * - * Version: @(#)win_mouse.cpp 1.0.1 2018/02/14 + * Version: @(#)win_mouse.cpp 1.0.2 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -36,6 +36,7 @@ * Boston, MA 02111-1307 * USA. */ +#include #define DIRECTINPUT_VERSION 0x0800 #include #include diff --git a/src/win/win_new_floppy.c b/src/win/win_new_floppy.c index 8172bda..5f2ea56 100644 --- a/src/win/win_new_floppy.c +++ b/src/win/win_new_floppy.c @@ -8,7 +8,7 @@ * * Implementation of the New Floppy Image dialog. * - * Version: @(#)win_new_floppy.c 1.0.4 2018/03/04 + * Version: @(#)win_new_floppy.c 1.0.5 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -35,8 +35,8 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/win/win_opendir.c b/src/win/win_opendir.c index cbb857a..28a58f6 100644 --- a/src/win/win_opendir.c +++ b/src/win/win_opendir.c @@ -10,7 +10,7 @@ * * Based on old original code @(#)dir_win32.c 1.2.0 2007/04/19 * - * Version: @(#)win_opendir.c 1.0.1 2018/02/14 + * Version: @(#)win_opendir.c 1.0.2 2018/03/07 * * Author: Fred N. van Kempen, * @@ -47,6 +47,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/src/win/win_serial.c b/src/win/win_serial.c index 6ca11aa..51e3671 100644 --- a/src/win/win_serial.c +++ b/src/win/win_serial.c @@ -12,7 +12,7 @@ * Windows and UNIX systems, with support for FTDI and Prolific * USB ports. Support for these has been removed. * - * Version: @(#)win_serial.c 1.0.1 2018/02/14 + * Version: @(#)win_serial.c 1.0.2 2018/03/07 * * Author: Fred N. van Kempen, * @@ -48,6 +48,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 6516446..8cd9fb6 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -8,7 +8,7 @@ * * Implementation of the Settings dialog. * - * Version: @(#)win_settings.c 1.0.5 2018/03/01 + * Version: @(#)win_settings.c 1.0.6 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -35,12 +35,13 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include #include +#include #include #include #include "../emu.h" diff --git a/src/win/win_snd_gain.c b/src/win/win_snd_gain.c index f3f06e1..74b72a4 100644 --- a/src/win/win_snd_gain.c +++ b/src/win/win_snd_gain.c @@ -8,7 +8,7 @@ * * Implementation of the Sound Gain dialog. * - * Version: @(#)win_snd_gain.c 1.0.2 2018/02/21 + * Version: @(#)win_snd_gain.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -35,8 +35,8 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/win/win_status.c b/src/win/win_status.c index 13b957c..c60804c 100644 --- a/src/win/win_status.c +++ b/src/win/win_status.c @@ -8,7 +8,7 @@ * * Implementation of the Status Window dialog. * - * Version: @(#)win_status.c 1.0.2 2018/02/21 + * Version: @(#)win_status.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -36,8 +36,8 @@ * Boston, MA 02111-1307 * USA. */ +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c index 0c4e253..f907e41 100644 --- a/src/win/win_stbar.c +++ b/src/win/win_stbar.c @@ -8,7 +8,7 @@ * * Implementation of the Status Bar module. * - * Version: @(#)win_stbar.c 1.0.2 2018/02/21 + * Version: @(#)win_stbar.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -35,6 +35,7 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/src/win/win_thread.c b/src/win/win_thread.c index 8320d70..9ca3e0c 100644 --- a/src/win/win_thread.c +++ b/src/win/win_thread.c @@ -8,7 +8,7 @@ * * Implement threads and mutexes for the Win32 platform. * - * Version: @(#)win_thread.c 1.0.2 2018/02/21 + * Version: @(#)win_thread.c 1.0.3 2018/03/07 * * Authors: Fred N. van Kempen, * Sarah Walker, @@ -35,8 +35,8 @@ * USA. */ #define UNICODE +#define WIN32_LEAN_AND_MEAN #include -#include #include #include #include diff --git a/src/win/win_ui.c b/src/win/win_ui.c index fd6c473..00c7c06 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -8,7 +8,7 @@ * * Implement the user Interface module. * - * Version: @(#)win_ui.c 1.0.3 2018/03/02 + * Version: @(#)win_ui.c 1.0.4 2018/03/07 * * Authors: Fred N. van Kempen, * Miran Grca,