Updating TBrwText
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
19990821-22:18 GMT+3 Alexander Kresin
|
||||
* source/debug/tbrwtext.prg
|
||||
* minor improvements
|
||||
* makefile.b32
|
||||
* added tone.c
|
||||
|
||||
19990821-14:20 GMT+2 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
*source/rtl/inkey.c
|
||||
* added test code for OS_UNIX_COMPATIBLE based on noncanonical
|
||||
low-level terminal functions - we need however to extend this
|
||||
code to support different terminals
|
||||
|
||||
* added test code for OS_UNIX_COMPATIBLE based on noncanonical
|
||||
low-level terminal functions - we need however to extend this
|
||||
code to support different terminals
|
||||
|
||||
19990821-00:05 GMT+1 Antonio Linares <alinares@fivetech.com>
|
||||
* source/debug/debugger.prg
|
||||
* improved debugger functionality.
|
||||
@@ -41,36 +47,36 @@
|
||||
19990820-15:05 GMT+2 Ryszard Glab <rglab@imid.med.pl>
|
||||
|
||||
*source/rtl/strings.c
|
||||
* corrected a NULL assigment to '\x0'
|
||||
* corrected a NULL assigment to '\x0'
|
||||
|
||||
*source/rdd/dbcmd.c
|
||||
* corrected SELF_DELETE to SELF_DELETED in HB_DELETED function
|
||||
* corrected SELF_DELETE to SELF_DELETED in HB_DELETED function
|
||||
|
||||
*source/runner/runner.c
|
||||
* corrected NULL to 0L (we are returning LONG in ReadLong())
|
||||
* corrected NULL to 0L (we are returning LONG in ReadLong())
|
||||
|
||||
*include/external.ch
|
||||
+ new file with EXTERNAL declaration for all harbour
|
||||
functions/procedures
|
||||
+ new file with EXTERNAL declaration for all harbour
|
||||
functions/procedures
|
||||
|
||||
*source/rtl/dir.c
|
||||
* corrected a parameter passed to 'opendir' function when
|
||||
Watcom C/C++ is used
|
||||
* corrected a parameter passed to 'opendir' function when
|
||||
Watcom C/C++ is used
|
||||
|
||||
*source/runner/Makefile
|
||||
*source/runner/external.prg
|
||||
*source/runner/runhrb.c
|
||||
*source/runner/runmain.prg
|
||||
* new files to create the runner executable.
|
||||
+ external.prg is here temporary because the preprocessor doesn't
|
||||
process EXTERNAL statement yet
|
||||
+ runhrb.c is copied from runner.c however without all code used
|
||||
to handle the symbol table
|
||||
+ runmain.prg calls HB_RUN from runhrb.c
|
||||
NOTE: I have left runner.c unchanged because I was unable to
|
||||
replace it with new files in all these build*.bat - these
|
||||
build*.bat doesn't allow to create an executable from more then
|
||||
one source file :(
|
||||
* new files to create the runner executable.
|
||||
+ external.prg is here temporary because the preprocessor doesn't
|
||||
process EXTERNAL statement yet
|
||||
+ runhrb.c is copied from runner.c however without all code used
|
||||
to handle the symbol table
|
||||
+ runmain.prg calls HB_RUN from runhrb.c
|
||||
NOTE: I have left runner.c unchanged because I was unable to
|
||||
replace it with new files in all these build*.bat - these
|
||||
build*.bat doesn't allow to create an executable from more then
|
||||
one source file :(
|
||||
|
||||
19990820-14:40 GMT+1 Victor Szel <info@szelvesz.hu>
|
||||
* include/hbsetup.h
|
||||
|
||||
@@ -22,7 +22,7 @@ harbour.lib : achoice.obj adir.obj alert.obj arrays.obj asort.obj \
|
||||
langapi.obj math.obj mathx.obj memvars.obj menuto.obj mtran.obj msges.obj \
|
||||
objfunc.obj \
|
||||
set.obj setcolor.obj setkey.obj strings.obj symbols.obj stringp.obj \
|
||||
stringsx.obj tbcolumn.obj tbrowse.obj tbrwtext.obj tclass.obj tget.obj tgetlist.obj transfrm.obj
|
||||
stringsx.obj tbcolumn.obj tbrowse.obj tbrwtext.obj tclass.obj tget.obj tgetlist.obj tone.obj transfrm.obj
|
||||
|
||||
symbols.obj : symbols.asm
|
||||
|
||||
@@ -80,6 +80,7 @@ tbrwtext.obj : tbrwtext.c extend.h hbdefs.h
|
||||
tclass.obj : tclass.c extend.h hbdefs.h
|
||||
tget.obj : tget.c extend.h hbdefs.h
|
||||
tgetlist.obj : tgetlist.c extend.h hbdefs.h
|
||||
tone.obj : tone.c extend.h init.h inkey.h
|
||||
transfrm.obj : transfrm.c extend.h hbdefs.h
|
||||
|
||||
achoice.c : achoice.prg harbour.exe
|
||||
@@ -107,14 +108,14 @@ tgetlist.c : tgetlist.prg harbour.exe
|
||||
tlib .\libs\b32\harbour.lib -+$@,,
|
||||
|
||||
.prg.c:
|
||||
bin\harbour $< /n /osource\rtl /iinclude /p
|
||||
bin\harbour $< /n /osource\rtl /iinclude
|
||||
|
||||
.c.obj:
|
||||
bcc32 -c -O2 -I.\include -v -o$@ -DHARBOUR_USE_GTAPI $<
|
||||
bcc32 -c -O2 -I.\include -o$@ -DHARBOUR_USE_GTAPI $<
|
||||
tlib .\libs\b32\harbour.lib -+$@,,
|
||||
|
||||
harbour.exe : harboury.c harbourl.c genobj32.obj harbour.obj compiler.h hbppint.c hbpp.c table.c
|
||||
echo -v -O2 > bld.32
|
||||
echo -O2 > bld.32
|
||||
echo -ebin\harbour.exe >> bld.32
|
||||
echo -Iinclude;source\compiler;source\hbpp >> bld.32
|
||||
echo source\compiler\harboury.c >> bld.32
|
||||
@@ -134,9 +135,9 @@ harbourl.c : harbour.l
|
||||
flex -i -8 -osource\compiler\harbourl.c source\compiler\harbour.l
|
||||
|
||||
genobj32.obj : genobj32.c
|
||||
bcc32 -c -O2 -v -I.\include -osource\compiler\genobj32.obj \
|
||||
bcc32 -c -O2 -I.\include -osource\compiler\genobj32.obj \
|
||||
source\compiler\genobj32.c
|
||||
|
||||
harbour.obj : harbour.c
|
||||
bcc32 -c -O2 -v -I.\include -osource\compiler\harbour.obj \
|
||||
bcc32 -c -O2 -I.\include -osource\compiler\harbour.obj \
|
||||
source\compiler\harbour.c
|
||||
|
||||
@@ -16,10 +16,6 @@ CLASS TBrwText FROM TBrowse
|
||||
DATA nLine
|
||||
|
||||
METHOD New( nTop, nLeft, nBottom, nRight, cFileName, cColors )
|
||||
METHOD GoTop()
|
||||
METHOD GoBottom()
|
||||
METHOD Skipper( nLines )
|
||||
|
||||
METHOD GotoLine( nLine )
|
||||
|
||||
ENDCLASS
|
||||
@@ -44,59 +40,14 @@ METHOD New( nTop, nLeft, nBottom, nRight, cFileName, cColors ) CLASS TBrwText
|
||||
::Autolite = .t.
|
||||
|
||||
::AddColumn( TbColumnNew( "", { || Alltrim( Str( ::nLine ) ) + ": " + ::cLine } ) )
|
||||
::GoTopBlock = { || ::GoTop() }
|
||||
::GoBottomBlock = { || ::GoBottom() }
|
||||
::SkipBlock = { | nLines | ::Skipper( nLines ) }
|
||||
::GoTopBlock = { || GoFirstLine( Self ) }
|
||||
::GoBottomBlock = { || GoLastLine( Self ) }
|
||||
::SkipBlock = { | nLines | Skipper( Self, nLines ) }
|
||||
|
||||
::GoTop()
|
||||
|
||||
return Self
|
||||
|
||||
METHOD GoTop() CLASS TBrwText
|
||||
|
||||
local cLine
|
||||
|
||||
FSeek( ::nHandle, 0, FS_SET )
|
||||
FReadLn( ::nHandle, @cLine )
|
||||
::cLine = cLine
|
||||
::nLine = 1
|
||||
FSeek( ::nHandle, 0, FS_SET )
|
||||
|
||||
return nil
|
||||
|
||||
METHOD GoBottom() CLASS TBrwText
|
||||
|
||||
local cLine := ::cLine
|
||||
|
||||
FSeek( ::nHandle, -1, FS_END )
|
||||
GoPrevLine( ::nHandle, @cLine, ::nFileSize )
|
||||
::cLine = cLine
|
||||
|
||||
return nil
|
||||
|
||||
METHOD Skipper( nLines ) CLASS TBrwText
|
||||
|
||||
local nSkipped := 0
|
||||
local cLine := ::cLine
|
||||
|
||||
// Skip down
|
||||
if nLines > 0
|
||||
while nSkipped != nLines .and. GoNextLine( ::nHandle, @cLine )
|
||||
nSkipped++
|
||||
end
|
||||
::cLine = cLine
|
||||
// Skip Up
|
||||
else
|
||||
while nSkipped != nLines .and. GoPrevLine( ::nHandle, @cLine, ::nFileSize )
|
||||
nSkipped--
|
||||
end
|
||||
::cLine = cLine
|
||||
endif
|
||||
|
||||
::nLine += nSkipped
|
||||
|
||||
return nSkipped
|
||||
|
||||
METHOD GotoLine( nLine ) CLASS TBrwText
|
||||
|
||||
if nLine > ::nLine
|
||||
@@ -113,6 +64,51 @@ METHOD GotoLine( nLine ) CLASS TBrwText
|
||||
|
||||
return nil
|
||||
|
||||
static function GoFirstLine( oBrw )
|
||||
|
||||
local cLine
|
||||
|
||||
FSeek( oBrw:nHandle, 0, FS_SET )
|
||||
FReadLn( oBrw:nHandle, @cLine )
|
||||
oBrw:cLine = cLine
|
||||
oBrw:nLine = 1
|
||||
FSeek( oBrw:nHandle, 0, FS_SET )
|
||||
|
||||
return nil
|
||||
|
||||
static function GoLastLine( oBrw )
|
||||
|
||||
local cLine := oBrw:cLine
|
||||
|
||||
FSeek( oBrw:nHandle, -1, FS_END )
|
||||
GoPrevLine( oBrw:nHandle, @cLine, oBrw:nFileSize )
|
||||
oBrw:cLine = cLine
|
||||
|
||||
return nil
|
||||
|
||||
static function Skipper( oBrw, nLines )
|
||||
|
||||
local nSkipped := 0
|
||||
local cLine := oBrw:cLine
|
||||
|
||||
// Skip down
|
||||
if nLines > 0
|
||||
while nSkipped != nLines .and. GoNextLine( oBrw:nHandle, @cLine )
|
||||
nSkipped++
|
||||
end
|
||||
oBrw:cLine = cLine
|
||||
// Skip Up
|
||||
else
|
||||
while nSkipped != nLines .and. GoPrevLine( oBrw:nHandle, @cLine, oBrw:nFileSize )
|
||||
nSkipped--
|
||||
end
|
||||
oBrw:cLine = cLine
|
||||
endif
|
||||
|
||||
oBrw:nLine += nSkipped
|
||||
|
||||
return nSkipped
|
||||
|
||||
static function FReadLn( nHandle, cBuffer )
|
||||
|
||||
local nEOL, ; // End Of Line Postion
|
||||
|
||||
Reference in New Issue
Block a user