From: Martin H. <mh...@us...> - 2005-07-23 09:17:59
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16476/c_source Added Files: lvserial.c Log Message: (1) changed to .c and defined the internally used functions as inline functions. (2)We do not add the "\\.\" string at the beginning of the port name if it already exists. (2) Allow the comma as separator between serial port options. (3) modified CommRead() and __CommRead() so it easier to read what the functions are doing. (4) changed the first regex in CommOptions() which is used to get the handshake mode and changed the regex for the complex form. (5) implemented the space parity option for the simple option form in CommOptions() --- NEW FILE: lvserial.c --- /* lvserial.cpp * * Serial Port API * * Martin Henz Systemtechnik, Germany, Stuttgart * E-Mail: mar...@mh... * Web: http://www.mhst.de * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public [...5839 lines suppressed...] } pComm = (PCOMM)ListGetElement(gpCommList, hComm); _ASSERT(pComm); if ((err = LStrPrintf(shName, (CStr)"%s", pComm->pszPort)) != noErr) { (*shName)->cnt = 0; (*shOriginal)->cnt = 0; lv_EasyErrBld(COMM_ERR_HANDLE, __FUNCTION__, pError); } if ((err = LStrPrintf(shOriginal, (CStr)"%s", pComm->pszOriginalName)) != noErr) { (*shName)->cnt = 0; (*shOriginal)->cnt = 0; lv_EasyErrBld(COMM_ERR_HANDLE, __FUNCTION__, pError); } } |