Update of /cvsroot/pure-data/externals/iem/comport/comport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4676
Modified Files: comport.c Log Message: comments are now C- comments not C++
Index: comport.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/comport/comport/comport.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** comport.c 21 Nov 2005 12:20:44 -0000 1.5 --- comport.c 21 Nov 2005 12:29:07 -0000 1.6 *************** *** 230,234 **** nr = 8;
! // number of bits/byte, 4-8 return x->dcb.ByteSize = nr; } --- 230,234 ---- nr = 8;
! /* number of bits/byte, 4-8 */ return x->dcb.ByteSize = nr; } *************** *** 240,255 **** switch(n){ case 1: ! x->dcb.fParity = TRUE; // enable parity checking ! x->dcb.Parity = 2; // 0-4=no,odd,even,mark,space return 1;
case -1: ! x->dcb.fParity = TRUE; // enable parity checking ! x->dcb.Parity = 1; // 0-4=no,odd,even,mark,space return -1;
default: ! x->dcb.fParity = FALSE; // enable parity checking ! x->dcb.Parity = 0; // 0-4=no,odd,even,mark,space } return 0; --- 240,255 ---- switch(n){ case 1: ! x->dcb.fParity = TRUE; /* enable parity checking */ ! x->dcb.Parity = 2; /* 0-4=no,odd,even,mark,space */ return 1;
case -1: ! x->dcb.fParity = TRUE; /* enable parity checking */ ! x->dcb.Parity = 1; /* 0-4=no,odd,even,mark,space */ return -1;
default: ! x->dcb.fParity = FALSE; /* enable parity checking */ ! x->dcb.Parity = 0; /* 0-4=no,odd,even,mark,space */ } return 0; *************** *** 261,269 **** { if(nr == 1){ ! x->dcb.StopBits = 1; // 0,1,2 = 1, 1.5, 2 return 1; } else ! x->dcb.StopBits = 0; // 0,1,2 = 1, 1.5, 2
return 0; --- 261,269 ---- { if(nr == 1){ ! x->dcb.StopBits = 1; /* 0,1,2 = 1, 1.5, 2 */ return 1; } else ! x->dcb.StopBits = 0; /* 0,1,2 = 1, 1.5, 2 */
return 0; *************** *** 274,283 **** { if(nr == 1){ ! x->dcb.fOutxCtsFlow = TRUE; // CTS output flow control ! x->dcb.fRtsControl = RTS_CONTROL_ENABLE; // RTS flow control return 1; } ! x->dcb.fOutxCtsFlow = FALSE; // CTS output flow control ! x->dcb.fRtsControl = RTS_CONTROL_DISABLE; // RTS flow control return 0; } --- 274,283 ---- { if(nr == 1){ ! x->dcb.fOutxCtsFlow = TRUE; /* CTS output flow control */ ! x->dcb.fRtsControl = RTS_CONTROL_ENABLE; /* RTS flow control */ return 1; } ! x->dcb.fOutxCtsFlow = FALSE; /* CTS output flow control */ ! x->dcb.fRtsControl = RTS_CONTROL_DISABLE; /* RTS flow control */ return 0; } *************** *** 285,298 **** static int set_xonxoff(t_comport *x, int nr) { ! // x->dcb.fTXContinueOnXoff = FALSE; // XOFF continues Tx
if(nr == 1){ ! x->dcb.fOutX = TRUE; // XON/XOFF out flow control ! x->dcb.fInX = TRUE; // XON/XOFF in flow control return 1; }
! x->dcb.fOutX = FALSE; // XON/XOFF out flow control ! x->dcb.fInX = FALSE; // XON/XOFF in flow control return 0; } --- 285,298 ---- static int set_xonxoff(t_comport *x, int nr) { ! /* x->dcb.fTXContinueOnXoff = FALSE; XOFF continues Tx */
if(nr == 1){ ! x->dcb.fOutX = TRUE; /* XON/XOFF out flow control */ ! x->dcb.fInX = TRUE; /* XON/XOFF in flow control */ return 1; }
! x->dcb.fOutX = FALSE; /* XON/XOFF out flow control */ ! x->dcb.fInX = FALSE; /* XON/XOFF in flow control */ return 0; } *************** *** 361,381 ****
! x->dcb.fBinary = TRUE; // binary mode, no EOF check
! // x->dcb.fOutxDsrFlow = FALSE; // DSR output flow control ! // x->dcb.fDtrControl = DTR_CONTROL_DISABLE; // DTR flow control type
! // x->dcb.fDsrSensitivity = FALSE; // DSR sensitivity
! x->dcb.fErrorChar = FALSE; // enable error replacement ! // x->dcb.fNull = FALSE; // enable null stripping
! // DWORD x->dcb.fAbortOnError:1; // abort reads/writes on error
! // char x->dcb.XonChar; // Tx and Rx XON character ! // char x->dcb.XoffChar; // Tx and Rx XOFF character ! // char x->dcb.ErrorChar; // error replacement character ! // char x->dcb.EofChar; // end of input character ! // char x->dcb.EvtChar; // received event character
--- 361,381 ----
! x->dcb.fBinary = TRUE; /* binary mode, no EOF check */
! /* x->dcb.fOutxDsrFlow = FALSE; DSR output flow control */ ! /* x->dcb.fDtrControl = DTR_CONTROL_DISABLE; DTR flow control type */
! /* x->dcb.fDsrSensitivity = FALSE; DSR sensitivity */
! x->dcb.fErrorChar = FALSE; /* enable error replacement */ ! /* x->dcb.fNull = FALSE; enable null stripping */
! /* DWORD x->dcb.fAbortOnError:1; abort reads/writes on error */
! /* char x->dcb.XonChar; Tx and Rx XON character */ ! /* char x->dcb.XoffChar; Tx and Rx XOFF character */ ! /* char x->dcb.ErrorChar; error replacement character */ ! /* char x->dcb.EofChar; end of input character */ ! /* char x->dcb.EvtChar; received event character */
*************** *** 406,410 **** };
! //setting new timeouts for read to immidiatly return timeouts.ReadIntervalTimeout = MAXDWORD; timeouts.ReadTotalTimeoutMultiplier = 0; --- 406,410 ---- };
! /* setting new timeouts for read to immidiatly return */ timeouts.ReadIntervalTimeout = MAXDWORD; timeouts.ReadTotalTimeoutMultiplier = 0; *************** *** 778,783 ****
#ifdef NT ! memcpy(&(test.dcb_old),&(x->dcb_old),sizeof(DCB)); // save the old com config ! memcpy(&(test.dcb),&(x->dcb),sizeof(DCB)); // for the new com config #else /* save the old com and new com config */ --- 778,783 ----
#ifdef NT ! memcpy(&(test.dcb_old),&(x->dcb_old),sizeof(DCB)); /* save the old com config */ ! memcpy(&(test.dcb),&(x->dcb),sizeof(DCB)); /* for the new com config */ #else /* save the old com and new com config */