    ! Application independent file opening on a device specific basis
    from Edwin include Consts, Specs, Device

    external routine OPEN GRAPHICS alias "EDWIN_OPEN_GRAPHICS"  -
       (integer DEV, string (255) OutDev)

       Viewing = 0
       if Dev # 0 and OutDev # "" start
          Device Data_Dev no = 0
          if Dev=7220 or Dev=72208 or Dev=7440 or Dev=7470 or Dev=7475 or -
             Dev=7550 or Dev=7570 or Dev=7580 or -
             Dev=7585 or Dev=7586 or Dev=7595 or Dev=7596 start
             Device Data_Dev no = HP Plotter
          else if Dev = 300
             Device Data_Dev no = Dev Bitmap
             Device Data_Type = 300
          else if Dev = 16_5053 or Dev = 16_7073
             Device Data_Dev No = Postscript
          finish
       finish
       SET DEVICE (Outdev)
       Device Data_Dev no = 0
    end

    external routine CLOSE GRAPHICS alias "EDWIN_CLOSE_GRAPHICS"
       integer Saved
       if Viewing # 0 start
          Saved = Output Stream
          Select Output (viewing)
          Close Output
          Select Output (Saved)
          Viewing = 0
       finish
    end

    end of file