[UP]


Manual Reference Pages  - voutput (3)

NAME

voutput(3f) - [M_draw:DEVICE] Redirect output from *next* vinit to file (LICENSE:PD)

CONTENTS

Synopsis
Description
Example

SYNOPSIS

subroutine voutput(path) character*(*) path

DESCRIPTION

Redirect output from *next* vinit() to file given by path. This routine only applies to device drivers that write to stdout e.g. PostScript and hpgl.

The special file names are

o is standard output
o is standard error
| command will create a pipe to "command"

If the open of the file fails, an attempt is made to append to file "M_DRAW_OUTPUT". If this fails, standard output is used.

When vinit() is called if voutput() has not been called then the environment variable M_DRAW_OUTPUT is checked and if it is defined and not a null string then voutput() is called with the M_DRAW_OUTPUT variable’s value.

A common use of the |command option is to automatically call programs that convert PPM files to other common pixmap formats or converts the GNU metafile to other formats (typically via the GNU plotutils plot program).

EXAMPLE

Sample program:

   program demo_voutput
   use M_draw
   implicit none
   ! want a 400x400 raster output
   call prefsize(400,400)
   ! convert PPM to a GIF file using ppmtogif(1)
   call voutput(’|ppmtogif >voutput.3m_draw.gif’)
   ! start graphics using PPM device
   call vinit(’p6’)
   ! draw a filled circle
   call color(D_RED)
   call polyfill(.true.)
   call circle(0.0,0.0,1.0)
   !
   call vexit()
   end program demo_voutput


voutput (3) March 11, 2021
Generated by manServer 1.08 from 1aa4f919-b76d-425a-9664-28be457e1e41 using man macros.