home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
clipper
/
bcklib2.zip
/
FUNCPROC.PRG
< prev
next >
Wrap
Text File
|
1993-01-16
|
2KB
|
83 lines
/*
The source code contained within this file is protected under the
laws of the United States of America and by International Treaty.
Unless otherwise noted, the source contained herein is:
Copyright (c)1990, 1991, 1992 BecknerVision Inc - All Rights Reserved
Written by John Wm Beckner THIS NOTICE MUST NOT BE REMOVED
BecknerVision Inc
PO Box 11945 DISTRIBUTE ONLY WITH SHAREWARE
Winston-Salem NC 27116 VERSION OF THIS PRODUCT.
Fax: 919/760-1003
*/
#include "beckner.inc"
FUNCTION FuncProc()
CLS
? 'FUNCPROC v1.0 Copyright (c)1990 John Wm Beckner'
?
IF file('FUNCPROC.DBF')
ERASE funcproc.dbf
ENDIF
PARAMETER cSkeleton
IF pcount()=0
cSkeleton := '*.prg'
ENDIF
IF !fExtension(cSkeleton)
cSkeleton := fExtNew(cSkeleton, "PRG")
ENDIF
DECLARE fl[adir(cSkeleton)]
adir(cSkeleton, fl)
fCreateDBF('FUNCPROC/FUNC_NAME/C/10/FILE_NAME/C/8')
fNoShare('funcproc')
INDEX on func_name to funcproc
FOR x := 1 to len(fl)
h := fopen(fl[x])
? fl[x]
WHILE LOOPING
b := lower(ltrim(freadline(h)))
IF 'func'==left(b, 4)
? ' ',b
APPEND BLANK
REPLACE file_name with left(lower(fl[x]),at('.',fl[x])-1),;
func_name with trim(ltrim(substr(b,at(' ',b)+1)))
ELSEIF 'proc'==left(b,4)
? ' ',b
APPEND BLANK
REPLACE file_name with left(lower(fl[x]),at('.',fl[x])-1),;
func_name with trim(ltrim(substr(b,at(' ',b)+1)))
ELSEIF 'clipper'==left(b,7)
? ' ',b
APPEND BLANK
REPLACE file_name with left(lower(fl[x]),at('.',fl[x])-1),;
func_name with trim(ltrim(substr(b,at('clipper',b)+8,;
at('(',b)-8)))
ENDIF
IF fEOF(h)
EXIT
ENDIF
END
fClose(h)
NEXT
REPLACE all func_name with IF("("$func_name, left(func_name,;
at("(", func_name)-1),func_name)
GO TOP
SET PRINT to funcproc
SET PRINT on
? 'FUNCTIONS & PROCEDURES',date()
?
WHILE !eof()
? func_name,file_name
SKIP
END
FUNCTION fEOF(nHandle)
LOCAL nCurrentPos, nEOF
nCurrentPos := fseek(nHandle,0,1)
nEOF := fseek(nHandle,0,2)
fseek(nHandle,nCurrentPos,0)
RETURN nEOF<=nCurrentPos