$!                        ---diagramc.vax---
$!VAX VMS procedure to diagram a C language program
$!
$! by Mitchell R Grunes.
$!
$!I assume that the executable and this procedure are in the search path,
$!  and that this procedure has execute permission.
$!
$!Syntax:
$!    @diagramc.vax
$!to be prompted for input parameters.
$!
$!Alternate Syntax:
$!    @diagramc.vax filename(s)
$!to append diagram of file(s) into diagram.out
$
$  if P1 .EQS. "" 
$  then
$    define/user sys$input sys$command
$    run diagramc
$    goto quit
$  endif
$
$  write sys$output "========================-- "+P1+" --========================"
$
$! Must pre-create diagram.out if does not exist
$  open/append/error=noSkip diagram.out diagram.out
$  goto Skip
$noSkip:
$  open/write diagram.out diagram.out
$Skip:
$  close diagram.out
$
$! Must pre-create diagram2.sc with same file attributes
$  open/write diagram2.sc diagram2.sc
$  close diagram2.sc
$
$  !Prompt answers: input from P1, output to diagram2.sc (for now),
$  ! place numbers in column 67, notate comments with =,
$  ! don't use IBM PC graphics.
$
$  open/write diagram.sc diagram.sc
$  write diagram.sc "$Run diagramc"
$  write diagram.sc P1
$  write diagram.sc "diagram2.sc"
$  write diagram.sc "67"
$  write diagram.sc "1"
$  write diagram.sc "0"
$  close diagram.sc
$  @diagram.sc
$  append diagram2.sc diagram.out
$  delete diagram.sc;*
$  delete diagram2.sc;*
$
$  if (P2 .NES. "") then @diagramc.vax 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8'
$  write sys$output "Note--This does not delete diagram.out before appending to it."
$quit: