optional WINDOWS2000 Patch und comments

svn path=/trunk/externals/iem/comport/; revision=3767
This commit is contained in:
Winfried Ritsch 2005-10-27 11:17:04 +00:00
parent e301bd9261
commit f9ff2a75c2

View file

@ -325,7 +325,11 @@ static HANDLE open_serial(int com_nr, t_comport *x)
0, 0,
0, 0,
OPEN_EXISTING, OPEN_EXISTING,
#ifdef WIN2000
0,
#elif
FILE_FLAG_OVERLAPPED, FILE_FLAG_OVERLAPPED,
#endif
0); 0);
if(fd == INVALID_HANDLE_VALUE) if(fd == INVALID_HANDLE_VALUE)
@ -682,11 +686,13 @@ static void comport_tick(t_comport *x)
err = 0; err = 0;
// if (!SetCommMask(x->comhandle, EV_RXCHAR)) /*
// post(" Error setting communications event mask for serial device"); if (!SetCommMask(x->comhandle, EV_RXCHAR))
post(" Error setting communications event mask for serial device");
// for ( ; ; ) { for ( ; ; ) {
// if (WaitCommEvent(x->comhandle, &dwCommEvent,NULL)) { if (WaitCommEvent(x->comhandle, &dwCommEvent,NULL)) {
*/
do { do {
if(ReadFile(x->comhandle, &chr, 1, &dwRead, NULL)) if(ReadFile(x->comhandle, &chr, 1, &dwRead, NULL))
@ -697,13 +703,15 @@ static void comport_tick(t_comport *x)
break; break;
} }
} while (dwRead); } while (dwRead);
// } /*
// else{
// post("serial dev: Error in WaitCommEvent");
// break;
// }
//}
} }
else{
post("serial dev: Error in WaitCommEvent");
break;
}
}
}
*/
#else #else
{ {
fd_set com_rfds; fd_set com_rfds;