Removed remained of warnings. Note, in CPU.cpp a couple of warning types had to be suppressed because its a specialized situation.
ghedger
4 years ago
Binary diff not shown
Binary diff not shown
115 | 115 | bool m_bRxIrqEnabled; |
116 | 116 | |
117 | 117 | bool m_bWrittenTx; |
118 | ||
118 | DWORD m_uLastBytesWritten; | |
119 | 119 | // |
120 | 120 | |
121 | 121 | volatile bool m_vbCommIRQ; |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
50 | 50 | typedef UINT8 (*mem_read_handler)(UINT32); |
51 | 51 | typedef void (*mem_write_handler)(UINT32, UINT8); |
52 | 52 | |
53 | static void logerror(char* psz, ...) | |
53 | static void logerror(const char* psz, ...) | |
54 | 54 | { |
55 | 55 | } |
56 | 56 | |
71 | 71 | |
72 | 72 | // See AY8910_set_clock() for definition of STEP |
73 | 73 | #define STEP 0x8000 |
74 | ||
75 | ||
76 | static int num = 0, ym_num = 0; | |
77 | 74 | |
78 | 75 | struct AY8910 |
79 | 76 | { |
89 | 89 | /* Adaptation for SDL and POSIX (l) by beom beotiger, Nov-Dec 2007 */ |
90 | 90 | |
91 | 91 | #include "stdafx.h" |
92 | #pragma hdrstop | |
93 | 92 | #include "MouseInterface.h" |
94 | 93 | #include "Debug.h" |
95 | 94 | #include <assert.h> |
199 | 198 | } |
200 | 199 | |
201 | 200 | // |
202 | ||
201 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" | |
202 | #pragma GCC diagnostic ignored "-Wsequence-point" | |
203 | 203 | #define CHECK_PAGE_CHANGE if (bSlowerOnPagecross) { \ |
204 | 204 | if ((base ^ addr) & 0xFF00) \ |
205 | 205 | uExtraCycles=1; \ |
882 | 882 | PUSH(regs.pc & 0xFF) |
883 | 883 | EF_TO_AF |
884 | 884 | PUSH(regs.ps & ~AF_BREAK) |
885 | regs.ps = regs.ps | AF_INTERRUPT & ~AF_DECIMAL; | |
885 | regs.ps = (regs.ps | AF_INTERRUPT) & (~AF_DECIMAL); | |
886 | 886 | regs.pc = * (WORD*) (mem+0xFFFE); |
887 | 887 | CYC(7) |
888 | 888 | } |
617 | 617 | if (!fptr->trackimagedata) |
618 | 618 | return 0xFF; |
619 | 619 | BYTE result = 0; |
620 | if ((!floppywritemode) || (!fptr->writeprotected)) | |
621 | if (floppywritemode) | |
620 | if ((!floppywritemode) || (!fptr->writeprotected)) { | |
621 | if (floppywritemode) { | |
622 | 622 | if (floppylatch & 0x80) { |
623 | 623 | *(fptr->trackimage+fptr->byte) = floppylatch; |
624 | 624 | fptr->trackimagedirty = 1; |
625 | } | |
626 | else | |
625 | } else { | |
627 | 626 | return 0; |
628 | else | |
627 | } | |
628 | } else { | |
629 | 629 | result = *(fptr->trackimage+fptr->byte); |
630 | } | |
631 | } | |
630 | 632 | if (0) |
631 | 633 | { |
632 | 634 | LOG_DISK("nib %4X = %2X\r", fptr->byte, result); |
731 | 733 | //=========================================================================== |
732 | 734 | void DiskSelect (int drive) |
733 | 735 | { |
734 | DiskSelectImage(drive, TEXT("")); // drive is 0 for D1, 1 - for D2 | |
736 | char szSelect[] = ""; | |
737 | DiskSelectImage(drive, szSelect); // drive is 0 for D1, 1 - for D2 | |
735 | 738 | } |
736 | 739 | |
737 | 740 |
121 | 121 | #ifndef _WIN32 |
122 | 122 | /* POSIX specific routines of reading directory structure */ |
123 | 123 | DIR *dp; |
124 | struct dirent *ep; | |
125 | 124 | |
126 | 125 | dp = opendir (incoming_dir); // open and read incoming directory |
127 | 126 | char *tmp; |
299 | 298 | |
300 | 299 | // Show all directories (first) and files then |
301 | 300 | // char *tmp; |
302 | char *siz; | |
301 | char *siz = NULL; | |
303 | 302 | // int i; |
304 | 303 | |
305 | 304 | // prepare screen |
139 | 139 | // Wait for keypress |
140 | 140 | ////////////////////////////////// |
141 | 141 | SDL_Event event; // event |
142 | Uint8 *keyboard; // key state | |
143 | 142 | |
144 | 143 | event.type = SDL_QUIT; |
145 | 144 | while(event.type != SDL_KEYDOWN) { // wait for key pressed |
167 | 166 | } |
168 | 167 | else B = 0; // for sorting dirs |
169 | 168 | |
170 | while (tmp = fgets(tmpstr,512,fdir)) // first looking for directories | |
169 | while ((tmp = fgets(tmpstr,512,fdir))) // first looking for directories | |
171 | 170 | { |
172 | 171 | // clear and then try to fill in FTP_PARSE struct |
173 | 172 | memset(&FTP_PARSE,0,sizeof(FTP_PARSE)); |
204 | 203 | |
205 | 204 | (void) rewind (fdir); // to the start |
206 | 205 | // now get all regular files |
207 | while (tmp = fgets(tmpstr,512,fdir)) | |
206 | while ((tmp = fgets(tmpstr,512,fdir))) | |
208 | 207 | { |
209 | 208 | int fsize; |
210 | 209 | // clear and then try to fill in FTP_PARSE struct |
211 | 210 | memset(&FTP_PARSE,0,sizeof(FTP_PARSE)); |
212 | 211 | ftpparse(&FTP_PARSE, tmp, strlen(tmp)); |
213 | ||
212 | ||
214 | 213 | if ((getstatFTP(&FTP_PARSE, &fsize) == 2)) // is normal file! |
215 | 214 | { |
216 | 215 | tmp = new char[strlen(FTP_PARSE.name)+1]; // add this entity to list |
222 | 221 | } /* if */ |
223 | 222 | } |
224 | 223 | (void) fclose (fdir); |
225 | // do sorting for files | |
224 | // do sorting for files | |
226 | 225 | if(files.Length() > 2 && B < files.Length()) |
227 | 226 | { |
228 | 227 | N = files.Length() - 1; |
229 | // B = 1; | |
228 | //B = 1; | |
230 | 229 | for(i = N; i > B; i--) |
231 | 230 | for(j = B; j < i; j++) |
232 | 231 | if(strcasecmp(files[j], files[j + 1]) > 0) |
243 | 242 | |
244 | 243 | // Show all directories (first) and files then |
245 | 244 | // char *tmp; |
246 | char *siz; | |
245 | char *siz = NULL; | |
247 | 246 | // int i; |
248 | 247 | |
249 | 248 | while(true) |
527 | 526 | memset (buffer, 0, 64); |
528 | 527 | buflen = 0; |
529 | 528 | } |
530 | ||
529 | ||
531 | 530 | *(UINT4 *) (buffer + 56) = cpu_to_le32 (8 * length); |
532 | 531 | *(UINT4 *) (buffer + 60) = 0; |
533 | 532 | md5_transform (buffer); |
538 | 537 | } |
539 | 538 | |
540 | 539 | static char * |
541 | md5 (const char *input) | |
540 | md5 (const char *input) | |
542 | 541 | { |
543 | 542 | md5_init(); |
544 | 543 | // memcpy ((char *) state, (char *) md5_initstate, sizeof (md5_initstate)); |
547 | 546 | return (char *)md5_final (); |
548 | 547 | } |
549 | 548 | |
549 | // GPH Warning: Not re-entrant! | |
550 | 550 | char * |
551 | md5str (const char *input) | |
552 | { | |
553 | char result[16 * 3 +1]; | |
551 | md5str (const char *input) | |
552 | { | |
553 | static char result[16 * 3 + 1]; | |
554 | 554 | unsigned char* digest = (unsigned char*)md5 (input); |
555 | 555 | int i; |
556 | 556 |
40 | 40 | |
41 | 41 | vsnprintf(output, sizeof(output) - 1, format, args); |
42 | 42 | // OutputDebugString(output); |
43 | fprintf(stderr, output); | |
43 | fprintf(stderr, "%s", output); | |
44 | 44 | } |
45 | 45 | |
46 | 46 | //--------------------------------------------------------------------------- |
477 | 477 | |
478 | 478 | BOOL bBtn0 = m_bButtons[0]; |
479 | 479 | BOOL bBtn1 = m_bButtons[1]; |
480 | if ( m_nX != m_iX || m_nY != m_iY ) | |
480 | if ( (UINT) m_nX != m_iX || (UINT) m_nY != m_iY ) | |
481 | 481 | byState |= 0x22; // X/Y moved since last READMOUSE | Movement interrupt |
482 | 482 | if ( m_bBtn0 != bBtn0 || m_bBtn1 != bBtn1 ) |
483 | 483 | byState |= 0x04; // Button 0/1 interrupt |
678 | 678 | // WriteFile(m_hCommHandle, &value, 1, &uBytesWritten, &m_o); |
679 | 679 | |
680 | 680 | m_bWrittenTx = true; // Transmit done |
681 | m_uLastBytesWritten = uBytesWritten; | |
681 | 682 | |
682 | 683 | // TO DO: |
683 | 684 | // 1) Use CommThread determine when transmit is complete |
392 | 392 | //CreateDIBSection(dc,framebufferinfo,DIB_RGB_COLORS, |
393 | 393 | // (LPVOID *)&framebufferbits,0,0); |
394 | 394 | framebufferbits = (LPBYTE)g_hDeviceBitmap->pixels; |
395 | int hcl = SDL_SetColors(g_hDeviceBitmap, g_pSourceHeader, 0, 256); | |
395 | SDL_SetColors(g_hDeviceBitmap, g_pSourceHeader, 0, 256); | |
396 | 396 | // printf("SetColors(g_hDeviceBitmap)=%d\n",hcl); |
397 | hcl = SDL_SetColors(g_origscreen, g_pSourceHeader, 0, 256); | |
397 | SDL_SetColors(g_origscreen, g_pSourceHeader, 0, 256); | |
398 | 398 | // printf("SetColors(g_origscreen)=%d\n",hcl); |
399 | 399 | |
400 | 400 | g_hStatusSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, STATUS_PANEL_W, STATUS_PANEL_H, SCREEN_BPP, 0, 0, 0, 0); |
426 | 426 | if(g_hSourceBitmap == NULL) fprintf(stderr,"g_hSourceBitmap was not created!\n"); |
427 | 427 | |
428 | 428 | g_pSourcePixels = (LPBYTE)g_hSourceBitmap->pixels; |
429 | hcl = SDL_SetColors(g_hSourceBitmap, framebufferinfo, 0, 256); | |
429 | SDL_SetColors(g_hSourceBitmap, framebufferinfo, 0, 256); | |
430 | 430 | // printf("SetColors(g_hSourceBitmap)=%d\n",hcl); |
431 | 431 | //CreateDIBSection( |
432 | 432 | //sourcedc,g_pSourceHeader,DIB_RGB_COLORS, |