2012-10-09 20:27 UTC+0200 Viktor Szakats (harbour syenar.net)

* extras/gfspell/gfspell.hbp
  * extras/gtwvw/gtwvw.hbp
  * extras/hbvpdf/hbvpdf.hbp
  * extras/hbxlsxml/hbxlsxml.hbp
  * extras/ps32/ps32.hbp
  * extras/rddado/rddado.hbp
  * extras/superlib/superlib.hbp
    + added $hb_pkg_install.hbm so they now all will
      automatically install into /addons/

  * extras/gtwvw/tests/hbmk.hbm
  * extras/hbvpdf/tests/hbmk.hbm
  * extras/ps32/tests/hbmk.hbm
  * extras/rddado/tests/hbmk.hbm
    * deleted relative dir from .hbc file references

  + extras/hbxlsxml/hbxlsxml.hbc
  * extras/hbxlsxml/tests/hbmk.hbm
    + added missing .hbc file

  * extras/hbusb/hbusb.hbc
    * deleted dll related leftovers that only work
      with contribs

  - extras/commouse
  - extras/commouse/commouse.prg
  + tests/commouse.prg
    * moved to /tests/
This commit is contained in:
Viktor Szakats
2012-10-09 18:33:17 +00:00
parent d7875f4f54
commit 3978396f54
17 changed files with 196 additions and 153 deletions

View File

@@ -16,6 +16,36 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-09 20:27 UTC+0200 Viktor Szakats (harbour syenar.net)
* extras/gfspell/gfspell.hbp
* extras/gtwvw/gtwvw.hbp
* extras/hbvpdf/hbvpdf.hbp
* extras/hbxlsxml/hbxlsxml.hbp
* extras/ps32/ps32.hbp
* extras/rddado/rddado.hbp
* extras/superlib/superlib.hbp
+ added $hb_pkg_install.hbm so they now all will
automatically install into /addons/
* extras/gtwvw/tests/hbmk.hbm
* extras/hbvpdf/tests/hbmk.hbm
* extras/ps32/tests/hbmk.hbm
* extras/rddado/tests/hbmk.hbm
* deleted relative dir from .hbc file references
+ extras/hbxlsxml/hbxlsxml.hbc
* extras/hbxlsxml/tests/hbmk.hbm
+ added missing .hbc file
* extras/hbusb/hbusb.hbc
* deleted dll related leftovers that only work
with contribs
- extras/commouse
- extras/commouse/commouse.prg
+ tests/commouse.prg
* moved to /tests/
2012-10-09 19:49 UTC+0200 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
! minor fix to prev to properly parent built-in hbm files

View File

