Files
harbour-core/harbour/examples/pe/pe.prg
Viktor Szakats 461ea1568f 2009-05-29 11:04 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
- contrib/examples
  + examples
  * doc/dirstruc.txt
  * doc/whatsnew.txt
  * examples/hbdoc/Makefile
  * examples/pp/Makefile
  * examples/hboleold/Makefile
  * examples/hbsqlit2/Makefile
  * examples/misc/Makefile
  * examples/hbapollo/Makefile
  * examples/rdddbt/Makefile
  * examples/guestbk/Makefile
  * examples/pe/Makefile
  * examples/hbgf/hbgfwin/Makefile
  * examples/hbgf/hbgfos2/Makefile
  * examples/hbgf/hbgfgtk/Makefile
  * examples/hbgf/Makefile
  * examples/uhttpd/readme.txt
  * examples/dbu/Makefile
  * examples/hscript/Makefile
  * examples/hbwhat/Makefile
  * examples/rl/Makefile
  * examples/Makefile
    * Moved to flatten our dir layout and sync the locations
      in unified distro and source tree.
    ; TODO: As a next step I'll replace Makefiles with .hbm 
            files. This will allow users to build these parts 
            outside the source distribution.
2009-05-29 09:05:10 +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