#include "FiveWin.ch"
function Main()
local aLines := HB_ATokens( MemoRead( "extern.txt" ), Chr( 10 ) )
DbCreate( "files.dbf", { { "name", "c", 80, 0 } } )
USE files
AEval( aLines, { | cLine | If( At( ".o", cLine ) != 0,;
( DbAppend(), Files->name := StrTran( AllTrim( cLine ), ".o:", ".prg" ) ),) } )
GO TOP
XBrowser
return nil
#include "FiveWin.ch"
function Main()
local aLines := HB_ATokens( MemoRead( "extern.txt" ), Chr( 10 ) )
local cLine, n
DbCreate( "files.dbf", { { "name", "c", 80, 0 } } )
DbCreate( "symbols.dbf", { { "name", "c", 80, 0 },;
{ "filename", "c", 80, 0 } } )
USE files
USE symbols NEW
SELECT files
for n = 1 to Len( aLines )
cLine = aLines[ n ]
if At( ".o", cLine ) != 0
files->( DbAppend() )
files->name := StrTran( AllTrim( cLine ), ".o:", ".prg" )
else
if "HB_FUN_" $ cLine
symbols->( DbAppend() )
symbols->name := SubStr( cLine, At( "HB_FUN_", cLine ) + 7 ) + "()"
symbols->filename := files->name
endif
endif
next
SELECT symbols
GO TOP
XBrowser
return nil
#include "FiveWin.ch"
extern DBFCDX
function Main()
local aLines := HB_ATokens( MemoRead( "fivehg.txt" ), Chr( 10 ) )
local cLine, n
DbCreate( "files.dbf", { { "name", "c", 80, 0 } } )
DbCreate( "symbols.dbf", { { "name", "c", 80, 0 },;
{ "filename", "c", 80, 0 } } )
USE files VIA "DBFCDX"
INDEX ON files->name TAG name
USE symbols NEW VIA "DBFCDX"
INDEX ON symbols->name TAG name
INDEX ON symbols->filename TAG filename
for n = 1 to Len( aLines )
cLine = aLines[ n ]
if ".o" $ cLine
files->( DbAppend() )
files->name := StrTran( AllTrim( cLine ), ".o:", ".prg" )
else
if SubStr( cLine, 10, 1 ) == "T"
symbols->( DbAppend() )
if "HB_FUN_" $ cLine
symbols->name := SubStr( cLine, At( "HB_FUN_", cLine ) + 7 ) + "()"
else
symbols->name := SubStr( cLine, 12 ) + "()"
endif
symbols->filename := files->name
endif
endif
next
SELECT symbols
GO TOP
XBROWSER AUTOSORT
return nil
#include "FiveWin.ch"
extern DBFCDX
function Main()
local aLines := HB_ATokens( MemoRead( "fivehg.txt" ), Chr( 10 ) )
local cLine, n
DbCreate( "files.dbf", { { "name", "c", 80, 0 } } )
DbCreate( "symbols.dbf", { { "name", "c", 80, 0 },;
{ "filename", "c", 80, 0 } } )
DbCreate( "used.dbf", { { "name", "c", 80, 0 },;
{ "filename", "c", 80, 0 } } )
USE files VIA "DBFCDX"
INDEX ON files->name TAG name
USE symbols NEW VIA "DBFCDX"
INDEX ON symbols->name TAG name
INDEX ON symbols->filename TAG filename
USE used NEW VIA "DBFCDX"
INDEX ON used->name TAG name
INDEX ON used->filename TAG filename
for n = 1 to Len( aLines )
cLine = aLines[ n ]
if ".o" $ cLine
files->( DbAppend() )
files->name := StrTran( AllTrim( cLine ), ".o:", ".prg" )
else
if SubStr( cLine, 10, 1 ) == "T"
symbols->( DbAppend() )
if "HB_FUN_" $ cLine
symbols->name := SubStr( cLine, At( "HB_FUN_", cLine ) + 7 ) + "()"
else
symbols->name := SubStr( cLine, 12 ) + "()"
endif
symbols->filename := files->name
endif
if SubStr( cLine, 10, 1 ) == "U"
used->( DbAppend() )
if "HB_FUN_" $ cLine
used->name := SubStr( cLine, At( "HB_FUN_", cLine ) + 7 ) + "()"
else
used->name := SubStr( cLine, 12 ) + "()"
endif
used->filename := files->name
endif
endif
next
SELECT symbols
GO TOP
XBROWSER AUTOSORT
return nil
#include "FiveWin.ch"
extern dbfcdx
function SymbolBrowse2()
FIELD NAME
USE SYMBOLS NEW SHARED VIA "DBFCDX"
SET ORDER TO TAG NAME
USE USED NEW SHARED VIA "DBFCDX"
SET ORDER TO TAG FILENAME
SET RELATION TO NAME INTO SYMBOLS
SET FILTER TO !EMPTY( SYMBOLS->NAME )
GO TOP
XBROWSER "USED" ;
COLUMNS "FILENAME", "NAME", "SYMBOLS->FILENAME" ;
AUTOSORT ;
SHOW RECID ;
SETUP ( oBrw:cHeaders := { "FILENAME", "SYMBOL", "DEFINED IN" }, ;
oBrw:AutoFit() ;
)
return nil
#include "FiveWin.ch"
extern dbfcdx
function Main()
XBrowser( Related( "window.prg" ) )
return nil
function Related( cFileName )
local aFiles := {}
local cAliasSymbols := cGetNewAlias( "symbols" )
local cAliasUsed := cGetNewAlias( "used" )
USE symbols NEW SHARED VIA "DBFCDX" ALIAS ( cAliasSymbols )
SET ORDER TO "name"
USE used NEW SHARED VIA "DBFCDX" ALIAS ( cAliasUsed )
SET ORDER TO "filename"
SET RELATION TO ( cAliasUsed )->name INTO ( cAliasSymbols )
SET FILTER TO ! Empty( ( cAliasSymbols )->filename ) .and. Upper( AllTrim( ( cAliasUsed )->filename ) ) == Upper( cFileName )
GO TOP
while ! ( cAliasUsed )->( Eof() )
If Len( aFiles ) == 0 .or. AScan( aFiles, { | aFile | aFile[ 1 ] == Upper( AllTrim( ( cAliasSymbols )->filename ) ) } ) == 0
AAdd( aFiles, { Upper( AllTrim( ( cAliasSymbols )->filename ) ), Related( Upper( AllTrim( ( cAliasSymbols )->filename ) ) ) } )
endif
( cAliasUsed )->( DbSkip() )
end
( cAliasSymbols )->( DbCloseArea() )
( cAliasUsed )->( DbCloseArea() )
return ASort( aFiles,,, { | aFile1, aFile2 | aFile1[ 1 ] < aFile2[ 1 ] } )
#include "FiveWin.ch"
extern DBFCDX
function Main()
local aLines := HB_ATokens( MemoRead( "fivehgc.txt" ), Chr( 10 ) )
local cLine, n, cName, cResult := ""
DbCreate( "files_c.dbf", { { "name", "c", 80, 0 } } )
DbCreate( "symbols_c.dbf", { { "name", "c", 80, 0 },;
{ "filename", "c", 80, 0 } } )
DbCreate( "used_c.dbf", { { "name", "c", 80, 0 },;
{ "filename", "c", 80, 0 } } )
USE files_c VIA "DBFCDX"
INDEX ON files_c->name TAG name
USE symbols_c NEW VIA "DBFCDX"
INDEX ON symbols_c->name TAG name
INDEX ON symbols_c->filename TAG filename
USE used_c NEW VIA "DBFCDX"
INDEX ON used_c->name TAG name
INDEX ON used_c->filename TAG filename
for n = 1 to Len( aLines )
cLine = aLines[ n ]
if ".o" $ cLine
files_c->( DbAppend() )
files_c->name := StrTran( AllTrim( cLine ), ".o:", ".c" )
else
if SubStr( cLine, 10, 1 ) == "T"
symbols_c->( DbAppend() )
if "HB_FUN_" $ cLine
symbols_c->name := SubStr( cLine, At( "HB_FUN_", cLine ) + 7 ) + "()"
else
symbols_c->name := SubStr( cLine, 12 ) + "()"
endif
symbols_c->filename := files_c->name
endif
if SubStr( cLine, 10, 1 ) == "U"
used_c->( DbAppend() )
if "HB_FUN_" $ cLine
used_c->name := SubStr( cLine, At( "HB_FUN_", cLine ) + 7 ) + "()"
else
used_c->name := SubStr( cLine, 12 ) + "()"
endif
used_c->filename := files_c->name
endif
endif
next
SELECT symbols_c
SET ORDER TO "name"
SELECT used_c
SET ORDER TO "filename"
SET RELATION TO used_c->name INTO symbols_c
GO TOP
cName = used_c->filename
cResult += cName + CRLF + Space( 10 ) + used_c->name
while ! Eof()
SKIP
if used_c->filename != cName
cName = used_c->filename
cResult += CRLF + cName
else
if ! Empty( symbols_c->filename ) .and. symbols_c->filename != cName
cResult += CRLF + Space( 10 ) + AllTrim( used_c->name ) + " --> " + symbols_c->filename
endif
endif
end
// MemoWrit( "result.txt", cResult )
// WinExec( "notepad result.txt" )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 39 guests