home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual Foxpro 6.0 (Ent. Edition) / Vf6ent Extractor.EXE / TOOLS / XSOURCE / XSOURCE.ZIP / vfpsource / wizards / Wzfoxdoc / matt.prg < prev    next >
Encoding:
Text File  |  1998-05-01  |  1.4 KB  |  77 lines

  1. PARAMETER nmode,ol
  2. PRIVATE lvl,cnt,err,i
  3. ol.style=5
  4. ol.clear
  5. use (mdir+"files") in 0
  6. select files
  7. go 1
  8. mtop=JustStem(file)
  9. use
  10. select fdxref
  11. lvl=0
  12. m.cnt=0
  13. m.err=.f.
  14. on error m.err=.t.
  15. DO CASE
  16. CASE nMode=1    &&calling tree
  17.     SET ORDER TO procedure
  18.     IF m.err
  19.         index on upper(procname) for flag$'DF' tag procedure
  20.     ENDIF
  21.     ON ERROR
  22.     DO showit WITH upper(mtop)
  23. CASE nMode=3    &&Class Hierarchy
  24.     SET ORDER TO classes
  25.     IF m.err
  26.         index on upper(procname) for flag$"BC" tag classes
  27.     ENDIF
  28.     ON ERROR
  29.     SCAN FOR flag='C'
  30.         myrec=recno()
  31.         MTOP=UPPER(ALLTRIM(Procname))
  32.         DO showit WITH mtop
  33.         go myrec
  34.     ENDSCAN
  35. ENDCASE
  36. FOR i=0 TO ol.listcount-1
  37.     IF ol.hassubitems[i]
  38.         ol.picturetype[i]=0
  39.     ELSE
  40.         ol.picturetype[i]=2
  41.     ENDIF
  42. ENDFOR
  43.  
  44.  
  45. PROC showit
  46.     Para prg
  47.     priv mr
  48.     IF m.lvl>20
  49.         RETURN
  50.     ENDIF
  51.     lvl=m.lvl+1
  52.     seek prg+' '
  53.     scan while upper(procname)+' '=prg+' '
  54.         if Upper(ALLTRIM(procname))#Upper(ALLTRIM(symbol))
  55.             m.cnt=m.cnt+1
  56.             ol.additem(ALLTRIM(symbol))
  57.             ol.indent[m.cnt]=m.lvl
  58.             mr=recno()
  59.             do showit with UPPER(trim(symbol))
  60.             go mr
  61.         endif
  62.     ENDsc
  63.     lvl=m.lvl-1
  64. RETURN
  65.  
  66. PROCEDURE JustStem
  67.     PARAMETERS mfile
  68.     IF AT('\',m.mfile)>0
  69.         mfile=SUBSTR(m.mfile,RAT('\',m.mfile)+1)
  70.     ENDIF && AT('/',m.mfile)>0
  71.     IF AT(".",m.mfile)>0
  72.         mfile=LEFT(m.mfile,AT(".",m.mfile)-1)
  73.     ENDIF && AT(".",m.mfile)>0
  74. RETURN m.mfile
  75. *EOP JustStem
  76.  
  77.