From 541019db475b0327fac67cb6d562de17e2ad92f3 Mon Sep 17 00:00:00 2001 From: James Sanford Date: Sun, 12 Aug 2012 16:31:24 -0700 Subject: [PATCH] Fix lines with trailing spaces. --- jni/config_generic.c | 4 ++-- jni/config_kegs.c | 10 +++++----- jni/engine_c.c | 2 +- jni/iwm.c | 12 ++++++------ jni/joystick_win.c | 2 +- jni/macdriver_generic.c | 6 +++--- jni/macdriver_kegs.c | 6 +++--- jni/moremem.c | 10 +++++----- jni/prodos.h | 2 +- jni/prodos_protos.h | 2 +- jni/sim65816.c | 10 +++++----- jni/sound.c | 4 ++-- jni/to_pro.c | 2 +- jni/video.c | 2 +- jni/win_generic.c | 8 ++++---- jni/winresource.h | 2 +- 16 files changed, 42 insertions(+), 42 deletions(-) diff --git a/jni/config_generic.c b/jni/config_generic.c index 0a2d93b..a556b7a 100644 --- a/jni/config_generic.c +++ b/jni/config_generic.c @@ -313,7 +313,7 @@ insert_disk(int slot, int drive, const char *name, int ejected, int force_size, can_write = 1; //OG discard .GZ support -#ifndef ACTIVEGS +#ifndef ACTIVEGS if((name_len > 3) && (strcmp(&name_ptr[name_len - 3], ".gz") == 0)) { /* it's gzip'ed, try to gunzip it, then unlink the */ @@ -652,7 +652,7 @@ eject_disk(Disk *dsk) /* Leave name_ptr valid */ // OG WHY? - // OG Free memory allocated for the disk name + // OG Free memory allocated for the disk name if (dsk->name_ptr) { free(dsk->name_ptr); diff --git a/jni/config_kegs.c b/jni/config_kegs.c index 103211b..b0c80f1 100644 --- a/jni/config_kegs.c +++ b/jni/config_kegs.c @@ -225,7 +225,7 @@ Cfg_menu g_cfg_main_menu[] = { KNMP(g_user_page2_shadow), CFGTYPE_INT }, { "Dump text screen to file", (void *)cfg_text_screen_dump, 0, 0, CFGTYPE_FUNC}, { "", 0, 0, 0, 0 }, -{ "Save changes to config.kegs", (void *)config_write_config_kegs_file, 0, 0, +{ "Save changes to config.kegs", (void *)config_write_config_kegs_file, 0, 0, CFGTYPE_FUNC }, { "", 0, 0, 0, 0 }, { "Exit Config (or press F4)", (void *)cfg_exit, 0, 0, CFGTYPE_FUNC }, @@ -1736,7 +1736,7 @@ cfg_dirent_sortfn(const void *obj1, const void *obj2) #if defined(MAC) || defined(_WIN32) // OG ret = 0; -// ret = strcasecmp(direntptr1->name, direntptr2->name); +// ret = strcasecmp(direntptr1->name, direntptr2->name); #else ret = strcmp(direntptr1->name, direntptr2->name); #endif @@ -1817,7 +1817,7 @@ cfg_file_readdir(const char *pathptr) if(ret == 0) { fmt = stat_buf.st_mode & S_IFMT; if(fmt == S_IFDIR) { - // it's a directory + // it's a directory is_dir = 1; } } @@ -1865,12 +1865,12 @@ cfg_file_readdir(const char *pathptr) printf("stat %s ret %d, errno:%d\n", &g_cfg_tmp_path[0], ret, errno); stat_buf.st_size = 0; - continue; // skip it + continue; // skip it } else { fmt = stat_buf.st_mode & S_IFMT; size = stat_buf.st_size; if(fmt == S_IFDIR) { - // it's a directory + // it's a directory is_dir = 1; } else if((fmt == S_IFREG) && (is_gz == 0)) { if(g_cfg_slotdrive < 0xfff) { diff --git a/jni/engine_c.c b/jni/engine_c.c index 1dfeeb3..091040c 100644 --- a/jni/engine_c.c +++ b/jni/engine_c.c @@ -756,7 +756,7 @@ fixed_memory_ptrs_init() #endif } -// OG added fixed_memory_ptrs_shut +// OG added fixed_memory_ptrs_shut void fixed_memory_ptrs_shut() { diff --git a/jni/iwm.c b/jni/iwm.c index 7cd827a..ef336e8 100644 --- a/jni/iwm.c +++ b/jni/iwm.c @@ -226,7 +226,7 @@ draw_iwm_status(int line, char *buf) flag[apple35_sel][iwm.drive_select] = "*"; } - #ifdef ACTIVEGS // OG Pass monitoring info + #ifdef ACTIVEGS // OG Pass monitoring info { extern void ki_loading(int _motorOn,int _slot,int _drive, int _curtrack); int curtrack=0; @@ -1662,7 +1662,7 @@ disk_track_to_unix(Disk *dsk, int qtr_track, byte *outbuf) return -1; } - if(disk_525) + if(disk_525) { // OG // Add support for .nib file @@ -1674,7 +1674,7 @@ disk_track_to_unix(Disk *dsk, int qtr_track, byte *outbuf) int i; byte* trk_ptr = trk->nib_area+1; byte* nib_ptr = outbuf; - for(i = 0; i < len; i += 2) + for(i = 0; i < len; i += 2) { *nib_ptr++ = *trk_ptr; trk_ptr+=2; @@ -1695,9 +1695,9 @@ show_hex_data(byte *buf, int count) for(i = 0; i < count; i += 16) { printf("%04x: %02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x %02x %02x\n", i, - buf[i+0], buf[i+1], buf[i+2], buf[i+3], - buf[i+4], buf[i+5], buf[i+6], buf[i+7], - buf[i+8], buf[i+9], buf[i+10], buf[i+11], + buf[i+0], buf[i+1], buf[i+2], buf[i+3], + buf[i+4], buf[i+5], buf[i+6], buf[i+7], + buf[i+8], buf[i+9], buf[i+10], buf[i+11], buf[i+12], buf[i+13], buf[i+14], buf[i+15]); } diff --git a/jni/joystick_win.c b/jni/joystick_win.c index d084416..394aa22 100644 --- a/jni/joystick_win.c +++ b/jni/joystick_win.c @@ -22,7 +22,7 @@ extern int g_paddle_buttons; extern int g_paddle_val[]; /* -const char *g_joystick_dev = "/dev/js0"; // default joystick dev file +const char *g_joystick_dev = "/dev/js0"; // default joystick dev file #define MAX_JOY_NAME 128 int g_joystick_native_fd = -1; diff --git a/jni/macdriver_generic.c b/jni/macdriver_generic.c index f8d5087..dada541 100644 --- a/jni/macdriver_generic.c +++ b/jni/macdriver_generic.c @@ -140,7 +140,7 @@ mac_update_modifiers(word32 state) state = state & ( cmdKey | controlKey | - shiftKey | alphaLock | optionKey + shiftKey | alphaLock | optionKey ); state_xor = g_mac_shift_control_state ^ state; is_up = 0; @@ -216,7 +216,7 @@ x_get_kimage(Kimage *kimage_ptr) mdepth = kimage_ptr->mdepth; size = 0; - if(depth == g_screen_depth) + if(depth == g_screen_depth) { if (!macUsingCoreGraphics) @@ -498,4 +498,4 @@ void x_release_kimage(Kimage* kimage_ptr) int x_calc_ratio(float&x,float&y) { return 1; -} \ No newline at end of file +} diff --git a/jni/macdriver_kegs.c b/jni/macdriver_kegs.c index d377e67..bdd2eb1 100644 --- a/jni/macdriver_kegs.c +++ b/jni/macdriver_kegs.c @@ -244,8 +244,8 @@ my_win_handler(EventHandlerCallRef handlerRef, EventRef event, void *userdata) } if(event_kind == kEventWindowClose) { // OG Use HALT_WANTTOQUIT pardigme - //g_quit_sim_now = 1; - set_halt_act(HALT_WANTTOQUIT); + //g_quit_sim_now = 1; + set_halt_act(HALT_WANTTOQUIT); #ifndef ACTIVEGS g_quit_seen = 1; @@ -570,7 +570,7 @@ main g_event_rgnhandle = NewRgn(); g_status_font_family = FMGetFontFamilyFromName("\pCourier"); - SetRect(&win_rect, 0, 0, X_A2_WINDOW_WIDTH, X_A2_WINDOW_HEIGHT + SetRect(&win_rect, 0, 0, X_A2_WINDOW_WIDTH, X_A2_WINDOW_HEIGHT // OG Remove status line from ActiveGS window #ifndef ACTIVEGS + MAX_STATUS_LINES*16 + 8 diff --git a/jni/moremem.c b/jni/moremem.c index 8c98139..a8aed5b 100644 --- a/jni/moremem.c +++ b/jni/moremem.c @@ -133,10 +133,10 @@ Emustate_word32list g_emustate_word32list[] = { //#ifdef _WINDOWS -// OG Added Transwarp ROM +// OG Added Transwarp ROM #define TRANSWARP int transwarp_low_val = 0; -#ifdef _WIN32 +#ifdef _WIN32 __declspec(align(256)) #endif unsigned char transwarpcode[][32] @@ -146,8 +146,8 @@ __attribute__ ((aligned(256))) ={ { /*0xBCFF00*/ 'T','W','G','S',0,0,0,0,0,0,0,0,0,0,0,0, -/*0xBCFF10*/ 0x5C,0x40,0xFF,0xBC, // JMP GetMaxSpeed -/*0xBCFF14*/ 0x5C,0x60,0xFF,0xBC, // JMP GetNumISpeed +/*0xBCFF10*/ 0x5C,0x40,0xFF,0xBC, // JMP GetMaxSpeed +/*0xBCFF14*/ 0x5C,0x60,0xFF,0xBC, // JMP GetNumISpeed /*0xBCFF18*/ 0x6B,0x00,0x00,0x00, // ??? /*0xBCFF1C*/ 0x6B,0x00,0x00,0x00 // ??? }, @@ -159,7 +159,7 @@ __attribute__ ((aligned(256))) /*0xBCFF30*/ 0x6B,0x00,0x00,0x00, // ??? /*0xBCFF34*/ 0x6B,0x00,0x00,0x00, // ??? /*0xBCFF38*/ 0x6B,0x00,0x00,0x00, // ??? -/*0xBCFF3C*/ 0x6B,0x00,0x00,0x00 // GetTWConfig +/*0xBCFF3C*/ 0x6B,0x00,0x00,0x00 // GetTWConfig }, { /* 0xBCFF40*/ // GetMaxSpeed diff --git a/jni/prodos.h b/jni/prodos.h index 8ecca11..184d96a 100644 --- a/jni/prodos.h +++ b/jni/prodos.h @@ -5,7 +5,7 @@ /* This code may not be used in a commercial product */ /* without prior written permission of the author. */ /* */ -/* You may freely distribute this code. */ +/* You may freely distribute this code. */ /* */ /* You can contact the author at kentd@cup.hp.com. */ /* HP has nothing to do with this software. */ diff --git a/jni/prodos_protos.h b/jni/prodos_protos.h index bccdf8e..dfc8d85 100644 --- a/jni/prodos_protos.h +++ b/jni/prodos_protos.h @@ -5,7 +5,7 @@ /* This code may not be used in a commercial product */ /* without prior written permission of the author. */ /* */ -/* You may freely distribute this code. */ +/* You may freely distribute this code. */ /* */ /* You can contact the author at kentd@cup.hp.com. */ /* HP has nothing to do with this software. */ diff --git a/jni/sim65816.c b/jni/sim65816.c index 1367629..63f38d0 100644 --- a/jni/sim65816.c +++ b/jni/sim65816.c @@ -768,13 +768,13 @@ do_reset() initialize_events(); */ - if (g_irq_pending) + if (g_irq_pending) halt_printf("*** irq remainings...\n"); /* - g_irq_pending = 0; + g_irq_pending = 0; // reinitiliase zip speed (not sure)??? - // g_zipgs_reg_c05a = 0x80; + // g_zipgs_reg_c05a = 0x80; */ } @@ -841,7 +841,7 @@ memalloc_align(int size, int skip_amt, void **alloc_ptr) word32 offset; skip_amt = MAX(256, skip_amt); - bptr = (byte*)calloc(size + skip_amt + 256, 1); // OG Added cast + bptr = (byte*)calloc(size + skip_amt + 256, 1); // OG Added cast if(alloc_ptr) { /* Save allocation address */ *alloc_ptr = bptr; @@ -885,7 +885,7 @@ memory_ptr_init() void memory_ptr_shut() { - if(g_memory_alloc_ptr) + if(g_memory_alloc_ptr) { free(g_memory_alloc_ptr); g_memory_alloc_ptr = 0; diff --git a/jni/sound.c b/jni/sound.c index 9a28b81..ed8e0ba 100644 --- a/jni/sound.c +++ b/jni/sound.c @@ -1583,7 +1583,7 @@ doc_write_ctl_reg(int osc, int val, double dsamps) /* start sound */ DOC_LOG("ctl_sound_play", osc, eff_dsamps, val); - // OG If the sound_play is executed, it may restart a oscillo we thought was stopped at time, + // OG If the sound_play is executed, it may restart a oscillo we thought was stopped at time, // hence crashing the start_sound function (cf. game Arrgh!) //sound_play(eff_dsamps); g_doc_regs[osc].ctl = val; @@ -1938,7 +1938,7 @@ doc_write_c03d(int val, double dcycs) UPDATE_G_DCYCS_PER_DOC_UPDATE(tmp); // OG Update any oscs that were running to take care of the new numbers of oscillo - for(i = 0; i=MAX_EVENT) + if (nb_win32_key>=MAX_EVENT) return ; win32_keys[nb_win32_key].raw_vk = raw_vk; @@ -580,7 +580,7 @@ void x_release_kimage(Kimage *kimage_ptr) } } -// OG Free video global memory +// OG Free video global memory void xdriver_end() // Should be renamed to dev_video_shut() ??? { @@ -759,7 +759,7 @@ x_push_kimage(Kimage *kimage_ptr, int destx, int desty, int srcx, int srcy, HDC localcdc = g_main_cdc; //CreateCompatibleDC(g_main_dc); bitm_old = SelectObject(localcdc, kimage_ptr->dev_handle); - HRGN hrgn=NULL; + HRGN hrgn=NULL; float ratiox,ratioy; int isStretched = x_calc_ratio(ratiox,ratioy); diff --git a/jni/winresource.h b/jni/winresource.h index 27ef394..f22ad41 100644 --- a/jni/winresource.h +++ b/jni/winresource.h @@ -31,7 +31,7 @@ #define ID_FILE_FULLSCREEN 40012 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 111