home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / flow / part04 < prev    next >
Encoding:
Text File  |  1992-07-30  |  55.4 KB  |  1,674 lines

  1. Newsgroups: comp.sources.misc
  2. From: julian@vscn08.cern.ch (Julian James Bunn)
  3. Subject:  v31i067:  flow - Fortran Structure Analysers, Part04/05
  4. Message-ID: <1992Jul31.052643.466@sparky.imd.sterling.com>
  5. X-Md4-Signature: d5759f357c5a92b40340a4ceeb85184e
  6. Date: Fri, 31 Jul 1992 05:26:43 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: julian@vscn08.cern.ch (Julian James Bunn)
  10. Posting-number: Volume 31, Issue 67
  11. Archive-name: flow/part04
  12. Environment: fortran, ffccc
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then feed it
  16. # into a shell via "sh file" or similar.  To overwrite existing files,
  17. # type "sh file -c".
  18. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  19. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  20. # Contents:  Copyright Readme caschg.for chtbox.for chtlin.for
  21. #   cmsflow.for floppy.h flow.cld flow.helpcms flow.hlp flow.l
  22. #   flow.panel grinit.for iniarr.for make_cms.com make_vms.com
  23. #   params.h procom.for prodes.for proqry.for tabent.for tables.h
  24. #   trecom.h vmsflow.for
  25. # Wrapped by kent@sparky on Thu Jul 30 23:38:14 1992
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. echo If this archive is complete, you will see the following message:
  28. echo '          "shar: End of archive 4 (of 5)."'
  29. if test -f 'Copyright' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'Copyright'\"
  31. else
  32.   echo shar: Extracting \"'Copyright'\" \(2847 characters\)
  33.   sed "s/^X//" >'Copyright' <<'END_OF_FILE'
  34. X************************************************************************
  35. X*                                                                      *
  36. X*                           CERN                                       *
  37. X*                                                                      *
  38. X*     EUROPEAN ORGANIZATION FOR PARTICLE PHYSICS                       *
  39. X*                                                                      *
  40. X*     Program name: FLOW   : Fortran Structure Analyzers               *
  41. X*                                                                      *
  42. X*     Author               : J.J.Bunn                                  *
  43. X*                            CERN                                      *
  44. X*                            CH-1211 GENEVA 23                         *
  45. X*                            SWITZERLAND                               *
  46. X*                            JULIAN at CERNVM (BITNET)                 *
  47. X*                            VXCERN::JULIAN (DECNET) node 22.47        *
  48. X*                            julian@vxcern.cern.ch (IP)                *
  49. X*                                                                      *
  50. X*     Copyright  CERN,  Geneva  1992  -  Copyright  and  any   other   *
  51. X*     appropriate  legal  protection  of this computer program and     *
  52. X*     associated documentation reserved  in  all  countries  of  the   *
  53. X*     world.                                                           *
  54. X*                                                                      *
  55. X*     CERN undertakes no obligation  for  the  maintenance  of  this   *
  56. X*     program  or  package,  nor responsibility for its correctness,   *
  57. X*     and accepts no liability whatsoever resulting from the use  of   *
  58. X*     it.                                                              *
  59. X*                                                                      *
  60. X*     Programs and documentation are provided solely for the use  of   *
  61. X*     the organization to which they are distributed.                  *
  62. X*     The program may be obtained from CERN subject to CERN            *
  63. X*     distribution rules.                                              *
  64. X*                                                                      *
  65. X*     This program  may  not  be  copied  or  otherwise  distributed   *
  66. X*     without  permission. This message must be retained on this and   *
  67. X*     any other authorized copies.                                     *
  68. X*                                                                      *
  69. X*     The material cannot be sold. CERN should be  given  credit  in   *
  70. X*     all references.                                                  *
  71. X*                                                                      *
  72. X************************************************************************
  73. END_OF_FILE
  74.   if test 2847 -ne `wc -c <'Copyright'`; then
  75.     echo shar: \"'Copyright'\" unpacked with wrong size!
  76.   fi
  77.   # end of 'Copyright'
  78. fi
  79. if test -f 'Readme' -a "${1}" != "-c" ; then 
  80.   echo shar: Will not clobber existing file \"'Readme'\"
  81. else
  82.   echo shar: Extracting \"'Readme'\" \(4330 characters\)
  83.   sed "s/^X//" >'Readme' <<'END_OF_FILE'
  84. XFLOW - Fortran Structure Analysers
  85. X==================================
  86. X
  87. XThis file describes how to install Flow on VMS, Unix
  88. Xand IBM/VM/CMS machines. 
  89. X
  90. XPlease read the COPYRIGHT file.
  91. X
  92. XThe posting includes a new version of the user guide for
  93. XFloppy and Flow. This contains a detailed description of
  94. Xthe various possibilities. The help files for the various
  95. Xsystems (flow.hlp, flow.helpcms, and flow.l) should, however,
  96. Xbe adequate for most uses.
  97. X
  98. XNote that Floppy is available on various archive servers for
  99. Xanonymous ftp. For example, gatekeeper.dec.com has it in
  100. Xdirectory pub/comp.sources.misc/volume12/ffccc .
  101. X
  102. X1) Unix Installation
  103. X
  104. X   To use Flow, you will need to already have installed Floppy.
  105. X
  106. X   This posting of Flow contains a new version of floppy.f
  107. X   and floppy.l which you should move to the Floppy directory
  108. X   and then re-invoke make. The new floppy.f just enables
  109. X   the -t qualifier to allow an output for Flow to be written.
  110. X   The new floppy.l man page describes the new option.
  111. X
  112. X   How to procede
  113. X   ==============
  114. X   Put all the distribution files in a subdirectory called
  115. X   flow. Type make. This should generate a flow executable.
  116. X   If your Fortran 77 compiler is not invoked by "f77" then
  117. X   you will have to edit the makefile and change it accordingly.
  118. X   (If you are building Flow in AIX, then the xlf compiler
  119. X   may not allow .for suffixes. There is a suggested mod in
  120. X   the makefile which takes care of this.)
  121. X   
  122. X   To test Flow, generate an input file for it using Floppy.
  123. X   For example, using a source Fortran file called myfile.f :
  124. X
  125. X   floppy -t -cn myfile.f
  126. X
  127. X   flow -q myfile.f.floptre
  128. X
  129. X   If you are satisfied, move the man page flow.l to the right 
  130. X   place on your system, and put flow in the appropriate place too.
  131. X
  132. X2) VMS Installation   
  133. X
  134. X   To use Flow, you will need to already have installed Floppy.
  135. X
  136. X   How to procede
  137. X   ==============
  138. X   Put all the distribution files in a subdirectory called
  139. X   [.FLOW]. Set default to that directory, and type @MAKE_VMS.
  140. X   This should generate a flow excutable, and a flow library.
  141. X
  142. X   To add the command for testing, edit the file FLOW.CLD.
  143. X   Change the filename of the FLOW.EXE image so that it
  144. X   corresponds to where FLOW.EXE actually is on your machine.
  145. X   Exit the editor. Type SET COMMAND FLOW.
  146. X
  147. X   To test Flow, generate an input file for it using Floppy.
  148. X   For example, using a source Fortran file called MYFILE.FOR :
  149. X
  150. X   FLOPPY /TREE /NOCHECKS MYFILE
  151. X
  152. X   FLOW /QUERY MYFILE
  153. X
  154. X   If you are satisfied, then add the command to the system
  155. X   DCLTABLES (this requires privilege), by using the commands
  156. X   SET COMM/TABLE=SYS$COMMON:[SYSLIB]DCLTABLES -
  157. X       /OUT=SYS$COMMON:[SYSLIB]DCLTABLES FLOW
  158. X   INSTALL REPLACE SYS$LIBRARY:DCLTABLES
  159. X
  160. X   This makes the command available for all newly logging in
  161. X   users. Then add the FLOW.HLP to your user help library, using
  162. X   a command of the form LIBRARY/INS SYS$HELP:USER.HLB FLOW.HLP
  163. X
  164. X3) VM/CMS Installation
  165. X
  166. X   To use Flow, you will need to already have installed Floppy.
  167. X
  168. X   How to procede
  169. X   ==============
  170. X   The Flow source makes use of INCLUDE directives; the filename
  171. X   format of the target files is not compatible with the form
  172. X   required for a GLOBAL MACLIB. This means that you will have to
  173. X   expand the include files in all the modules. A procedure for
  174. X   doing this (on a VMS machine!) is included in the posting as
  175. X   MAKE_CMS.COM. This generates one large file called CMSFLOW FORTRAN
  176. X   which should be then moved to the VM/CMS environment and compiled.
  177. X   
  178. X   The FLOW EXEC Rexx file is intended to be used either in line mode,
  179. X   or via an IOS3270 panel. The panel for the latter option is
  180. X   included as FLOW PANEL in the posting. But you don't need IOS3270
  181. X   to run FLOW.
  182. X
  183. X   Once the CMSFLOW FORTRAN has been compiled, you should have a
  184. X   CMSFLOW TEXT file. This is the program that will be loaded by
  185. X   FLOW EXEC. Note that you will need a virtual machine of at least
  186. X   12 MBytes to run FLOW. 
  187. X
  188. X   To test FLOW, generate an input file for it using FLOPPY. For
  189. X   example, type:
  190. X
  191. X   FLOPPY myfile (NOCHECKS TREE
  192. X   FLOW myfile (QUERY
  193. X
  194. X4) Problems and Bugs
  195. X
  196. X   If you find bugs in Flow, or have installation problems on a
  197. X   specific machine, I would like to hear about them, although
  198. X   I cannot guarantee to be able to help. Please mail
  199. X   julian@vxcern.cern.ch.
  200. X   
  201. END_OF_FILE
  202.   if test 4330 -ne `wc -c <'Readme'`; then
  203.     echo shar: \"'Readme'\" unpacked with wrong size!
  204.   fi
  205.   # end of 'Readme'
  206. fi
  207. if test -f 'caschg.for' -a "${1}" != "-c" ; then 
  208.   echo shar: Will not clobber existing file \"'caschg.for'\"
  209. else
  210.   echo shar: Extracting \"'caschg.for'\" \(729 characters\)
  211.   sed "s/^X//" >'caschg.for' <<'END_OF_FILE'
  212. X      SUBROUTINE CASCHG(CINP,COUT)
  213. XC! Convert any lower case to upper
  214. X      INCLUDE 'params.h'
  215. X      CHARACTER*(*) CINP
  216. X      CHARACTER*(*) COUT
  217. X      CHARACTER*1 CUP(26),CLO(26)
  218. X      DATA CUP /'A','B','C','D','E','F','G','H','I','J','K','L','M',
  219. X     &          'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'/
  220. X      DATA CLO /'a','b','c','d','e','f','g','h','i','j','k','l','m',
  221. X     &          'n','o','p','q','r','s','t','u','v','w','x','y','z'/
  222. X      LEN = LENOCC(CINP)
  223. X      COUT = CINP
  224. X      DO 1 I=1,LEN
  225. X        DO 2 J=1,26
  226. X          IF(CINP(I:I).EQ.CLO(J)) THEN
  227. X            COUT(I:I) = CUP(J)
  228. X            GOTO 3
  229. X          ENDIF
  230. X   2    CONTINUE
  231. X        COUT(I:I) = CINP(I:I)
  232. X   3  CONTINUE
  233. X   1  CONTINUE
  234. X      END
  235. END_OF_FILE
  236.   if test 729 -ne `wc -c <'caschg.for'`; then
  237.     echo shar: \"'caschg.for'\" unpacked with wrong size!
  238.   fi
  239.   # end of 'caschg.for'
  240. fi
  241. if test -f 'chtbox.for' -a "${1}" != "-c" ; then 
  242.   echo shar: Will not clobber existing file \"'chtbox.for'\"
  243. else
  244.   echo shar: Extracting \"'chtbox.for'\" \(375 characters\)
  245.   sed "s/^X//" >'chtbox.for' <<'END_OF_FILE'
  246. X      SUBROUTINE CHTBOX(PXL,PYL,PXH,PYH)
  247. XC! Plots a box 
  248. X      INCLUDE 'lunits.h'
  249. XC
  250. X      WRITE(LOUTCH,*) pxl,' xrel ',pyl,' yrel moveto'
  251. X      WRITE(LOUTCH,*) pxh,' xrel ',pyl,' yrel lineto'
  252. X      WRITE(LOUTCH,*) pxh,' xrel ',pyh,' yrel lineto'
  253. X      WRITE(LOUTCH,*) pxl,' xrel ',pyh,' yrel lineto'
  254. X      WRITE(LOUTCH,*) 'closepath'
  255. X      WRITE(LOUTCH,*) 'stroke'
  256. X      END
  257. END_OF_FILE
  258.   if test 375 -ne `wc -c <'chtbox.for'`; then
  259.     echo shar: \"'chtbox.for'\" unpacked with wrong size!
  260.   fi
  261.   # end of 'chtbox.for'
  262. fi
  263. if test -f 'chtlin.for' -a "${1}" != "-c" ; then 
  264.   echo shar: Will not clobber existing file \"'chtlin.for'\"
  265. else
  266.   echo shar: Extracting \"'chtlin.for'\" \(795 characters\)
  267.   sed "s/^X//" >'chtlin.for' <<'END_OF_FILE'
  268. X      SUBROUTINE CHTLIN(X1,Y1,X2,Y2,BX,BY)
  269. XC! Calculate and plot box intersections
  270. XC X1,Y1 coords of 1st box centre
  271. XC X2,Y2 coords of 2nd box centre
  272. XC BX,BY dimensions of the boxes
  273. XC XS,YS coords of intersection with 1st box
  274. XC XF,YF coords of intersection with 2nd box
  275. X      INCLUDE 'lunits.h'
  276. XC
  277. X      RAT1 = 9999.
  278. X      IF(Y1-Y2.NE.0.) RAT1 = (X2-X1)/(Y1-Y2)
  279. X      RAT2 = 9999.
  280. X      IF(RAT1.NE.0.) RAT2 = 1./RAT1
  281. X      XD = BX*0.5*MIN(ABS(RAT1),1.)
  282. X      YD = BY*0.5*MIN(ABS(RAT2),1.)
  283. X      IF(RAT1.LT.0.) XD = -XD
  284. X      YS=Y1-YD
  285. X      YF=Y2+YD
  286. X      XS=X1+XD
  287. X      XF=X2-XD
  288. X      WRITE(LOUTCH,100) XS,' xrel ',YS,' yrel moveto'
  289. X      WRITE(LOUTCH,100) XF,' xrel ',YF,' yrel lineto'
  290. X  100 FORMAT(1X,F10.5,A,F10.5,A)
  291. X      WRITE(LOUTCH,*) 'closepath'  
  292. X      WRITE(LOUTCH,*) 'stroke'
  293. X      END
  294. END_OF_FILE
  295.   if test 795 -ne `wc -c <'chtlin.for'`; then
  296.     echo shar: \"'chtlin.for'\" unpacked with wrong size!
  297.   fi
  298.   # end of 'chtlin.for'
  299. fi
  300. if test -f 'cmsflow.for' -a "${1}" != "-c" ; then 
  301.   echo shar: Will not clobber existing file \"'cmsflow.for'\"
  302. else
  303.   echo shar: Extracting \"'cmsflow.for'\" \(946 characters\)
  304.   sed "s/^X//" >'cmsflow.for' <<'END_OF_FILE'
  305. X      PROGRAM FLOW
  306. X      INCLUDE 'params.h'
  307. X      INCLUDE 'lunits.h'               
  308. X      INCLUDE 'jobcom.h'
  309. X      INCLUDE 'trecom.h'
  310. X      CHARACTER*80 CLINE
  311. X      LOUT = 6
  312. X      LINTRE = 50
  313. X      LOUTCO = 60
  314. X      LOUTRE = 61
  315. X      LOUTCH = 96
  316. X      LQERY = .FALSE.
  317. X      LEXT = .FALSE.                               
  318. X      LCHRT = .FALSE.
  319. X      LTREE = .FALSE.
  320. X      LCOMM = .FALSE.
  321. X      READ(1,'(A)',END=999,ERR=999) CLINE
  322. X      IF(INDEX(CLINE,'query').NE.0) LQERY = .TRUE.
  323. X      IF(INDEX(CLINE,'externals').NE.0) LEXT = .TRUE.
  324. X      IF(INDEX(CLINE,'graphics').NE.0) LCHRT = .TRUE.
  325. X      IF(INDEX(CLINE,'chart').NE.0) LTREE = .TRUE.
  326. X      IF(INDEX(CLINE,'common').NE.0) LCOMM = .TRUE.
  327. X      IF(INDEX(CLINE,'node').NE.0) THEN
  328. X         CLINE = CLINE(INDEX(CLINE,'node')+5:)
  329. X         CTREE = CLINE(:INDEX(CLINE,' ')-1)
  330. X      ENDIF
  331. X      CALL PRODES
  332. X      STOP
  333. X  999 WRITE(LOUT,'(A)') ' FLOW: Error reading control file.'
  334. X      STOP 1
  335. X      END
  336. END_OF_FILE
  337.   if test 946 -ne `wc -c <'cmsflow.for'`; then
  338.     echo shar: \"'cmsflow.for'\" unpacked with wrong size!
  339.   fi
  340.   # end of 'cmsflow.for'
  341. fi
  342. if test -f 'floppy.h' -a "${1}" != "-c" ; then 
  343.   echo shar: Will not clobber existing file \"'floppy.h'\"
  344. else
  345.   echo shar: Extracting \"'floppy.h'\" \(536 characters\)
  346.   sed "s/^X//" >'floppy.h' <<'END_OF_FILE'
  347. X      COMMON /FLOPPY/ CALLER(MXENT),CRABUF(MXENT),
  348. X     &                TYPE(MXENT),CALLED(MXALL),CDABUF(MXALL),
  349. X     &                CNAMES(MXCOM),UNUSED(MXCOM),CMMNT,
  350. X     &                CARGNM(MARGS),CARGTY(MARGS),CARGDI(MARGD,2,MARGS),
  351. X     &                CKALLN(MKALL)
  352. X      COMMON /FLOPP1/ NENT,KALL,NCOM,NARGS,NKALL,NARGDI(MARGS),
  353. X     &                KALLIF(MKALL),KALLDO(MKALL)
  354. X      CHARACTER*50 CRABUF,CDABUF,CMMNT,CARGTY,CARGDI
  355. X      CHARACTER*(MXNAM) CALLER,CALLED,CNAMES,CARGNM,CKALLN
  356. X      CHARACTER*1 TYPE,UNUSED
  357. END_OF_FILE
  358.   if test 536 -ne `wc -c <'floppy.h'`; then
  359.     echo shar: \"'floppy.h'\" unpacked with wrong size!
  360.   fi
  361.   # end of 'floppy.h'
  362. fi
  363. if test -f 'flow.cld' -a "${1}" != "-c" ; then 
  364.   echo shar: Will not clobber existing file \"'flow.cld'\"
  365. else
  366.   echo shar: Extracting \"'flow.cld'\" \(564 characters\)
  367.   sed "s/^X//" >'flow.cld' <<'END_OF_FILE'
  368. X DEFINE VERB FLOW
  369. X        IMAGE disk$cern:[JULIAN.FLOW.PRO]FLOW.EXE 
  370. X        PARAMETER P1, PROMPT="Input data file from Floppy ",VALUE(TYPE=$FILE,REQUIRED)
  371. X        QUALIFIER QUERY
  372. X        QUALIFIER EXTERNALS
  373. X        QUALIFIER COMMON_TABLE, VALUE(TYPE=$FILE)
  374. X        QUALIFIER STRUCTURE_CHART, VALUE(TYPE=$FILE)
  375. X        QUALIFIER IGNORE, VALUE(LIST)
  376. X        QUALIFIER GRAPHICS, VALUE(TYPE=$FILE)
  377. X        QUALIFIER NODE, VALUE,DEFAULT
  378. X        QUALIFIER LOG
  379. X
  380. X        DISALLOW NODE AND NOT (STRUCTURE_CHART OR GRAPHICS)
  381. X        DISALLOW IGNORE AND NOT STRUCTURE_CHART
  382. END_OF_FILE
  383.   if test 564 -ne `wc -c <'flow.cld'`; then
  384.     echo shar: \"'flow.cld'\" unpacked with wrong size!
  385.   fi
  386.   # end of 'flow.cld'
  387. fi
  388. if test -f 'flow.helpcms' -a "${1}" != "-c" ; then 
  389.   echo shar: Will not clobber existing file \"'flow.helpcms'\"
  390. else
  391.   echo shar: Extracting \"'flow.helpcms'\" \(5302 characters\)
  392.   sed "s/^X//" >'flow.helpcms' <<'END_OF_FILE'
  393. X.cm CAT:CMS
  394. X.cm NAM:FLOW
  395. X.cm EXP: Fortran Code Structure Analyser
  396. X.cm DAT: 92.15.07
  397. X.cm A/R: J.J.Bunn
  398. X.cm KEY: FLOPPY FORTRAN STRUCTURE CHART STRUCTURE_CHART
  399. X.cm KEY: SC SASD FLOP CODE
  400. X.cm ABS: A program which allows the user to plot the subroutine
  401. X.cm ABS: calling tree of a Fortran program passed through FLOPPY.
  402. X.cm ABS: The calling tree may also be explored interactively.
  403. X.cm ABS: Other options include the production of a table
  404. X.cm ABS: of COMMON block names and the routines in which
  405. X.cm ABS: each is used.
  406. X.cm FLG: LOCAL
  407. X.cm END:
  408. XFLOW  (Structure Analysers)
  409. XUsers are referred to the FLOPPY writeup (DD/US/112) available in the UCO
  410. Xfor full details of the use of FLOW.
  411. XFLOW is used to produce subroutine calling trees, COMMON block usage
  412. Xtables, and to interactively explore subroutine calling trees.
  413. XIt is used after a FORTRAN program has been passed through FLOPPY.
  414. XVarious options are available, including suppression of external
  415. Xmodule names from the produced tree, and specification of the top
  416. Xnode module name.
  417. XGraphics output is in the form of a file of PostScript.
  418. XThis graphics output is intended to represent the SASD Structure
  419. XChart corresponding to the source FORTRAN, and, as such, may be used
  420. Xas a "backward engineering" tool.
  421. XNote: You need at least a 12 M machine to run FLOW.
  422. XFLOW is invoked via a panel or from the command line as follows:
  423. X+--------+--------------------------------------------------------------+
  424. X|        |                                                              |
  425. X| FLOW   | [ ? | [fn [ft [fm]]]  [( Options ]]                          |
  426. X|        |                                                              |
  427. X|        | Options:                                                     |
  428. X|        |                                                              |
  429. X|        | [QUERY]                                                      |
  430. X|        | [EXTERNALS]                                                  |
  431. X|        | [STRUCTURE_CHART   fn [ft [fm]]]                             |
  432. X|        | [GRAPHICS          fn [ft [fm]]]                             |
  433. X|        | [NODE              nodename]                                 |
  434. X|        | [COMMON_TABLE      fn [ft [fm]]]                             |
  435. X+--------+--------------------------------------------------------------+
  436. Xwhere:
  437. X          When FLOW is entered without any operands or options,
  438. X          a panel will be displayed in which details of the FLOW
  439. X          job may be entered.
  440. X?         If this is the only operand this HELP file will be displayed.
  441. Xfn ft fm
  442. X          Specifies the name of a binary file produced using the
  443. X          TREE option in FLOPPY.
  444. XQUERY     Enter the interactive exploration facility of FLOW !
  445. X          You will be shown the full list of module names in the
  446. X          source, and can then specify one of them to see which
  447. X          modules it calls, and which modules call it. In this
  448. X          way you can move freely around the tree.
  449. XSTRUCTURE_CHART    fn ft fm
  450. X          Specifies that a text file be written containing the
  451. X          calling tree of the source FORTRAN. The tree shows modules
  452. X          local to the code and external, and indicates whether they
  453. X          appear in IF or DO clauses. Stub modules (no calls), external
  454. X          modules (not local), multiply-called modules and sub-trees
  455. X          are all clearly indicated. If the FORTRAN source contained
  456. X          lines after each module declaration of the form:
  457. X          C! This is a short comment
  458. X          then these comments are shown against each module name in the
  459. X          tree.
  460. XGRAPHICS  fn ft fm
  461. X          Specifies that a graphics metafile (either GKS or PostScript)
  462. X          be written, which, when interpreted, will show the SASD-like
  463. X          structure chart of the source FORTRAN. It is recommended
  464. X          NOT to ask for EXTERNALS with this option. An attempt
  465. X          is made to optimize the positions of modules on the page,
  466. X          in order to minimise line crossings etc.. But this is often
  467. X          unsuccessful!
  468. XNODE      nodename
  469. X          Specifies the top node in either the text or graphics
  470. X          structure chart. This is useful for restricting the output
  471. X          to a particular sub-tree of interest. The value nodename
  472. X          must be a PROGRAM, SUBROUTINE or FUNCTION name in the
  473. X          source FORTRAN.
  474. XEXTERNALS Specifies that modules external to the source FORTRAN
  475. X          (e.g. SIN, COS, UCOPY, HBOOK1 etc.) be shown in the tree.
  476. XCOMMON_TABLE    fn ft fm
  477. X          Specifies that a table be written containing, on the y-axis
  478. X          the names of all COMMON blocks, and on the x-axis all the
  479. X          module names, contained in the source FORTRAN. At each
  480. X          place in the table a 'Y' indicates that the COMMON block
  481. X          appears in that module, and at least one variable from it
  482. X          is used in the module, a 'N' indicates that the COMMON
  483. X          block is declared but not used, and a blank indicates that
  484. X          the COMMON block is not declared in that module.
  485. XExample
  486. X          To interactively explore the calling tree of your program
  487. X          MCARLO FORTRAN, use the following two commands:
  488. X          FLOPPY MCARLO (CHECKS NONE TREE DISK
  489. X          FLOW MCARLO (QUERY
  490. END_OF_FILE
  491.   if test 5302 -ne `wc -c <'flow.helpcms'`; then
  492.     echo shar: \"'flow.helpcms'\" unpacked with wrong size!
  493.   fi
  494.   # end of 'flow.helpcms'
  495. fi
  496. if test -f 'flow.hlp' -a "${1}" != "-c" ; then 
  497.   echo shar: Will not clobber existing file \"'flow.hlp'\"
  498. else
  499.   echo shar: Extracting \"'flow.hlp'\" \(4030 characters\)
  500.   sed "s/^X//" >'flow.hlp' <<'END_OF_FILE'
  501. X1 FLOW
  502. X FLOW uses a file produced by Floppy (see HELP FLOPPY) to produce reports 
  503. X on the structure of the Fortran program on which Floppy was used.
  504. X
  505. X There is a "FLOPPY User Guide" DD/US/112 which describes the use
  506. X of FLOW and FLOPPY, available in the UCO Batiment 513.
  507. X
  508. X Syntax:
  509. X  
  510. X FLOW input_file /qualifier [/qualifiers] 
  511. X Note that at least one qualifier must be given.
  512. X
  513. X If you have problems or questions about FLOW or FLOPPY, then please
  514. X mail JULIAN@VXCERN.CERN.CH.
  515. X
  516. X FLOW is based on an original idea by P.Palazzi.
  517. X
  518. X2 Parameter
  519. Xinput_file
  520. X
  521. X  The input file is a file of type .FLOPTRE produced by Floppy.
  522. X  This file is easily created by using a Floppy command like:
  523. X
  524. X  $ floppy myfile /nochecks /tree
  525. X
  526. X  This file is a binary file, and cannot be viewed on the
  527. X  terminal. It can only be processed by Flow. The default
  528. X  file type is .floptre. A Flow command to operate on the
  529. X  floptre file produced above might thus be:
  530. X
  531. X  $ flow myfile /structure
  532. X
  533. X2 Qualifiers
  534. X/QUERY
  535. X  /QUERY
  536. X  Enter an interactive FLOW session, where the routine calling
  537. X  tree can be explored by specifying the node name, and seeing
  538. X  all routines calling the node and all routines that are called
  539. X  by the node. 
  540. X
  541. X/STRUCTURE_CHART 
  542. X
  543. X  /STRUCTURE_CHART[=(filename)]
  544. X  
  545. X  Create a file containing the calling tree of the source
  546. X  program. Each SUBROUTINE, PROGRAM or FUNCTION in the 
  547. X  source is a node in the calling tree. Each node is
  548. X  displayed in the chart so that one can see a) which
  549. X  other nodes call it, b) which nodes it calls, c) whether
  550. X  the node is external, a stub, a subtree node, d) the
  551. X  IF or DO level if the node is in an IF or DO clause.
  552. X  
  553. X  In addition, if the source FORTRAN contains a comment
  554. X  line IMMEDIATELY after each procedure declaration, e.g.
  555. X        SUBROUTINE INIJOB
  556. X  C! This subroutine initialises the job
  557. X  (the ! sign is important), then this comment is extracted
  558. X  and put as a label to the node name in the structure 
  559. X  chart. 
  560. X
  561. X/GRAPHICS
  562. X  /GRAPHICS=(filename)
  563. X  Cause a picture file to be written, which may afterwards
  564. X  be viewed using a PostScript previewer (if /POSTSCRIPT
  565. X  is also specified). The picture file contains an approximate
  566. X  representation of the equivalent SASD structure chart that
  567. X  corresponds to the existing state of the Fortran code.
  568. X  An effort is made to position the modules (SUBROUTINEs, 
  569. X  FUNCTIONs, etc.) on the plot so that line crossing is 
  570. X  minimised, but this is not always successful! 
  571. X
  572. X  It is recommended to use the /NOEXTERNAL qualifier together 
  573. X  with the /GRAPHICS qualifier: this helps to minimise the 
  574. X  complexity of the plot.
  575. X
  576. X/NODE 
  577. X
  578. X  /NODE=(nodename)
  579. X  Specify the name of the node in the program calling tree
  580. X  from which the flow should begin.
  581. X  
  582. X  NB This qualifier MUST only be used with the STRUCTURE_CHART 
  583. X     and GRAPHICS qualifiers.
  584. X
  585. X/EXTERNALS 
  586. X
  587. X  /EXTERNALS  (D)
  588. X  /NOEXTERNALS
  589. X  
  590. X  Specify whether the calling tree should contain the names
  591. X  of procedures external to the program or not. You should
  592. X  use this if you wish to suppress nodes such as SIN, COS,
  593. X  UCOPY etc from the flow.
  594. X
  595. X  NB This qualifier can only be used with the STRUCTURE_CHART,
  596. X     GRAPHICS and QUERY qualifiers.
  597. X
  598. X/COMMON_TABLE 
  599. X
  600. X  /COMMON_TABLE[=(filename)]
  601. X
  602. X  Create a table containing procedure names on one axis, and
  603. X  COMMON block names on the other, and indicate for each
  604. X  procedure/COMMON intersection whether the COMMON block is
  605. X  used or not in the procedure.  
  606. X/LOG
  607. X  /LOG  (D)
  608. X  /NOLOG
  609. X  Show a summary of the FLOW command parsing, or not.
  610. X
  611. X2 Examples
  612. X  You must have a data file obtained using FLOPPY:
  613. X  $ FLOPPY /TREE /NOCHECKS  myfile.FOR
  614. X  the FLOPPY data will be called "myfile.FLOPTRE".
  615. X  Create a structure chart called STRUCTURE.CHT showing
  616. X  the calling sequence in myfile.FOR:
  617. X  $ FLOW myfile /STRUCTURE=STRUCTURE.CHT
  618. X
  619. X  Ignore all externals, and start from the routine called INIJOB :
  620. X  $ FLOW myfile /STRUC /NOEXT /NODE=INIJOB
  621. X  Enter the interactive exploration facility of FLOW
  622. X  $ FLOW myfile /QUERY
  623. X
  624. END_OF_FILE
  625.   if test 4030 -ne `wc -c <'flow.hlp'`; then
  626.     echo shar: \"'flow.hlp'\" unpacked with wrong size!
  627.   fi
  628.   # end of 'flow.hlp'
  629. fi
  630. if test -f 'flow.l' -a "${1}" != "-c" ; then 
  631.   echo shar: Will not clobber existing file \"'flow.l'\"
  632. else
  633.   echo shar: Extracting \"'flow.l'\" \(3388 characters\)
  634.   sed "s/^X//" >'flow.l' <<'END_OF_FILE'
  635. X.TH flow 1 "16th July 1992"  "CERN"
  636. X.SH NAME
  637. Xflow \- Fortran Structure Analysers 
  638. X.SH SYNOPSIS
  639. X.B flow 
  640. X[
  641. X.B \-l
  642. X] [
  643. X.B \-c common-text
  644. X] [
  645. X.B \-q
  646. X] [
  647. X.B \-n node
  648. X] [
  649. X.B \-s text-chart
  650. X] [
  651. X.B \-g graphics-chart
  652. X] [
  653. X.B \-E
  654. X] [
  655. X.B \-i ignore-list
  656. X] [ file ]
  657. X.SH DESCRIPTION
  658. X.I Flow
  659. Xis a companion tool to Floppy, which operates on a file produced
  660. Xwith the -t option of Floppy. Using Flow, one can generate various
  661. Xreports which describe the structure of the original Fortran program
  662. Xanalysed by Floppy.
  663. X.SH PARAMETERS
  664. XThe input 
  665. X.I file 
  666. Xis a file of type .floptre produced by Floppy.
  667. XThis file is easily created by using a Floppy command like:
  668. X.PP
  669. Xfloppy -t -cn myfile.f 
  670. X.PP
  671. XThis file is a binary file, and cannot be viewed on the
  672. Xterminal. It can only be processed by Flow. 
  673. XA Flow command to operate on the floptre file produced above 
  674. Xmight thus be:
  675. X.PP
  676. Xflow -s myfile.f.floptre 
  677. X.PP
  678. X.SH OPTIONS
  679. X.IP \fB\-l\fR 12
  680. XThe
  681. X.I logging
  682. Xoption causes Flow to produce a verbose description of the parsing
  683. Xof the selected options.
  684. X.IP \fB\-c\ common-text \fR 12
  685. XThe 
  686. X.I common
  687. Xoption creates a table containing procedure names on one axis, and
  688. XCOMMON block names on the other, and indicates for each
  689. Xprocedure/COMMON intersection whether the COMMON block is
  690. Xused or not in the procedure.  
  691. X.IP \fB\-E\fR 12
  692. XThe
  693. X.I no Externals
  694. Xoption specifies that external routines are not to be included
  695. Xin any output selected.
  696. X.IP \fB\-s\ text-chart\fR 12
  697. XThe
  698. X.I structure-chart
  699. Xoption creates a file containing the calling tree of the source
  700. Xprogram. Each SUBROUTINE, PROGRAM or FUNCTION in the 
  701. Xsource is a node in the calling tree. Each node is
  702. Xdisplayed in the chart so that one can see a) which
  703. Xother nodes call it, b) which nodes it calls, c) whether
  704. Xthe node is external, a stub, a subtree node, d) the
  705. XIF or DO level if the node is in an IF or DO clause.
  706. X.br
  707. XIn addition, if the source FORTRAN contains a comment
  708. Xline IMMEDIATELY after each procedure declaration, e.g.
  709. X.br
  710. X        SUBROUTINE INIJOB
  711. X  C! This subroutine initialises the job
  712. X.br 
  713. X(the ! sign is used as the trigger), then this comment is extracted
  714. Xand put as a label to the node name in the structure chart.
  715. X.IP \fB\-i\ ignore-list\fR 12
  716. XThe
  717. X.I ignore
  718. Xoption specifies that, for the -s option, the given list
  719. Xof module names are to be excluded from the calling tree output.
  720. XSpecify the module names separated by commas, for example:
  721. X.br
  722. X-iFRED,BILL,HARRY,SUSAN
  723. X.IP \fB\-g graphics-chart\fR 12
  724. XThe
  725. X.I graphics
  726. Xoption causes a picture file to be written, which may afterwards
  727. Xbe viewed using a PostScript previewer.
  728. XThe picture file contains an approximate
  729. Xrepresentation of the equivalent SASD structure chart that
  730. Xcorresponds to the existing state of the Fortran code.
  731. XAn effort is made to position the modules (SUBROUTINEs, 
  732. XFUNCTIONs, etc.) on the plot so that line crossing is 
  733. Xminimised, but this is not always successful! 
  734. X.br
  735. XIt is recommended to use the -E option together 
  736. Xwith the -g option: this helps to minimise the 
  737. Xcomplexity of the plot.
  738. X.br
  739. XIf the -n option has not been specified, then Flow will search
  740. Xfor the module that calls the most other modules, and use this
  741. Xas the root of the tree.
  742. X.IP \fB\-n node\fR 12
  743. XThe
  744. X.I node
  745. Xoption specifies the name of the module from which the tree
  746. Xshould begin. The node name given should thus correspond to
  747. Xa module name in the source Fortran. 
  748. X
  749. X.SH SEE ALSO
  750. X.PP
  751. Xfloppy(l), f77(1)
  752. END_OF_FILE
  753.   if test 3388 -ne `wc -c <'flow.l'`; then
  754.     echo shar: \"'flow.l'\" unpacked with wrong size!
  755.   fi
  756.   # end of 'flow.l'
  757. fi
  758. if test -f 'flow.panel' -a "${1}" != "-c" ; then 
  759.   echo shar: Will not clobber existing file \"'flow.panel'\"
  760. else
  761.   echo shar: Extracting \"'flow.panel'\" \(658 characters\)
  762.   sed "s/^X//" >'flow.panel' <<'END_OF_FILE'
  763. X;PANEL1
  764. X.CYF HELP CMS QUIT
  765. X====> FLOW VERSION 2.00 <=========> Analyse Fortran Code <==============>
  766. X%&err
  767. X%Input for @FLOW
  768. X       Binary file from FLOPPY          %==>  ^20&filename
  769. X%Interactively explore the calling tree %==>  ^3&query
  770. X%Structure %Chart
  771. X        Node name at top of chart       %==>  ^8&node
  772. X         (Default is main program)
  773. X        File for text chart             %==>  ^20&structure_chart
  774. X        File for graphical chart        %==>  ^20&graphics
  775. X        Include EXTERNALs in chart ?    %==>  ^3&externals
  776. X%COMMON block table file                %==>  ^20&common_table
  777. XPF1:%Help   PF2:%Enter %a %CMS %Command     PF3:%Exit
  778. END_OF_FILE
  779.   if test 658 -ne `wc -c <'flow.panel'`; then
  780.     echo shar: \"'flow.panel'\" unpacked with wrong size!
  781.   fi
  782.   # end of 'flow.panel'
  783. fi
  784. if test -f 'grinit.for' -a "${1}" != "-c" ; then 
  785.   echo shar: Will not clobber existing file \"'grinit.for'\"
  786. else
  787.   echo shar: Extracting \"'grinit.for'\" \(1620 characters\)
  788.   sed "s/^X//" >'grinit.for' <<'END_OF_FILE'
  789. X      SUBROUTINE GRINIT(SIZEX,SIZEY,TITLE)
  790. XC! Initialise the graphics package
  791. XC SIZEX is the (real) width of the plot (world coords)
  792. XC SIZEY               height
  793. XC TITLE is the text of the title
  794. XC
  795. XC The purpose of the routine is to initialise the
  796. XC graphics environment to a plot of dimensions
  797. XC sizex,sizey, with appropriate text height .
  798. XC At the end of processing, ENTRY GRCLOSE is called
  799. XC to terminate the plot.
  800. XC
  801. X      INCLUDE 'jobcom.h'
  802. X      INCLUDE 'lunits.h'
  803. X      CHARACTER*(*) TITLE
  804. XC
  805. X      FACX = SIZEX/7.
  806. X      FACY = SIZEY/7.
  807. X      L = LENOCC(TITLE)
  808. X      WRITE(LOUTCH,'(A)') '%! PostScript output from FLOW'
  809. X      WRITE(LOUTCH,'(A)') '/inch { 72 mul } def'
  810. X      WRITE(LOUTCH,*) '/xrel { ',facx,' div inch } def'
  811. X      WRITE(LOUTCH,*) '/yrel { ',facy,' div inch } def'
  812. X      WRITE(LOUTCH,*) '/Helvetica-Bold findfont 14 scalefont setfont'
  813. X      WRITE(LOUTCH,'(A)') '3.2 inch 7.7 inch moveto'
  814. X      WRITE(LOUTCH,'(3A)') '(Flow for node ',TITLE(:L),') show'
  815. X      WRITE(LOUTCH,'(A)') '.1 inch setlinewidth'
  816. X      WRITE(LOUTCH,'(A)') '0.5 inch 0.5 inch moveto'
  817. X      WRITE(LOUTCH,'(A)') '7.5 inch 0.5 inch lineto'
  818. X      WRITE(LOUTCH,'(A)') '7.5 inch 7.5 inch lineto'
  819. X      WRITE(LOUTCH,'(A)') '0.5 inch 7.5 inch lineto'
  820. X      WRITE(LOUTCH,'(A)') 'closepath'
  821. X      WRITE(LOUTCH,'(A)') 'stroke'
  822. X      WRITE(LOUTCH,'(A)') '0.5 inch 0.5 inch translate'
  823. X      WRITE(LOUTCH,'(A)') '.01 inch setlinewidth'
  824. X      WRITE(LOUTCH,*) '/Helvetica-Bold findfont 8 scalefont setfont'
  825. X      RETURN
  826. XC
  827. XC ENTRY GRCLOSE
  828. XC
  829. X      ENTRY GRCLOSE
  830. XC! Close the graphics package
  831. X      WRITE(LOUTCH,'(A)') 'showpage grestore'
  832. X      END
  833. END_OF_FILE
  834.   if test 1620 -ne `wc -c <'grinit.for'`; then
  835.     echo shar: \"'grinit.for'\" unpacked with wrong size!
  836.   fi
  837.   # end of 'grinit.for'
  838. fi
  839. if test -f 'iniarr.for' -a "${1}" != "-c" ; then 
  840.   echo shar: Will not clobber existing file \"'iniarr.for'\"
  841. else
  842.   echo shar: Extracting \"'iniarr.for'\" \(357 characters\)
  843.   sed "s/^X//" >'iniarr.for' <<'END_OF_FILE'
  844. X      SUBROUTINE INIARR
  845. XC! Initialise arrays
  846. X      INCLUDE 'params.h'
  847. X      INCLUDE 'tables.h'
  848. XC
  849. X      NPROC = 0
  850. X      NCOMM = 0
  851. X      DO 5 IP=1,MAXPRO
  852. X         PROCED_DONE(IP) = .FALSE.
  853. X         PROCED_EXTERN(IP) = .FALSE.
  854. X         PROCED_LEVEL(IP) = 0
  855. X         DO 6 IC=1,MAXCOM
  856. X            COMMON_USED(IP,IC) = ' '
  857. X   6  CONTINUE
  858. X   5  CONTINUE
  859. X      END
  860. END_OF_FILE
  861.   if test 357 -ne `wc -c <'iniarr.for'`; then
  862.     echo shar: \"'iniarr.for'\" unpacked with wrong size!
  863.   fi
  864.   # end of 'iniarr.for'
  865. fi
  866. if test -f 'make_cms.com' -a "${1}" != "-c" ; then 
  867.   echo shar: Will not clobber existing file \"'make_cms.com'\"
  868. else
  869.   echo shar: Extracting \"'make_cms.com'\" \(728 characters\)
  870.   sed "s/^X//" >'make_cms.com' <<'END_OF_FILE'
  871. X$! This procedure makes a complete FLOW program for
  872. X$! compilation on IBM/CMS.
  873. X$ copy *.for/excl=(vmsflow.for,unixflow.for) flow.fortran/log
  874. X$ purge flow.fortran
  875. X$ open/read in flow.fortran
  876. X$ open/write out cmsflow.fortran
  877. X$loop:
  878. X$ read/end=end_loop/err=end_loop in line
  879. X$ if f$locate("INCLUDE '",line) .eq. f$length(line)
  880. X$ then
  881. X$   write out "''line'"
  882. X$   goto loop
  883. X$ endif
  884. X$ file = f$element(1,"'",line) - "'"
  885. X$ write sys$output "Including ''file'"
  886. X$ open/read infile 'file
  887. X$loop2:
  888. X$ read/end=end_loop2/err=end_loop2 infile linein
  889. X$ write out "''linein'"
  890. X$ goto loop2
  891. X$end_loop2:
  892. X$ close infile
  893. X$ goto loop
  894. X$end_loop:
  895. X$ close in
  896. X$ close out
  897. X$ purge cmsflow.fortran
  898. X$ delete flow.fortran.
  899. X$ write sys$output "Finished"
  900. X$ exit
  901. END_OF_FILE
  902.   if test 728 -ne `wc -c <'make_cms.com'`; then
  903.     echo shar: \"'make_cms.com'\" unpacked with wrong size!
  904.   fi
  905.   # end of 'make_cms.com'
  906. fi
  907. if test -f 'make_vms.com' -a "${1}" != "-c" ; then 
  908.   echo shar: Will not clobber existing file \"'make_vms.com'\"
  909. else
  910.   echo shar: Extracting \"'make_vms.com'\" \(521 characters\)
  911.   sed "s/^X//" >'make_vms.com' <<'END_OF_FILE'
  912. X$! This procedure creates FLOW.EXE from its component Fortran
  913. X$! source files.
  914. X$! It assumes it is being executed in a dedicated [.flow] subdirectory.
  915. X$loop1:
  916. X$ file = f$search("*.for")
  917. X$ if file .eqs. "" then goto end_loop1
  918. X$ fortran 'file
  919. X$ goto loop1
  920. X$end_loop1:
  921. X$ library/create flow.olb
  922. X$loop2:
  923. X$ file = f$search("*.obj")
  924. X$ if file .eqs. "" then goto end_loop2
  925. X$ library/insert flow 'file
  926. X$ goto loop2
  927. X$end_loop2:
  928. X$ library/delete=flow flow
  929. X$ link/exe=flow.exe vmsflow,flow/lib
  930. X$ write sys$output "Finished."
  931. X$ exit
  932. END_OF_FILE
  933.   if test 521 -ne `wc -c <'make_vms.com'`; then
  934.     echo shar: \"'make_vms.com'\" unpacked with wrong size!
  935.   fi
  936.   # end of 'make_vms.com'
  937. fi
  938. if test -f 'params.h' -a "${1}" != "-c" ; then 
  939.   echo shar: Will not clobber existing file \"'params.h'\"
  940. else
  941.   echo shar: Extracting \"'params.h'\" \(337 characters\)
  942.   sed "s/^X//" >'params.h' <<'END_OF_FILE'
  943. X      PARAMETER (MXCHR=130,MXNAM=8,NDIS=4,MTITL=5,MPAGL=60)
  944. X      PARAMETER (MNLEV=200,MLEV=20,MSUBT=2000,MXIGN=100,MXOFF=6)
  945. X      PARAMETER (LCDOIF=32,MXLIN=130,LPSTA=80,MLEN=256)
  946. X      PARAMETER (MAXPRO=1200,MAXCALL=200,MAXCOM=200,LCMMNT=64)
  947. X      PARAMETER (MXENT=50,MXALL=100,MXCOM=100)
  948. X      PARAMETER (MARGS=50,MARGD=50,MKALL=100)
  949. END_OF_FILE
  950.   if test 337 -ne `wc -c <'params.h'`; then
  951.     echo shar: \"'params.h'\" unpacked with wrong size!
  952.   fi
  953.   # end of 'params.h'
  954. fi
  955. if test -f 'procom.for' -a "${1}" != "-c" ; then 
  956.   echo shar: Will not clobber existing file \"'procom.for'\"
  957. else
  958.   echo shar: Extracting \"'procom.for'\" \(2805 characters\)
  959.   sed "s/^X//" >'procom.for' <<'END_OF_FILE'
  960. X      SUBROUTINE PROCOM
  961. XC! Produce the COMMON block table
  962. X      INCLUDE 'params.h'
  963. X      INCLUDE 'lunits.h'
  964. X      INCLUDE 'trecom.h'
  965. X      INCLUDE 'tables.h'
  966. X      PARAMETER (LLINE=130,LOFF=10,MLINE=(LLINE-LOFF)/2,LPAGE=50)
  967. X      CHARACTER*(LLINE) CLINE
  968. X      CHARACTER*(LLINE+1) CTEMP
  969. XC
  970. X      CTEMP(:LOFF) = ' '
  971. X      CTEMP(LOFF+1:LOFF+1) = '+'
  972. X      DO 7 I=1,LLINE-LOFF-1
  973. X        CTEMP(LOFF+1+I:LOFF+1+I) = '-'
  974. X    7 CONTINUE
  975. X      CTEMP(LLINE+1:LLINE+1) = '+'
  976. XC
  977. XC
  978. X      WRITE(LOUT,'(A)') ' '
  979. X      WRITE(LOUT,'(A)') ' PROCOM Begins ....'
  980. X      WRITE(LOUT,'(A)') ' '
  981. XC
  982. XC write top page
  983. XC
  984. X      WRITE(LOUTCO,666)
  985. X  666 FORMAT(1X,20('*'),'              ProCom             ',20('*'),
  986. X     &     /,1X,20(' '),'              ======             ',20(' '),
  987. X     &     ///,1X,20(' '),' Module names appear along x-axis',
  988. X     &     /,1X,20(' '),' COMMON block names along y-axis',
  989. X     &     /,
  990. X     &     /,1X,20(' '),' <Y>  ==> COMMON used in module'
  991. X     &     /,1X,20(' '),' <N>  ==> COMMON not used (but is DECLARED)',
  992. X     &     /,1X,20(' '),' < >  ==> COMMON not DECLARED',
  993. X     &     /,1X,20('*'),'*********************************',20('*'))
  994. X      NPAGE = 0
  995. X      NCOLS = 0
  996. X    1 CONTINUE
  997. X      IF(NPAGE*LPAGE/2.GE.NCOMM) GOTO 110
  998. X    2 CONTINUE
  999. X      IF(NCOLS.GE.NPROC) GOTO 100
  1000. XC
  1001. XC move to new page
  1002. XC
  1003. X      WRITE(LOUTCO,490)
  1004. X  490 FORMAT(1H1)
  1005. X      DO 5 ILET = 1,6
  1006. X        CLINE(:) = ' '
  1007. X        DO 10 IPRO=1,MIN(NPROC,MLINE)
  1008. X          IPRO1 = IPRO+NCOLS
  1009. X          IF(IPRO1.GT.NPROC) GOTO 11
  1010. X          IPOS = IPRO*2 + LOFF
  1011. X          IF(LENOCC(PROCED_NAME(IPRO1)).LT.ILET) THEN
  1012. X            CLINE(IPOS:IPOS) = ' '
  1013. X          ELSE
  1014. X            CLINE(IPOS:IPOS) = PROCED_NAME(IPRO1)(ILET:ILET)
  1015. X          ENDIF
  1016. X   10   CONTINUE
  1017. X   11   CONTINUE
  1018. X        WRITE(LOUTCO,'(A)') CLINE(:LLINE)
  1019. X    5 CONTINUE
  1020. XC
  1021. XC now loop over all common names
  1022. XC
  1023. X      WRITE(LOUTCO,'(A)') CTEMP(:LLINE)
  1024. X      DO 15 ICOM=1,MIN(NCOMM,LPAGE/2)
  1025. X        ICOM1 = ICOM+NPAGE*LPAGE/2
  1026. X        IF(ICOM1.GT.NCOMM) GOTO 16
  1027. X        CLINE = COMMON_NAME(ICOM1)
  1028. X        LINE = LENOCC(CLINE)
  1029. XC
  1030. XC now find procedures using this common
  1031. XC loop over them, constructing cline
  1032. XC
  1033. X        DO 20 IPROC=NCOLS+1,MIN(NCOLS+MLINE,NPROC)
  1034. X          IPOS1 = IPROC - NCOLS
  1035. X          IPOS = IPOS1*2 + LOFF -1
  1036. X          CLINE(IPOS:IPOS) = COMMON_USED(IPROC,ICOM)
  1037. X   20   CONTINUE
  1038. X        CLINE(10:10) = '|'
  1039. X        CLINE(LLINE:LLINE) = '|'
  1040. X        WRITE(LOUTCO,'(1X,A)') CLINE(:LLINE)
  1041. X        CLINE = ' '
  1042. X        CLINE(10:10) = '|'
  1043. X        CLINE(LLINE:LLINE) = '|'
  1044. XC       WRITE(LOUTCO,'(1X,A)') CLINE(:LLINE)
  1045. X   15 CONTINUE
  1046. X   16 CONTINUE
  1047. X      WRITE(LOUTCO,'(A)') CTEMP(:LLINE)
  1048. X   90 CONTINUE
  1049. X      NCOLS = NCOLS+MLINE
  1050. X      GOTO 2
  1051. X  100 CONTINUE
  1052. X      NPAGE = NPAGE+1
  1053. X      NCOLS = 0
  1054. X      GOTO 1
  1055. X  110 CONTINUE
  1056. X      WRITE(LOUT,'(A)') ' PROCOM Finished'
  1057. X      END
  1058. END_OF_FILE
  1059.   if test 2805 -ne `wc -c <'procom.for'`; then
  1060.     echo shar: \"'procom.for'\" unpacked with wrong size!
  1061.   fi
  1062.   # end of 'procom.for'
  1063. fi
  1064. if test -f 'prodes.for' -a "${1}" != "-c" ; then 
  1065.   echo shar: Will not clobber existing file \"'prodes.for'\"
  1066. else
  1067.   echo shar: Extracting \"'prodes.for'\" \(675 characters\)
  1068.   sed "s/^X//" >'prodes.for' <<'END_OF_FILE'
  1069. X      SUBROUTINE PRODES
  1070. XC! Steer the FLOW program
  1071. X      INCLUDE 'jobcom.h'
  1072. X      INCLUDE 'lunits.h'
  1073. X      LOUT  = 6
  1074. X      LINTRE = 50
  1075. XC
  1076. XC Initialise some arrays
  1077. XC
  1078. X      CALL INIARR
  1079. XC
  1080. XC process the input data from FLOP into tables
  1081. XC
  1082. X      IPASS = 1
  1083. X      CALL RDFLOP(IPASS)
  1084. XC
  1085. XC find the external routine names
  1086. XC
  1087. X      CALL EXTERN
  1088. XC
  1089. XC produce the tree chart
  1090. XC
  1091. X      IF(LTREE) CALL PROTRE
  1092. XC
  1093. XC produce the graphical structure chart
  1094. XC
  1095. X      IF(LCHRT) CALL PROCHT
  1096. XC
  1097. XC produce the subroutine headers
  1098. XC
  1099. XC      IF(LSUBS) CALL PROSUB
  1100. XC
  1101. XC produce the common block table
  1102. XC
  1103. X      IF(LCOMM) CALL PROCOM
  1104. XC
  1105. XC enter the subroutine tree query routine
  1106. XC
  1107. X      IF(LQERY) CALL PROQRY
  1108. XC
  1109. X      END
  1110. END_OF_FILE
  1111.   if test 675 -ne `wc -c <'prodes.for'`; then
  1112.     echo shar: \"'prodes.for'\" unpacked with wrong size!
  1113.   fi
  1114.   # end of 'prodes.for'
  1115. fi
  1116. if test -f 'proqry.for' -a "${1}" != "-c" ; then 
  1117.   echo shar: Will not clobber existing file \"'proqry.for'\"
  1118. else
  1119.   echo shar: Extracting \"'proqry.for'\" \(4274 characters\)
  1120.   sed "s/^X//" >'proqry.for' <<'END_OF_FILE'
  1121. X      SUBROUTINE PROQRY
  1122. XC! Interactively look at the tree
  1123. X      PARAMETER (ICOMM=40,LLINE=80)
  1124. X      INCLUDE 'params.h'
  1125. X      INCLUDE 'tables.h'
  1126. X      INCLUDE 'floppy.h'
  1127. X      INCLUDE 'lunits.h'
  1128. X      INCLUDE 'trecom.h'
  1129. X      CHARACTER*(MXNAM) CNAM,CNAM2,CIN,CTEMP,CROUT(MAXPRO)
  1130. X      CHARACTER*(LLINE) CLINE(MAXPRO)
  1131. X      INTEGER SEARCH
  1132. X      EXTERNAL SEARCH
  1133. X      LOGICAL OK
  1134. XC
  1135. X      WRITE(LOUT,'(A)') ' '
  1136. X      WRITE(LOUT,'(A)') ' PROQRY Begins ....'
  1137. X      WRITE(LOUT,'(A)') ' '
  1138. XC
  1139. X      IDONE = 0
  1140. X      WRITE(LOUT,'(A)') ' Show list of routines ? '
  1141. X      READ(5,'(A)') CTEMP
  1142. X      CALL CASCHG(CTEMP,CIN)
  1143. X    8 CONTINUE
  1144. X      IF(CIN(:1).EQ.'Y') THEN
  1145. X         WRITE(6,'(A)') ' Routines in the tree (in source order)'
  1146. X         IF(.NOT.LEXT) WRITE(6,'(A)') ' (Excluding externals)'
  1147. X         WRITE(6,'(A)') ' --------------------------------------'
  1148. X         IF(LEXT) THEN
  1149. X            WRITE(6,100) (PROCED_NAME(I),I=1,NPROC)
  1150. X         ELSE IF(IDONE.EQ.0) THEN
  1151. X            IOUT = 0
  1152. X            DO 22 I=1,NPROC
  1153. X               IF(PROCED_EXTERN(I)) GOTO 22
  1154. X               IOUT = IOUT + 1
  1155. X               CROUT(IOUT) = PROCED_NAME(I)
  1156. X   22       CONTINUE
  1157. X            WRITE(6,100) (CROUT(I),I=1,IOUT)
  1158. X            IDONE = 1
  1159. X         ELSE
  1160. X            WRITE(6,100) (CROUT(I),I=1,IOUT)
  1161. X         ENDIF
  1162. X  100    FORMAT((1X,10A))
  1163. X      ENDIF
  1164. XC
  1165. X    2 CONTINUE
  1166. X      WRITE(LOUT,'(A)') ' Which routine ? (? for list) '
  1167. X      READ(5,'(A)') CTEMP
  1168. X      CALL CASCHG(CTEMP,CIN)
  1169. X      IF(INDEX(CIN,' ').EQ.1) GOTO 999
  1170. X      IF(CIN.EQ.'?') THEN
  1171. X         CIN = 'Y'
  1172. X         GOTO 8
  1173. X      ENDIF
  1174. X    9 CNAM = CIN
  1175. X      L = INDEX(CIN,' ')-1
  1176. X      IF(L.EQ.1.AND.CIN.EQ.'Q') GOTO 999
  1177. X      IFOUN = SEARCH(CNAM)
  1178. X      IF(IFOUN.EQ.0) THEN
  1179. X         WRITE(6,'(1X,A,A)') CNAM,' is not in the source !'
  1180. X         GOTO 2
  1181. X      ENDIF
  1182. X      IPNAM = IFOUN
  1183. XC
  1184. X      IOFF  = 0
  1185. X      ILINE = 0
  1186. X      IF(PROCED_NCALLEDBY(IPNAM).LE.0) THEN
  1187. XC NO CALLERS
  1188. X         ILINE = ILINE + 1
  1189. X         CLINE(ILINE)(:LLINE) = ' '
  1190. X      ELSE 
  1191. XC CALLERS ... FIND THEM
  1192. X         DO 5 IPNAM2=1,NPROC
  1193. X            IF(PROCED_NCALLS(IPNAM2).LE.0) GOTO 5
  1194. X            DO 6 IC=1,PROCED_NCALLS(IPNAM2)
  1195. X               IF(PROCED_CALLS(IPNAM2,IC).NE.IPNAM) GOTO 6            
  1196. X               ILINE = ILINE + 1
  1197. X               CLINE(ILINE)(:LLINE) = ' '
  1198. X               CLINE(ILINE)(:MXNAM) = PROCED_NAME(IPNAM2)
  1199. X               CLINE(ILINE)(ICOMM:LLINE) = PROCED_DESCRIP(IPNAM2)
  1200. X               GOTO 5
  1201. X    6       CONTINUE
  1202. X    5    CONTINUE
  1203. X      ENDIF
  1204. XC
  1205. X      ICENT = MXNAM/2+ 2 + IOFF
  1206. X      ILINE = ILINE + 1
  1207. X      CLINE(ILINE)(:LLINE) = ' '
  1208. X      IF(PROCED_NCALLEDBY(IPNAM).GE.1) THEN
  1209. X         CLINE(ILINE)(ICENT:ICENT+5) = '|---- '
  1210. X      ENDIF
  1211. X      IOFF = ICENT + 6
  1212. XC
  1213. X      CLINE(ILINE)(IOFF:IOFF+MXNAM) = CNAM
  1214. X      CLINE(ILINE)(ICOMM:LLINE) = PROCED_DESCRIP(IPNAM)
  1215. X      IOFF = ICENT + 7 + MXNAM/2
  1216. X      IF(PROCED_NCALLS(IPNAM).EQ.0) THEN
  1217. X        CLINE(ILINE)(IOFF+1:IOFF+1) = '.'
  1218. X        IF(PROCED_EXTERN(IPNAM)) 
  1219. X     &     CLINE(ILINE)(IOFF+1:IOFF+1) = '*'
  1220. X      ELSE IF(PROCED_NCALLS(IPNAM).GE.1) THEN
  1221. X        DO 7 IC=1,PROCED_NCALLS(IPNAM)
  1222. X          IPNAM2 = PROCED_CALLS(IPNAM,IC)
  1223. X          IF(.NOT.LEXT.AND.PROCED_EXTERN(IPNAM2)) GOTO 7
  1224. X          ILINE = ILINE + 1
  1225. X          CLINE(ILINE)(:LLINE) = ' '
  1226. X          CLINE(ILINE)(IOFF:IOFF+6) = '|---- '
  1227. X          INOFF = IOFF + 7
  1228. X          CLINE(ILINE)(INOFF:INOFF+MXNAM) = PROCED_NAME(IPNAM2)
  1229. X          CLINE(ILINE)(ICOMM:LLINE) = PROCED_DESCRIP(IPNAM2)
  1230. X    7   CONTINUE
  1231. X      ENDIF
  1232. XC
  1233. XC WRITE OUT TREE
  1234. XC
  1235. X      WRITE(6,200)
  1236. X  200 FORMAT(1X,79('-'),/,1X,'Caller(s)  Node        Calls   ',
  1237. X     &       '              Description',
  1238. X     &     /,1X,79('-'))
  1239. X      WRITE(6,210) (CLINE(I),I=1,ILINE)
  1240. X  210 FORMAT(1X,A)
  1241. X      WRITE(6,220)
  1242. X  220 FORMAT(1X,79('-'))
  1243. XC
  1244. X      WRITE(6,'(A)') ' '
  1245. X      WRITE(6,'(A,A)') ' What next ? [L=list routines,Q=quit,',
  1246. X     &      'or enter routine name]'
  1247. X      READ(5,'(A)') CTEMP
  1248. X      CALL CASCHG(CTEMP,CIN)
  1249. X      IF(INDEX(CIN,' ').EQ.1) GOTO 999
  1250. X      IF(INDEX(CIN,' ').EQ.2) THEN
  1251. X         IF(INDEX(CIN,'Q').EQ.1.OR.INDEX(CIN,'q').EQ.1) GOTO 999
  1252. X         IF(INDEX(CIN,'L').EQ.1.OR.INDEX(CIN,'l').EQ.1) THEN
  1253. X            CIN = 'Y'
  1254. X            GOTO 8
  1255. X         ENDIF
  1256. X      ENDIF
  1257. X      GOTO 9
  1258. X  900 CONTINUE
  1259. X  999 CONTINUE
  1260. X      WRITE(6,'(A)') ' PROQRY Finished'
  1261. X      END
  1262. END_OF_FILE
  1263.   if test 4274 -ne `wc -c <'proqry.for'`; then
  1264.     echo shar: \"'proqry.for'\" unpacked with wrong size!
  1265.   fi
  1266.   # end of 'proqry.for'
  1267. fi
  1268. if test -f 'tabent.for' -a "${1}" != "-c" ; then 
  1269.   echo shar: Will not clobber existing file \"'tabent.for'\"
  1270. else
  1271.   echo shar: Extracting \"'tabent.for'\" \(2662 characters\)
  1272.   sed "s/^X//" >'tabent.for' <<'END_OF_FILE'
  1273. X      SUBROUTINE TABENT(IPASS)
  1274. XC! Enter data into tables
  1275. X      INCLUDE 'params.h'
  1276. X      INCLUDE 'tables.h'
  1277. X      INCLUDE 'floppy.h'
  1278. X      INCLUDE 'lunits.h'
  1279. X      INTEGER SEARCH
  1280. X      EXTERNAL SEARCH
  1281. X      CHARACTER*(LCDOIF) CMNT,CDOIF
  1282. XC
  1283. X      IF(IPASS.NE.1) GOTO 100
  1284. X      IF(NPROC+NENT.GT.MAXPRO) GOTO 900
  1285. X      IF(NCOMM+NCOM.GT.MAXCOM) GOTO 910
  1286. X      DO 10 IN=1,NENT
  1287. X        PROCED_NAME(NPROC+IN) = CALLER(IN)
  1288. X        CMNT = '      '
  1289. X        IF(LENOCC(CMMNT).NE.0) THEN
  1290. X          CMNT = ' '
  1291. X          DO 55 IC=1,LENOCC(CMMNT)
  1292. X            IF(CMMNT(IC:IC).NE.' ') THEN
  1293. X              IF(IC.LT.LENOCC(CMMNT)) CMNT = CMMNT(IC:)
  1294. X              GOTO 56
  1295. X            ENDIF
  1296. X   55     CONTINUE
  1297. X   56     CONTINUE
  1298. X        ENDIF
  1299. X        PROCED_DESCRIP(NPROC+IN) = CMNT
  1300. XC
  1301. XC loop over common block names
  1302. XC
  1303. X        DO 20 IC=1,NCOM
  1304. X          DO 21 ICO=1,NCOMM
  1305. X            IF(COMMON_NAME(ICO).EQ.CNAMES(IC)) THEN
  1306. X              COMMON_USED(NPROC+IN,ICO) = 'Y'
  1307. X              IF(UNUSED(IC).EQ.'!')
  1308. X     &            COMMON_USED(NPROC+IN,ICO) = 'N'
  1309. X              GOTO 22
  1310. X            ENDIF
  1311. X   21     CONTINUE
  1312. X          NCOMM = NCOMM + 1
  1313. X          COMMON_NAME(NCOMM) = CNAMES(IC)
  1314. X          COMMON_USED(NPROC+IN,NCOMM) = 'Y'
  1315. X          IF(UNUSED(IC).EQ.'!')
  1316. X     &       COMMON_USED(NPROC+IN,NCOMM) = 'N'
  1317. X   20   CONTINUE
  1318. X   22   PROCED_NCALLS(NPROC+IN) = KALL
  1319. X        DO 50 ICL=1,KALL
  1320. XC
  1321. XC compose doif string
  1322. XC
  1323. X          CDOIF(:) = ' '
  1324. X          ILDO = MIN(KALLDO(ICL),LCDOIF)
  1325. X          DO 30 IDO=1,ILDO
  1326. X            CDOIF(IDO:IDO) = '('
  1327. X   30     CONTINUE
  1328. X          ILIF = MIN(LCDOIF-ILDO,KALLIF(ICL))
  1329. X          DO 31 IIF=1,ILIF
  1330. X            CDOIF(ILDO+IIF:ILDO+IIF) = '?'
  1331. X   31     CONTINUE
  1332. X          PROCED_DOIF(NPROC+IN,ICL) = CDOIF
  1333. X   50   CONTINUE
  1334. X   10 CONTINUE
  1335. X      NPROC = NPROC + NENT
  1336. X      RETURN
  1337. XC
  1338. XC second pass for external names
  1339. XC
  1340. X  100 CONTINUE
  1341. X      DO 110 IN=1,NENT
  1342. X        IF(KALL.LE.0) GOTO 110
  1343. X        IPNAM = SEARCH(CALLER(IN))
  1344. X        DO 120 IC=1,KALL
  1345. X          IPNAM2 = SEARCH(CALLED(IC))
  1346. X          IF(IPNAM2.EQ.0) THEN
  1347. X            NPROC = NPROC + 1
  1348. X            IPNAM2 = NPROC
  1349. X            PROCED_NAME(NPROC) = CALLED(IC)
  1350. X            PROCED_DESCRIP(NPROC) = 'External'
  1351. X            PROCED_EXTERN(NPROC) = .TRUE.
  1352. X            PROCED_NCALLS(NPROC) = 0
  1353. X            PROCED_NCALLEDBY(NPROC) = 0
  1354. X          ENDIF
  1355. X          PROCED_CALLS(IPNAM,IC) = IPNAM2
  1356. X          NCALLEDBY = PROCED_NCALLEDBY(IPNAM2) + 1
  1357. X          PROCED_NCALLEDBY(IPNAM2) = NCALLEDBY
  1358. X  120   CONTINUE
  1359. X  110 CONTINUE
  1360. X      RETURN
  1361. X  900 WRITE(LOUT,'(A)') ' TABENT : MAXIMUM NO. OF PROCEDURES EXCEEDED'
  1362. X      STOP 2
  1363. X  910 WRITE(LOUT,'(A)') ' TABENT : MAXIMUM NO. OF COMMONS EXCEEDED'
  1364. X      STOP 3
  1365. X      END
  1366. END_OF_FILE
  1367.   if test 2662 -ne `wc -c <'tabent.for'`; then
  1368.     echo shar: \"'tabent.for'\" unpacked with wrong size!
  1369.   fi
  1370.   # end of 'tabent.for'
  1371. fi
  1372. if test -f 'tables.h' -a "${1}" != "-c" ; then 
  1373.   echo shar: Will not clobber existing file \"'tables.h'\"
  1374. else
  1375.   echo shar: Extracting \"'tables.h'\" \(876 characters\)
  1376.   sed "s/^X//" >'tables.h' <<'END_OF_FILE'
  1377. X      COMMON /TABLES/ PROCED_NAME(MAXPRO),
  1378. X     &                PROCED_DESCRIP(MAXPRO),
  1379. X     &                PROCED_DOIF(MAXPRO,MAXCALL),
  1380. X     &                COMMON_NAME(MAXCOM),
  1381. X     &                COMMON_USED(MAXPRO,MAXCOM)
  1382. X      COMMON /TABLE1/ NPROC,NCOMM,
  1383. X     &                PROCED_EXTERN(MAXPRO),
  1384. X     &                PROCED_NCALLS(MAXPRO),
  1385. X     &                PROCED_CALLS(MAXPRO,MAXCALL),
  1386. X     &                PROCED_NCALLEDBY(MAXPRO),
  1387. X     &                PROCED_LEVEL(MAXPRO),
  1388. X     &                PROCED_DONE(MAXPRO) 
  1389. X      CHARACTER*(MXNAM) PROCED_NAME
  1390. X      CHARACTER*(MXNAM) COMMON_NAME
  1391. X      CHARACTER*(LCDOIF) PROCED_DOIF
  1392. X      CHARACTER*(LCMMNT) PROCED_DESCRIP
  1393. X      CHARACTER*1 COMMON_USED
  1394. X      INTEGER NPROC,NCOMM,PROCED_NCALLS,PROCED_CALLS,PROCED_NCALLEDBY
  1395. X      INTEGER PROCED_CALLEDBY,PROCED_LEVEL
  1396. X      LOGICAL PROCED_DONE,PROCED_EXTERN
  1397. END_OF_FILE
  1398.   if test 876 -ne `wc -c <'tables.h'`; then
  1399.     echo shar: \"'tables.h'\" unpacked with wrong size!
  1400.   fi
  1401.   # end of 'tables.h'
  1402. fi
  1403. if test -f 'trecom.h' -a "${1}" != "-c" ; then 
  1404.   echo shar: Will not clobber existing file \"'trecom.h'\"
  1405. else
  1406.   echo shar: Extracting \"'trecom.h'\" \(131 characters\)
  1407.   sed "s/^X//" >'trecom.h' <<'END_OF_FILE'
  1408. X      COMMON /TRECOM/ LEXT,CTREE,NSUBNM,LSUBNM(MSUBT),CSUBNM(MSUBT)
  1409. X      CHARACTER*(MXNAM) CTREE,CSUBNM
  1410. X      LOGICAL LSUBNM,LEXT
  1411. END_OF_FILE
  1412.   if test 131 -ne `wc -c <'trecom.h'`; then
  1413.     echo shar: \"'trecom.h'\" unpacked with wrong size!
  1414.   fi
  1415.   # end of 'trecom.h'
  1416. fi
  1417. if test -f 'vmsflow.for' -a "${1}" != "-c" ; then 
  1418.   echo shar: Will not clobber existing file \"'vmsflow.for'\"
  1419. else
  1420.   echo shar: Extracting \"'vmsflow.for'\" \(5375 characters\)
  1421.   sed "s/^X//" >'vmsflow.for' <<'END_OF_FILE'
  1422. X      PROGRAM FLOW
  1423. X      INCLUDE 'params.h'
  1424. X      INCLUDE 'jobcom.h'
  1425. X      INCLUDE 'lunits.h'
  1426. X      INCLUDE 'trecom.h'
  1427. X      INCLUDE 'ignore.h'
  1428. XC
  1429. X      INTEGER*4 STATUS,CLI$GET_VALUE,CLI$PRESENT
  1430. X      INTEGER*4 LIB$FIND_FILE,LIB$FIND_FILE_END
  1431. X      INCLUDE '($SSDEF)'
  1432. X      INCLUDE '($RMSDEF)'
  1433. X      INCLUDE '($LBRDEF)'
  1434. X      EXTERNAL CLI$_PRESENT,CLI$_DEFAULTED,CLI$_ABSENT,CLI$_NEGATED
  1435. X      CHARACTER*(MXLIN) CIN
  1436. X      CHARACTER*(MXLIN) CFLOP
  1437. X      CHARACTER*(MXLIN) CTEMPL
  1438. X      CHARACTER*1024 CLONG
  1439. X      LOGICAL LOG
  1440. X      CHARACTER*(MLEN) CMMND
  1441. XC
  1442. X      LOG = .FALSE.
  1443. X      LPRINT = .FALSE.
  1444. X      LDEBUG = .FALSE.
  1445. X      NIGNO = 0
  1446. XC
  1447. XC LOG
  1448. XC
  1449. X      STATUS = CLI$PRESENT('LOG')
  1450. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT).OR.
  1451. X     &   STATUS.EQ.%LOC(CLI$_DEFAULTED)) THEN
  1452. X        LOG = .TRUE.
  1453. X      ENDIF
  1454. XC
  1455. XC INPUT TREE FROM FLOPPY
  1456. XC
  1457. X      ITREE = 0
  1458. X      STATUS = CLI$PRESENT('P1')
  1459. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1460. X        STATUS = CLI$GET_VALUE('P1',CIN)
  1461. X        IF(.NOT.STATUS) STATUS = LIB$STOP(%VAL(STATUS))
  1462. X        STATUS = LIB$FIND_FILE(CIN,CFLOP,I,'flow.floptre')
  1463. X        IF(.NOT.STATUS) STATUS = LIB$STOP(%VAL(STATUS))
  1464. X        STATUS = LIB$FIND_FILE_END(I)
  1465. X        ITREE = 1
  1466. X        IF(LOG)WRITE(6,'(A,A)')' Flow --> Input FLOPPY data:',
  1467. X     &  CFLOP(:LENOCC(CFLOP))
  1468. X        LINTRE = 50
  1469. X        OPEN(LINTRE,FILE=CFLOP,ACCESS='SEQUENTIAL',READONLY,
  1470. X     &  FORM='UNFORMATTED',STATUS='OLD',ERR=999)
  1471. X      ENDIF
  1472. XC
  1473. XC QUERY TREE
  1474. XC
  1475. X      LQERY = .FALSE.
  1476. X      STATUS = CLI$PRESENT('QUERY')
  1477. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1478. X        LQERY = .TRUE.
  1479. X        IF(LOG)WRITE(6,'(A)') ' Flow --> Queries on the tree'
  1480. X      ENDIF
  1481. XC
  1482. XC COMMON BLOCK TABLE
  1483. XC
  1484. X      LCOMM = .FALSE.
  1485. X      STATUS = CLI$PRESENT('COMMON_TABLE')
  1486. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1487. X        LCOMM = .TRUE.
  1488. X        IF(LOG)WRITE(6,'(A)') ' Flow --> Produce COMMON table'
  1489. X        STATUS = CLI$GET_VALUE('COMMON_TABLE',CIN)
  1490. X        CCOMM = 'PROCOM.DAT'
  1491. X        IF(STATUS.NE.%LOC(CLI$_ABSENT)) CCOMM = CIN
  1492. X        IF(LOG)WRITE(6,'(A,A)')
  1493. X     &' Flow --> write COMMON table to:',CCOMM(:LENOCC(CCOMM))
  1494. X        LOUTCO = 60
  1495. X        OPEN(LOUTCO,FILE=CCOMM,STATUS='NEW',ERR=999)
  1496. X      ENDIF
  1497. XC
  1498. XC TREE
  1499. XC
  1500. X      LTREE = .FALSE.
  1501. X      STATUS = CLI$PRESENT('STRUCTURE_CHART')
  1502. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1503. X        LTREE = .TRUE.
  1504. X        IF(LOG)WRITE(6,'(A)') ' Flow --> Produce Text Structure Chart'
  1505. X        STATUS = CLI$GET_VALUE('STRUCTURE_CHART',CIN)
  1506. X        CHART = 'PROTRE.DAT'
  1507. X        IF(STATUS.NE.%LOC(CLI$_ABSENT)) CHART = CIN
  1508. X        IF(LOG)WRITE(6,'(A,A)')
  1509. X     &' Flow --> write Structure Chart to: ',CHART(:LENOCC(CHART))
  1510. X        LOUTRE = 61
  1511. X        OPEN(LOUTRE,FILE=CHART,STATUS='NEW',ERR=999)
  1512. X      ENDIF
  1513. XC
  1514. XC IGNORE NAMES
  1515. XC
  1516. X      STATUS = CLI$PRESENT('IGNORE')
  1517. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1518. X   60   STATUS = CLI$GET_VALUE('IGNORE',CLONG)
  1519. X        IF(STATUS.NE.%LOC(CLI$_ABSENT)) THEN
  1520. X           NIGNO = NIGNO + 1
  1521. X           LLONG = LENOCC(CLONG)
  1522. X           CIGNO(NIGNO) = CLONG(:LLONG) 
  1523. X           LIGNO(NIGNO) = LLONG
  1524. X           GOTO 60
  1525. X        ENDIF
  1526. X        IF(LOG) WRITE(6,'(A)') ' Flow --> Ignore modules:'
  1527. X        IF(LOG) WRITE(6,'(10X,6A8)') (CIGNO(IG),IG=1,NIGNO)
  1528. X      ENDIF
  1529. XC
  1530. XC Graphics Structure Chart
  1531. XC
  1532. X      LCHRT = .FALSE.
  1533. X      STATUS = CLI$PRESENT('GRAPHICS')
  1534. X      IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1535. X        STATUS = CLI$GET_VALUE('GRAPHICS',CIN)
  1536. X        LOUTCH = 96
  1537. X        CGRAPH = 'FLOW.PS'
  1538. X        IF(STATUS) CGRAPH = CIN
  1539. X        IF(LOG)WRITE(6,'(A,A)') ' Flow --> Chart name:',
  1540. X     &                 CGRAPH(:LENOCC(CGRAPH))
  1541. X        LCHRT = .TRUE.
  1542. X        OPEN(LOUTCH,FILE=CGRAPH(:LENOCC(CGRAPH)),STATUS='NEW',
  1543. X     &       CARRIAGECONTROL='LIST',ERR=999)
  1544. X      ENDIF
  1545. XC
  1546. XC NOEXTERNALS
  1547. XC
  1548. X      LEXT =.FALSE.
  1549. XC
  1550. X      IF(.NOT.LTREE.AND..NOT.LCHRT) GOTO 5
  1551. XC
  1552. X      STATUS = CLI$PRESENT('EXTERNALS')
  1553. X      IF(STATUS.EQ.%LOC(CLI$_NEGATED)) THEN
  1554. X        IF(LOG)WRITE(6,'(A)')
  1555. X     &  ' Flow --> Suppress external routines from the chart'
  1556. X        LEXT = .FALSE.
  1557. X      ELSE
  1558. XC
  1559. XC EXTERNALS
  1560. XC
  1561. X        IF(LOG)WRITE(6,'(A)')
  1562. X     &  ' Flow --> Include external routines in the chart'
  1563. X        LEXT = .TRUE.
  1564. X      ENDIF
  1565. XC
  1566. XC NODE
  1567. XC
  1568. X      STATUS = CLI$PRESENT('NODE')
  1569. X      IF(STATUS.EQ.%LOC(CLI$_DEFAULTED)) THEN
  1570. X        CTREE = '$$$$'
  1571. X        IF(LOG)WRITE(6,'(A)') ' Flow --> Take first node found'
  1572. X      ELSE IF(STATUS.EQ.%LOC(CLI$_PRESENT)) THEN
  1573. X        STATUS = CLI$GET_VALUE('NODE',CIN)
  1574. X        IF(STATUS.NE.%LOC(CLI$_ABSENT)) THEN
  1575. X          CTREE = CIN(:LENOCC(CIN))
  1576. X          IF(LOG)WRITE(6,'(A,A)')' Flow --> Start chart from:',
  1577. X     &    CTREE(:LENOCC(CTREE))
  1578. X        ELSE
  1579. X          CTREE = '$$$$'
  1580. X          IF(LOG)WRITE(6,'(A)') ' Flow --> Take first node found'
  1581. X        ENDIF
  1582. X      ENDIF
  1583. X    5 CONTINUE
  1584. XC
  1585. X      IF(LOG)WRITE(6,'(A)')
  1586. X     &' Flow --> Finished parsing command string'
  1587. XC
  1588. X      CALL PRODES
  1589. XC
  1590. X      IF(LCHRT) CLOSE(LOUTCH)
  1591. X      IF(LCOMM) CLOSE(LOUTCO)
  1592. X      IF(LTREE) CLOSE(LOUTRE)
  1593. X      CLOSE(LINTRE)
  1594. XC
  1595. X      GOTO 1000
  1596. X  999 CONTINUE
  1597. X      WRITE(6,500)
  1598. X  500 FORMAT(//,1X,'***********************************************',
  1599. X     &        /,1X,'*                 F  L  O  W                  *',
  1600. X     &        /,1X,'*                   ABORTED                   *',
  1601. X     &        /,1X,'*          in job preparation stage.          *',
  1602. X     &        /,1X,'***********************************************')
  1603. X 1000 CONTINUE
  1604. X      END
  1605. END_OF_FILE
  1606.   if test 5375 -ne `wc -c <'vmsflow.for'`; then
  1607.     echo shar: \"'vmsflow.for'\" unpacked with wrong size!
  1608.   fi
  1609.   # end of 'vmsflow.for'
  1610. fi
  1611. echo shar: End of archive 4 \(of 5\).
  1612. cp /dev/null ark4isdone
  1613. MISSING=""
  1614. for I in 1 2 3 4 5 ; do
  1615.     if test ! -f ark${I}isdone ; then
  1616.     MISSING="${MISSING} ${I}"
  1617.     fi
  1618. done
  1619. if test "${MISSING}" = "" ; then
  1620.     echo You have unpacked all 5 archives.
  1621.     rm -f ark[1-9]isdone
  1622. else
  1623.     echo You still must unpack the following archives:
  1624.     echo "        " ${MISSING}
  1625. fi
  1626. exit 0
  1627. exit 0 # Just in case...
  1628.