@@ -1,133 +0,0 @@
/*
* $Id$
*/
#include "hbcom.ch"
PROC main( cParam )
LOCAL nPort, cBuf, cBuffer, nLen, nType, lL, lM, lR, nX, nY
IF cParam == NIL
? "Usage: commouse [ nPort | cDevice ]"
RETURN
ENDIF
nPort := VAL( cParam )
IF nPort == 0
? "Using device:", cParam
nPort := 1
hb_comSetDevice( nPort, cParam )
ELSE
? "Using port number:", nPort
ENDIF
IF ! hb_comOpen( nPort )
? "Unable to open port. Error:", hb_comGetError( nPort ), " OS error:", hb_comGetOsError( nPort )
RETURN
ENDIF
IF ! hb_comInit( nPort, 1200, "N", 8, 1 )
? "Unable to initialize port. Error:", hb_comGetError( nPort ), " OS error:", hb_comGetOsError( nPort )
hb_comClose( nPort )
RETURN
ENDIF
hb_comMCR( nPort,, HB_COM_MCR_DTR + HB_COM_MCR_RTS )
hb_idleSleep( 0.1 )
hb_comFlush( nPort )
hb_comMCR( nPort,,, HB_COM_MCR_DTR + HB_COM_MCR_RTS )
cBuf := SPACE( 256 )
IF ( nLen := hb_comRecv( nPort, @cBuf,, 500 ) ) > 0
IF hb_BCode( cBuf ) == 0xCD
? "Bingo: 2 button mouse detected!"
nType := 2
cBuffer := HB_BSUBSTR( cBuf, 2, nLen - 1 )
ELSE
cBuffer := HB_BLEFT( cBuf, nLen )
ENDIF
ELSE
cBuffer := ""
ENDIF
IF nType == NIL
? "Mouse not detected, assuming 3 button mouse"
nType := 3
ENDIF
? "Press any key to exit..."
DO WHILE ( nLen := INKEY() ) == 0
IF ( nLen := hb_comRecv( nPort, @cBuf ) ) > 0
cBuffer += HB_BLEFT( cBuf, nLen )
ENDIF
IF HB_BLEN( cBuffer ) == 0
hb_idleSleep( 0.05 )
LOOP
ENDIF
IF nType == 2
IF hb_bitAnd( hb_BCode( cBuffer ), 0xC0 ) != 0xC0
cBuffer := HB_BSUBSTR( cBuffer, 2 )
ELSEIF HB_BLEN( cBuffer ) >= 3
lR := hb_bitAnd( hb_BCode( cBuffer ), 0x10 ) != 0
lL := hb_bitAnd( hb_BCode( cBuffer ), 0x20 ) != 0
nX := hb_bitAnd( hb_BCode( cBuffer ), 3 ) * 64 + hb_bitAnd( hb_BCode( HB_BSUBSTR( cBuffer, 2 ) ), 0x3F )
IF nX > 127
nX -= 256
ENDIF
nY := hb_bitAnd( hb_BCode( cBuffer ), 0x0C ) * 16 + hb_bitAnd( hb_BCode( HB_BSUBSTR( cBuffer, 3 ) ), 0x3F )
IF nY > 127
nY -= 256
ENDIF
? "dX,dY:", STR( nX, 4 ), STR( nY, 4 ), " "
IF lL
?? "LEFT "
ENDIF
IF lR
?? "RIGHT"
ENDIF
cBuffer := HB_BSUBSTR( cBuffer, 4 )
ENDIF
ELSEIF nType == 3
IF hb_bitAnd( hb_BCode( cBuffer ), 0xC0 ) != 0x80
cBuffer := HB_BSUBSTR( cBuffer, 2 )
ELSEIF HB_BLEN( cBuffer ) >= 4
lR := hb_bitAnd( hb_BCode( cBuffer ), 1 ) == 0
lM := hb_bitAnd( hb_BCode( cBuffer ), 2 ) == 0
lL := hb_bitAnd( hb_BCode( cBuffer ), 4 ) == 0
nI := hb_BCode( HB_BSUBSTR( cBuffer, 2 ) )
IF nI > 127
nI -= 256
ENDIF
nX := nI
nI := hb_BCode( HB_BSUBSTR( cBuffer, 4 ) )
IF nI > 127
nI -= 256
ENDIF
nX += nI
nI := hb_BCode( HB_BSUBSTR( cBuffer, 3 ) )
IF nI > 127
nI -= 256
ENDIF
nY := - nI
nI := hb_BCode( HB_BSUBSTR( cBuffer, 5 ) )
IF nI > 127
nI -= 256
ENDIF
nY -= nI
? "dX,dY:", STR( nX, 4 ), STR( nY, 4 ), " "
IF lL
?? "LEFT "
ENDIF
IF lM
?? "MIDDLE "
ENDIF
IF lR
?? "RIGHT"
ENDIF
cBuffer := HB_BSUBSTR( cBuffer, 5 )
ENDIF
ENDIF
ENDDO
hb_comClose( nPort )
RETURN

View File

@@ -9,7 +9,7 @@
-w1 -es2
-instfile=inc:spell.ch
spell.prg
spellc.c
$hb_pkg_install.hbm

View File

@@ -27,3 +27,5 @@ wvwtbar.c
-cpp=no
# NOTE: Due to large quantity of unprecise code, it doesn't build in C++ mode.
-warn=no
$hb_pkg_install.hbm

View File

@@ -2,7 +2,7 @@
# $Id$
#
../gtwvw.hbc
gtwvw.hbc
# NOTE: Disabled until test code is cleaned/fixed.
#-w3 -es2

View File

@@ -5,7 +5,7 @@
incpaths=.
libpaths=lib/${hb_plat}/${hb_comp}
libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
libs=${hb_name}
{win}libs=libusb-1
{!win}libs=libusb

View File

@@ -9,7 +9,7 @@
-w3 -es2
-instfile=inc:hbvpdf.ch
hbvpdf.prg
hbvpsup.prg
$hb_pkg_install.hbm

View File

@@ -2,6 +2,6 @@
# $Id$
#
../hbvpdf.hbc
hbvpdf.hbc
-w3 -es2

View File

@@ -0,0 +1,8 @@
#
# $Id$
#
incpaths=.
libpaths=lib/${hb_plat}/${hb_comp}
libs=${hb_name}

View File

@@ -12,3 +12,5 @@
xlsxml.prg
xlsxml_s.prg
xlsxml_y.prg
$hb_pkg_install.hbm

View File

@@ -2,11 +2,6 @@
# $Id$
#
-w3
-es2
-L../
-lhbxlsxml
hbxlsxml.hbc
-w3 -es2

View File

@@ -11,6 +11,6 @@
hbxpp.hbc
-instfile=inc:pscript.ch
tpscript.prg
$hb_pkg_install.hbm

View File

@@ -2,4 +2,6 @@
# $Id$
#
../ps32.hbc
ps32.hbc
-w3 -es2

View File

@@ -11,6 +11,6 @@
-stop{!win}
-instfile=inc:adordd.ch
adordd.prg
$hb_pkg_install.hbm

View File

@@ -2,6 +2,6 @@
# $Id$
#
../rddado.hbc
rddado.hbc
-w3 -es2

View File

@@ -216,3 +216,5 @@ s_womon.prg
s_woyear.prg
s_writef.prg
s_xbxx.prg
$hb_pkg_install.hbm

