My Source Code Diagramming Programs

Last revised 4/9/2006

INTRODUCTION

These programs diagram source code in the following languages:

  C and C++
  FORTRAN
  HTML (very incomplete)
  IDL, PV-WAVE, GDL and FL

They do things like draw lines showing the start and end of routines and blocks, put * next to jumps, and = next to commented out sections, and can warn you of certain classes of error.

They can help you find problems in your own code, or help you look at other people's long complicated legacy code.

For example:

      +---------------- subroutine a(x)         |   1
      |+--------------- do i=1,5                |   2
      ||+---------------- if(i/2*2.eq.i)then    |   3
      |||                   x=x*i               |   4
      ||+---------------- else                  |   5
      |||                   x=x/i               |   6
      ||+---------------- endif                 |   7
      |+--------------- enddo                   |   8
      +---------------- end                     |   9

The VAX and MS-DOS procedures have not recently been tested.

If you like or dislike these programs, send e-mail to username grunes at domain yahoo.com.

Bug reports must include sample code on which it failed.

The programs themselves are in FORTRAN. I know that is a problem for users of other programming languages, but FORTRAN is freely available as g77 or g95 under Cygwin (under Windows) or Linux, and is available as f77, f90 or f95 on many other platforms. Compilation is simple, e.g.

  g77 diagramf.f -o diagramf

The following source code and procedures were modified for display by web browsers. To use them:
1. Remove ".html" from the file names.
2. Remove the 4 lines of HTML code added to the beginnings.
3. Remove the line of HTML code added to the end.

diagramc: Diagrams C, C++

diagramc.f Fortran language source code
Procedures to run diagramc without answering questions:
diagramc.sh Unix csh procedure
diagramc.bat MS-DOS procedure
diagramc.vax VAX VMS DCL procedure

diagramf: Diagrams FORTRAN

diagramf.f Fortran language source code
Procedures to run diagramf without answering questions on card format code:
diagramf.sh Unix csh procedure
diagramf.bat MS-DOS procedure
diagramf.vax VAX VMS DCL procedure
Procedures to run diagramf without answering questions on free format code:
diagram9.sh Unix csh procedure
diagram9.bat MS-DOS procedure
diagram9.vax VAX VMS DCL procedure

diagramh: Diagrams HTML (Very Incomplete)

diagramh.f Fortran language source code (doesn't show right on web browsers)
Procedures to run diagramh without answering questions:
diagramh.sh Unix csh procedure
diagramh.bat MS-DOS procedure
diagramh.vax VAX VMS DCL procedure

diagrami: Diagrams IDL, PV-WAVE, GDL, FL

diagrami.f Fortran language source code
Procedures to run diagrami without answering questions:
diagrami.sh Unix csh procedure
diagrami.bat MS-DOS procedure
diagrami.vaxVAX VMS DCL procedure

undiagram: Try to derive source code from diagram

undiagram.f Fortran language source code
If you have trouble reading this web page, see my post to alt.sources with this title: My source code diagramming programs

My home page