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

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