135
harbour/tests/commouse.prg Normal file
View File

@@ -0,0 +1,135 @@
/*
* $Id$
*/
#include "hbcom.ch"
PROCEDURE Main( cParam )
LOCAL nPort, cBuf, cBuffer, nLen, nType, lL, lM, lR, nX, nY
IF cParam == NIL
? "Usage: commouse [ nPort | cDevice ]"
RETURN
ENDIF
nPort := Val( cParam )
IF nPort == 0
? "Using device:", cParam
nPort := 1
hb_comSetDevice( nPort, cParam )
ELSE
? "Using port number:", nPort
ENDIF
IF ! hb_comOpen( nPort )
? "Unable to open port. Error:", hb_comGetError( nPort ), " OS error:", hb_comGetOSError( nPort )
RETURN
ENDIF
IF ! hb_comInit( nPort, 1200, "N", 8, 1 )
? "Unable to initialize port. Error:", hb_comGetError( nPort ), " OS error:", hb_comGetOSError( nPort )
hb_comClose( nPort )
RETURN
ENDIF
hb_comMCR( nPort, , HB_COM_MCR_DTR + HB_COM_MCR_RTS )
hb_idleSleep( 0.1 )
hb_comFlush( nPort )
hb_comMCR( nPort, , , HB_COM_MCR_DTR + HB_COM_MCR_RTS )
cBuf := Space( 256 )
IF ( nLen := hb_comRecv( nPort, @cBuf,, 500 ) ) > 0
IF hb_BCode( cBuf ) == 0xCD
? "Bingo: 2 button mouse detected!"
nType := 2
cBuffer := hb_BSubStr( cBuf, 2, nLen - 1 )
ELSE
cBuffer := hb_BLeft( cBuf, nLen )
ENDIF
ELSE
cBuffer := ""
ENDIF
IF nType == NIL
? "Mouse not detected, assuming 3 button mouse"
nType := 3
ENDIF
? "Press any key to exit..."
DO WHILE ( nLen := Inkey() ) == 0
IF ( nLen := hb_comRecv( nPort, @cBuf ) ) > 0
cBuffer += hb_BLeft( cBuf, nLen )
ENDIF
IF hb_BLen( cBuffer ) == 0
hb_idleSleep( 0.05 )
LOOP
ENDIF
IF nType == 2
IF hb_bitAnd( hb_BCode( cBuffer ), 0xC0 ) != 0xC0
cBuffer := hb_BSubStr( cBuffer, 2 )
ELSEIF hb_BLen( cBuffer ) >= 3
lR := hb_bitAnd( hb_BCode( cBuffer ), 0x10 ) != 0
lL := hb_bitAnd( hb_BCode( cBuffer ), 0x20 ) != 0
nX := hb_bitAnd( hb_BCode( cBuffer ), 3 ) * 64 + hb_bitAnd( hb_BCode( hb_BSubStr( cBuffer, 2 ) ), 0x3F )
IF nX > 127
nX -= 256
ENDIF
nY := hb_bitAnd( hb_BCode( cBuffer ), 0x0C ) * 16 + hb_bitAnd( hb_BCode( hb_BSubStr( cBuffer, 3 ) ), 0x3F )
IF nY > 127
nY -= 256
ENDIF
? "dX,dY:", Str( nX, 4 ), Str( nY, 4 ), " "
IF lL
?? "LEFT "
ENDIF
IF lR
?? "RIGHT"
ENDIF
cBuffer := hb_BSubStr( cBuffer, 4 )
ENDIF
ELSEIF nType == 3
IF hb_bitAnd( hb_BCode( cBuffer ), 0xC0 ) != 0x80
cBuffer := hb_BSubStr( cBuffer, 2 )
ELSEIF hb_BLen( cBuffer ) >= 4
lR := hb_bitAnd( hb_BCode( cBuffer ), 1 ) == 0
lM := hb_bitAnd( hb_BCode( cBuffer ), 2 ) == 0
lL := hb_bitAnd( hb_BCode( cBuffer ), 4 ) == 0
nI := hb_BCode( hb_BSubStr( cBuffer, 2 ) )
IF nI > 127
nI -= 256
ENDIF
nX := nI
nI := hb_BCode( hb_BSubStr( cBuffer, 4 ) )
IF nI > 127
nI -= 256
ENDIF
nX += nI
nI := hb_BCode( hb_BSubStr( cBuffer, 3 ) )
IF nI > 127
nI -= 256
ENDIF
nY := - nI
nI := hb_BCode( hb_BSubStr( cBuffer, 5 ) )
IF nI > 127
nI -= 256
ENDIF
nY -= nI
? "dX,dY:", Str( nX, 4 ), Str( nY, 4 ), " "
IF lL
?? "LEFT "
ENDIF
IF lM
?? "MIDDLE "
ENDIF
IF lR
?? "RIGHT"
ENDIF
cBuffer := hb_BSubStr( cBuffer, 5 )
ENDIF
ENDIF
ENDDO
hb_comClose( nPort )
RETURN