home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a046 / 5.img / TEMPLATE / SSBSSYS.GEN < prev    next >
Encoding:
Text File  |  1991-04-01  |  2.7 KB  |  108 lines

  1. <<#pragma
  2.  
  3. <<*---Declare global variables---*>>
  4. string  fpath,fname,fext
  5. string  prgpath,prgname,fileprefix,datafile,pathfileprefix,prgmainname
  6. logical Simple,Bracketed,LiteBar
  7. logical Fox
  8. logical ismultipage,ismultials,ismultindx
  9. integer menutype
  10.  
  11. <<*---OPEN vars---*>>
  12. integer SCREENWIDTH
  13.  
  14. <<*---GENVARS vars---*>>
  15. string  fldprefix
  16.  
  17. <<*---FEATURE vars---*>>
  18. integer features
  19. integer featals,featlabel
  20.  
  21.  
  22. function feat( num : integer ) : logical
  23. <<*16-bit feature combinations (1...16)*>>
  24. <<*bits: 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,-32768*>>
  25. begin
  26.   RETURN (features and num) <> 0
  27. end feat
  28.  
  29. #>>
  30. <<*---General modules---*>>
  31. <<#include 'GENSAY.INC'#>>   <<*To generate @row,col SAY,etc.*>>
  32. <<#include 'GENSTR.INC'#>>   <<*General string functions*>>
  33. <<#include 'GENVARS.INC'#>>  <<*Contains fixfldnam,GenMemVars,etc.*>>
  34. <<#include 'GENPRG.INC'#>>   <<*To generate @row,col SAY,etc.*>>
  35. <<#include 'GENFILE.INC'#>>  <<*Contains GenHeader,GenFooter,etc.*>>
  36. <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor,etc.*>>
  37. <<*---Application---*>>
  38. <<*include 'SSBPRIV.INC'*>>
  39. <<#include 'SSBMAIN.INC'#>>  
  40. <<#include 'SSBINST.INC'#>>
  41. <<#include 'SSBMCRT.INC'#>> 
  42. <<#include 'SSBSUB1.INC'#>>
  43. <<#include 'SSBSUB2.INC'#>>
  44. <<#pragma
  45.  
  46.  
  47. procedure GenMainPrg
  48. begin
  49.   <<* 'prgname' includes PATHNAME *>>
  50.   prgmainname := pathfileprefix + '0000.PRG'
  51.   if OpenFile( prgmainname,'MAIN program be generated SSBMIS Template' )
  52.     SSBMISMainBody
  53.     GenFooter( prgmainname )
  54.   end
  55. end <<*GenMainPrg*>>
  56.  
  57.  
  58. procedure GenPrograms
  59. string  fspec,filename
  60. begin
  61.   filename := 'SBDATA.MEM'
  62.   fspec := pathfileprefix + '0001.PRG'
  63.   if OpenFile( fspec,'INST program for ' + filename )
  64.     GenSBINSTBody
  65.     GenFooter( fspec )
  66.   end
  67.   filename := 'Screen was initialized'
  68.   fspec := pathfileprefix + '0002.PRG'
  69.   if OpenFile( fspec,'MCRT program for ' + filename )
  70.     GenSBMCRTBody
  71.     GenFooter( fspec )
  72.   end
  73.   filename := 'Business was selected'
  74.   fspec := pathfileprefix + '0003.PRG'
  75.   if OpenFile( fspec,'SUB1 program for ' + filename )
  76.     GenSBSUB1Body
  77.     GenFooter( fspec )
  78.   end
  79.   filename := 'Procedure was selected'
  80.   fspec := pathfileprefix + '0004.PRG'
  81.   if OpenFile( fspec,'SUB2 program for ' + filename )
  82.     GenSBSUB2Body
  83.     GenFooter( fspec )
  84.   end
  85. end <<*GenPrograms*>>
  86.  
  87.  
  88. procedure InitVariables
  89. begin
  90.   filespec( prgname,fpath,fname,fext )
  91.   fileprefix := substr( fname,1,4)
  92.                                        <<*1st three letters as prefix*>>
  93.   pathfileprefix := prgpath + fileprefix
  94. end <<*InitVariables*>>
  95.  
  96.  
  97. begin <<*MAIN*>>
  98.   prgname := Table
  99.   if prgname
  100.     InitVariables
  101.     GenMainPrg
  102.     GenPrograms
  103.   endif
  104. end
  105.  
  106. <<*EOF: SSBMIS.GEN*>>
  107. #>>
  108.