[Com0com-cvs] hub4com/plugins/escparse filter.cpp,1.1,1.2
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
From: Vyacheslav F. <vf...@us...> - 2008-08-29 13:02:42
|
Update of /cvsroot/com0com/hub4com/plugins/escparse In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27988/escparse Modified Files: filter.cpp Log Message: Added ESC_OPTS_MAP_EO2GO() and ESC_OPTS_MAP_GO2EO() Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/escparse/filter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filter.cpp 22 Aug 2008 17:02:59 -0000 1.1 --- filter.cpp 29 Aug 2008 13:02:37 -0000 1.2 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.2 2008/08/29 13:02:37 vfrolov + * Added ESC_OPTS_MAP_EO2GO() and ESC_OPTS_MAP_GO2EO() + * * Revision 1.1 2008/08/22 17:02:59 vfrolov * Initial revision *************** *** 405,428 **** } /////////////////////////////////////////////////////////////// - inline DWORD go2esc(DWORD goOpts) - { - return - ESC_OPTS_V2O_MST(GO_O2V_MODEM_STATUS(goOpts)) | - ESC_OPTS_V2O_LSR(GO_O2V_LINE_STATUS(goOpts)) | - ((goOpts & GO_RBR_STATUS) ? ESC_OPTS_RBR_STATUS : 0) | - ((goOpts & GO_RLC_STATUS) ? ESC_OPTS_RLC_STATUS : 0) | - ((goOpts & GO_BREAK_STATUS) ? ESC_OPTS_BREAK_STATUS : 0); - } - - inline DWORD esc2go(DWORD escOpts) - { - return - GO_V2O_MODEM_STATUS(ESC_OPTS_O2V_MST(escOpts)) | - GO_V2O_LINE_STATUS(ESC_OPTS_O2V_LSR(escOpts)) | - ((escOpts & ESC_OPTS_RBR_STATUS) ? GO_RBR_STATUS : 0) | - ((escOpts & ESC_OPTS_RLC_STATUS) ? GO_RLC_STATUS : 0) | - ((escOpts & ESC_OPTS_BREAK_STATUS) ? GO_BREAK_STATUS : 0); - } - static BOOL CALLBACK InMethod( HFILTER hFilter, --- 408,411 ---- *************** *** 488,492 **** return FALSE; ! *pInMsg->u.pv.pVal = go2esc(pEscParse->Options()) | ESC_OPTS_V2O_ESCCHAR(((Filter *)hFilter)->escapeChar); --- 471,475 ---- return FALSE; ! *pInMsg->u.pv.pVal = ESC_OPTS_MAP_GO2EO(pEscParse->Options()) | ESC_OPTS_V2O_ESCCHAR(((Filter *)hFilter)->escapeChar); *************** *** 502,506 **** return FALSE; ! DWORD fail_options = (pInMsg->u.val & go2esc(pEscParse->Options())); if (fail_options) { --- 485,489 ---- return FALSE; ! DWORD fail_options = (pInMsg->u.val & ESC_OPTS_MAP_GO2EO(pEscParse->Options())); if (fail_options) { *************** *** 510,514 **** << " not accepted" << endl; ! pEscParse->OptionsDel(esc2go(fail_options)); } --- 493,497 ---- << " not accepted" << endl; ! pEscParse->OptionsDel(ESC_OPTS_MAP_EO2GO(fail_options)); } |