Files
harbour-core/harbour/contrib/examples/pe/pe.prg
Viktor Szakats 6e47dd35f5 2007-11-10 18:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* Makefile
   - samples
   + contrib/examples
   * contrib/Makefile
   * contrib/examples/Makefile
   * contrib/examples/guestbk/inifiles.prg
   * contrib/examples/guestbk/testcgi.prg
   * contrib/examples/guestbk/bld_b32.bat
   * contrib/examples/guestbk/Makefile
   * contrib/examples/pe/pe.prg
   * contrib/examples/pe/Makefile
   * contrib/examples/misc/Makefile
   * contrib/examples/hscript/bld_b32.bat
   * contrib/examples/hscript/Makefile
   * contrib/examples/Makefile
     * Moved /samples to /contrib/examples
2007-11-10 17:04:20 +00:00

43 lines
931 B
Plaintext

/*
* $Id$
*/
#define EDIT_EDIT .T.
#define EDIT_VIEW .F.
PROCEDURE Main( cFile )
LOCAL cText
LOCAL lMode := EDIT_EDIT
IF cFile == NIL
cFile := "license.txt"
IF !File( cFile )
cFile := "../../../license.txt"
ENDIF
lMode := EDIT_VIEW
ENDIF
cText := MemoRead( cFile )
cText := MemoEditor( cText, 0, 0, MaxRow(), MaxCol(), lMode )
MemoWrit( "output.txt", cText )
RETURN
STATIC FUNCTION MEMOEDITOR( cText, nTop, nLeft, nBottom, nRight, lMode )
LOCAL oED
/* NOTE: In current design of editor it doesn't reallocate the memory
buffer used to hold the text
*/
oED := EditorNew( nTop, nLeft, nBottom, nRight, 254, , , , Len( cText ) * 2, 168 )
IF oED != NIL
EditorSetText( oED, cText )
EditorEdit( oED, lMode, .T. )
cText := EditorGetText( oED )
EditorKill( oED )
ELSE
? "Editor not created"
ENDIF
RETURN cText