home *** CD-ROM | disk | FTP | other *** search
- <<#pragma
-
- <<*---Declare global variables---*>>
- string fpath,fname,fext
- string prgpath,prgname,fileprefix,datafile,pathfileprefix
- logical ismultipage,ismultials
- integer menutype
-
- #>>
- <<*---General modules---*>>
- <<#include 'GENFILE.INC'#>>
- <<#include 'GENCOLOR.INC'#>>
- <<*---Application---*>>
- <<#include 'Ap1HELP.INC'#>>
- <<#include 'Ap1LABE.INC'#>>
- <<#include 'Ap1PACK.INC'#>>
- <<#include 'Ap1REPO.INC'#>>
- <<#pragma
-
-
- procedure GenPrograms
- string fspec,filename
- begin
- filename := datafile + '.DBF'
- fspec := pathfileprefix + '_HELP.PRG'
- if OpenFile( fspec,'HELP program for ' + filename )
- GenHelpBody
- GenFooter( fspec )
- end
- fspec := pathfileprefix + '_LABE.PRG'
- if OpenFile( fspec,'LABEL program for ' + filename )
- GenLabelBody
- GenFooter( fspec )
- end
- fspec := pathfileprefix + '_PACK.PRG'
- if OpenFile( fspec,'PACK driver program for ' + filename )
- GenPackItBody
- GenFooter( fspec )
- end
- fspec := pathfileprefix + '_APAC.PRG'
- if OpenFile( fspec,'PACK program for ' + filename )
- GenPackBody
- GenFooter( fspec )
- end
- fspec := pathfileprefix + '_REPO.PRG'
- if OpenFile( fspec,'REPORT program for ' + filename )
- GenReportBody
- GenFooter( fspec )
- end
- end <<*GenPrograms*>>
-
-
- procedure InitVariables
- begin
- select all
- ismultipage := (pagtotal > 1)
- ismultials := (dbftotal > 1)
- pathfileprefix := prgpath + fileprefix
- end <<*InitVariables*>>
-
-
- procedure InitFromStack
- begin
- <<*---Restore stack variables in REVERSE order---*>>
- pop( prgpath ) <<*Pathname of main program to generate*>>
- pop( prgname ) <<*Filename of main program to generate*>>
- pop( fileprefix ) <<*Three letter file prefix*>>
- pop( datafile ) <<*filename of PRIMARY database file*>>
- pop( menutype ) <<*Menu/Submenu prompt type*>>
- end <<*InitFromStack*>>
-
-
- begin <<*MAIN*>>
- InitFromStack
- InitVariables
- GenPrograms
- end <<*MAIN*>>
-
- <<*EOF: APPS.GEN*>>
- #>>