2013-02-27 18:30 UTC+0100 Viktor Szakats (harbour syenar.net)

* utils/hbmk2/hbmk2.prg
    ! fixed hbmk_FNameEscape() plugin API's legacy fallback
      after latest patch (still untested)
    ! avoid potential RTE in hbmk_PathFromWorkdirToCWD()
      plugin API
    ! rtlink/blinker/exospace linker script processing will
      now add directories of library input files as libpaths
      (as opposed to passing them as part of the libname)
    ! fixed rtlink/blinker/exospace linker script processing
      to convert dirseps to native ones in output
    ! fixed rtlink/blinker/exospace linker script processing
      to strip extension from library name and output name
      (only if it's '.exe')
    ! fixed to verify non-portable output extensions in more
      reliable way

  * contrib/hbmisc/hb_f.c
  * contrib/hbmisc/fcomma.prg
  * contrib/hbmisc/hbmisc.hbx
  * contrib/hbmisc/tests/hb_f.prg
  * contrib/hbmisc/tests/numtxtru.prg
  * contrib/hbmisc/tests/rtfclass.prg
  * contrib/hbnf/fttext.c
  * contrib/hbnf/tests/fttext.prg
    * use constants instead of literals
    ! fixed buffer over- and underrun in HB_FSELECT()
    % HB_FUSE() optimized
    ! fixed long time core/hbmisc function name
      collision by renaming HB_FEof() inside hbmisc
      to hb_FAtEof(). hbmisc code and tests changed
      to use the new one. A parallel hb_FEof() in
      hbmisc remains until HB_LEGACY_LEVEL4.
      [INCOMPATIBLE] Update your hbmisc HB_FEOF()
      call according to above, or even better change
      HB_F*() calls to original FT_F*() API in hbnf.
      It's the original version of this code, what
      was cloned in a dumbed down version into hbmisc
      when hbnf didn't exist in Harbour yet.

  * contrib/hbamf/tests/encode.prg
    + updated to use hbtest instead of similar
      local solution

  * contrib/hbfimage/tests/fitest.prg
    % use core functions instead of local clones
    ! minor output fix

  * tests/mousetst.prg
    * obfuscate e-mail address in this public sample

  * website/samples/mousetst.prg.html
  * website/samples/testhtml.prg.html
  * website/samples/tstmacro.prg.html
    * synced with code changes

  * */tests/*
    * dropped 'tst'/'ts'/'test' from most
      filenames inside 'tests' subdirs. 8 chars will
      allow for more descriptive names than 4-5.
    + do not explicitly include the original source
      filename (use __FILE__ or similar)
    ; List of changes, in /contrib:
      /hbmisc/tests/testbbab.prg   -> bubbleb.prg
      /hbmisc/tests/testcall.prg   -> calldll.prg
      /hbmisc/tests/testhbf.prg    -> hb_f.prg
      /hbmisc/tests/tsstrfmt.prg   -> strfmt.prg
      /hbmisc/tests/twirl.prg      -> twirler.prg
      /hbmisc/tests/udpdstst.prg   -> udpds.prg
      /hbxpp/tests/testdll.prg     -> dllcall.prg
      /xhb/tests/testcp.prg        -> copyfile.prg
      /hbwin/tests/testax.prg      -> activex.prg
      /hbwin/tests/testcom1.prg    -> serial1.prg
      /hbwin/tests/testcom2.prg    -> serial2.prg
      /hbwin/tests/testcopy.prg    -> shfileop.prg
      /hbwin/tests/testdir.prg     -> sysdir.prg
      /hbwin/tests/testevnt.prg    -> eventlog.prg
      /hbwin/tests/testgdi.prg     -> prngdi.prg
      /hbwin/tests/testmapi.prg    -> mapimail.prg
      /hbwin/tests/testole.prg     -> ole.prg
      /hbwin/tests/testprn.prg     -> prn1.prg
      /hbwin/tests/testprn2.prg    -> prn2.prg
      /hbwin/tests/testprn3.prg    -> prn3.prg
      /hbwin/tests/testprn4.prg    -> prn4.prg
      /hbwin/tests/testreg.prg     -> registry.prg
      /hbwin/tests/testrpc.prg     -> uuid.prg
      /hbwin/tests/testsim.prg     -> simwce.prg
      /hbwin/tests/testsvc.prg     -> service.prg
      /hbwin/tests/testwmtx.prg    -> mutexwin.prg
      /hbzebra/tests/testcair.prg  -> cairo.prg
      /hbzebra/tests/testhpdf.prg  -> harupdf.prg
      /hbzebra/tests/testwin.prg   -> wingdi.prg
      /rddads/tests/testmg.prg     -> manage.prg
      /hbodbc/tests/odbcdemo.prg   -> todbc.prg
      /hbodbc/tests/testodbc.prg   -> odbc.prg
      /hbsqlit3/tests/hdbctest.prg -> hdbc.prg
      /hbsqlit3/tests/sl3_test.prg -> demo.prg
      /hbunix/tests/testdmn.prg    -> daemon.prg
      /hbunix/tests/testpid.prg    -> getpid.prg
      /hbgd/tests/bartest.prg      -> barcode.prg
      /hbgd/tests/barms.prg        -> barcode2.prg
      /hbgd/tests/gdtest.prg       -> gdapi.prg
      /hbgd/tests/gdtestcl.prg     -> gdclass.prg
      /hbgd/tests/testdpi.prg      -> fontdpi.prg
      /hbgd/tests/test_out.prg     -> cgi.prg
      /hbtip/tests/test01.prg      -> httpcli.prg
      /hbtip/tests/tipmime.prg     -> mimetype.prg
      /hbtip/tests/tiptest.prg     -> tipwget.prg
      /hbtip/tests/tiptime.prg     -> timestmp.prg
      /hbamf/tests/tstendin.prg    -> test.prg
      /hbfimage/tests/fitest.prg   -> test.prg
      /hbtpathy/tests/testtp.prg   -> test.prg
      /hbgs/tests/testgs.prg       -> test.prg

  * contrib/hbmxml/tests/testmxml.prg
  * contrib/rddads/tests/datad.prg
    * minor
This commit is contained in:
Viktor Szakats
2013-02-27 17:39:07 +00:00
parent 9494153d8b
commit 94a305ed4f
66 changed files with 333 additions and 254 deletions

View File

@@ -10,6 +10,124 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-02-27 18:30 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
! fixed hbmk_FNameEscape() plugin API's legacy fallback
after latest patch (still untested)
! avoid potential RTE in hbmk_PathFromWorkdirToCWD()
plugin API
! rtlink/blinker/exospace linker script processing will
now add directories of library input files as libpaths
(as opposed to passing them as part of the libname)
! fixed rtlink/blinker/exospace linker script processing
to convert dirseps to native ones in output
! fixed rtlink/blinker/exospace linker script processing
to strip extension from library name and output name
(only if it's '.exe')
! fixed to verify non-portable output extensions in more
reliable way
* contrib/hbmisc/hb_f.c
* contrib/hbmisc/fcomma.prg
* contrib/hbmisc/hbmisc.hbx
* contrib/hbmisc/tests/hb_f.prg
* contrib/hbmisc/tests/numtxtru.prg
* contrib/hbmisc/tests/rtfclass.prg
* contrib/hbnf/fttext.c
* contrib/hbnf/tests/fttext.prg
* use constants instead of literals
! fixed buffer over- and underrun in HB_FSELECT()
% HB_FUSE() optimized
! fixed long time core/hbmisc function name
collision by renaming HB_FEof() inside hbmisc
to hb_FAtEof(). hbmisc code and tests changed
to use the new one. A parallel hb_FEof() in
hbmisc remains until HB_LEGACY_LEVEL4.
[INCOMPATIBLE] Update your hbmisc HB_FEOF()
call according to above, or even better change
HB_F*() calls to original FT_F*() API in hbnf.
It's the original version of this code, what
was cloned in a dumbed down version into hbmisc
when hbnf didn't exist in Harbour yet.
* contrib/hbamf/tests/encode.prg
+ updated to use hbtest instead of similar
local solution
* contrib/hbfimage/tests/fitest.prg
% use core functions instead of local clones
! minor output fix
* tests/mousetst.prg
* obfuscate e-mail address in this public sample
* website/samples/mousetst.prg.html
* website/samples/testhtml.prg.html
* website/samples/tstmacro.prg.html
* synced with code changes
* */tests/*
* dropped 'tst'/'ts'/'test' from most
filenames inside 'tests' subdirs. 8 chars will
allow for more descriptive names than 4-5.
+ do not explicitly include the original source
filename (use __FILE__ or similar)
; List of changes, in /contrib:
/hbmisc/tests/testbbab.prg -> bubbleb.prg
/hbmisc/tests/testcall.prg -> calldll.prg
/hbmisc/tests/testhbf.prg -> hb_f.prg
/hbmisc/tests/tsstrfmt.prg -> strfmt.prg
/hbmisc/tests/twirl.prg -> twirler.prg
/hbmisc/tests/udpdstst.prg -> udpds.prg
/hbxpp/tests/testdll.prg -> dllcall.prg
/xhb/tests/testcp.prg -> copyfile.prg
/hbwin/tests/testax.prg -> activex.prg
/hbwin/tests/testcom1.prg -> serial1.prg
/hbwin/tests/testcom2.prg -> serial2.prg
/hbwin/tests/testcopy.prg -> shfileop.prg
/hbwin/tests/testdir.prg -> sysdir.prg
/hbwin/tests/testevnt.prg -> eventlog.prg
/hbwin/tests/testgdi.prg -> prngdi.prg
/hbwin/tests/testmapi.prg -> mapimail.prg
/hbwin/tests/testole.prg -> ole.prg
/hbwin/tests/testprn.prg -> prn1.prg
/hbwin/tests/testprn2.prg -> prn2.prg
/hbwin/tests/testprn3.prg -> prn3.prg
/hbwin/tests/testprn4.prg -> prn4.prg
/hbwin/tests/testreg.prg -> registry.prg
/hbwin/tests/testrpc.prg -> uuid.prg
/hbwin/tests/testsim.prg -> simwce.prg
/hbwin/tests/testsvc.prg -> service.prg
/hbwin/tests/testwmtx.prg -> mutexwin.prg
/hbzebra/tests/testcair.prg -> cairo.prg
/hbzebra/tests/testhpdf.prg -> harupdf.prg
/hbzebra/tests/testwin.prg -> wingdi.prg
/rddads/tests/testmg.prg -> manage.prg
/hbodbc/tests/odbcdemo.prg -> todbc.prg
/hbodbc/tests/testodbc.prg -> odbc.prg
/hbsqlit3/tests/hdbctest.prg -> hdbc.prg
/hbsqlit3/tests/sl3_test.prg -> demo.prg
/hbunix/tests/testdmn.prg -> daemon.prg
/hbunix/tests/testpid.prg -> getpid.prg
/hbgd/tests/bartest.prg -> barcode.prg
/hbgd/tests/barms.prg -> barcode2.prg
/hbgd/tests/gdtest.prg -> gdapi.prg
/hbgd/tests/gdtestcl.prg -> gdclass.prg
/hbgd/tests/testdpi.prg -> fontdpi.prg
/hbgd/tests/test_out.prg -> cgi.prg
/hbtip/tests/test01.prg -> httpcli.prg
/hbtip/tests/tipmime.prg -> mimetype.prg
/hbtip/tests/tiptest.prg -> tipwget.prg
/hbtip/tests/tiptime.prg -> timestmp.prg
/hbamf/tests/tstendin.prg -> test.prg
/hbfimage/tests/fitest.prg -> test.prg
/hbtpathy/tests/testtp.prg -> test.prg
/hbgs/tests/testgs.prg -> test.prg
* contrib/hbmxml/tests/testmxml.prg
* contrib/rddads/tests/datad.prg
* minor
2013-02-26 23:53 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
+ disable VM internals (__dbg*() API) on hbmk2/hbrun

View File

@@ -0,0 +1,44 @@
/*
* $Id$
*/
#require "hbamf"
#require "hbtest"
REQUEST HB_CODEPAGE_UTF8EX
PROCEDURE Main()
hb_cdpSelect( "UTF8EX" )
HBTEST _enc( {} ) IS "09 01 01"
HBTEST _enc( "a" ) IS "06 03 61"
HBTEST _enc( "ą" ) IS "06 05 C4 85"
HBTEST _enc( 1 ) IS "04 01"
HBTEST _enc( 1000 ) IS "04 87 68"
HBTEST _enc( 1000000 ) IS "04 BD 84 40"
HBTEST _enc( 268435455 ) IS "04 BF FF FF FF"
HBTEST _enc( 268435456 ) IS "05 41 B0 00 00 00 00 00 00"
HBTEST _enc( 268435456000 ) IS "05 42 4F 40 00 00 00 00 00"
HBTEST _enc( -1 ) IS "04 FF FF FF FF"
HBTEST _enc( 9007199254740990 ) IS "05 43 3F FF FF FF FF FF FE"
HBTEST _enc( amf3_Decode( amf3_Encode( 9007199254740990 ) ) ) IS "05 43 3F FF FF FF FF FF FE"
HBTEST _enc( 9007199254740991 ) IS "05 43 3F FF FF FF FF FF FF"
HBTEST _enc( amf3_Decode( amf3_Encode( 9007199254740991 ) ) ) IS "05 43 3F FF FF FF FF FF FF"
HBTEST _enc( 9007199254740991.00 ) IS "05 43 3F FF FF FF FF FF FF"
HBTEST _enc( 6969.69 ) IS "05 40 BB 39 B0 A3 D7 0A 3D"
HBTEST _enc( NIL ) IS "01"
HBTEST _enc( .T. ) IS "03"
HBTEST _enc( .F. ) IS "02"
HBTEST _enc( { 1, -1 } ) IS "09 05 01 04 01 04 FF FF FF FF"
HBTEST _enc( { "ONE" => 0xcafe, "TWO" => 0xbabe } ) IS "09 01 07 4F 4E 45 04 83 95 7E 07 54 57 4F 04 82 F5 3E 01"
RETURN
STATIC FUNCTION _enc( a )
RETURN hb_StrToHex( amf3_Encode( a ), " " )
#if 0
STATIC FUNCTION _encsum( a ) /* for longer values */
RETURN hb_NumToHex( hb_CRC( amf3_Encode( a ) ), 4 )
#endif

View File

@@ -1,46 +0,0 @@
/*
* $Id$
*/
#require "hbamf"
REQUEST HB_CODEPAGE_UTF8EX
#command TEST [<explist,...>] => _TEST( <explist> )
PROCEDURE Main()
hb_cdpSelect( "UTF8EX" )
TEST {}, "8352"
TEST "a", "F248"
TEST "ą", "96F0"
TEST 1, "AE79"
TEST 1000, "278B"
TEST 1000000, "A752"
TEST 268435455, "4907"
TEST 268435456, "E677"
TEST 268435456000, "4271"
TEST -1, "FE11"
TEST 9007199254740990, "0009"
TEST amf3_Decode( amf3_Encode( 9007199254740990 ) ), "0009"
TEST 9007199254740991, "8918"
TEST amf3_Decode( amf3_Encode( 9007199254740991 ) ), "8918"
TEST 9007199254740991.00, "8918"
TEST 6969.69, "10AF"
TEST NIL, "F1E1"
TEST .T., "E3C2"
TEST .F., "6AD3"
TEST { 1, -1 }, "0560"
TEST { "ONE" => 0xcafe, "TWO" => 0xbabe }, "CE93"
RETURN
STATIC PROCEDURE _TEST( a, cChkOK )
LOCAL x := amf3_Encode( a )
LOCAL cChk := hb_StrToHex( I2Bin( hb_CRC( x ) ) )
? PadL( hb_ValToExp( a ), 18 ), hb_StrToHex( x, " " ), "CHECKSUM", cChk, iif( ! Empty( cChkOK ) .AND. !( cChk == cChkOK ), "!TEST FAILED!, should be " + cChkOK, " " )
RETURN

View File

@@ -61,7 +61,7 @@ PROCEDURE Main()
? "Clone image"
clone := fi_Clone( im )
? "Pointer :", ValToPrg( im )
? "Pointer :", hb_ValToExp( im )
? "Image Type :", fi_GetImageType( im )
? "Color Used :", fi_GetColorsUsed( im )
@@ -90,18 +90,18 @@ PROCEDURE Main()
? "Flip Vertical ? :", fi_FlipVertical( clone )
? "Save JPG ? :", fi_Save( FIF_JPEG, clone, IMAGES_OUT + "vertical.jpg", JPEG_DEFAULT )
? "Rotate Classic :", ValToPrg( rotated := fi_RotateClassic( clone, 90 ) )
? "Rotate Classic :", hb_ValToExp( rotated := fi_RotateClassic( clone, 90 ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, rotated, IMAGES_OUT + "rotate.jpg", JPEG_DEFAULT )
centerx := fi_GetWidth( clone ) / 2
centery := fi_GetHeight( clone ) / 2
? "Rotate Ex :", ValToPrg( rotatedEx := fi_RotateEx( clone, 15, 0, 0, centerx, centery, .T. ) )
? "Rotate Ex :", hb_ValToExp( rotatedEx := fi_RotateEx( clone, 15, 0, 0, centerx, centery, .T. ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, rotatedEx, IMAGES_OUT + "rotateex.jpg", JPEG_DEFAULT )
width := fi_GetWidth( im )
height := fi_GetHeight( im )
? "Rescale :", ValToPrg( rescale := fi_Rescale( im, width / 2, height / 2, FILTER_BICUBIC ) )
? "Rescale :", hb_ValToExp( rescale := fi_Rescale( im, width / 2, height / 2, FILTER_BICUBIC ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, rescale, IMAGES_OUT + "rescale.jpg", JPEG_DEFAULT )
im2 := fi_Clone( im )
@@ -120,23 +120,23 @@ PROCEDURE Main()
? "Invert ? :", fi_Invert( im2 )
? "Save JPG ? :", fi_Save( FIF_JPEG, im2, IMAGES_OUT + "invert.jpg", JPEG_DEFAULT )
? "Red Channel :", ValToPrg( im2 := fi_GetChannel( im, FICC_RED ) )
? "Red Channel :", hb_ValToExp( im2 := fi_GetChannel( im, FICC_RED ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, im2, IMAGES_OUT + "red.jpg", JPEG_DEFAULT )
? "Green Channel :", ValToPrg( im2 := fi_GetChannel( im, FICC_GREEN ) )
? "Green Channel :", hb_ValToExp( im2 := fi_GetChannel( im, FICC_GREEN ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, im2, IMAGES_OUT + "green.jpg", JPEG_DEFAULT )
? "Blue Channel :", ValToPrg( im2 := fi_GetChannel( im, FICC_BLUE ) )
? "Blue Channel :", hb_ValToExp( im2 := fi_GetChannel( im, FICC_BLUE ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, im2, IMAGES_OUT + "blue.jpg", JPEG_DEFAULT )
? "Copy :", ValToPrg( im2 := fi_Copy( im, 300, 100, 800, 200 ) )
? "Copy :", hb_ValToExp( im2 := fi_Copy( im, 300, 100, 800, 200 ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, im2, IMAGES_OUT + "copy.jpg", JPEG_DEFAULT )
im3 := fi_Clone( im )
? "Paste ? :", fi_Paste( im3, im2, 10, 10, 70 )
? "Save JPG ? :", fi_Save( FIF_JPEG, im3, IMAGES_OUT + "paste.jpg", JPEG_DEFAULT )
? "Allocate Bitmap :", ValToPrg( im3 := fi_AllocateT( FIT_BITMAP, 320, 200, 32 ) )
? "Allocate Bitmap :", hb_ValToExp( im3 := fi_AllocateT( FIT_BITMAP, 320, 200, 32 ) )
? "Save JPG ? :", fi_Save( FIF_JPEG, im3, IMAGES_OUT + "allocate.jpg", JPEG_DEFAULT )
? "Create ERROR :"
@@ -148,27 +148,27 @@ PROCEDURE Main()
? hb_StrToHex( bkcolor )
#if 0
? ValToPrg( fi_GetInfoHeader( im ) )
? hb_ValToExp( fi_GetInfoHeader( im ) )
bmpinfoheader:Buffer( fi_GetInfoHeader( im ), .T. )
bmpinfoheader:Pointer( fi_GetInfoHeader( im ) )
? "Header :", ValToPrg( bmpinfoheader )
? "Header :", hb_ValToExp( bmpinfoheader )
? bmpinfoheader:SayMembers( " ", .T., .T. )
bmpinfo:Pointer( fi_GetInfo( im ) )
bmpinfo := NIL // To fix warning
? "Info :", ValToPrg( bmpinfo )
? "Info :", hb_ValToExp( bmpinfo )
? bmpinfo:SayMembers( " ", .T., .T. )
? "-----------------------------------------------------"
? ValType( bmpinfo:Devalue() )
TraceLog( "bmpinfoheader", ValToPrg( bmpinfoheader ), ;
hb_traceLog( "bmpinfoheader", hb_ValToExp( bmpinfoheader ), ;
infoheader:SayMembers(, .T. ), bmpinfoheader:Value(), bmpinfoheader:DeValue(), hb_DumpVar( bmpinfoheader:Array() ), hb_DumpVar( bmpinfoheader:acMembers ) )
TraceLog( "line 179" )
hb_traceLog( "line 179" )
iccprofile:Pointer( fi_GetICCProfile( im ) )
TraceLog( "line 181" )
? "Header :", ValToPrg( iccprofile )
TraceLog( "line 183" )
hb_traceLog( "line 181" )
? "Header :", hb_ValToExp( iccprofile )
hb_traceLog( "line 183" )
? iccprofile:SayMembers( " ", .T., .T. )
bmpinfoheader:Reset()
@@ -189,7 +189,7 @@ PROCEDURE Main()
? "Load JPEG from memory"
im := fi_LoadFromMemory( FIF_JPEG, cStr, JPEG_DEFAULT )
? "Pointer :", ValToPrg( im )
? "Pointer :", hb_ValToExp( im )
? "Image Type :", fi_GetImageType( im )
? "Save PNG ? :", fi_Save( FIF_PNG, im, IMAGES_OUT + "sample2.png", PNG_DEFAULT )
ENDIF
@@ -205,43 +205,11 @@ PROCEDURE Main()
RETURN
PROCEDURE fi_Error( cFormat, cMessage )
STATIC PROCEDURE fi_Error( cFormat, cMessage )
? "ERROR!.."
? "Format : ", cFormat
? "Message: ", cMessage
?
RETURN
PROCEDURE TraceLog( c )
HB_SYMBOL_UNUSED( c )
RETURN
FUNCTION ValToPrg( xValue )
LOCAL cType := ValType( xValue )
DO CASE
CASE cType == "C"
xValue := StrTran( xValue, Chr( 0 ), '" + Chr( 0 ) + "' )
xValue := StrTran( xValue, Chr( 9 ), '" + Chr( 9 ) + "' )
xValue := StrTran( xValue, Chr( 10 ), '" + Chr( 10 ) + "' )
xValue := StrTran( xValue, Chr( 13 ), '" + Chr( 13 ) + "' )
xValue := StrTran( xValue, Chr( 26 ), '" + Chr( 26 ) + "' )
RETURN '"' + xValue + '"'
CASE cType == "N" ; RETURN hb_ntos( xValue )
CASE cType == "D" ; RETURN 'hb_SToD("' + DToS( xValue ) + '")'
CASE cType == "L" ; RETURN iif( xValue, ".T.", ".F." )
CASE cType == "O" ; RETURN xValue:className() + " Object"
CASE cType == "U" ; RETURN "NIL"
CASE cType == "B" ; RETURN '{||...}'
CASE cType == "A" ; RETURN '{.[' + hb_ntos( Len( xValue ) ) + '].}'
CASE cType == "M" ; RETURN 'M:"' + xValue + '"'
ENDCASE
RETURN ""

View File

@@ -224,13 +224,13 @@ STATIC FUNCTION FCM_GOTO( nWA, nRecord )
aWData[ 2 ] := aWData[ 3 ] := .T.
ELSEIF nRecord == 1
hb_FGoTop()
aWData[ 2 ] := aWData[ 3 ] := hb_FEof()
aWData[ 2 ] := aWData[ 3 ] := hb_FAtEof()
ELSE
hb_FSkip( 0 ) /* Clear the EOF flag inside hb_F* engin
- it's not done automatically in hb_FGoBottom() :-( */
hb_FGoto( nRecord )
aWData[ 2 ] := hb_FRecNo() == 0
aWData[ 3 ] := hb_FEof()
aWData[ 3 ] := hb_FAtEof()
ENDIF
RETURN HB_SUCCESS
@@ -244,7 +244,7 @@ STATIC FUNCTION FCM_GOTOP( nWA )
hb_FSelect( aWData[ 1 ] )
hb_FGoTop()
aWData[ 2 ] := aWData[ 3 ] := hb_FEof()
aWData[ 2 ] := aWData[ 3 ] := hb_FAtEof()
RETURN HB_SUCCESS
@@ -281,11 +281,11 @@ STATIC FUNCTION FCM_SKIPRAW( nWA, nRecords )
IF nRecords < 0 .AND. hb_FRecNo() <= -nRecords
hb_FGoTop()
aWData[ 2 ] := .T.
aWData[ 3 ] := hb_FEof()
aWData[ 3 ] := hb_FAtEof()
ELSEIF nRecords != 0
hb_FSkip( nRecords )
aWData[ 2 ] := .F.
aWData[ 3 ] := hb_FEof()
aWData[ 3 ] := hb_FAtEof()
ENDIF
ENDIF

View File

@@ -83,18 +83,9 @@ HB_FUNC( HB_FUSE )
{
PFT_TEXT ft_text = ( PFT_TEXT ) hb_stackGetTSD( &s_fttext );
PHB_ITEM arg1_it = hb_param( 1, HB_IT_STRING );
PHB_ITEM arg2_it = hb_param( 2, HB_IT_NUMERIC );
int open_flags;
if( arg1_it )
if( HB_ISCHAR( 1 ) )
{
if( arg2_it )
open_flags = hb_parni( 2 );
else
open_flags = 0;
ft_text->handles[ ft_text->area ] = hb_fsOpen( hb_parc( 1 ), ( HB_USHORT ) open_flags );
ft_text->handles[ ft_text->area ] = hb_fsOpen( hb_parc( 1 ), ( HB_USHORT ) hb_parnidef( 2, FO_READ ) );
ft_text->offset[ ft_text->area ] = 0;
ft_text->recno[ ft_text->area ] = 1;
ft_text->lastbyte[ ft_text->area ] = hb_fsSeekLarge( ft_text->handles[ ft_text->area ], 0, FS_END );
@@ -115,7 +106,6 @@ HB_FUNC( HB_FUSE )
}
}
HB_FUNC( HB_FRECNO )
{
PFT_TEXT ft_text = ( PFT_TEXT ) hb_stackGetTSD( &s_fttext );
@@ -123,7 +113,6 @@ HB_FUNC( HB_FRECNO )
hb_retnl( ft_text->recno[ ft_text->area ] );
}
static long hb_hbfskip( PFT_TEXT ft_text, char * buffer, HB_SIZE bufsize, int recs )
{
HB_FOFFSET read_pos;
@@ -242,13 +231,17 @@ HB_FUNC( HB_FREADLN )
hb_xfree( buffer );
}
HB_FUNC( HB_FEOF )
HB_FUNC( HB_FATEOF )
{
PFT_TEXT ft_text = ( PFT_TEXT ) hb_stackGetTSD( &s_fttext );
hb_retl( ft_text->isEof[ ft_text->area ] );
}
#if defined( HB_LEGACY_LEVEL4 )
HB_FUNC_TRANSLATE( HB_FEOF, HB_FATEOF )
#endif
HB_FUNC( HB_FGOTO )
{
PFT_TEXT ft_text = ( PFT_TEXT ) hb_stackGetTSD( &s_fttext );
@@ -365,10 +358,15 @@ HB_FUNC( HB_FSELECT )
hb_retni( ft_text->area + 1 );
if( HB_ISNUM( 1 ) )
ft_text->area = hb_parni( 1 ) - 1;
{
int area = hb_parni( 1 );
if( area >= 1 && area <= TEXT_WORKAREAS )
ft_text->area = area - 1;
}
}
HB_FUNC( HB_FINFO ) /* used for debugging */
HB_FUNC( HB_FINFO ) /* used for debugging */
{
PFT_TEXT ft_text = ( PFT_TEXT ) hb_stackGetTSD( &s_fttext );
@@ -378,7 +376,7 @@ HB_FUNC( HB_FINFO ) /* used for debugging */
hb_storvni( ft_text->recno[ ft_text->area ], -1, 3 );
hb_storvnint( ft_text->offset[ ft_text->area ], -1, 4 );
hb_storvnint( ft_text->lastbyte[ ft_text->area ], -1, 5 );
hb_storvl( ft_text->isEof[ ft_text->area ], -1, 6 );
hb_storvl( ft_text->isEof[ ft_text->area ], -1, 6 );
}
/* ------------------------------------------------

View File

@@ -96,7 +96,8 @@ DYNAMIC FileFindSize
DYNAMIC FileFindTime
DYNAMIC hbmisc_DaysInMonth
DYNAMIC hb_DynaCall1
DYNAMIC hb_FEof
DYNAMIC hb_FAtEof
DYNAMIC HB_FEof
DYNAMIC hb_FGoBottom
DYNAMIC hb_FGoto
DYNAMIC hb_FGoTop

View File

@@ -2,29 +2,16 @@
* $Id$
*/
/*
test program for hb_f*()
harbour clones for nanfor's ft_f*()
inplementation of :
* hb_FUse()
* hb_FSkip()
* hb_FEof()
* hb_FRecNo()
* hb_FReadLn()
* hb_FLastRec()
* hb_FGoto()
* hb_FGoTop()
* hb_FGoBottom()
*/
#require "hbmisc"
#include "fileio.ch"
PROCEDURE Main()
// open a text file here
IF hb_FUse( __FILE__, 0 ) > 1
IF hb_FUse( __FILE__, FO_READ ) > 1
DO WHILE ! hb_FEof()
DO WHILE ! hb_FAtEof()
? "line " + Str( hb_FRecNo(), 2 ) + " " + hb_FReadLn()
hb_FSkip( 1 )
ENDDO
@@ -53,7 +40,7 @@ STATIC PROCEDURE my_goto( n_go )
hb_FGoto( n_go )
?
? "after hb_FGoto(" + hb_ntos( n_go ) + ")"
? "after hb_FGoto( " + hb_ntos( n_go ) + " )"
? "line " + hb_ntos( hb_FRecNo() ) + " is " + LTrim( hb_FReadLn() )
RETURN

View File

@@ -4,6 +4,8 @@
#require "hbmisc"
#include "inkey.ch"
REQUEST HB_CODEPAGE_UTF8EX
PROCEDURE Main()
@@ -36,7 +38,7 @@ PROCEDURE Test( cLang )
? nTemp
ENDIF
IF nTemp % 10000 == 0
IF Inkey() == 27
IF Inkey() == K_ESC
EXIT
ENDIF
ENDIF

View File

@@ -84,7 +84,7 @@ METHOD write( csource ) CLASS TRtf
{ "-u" , "\ulnone " } } /* turn underline off */
hb_FUse( csource ) // open source file
WHILE ! hb_FEof() // read the file line by line
WHILE ! hb_FAtEof() // read the file line by line
cline := hb_FReadLn() + "\par"
y := Len( cline )
FOR nchar := 1 TO y

View File

@@ -2,7 +2,7 @@
* $Id$
*/
// Test program for new libmisc twirler class
// Test program for new hbmisc twirler class
/* Harbour Project source code
http://harbour-project.org/
Donated to the public domain on 2001-03-15 by David G. Holm <dholm@jsd-llc.com>

View File

@@ -51,7 +51,7 @@ PROCEDURE Main( cFileArg )
*/
IF Empty( cFileArg )
OutErr( "Usage: textmxml filename.xml" + hb_eol() )
OutErr( hb_StrFormat( "Usage: %1$s filename.xml", hb_ProgName() ) + hb_eol() )
ErrorLevel( 1 )
QUIT
ENDIF

View File

@@ -216,7 +216,7 @@ HB_FUNC( FT_FUSE )
int attr = hb_parnidef( 2, FO_READWRITE | FO_DENYNONE );
ft_text->handles[ ft_text->area ] = hb_fsOpen( hb_parc( 1 ), ( HB_USHORT ) attr );
if( ft_text->handles[ ft_text->area ] <= 0 )
if( ft_text->handles[ ft_text->area ] == FS_ERROR )
ft_text->error[ ft_text->area ] = hb_fsError();
ft_text->offset[ ft_text->area ] = 0;
ft_text->recno[ ft_text->area ] = 1;
@@ -442,7 +442,7 @@ static long _ft_skip( long iRecs )
/* read a chunk */
iBytesRead =
hb_fsRead( ft_text->handles[ ft_text->area ], cBuff, BUFFSIZE );
hb_fsRead( ft_text->handles[ ft_text->area ], cBuff, BUFFSIZE );
if( ! iBytesRead )
{

View File

@@ -4,10 +4,12 @@
#require "hbnf"
#include "fileio.ch"
PROCEDURE Main()
// open a text file here
IF ft_FUse( __FILE__, 0 ) > 1
IF ft_FUse( __FILE__, FO_READ ) > 1
DO WHILE ! ft_FEof()
? "line " + Str( ft_FRecNo(), 2 ) + " " + ft_FReadLn()
@@ -38,7 +40,7 @@ STATIC PROCEDURE my_goto( n_go )
ft_FGoto( n_go )
?
? "after ft_FGoto(" + hb_ntos( n_go ) + ")"
? "after ft_FGoto( " + hb_ntos( n_go ) + " )"
? "line " + hb_ntos( ft_FRecNo() ) + " is " + LTrim( ft_FReadLn() )
RETURN

View File

@@ -7,9 +7,6 @@
* MIME type test
*
* This test tries to detect the mime type of a give file.
*
* Usage:
* tipmime filename
******************************************/
#require "hbtip"
@@ -18,7 +15,7 @@ PROCEDURE Main( cFileName )
IF Empty( cFileName )
?
? "Usage: mimetest <file to test>"
? hb_StrFormat( "Usage: %1$s <file to test>", hb_ProgName() )
?
QUIT
ENDIF

View File

@@ -7,8 +7,6 @@
*
* Usage: This file is similar to a wget command
*
* tiptest <URI> [filename]
*
* Without the filename, tiptest will be in demo mode,
* just demostrating it is working
*
@@ -61,7 +59,7 @@ PROCEDURE Main( cUrl, cFile )
@ 1, 6 SAY "X H A R B O U R - TIP (class based internet client protocol) test"
IF Empty( cUrl )
@ 4, 5 SAY "USAGE: tipTest <URI> [dumpToOrFromFileName]"
@ 4, 5 SAY hb_StrFormat( "USAGE: %1$s <URI> [dumpToOrFromFileName]", hb_ProgName() )
Terminate()
ENDIF

View File

@@ -57,11 +57,11 @@
*/
/*
instructions - hook up a loopback device to "com1" of your computer
run this program. It should echo Hi there bob.
If it gives you a file i/o error, try running as root.
also make sure that other programs (minicom?) can successfully talk to your
com port.
instructions - hook up a loopback device to "com1" of your computer
run this program. It should echo Hi there bob.
If it gives you a file i/o error, try running as root.
also make sure that other programs (minicom?) can successfully talk to your
com port.
*/
#require "hbtpathy"

View File

@@ -18,7 +18,7 @@ PROCEDURE Main()
LOCAL cLogFile, cLogText
cLogFile := hb_ps() + CurDir() + hb_ps() + "testdmn.txt"
cLogFile := hb_ps() + CurDir() + hb_ps() + hb_FNameExtSet( __FILE__, ".txt" )
? hb_StrFormat( "Parent(%d) launching child... ", posix_getpid() )

View File

@@ -110,7 +110,7 @@ PROCEDURE Main( cMode )
PROCEDURE SrvMain( cParam1, cParam2 )
LOCAL n := 0
LOCAL fhnd := hb_FCreate( hb_DirBase() + "testsvc.out", FC_NORMAL, FO_DENYNONE + FO_WRITE )
LOCAL fhnd := hb_FCreate( hb_FNameExtSet( hb_ProgName(), ".out" ), FC_NORMAL, FO_DENYNONE + FO_WRITE )
LOCAL cParam
hb_default( @cParam1, "" )

View File

@@ -9,7 +9,7 @@ PROCEDURE Main()
LOCAL hCairo, hSurface
hSurface := cairo_pdf_surface_create( "testcair.pdf", 567, 794 ) // A4
hSurface := cairo_pdf_surface_create( hb_FNameExtSet( __FILE__, ".pdf" ), 567, 794 ) // A4
hCairo := cairo_create( hSurface )
cairo_set_source_rgb( hCairo, 1.0, 1.0, 1.0 )
@@ -44,7 +44,7 @@ PROCEDURE Main()
DrawBarcode( hCairo, 540, 1, "DATAMATRIX", "Hello, World of Harbour!!! It's 2D barcode DataMatrix :)" )
DrawBarcode( hCairo, 580, 1, "QRCODE", "http://harbour-project.org/" )
cairo_destroy( hCairo )
cairo_surface_write_to_png( hSurface, "testcair.png" )
cairo_surface_write_to_png( hSurface, hb_FNameExtSet( __FILE__, ".png" ) )
cairo_surface_destroy( hSurface )
RETURN

View File

@@ -49,8 +49,8 @@ PROCEDURE Main()
DrawBarcode( page, 540, 1, "DATAMATRIX", "Hello, World of Harbour!!! It's 2D barcode DataMatrix :)" )
DrawBarcode( page, 580, 1, "QRCODE", "http://harbour-project.org/" )
FErase( "testhpdf.pdf" )
? HPDF_SaveToFile( pdf, "testhpdf.pdf" )
FErase( hb_FNameExtSet( __FILE__, ".pdf" ) )
? HPDF_SaveToFile( pdf, hb_FNameExtSet( __FILE__, ".pdf" ) )
RETURN

View File

@@ -2,9 +2,7 @@
* $Id$
*/
/*
Demo of ADS Connection handling and Data Dictionaries
*/
/* Demo of ADS Connection handling and Data Dictionaries */
#require "rddads"

View File

@@ -3,7 +3,7 @@
*/
/*
* Copyright 2000 Alejandro de Garate <alex_degarate@hotmail.com>
* Copyright 2000 Alejandro de Garate <alex_degarate hotmail com>
*
* Test mouse for Harbour
*/

View File

@@ -45,7 +45,7 @@
* - gcc and *nix configuration elements
* - bash script with similar purpose for gcc family
* - entry point override method and detection code for gcc
* - rtlink/blinker link script parsers
* - RTLink/Blinker/ExoSpace link script parsers
* - original POTMerge(), LoadPOTFilesAsHash(), GenHBL() and AutoTrans()
* - optimized header time scan algorithm
* - shell core runner logic
@@ -1357,6 +1357,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
LOCAL cOpt_Sign
LOCAL cOpt_SignID
LOCAL cOpt_SignPass
LOCAL aParamPROGNAME
LOCAL cCommand
LOCAL aCommand
@@ -2385,7 +2386,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
cParam := hb_FNameExtSet( cParam, ".hbm" )
ENDIF
IF !( Lower( hb_FNameExt( cParam ) ) == ".hbm" ) .AND. lAcceptLDClipper
rtlnk_process( hbmk, MemoRead( hb_DirSepToOS( cParam ) ), @hbmk[ _HBMK_cPROGNAME ], @hbmk[ _HBMK_aOBJUSER ], @hbmk[ _HBMK_aLIBUSER ] )
rtlnk_process( hbmk, MemoRead( hb_DirSepToOS( cParam ) ), @hbmk[ _HBMK_cPROGNAME ], @hbmk[ _HBMK_aOBJUSER ], @hbmk[ _HBMK_aLIBUSER ], @hbmk[ _HBMK_aLIBPATH ] )
IF ! Empty( hbmk[ _HBMK_aOBJUSER ] )
hb_default( @hbmk[ _HBMK_cFIRST ], hbmk[ _HBMK_aOBJUSER ][ 1 ] )
ENDIF
@@ -2901,12 +2902,6 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
IF ! Empty( tmp )
tmp := hb_DirSepToOS( tmp )
hb_FNameSplit( tmp, @cDir, @cName, @cExt )
tmp1 := hbmk_TARGETTYPE( hbmk )
IF ( Lower( cExt ) == ".exe" .AND. tmp1 == "hbexe" ) .OR. ;
( Lower( cExt ) == ".dll" .AND. HBMK_IS_IN( tmp1, "hbdyn|hbdynvm" ) ) .OR. ;
( HBMK_IS_IN( Lower( cExt ), ".lib|.a" ) .AND. HBMK_IS_IN( tmp1, "hblib|hbimplib" ) )
_hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Non-portable option value: %1$s. Delete '%2$s' extension." ), ParamToString( aParam ), cExt ) )
ENDIF
DO CASE
CASE Empty( cDir )
tmp := hb_PathNormalize( PathMakeAbsolute( tmp, aParam[ _PAR_cFileName ] ) )
@@ -2915,16 +2910,19 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
hbmk[ _HBMK_cPROGDIR ] := cDir
ENDIF
hbmk[ _HBMK_cPROGNAME ] := hb_FNameNameExt( tmp )
aParamPROGNAME := AClone( aParam )
CASE ! Empty( cDir ) .AND. Empty( cName ) .AND. Empty( cExt )
hbmk[ _HBMK_cPROGDIR ] := hb_PathNormalize( PathMakeAbsolute( cDir, aParam[ _PAR_cFileName ] ) )
OTHERWISE /* ! Empty( cDir ) .AND. !( Empty( cName ) .AND. Empty( cExt ) ) */
hbmk[ _HBMK_cPROGDIR ] := hb_PathNormalize( PathMakeAbsolute( cDir, aParam[ _PAR_cFileName ] ) )
hbmk[ _HBMK_cPROGNAME ] := hb_FNameNameExt( tmp )
aParamPROGNAME := AClone( aParam )
ENDCASE
ENDIF
ELSE
hbmk[ _HBMK_cPROGDIR ] := NIL
hbmk[ _HBMK_cPROGNAME ] := NIL
aParamPROGNAME := NIL
ENDIF
ENDIF
@@ -3653,6 +3651,16 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
ENDIF
ENDIF
IF hbmk[ _HBMK_cPROGNAME ] != NIL
cExt := hb_FNameExt( hbmk[ _HBMK_cPROGNAME ] )
tmp1 := hbmk_TARGETTYPE( hbmk )
IF ( Lower( cExt ) == ".exe" .AND. tmp1 == "hbexe" ) .OR. ;
( Lower( cExt ) == ".dll" .AND. HBMK_IS_IN( tmp1, "hbdyn|hbdynvm" ) ) .OR. ;
( HBMK_IS_IN( Lower( cExt ), ".lib|.a" ) .AND. HBMK_IS_IN( tmp1, "hblib|hbimplib" ) )
_hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Non-portable output filename: %1$s. Delete '%2$s' extension." ), iif( aParamPROGNAME != NIL, ParamToString( aParamPROGNAME ), hbmk[ _HBMK_cPROGNAME ] ), cExt ) )
ENDIF
ENDIF
/* Decide about output name */
IF ! hbmk[ _HBMK_lStopAfterInit ] .AND. ! hbmk[ _HBMK_lCreateImpLib ]
@@ -9390,24 +9398,17 @@ FUNCTION hbmk_FNameEscape( ctx, cFileName )
LOCAL hbmk := ctx_to_hbmk( ctx )
LOCAL nEscapeMode := hbmk[ _HBMK_nCmd_Esc ]
LOCAL nFNNotation := hbmk[ _HBMK_nCmd_FNF ]
IF hbmk == NIL
#ifdef HB_LEGACY_LEVEL4
IF hbmk == NIL .AND. HB_ISSTRING( ctx ) .AND. PCount() == 3 /* legacy calling mode */
IF HB_ISSTRING( hb_AParams()[ 1 ] ) .AND. ;
HB_ISNUMERIC( hb_AParams()[ 2 ] ) .AND. ;
HB_ISNUMERIC( hb_AParams()[ 3 ] )
cFileName := hb_AParams()[ 1 ]
nEscapeMode := hb_AParams()[ 2 ]
nFNNotation := hb_AParams()[ 3 ]
/* legacy calling mode */
IF HB_ISSTRING( ctx )
RETURN FNameEscape( ctx, cFileName, iif( PCount() >= 3, hb_AParams()[ 3 ], NIL ) )
ENDIF
ENDIF
#endif
RETURN NIL
ENDIF
RETURN FNameEscape( cFileName, nEscapeMode, nFNNotation )
RETURN FNameEscape( cFileName, hbmk[ _HBMK_nCmd_Esc ], hbmk[ _HBMK_nCmd_FNF ] )
FUNCTION hbmk_OutStdRaw( ctx, ... )
@@ -9429,26 +9430,6 @@ FUNCTION hbmk_OutErrRaw( ctx, ... )
RETURN ( OutErr( ... ), OutErr( _OUT_EOL ) )
FUNCTION hbmk_PathFromWorkdirToCWD( ctx )
LOCAL hbmk := ctx_to_hbmk( ctx )
IF hbmk != NIL
RETURN hb_DirSepAdd( hb_PathRelativize( hb_PathNormalize( PathMakeAbsolute( hbmk[ _HBMK_cWorkDir ], hb_cwd() ) ), hb_cwd(), .T. ) )
ENDIF
RETURN ""
FUNCTION hbmk_Macro( ctx, cString )
LOCAL hbmk := ctx_to_hbmk( ctx )
IF hbmk != NIL .AND. HB_ISSTRING( cString )
RETURN MacroProc( hbmk, cString )
ENDIF
RETURN ""
FUNCTION hbmk_OutStd( ctx, cText )
LOCAL hbmk := ctx_to_hbmk( ctx )
@@ -9469,6 +9450,26 @@ FUNCTION hbmk_OutErr( ctx, cText )
RETURN NIL
FUNCTION hbmk_PathFromWorkdirToCWD( ctx )
LOCAL hbmk := ctx_to_hbmk( ctx )
IF hbmk != NIL .AND. HB_ISSTRING( hbmk[ _HBMK_cWorkDir ] )
RETURN hb_DirSepAdd( hb_PathRelativize( hb_PathNormalize( PathMakeAbsolute( hbmk[ _HBMK_cWorkDir ], hb_cwd() ) ), hb_cwd(), .T. ) )
ENDIF
RETURN ""
FUNCTION hbmk_Macro( ctx, cString )
LOCAL hbmk := ctx_to_hbmk( ctx )
IF hbmk != NIL .AND. HB_ISSTRING( cString )
RETURN MacroProc( hbmk, cString )
ENDIF
RETURN ""
FUNCTION hbmk_PathSepToTarget( ctx, cFileName )
LOCAL hbmk := ctx_to_hbmk( ctx )
@@ -10209,6 +10210,14 @@ STATIC FUNCTION FNameDirExtSet( cFileName, cDirNew, cExtNew )
RETURN hb_FNameMerge( cDir, cName, cExt )
STATIC FUNCTION FNameDirName( cFileName )
LOCAL cDir, cName
hb_FNameSplit( cFileName, @cDir, @cName )
RETURN hb_FNameMerge( cDir, cName )
STATIC FUNCTION FN_Expand( cFileName, lCommandLine )
LOCAL aFileList
@@ -11891,7 +11900,7 @@ STATIC FUNCTION rtlnk_read( cFileName, aPrevFiles )
ENDIF
cFileName := hb_FNameMerge( cPath, cFile, ".lnk" )
/* it is blinker extension, look for .lnk file in paths
/* it is Blinker extension, look for .lnk file in paths
* specified by LIB envvar
*/
IF ! hb_FileExists( cFileName ) .AND. ;
@@ -11935,8 +11944,8 @@ STATIC FUNCTION rtlnk_tokens( cLine )
RETURN hb_ATokens( StrTran( cLine, ",", " , " ) )
STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, aLibList, ;
aPrevFiles )
STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, ;
aLibList, aLibPath, aPrevFiles )
LOCAL cLine, cWord
LOCAL nMode
@@ -11954,7 +11963,10 @@ STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, aLibList, ;
IF LEFTEQUAL( cWord, "#" )
EXIT
ELSEIF nMode == RTLNK_MODE_OUT
cFileOut := cWord
cFileOut := hb_DirSepToOS( cWord )
IF Lower( hb_FNameExt( cFileOut ) ) == ".exe"
cFileOut := FNameDirName( cFileOut )
ENDIF
nMode := RTLNK_MODE_FILENEXT
ELSEIF nMode == RTLNK_MODE_FILE
IF !( cWord == "," )
@@ -11965,7 +11977,10 @@ STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, aLibList, ;
ENDIF
ELSEIF nMode == RTLNK_MODE_LIB
IF !( cWord == "," )
AAdd( aLibList, hb_DirSepToOS( cWord ) )
AAdd( aLibList, hb_FNameName( hb_DirSepToOS( cWord ) ) )
IF ! Empty( hb_FNameDir( hb_DirSepToOS( cWord ) ) )
AAddNew( aLibPath, hb_FNameDir( hb_DirSepToOS( cWord ) ) )
ENDIF
nMode := RTLNK_MODE_LIBNEXT
ENDIF
ELSEIF nMode == RTLNK_MODE_SKIP
@@ -11987,7 +12002,7 @@ STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, aLibList, ;
_hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Cannot open file: %1$s" ), cWord ) )
RETURN .F.
ENDIF
IF ! rtlnk_process( hbmk, cCommands, @cFileOut, @aFileList, @aLibList, aPrevFiles )
IF ! rtlnk_process( hbmk, cCommands, @cFileOut, @aFileList, @aLibList, @aLibPath, aPrevFiles )
RETURN .F.
ENDIF
ELSE
@@ -12004,9 +12019,9 @@ STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, aLibList, ;
LEFTEQUAL( "REFER", cWord ) .OR. ;
LEFTEQUAL( "INTO", cWord )
nMode := RTLNK_MODE_SKIP
/* blinker extension */
/* Blinker extension */
ELSEIF LEFTEQUAL( "BLINKER", cWord )
/* skip blinker commands */
/* skip Blinker commands */
EXIT
ELSEIF LEFTEQUAL( "ECHO", cWord )
_hbmk_OutStd( hbmk, hb_StrFormat( I_( "Blinker ECHO: %1$s" ), SubStr( cLine, 6 ) ) )
@@ -12017,7 +12032,7 @@ STATIC FUNCTION rtlnk_process( hbmk, cCommands, cFileOut, aFileList, aLibList, ;
ELSEIF LEFTEQUAL( "NOBELL", cWord )
hbmk[ _HBMK_lBEEP ] := .F.
EXIT
ELSE /* TODO: add other blinker commands */
ELSE /* TODO: add other Blinker commands */
ENDIF
ENDIF
ENDIF
@@ -16006,8 +16021,8 @@ STATIC PROCEDURE ShowHelp( hbmk, lFull, lLong )
LOCAL aLst_ExampleLib := { ;
NIL, ;
{ I_( "To build library 'mylib' from sources" ) , hb_StrFormat( I_( "%1$s mylibsrc.prg -omylib -hblib" ), _SELF_NAME_ ) }, ;
{ I_( "To build library 'mylib' from sources using incremental mode" ) , hb_StrFormat( I_( "%1$s mylibsrc.prg -omylib -hblib -inc" ), _SELF_NAME_ ) } }
{ I_( "To build library 'mylib' from sources" ) , hb_StrFormat( I_( "%1$s -hblib mylibsrc.prg -omylib" ), _SELF_NAME_ ) }, ;
{ I_( "To build library 'mylib' from sources using incremental mode" ) , hb_StrFormat( I_( "%1$s -hblib mylibsrc.prg -omylib -inc" ), _SELF_NAME_ ) } }
// ;

View File

@@ -38,14 +38,14 @@ PROCEDURE Main()
@ MaxRow() - 1, 2 SAY "Y:"
@ MaxRow() - 1, 10 SAY "X:"
@ nR, 2 SAY "Mouse Type : "
@ nR, 2 SAY "Mouse Type :"
@ nR, 18 SAY "Mouse System"
@ MaxRow() - 2, 68 TO MaxRow(), MaxCol() DOUBLE
@ MaxRow() - 1, 70 SAY "Exit"
@ 10, 2 SAY " -- Checkings -- "
@ 10, 2 SAY " -- Checkings --"
@ 11, 2 SAY "Window Boundaries :"
@ 12, 2 SAY "Press/Release But.:"
@ 13, 2 SAY "Double Click Left :"
@@ -55,7 +55,7 @@ PROCEDURE Main()
TEST2( nR, nC )
@ 24, 0 SAY ""
SetPos( MaxRow(), 0 )
SET CURSOR ON
?
@@ -112,7 +112,6 @@ PROCEDURE TEST1()
ENDIF
ENDDO
@ MaxRow() - 3, 25 SAY "Move the cursor until the LEFT side "
DO WHILE ( nKey := Inkey( 0, INKEY_ALL ) ) != K_TAB
@@ -125,7 +124,6 @@ PROCEDURE TEST1()
ENDIF
ENDDO
@ MaxRow() - 3, 25 SAY "Move the cursor until the RIGHT side "
DO WHILE ( nKey := Inkey( 0, INKEY_ALL ) ) != K_TAB
@@ -149,17 +147,18 @@ PROCEDURE TEST2( nR, nC )
LOCAL cSkip := "", nKey, nPress := 0
@ nR + 0, nC SAY "+---------|---------+"
@ nR + 1, nC SAY "| +===+ +===+ +===+ |"
@ nR + 2, nC SAY "| | | | | | | |"
@ nR + 3, nC SAY "| | | | | | | |"
@ nR + 4, nC SAY "| +===+ +===+ +===+ |"
@ nR + 6, nC SAY "| Up Up Up |"
@ nR + 7, nC SAY "| |"
@ nR + 8, nC SAY "| |"
@ nR + 9, nC SAY "| Harbour |"
@ nR + 10, nC SAY "| mouse |"
@ nR + 11, nC SAY "+-------------------+"
@ nR + 0, nC SAY "+---------|---------+"
@ nR + 1, nC SAY "| +===+ +===+ +===+ |"
@ nR + 2, nC SAY "| | | | | | | |"
@ nR + 3, nC SAY "| | | | | | | |"
@ nR + 4, nC SAY "| +===+ +===+ +===+ |"
@ nR + 5, nC SAY "| |"
@ nR + 6, nC SAY "| Up Up Up |"
@ nR + 7, nC SAY "| |"
@ nR + 8, nC SAY "| |"
@ nR + 9, nC SAY "| Harbour |"
@ nR + 10, nC SAY "| mouse |"
@ nR + 11, nC SAY "+-------------------+"
Set( _SET_EVENTMASK, INKEY_ALL )
@@ -232,7 +231,7 @@ PROCEDURE TEST2( nR, nC )
@ 14, 22 SAY "Pass"
OTHERWISE
@ MaxRow(), 20 SAY "A keyboard key was pressed: "
@ MaxRow(), 20 SAY "A keyboard key was pressed:"
@ MaxRow(), 48 SAY nKey
#ifdef __HARBOUR__
@ MaxRow(), 58 SAY hb_keyChar( nKey )

View File

@@ -87,8 +87,7 @@ METHOD SetTitle( cTitle ) CLASS THTML
METHOD AddLink( cLinkTo, cLinkName ) CLASS THTML
::cBody := ::cBody + ;
"<a href='" + cLinkTo + "'>" + cLinkName + "</a>"
::cBody += "<a href='" + cLinkTo + "'>" + cLinkName + "</a>"
RETURN Self
@@ -98,16 +97,15 @@ METHOD AddHead( cDescr ) CLASS THTML
// ::cBody += ...
// ???
::cBody := ::cBody + ;
"<h1>" + cDescr + "</h1>"
::cBody += "<h1>" + cDescr + "</h1>"
RETURN NIL
METHOD AddPara( cPara, cAlign ) CLASS THTML
cAlign := iif( cAlign == NIL, "Left", cAlign ) // Added Patrick Mast 2000-06-17
hb_default( @cAlign, "Left" )
::cBody := ::cBody + ;
::cBody += ;
"<p align='" + cAlign + "'>" + hb_eol() + ;
cPara + hb_eol() + ;
"</p>"
@@ -116,7 +114,7 @@ METHOD AddPara( cPara, cAlign ) CLASS THTML
METHOD Generate() CLASS THTML
::cContent := ;
::cContent := ;
"<html><head>" + hb_eol() + ;
"<title>" + ::cTitle + "</title>" + hb_eol() + ;
"<body link='" + ::cLinkColor + "' " + ;
@@ -128,7 +126,7 @@ METHOD Generate() CLASS THTML
METHOD ShowResult() CLASS THTML
OutStd( ;
OutStd( ;
;// "HTTP/1.0 200 OK" + hb_eol() + ;
"CONTENT-TYPE: TEXT/HTML" + hb_eol() + hb_eol() + ;
::cContent )

View File

@@ -69,19 +69,19 @@ PROCEDURE Main()
FUNCTION TValue
STATIC oClass
STATIC s_oClass
IF oClass == NIL
oClass := HBClass():New( "TValue" )
IF s_oClass == NIL
s_oClass := HBClass():New( "TValue" )
oClass:AddData( "cVal" )
oClass:AddMethod( "New", @New() ) // New Method
s_oClass:AddData( "cVal" )
s_oClass:AddMethod( "New", @New() ) // New() Method
oClass:Create()
s_oClass:Create()
ENDIF
RETURN oClass:Instance()
RETURN s_oClass:Instance()
STATIC FUNCTION New()