Files
harbour-core/harbour/contrib/hbxdiff/tests/test3.prg
Viktor Szakats b2bacdfcef 2011-01-12 01:23 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbsqlit3/hbsqlit3.c
    + Enabled function pointers. It's even easier I thought since 
      the block calling method also supports function pointers 
      automatically.

  * contrib/hbxdiff/hbxdiff.c
    % Deleted separate (original) function symbol support, and 
      enabled it on the codeblock branch. Now it supports both 
      without redundant code.

  * contrib/hbxdiff/tests/test3.prg
    + Added back function pointer example.
2011-01-12 00:24:15 +00:00

37 lines
657 B
Plaintext

/*
* $Id$
*/
#include "hbxdiff.ch"
#include "fileio.ch"
#include "simpleio.ch"
FUNCTION Diff( ... )
LOCAL e
FOR EACH e IN { ... }
OutStd( e )
NEXT
RETURN 0
PROCEDURE main()
LOCAL pMMFOld, pMMFNew
LOCAL cFileCtx
pMMFOld := xdl_init_mmfile( XDLT_STD_BLKSIZE )
pMMFNew := xdl_init_mmfile( XDLT_STD_BLKSIZE, XDL_MMF_ATOMIC )
cFileCtx := hb_memoRead( __FILE__ )
xdl_write_mmfile( pMMFOld, @cFileCtx )
xdl_write_mmfile( pMMFNew, cFileCtx + hb_eol() + Space( 3 ) + "RETURN NIL" + hb_eol() )
xdl_diff( pMMFOld, pMMFNew, 0, 3, {| ... | Diff( ... ) } )
xdl_diff( pMMFOld, pMMFNew, 0, 3, @Diff() )
RETURN