rem                     ---diagramc.bat---
rem MS-DOS procedure to diagram a C language program.

rem  by Mitchell R Grunes.

rem I assume that the executable is in directory c:\grunes on
rem  your PC.

rem Syntax:
rem     diagramc
rem to be prompted for input parameters.

rem Alternate Syntax:
rem     diagramc filename(s)
rem to append diagram of file(s) into diagram.out

if %1a == a  c:\grunes\diagramc
if %1a == a  goto quit

echo off
:loop
  echo ========================-- %1 --========================
  rem Prompt answers: input from %1, output to diagram2.sc (for now),
  rem  place numbers in column 67, notate comments with =,
  rem  diagram pre-processor blocks, use IBM PC graphics.

  echo %1          >  diagram.sc
  echo diagram2.sc >> diagram.sc
  echo 67          >> diagram.sc
  echo 1           >> diagram.sc
  echo 1           >> diagram.sc
  echo 1           >> diagram.sc
  c:\grunes\diagramc < diagram.sc
  type diagram2.sc >> diagram.out
  del diagram.sc
  del diagram2.sc
  shift
  if not %1a == a goto loop
:quit
  echo Note--This does not delete diagram.out before appending to it.