git @ Cat's Eye Technologies linapple / adad5e4
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
22 changed file(s) with 34 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
Binary diff not shown
Binary diff not shown
115115 bool m_bRxIrqEnabled;
116116
117117 bool m_bWrittenTx;
118
118 DWORD m_uLastBytesWritten;
119119 //
120120
121121 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
5050 typedef UINT8 (*mem_read_handler)(UINT32);
5151 typedef void (*mem_write_handler)(UINT32, UINT8);
5252
53 static void logerror(char* psz, ...)
53 static void logerror(const char* psz, ...)
5454 {
5555 }
5656
7171
7272 // See AY8910_set_clock() for definition of STEP
7373 #define STEP 0x8000
74
75
76 static int num = 0, ym_num = 0;
7774
7875 struct AY8910
7976 {
8989 /* Adaptation for SDL and POSIX (l) by beom beotiger, Nov-Dec 2007 */
9090
9191 #include "stdafx.h"
92 #pragma hdrstop
9392 #include "MouseInterface.h"
9493 #include "Debug.h"
9594 #include <assert.h>
199198 }
200199
201200 //
202
201 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
202 #pragma GCC diagnostic ignored "-Wsequence-point"
203203 #define CHECK_PAGE_CHANGE if (bSlowerOnPagecross) { \
204204 if ((base ^ addr) & 0xFF00) \
205205 uExtraCycles=1; \
882882 PUSH(regs.pc & 0xFF)
883883 EF_TO_AF
884884 PUSH(regs.ps & ~AF_BREAK)
885 regs.ps = regs.ps | AF_INTERRUPT & ~AF_DECIMAL;
885 regs.ps = (regs.ps | AF_INTERRUPT) & (~AF_DECIMAL);
886886 regs.pc = * (WORD*) (mem+0xFFFE);
887887 CYC(7)
888888 }
617617 if (!fptr->trackimagedata)
618618 return 0xFF;
619619 BYTE result = 0;
620 if ((!floppywritemode) || (!fptr->writeprotected))
621 if (floppywritemode)
620 if ((!floppywritemode) || (!fptr->writeprotected)) {
621 if (floppywritemode) {
622622 if (floppylatch & 0x80) {
623623 *(fptr->trackimage+fptr->byte) = floppylatch;
624624 fptr->trackimagedirty = 1;
625 }
626 else
625 } else {
627626 return 0;
628 else
627 }
628 } else {
629629 result = *(fptr->trackimage+fptr->byte);
630 }
631 }
630632 if (0)
631633 {
632634 LOG_DISK("nib %4X = %2X\r", fptr->byte, result);
731733 //===========================================================================
732734 void DiskSelect (int drive)
733735 {
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
735738 }
736739
737740
121121 #ifndef _WIN32
122122 /* POSIX specific routines of reading directory structure */
123123 DIR *dp;
124 struct dirent *ep;
125124
126125 dp = opendir (incoming_dir); // open and read incoming directory
127126 char *tmp;
299298
300299 // Show all directories (first) and files then
301300 // char *tmp;
302 char *siz;
301 char *siz = NULL;
303302 // int i;
304303
305304 // prepare screen
139139 // Wait for keypress
140140 //////////////////////////////////
141141 SDL_Event event; // event
142 Uint8 *keyboard; // key state
143142
144143 event.type = SDL_QUIT;
145144 while(event.type != SDL_KEYDOWN) { // wait for key pressed
167166 }
168167 else B = 0; // for sorting dirs
169168
170 while (tmp = fgets(tmpstr,512,fdir)) // first looking for directories
169 while ((tmp = fgets(tmpstr,512,fdir))) // first looking for directories
171170 {
172171 // clear and then try to fill in FTP_PARSE struct
173172 memset(&FTP_PARSE,0,sizeof(FTP_PARSE));
204203
205204 (void) rewind (fdir); // to the start
206205 // now get all regular files
207 while (tmp = fgets(tmpstr,512,fdir))
206 while ((tmp = fgets(tmpstr,512,fdir)))
208207 {
209208 int fsize;
210209 // clear and then try to fill in FTP_PARSE struct
211210 memset(&FTP_PARSE,0,sizeof(FTP_PARSE));
212211 ftpparse(&FTP_PARSE, tmp, strlen(tmp));
213
212
214213 if ((getstatFTP(&FTP_PARSE, &fsize) == 2)) // is normal file!
215214 {
216215 tmp = new char[strlen(FTP_PARSE.name)+1]; // add this entity to list
222221 } /* if */
223222 }
224223 (void) fclose (fdir);
225 // do sorting for files
224 // do sorting for files
226225 if(files.Length() > 2 && B < files.Length())
227226 {
228227 N = files.Length() - 1;
229 // B = 1;
228 //B = 1;
230229 for(i = N; i > B; i--)
231230 for(j = B; j < i; j++)
232231 if(strcasecmp(files[j], files[j + 1]) > 0)
243242
244243 // Show all directories (first) and files then
245244 // char *tmp;
246 char *siz;
245 char *siz = NULL;
247246 // int i;
248247
249248 while(true)
527526 memset (buffer, 0, 64);
528527 buflen = 0;
529528 }
530
529
531530 *(UINT4 *) (buffer + 56) = cpu_to_le32 (8 * length);
532531 *(UINT4 *) (buffer + 60) = 0;
533532 md5_transform (buffer);
538537 }
539538
540539 static char *
541 md5 (const char *input)
540 md5 (const char *input)
542541 {
543542 md5_init();
544543 // memcpy ((char *) state, (char *) md5_initstate, sizeof (md5_initstate));
547546 return (char *)md5_final ();
548547 }
549548
549 // GPH Warning: Not re-entrant!
550550 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];
554554 unsigned char* digest = (unsigned char*)md5 (input);
555555 int i;
556556
4040
4141 vsnprintf(output, sizeof(output) - 1, format, args);
4242 // OutputDebugString(output);
43 fprintf(stderr, output);
43 fprintf(stderr, "%s", output);
4444 }
4545
4646 //---------------------------------------------------------------------------
477477
478478 BOOL bBtn0 = m_bButtons[0];
479479 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 )
481481 byState |= 0x22; // X/Y moved since last READMOUSE | Movement interrupt
482482 if ( m_bBtn0 != bBtn0 || m_bBtn1 != bBtn1 )
483483 byState |= 0x04; // Button 0/1 interrupt
678678 // WriteFile(m_hCommHandle, &value, 1, &uBytesWritten, &m_o);
679679
680680 m_bWrittenTx = true; // Transmit done
681 m_uLastBytesWritten = uBytesWritten;
681682
682683 // TO DO:
683684 // 1) Use CommThread determine when transmit is complete
392392 //CreateDIBSection(dc,framebufferinfo,DIB_RGB_COLORS,
393393 // (LPVOID *)&framebufferbits,0,0);
394394 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);
396396 // 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);
398398 // printf("SetColors(g_origscreen)=%d\n",hcl);
399399
400400 g_hStatusSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, STATUS_PANEL_W, STATUS_PANEL_H, SCREEN_BPP, 0, 0, 0, 0);
426426 if(g_hSourceBitmap == NULL) fprintf(stderr,"g_hSourceBitmap was not created!\n");
427427
428428 g_pSourcePixels = (LPBYTE)g_hSourceBitmap->pixels;
429 hcl = SDL_SetColors(g_hSourceBitmap, framebufferinfo, 0, 256);
429 SDL_SetColors(g_hSourceBitmap, framebufferinfo, 0, 256);
430430 // printf("SetColors(g_hSourceBitmap)=%d\n",hcl);
431431 //CreateDIBSection(
432432 //sourcedc,g_pSourceHeader,DIB_RGB_COLORS,
7070 {
7171 // char *s;
7272 if (lpsz)
73 for (lpsz; *lpsz; lpsz++)
73 for (; *lpsz; lpsz++)
7474 *lpsz = tolower(*lpsz);
7575 return 1;
7676