]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
trivial changes in several modules
authorFrode Solheim <frode@fs-uae.net>
Fri, 4 Sep 2015 19:20:21 +0000 (21:20 +0200)
committerFrode Solheim <frode@fs-uae.net>
Fri, 4 Sep 2015 20:36:11 +0000 (22:36 +0200)
59 files changed:
a2091.cpp
ar.cpp
archivers/chd/corefile.h
archivers/dms/u_deep.cpp
archivers/zip/unzip.cpp
audio.cpp
blitter.cpp
blkdev_cdimage.cpp
bsdsocket.cpp
catweasel.cpp
cd32_fmv.cpp
cia.cpp
cpuboard.cpp
cpummu.cpp
cpummu30.cpp
crc32.cpp
diskutil.cpp
dongle.cpp
drawing.cpp
enforcer.cpp
fake86_cpu.cpp
fpp.cpp
fsusage.cpp
genlinetoscr.cpp
include/scsi.h
include/uae/endian.h [new file with mode: 0644]
include/uae/seh.h [new file with mode: 0644]
inputrecord.cpp
mame/mameglue.h
ncr_scsi.cpp
newcpu.cpp
od-win32/bsdsock.cpp
od-win32/caps/CapsAPI.h
od-win32/caps/Comtype.h
od-win32/cda_play.cpp
od-win32/dinput.cpp
od-win32/dxwrap.h
od-win32/keyboard_win32.cpp
od-win32/md-fpp.h
od-win32/parser.h
od-win32/registry.h
od-win32/screenshot.cpp
od-win32/sounddep/sound.cpp
od-win32/sounddep/sound.h
od-win32/threaddep/thread.h
p96_blit.cpp
ppc/ppcd.cpp
ppc/ppcd.h
qemuvga/qemuuaeglue.h
sampler.cpp
savestate.cpp
scp.cpp
scsi.cpp
scsitape.cpp
sndboard.cpp
specialmonitors.cpp
uaelib.cpp
writelog.cpp
x86.cpp

index 3bb74bd2f270f46ff55b7dacf449a6ec8e9a8d45..6340bbcfb2db788fb5be61c4e591a75df3ebb1e4 100644 (file)
--- a/a2091.cpp
+++ b/a2091.cpp
@@ -3422,7 +3422,7 @@ void gvp_s2_add_accelerator_scsi_unit(int ch, struct uaedev_config_info *ci, str
        add_scsi_device(&wd->scsis[ch], ch, ci, rc);
 }
 
-void a2091_free_device (struct wd_state *wd)
+static void a2091_free_device (struct wd_state *wd)
 {
        freencrunit(wd);
 }
@@ -3586,7 +3586,7 @@ addrbank *a2090_init (struct romconfig *rc)
        return wd->bank;
 }
 
-void gvp_free_device (struct wd_state *wd)
+static void gvp_free_device (struct wd_state *wd)
 {
        freencrunit(wd);
 }
diff --git a/ar.cpp b/ar.cpp
index ba8d80bfbaf8b2c5a503d2eccf3532c548c7f39b..23855d83f4417a066e16c7e2b1a18d5157ac05ab 100644 (file)
--- a/ar.cpp
+++ b/ar.cpp
 #include "savestate.h"
 #include "crc32.h"
 #include "akiko.h"
-#include "picasso96.h"
 
 #define DEBUG
 #ifdef DEBUG
index 87ca8e2b187c9ef9f77dc45587fc964ee4bd77f2..10bfc397c3874c21e267cef78d1e03eb233862c8 100644 (file)
@@ -116,7 +116,7 @@ int core_fputs(core_file *f, const TCHAR *s);
 
 /* printf-style text write to a file */
 int core_vfprintf(core_file *f, const TCHAR *fmt, va_list va);
-int CLIB_DECL core_fprintf(core_file *f, const TCHAR *fmt, ...) ATTR_PRINTF(2,3);
+int CLIB_DECL core_fprintf(core_file *f, const TCHAR *fmt, ...);
 
 
 
index 1595d77844691cce6cade6253dbbf87e732149a7..95245f89bb57fe352496e5ab562a3678eca87f5e 100644 (file)
@@ -48,7 +48,7 @@ static USHORT son[T];   /* pointers to child nodes (son[], son[] + 1) */
 
 
 
