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

  1. <<* SSB01.GEN *>>
  2. <<* (C) 1991 SHEN YANG WHITE HORSE SOFTWART COMPANY  *>>
  3. <<#pragma
  4.  
  5. <<*   To generate Menu of a part with SSBMIS template    *>>
  6. <<*---Declare global variables---*>>
  7. string  fpath,fname,fext
  8. string  prgpath,prgname,fileprefix,datafile,msetfilename
  9. string  FuncStatus3,FuncStatus4
  10. logical Simple,Bracketed,LiteBar
  11. logical Fox
  12. logical ismultipage,ismultindx
  13.  
  14. <<*---Used in several routines---*>>
  15. logical ismultials
  16. string  fldprefix
  17.  
  18. <<*---GENHUE vars---*>>
  19. integer lasthue,forecolor,backcolor
  20.  
  21. #>>
  22. <<*---General modules---*>>
  23. <<#include 'GENSAY.INC'#>>   <<*To generate @row,col SAY,etc.*>>
  24. <<#include 'GENHUE.INC'#>>   <<*Contains AtrCode,etc.*>>
  25. <<#include 'GENFLD.INC'#>>   <<*Contains GenLabel,GenField,etc.*>>
  26. <<#include 'GENVARS.INC'#>>  <<*Contains fixfldnam,GenMemVars,etc.*>>
  27. <<#include 'GENFILE.INC'#>>  <<*Contains GenHeader,GenFooter,etc.*>>
  28. <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor*>>
  29. <<*---Specific modules---*>>
  30. <<#include 'SSBFILE.INC'#>>  <<*General routines used by others*>>
  31. <<#include 'SSBFORM.INC'#>>
  32. <<#include 'SSBSAYS.INC'#>>
  33. <<#include 'SSBGETS.INC'#>>  <<*WriteGetFlds,etc.*>>
  34. <<#include 'SSBREPL.INC'#>>
  35. <<#include 'SSBPROC.INC'#>>
  36. <<#include 'SSBKEYS.INC'#>>
  37. <<#include 'SSBCALC.INC'#>>
  38. <<#include 'SSBFIMA.INC'#>>
  39. <<#include 'SSBDRIV.INC'#>>
  40. <<#include 'SSBSTATI.INC'#>>
  41.  
  42. <<#pragma
  43.  
  44. procedure InitVariables
  45. begin
  46.   select databases 1
  47.   FuncStatus3 := substr( dbfusr,3,1 )
  48.   FuncStatus4 := substr( dbfusr,4,1 )
  49.   fldprefix := 'm'
  50.   <<*---Init Product logical vars---*>>
  51.   Fox     := (ProductCode = 1)
  52.   select all
  53.   ismultipage := (pagtotal > 1)
  54.   ismultials := (dbftotal > 1)
  55.   ismultindx := false
  56.   forall databases
  57.     if ndxtotal > 1
  58.       ismultindx := true
  59.     endif
  60.   endfor
  61. end <<*InitVariables*>>
  62.  
  63.  
  64. procedure InitFromStack
  65. begin
  66.   <<*---Restore stack variables in REVERSE order---*>>
  67.   pop( prgpath )       <<*Pathname of main program to generate*>>
  68.   pop( prgname )       <<*Filename of main program to generate*>>
  69.   pop( fileprefix )    <<*Seven letter file prefix*>>
  70.   pop( datafile )      <<*filename of PRIMARY database file*>>
  71.   zapstack             <<*Clear it of anything else it might have*>>
  72. end <<*InitFromStack*>>
  73.  
  74.  
  75. begin <<*MAIN*>>
  76.   InitFromStack
  77.   InitVariables
  78.   GenSBProcedures   <<* Called SSBDRIV.INC *>>
  79.   if (FuncStatus4 = 'T') or (FuncStatus4 = 't')
  80.     SSBStatiBody
  81.   endif
  82. end <<*MAIN*>>
  83.  
  84. <<*EOF: SSB01.GEN*>>
  85. #>>