It's really a quick hack, but the zip contains the source, so you can customize it to your needs if you like to.
DecMaker generate declarations for the file currently open in PB IDE, it does not process other files or includes, only the current file.
The generated declares are copied in the clipboard ready to pasted where you need them.
It must be installed as a PB tool under "Tools -> Configure Tool", if you run the exe it will pop up a window explaining the values to put in the required fields.
You can specify two options when launching it:
/tab=[n] will put n tabs between the Declare statement and the procedure's name.
/rem will allow you to specify the character(s) you want to use after a ";" to indicate your will to include that comment in the generated list of declares.
Let's see a sample program we want to generate the declares for:
Code: Select all
; DecMaker example
;! ************************
;! *** SYSTEM FUNCTIONS ***
;! ************************
Procedure SystemFunc1()
EndProcedure
Procedure SystemFunc2()
EndProcedure
Procedure SystemFunc3 (iVal, fVal.f)
EndProcedure
;! *************************
;! *** GRAPHIC FUNCTIONS ***
;! *************************
ProcedureDLL.i GraphicFunc1 (x, y)
ProcedureReturn x * y
EndProcedure
ProcedureDLL GraphicFunc2 ()
EndProcedure
ProcedureDLL GraphicFunc3 (dVal1.d, dVal2.d)
EndProcedure
;! MISC FUNCTIONS
ProcedureC.s RandomFunc1 (sValue.s)
ProcedureReturn ""
EndProcedure
ProcedureC.s RandomFunc2 (sValue.s)
ProcedureReturn ""
EndProcedure
Code: Select all
Declare SystemFunc1()
Declare SystemFunc2()
Declare SystemFunc3 (iVal, fVal.f)
Declare.i GraphicFunc1 (x, y)
Declare GraphicFunc2 ()
Declare GraphicFunc3 (dVal1.d, dVal2.d)
Declare.s RandomFunc1 (sValue.s)
Declare.s RandomFunc2 (sValue.s)
Code: Select all
; ************************
; *** SYSTEM FUNCTIONS ***
; ************************
Declare SystemFunc1()
Declare SystemFunc2()
Declare SystemFunc3 (iVal, fVal.f)
; *************************
; *** GRAPHIC FUNCTIONS ***
; *************************
Declare.i GraphicFunc1 (x, y)
Declare GraphicFunc2 ()
Declare GraphicFunc3 (dVal1.d, dVal2.d)
; MISC FUNCTIONS
Declare.s RandomFunc1 (sValue.s)
Declare.s RandomFunc2 (sValue.s)
;* 1.01 Fixed a gigantic bug, how was it working before ?
;* 1.02 Changed the /tab option to /tab=[n]
;* 1.03 Skip processing of macro contents
;* 1.04 Removed multiple group headers when the group is empty (no declares)
;* 1.05 Single line macros also skipped