-void Init_DEEP_Tabs(void){
+static void Init_DEEP_Tabs(void){
        USHORT i, j;
 
        for (i = 0; i < N_CHAR; i++) {
index 62ce21687b3df897d58763209a60bf92e8f13c07..4d6b33047b61632ef1850f40cdc50e71411e6369 100644 (file)
@@ -888,7 +888,7 @@ extern int ZEXPORT unzOpenCurrentFile (unzFile file)
 
        if ((s->cur_file_info.compression_method!=0) &&
        (s->cur_file_info.compression_method!=Z_DEFLATED)) {
-               write_log (_T("ZIP: unknown compression method %lld\n"), s->cur_file_info.compression_method);
+               write_log (_T("ZIP: unknown compression method %ld\n"), s->cur_file_info.compression_method);
                err=UNZ_BADZIPFILE;
        }
        Store = s->cur_file_info.compression_method==0;
index ef6aadda6883048ec77a53fc76b5aeceef7b7e57..e279844945d3fff434410a1ef0dbd67e826b17a8 100644 (file)
--- a/audio.cpp
+++ b/audio.cpp
@@ -899,7 +899,7 @@ void sample16ss_handler (void)
 /* This interpolator examines sample points when Paula switches the output
 * voltage and computes the average of Paula's output */
 
-void sample16ss_anti_handler (void)
+static void sample16ss_anti_handler (void)
 {
        int data0, data1, data2, data3;
        int datas[AUDIO_CHANNELS_PAULA];
@@ -949,7 +949,7 @@ static void sample16si_anti_handler (void)
        check_sound_buffers ();
 }
 
-void sample16ss_sinc_handler (void)
+static void sample16ss_sinc_handler (void)
 {
        int data0, data1, data2, data3;
        int datas[AUDIO_CHANNELS_PAULA];
@@ -1346,7 +1346,7 @@ static void loaddat (int nr, bool modper)
                        return;
                if (modper && audap) {
                        if (cdp->dat == 0)
-                               cdp[1].per = 65536 * CYCLE_UNIT;
+                cdp[1].per = 65536 * CYCLE_UNIT;
                        else if (cdp->dat > PERIOD_MIN)
                                cdp[1].per = cdp->dat * CYCLE_UNIT;
                        else
@@ -1588,7 +1588,7 @@ static void audio_state_channel2 (int nr, bool perfin)
        }
 }
 
-void audio_state_cda(void);
+static void audio_state_cda(void);
 
 static void audio_state_channel (int nr, bool perfin)
 {
@@ -2306,7 +2306,7 @@ void audio_enable_sndboard(bool enable)
        audio_set_extra_channels();
 }
 
-void audio_enable_cda(bool enable)
+static void audio_enable_cda(bool enable)
 {
        struct audio_channel_data *acd = audio_channel + AUDIO_CHANNEL_CDA_LEFT;
        if (!enable) {
index 19e8a7e927e832c036f52bf9fac60d5f6d4e3661..9fa0577a7a35b5e2fa273525b0e478d0be0c387a 100644 (file)
@@ -341,7 +341,6 @@ int blitter_channel_state (void)
        return channel_state (blit_cyclecounter);
 }
 
-extern int is_bitplane_dma (int hpos);
 STATIC_INLINE int canblit (int hpos)
 {
        if (!dmaen (DMA_BLITTER))
@@ -953,21 +952,16 @@ STATIC_INLINE uae_u16 blitter_doblit (void)
 
 STATIC_INLINE void blitter_doddma (int hpos)
 {
-       int wd;
        uae_u16 d;
 
-       wd = 0;
        if (blit_dmacount2 == 0) {
                d = blitter_doblit ();
-               wd = -1;
        } else if (ddat2use) {
                d = ddat2;
                ddat2use = 0;
-               wd = 2;
        } else if (ddat1use) {
                d = ddat1;
                ddat1use = 0;
-               wd = 1;
        } else {
                static int warn = 10;
                if (warn > 0) {
index 823e1630e5520707392023eb6ce634924c4bfc90..1c254c928a3b2195e3100653383723a7b16d915b 100644 (file)
@@ -431,7 +431,7 @@ static void audio_unpack (struct cdunit *cdu, struct cdtoc *t)
 static volatile int cda_bufon[2];
 static cda_audio *cda;
 
-void next_cd_audio_buffer_callback(int bufnum)
+static void next_cd_audio_buffer_callback(int bufnum)
 {
        uae_sem_wait(&play_sem);
        if (bufnum >= 0) {
index 0f3282bcdddd43d59eec9c2b1502f3a783d707ce..7bb4238647fbe3bccf52c0f8019804dde0ff1a5c 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifdef BSDSOCKET
 
-int log_bsd;
+int log_bsd = 0;
 struct socketbase *socketbases;
 static uae_u32 SockLibBase;
 
@@ -169,17 +169,17 @@ bool checksd(TrapContext *context, SB, int sd)
                        if (iCounter != sd) {
                                if (getsock(sb,iCounter) == s) {
                                        releasesock(context, sb, sd);
-                                       return TRUE;
+                                       return true;
                                }
                        }
                }
                for (iCounter  = 0; iCounter < SOCKPOOLSIZE; iCounter++) {
                        if (s == sockdata->sockpoolsocks[iCounter])
-                               return TRUE;
+                               return true;
                }
        }
        BSDTRACE((_T("checksd FALSE s 0x%x sd %d\n"),s,sd));
-       return FALSE;
+       return false;
 }
 
 void setsd(TrapContext *context, SB, int sd, SOCKET_TYPE s)
index 6a2854df273860b82da0cdab1e154d3637e48921..4dfc51423d033c299fb0cb8a0ba636461c4ce21b 100644 (file)
@@ -714,4 +714,4 @@ int catweasel_detect (void)
        return FALSE;
 }
 
-#endif
\ No newline at end of file
+#endif
index 8177b35f1f3cc8aa6fd47b0cb3b6c04d1209e5af..64e86ffc38f670550a92106d2f57ccd1f6fe9566 100644 (file)
@@ -1371,7 +1371,7 @@ void cd32_fmv_set_sync(double svpos, double adjust)
        fmv_syncadjust = adjust;
 }
 
-void fmv_next_cd_audio_buffer_callback(int bufnum)
+static void fmv_next_cd_audio_buffer_callback(int bufnum)
 {
        uae_sem_wait(&play_sem);
        if (bufnum >= 0) {
diff --git a/cia.cpp b/cia.cpp
index ef15c962af4f89f9fdfc5adef271451daa36f1ee..e78c3cde76b6dc8face836cf84fd639ee8cad11c 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -2207,7 +2207,6 @@ static uae_u32 REGPARAM2 clock_wget (uaecptr addr)
 
 static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
 {
-       time_t t;
        struct tm *ct;
        uae_u8 v = 0;
 
@@ -2229,7 +2228,7 @@ static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
                        v = regs.irc >> 8;
                return v;
        }
-       t = time (0);
+       time_t t = time (0);
        t += currprefs.cs_rtc_adjust;
        ct = localtime (&t);
        addr >>= 2;
index 262dfe4d123af9391d7b8eacd68bbed65d7f0c2a..690c97032a8d221c1e8cb1219c260d877ba2be45 100644 (file)
@@ -946,10 +946,11 @@ static void cyberstorm_maprom(void)
 {
        if (a3000hmem_bank.allocated <= 2 * 524288)
                return;
-       if (maprom_state && is_ppc())
+       if (maprom_state && is_ppc()) {
                map_banks(&blizzardmaprom2_bank, CYBERSTORM_MAPROM_BASE >> 16, 524288 >> 16, 0);
-       else
+       } else {
                map_banks(&blizzardmaprom_bank, CYBERSTORM_MAPROM_BASE >> 16, 524288 >> 16, 0);
+       }
 }
 
 static void cyberstormmk2_maprom(void)
@@ -1710,7 +1711,7 @@ void cpuboard_init(void)
                mapped_malloc(&blizzardmaprom_bank);
 
        } else if (is_csmk3()) {
-       
+
                blizzardram_bank.start = CS_RAM_BASE;
                blizzardram_bank.allocated = cpuboard_size;
                blizzardram_bank.mask = blizzardram_bank.allocated - 1;
index 23c119b5dc2b6c09d8c6cc4d9215b180828af07e..233d0c7530019fbfa05e53d9571206db63901728 100644 (file)
@@ -293,7 +293,7 @@ static void mmu_dump_table(const char * label, uaecptr root_ptr)
 #endif
 
 /* {{{ mmu_dump_atc */
-void mmu_dump_atc(void)
+static void mmu_dump_atc(void)
 {
 
 }
@@ -750,7 +750,7 @@ uae_u32 REGPARAM2 mmu_get_ilong_unaligned(uaecptr addr)
        return res;
 }
 
-uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
+static uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
 {
        uae_u16 res;
 
@@ -768,7 +768,7 @@ uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
        return res;
 }
 
-uae_u32 REGPARAM2 mmu_get_lrmw_long_unaligned(uaecptr addr)
+static uae_u32 REGPARAM2 mmu_get_lrmw_long_unaligned(uaecptr addr)
 {
        uae_u32 res;
 
index eb5d1e99ae5901c8e5528f2748d0bb941b63a111..ac2a9519f5418884ec4ca727d9f1cf592186e8a3 100644 (file)
@@ -1700,7 +1700,8 @@ uae_u32 mmu030_get_long_atc(uaecptr addr, int l, uae_u32 fc) {
 
     return phys_get_long(physical_addr);
 }
-uae_u32 mmu030_get_ilong_atc(uaecptr addr, int l, uae_u32 fc) {
+
+static uae_u32 mmu030_get_ilong_atc(uaecptr addr, int l, uae_u32 fc) {
        uae_u32 page_index = addr & mmu030.translation.page.mask;
        uae_u32 addr_mask = mmu030.translation.page.imask;
 
@@ -1738,7 +1739,7 @@ uae_u16 mmu030_get_word_atc(uaecptr addr, int l, uae_u32 fc) {
     return phys_get_word(physical_addr);
 }
 
-uae_u16 mmu030_get_iword_atc(uaecptr addr, int l, uae_u32 fc) {
+static uae_u16 mmu030_get_iword_atc(uaecptr addr, int l, uae_u32 fc) {
        uae_u32 page_index = addr & mmu030.translation.page.mask;
        uae_u32 addr_mask = mmu030.translation.page.imask;
 
@@ -1800,6 +1801,7 @@ void mmu030_put_atc_generic(uaecptr addr, uae_u32 val, int l, uae_u32 fc, int si
            phys_put_long(physical_addr, val);
 
 }
+
 uae_u32 mmu030_get_atc_generic(uaecptr addr, int l, uae_u32 fc, int size, int flags, bool checkwrite) {
     uae_u32 page_index = addr & mmu030.translation.page.mask;
     uae_u32 addr_mask = mmu030.translation.page.imask;
@@ -2026,7 +2028,6 @@ uae_u8 mmu030_get_byte(uaecptr addr, uae_u32 fc) {
     }
 }
 
-
 /* Not commonly used access function */
 void mmu030_put_generic(uaecptr addr, uae_u32 val, uae_u32 fc, int size, int accesssize, int flags) {
     
index 29cd37699e0240fcf5cba2139363bd31f89d1761..200da20bde380124dd4fd2890ac65099973706ba 100644 (file)
--- a/crc32.cpp
+++ b/crc32.cpp
@@ -355,4 +355,4 @@ const TCHAR *get_sha1_txt (void *vinput, int len)
        }
        *p = 0;
        return outtxt;
-}
\ No newline at end of file
+}
index b96eaa9ee453c31bdd7ebc44cffc13031cd87dd0..47ba93ad9c7cdd3c55a00563c25e473ca546bd8b 100644 (file)
@@ -2,6 +2,7 @@
 #include "sysdeps.h"
 
 #include "crc32.h"
+#include "diskutil.h"
 
 #define MFMMASK 0x55555555
 static uae_u32 getmfmlong (uae_u16 * mbuf)
index 061d53f761c637aa63ce7355cc61b7636a5f9528..1024e6024b1610916e7e3dbea2f7ab08683ca6de 100644 (file)
@@ -12,6 +12,7 @@
 #include "sysdeps.h"
 
 #include "options.h"
+#include "dongle.h"
 #include "events.h"
 #include "uae.h"
 
index 73b100721faf1bccc71f912e17c8c1880f593a25..29746ad2ad1c3c41b6c01c1ab3d94573d71e0052 100644 (file)
@@ -308,7 +308,7 @@ static void clearbuffer (struct vidbuffer *dst)
        }
 }
 
-void reset_decision_table (void)
+static void reset_decision_table (void)
 {
        for (int i = 0; i < sizeof linestate / sizeof *linestate; i++) {
                linestate[i] = LINE_UNDECIDED;
@@ -1039,11 +1039,11 @@ STATIC_INLINE void fill_line_16 (uae_u8 *buf, int start, int stop, bool blank)
        unsigned int i;
        unsigned int rem = 0;
        xcolnr col = getbgc (blank);
-       if (((long)&b[start]) & 1)
+       if (((uintptr_t)&b[start]) & 1)
                b[start++] = (uae_u16) col;
        if (start >= stop)
                return;
-       if (((long)&b[stop]) & 1) {
+       if (((uintptr_t)&b[stop]) & 1) {
                rem++;
                stop--;
        }
@@ -2371,7 +2371,7 @@ void init_row_map (void)
        oldgenlock = init_genlock_data;
 }
 
-void init_aspect_maps (void)
+static void init_aspect_maps (void)
 {
        int i, maxl, h;
 
index f61da4ca0539a93bd7db93aec6e627f93a717824..3da1d5c676f60638c511a417383fc5a4ce390a9b 100644 (file)
@@ -20,6 +20,8 @@
 #include "enforcer.h"
 #include "debug.h"
 
+int enforcermode = 0;
+
 #ifdef AHI
 
 #if defined(JIT)
@@ -46,7 +48,6 @@
 extern uae_u8 *natmem_offset;
 
 static int enforcer_installed = 0;
-int enforcermode = 0;
 static int enforcer_hit = 0; /* set to 1 if displaying the hit */
 
 #define ENFORCER_BUF_SIZE 8192
@@ -422,7 +423,7 @@ end:
        enforcer_hit = 0;
 }
 
-uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
 {
        uae_u32 *m;
 
@@ -439,7 +440,7 @@ uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
        return do_get_mem_long (m);
 }
 
-uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
 {
        uae_u16 *m;
 
@@ -456,7 +457,7 @@ uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
        return do_get_mem_word (m);
 }
 
-uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
+static uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
 {
        addr -= chipmem_start_addr & chipmem_bank.mask;
        addr &= chipmem_bank.mask;
@@ -471,7 +472,7 @@ uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
        return chipmem_bank.baseaddr[addr];
 }
 
-void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
+static void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
 {
        uae_u32 *m;
 
@@ -491,7 +492,7 @@ void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
        do_put_mem_long (m, l);
 }
 
-void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
+static void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
 {
        uae_u16 *m;
 
@@ -510,7 +511,7 @@ void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
        do_put_mem_word (m, w);
 }
 
-void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
+static void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
 {
        addr -= chipmem_start_addr & chipmem_bank.mask;
        addr &= chipmem_bank.mask;
@@ -526,21 +527,21 @@ void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
        chipmem_bank.baseaddr[addr] = b;
 }
 
-int REGPARAM2 chipmem_check2 (uaecptr addr, uae_u32 size)
+static int REGPARAM2 chipmem_check2 (uaecptr addr, uae_u32 size)
 {
        addr -= chipmem_start_addr & chipmem_bank.mask;
        addr &= chipmem_bank.mask;
        return (addr + size) <= chipmem_bank.allocated;
 }
 
-uae_u8 * REGPARAM2 chipmem_xlate2 (uaecptr addr)
+static uae_u8 * REGPARAM2 chipmem_xlate2 (uaecptr addr)
 {
        addr -= chipmem_start_addr & chipmem_bank.mask;
        addr &= chipmem_bank.mask;
        return chipmem_bank.baseaddr + addr;
 }
 
-uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
 {
        special_mem_r;
        enforcer_display_hit (_T("LONG READ from"), m68k_getpc (), addr);
@@ -555,7 +556,7 @@ uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
 static int warned_JIT_0xF10000 = 0;
 #endif
 
-uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
 {
        special_mem_r;
 
@@ -576,7 +577,7 @@ uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
        return 0xbadf;
 }
 
-uae_u32        REGPARAM2 dummy_bget2 (uaecptr addr)
+static uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
 {
        special_mem_r;
        enforcer_display_hit (_T("BYTE READ from"), m68k_getpc (), addr);
@@ -587,7 +588,7 @@ uae_u32     REGPARAM2 dummy_bget2 (uaecptr addr)
        return 0xbadedeef;
 }
 
-void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
+static void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
 {
        special_mem_w;
        enforcer_display_hit (_T("LONG WRITE to"), m68k_getpc (), addr);
@@ -597,7 +598,7 @@ void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
        }
 }
 
-void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
+static void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
 {
        special_mem_w;
        enforcer_display_hit (_T("WORD WRITE to"), m68k_getpc (), addr);
@@ -607,7 +608,7 @@ void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
        }
 }
 
-void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
+static void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
 {
        special_mem_w;
        enforcer_display_hit (_T("BYTE WRITE to"), m68k_getpc (), addr);
@@ -617,7 +618,7 @@ void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
        }
 }
 
-int REGPARAM2 dummy_check2 (uaecptr addr, uae_u32 size)
+static int REGPARAM2 dummy_check2 (uaecptr addr, uae_u32 size)
 {
        special_mem_r;
        enforcer_display_hit (_T("CHECK from "), m68k_getpc (), addr);
index 7074be56fead7817060fb9efdad5bc040b932c77..717b7c59e3bc2c58be9a2c5218bf14434350eb78 100644 (file)
@@ -126,7 +126,7 @@ extern uint16_t     VGA_SC[0x100], VGA_CRTC[0x100], VGA_ATTR[0x100], VGA_GC[0x100];
 extern uint8_t updatedscreen;
 #endif
 
-union _bytewordregs_ regs;
+static union _bytewordregs_ regs;
 
 #if 0
 uint8_t        portram[0x10000];
diff --git a/fpp.cpp b/fpp.cpp
index 715570be3fbc61478f426062ae47788156fac672..3687032240cdfac62b4306e5bfbdcc92caae8123 100644 (file)
--- a/fpp.cpp
+++ b/fpp.cpp
@@ -33,7 +33,7 @@
 #include "cpummu030.h"
 #include "debug.h"
 
-#ifdef WITH_SOFTFLOAT 
+#ifdef WITH_SOFTFLOAT
 #include "softfloatx80.h"
 #endif
 
@@ -566,20 +566,20 @@ static void native_set_fpucw (uae_u32 m68k_cw)
                __asm {
                        fldcw word ptr x87_cw
                }
-#elif defined(X86_ASSEMBLY)
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
                __asm__ ("fldcw %0" : : "m" (*&x87_cw));
+#else
+               #warning floating point control not specified
 #endif
+#endif /* USE_X86_FPUCW */
 #endif
-#endif
+#else
+#warning NATIVE_FPUCW not enabled
 #endif
        }
 }
 
-#if defined(uae_s64) /* Close enough for government work? */
 typedef uae_s64 tointtype;
-#else
-typedef uae_s32 tointtype;
-#endif
 
 static void fpu_format_error (void)
 {
@@ -945,7 +945,7 @@ static tointtype toint(fpdata *src, int size)
 #ifdef WITH_SOFTFLOAT
        if (currprefs.fpu_softfloat) {
                if (floatx80_compare(src->fpx, fxsizes[size * 2 + 0], fxstatus) == float_relation_greater)
-                       return floatx80_to_int32(fxsizes[size * 2 + 0], fxstatus);      
+                       return floatx80_to_int32(fxsizes[size * 2 + 0], fxstatus);
                if (floatx80_compare(src->fpx, fxsizes[size * 2 + 1], fxstatus) == float_relation_less)
                        return floatx80_to_int32(fxsizes[size * 2 + 1], fxstatus);
                return floatx80_to_int32(src->fpx, fxstatus);
@@ -1022,7 +1022,7 @@ static bool fp_is_infinity (fpdata *fpd)
 #ifdef _MSC_VER
        return !_finite (fpd->fp);
 #elif defined(HAVE_ISINF)
-       return _isinf (fpd->fp);
+       return isinf(fpd->fp);
 #else
        return false;
 #endif
@@ -1063,7 +1063,7 @@ uae_u32 fpp_get_fpsr (void)
        if (answer & (1 << 10))
                answer |= 0x10; // DZ = DZ
        if (answer & ((1 << 12) | (1 << 9) | (1 << 8)))
-               answer |= 0x08; // INEX = INEX1 | INEX2 | OVFL 
+               answer |= 0x08; // INEX = INEX1 | INEX2 | OVFL
 
        regs.fpsr = answer;
 
index 181272ecd239b8a08b39e934f6f69f60d51371b7..73af6458130196c92f95224ccd1cec368c11fec0 100644 (file)
@@ -136,7 +136,7 @@ int statvfs ();
 Return the actual number of bytes read, zero for EOF, or negative
 for an error.  */
 
-int safe_read (int desc, TCHAR *ptr, int len)
+static int safe_read (int desc, TCHAR *ptr, int len)
 {
        int n_chars;
 
index e997dfb3231f9b74865d422e3138df3cf4e0c047..05695b4fb05cfe979e0368ec5ba99d2c58e62036 100644 (file)
@@ -86,39 +86,39 @@ typedef enum
 static FILE *outfile;
 static unsigned int outfile_indent = 0;
 
-void set_outfile (FILE *f)
+static void set_outfile (FILE *f)
 {
        outfile = f;
 }
 
-int set_indent (int indent)
+static int set_indent (int indent)
 {
        int old_indent = outfile_indent;
        outfile_indent = indent;
        return old_indent;
 }
 
-void outindent(void)
+static void outindent(void)
 {
        unsigned int i;
        for (i = 0; i < outfile_indent; i++)
                fputc(' ', outfile);
 }
 
-void outf(const char *s, ...)
+static void outf(const char *s, ...)
 {
        va_list ap;
        va_start(ap, s);
        vfprintf(outfile, s, ap);
 }
 
-void outln (const char *s)
+static void outln (const char *s)
 {
        outindent();
        fprintf (outfile, "%s\n", s);
 }
 
-void outlnf (const char *s, ...)
+static void outlnf (const char *s, ...)
 {
        va_list ap;
        outindent();
@@ -378,7 +378,7 @@ static void out_linetoscr_mode (DEPTH_T bpp, HMODE_T hmode, int aga, int spr, CM
 
        if (bpp == DEPTH_16BPP && hmode != HMODE_DOUBLE && hmode != HMODE_DOUBLE2X && spr == 0) {
                outln (         "int rem;");
-               outln (         "if (((long)&buf[dpix]) & 2) {");
+               outln (         "if (((uintptr_t)&buf[dpix]) & 2) {");
                outln (         "    uae_u32 spix_val;");
                outln (         "    uae_u32 dpix_val;");
 
@@ -390,7 +390,7 @@ static void out_linetoscr_mode (DEPTH_T bpp, HMODE_T hmode, int aga, int spr, CM
                outln (         "}");
                outln (         "if (dpix >= dpix_end)");
                outln (         "    return spix;");
-               outln (         "rem = (((long)&buf[dpix_end]) & 2);");
+               outln (         "rem = (((uintptr_t)&buf[dpix_end]) & 2);");
                outln (         "if (rem)");
                outln (         "    dpix_end--;");
        }
index d7f28e1c3a23f1bc54907257a3795a01857c9c44..d525097fef5ab918e2f73d7481634271e8b13c80 100644 (file)
@@ -2,6 +2,7 @@
 #define UAE_SCSI_H
 
 #include "uae/types.h"
+#include "memory.h"
 
 #define SCSI_DEFAULT_DATA_BUFFER_SIZE (256 * 512)
 
diff --git a/include/uae/endian.h b/include/uae/endian.h
new file mode 100644 (file)
index 0000000..5420526
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef UAE_ENDIAN_H
+#define UAE_ENDIAN_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "uae/types.h"
+
+#ifdef _WIN32
+
+/* Use custom conversion routines for Windows */
+#ifdef WORDS_BIGENDIAN
+#error big-endian windows not supported here
+#endif
+
+#ifndef be16toh
+static inline uint16_t be16toh_impl(uint16_t v)
+{
+       return (v << 8) | (v >> 8);
+}
+#define be16toh be16toh_impl
+#endif
+
+#ifndef le16toh
+static inline uint16_t le16toh_impl(uint16_t v)
+{
+       return v;
+}
+#define le16toh le16toh_impl
+#endif
+
+#ifndef le32toh
+static inline uint32_t le32toh_impl(uint32_t v)
+{
+       return v;
+}
+#define le32toh le32toh_impl
+#endif
+
+#elif defined(HAVE_LIBKERN_OSBYTEORDER_H)
+
+/* OS X lacks endian.h, but has something similar */
+#include <libkern/OSByteOrder.h>
+#define htobe16(x) OSSwapHostToBigInt16(x)
+#define htole16(x) OSSwapHostToLittleInt16(x)
+#define be16toh(x) OSSwapBigToHostInt16(x)
+#define le16toh(x) OSSwapLittleToHostInt16(x)
+#define htobe32(x) OSSwapHostToBigInt32(x)
+#define htole32(x) OSSwapHostToLittleInt32(x)
+#define be32toh(x) OSSwapBigToHostInt32(x)
+#define le32toh(x) OSSwapLittleToHostInt32(x)
+#define htobe64(x) OSSwapHostToBigInt64(x)
+#define htole64(x) OSSwapHostToLittleInt64(x)
+#define be64toh(x) OSSwapBigToHostInt64(x)
+#define le64toh(x) OSSwapLittleToHostInt64(x)
+
+#elif defined(HAVE_ENDIAN_H)
+
+/* Linux has endian.h */
+#include <endian.h>
+
+#elif defined(HAVE_SYS_ENDIAN_H)
+
+/* BSD's generally have sys/endian.h */
+#include <sys/endian.h>
+
+#endif
+
+#endif /* UAE_ENDIAN_H */
diff --git a/include/uae/seh.h b/include/uae/seh.h
new file mode 100644 (file)
index 0000000..37de7c6
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Structured exception handling
+ * Copyright (C) 2014 Frode Solheim
+ *
+ * Licensed under the terms of the GNU General Public License version 2.
+ * See the file 'COPYING' for full license text.
+ */
+
+#ifndef UAE_SEH_H
+#define UAE_SEH_H
+
+#ifdef _MSC_VER
+
+/* Structured exception handling is available */
+
+#else
+
+/* MinGW defines __try / __except */
+#undef __try
+#undef __except
+
+/* Structured exception handling is not available - do nothing */
+#define __try
+#define __except(x)
+
+#endif
+
+#endif /* UAE_SEH_H */
index 06fb769c9103229f1371d77d491c5b7d94fd8c2f..eddb639e33ce528c0ddd5d1b53f7dfe4d1a90ef4 100644 (file)
@@ -25,6 +25,7 @@
 #include "uae.h"
 #include "disk.h"
 #include "fsdb.h"
+#include "xwin.h"
 
 #if INPUTRECORD_DEBUG > 0
 #include "memory.h"
@@ -56,8 +57,6 @@ static uae_u32 pcs2[16];
 extern void activate_debugger (void);
 static int warned;
 
-extern void refreshtitle (void);
-
 static void setlasthsync (void)
 {
        if (lasthsync / current_maxvpos () != hsync_counter / current_maxvpos ()) {
index 6d47a19d09954acca1963181e7d69c6d355cf532..96621e2fe71d81458f3c87a569aa9b9e0ad222f4 100644 (file)
@@ -1,4 +1,4 @@
-
+#include "uae/types.h"
 
 #include "sysconfig.h"
 #include "sysdeps.h"
@@ -41,6 +41,7 @@ inline UINT64 mulu_32x32(UINT32 a, UINT32 b)
 {
        return (UINT64)a * (UINT64)b;
 }
+
 #define NULL 0
 
 class direct_read_data
index d7553c0b0d5d261f82d62f4b54765f47328d4170..6041ae3d49bb57e019a1c642b1c7099341b8e23e 100644 (file)
@@ -162,9 +162,6 @@ static struct ncr_state *ncr_a4000t;
 static struct ncr_state *ncra4091[MAX_DUPLICATE_EXPANSION_BOARDS];
 static struct ncr_state *ncr_wildfire;
 
-extern void cyberstorm_mk3_ppc_irq(int);
-extern void blizzardppc_irq(int);
-
 static void set_irq2(int level)
 {
        if (level)
@@ -390,11 +387,13 @@ static void ncr_io_bput(struct ncr_state *ncr, uaecptr addr, uae_u32 val)
        addr &= IO_MASK;
        lsi_mmio_write(ncr->devobject.lsistate, beswap(addr), val, 1);
 }
+
 static void ncr710_io_bput(struct ncr_state *ncr, uaecptr addr, uae_u32 val)
 {
        addr &= IO_MASK;
        lsi710_mmio_write(ncr->devobject.lsistate, beswap(addr), val, 1);
 }
+
 void cpuboard_ncr710_io_bput(uaecptr addr, uae_u32 v)
 {
        ncr710_io_bput(ncr_cpuboard, addr, v);
@@ -419,11 +418,13 @@ static uae_u32 ncr_io_bget(struct ncr_state *ncr, uaecptr addr)
        addr &= IO_MASK;
        return lsi_mmio_read(ncr->devobject.lsistate, beswap(addr), 1);
 }
+
 static uae_u32 ncr710_io_bget(struct ncr_state *ncr, uaecptr addr)
 {
        addr &= IO_MASK;
        return lsi710_mmio_read(ncr->devobject.lsistate, beswap(addr), 1);
 }
+
 uae_u32 cpuboard_ncr710_io_bget(uaecptr addr)
 {
        return ncr710_io_bget(ncr_cpuboard, addr);
index a65ae5b82cc3a8979647e76fc4a811260deeb24e..2f035ddc16e94c3b8002938f3b259961ab9400a9 100644 (file)
@@ -43,6 +43,7 @@
 #include "cpuboard.h"
 #include "threaddep/thread.h"
 #include "x86.h"
+#include "bsdsocket.h"
 #ifdef JIT
 #include "jit/compemu.h"
 #include <signal.h>
@@ -1910,7 +1911,7 @@ void REGPARAM2 MakeSR (void)
                |  GET_CFLG ());
 }
 
-void SetSR (uae_u16 sr)
+static void SetSR (uae_u16 sr)
 {
        regs.sr &= 0xff00;
        regs.sr |= sr;
@@ -3644,8 +3645,6 @@ static int do_specialties (int cycles)
        isstopped:
                check_uae_int_request();
                {
-                       extern void bsdsock_fake_int_handler (void);
-                       extern int volatile bsd_int_requested;
                        if (bsd_int_requested)
                                bsdsock_fake_int_handler ();
                }
index 69516842c0296b451461fd2165934259d35d9722..f39d30151129806d48406c59bb8a60dd798dc4d2 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "options.h"
 #include "memory.h"
+#include "uae/seh.h"
 #include "custom.h"
 #include "events.h"
 #include "newcpu.h"
@@ -117,8 +118,6 @@ extern HWND hAmigaWnd;
 
 static LRESULT CALLBACK SocketWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
 
-static int PASCAL WSAEventSelect(SOCKET,HANDLE,long);
-
 #define PREPARE_THREAD EnterCriticalSection(&bsd->SockThreadCS)
 #define TRIGGER_THREAD { SetEvent(bsd->hSockReq); WaitForSingleObject(bsd->hSockReqHandled, INFINITE); LeaveCriticalSection(&bsd->SockThreadCS); }
 
@@ -515,7 +514,7 @@ void sockabort(SB)
        unlocksigqueue();
 }
 
-void setWSAAsyncSelect(SB, uae_u32 sd, SOCKET s, long lEvent )
+static void setWSAAsyncSelect(SB, uae_u32 sd, SOCKET s, long lEvent )
 {
        if (sb->mtable[sd - 1]) {
                long wsbevents = 0;
@@ -1654,7 +1653,7 @@ int host_CloseSocket(TrapContext *context, SB, int sd)
                        sb->mtable[sd-1] = 0;
                }
 
-               if (checksd(context, sb ,sd) == TRUE)
+               if (checksd(context, sb ,sd) == true)
                        return 0;
 
                BEGINBLOCKING;
index 0d5bc9d66ff1d27301e4771d197384a175d229aa..562e789ce4d7a62c026590b4826b11b7eb3420b8 100644 (file)
@@ -90,7 +90,7 @@ struct CapsTrackInfo {
        UDWORD sectorcnt;  // available sectors
        UDWORD sectorsize; // sector size
        UDWORD trackcnt;   // track variant count
-       PUBYTE trackbuf;   // track buffer memory 
+       PUBYTE trackbuf;   // track buffer memory
        UDWORD tracklen;   // track buffer memory length
        PUBYTE trackdata[CAPS_MTRS]; // track data pointer if available
        UDWORD tracksize[CAPS_MTRS]; // track data size
@@ -107,7 +107,7 @@ struct CapsTrackInfoT1 {
        UDWORD head;       // head#
        UDWORD sectorcnt;  // available sectors
        UDWORD sectorsize; // sector size
-       PUBYTE trackbuf;   // track buffer memory 
+       PUBYTE trackbuf;   // track buffer memory
        UDWORD tracklen;   // track buffer memory length
        UDWORD timelen;    // timing buffer length
        PUDWORD timebuf;   // timing buffer
@@ -123,7 +123,7 @@ struct CapsTrackInfoT2 {
        UDWORD head;       // head#
        UDWORD sectorcnt;  // available sectors
        UDWORD sectorsize; // sector size, unused
-       PUBYTE trackbuf;   // track buffer memory 
+       PUBYTE trackbuf;   // track buffer memory
        UDWORD tracklen;   // track buffer memory length
        UDWORD timelen;    // timing buffer length
        PUDWORD timebuf;   // timing buffer
index 56bc0251df95bc8884e9b689755bc5d56019a590..f55b235a24dc480d0451f61f7f88e07799a674f2 100644 (file)
@@ -4,14 +4,14 @@
 typedef void *PVOID;
 typedef char *PCHAR;
 
-typedef unsigned char UBYTE;
-typedef unsigned short UWORD;
-typedef unsigned long UDWORD;
-typedef unsigned __int64 UQUAD;
-typedef signed char SBYTE;
-typedef signed short SWORD;
-typedef signed long SDWORD;
-typedef signed __int64 SQUAD;
+typedef uae_u8 UBYTE;
+typedef uae_u16 UWORD;
+typedef uae_u32 UDWORD;
+typedef uae_u64 UQUAD;
+typedef uae_s8 SBYTE;
+typedef uae_s16 SWORD;
+typedef uae_s32 SDWORD;
+typedef uae_s64 SQUAD;
 
 typedef UBYTE *PUBYTE;
 typedef UWORD *PUWORD;
index 7291194ae832fcbd84c3256703d69b090300842c..5ddea5d12387b001c69f1be30f3352532252c1bc 100644 (file)
@@ -153,7 +153,7 @@ cda_audio::cda_audio(int num_sectors, int sectorsize, int samplerate)
        }
        this->num_sectors = num_sectors;
        for (int i = 0; i < 2; i++) {
-               memset (&whdr[i], 0, sizeof WAVEHDR);
+               memset (&whdr[i], 0, sizeof(WAVEHDR));
                whdr[i].dwBufferLength = sectorsize * num_sectors;
                whdr[i].lpData = (LPSTR)buffers[i];
                mmr = waveOutPrepareHeader (wavehandle, &whdr[i], sizeof (WAVEHDR));
index ca4cfb25609df3cd639fadbb22c6b0bc1ea10f08..a51d54d18c0096c4982b3cc37b14cc18e1df4d65 100644 (file)
@@ -402,12 +402,12 @@ static bool test_rawinput (int usage)
 
        rid.usUsagePage = 1;
        rid.usUsage = usage;
-       if (RegisterRawInputDevices (&rid, 1, sizeof RAWINPUTDEVICE) == FALSE) {
+       if (RegisterRawInputDevices (&rid, 1, sizeof(RAWINPUTDEVICE)) == FALSE) {
                write_log (_T("RAWINPUT test failed, usage=%d ERR=%d\n"), usage, GetLastError ());
                return false;
        }
        rid.dwFlags |= RIDEV_REMOVE;
-       if (RegisterRawInputDevices (&rid, 1, sizeof RAWINPUTDEVICE) == FALSE) {
+       if (RegisterRawInputDevices (&rid, 1, sizeof(RAWINPUTDEVICE)) == FALSE) {
                write_log (_T("RAWINPUT test failed (release), usage=%d, ERR=%d\n"), usage, GetLastError ());
                return false;
        }
@@ -501,7 +501,7 @@ static int doregister_rawinput (void)
        if (!add)
                rawinput_reg = -rawinput_reg;
        //write_log (_T("+++++++++++++++++++++++++++%x\n"), hMainWnd);
-       if (RegisterRawInputDevices (rid, num, sizeof RAWINPUTDEVICE) == FALSE) {
+       if (RegisterRawInputDevices (rid, num, sizeof(RAWINPUTDEVICE)) == FALSE) {
                write_log (_T("RAWINPUT %sregistration failed %d\n"),
                        add ? _T("") : _T("un"), GetLastError ());
                return 0;
@@ -1118,7 +1118,7 @@ static void rawinputfriendlynames (void)
                        for (i = 0; SetupDiEnumDeviceInfo (di, i, &dd); i++) {
                                TCHAR devpath[MAX_DPATH];
                                DWORD size = 0;
-                               if (SetupDiGetDeviceInstanceId (di, &dd, devpath, sizeof devpath / sizeof TCHAR , &size)) {
+                               if (SetupDiGetDeviceInstanceId (di, &dd, devpath, sizeof devpath / sizeof(TCHAR), &size)) {
                                        DEVINST devinst = dd.DevInst;
 
                                        TCHAR *cg = outGUID (&guid[ii]);
@@ -1127,15 +1127,15 @@ static void rawinputfriendlynames (void)
                                                ULONG size2;
                                                TCHAR bufguid[MAX_DPATH];
        
-                                               size2 = sizeof bufguid / sizeof TCHAR;
+                                               size2 = sizeof bufguid / sizeof(TCHAR);
                                                if (CM_Get_DevNode_Registry_Property (devinst, CM_DRP_CLASSGUID, NULL, bufguid, &size2, 0) != CR_SUCCESS)
                                                        break;
                                                if (_tcsicmp (cg, bufguid))
                                                        break;
 
-                                               size2 = sizeof devname / sizeof TCHAR;
+                                               size2 = sizeof devname / sizeof(TCHAR);
                                                if (CM_Get_DevNode_Registry_Property (devinst, CM_DRP_FRIENDLYNAME, NULL, devname, &size2, 0) != CR_SUCCESS) {
-                                                       ULONG size2 = sizeof devname / sizeof TCHAR;
+                                                       ULONG size2 = sizeof devname / sizeof(TCHAR);
                                                        if (CM_Get_DevNode_Registry_Property (devinst, CM_DRP_DEVICEDESC, NULL, devname, &size2, 0) != CR_SUCCESS)
                                                                devname[0] = 0;
                                                }
@@ -1818,7 +1818,7 @@ static bool initialize_rawinput (void)
                                                                                                                        did->axisname[axiscnt] = my_strdup (tmp);
                                                                                                                        did->axissort[axiscnt] = hidtable[ht].priority * 2 + l;
                                                                                                                        did->axismappings[axiscnt] = acnt;
-                                                                                                                       memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof HIDP_VALUE_CAPS);
+                                                                                                                       memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof(HIDP_VALUE_CAPS));
                                                                                                                        did->axistype[axiscnt] = l + 1;
                                                                                                                        axiscnt++;
                                                                                                                }
@@ -1827,7 +1827,7 @@ static bool initialize_rawinput (void)
                                                                                                        did->axissort[axiscnt] = hidtable[ht].priority * 2;
                                                                                                        did->axisname[axiscnt] = my_strdup (hidtable[ht].name);
                                                                                                        did->axismappings[axiscnt] = acnt;
-                                                                                                       memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof HIDP_VALUE_CAPS);
+                                                                                                       memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof(HIDP_VALUE_CAPS));
                                                                                                        fixhidvcaps (&rdi->hid, &did->hidvcaps[axiscnt]);
                                                                                                        did->axistype[axiscnt] = hidtable[ht].type;
                                                                                                        axiscnt++;
@@ -2120,8 +2120,8 @@ static void handle_rawinput_2 (RAWINPUT *raw)
                                                        }
                                                }
                                        }
-                                       memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof USAGE_AND_PAGE);
-                                       memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof USAGE_AND_PAGE);
+                                       memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof(USAGE_AND_PAGE));
+                                       memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof(USAGE_AND_PAGE));
                                        for (int axisnum = 0; axisnum < did->axles; axisnum++) {
                                                ULONG val;
                                                int usage = did->axismappings[axisnum];
@@ -3670,8 +3670,8 @@ static void read_joystick (void)
                                                                write_log (_T("%d/%d OFF\n"), did->prevusagelist[j].UsagePage, did->prevusagelist[j].Usage);
                                                        }
                                                }
-                                               memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof USAGE_AND_PAGE);
-                                               memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof USAGE_AND_PAGE);
+                                               memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof(USAGE_AND_PAGE));
+                                               memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof(USAGE_AND_PAGE));
                                        }
                                }
                        }
index e9e59d8440979ab6a2af11e0a6b6a4bc526c8f44..08cdcabdb8cddc652a48513a7f872d558fbfd6b5 100644 (file)
@@ -144,4 +144,3 @@ int dx_islost (void);
 #define DDFORCED_SYSMEM 3
 
 #endif
-
index 1c8360b1b620d49c8ad328313d657a8433b3d6a5..9e1fdf799ad623a57218c99d688d7dd6b798aa2d 100644 (file)
 //#define DBG_KEYBD 1
 //#define DEBUG_KBD
 
+#ifndef DIK_PREVTRACK
+/* Not defined by MinGW */
+#define DIK_PREVTRACK 0x90
+#endif
+
 static struct uae_input_device_kbr_default keytrans_amiga[] = {
 
        { DIK_ESCAPE, INPUTEVENT_KEY_ESC },
index d7cb7885c789e29b8c9e0f20432fdbafad3b0758..45058c0e0eeef54e56b4396019dce5f9d1d3a225 100644 (file)
@@ -9,6 +9,8 @@
   * Modified 2005 Peter Keunecke
   */
 
+#include <math.h>
+
 #define        FPCR_ROUNDING_MODE      0x00000030
 #define        FPCR_ROUND_NEAR         0x00000000
 #define        FPCR_ROUND_ZERO         0x00000010
@@ -174,8 +176,13 @@ STATIC_INLINE double to_double_x(uae_u32 wrd1, uae_u32 wrd2)
                uae_u32 u[2];
        } val;
 
-       val.u[0] = wrd2; // little endian
+#ifdef WORDS_BIGENDIAN
+       val.u[0] = wrd1;
+       val.u[1] = wrd2;
+#else
        val.u[1] = wrd1;
+       val.u[0] = wrd2;
+#endif
        return val.d;
 }
 #endif
index 76ab8c62650585aedec67d1e8f719dae47d555ee..838a38ad0ed43d452c86215ab12168c33761ea6b 100644 (file)
@@ -23,6 +23,8 @@ void flushprinter (void);
 int checkserwrite (int spaceneeded);
 void serialuartbreak (int);
 
+void hsyncstuff(void);
+
 void shmem_serial_delete(void);
 bool shmem_serial_create(void);
 int shmem_serial_state(void);
@@ -42,8 +44,8 @@ extern int load_ghostscript (void);
 #define MAX_MIDI_PORTS 100
 struct midiportinfo
 {
-    TCHAR *name;
-       UINT devid;
+       TCHAR *name;
+       unsigned int devid;
 };
 extern struct midiportinfo *midiinportinfo[MAX_MIDI_PORTS];
 extern struct midiportinfo *midioutportinfo[MAX_MIDI_PORTS];
index d00978fe4312a584ef624451529ec7d753c01b2a..cfd3b4cac92ca8de62da85469d2309fdb44b28ed 100644 (file)
@@ -1,5 +1,4 @@
 
-
 typedef struct UAEREG {
     HKEY fkey;
     TCHAR *inipath;
index 9ae8d54633a7eb463926dae72cb17cb920115cb8..3e4f7927ed13d99995f16ccbcdcd06230cfe5cb3 100644 (file)
@@ -312,7 +312,7 @@ int screenshot_prepare (void)
 void Screenshot_RGBinfo (int rb, int gb, int bb, int rs, int gs, int bs)
 {
        if (!bi)
-               bi = xcalloc (BITMAPINFO, sizeof BITMAPINFO + 256 * sizeof RGBQUAD);
+               bi = xcalloc (BITMAPINFO, sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD));
        rgb_rb = rb;
        rgb_gb = gb;
        rgb_bb = rb;
@@ -389,16 +389,16 @@ static int savebmp (FILE *fp)
        BITMAPFILEHEADER bfh;
        // write the file header, bitmap information and pixel data
        bfh.bfType = 19778;
-       bfh.bfSize = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + (bi->bmiHeader.biClrUsed * sizeof RGBQUAD) + bi->bmiHeader.biSizeImage;
+       bfh.bfSize = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + (bi->bmiHeader.biClrUsed * sizeof(RGBQUAD)) + bi->bmiHeader.biSizeImage;
        bfh.bfReserved1 = 0;
        bfh.bfReserved2 = 0;
-       bfh.bfOffBits = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + bi->bmiHeader.biClrUsed * sizeof RGBQUAD;
+       bfh.bfOffBits = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + bi->bmiHeader.biClrUsed * sizeof(RGBQUAD);
        if (fwrite (&bfh, 1, sizeof (BITMAPFILEHEADER), fp) < sizeof (BITMAPFILEHEADER))
                return 0; // failed to write bitmap file header
        if (fwrite (bi, 1, sizeof (BITMAPINFOHEADER), fp) < sizeof (BITMAPINFOHEADER))
                return 0; // failed to write bitmap infomation header
        if (bi->bmiHeader.biClrUsed) {
-               if (fwrite (bi->bmiColors, 1, bi->bmiHeader.biClrUsed * sizeof RGBQUAD, fp) < bi->bmiHeader.biClrUsed * sizeof RGBQUAD)
+               if (fwrite (bi->bmiColors, 1, bi->bmiHeader.biClrUsed * sizeof(RGBQUAD), fp) < bi->bmiHeader.biClrUsed * sizeof(RGBQUAD))
                        return 0; // failed to write bitmap file header
        }
        if (fwrite (lpvBits, 1, bi->bmiHeader.biSizeImage, fp) < bi->bmiHeader.biSizeImage)
index 9a75c2a87acb866be96ebcdd22343fcf0c98921b..d9ca02ab2a6a8c636fd301341c6e2b12a835af3d 100644 (file)
@@ -175,7 +175,6 @@ float scaled_sample_evtime_orig;
 extern float sampler_evtime;
 
 void update_sound (double clk)
-
 {
        if (!have_sound)
                return;
index e0f508de86018607b10dfb1c1842c5e296d0f2fa..f62ae1f5521652b3429d07640ed5fb99dfdc55a6 100644 (file)
@@ -155,4 +155,4 @@ extern int sounddrivermask;
 #define SOUNDDRIVER_WASAPI 2
 #define SOUNDDRIVER_OPENAL 4
 #define SOUNDDRIVER_PORTAUDIO 8
-#define SOUNDDRIVE_XAUDIO2 16
\ No newline at end of file
+#define SOUNDDRIVE_XAUDIO2 16
index 114289711093f2cfd2e7d99449f07ee2d0966d7a..06a262473d79a662fea4e8cc929b428d7c3c2090 100644 (file)
@@ -1,4 +1,3 @@
-
 typedef HANDLE uae_sem_t;
 typedef HANDLE uae_thread_id;
 
index d6d43c85518b31a5395e8ab22a2c4c5914108e1b..a47479670d5dd2a19058b844097787a354d87b39 100644 (file)
@@ -138,4 +138,4 @@ static void NOINLINE BLT_NAME (unsigned int w, unsigned int h, uae_u8 *src, uae_
 #undef BLT_FUNC
 #ifdef BLT_TEMP
 #undef BLT_TEMP
-#endif
\ No newline at end of file
+#endif
index faeb4050a59dac8377b1ff04db0b798c3e589bb6..bd32073d3040c21167e0eca1b81fbf1febfaa84f 100644 (file)
@@ -58,7 +58,7 @@ static PPCD_CB *o;
 #define Rc          LK
 
 // GPRs. sp, sd1 and sd2 are named corresponding to PPC EABI.
-static char *regname[] = {
+static const char *regname[] = {
 #ifdef UPPERCASE
  "R0" , "R1" , "R2", "R3" , "R4" , "R5" , "R6" , "R7" , 
  "R8" , "R9" , "R10", "R11", "R12", "R13", "R14", "R15", 
@@ -104,7 +104,7 @@ static char * simm(int val, int hex, int s)
 }
 
 // Simple instruction form + reserved bitmask.
-static void put(char * mnem, u32 mask, u32 chkval=0, int iclass=PPC_DISA_OTHER)
+static void put(const char * mnem, u32 mask, u32 chkval=0, int iclass=PPC_DISA_OTHER)
 {
     if( (Instr & mask) != chkval ) { ill(); return; }
     o->iclass |= iclass;
@@ -112,7 +112,7 @@ static void put(char * mnem, u32 mask, u32 chkval=0, int iclass=PPC_DISA_OTHER)
 }
 
 // Simplified mnemonic trap conditions
-static char * t_cond[32] = {
+static const char * t_cond[32] = {
  NULL, "lgt", "llt", NULL, "eq", "lge", "lle", NULL,
  "gt", NULL, NULL, NULL, "ge", NULL, NULL, NULL,
  "lt", NULL, NULL, NULL, "le", NULL, NULL, NULL,
@@ -182,7 +182,7 @@ static void trap(int L, int imm)
 // dab LSB bits : [D][A][B] (D should always present)
 // 'hex' for logic opcodes, 's' for alu opcodes, 'crfD' and 'L' for cmp opcodes
 // 'imm': 1 to show immediate operand
-static void integer(char *mnem, char form, int dab, int hex=0, int s=1, int crfD=0, int L=0, int imm=1)
+static void integer(const char *mnem, char form, int dab, int hex=0, int s=1, int crfD=0, int L=0, int imm=1)
 {
     char * ptr = o->operands;
     int rd = DIS_RD, ra = DIS_RA, rb = DIS_RB;
@@ -264,7 +264,7 @@ static void integer(char *mnem, char form, int dab, int hex=0, int s=1, int crfD
 }
 
 // Compare instructions (wraps to integer call)
-static void cmp(char *l, char *i)
+static void cmp(const char *l, const char *i)
 {
     char mnem[sizeof(o->mnemonic)];
     int rd = DIS_RD;
@@ -289,7 +289,7 @@ static void cmp(char *l, char *i)
 }
 
 // Add immediate (wraps to integer call)
-static void addi(char *suffix)
+static void addi(const char *suffix)
 {
     char mnem[sizeof(o->mnemonic)];
 
@@ -329,15 +329,15 @@ static void addi(char *suffix)
 }
 
 // Branch suffix: AA || LK.
-static char *b_opt[4] = { "", "l", "a", "la" };
+static const char *b_opt[4] = { "", "l", "a", "la" };
 
 // Branch condition code: 4 * BO[1] + (BI & 3)
-static char * b_cond[8] = {
+static const char * b_cond[8] = {
  "ge", "le", "ne", "ns", "lt", "gt", "eq", "so"
 };
 
 // Branch on CTR code: BO[0..3]
-static char * b_ctr[16] = {
+static const char * b_ctr[16] = {
  "dnzf", "dzf", NULL, NULL, "dnzt", "dzt", NULL, NULL,
  "dnz", "dz", NULL, NULL, NULL, NULL, NULL, NULL
 };
@@ -381,7 +381,7 @@ static void bcx(int Disp, int L)
     if(Disp)
     {
         bd = DIS_UIMM & ~3;
-        if(bd & 0x8000) bd |= 0xffffffffffff0000;
+        if(bd & 0x8000) bd |= 0xffffffffffff0000LL;
         o->target = (AA ? 0 : DIS_PC) + bd;
     }
     else o->target = 0;
@@ -405,7 +405,7 @@ static void bcx(int Disp, int L)
         {
             if(bo & 2) { ill(); return; }                               // BO[3]
 #ifdef  SIMPLIFIED
-            char *cond = b_cond[((bo & 8) >> 1) | (bi & 3)];
+            const char *cond = b_cond[((bo & 8) >> 1) | (bi & 3)];
             if(cond != NULL)                                            // BO[1]
             {
                 sprintf(o->mnemonic, "b%s%s%s%c", cond, r, b_opt[Disp ? AALK : LK], y);
@@ -444,9 +444,9 @@ static void bx(void)
 {
     // Calculate displacement and target address
     u64 bd = Instr & 0x03fffffc;
-    if(bd & 0x02000000) bd |= 0xfffffffffc000000;
+    if(bd & 0x02000000) bd |= 0xfffffffffc000000LL;
     o->target = (AA ? 0 : DIS_PC) + bd;
+
     o->iclass |= PPC_DISA_BRANCH;
     sprintf(o->mnemonic, "b%s", b_opt[AALK]);
     place_target(o->operands, 0);
@@ -461,7 +461,7 @@ static void mcrf(void)
 }
 
 // CR logic operations
-static void crop(char *name, char *simp="", int ddd=0, int daa=0)
+static void crop(const char *name, const char *simp="", int ddd=0, int daa=0)
 {
     if(Instr & 1) { ill(); return; }
 
@@ -506,7 +506,7 @@ static void crop(char *name, char *simp="", int ddd=0, int daa=0)
 }
 
 // Rotate left word.
-static void rlw(char *name, int rb, int ins=0)
+static void rlw(const char *name, int rb, int ins=0)
 {
     int mb = DIS_MB, me = DIS_ME;
     char * ptr = o->operands;
@@ -564,7 +564,7 @@ static void rld(char *name, int rb, int mtype)
 }
 
 // Load/Store.
-static void ldst(char *name, int x/*indexed*/, int load=1, int L=0, int string=0, int fload=0)
+static void ldst(const char *name, int x/*indexed*/, int load=1, int L=0, int string=0, int fload=0)
 {
     if(x) integer(name, fload ? 'F' : 'X', DAB_D|DAB_A|DAB_B);
     else
@@ -586,7 +586,7 @@ static void ldst(char *name, int x/*indexed*/, int load=1, int L=0, int string=0
 }
 
 // Cache.
-static void cache(char *name, int flag=PPC_DISA_OTHER)
+static void cache(const char *name, int flag=PPC_DISA_OTHER)
 {
     if (DIS_RD) { ill(); return; }
     else
@@ -600,7 +600,7 @@ static void cache(char *name, int flag=PPC_DISA_OTHER)
     }
 }
 
-static void movesr(char *name, int from, int L, int xform)
+static void movesr(const char *name, int from, int L, int xform)
 {
     int reg = DIS_RD, sreg = DIS_RA & 0xF, regb = DIS_RB;
 
@@ -660,7 +660,7 @@ static void mcrxr(void)
     o->r[0] = DIS_RD >> 2;
 }
 
-static char *spr_name(int n)
+static const char *spr_name(int n)
 {
     static char def[8];
 
@@ -758,7 +758,7 @@ static char *spr_name(int n)
     return def;
 }
 
-static char *tbr_name(int n)
+static const char *tbr_name(int n)
 {
     static char def[8];
 
@@ -776,7 +776,7 @@ static char *tbr_name(int n)
 static void movespr(int from)
 {
     int spr = (DIS_RB << 5) | DIS_RA, f = 1;
-    char *fix;
+    const char *fix;
 
     if( !((spr == 1) || (spr == 8) || (spr == 9)) ) o->iclass |= PPC_DISA_OEA;
 
@@ -813,7 +813,7 @@ static void movespr(int from)
 static void movetbr(void)
 {
     int tbr = (DIS_RB << 5) | DIS_RA, f = 1;
-    char *fix;
+    const char *fix;
 
     // Handle simplified mnemonic
     if (tbr == 268) { fix = "tbl"; o->iclass |= PPC_DISA_SIMPLIFIED; }
@@ -857,7 +857,7 @@ static void sradi(void)
     o->iclass = PPC_DISA_INTEGER | PPC_DISA_64;
 }
 
-static void lsswi(char *name)
+static void lsswi(const char *name)
 {
     int rd = DIS_RD, ra = DIS_RA, nb = DIS_RB;
     strcpy (o->mnemonic, name);
@@ -874,7 +874,7 @@ static void lsswi(char *name)
 #define FPU_DACB    4
 #define FPU_D       5
 
-static void fpu(char *name, u32 mask, int type, int flag=PPC_DISA_OTHER)
+static void fpu(const char *name, u32 mask, int type, int flag=PPC_DISA_OTHER)
 {
     int d = DIS_RD, a = DIS_RA, c = DIS_RC, b = DIS_RB;
 
@@ -909,7 +909,7 @@ static void fpu(char *name, u32 mask, int type, int flag=PPC_DISA_OTHER)
     o->iclass = PPC_DISA_FPU | flag;
 }
 
-static void fcmp(char *name)
+static void fcmp(const char *name)
 {
     int crfd = DIS_RD >> 2, ra = DIS_RA, rb = DIS_RB;
 
@@ -933,7 +933,7 @@ static void mtfsf(void)
     o->iclass = PPC_DISA_FPU;
 }
 
-static void mtfsb(char *name)
+static void mtfsb(const char *name)
 {
     int crbd = DIS_RD;
 
@@ -1766,6 +1766,6 @@ char *PPCDisasmSimple(u64 pc, u32 instr)
     dis_out.instr = instr;
 
     PPCDisasm(&dis_out);
-    sprintf(output, "%08X  %08X  %-10s %s", pc, instr, dis_out.mnemonic, dis_out.operands);
+    sprintf(output, "%08llX  %08X  %-10s %s", pc, instr, dis_out.mnemonic, dis_out.operands);
     return output;
 }
index 2ebf7945156b419aac76fb26b75d931304265f1d..4c10f60156423da3ea44f7165785213421a8e96c 100644 (file)
@@ -6,10 +6,10 @@
 
 typedef signed   char       s8;
 typedef signed   short      s16;
-typedef signed   long       s32;
+typedef signed   int        s32;
 typedef unsigned char       u8;
 typedef unsigned short      u16;
-typedef unsigned long       u32;
+typedef unsigned int        u32;
 typedef float               f32;
 typedef double              f64;
 
index d2441f99bde22f17f4ed85e20ceb615cbddb8b3b..9fc9575ce63178b40380291b1e2ff8ab1cfc7642 100644 (file)
@@ -72,9 +72,13 @@ inline int c99_snprintf(char* str, size_t size, const char* format, ...)
 #define ABS(x) abs(x)
 #endif
 
+#ifdef USE_GLIB
+#include <glib.h>
+#else
 #define g_free free
 #define g_malloc malloc
 #define g_new(type, num) ((type*)calloc(sizeof(type),num))
+#endif
 
 enum device_endian {
     DEVICE_NATIVE_ENDIAN,
index 273fbac42b1a01c2122f5aee061bc3ed6976389e..fe511ebe90da000ab9217316f2f11aea12ae9075 100644 (file)
@@ -297,4 +297,4 @@ void sampler_vsync (void)
                sampler_free ();
                return;
        }
-}
\ No newline at end of file
+}
index 63b98593625d56412657cf2c43c27fd95df4abfb..390a25b0bf4e1aabf9ead5570ab4404e3de5896c 100644 (file)
@@ -257,7 +257,6 @@ TCHAR *restore_path_func (uae_u8 **dstp, int type)
 {
        TCHAR *newpath;
        TCHAR *s;
-       TCHAR *out = NULL;
        TCHAR tmp[MAX_DPATH], tmp2[MAX_DPATH];
 
        s = restore_string_func (dstp);
@@ -302,13 +301,13 @@ TCHAR *restore_path_func (uae_u8 **dstp, int type)
 
 /* read and write IFF-style hunks */
 
-static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, TCHAR *name, int compress)
+static void save_chunk (struct zfile *f, uae_u8 *chunk, unsigned int len, const TCHAR *name, int compress)
 {
        uae_u8 tmp[8], *dst;
        uae_u8 zero[4]= { 0, 0, 0, 0 };
        uae_u32 flags;
-       size_t pos;
-       size_t chunklen, len2;
+       unsigned int pos;
+       unsigned int chunklen, len2;
        char *s;
 
        if (!chunk)
@@ -365,10 +364,10 @@ static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, TCHAR *name,
        if (len2)
                zfile_fwrite (zero, 1, len2, f);
 
-       write_log (_T("Chunk '%s' chunk size %d (%d)\n"), name, chunklen, len);
+       write_log (_T("Chunk '%s' chunk size %u (%u)\n"), name, chunklen, len);
 }
 
-static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, size_t *len, size_t *totallen, size_t *filepos)
+static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, unsigned int *len, unsigned int *totallen, size_t *filepos)
 {
        uae_u8 tmp[6], dummy[4], *mem, *src;
        uae_u32 flags;
@@ -497,7 +496,7 @@ void restore_state (const TCHAR *filename)
        struct zfile *f;
        uae_u8 *chunk,*end;
        TCHAR name[5];
-       size_t len, totallen;
+       unsigned int len, totallen;
        size_t filepos, filesize;
        int z3num;
 
@@ -526,7 +525,7 @@ void restore_state (const TCHAR *filename)
        for (;;) {
                name[0] = 0;
                chunk = end = restore_chunk (f, name, &len, &totallen, &filepos);
-               write_log (_T("Chunk '%s' size %d (%d)\n"), name, len, totallen);
+               write_log (_T("Chunk '%s' size %u (%u)\n"), name, len, totallen);
                if (!_tcscmp (name, _T("END "))) {
 #ifdef _DEBUG
                        if (filesize > filepos + 8)
@@ -721,7 +720,7 @@ void restore_state (const TCHAR *filename)
                        write_log (_T("Chunk '%s', size %d bytes was not accepted!\n"),
                        name, len);
                else if (totallen != end - chunk)
-                       write_log (_T("Chunk '%s' total size %d bytes but read %d bytes!\n"),
+                       write_log (_T("Chunk '%s' total size %d bytes but read %ld bytes!\n"),
                        name, totallen, end - chunk);
                xfree (chunk);
        }
@@ -1198,7 +1197,7 @@ int savestate_dorewind (int pos)
                pos = replaycounter - 1;
        if (canrewind (pos)) {
                savestate_state = STATE_DOREWIND;
-               write_log (_T("dorewind %d (%010d/%03d) -> %d\n"), replaycounter - 1, hsync_counter, vsync_counter, pos);
+               write_log (_T("dorewind %d (%010ld/%03ld) -> %d\n"), replaycounter - 1, hsync_counter, vsync_counter, pos);
                return 1;
        }
        return 0;
@@ -1342,7 +1341,7 @@ void savestate_rewind (void)
                return;
        }
        inprec_setposition (st->inprecoffset, pos);
-       write_log (_T("state %d restored.  (%010d/%03d)\n"), pos, hsync_counter, vsync_counter);
+       write_log (_T("state %d restored.  (%010ld/%03ld)\n"), pos, hsync_counter, vsync_counter);
        if (rewind) {
                replaycounter--;
                if (replaycounter < 0)
@@ -1729,7 +1728,7 @@ retry2:
                        staterecords_first -= staterecords_max;
        }
 
-       write_log (_T("state capture %d (%010d/%03d,%d/%d) (%d bytes, alloc %d)\n"),
+       write_log (_T("state capture %d (%010ld/%03ld,%ld/%d) (%ld bytes, alloc %d)\n"),
                replaycounter, hsync_counter, vsync_counter,
                hsync_counter % current_maxvpos (), current_maxvpos (),
                st->end - st->data, statefile_alloc);
diff --git a/scp.cpp b/scp.cpp
index 6707568ef27a2511ec44e8537ad5a92a7f378b82..0d7a6a5ef02892312de4fcdb07168479e4f6c41a 100644 (file)
--- a/scp.cpp
+++ b/scp.cpp
 #include "zfile.h"
 #include "gui.h"
 #include "uae.h"
+#include "uae/endian.h"
 
 #include <stdint.h>
 
-#ifndef _MSC_VER
-#include <endian.h>
-#else
-static uint16_t be16toh(uint16_t v)
-{
-       return (v << 8) | (v >> 8);
-}
-static uint32_t le32toh(uint32_t v)
-{
-       return v;
-}
-#endif
-
 #define MAX_REVS 5
 
 enum pll_mode {
index e1ec1cfdc330669d499ff2500f570f04b078cbfe..c11d876ba5cd0f2d959ca89d30e7deee5a16ec32 100644 (file)
--- a/scsi.cpp
+++ b/scsi.cpp
@@ -2989,13 +2989,13 @@ static void REGPARAM2 ncr80_bput(struct soft_scsi *ncr, uaecptr addr, uae_u32 b)
        ncr80_bput2(ncr, addr, b, 1);
 }
 
-
 static void REGPARAM2 soft_generic_bput (uaecptr addr, uae_u32 b)
 {
        struct soft_scsi *ncr = getscsiboard(addr);
        if (ncr)
                ncr80_bput(ncr, addr, b);
 }
+
 static void REGPARAM2 soft_generic_wput (uaecptr addr, uae_u32 b)
 {
        struct soft_scsi *ncr = getscsiboard(addr);
@@ -3078,7 +3078,7 @@ uae_u32 soft_scsi_get(uaecptr addr, int size)
 /*
        $8380 select unit (unit mask)
 
-       $8200 
+       $8200
         6: REQ (1=active)
         8: BSY (0=active)
        10: C/D (1=data)
@@ -3093,7 +3093,7 @@ uae_u32 soft_scsi_get(uaecptr addr, int size)
 addrbank *supra_init(struct romconfig *rc)
 {
        struct soft_scsi *scsi = getscsi(rc);
-       
+
        if (!scsi)
                return &expamem_null;
 
index 7eb4a3db25bc8887c7873009eeeddf91ee006dc0..f21da2b89dfae5f7c59d2da23dd361d8ddf73c22 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "options.h"
 #include "filesys.h"
+#include "scsi.h"
 #include "blkdev.h"
 #include "zfile.h"
 #include "memory.h"
index 91afc8e3d8ba480c957978586892d2005d0f0939..a418c6ed6e8b6ff77eaabc39a39f4d6421428bf7 100644 (file)
@@ -1294,10 +1294,10 @@ static void sndboard_free_capture(void)
        if (capture_started)
                pAudioClient->Stop();
        capture_started = false;
-    SAFE_RELEASE(pEnumerator)
-    SAFE_RELEASE(pDevice)
-    SAFE_RELEASE(pAudioClient)
-    SAFE_RELEASE(pCaptureClient)
+       SAFE_RELEASE(pEnumerator)
+       SAFE_RELEASE(pDevice)
+       SAFE_RELEASE(pAudioClient)
+       SAFE_RELEASE(pCaptureClient)
 }
 
 static bool sndboard_init_capture(int freq)
@@ -1318,7 +1318,7 @@ static bool sndboard_init_capture(int freq)
        hr = pEnumerator->GetDefaultAudioEndpoint(eCapture, eConsole, &pDevice);
        EXIT_ON_ERROR(hr)
 
-    hr = pDevice->Activate(IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pAudioClient);
+       hr = pDevice->Activate(IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pAudioClient);
        EXIT_ON_ERROR(hr)
 
        memset (&wavfmtsrc, 0, sizeof wavfmtsrc);
@@ -1363,7 +1363,7 @@ static bool sndboard_init_capture(int freq)
 
 
        hr = pAudioClient->GetService(IID_IAudioCaptureClient, (void**)&pCaptureClient);
-    EXIT_ON_ERROR(hr)
+       EXIT_ON_ERROR(hr)
                
        hr = pAudioClient->Start();
        EXIT_ON_ERROR(hr)
@@ -1381,8 +1381,4 @@ Exit:;
        return false;
 }
 
-
 #endif
-
-
-
index 7f1a91de0aebe187ec57d5fb8faaf72505711370..93910ba082840d968d2a1d03f3cca5f04d8ab647 100755 (executable)
@@ -1568,7 +1568,8 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
        yend = isntsc ? MAXVPOS_NTSC : MAXVPOS_PAL;
 
        uae_u8 r, g, b;
-       uae_u8 or, og, ob;
+       /* or is an alternative operator and cannot be used as an identifier */
+       uae_u8 or_, og, ob;
        int pcnt = 0;
        int bank = 0;
        int mode_active = 0;
@@ -1640,7 +1641,7 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
                                if (mode_active) {
                                        if (cookie_line || x < cookiestartx) {
                                                r = g = b = 0;
-                                               or = og = ob = 0;
+                                               or_ = og = ob = 0;
                                        } else {
                                                if (mode_active == ham_e_magic_cookie_reg) {
                                                        uae_u8 *pal = &graffiti_palette[val * 4];
@@ -1670,7 +1671,7 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
                                        if (hameplus) {
                                                uae_u8 ar, ag, ab;
 
-                                               ar = (r + or) / 2;
+                                               ar = (r + or_) / 2;
                                                ag = (g + og) / 2;
                                                ab = (b + ob) / 2;
 
@@ -1693,7 +1694,7 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
                                                                PRGB(dst, d2, r, g, b);
                                                        }
                                                }
-                                               or = r;
+                                               or_ = r;
                                                og = g;
                                                ob = b;
                                        } else {
@@ -2245,6 +2246,8 @@ static void load_genlock_image(void)
        png_uint_32 width, height;
        int depth, color_type;
        struct png_cb cb;
+       png_bytepp row_pp;
+       png_size_t cols;
 
        xfree(genlock_image);
        genlock_image = NULL;
@@ -2290,13 +2293,13 @@ static void load_genlock_image(void)
        if (!(color_type & PNG_COLOR_MASK_ALPHA))
                png_set_add_alpha(png_ptr, 0, PNG_FILLER_AFTER);
 
-       png_size_t cols = png_get_rowbytes(png_ptr, info_ptr);
+       cols = png_get_rowbytes(png_ptr, info_ptr);
 
        genlock_image_pitch = width * 4;
        genlock_image_width = width;
        genlock_image_height = height;
 
-       png_bytepp row_pp = new png_bytep[height];
+       row_pp = new png_bytep[height];
        
        genlock_image = xcalloc(uae_u8, width * height * 4);
        
index 4747de6286c55d1e1a683bf5ac0e6616e5805995..9cdd3f5b78b4acaecc4a1015c5e75131d0f84341 100644 (file)
@@ -360,8 +360,6 @@ static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3)
        return 0;
 }
 
-extern uae_u32 picasso_demux (uae_u32 arg, TrapContext *context);
-
 static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
 {
 #define ARG0 (get_long (m68k_areg (regs, 7) + 4))
index 91e3598197a10188ea123b15c3fe6033540a1aee..4258fbd306530581b60c8665b6997ed6519c6679 100644 (file)
@@ -29,5 +29,5 @@ void write_log_standard (const char *fmt, ...)
        fprintf (stderr, fmt, x1, x2, x3, x4, x5, x6, x7, x8);
     }
 #endif
+    va_end (ap);
 }
-
diff --git a/x86.cpp b/x86.cpp
index 320f7158f6df3b2962926ff8b9563ef1aca15593..69aef5b078266e1c71744d62c2dc4b59a1121a47 100644 (file)
--- a/x86.cpp
+++ b/x86.cpp
@@ -3434,7 +3434,7 @@ void DOSBOX_RunMachine(void)
 {
 }
 
-void GFX_SetTitle(long a, long b, bool c)
+void GFX_SetTitle(Bit32s cycles, Bits frameskip, bool paused)
 {
 }