home *** CD-ROM | disk | FTP | other *** search
- <<* SSB02.GEN *>>
- <<* (C) 1991 SHEN YANG WHITE HORSE SOFTWART COMPANY *>>
- <<#pragma
-
- <<*---Declare global variables---*>>
- string fpath,fname,fext
- string prgpath,prgname,fileprefix,datafile
- string FuncStatus1,FuncStatus2
- logical Simple,Bracketed,LiteBar
- logical Fox
- logical ismultipage,ismultials,ismultindx
-
- <<*---BROWSE vars---*>>
- integer SCREENWIDTH
- integer PageIndent,PageWidth,panmax
- logical IsBigWid
- integer headlen,datalen
-
- <<*---GENVARS vars---*>>
- string fldprefix
-
- <<*---FEATURE vars---*>>
- integer features
- integer featals,featlabel
-
-
- function feat( num : integer ) : logical
- <<*16-bit feature combinations (1...16)*>>
- <<*bits: 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,-32768*>>
- begin
- RETURN (features and num) <> 0
- end feat
-
- #>>
- <<*---General modules---*>>
- <<#include 'GENSAY.INC'#>> <<*To generate @row,col SAY,etc.*>>
- <<#include 'GENSTR.INC'#>> <<*General string functions*>>
- <<#include 'GENVARS.INC'#>> <<*Contains fixfldnam,GenMemVars,etc.*>>
- <<#include 'GENFILE.INC'#>> <<*Contains GenHeader,GenFooter,etc.*>>
- <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor,etc.*>>
- <<*---Application---*>>
- <<#include 'SSBFILE.INC'#>> <<*General routines used by others*>>
- <<#include 'SSBPRIV.INC'#>> <<*Special routines for APPE/EDIT*>>
- <<#include 'SSBOPEN.INC'#>>
- <<#include 'SSBMENU.INC'#>>
- <<#include 'SSBAPPE.INC'#>>
- <<#include 'SSBUPDA.INC'#>>
- <<#pragma
-
- procedure GenPrograms
- string fspec,filename
- begin
-
- fspec := fileprefix + 'O.PRG'
- genln( ' ' )
- genln( 'PROCEDURE ',fspec )
- GenSBOpenBody
- GenFooter( fspec )
-
- if (FuncStatus1 = 'T') or (FuncStatus1 = 't')
- fspec := fileprefix + '1.PRG'
- genln( ' ' )
- genln( 'PROCEDURE ',fspec )
- GenSBAppendBody
- GenFooter( fspec )
- endif
-
- if (FuncStatus2 = 'T') or (FuncStatus2 = 't')
- fspec := fileprefix + '2.PRG'
- genln( ' ' )
- genln( 'PROCEDURE ',fspec )
- GenSBUpdataBody
- GenFooter( fspec )
- endif
-
- end <<*GenPrograms*>>
-
-
- procedure InitVariables
- begin
- select databases 1
- <<* --- Function status --- *>>
- FuncStatus1 := substr( dbfusr,1,1 )
- FuncStatus2 := substr( dbfusr,2,1 )
-
- SCREENWIDTH := 0
- fldprefix := 'm' <<*FIELD_NAME prefix when using memvars*>>
- <<*---Init Product logical vars---*>>
- Fox := (ProductCode = 1)
- select all
- ismultipage := (pagtotal > 1)
- ismultials := (dbftotal > 1)
- ismultindx := false
- forall databases
- if ndxtotal > 1
- ismultindx := true
- endif
- endfor
- featlabel := 2
- filespec( prgname,fpath,fname,fext )
- fileprefix := substr( fname,1,7 )
- end <<*InitVariables*>>
-
-
- begin <<*MAIN*>>
- prgname := Table
- if prgname
- InitVariables
- GenPrograms
- endif
- end
-
- <<*EOF: SSB02.GEN*>>
- #>>
-