Files
harbour-core/harbour/contrib/hbxdiff/tests/test.prg
Viktor Szakats 7d515dd89b 2011-01-11 19:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbxdiff/hbxdiff.c
    + Added support for codeblocks as callbacks.
    ; I'm not sure if we should keep symbol callbacks, looks
      like inferior alternative and codeblocks are the preferred
      choice in 98% (well all except this, and recently added 
      hbsqlit3 extension and hbmxml) of Harbour wrappers addons.

  * contrib/hbxdiff/tests/test.prg
  * contrib/hbxdiff/tests/test2.prg
  * contrib/hbxdiff/tests/test3.prg
    * Changed to use codeblock in callback example.
    * Formatting.
2011-01-11 18:15:27 +00:00

41 lines
720 B
Plaintext

/*
* $Id$
*/
#include "hbxdiff.ch"
#include "simpleio.ch"
#define _SIZE 62
PROCEDURE main()
LOCAL pMMF
LOCAL cFileCtx
LOCAL nSize
pMMF := xdl_init_mmfile( XDLT_STD_BLKSIZE, XDL_MMF_ATOMIC )
? xdl_mmfile_size( pMMF )
? xdl_mmfile_iscompact( pMMF )
cFileCtx := hb_memoRead( __FILE__ )
? xdl_write_mmfile( pMMF, cFileCtx ), Len( cFileCtx )
? xdl_mmfile_size( pMMF )
? xdl_read_mmfile( pMMF, NIL, _SIZE, @nSize )
? nSize
xdl_seek_mmfile( pMMF, 0 )
? xdl_read_mmfile( pMMF, NIL, _SIZE, @nSize )
? nSize
? xdl_read_mmfile( pMMF, NIL, _SIZE, @nSize )
? nSize
xdl_seek_mmfile( pMMF, _SIZE )
? xdl_read_mmfile( pMMF, NIL, _SIZE, @nSize )
? nSize
RETURN