2009-08-09 13:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbtpathy/telepath.prg
! Fixed tp_open() to not add numeric port to passed portname.
It's now only added to portname if it's not passed and default
is used. On darwin, the portname isn't necessarily ending with
a number.
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-08-09 13:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbtpathy/telepath.prg
|
||||
! Fixed tp_open() to not add numeric port to passed portname.
|
||||
It's now only added to portname if it's not passed and default
|
||||
is used. On darwin, the portname isn't necessarily ending with
|
||||
a number.
|
||||
|
||||
2009-08-09 12:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbtpathy/hbtpathy.hbc
|
||||
! Added darwin to supported platforms.
|
||||
|
||||
@@ -184,19 +184,9 @@ FUNCTION tp_open( nPort, nInSize, nOutSize, nBaud, nData, cParity, nStop, cPortn
|
||||
|
||||
/* Serial ports name are made up of cPortName + nPort if nPort is not NIL */
|
||||
#ifdef __PLATFORM__UNIX
|
||||
DEFAULT cPortName TO "/dev/ttyS"
|
||||
DEFAULT cPortName TO "/dev/ttyS" + iif( ISNUMBER( nPort ), hb_NToS( nPort - 1 ), "" )
|
||||
#else
|
||||
DEFAULT cPortName TO "COM" // Ok for Windows and OS/2
|
||||
#endif
|
||||
|
||||
/* This way compatibility is retained for ports 1-4 on Windows and Linux, but,
|
||||
should necessity arise, it is possible to simply pass a NIL on nPort and
|
||||
a full name on cPortName
|
||||
*/
|
||||
#ifdef __PLATFORM__UNIX
|
||||
cPortname := AllTrim( cPortname ) + iif( ISNUMBER( nPort ), hb_NToS( nPort - 1 ), "" )
|
||||
#else
|
||||
cPortname := AllTrim( cPortname ) + iif( ISNUMBER( nPort ), hb_NToS( nPort ), "" )
|
||||
DEFAULT cPortName TO "COM" + iif( ISNUMBER( nPort ), hb_NToS( nPort ), "" )
|
||||
#endif
|
||||
|
||||
#ifdef __PLATFORM__UNIX
|
||||
|
||||
Reference in New Issue
Block a user