2013-01-23 00:59 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
! FindInPath(): fixed for filenames with an empty
extension on *nix systems when opening hbrun scripts.
[slight chance of regression.]
! fixed to use ".\" also on non-*nix systems when using
-run option and the target doesn't have a directory.
Previously the wrong executable might have been executed
if another one with the same name existed in path.
+ detect another variant of "multiple definitions" linker option
+ detect "multiple definitions" linker message for another C compiler
+ tests/testcom1.prg
+ added com sample code posted by Przemek earlier
* contrib/hbsms/tests/send.prg
+ added Linux device name
* src/rtl/cdpdet.prg
* cleanup to local function name
This commit is contained in:
@@ -10,6 +10,27 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-01-23 00:59 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
! FindInPath(): fixed for filenames with an empty
|
||||
extension on *nix systems when opening hbrun scripts.
|
||||
[slight chance of regression.]
|
||||
! fixed to use ".\" also on non-*nix systems when using
|
||||
-run option and the target doesn't have a directory.
|
||||
Previously the wrong executable might have been executed
|
||||
if another one with the same name existed in path.
|
||||
+ detect another variant of "multiple definitions" linker option
|
||||
+ detect "multiple definitions" linker message for another C compiler
|
||||
|
||||
+ tests/testcom1.prg
|
||||
+ added com sample code posted by Przemek earlier
|
||||
|
||||
* contrib/hbsms/tests/send.prg
|
||||
+ added Linux device name
|
||||
|
||||
* src/rtl/cdpdet.prg
|
||||
* cleanup to local function name
|
||||
|
||||
2013-01-22 02:53 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* src/rtl/teditor.prg
|
||||
! fixed current color being used instead of editor's own
|
||||
@@ -331,6 +352,7 @@
|
||||
to create scripts starting with line:
|
||||
#!/usr/bin/hbrun
|
||||
which do not have .hb or .prg file name extension
|
||||
[UPDATE: which has no extension] [DONE]
|
||||
|
||||
2012-12-27 01:52 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* package/winuni/mpkg_win_uni.nsi
|
||||
|
||||
@@ -13,6 +13,8 @@ PROCEDURE Main( cPort )
|
||||
|
||||
#if defined( __PLATFORM__WINDOWS )
|
||||
hb_default( @cPort, "\\.\COM22" )
|
||||
#elif defined( __PLATFORM__LINUX )
|
||||
hb_default( @cPort, "/dev/ttyS1" )
|
||||
#elif defined( __PLATFORM__DARWIN )
|
||||
hb_default( @cPort, "/dev/cu.myport-COM1-1" )
|
||||
#endif
|
||||
|
||||
@@ -234,7 +234,7 @@ STATIC FUNCTION __CPStdToHarbour( cCPStd, cCtryStd )
|
||||
ELSEIF Lower( cCPStd ) == "utf16"
|
||||
cCP := "UTF16LE"
|
||||
ELSE
|
||||
IF ! Empty( cCtryHb := __CtryStdToCtry( cCtryStd ) )
|
||||
IF ! Empty( cCtryHb := __LangStdToCPCtryHb( cCtryStd ) )
|
||||
FOR EACH cdp IN hb_cdpList()
|
||||
IF Left( cdp, 2 ) == cCtryHb
|
||||
IF Lower( cCPStd ) == hb_cdpUniID( cdp )
|
||||
@@ -257,7 +257,7 @@ STATIC FUNCTION __CPStdToHarbour( cCPStd, cCtryStd )
|
||||
|
||||
RETURN cCP
|
||||
|
||||
STATIC FUNCTION __CtryStdToCtry( cCtryStd )
|
||||
STATIC FUNCTION __LangStdToCPCtryHb( cCtryStd )
|
||||
|
||||
LOCAL cCtryHb := Left( hb_cdpSelect(), 2 )
|
||||
|
||||
|
||||
49
harbour/tests/testcom1.prg
Normal file
49
harbour/tests/testcom1.prg
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "hbcom.ch"
|
||||
|
||||
PROCEDURE Main( cPortName )
|
||||
|
||||
LOCAL cString := "ATE0" + Chr( 13 ) + "ATI3" + Chr( 13 )
|
||||
LOCAL nTimeOut := 3000 // 3000 miliseconds = 3 sec.
|
||||
LOCAL nResult
|
||||
LOCAL nPort := 1
|
||||
|
||||
IF ! Empty( cPortName )
|
||||
hb_comSetDevice( nPort, cPortName )
|
||||
ENDIF
|
||||
IF ! hb_comOpen( nPort )
|
||||
? "Cannot open port:", nPort, hb_comGetDevice( nPort ), ;
|
||||
"error: " + hb_ntos( hb_comGetError( nPort ) )
|
||||
ELSE
|
||||
? "port:", hb_comGetDevice( nPort ), "opened"
|
||||
IF ! hb_comInit( nPort, 9600, "N", 8, 1 )
|
||||
? "Cannot initialize port to: 9600:N:8:1", ;
|
||||
"error: " + hb_ntos( hb_comGetError( nPort ) )
|
||||
ELSE
|
||||
nResult := hb_comSend( nPort, cString, Len( cString ), nTimeOut )
|
||||
IF nResult != Len( cString )
|
||||
? "SEND() failed,", nResult, "bytes sent in", nTimeOut / 1000, ;
|
||||
"sec., expected:", Len( cString ), "bytes."
|
||||
? "error: " + hb_ntos( hb_comGetError( nPort ) )
|
||||
ELSE
|
||||
? "SEND() succeeded."
|
||||
ENDIF
|
||||
|
||||
WAIT "Press any key to begin reading..."
|
||||
cString := Space( 32 )
|
||||
nTimeOut := 500 // 500 milliseconds = 0.5 sec.
|
||||
nResult := hb_comRecv( nPort, @cString, Len( cString ), nTimeOut )
|
||||
IF nResult == -1
|
||||
? "RECV() failed,", ;
|
||||
"error: " + hb_ntos( hb_comGetError( nPort ) )
|
||||
ELSE
|
||||
? nResult, "bytes read in", nTimeOut / 1000, "sec."
|
||||
ENDIF
|
||||
ENDIF
|
||||
? "CLOSE:", hb_comClose( nPort )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -7167,11 +7167,9 @@ FUNCTION hbmk( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
! hbmk[ _HBMK_lCreateLib ] .AND. ! hbmk[ _HBMK_lCreateDyn ] .AND. ;
|
||||
hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. hbmk[ _HBMK_lRUN ]
|
||||
cCommand := hbmk[ _HBMK_cPROGNAME ]
|
||||
#if defined( __PLATFORM__UNIX )
|
||||
IF Empty( hb_FNameDir( hbmk[ _HBMK_cPROGNAME ] ) )
|
||||
cCommand := "." + hb_ps() + hbmk[ _HBMK_cPROGNAME ]
|
||||
ENDIF
|
||||
#endif
|
||||
IF Empty( hb_FNameDir( hbmk[ _HBMK_cPROGNAME ] ) )
|
||||
cCommand := "." + hb_ps() + hbmk[ _HBMK_cPROGNAME ]
|
||||
ENDIF
|
||||
#if defined( __PLATFORM__WINDOWS )
|
||||
IF hbmk[ _HBMK_lGUI ]
|
||||
IF hb_osIsWinNT()
|
||||
@@ -7237,7 +7235,8 @@ STATIC PROCEDURE AAddWithWarning( hbmk, aArray, cOption, aParam, lNew )
|
||||
|
||||
STATIC sc_aWarning := { ;
|
||||
"-Wl,--allow-multiple-definition", ; /* gcc */
|
||||
"force:multiple", ; /* msvc */
|
||||
"muldefs", ; /* ld '-z muldefs' */
|
||||
"force:multiple", ; /* msvc, pocc, watcom */
|
||||
"w-dpl" } /* bcc */
|
||||
|
||||
IF AScan( sc_aWarning, {| tmp | Lower( tmp ) $ Lower( cOption ) } ) > 0
|
||||
@@ -9312,7 +9311,14 @@ STATIC FUNCTION FindInPath( cFileName, xPath, aExtDef )
|
||||
#else
|
||||
hb_default( @aExtDef, { cExt } )
|
||||
#endif
|
||||
aExt := iif( Empty( cExt ), aExtDef, { cExt } )
|
||||
aExt := { cExt }
|
||||
IF Empty( cExt )
|
||||
FOR EACH cExt IN aExtDef
|
||||
IF AScan( aExt, {| tmp | hb_FileMatch( tmp, cExt ) } ) == 0
|
||||
AAdd( aExt, cExt )
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
FOR EACH cExt IN aExt
|
||||
/* Check original filename (in supplied path or current dir) */
|
||||
@@ -12539,7 +12545,8 @@ STATIC FUNCTION ExtractHarbourSymbols( cString )
|
||||
"multiple definition", ; /* gcc */
|
||||
"duplicate symbol", ; /* clang */
|
||||
"already defined", ; /* msvc */
|
||||
"defined in both" } /* bcc */
|
||||
"defined in both", ; /* bcc */
|
||||
"previous definition different" } /* dmc */
|
||||
|
||||
LOCAL aList := {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user