!
! ********************************************************************
! *                                                                  *
! *  Copyright 2001 Compaq Computer Corporation                      *
! *                                                                  *
! *  COMPAQ Registered in U.S. Patent and Trademark Office.          *
! *                                                                  *
! *  Confidential computer software. Valid license from Compaq or    *
! *  authorized sublicensor required for possession, use or copying. *
! *  Consistent with FAR 12.211 and 12.212, Commercial Computer      *
! *  Software, Computer Software Documentation, and Technical Data   *
! *  for Commercial Items are licensed to the U.S. Government under  *
! *  vendor's standard commercial license.                           *
! *                                                                  *
! ********************************************************************
!
!DEC$ FREEFORM


!DEC$ IF .NOT. DEFINED(__DFLIB_INCLUDE)
MODULE DFLIB
!DEC$ ENDIF

!* fgraph.fi - declare constants and functions for graphics library
!*
!*   Copyright (c) 1987-1995 Microsoft Corporation.  All rights reserved.
!*
!* Purpose:
!*   This file declares the graphics library functions and
!*   the constants that are used with them.
!*
!* NOTE: When modifying this file, you must follow the following rules to
!* ensure compatibility with fixed form and free form source:
!*   1) All comments must start with '!'
!*   2) All code must be within columns 7 to 72
!*   3) For continuation, place a '&' in column 73,
!*      and a '&' in column 6 of the continuation line
!DEC$ IF .NOT. DEFINED($DFLIB$ProgramUnitNumber)
!DEC$ DEFINE $DFLIB$ProgramUnitNumber = -1
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED($DFLIB$FIProgUnitNum) 
!DEC$ DEFINE $DFLIB$FIProgUnitNum = -2
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED(__DFLIB_FLIB_INCLUDE)
!     User-visible declarations for FORTRAN Graphics Library
      INTERFACE
	FUNCTION arc(x1,y1,x2,y2,x3,y3,x4,y4)
!DEC$ ATTRIBUTES DEFAULT :: arc
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 arc,x1,y1,x2,y2,x3,y3,x4,y4
!DEC$ ATTRIBUTES C,ALIAS:"__arc" ::  arc
!DEC$ ELSE
	  INTEGER*2 arc,x1,y1,x2,y2,x3,y3,x4,y4
!DEC$ ATTRIBUTES C,ALIAS: "_arc" ::  arc
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION arc_w(wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4)
!DEC$ ATTRIBUTES DEFAULT :: arc_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 arc_w
!DEC$ ATTRIBUTES C,ALIAS:"__arc_w" ::  arc_w
!DEC$ ELSE
	  INTEGER*2 arc_w
!DEC$ ATTRIBUTES C,ALIAS: "_arc_w" ::  arc_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getarcinfo(lpstart,lpend,lppaint)
!DEC$ ATTRIBUTES DEFAULT :: getarcinfo
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getarcinfo
!DEC$ ATTRIBUTES C,ALIAS:"__getarcinfo" ::  getarcinfo
!DEC$ ELSE
	  INTEGER*2 getarcinfo
!DEC$ ATTRIBUTES C,ALIAS: "_getarcinfo" ::  getarcinfo
!DEC$ ENDIF
	  STRUCTURE/xycoord/
	      INTEGER*2 xcoord
	      INTEGER*2 ycoord
	  END STRUCTURE
	  RECORD/xycoord/lpstart
!DEC$ ATTRIBUTES REFERENCE ::  lpstart
	  RECORD/xycoord/lpend
!DEC$ ATTRIBUTES REFERENCE ::  lpend
	  RECORD/xycoord/lppaint
!DEC$ ATTRIBUTES REFERENCE ::  lppaint
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE clearscreen(area)
!DEC$ ATTRIBUTES DEFAULT :: clearscreen
!DEC$ ATTRIBUTES C,ALIAS:"__FQclearscreen" ::  clearscreen
!DEC$ ELSE
	SUBROUTINE clearscreen(area)
!DEC$ ATTRIBUTES DEFAULT :: clearscreen
!DEC$ ATTRIBUTES C,ALIAS: "_FQclearscreen" ::  clearscreen
!DEC$ ENDIF
	  INTEGER*2 area
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION displaycursor(toggle)
!DEC$ ATTRIBUTES DEFAULT :: displaycursor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 displaycursor,toggle
!DEC$ ATTRIBUTES C,ALIAS:"__FQdisplaycursor" ::  displaycursor
!DEC$ ELSE
	  INTEGER*2 displaycursor,toggle
!DEC$ ATTRIBUTES C,ALIAS: "_FQdisplaycursor" ::  displaycursor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION ellipse(control,x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: ellipse
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 ellipse,control,x1,y1,x2,y2
!DEC$ ATTRIBUTES C,ALIAS:"__ellipse" ::  ellipse
!DEC$ ELSE
	  INTEGER*2 ellipse,control,x1,y1,x2,y2
!DEC$ ATTRIBUTES C,ALIAS: "_ellipse" ::  ellipse
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION ellipse_w(control,wx1,wy1,wx2,wy2)
!DEC$ ATTRIBUTES DEFAULT :: ellipse_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 ellipse_w,control
!DEC$ ATTRIBUTES C,ALIAS:"__ellipse_w" ::  ellipse_w
!DEC$ ELSE
	  INTEGER*2 ellipse_w,control
!DEC$ ATTRIBUTES C,ALIAS: "_ellipse_w" ::  ellipse_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1,wx2,wy2
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION floodfill(x,y,boundary)
!DEC$ ATTRIBUTES DEFAULT :: floodfill
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 floodfill,x,y,boundary
!DEC$ ATTRIBUTES C,ALIAS:"__floodfill" ::  floodfill
!DEC$ ELSE
	  INTEGER*2 floodfill,x,y,boundary
!DEC$ ATTRIBUTES C,ALIAS: "_floodfill" ::  floodfill
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION floodfillrgb(x,y,bcolor)
!DEC$ ATTRIBUTES DEFAULT :: floodfillrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 floodfillrgb,x,y
!DEC$ ATTRIBUTES C,ALIAS:"__floodfillrgb" ::  floodfillrgb
!DEC$ ELSE
	  INTEGER*2 floodfillrgb,x,y
!DEC$ ATTRIBUTES C,ALIAS: "_floodfillrgb" ::  floodfillrgb
!DEC$ ENDIF
	  INTEGER*4 bcolor
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION floodfill_w(wx1,wy1,boundary)
!DEC$ ATTRIBUTES DEFAULT :: floodfill_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 floodfill_w,boundary
!DEC$ ATTRIBUTES C,ALIAS:"__floodfill_w" ::  floodfill_w
!DEC$ ELSE
	  INTEGER*2 floodfill_w,boundary
!DEC$ ATTRIBUTES C,ALIAS: "_floodfill_w" ::  floodfill_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION floodfillrgb_w(wx,wy,bcolor)
!DEC$ ATTRIBUTES DEFAULT :: floodfillrgb_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 floodfillrgb_w
!DEC$ ATTRIBUTES C,ALIAS:"__floodfillrgb_w" ::  floodfillrgb_w
!DEC$ ELSE
	  INTEGER*2 floodfillrgb_w
!DEC$ ATTRIBUTES C,ALIAS: "_floodfillrgb_w" ::  floodfillrgb_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	  INTEGER*4 bcolor
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getactivepage()
!DEC$ ATTRIBUTES DEFAULT :: getactivepage
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getactivepage
!DEC$ ATTRIBUTES C,ALIAS:"__getactivepage" ::  getactivepage
!DEC$ ELSE
	  INTEGER*2 getactivepage
!DEC$ ATTRIBUTES C,ALIAS: "_getactivepage" ::  getactivepage
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getbkcolor()
!DEC$ ATTRIBUTES DEFAULT :: getbkcolor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 getbkcolor
!DEC$ ATTRIBUTES C,ALIAS:"__getbkcolor" ::  getbkcolor
!DEC$ ELSE
	  INTEGER*4 getbkcolor
!DEC$ ATTRIBUTES C,ALIAS: "_getbkcolor" ::  getbkcolor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getcolor()
!DEC$ ATTRIBUTES DEFAULT :: getcolor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getcolor
!DEC$ ATTRIBUTES C,ALIAS:"__getcolor" ::  getcolor
!DEC$ ELSE
	  INTEGER*2 getcolor
!DEC$ ATTRIBUTES C,ALIAS: "_getcolor" ::  getcolor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getcurrentposition(s)
!DEC$ ATTRIBUTES DEFAULT :: getcurrentposition
!DEC$ ATTRIBUTES ALIAS:"__f_getcurrentposition@4" ::  getcurrentposition
!DEC$ ELSE
	SUBROUTINE getcurrentposition(s)
!DEC$ ATTRIBUTES DEFAULT :: getcurrentposition
!DEC$ ATTRIBUTES ALIAS: "_f_getcurrentposition"   ::  getcurrentposition
!DEC$ ENDIF
	  STRUCTURE/xycoord/
	      INTEGER*2 xcoord
	      INTEGER*2 ycoord
	  END STRUCTURE
	  RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getcurrentposition_w(s)
!DEC$ ATTRIBUTES DEFAULT :: getcurrentposition_w
!DEC$ ATTRIBUTES ALIAS:"__f_getcurrentposition_wxy@4" ::  getcurrentposition_w
!DEC$ ELSE
	SUBROUTINE getcurrentposition_w(s)
!DEC$ ATTRIBUTES DEFAULT :: getcurrentposition_w
!DEC$ ATTRIBUTES ALIAS: "_f_getcurrentposition_wxy"   ::  getcurrentposition_w
!DEC$ ENDIF
	  STRUCTURE/wxycoord/
	      DOUBLE PRECISION wx
	      DOUBLE PRECISION wy
	  END STRUCTURE
	  RECORD/wxycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getfillmask(mask)
!DEC$ ATTRIBUTES DEFAULT :: getfillmask
!DEC$ ATTRIBUTES C,ALIAS:"__getfillmask" ::  getfillmask
!DEC$ ELSE
	SUBROUTINE getfillmask(mask)
!DEC$ ATTRIBUTES DEFAULT :: getfillmask
!DEC$ ATTRIBUTES C,ALIAS: "_getfillmask" ::  getfillmask
!DEC$ ENDIF
	  INTEGER*1 mask(8)
!DEC$ ATTRIBUTES REFERENCE ::   mask
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getimage(x1,y1,x2,y2,image)
!DEC$ ATTRIBUTES DEFAULT :: getimage
!DEC$ ATTRIBUTES C,ALIAS:"__getimage" ::  getimage
!DEC$ ELSE
	SUBROUTINE getimage(x1,y1,x2,y2,image)
!DEC$ ATTRIBUTES DEFAULT :: getimage
!DEC$ ATTRIBUTES C,ALIAS: "_getimage" ::  getimage
!DEC$ ENDIF
	  INTEGER*2 x1,y1,x2,y2
	  INTEGER*1 image(*)
!DEC$ ATTRIBUTES REFERENCE ::   image
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getimage_w(wx1,wy1,wx2,wy2,image)
!DEC$ ATTRIBUTES DEFAULT :: getimage_w
!DEC$ ATTRIBUTES C,ALIAS:"__getimage_w" ::  getimage_w
!DEC$ ELSE
	SUBROUTINE getimage_w(wx1,wy1,wx2,wy2,image)
!DEC$ ATTRIBUTES DEFAULT :: getimage_w
!DEC$ ATTRIBUTES C,ALIAS: "_getimage_w" ::  getimage_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1,wx2,wy2
	  INTEGER*1 image(*)
!DEC$ ATTRIBUTES REFERENCE ::   image
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION getlinestyle()
!DEC$ ATTRIBUTES DEFAULT :: getlinestyle
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getlinestyle
!DEC$ ATTRIBUTES C,ALIAS:"__getlinestyle" ::  getlinestyle
!DEC$ ELSE
	  INTEGER*2 getlinestyle
!DEC$ ATTRIBUTES C,ALIAS: "_getlinestyle" ::  getlinestyle
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE GETPHYSCOORD
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$22
!DEC$ ATTRIBUTES alias:'__f_getphyscoord@12' ::  $$MSFLIB$GETPHYSCOORD$22
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$22
!DEC$ ATTRIBUTES alias: '_f_getphyscoord'    ::  $$MSFLIB$GETPHYSCOORD$22
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$24
!DEC$ ATTRIBUTES alias:'__f_getphyscoord@12' ::  $$MSFLIB$GETPHYSCOORD$24
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$24
!DEC$ ATTRIBUTES alias: '_f_getphyscoord'    ::  $$MSFLIB$GETPHYSCOORD$24
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$42
!DEC$ ATTRIBUTES alias:'__f_getphyscoord@12' ::  $$MSFLIB$GETPHYSCOORD$42
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$42
!DEC$ ATTRIBUTES alias: '_f_getphyscoord'    ::  $$MSFLIB$GETPHYSCOORD$42
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$44
!DEC$ ATTRIBUTES alias:'__f_getphyscoord@12' ::  $$MSFLIB$GETPHYSCOORD$44
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETPHYSCOORD$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETPHYSCOORD$44
!DEC$ ATTRIBUTES alias: '_f_getphyscoord'    ::  $$MSFLIB$GETPHYSCOORD$44
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION getpixel(x,y)
!DEC$ ATTRIBUTES DEFAULT :: getpixel
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getpixel,x,y
!DEC$ ATTRIBUTES C,ALIAS:"__getpixel" ::  getpixel
!DEC$ ELSE
	  INTEGER*2 getpixel,x,y
!DEC$ ATTRIBUTES C,ALIAS: "_getpixel" ::  getpixel
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getpixel_w(wx,wy)
!DEC$ ATTRIBUTES DEFAULT :: getpixel_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getpixel_w
!DEC$ ATTRIBUTES C,ALIAS:"__getpixel_w" ::  getpixel_w
!DEC$ ELSE
	  INTEGER*2 getpixel_w
!DEC$ ATTRIBUTES C,ALIAS: "_getpixel_w" ::  getpixel_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getpixels(n, x, y, c)
!DEC$ ATTRIBUTES DEFAULT :: getpixels
!DEC$ ATTRIBUTES C, ALIAS:"__getpixels" ::  getpixels
!DEC$ ELSE
	SUBROUTINE getpixels(n, x, y, c)
!DEC$ ATTRIBUTES DEFAULT :: getpixels
!DEC$ ATTRIBUTES C, ALIAS: "_getpixels" ::  getpixels
!DEC$ ENDIF
	  INTEGER*4 n                 ! input : size of arrays
	  INTEGER*2 x(*)   ! input : x coordinates
!DEC$ ATTRIBUTES REFERENCE ::   x
	  INTEGER*2 y(*)   ! input : y coordinates
!DEC$ ATTRIBUTES REFERENCE ::   y
	  INTEGER*2 c(*)   ! input : palette indices
!DEC$ ATTRIBUTES REFERENCE ::   c
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION gettextcolor()
!DEC$ ATTRIBUTES DEFAULT :: gettextcolor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 gettextcolor
!DEC$ ATTRIBUTES C,ALIAS:"__gettextcolor" ::  gettextcolor
!DEC$ ELSE
	  INTEGER*2 gettextcolor
!DEC$ ATTRIBUTES C,ALIAS: "_gettextcolor" ::  gettextcolor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION gettextcursor()
!DEC$ ATTRIBUTES DEFAULT :: gettextcursor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 gettextcursor
!DEC$ ATTRIBUTES C,ALIAS:"__gettextcursor" ::  gettextcursor
!DEC$ ELSE
	  INTEGER*2 gettextcursor
!DEC$ ATTRIBUTES C,ALIAS: "_gettextcursor" ::  gettextcursor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE gettextposition(s)
!DEC$ ATTRIBUTES DEFAULT :: gettextposition
!DEC$ ATTRIBUTES ALIAS:"__fq_gettextposition@4" ::  gettextposition
!DEC$ ELSE
	SUBROUTINE gettextposition(s)
!DEC$ ATTRIBUTES DEFAULT :: gettextposition
!DEC$ ATTRIBUTES ALIAS: "_fq_gettextposition"   ::  gettextposition
!DEC$ ENDIF
	  STRUCTURE/rccoord/
	      INTEGER*2 row
	      INTEGER*2 col
	  END STRUCTURE
	  RECORD/rccoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE gettextwindow(r1,c1,r2,c2)
!DEC$ ATTRIBUTES DEFAULT :: gettextwindow
!DEC$ ATTRIBUTES C,ALIAS:"__gettextwindow" ::  gettextwindow
!DEC$ ELSE
	SUBROUTINE gettextwindow(r1,c1,r2,c2)
!DEC$ ATTRIBUTES DEFAULT :: gettextwindow
!DEC$ ATTRIBUTES C,ALIAS: "_gettextwindow" ::  gettextwindow
!DEC$ ENDIF
	  INTEGER*2 r1
!DEC$ ATTRIBUTES REFERENCE ::   r1
	  INTEGER*2 c1
!DEC$ ATTRIBUTES REFERENCE ::   c1
	  INTEGER*2 r2
!DEC$ ATTRIBUTES REFERENCE ::   r2
	  INTEGER*2 c2
!DEC$ ATTRIBUTES REFERENCE ::   c2
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getvideoconfig(s)
!DEC$ ATTRIBUTES DEFAULT :: getvideoconfig
!DEC$ ATTRIBUTES C,ALIAS:"__getvideoconfig" ::  getvideoconfig
!DEC$ ELSE
	SUBROUTINE getvideoconfig(s)
!DEC$ ATTRIBUTES DEFAULT :: getvideoconfig
!DEC$ ATTRIBUTES C,ALIAS: "_getvideoconfig" ::  getvideoconfig
!DEC$ ENDIF
	  STRUCTURE/videoconfig/
	      INTEGER*2 numxpixels       ! number of pixels on X axis
	      INTEGER*2 numypixels       ! number of pixels on Y axis
	      INTEGER*2 numtextcols      ! number of text columns available
	      INTEGER*2 numtextrows      ! number of text rows available
	      INTEGER*2 numcolors        ! number of actual colors
	      INTEGER*2 bitsperpixel     ! number of bits per pixel
	      INTEGER*2 numvideopages    ! number of available video pages
	      INTEGER*2 mode             ! current video mode
	      INTEGER*2 adapter          ! active display adapter
	      INTEGER*2 monitor          ! active display monitor
	      INTEGER*2 memory           ! adapter video memory in K bytes
	  END STRUCTURE
	  RECORD/videoconfig/s
!DEC$ ATTRIBUTES REFERENCE ::  s
	END SUBROUTINE
      END INTERFACE
      INTERFACE GETVIEWCOORD
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$22
!DEC$ ATTRIBUTES alias:'__f_getviewcoord@12' ::  $$MSFLIB$GETVIEWCOORD$22
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$22
!DEC$ ATTRIBUTES alias: '_f_getviewcoord'    ::  $$MSFLIB$GETVIEWCOORD$22
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$24
!DEC$ ATTRIBUTES alias:'__f_getviewcoord@12' ::  $$MSFLIB$GETVIEWCOORD$24
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$24
!DEC$ ATTRIBUTES alias: '_f_getviewcoord'    ::  $$MSFLIB$GETVIEWCOORD$24
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$42
!DEC$ ATTRIBUTES alias:'__f_getviewcoord@12' ::  $$MSFLIB$GETVIEWCOORD$42
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$42
!DEC$ ATTRIBUTES alias: '_f_getviewcoord'    ::  $$MSFLIB$GETVIEWCOORD$42
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$44
!DEC$ ATTRIBUTES alias:'__f_getviewcoord@12' ::  $$MSFLIB$GETVIEWCOORD$44
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETVIEWCOORD$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETVIEWCOORD$44
!DEC$ ATTRIBUTES alias: '_f_getviewcoord'    ::  $$MSFLIB$GETVIEWCOORD$44
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getviewcoord_w(wx,wy,s)
!DEC$ ATTRIBUTES DEFAULT :: getviewcoord_w
!DEC$ ATTRIBUTES ALIAS:"__f_getviewcoord_w@12" ::  getviewcoord_w
!DEC$ ELSE
	SUBROUTINE getviewcoord_w(wx,wy,s)
!DEC$ ATTRIBUTES DEFAULT :: getviewcoord_w
!DEC$ ATTRIBUTES ALIAS: "_f_getviewcoord_w"    ::  getviewcoord_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	  STRUCTURE/xycoord/
	      INTEGER*2 xcoord
	      INTEGER*2 ycoord
	  END STRUCTURE
	  RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION getvisualpage()
!DEC$ ATTRIBUTES DEFAULT :: getvisualpage
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getvisualpage
!DEC$ ATTRIBUTES C,ALIAS:"__getvisualpage" ::  getvisualpage
!DEC$ ELSE
	  INTEGER*2 getvisualpage
!DEC$ ATTRIBUTES C,ALIAS: "_getvisualpage" ::  getvisualpage
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE GETWINDOWCOORD
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$22
!DEC$ ATTRIBUTES alias:'__f_getwindowcoord@12' ::  $$MSFLIB$GETWINDOWCOORD$22
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$22
!DEC$ ATTRIBUTES alias: '_f_getwindowcoord'    ::  $$MSFLIB$GETWINDOWCOORD$22
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*2 y
      STRUCTURE/wxycoord/
	 DOUBLE PRECISION wx
	DOUBLE PRECISION wy
      END STRUCTURE
      RECORD/wxycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$24
!DEC$ ATTRIBUTES alias:'__f_getwindowcoord@12' ::  $$MSFLIB$GETWINDOWCOORD$24
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$24
!DEC$ ATTRIBUTES alias: '_f_getwindowcoord'    ::  $$MSFLIB$GETWINDOWCOORD$24
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*4 y
      STRUCTURE/wxycoord/
	 DOUBLE PRECISION wx
	DOUBLE PRECISION wy
      END STRUCTURE
      RECORD/wxycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$42
!DEC$ ATTRIBUTES alias:'__f_getwindowcoord@12' ::  $$MSFLIB$GETWINDOWCOORD$42
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$42
!DEC$ ATTRIBUTES alias: '_f_getwindowcoord'    ::  $$MSFLIB$GETWINDOWCOORD$42
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*2 y
      STRUCTURE/wxycoord/
	DOUBLE PRECISION wx
	DOUBLE PRECISION wy
      END STRUCTURE
      RECORD/wxycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$44
!DEC$ ATTRIBUTES alias:'__f_getwindowcoord@12' ::  $$MSFLIB$GETWINDOWCOORD$44
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$GETWINDOWCOORD$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$GETWINDOWCOORD$44
!DEC$ ATTRIBUTES alias: '_f_getwindowcoord'    ::  $$MSFLIB$GETWINDOWCOORD$44
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*4 y
      STRUCTURE/wxycoord/
	DOUBLE PRECISION wx
	DOUBLE PRECISION wy
      END STRUCTURE
      RECORD/wxycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION getwritemode()
!DEC$ ATTRIBUTES DEFAULT :: getwritemode
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getwritemode
!DEC$ ATTRIBUTES C,ALIAS:"__getwritemode" ::  getwritemode
!DEC$ ELSE
	  INTEGER*2 getwritemode
!DEC$ ATTRIBUTES C,ALIAS: "_getwritemode" ::  getwritemode
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION grstatus()
!DEC$ ATTRIBUTES DEFAULT :: grstatus
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 grstatus
!DEC$ ATTRIBUTES C,ALIAS:"__grstatus" ::  grstatus
!DEC$ ELSE
	  INTEGER*2 grstatus
!DEC$ ATTRIBUTES C,ALIAS: "_grstatus" ::  grstatus
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION imagesize(x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: imagesize
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 imagesize
!DEC$ ATTRIBUTES C,ALIAS:"__imagesize" ::  imagesize
!DEC$ ELSE
	  INTEGER*4 imagesize
!DEC$ ATTRIBUTES C,ALIAS: "_imagesize" ::  imagesize
!DEC$ ENDIF
	  INTEGER*2 x1,y1,x2,y2
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION imagesize_w(wx1,wy1,wx2,wy2)
!DEC$ ATTRIBUTES DEFAULT :: imagesize_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 imagesize_w
!DEC$ ATTRIBUTES C,ALIAS:"__imagesize_w" ::  imagesize_w
!DEC$ ELSE
	  INTEGER*4 imagesize_w
!DEC$ ATTRIBUTES C,ALIAS: "_imagesize_w" ::  imagesize_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1,wx2,wy2
	END FUNCTION
      END INTERFACE

      type  DF_POINT
	    sequence
	    integer(4) x 
	    integer(4) y 
      end type DF_POINT

      interface
	  logical(4) function  PolylineQQ (points, npoints) 
	  !DEC$ ATTRIBUTES DEFAULT :: Polyline
	  !DEC$ IF DEFINED(_X86_)
	  !DEC$ ATTRIBUTES STDCALL, ALIAS : '__POLYLINE@8' :: PolylineQQ
	  !DEC$ ELSE
	  !DEC$ ATTRIBUTES STDCALL, ALIAS :  'POLYLINE'    :: PolylineQQ
	  !DEC$ ENDIF
	  !DEC$ ATTRIBUTES REFERENCE :: points
	  type  DF_POINT
	   sequence
	   integer(4) x 
	   integer(4) y 
	  end type DF_POINT
	  type(DF_POINT)   points(*) ! array of points
	  integer         npoints    ! number of points in array 
	  end function PolylineQQ
       end interface

      INTERFACE
	FUNCTION lineto(x,y)
!DEC$ ATTRIBUTES DEFAULT :: lineto
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 lineto,x,y
!DEC$ ATTRIBUTES C,ALIAS:"__lineto" ::  lineto
!DEC$ ELSE
	  INTEGER*2 lineto,x,y
!DEC$ ATTRIBUTES C,ALIAS: "_lineto" ::  lineto
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION lineto_w(wx,wy)
!DEC$ ATTRIBUTES DEFAULT :: lineto_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 lineto_w
!DEC$ ATTRIBUTES C,ALIAS:"__lineto_w" ::  lineto_w
!DEC$ ELSE
	  INTEGER*2 lineto_w
!DEC$ ATTRIBUTES C,ALIAS: "_lineto_w" ::  lineto_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	END FUNCTION
      END INTERFACE
      INTERFACE
      integer(2) function LINETOAR(pfx, pfy, ptx, pty, count)
!DEC$ ATTRIBUTES DEFAULT :: LINETOAR
!DEC$ IF DEFINED(_X86_)
      !DEC$ ATTRIBUTES STDCALL, ALIAS: '__linetoarray@20' :: LINETOAR
!DEC$ ELSE
      !DEC$ ATTRIBUTES STDCALL, ALIAS: '_linetoarray' :: LINETOAR
!DEC$ ENDIF
      INTEGER(4) pfx, pfy, ptx, pty, count
      end function
      END INTERFACE
      INTERFACE
      integer(2) function LINETOAREX(pfx, pfy, ptx, pty, pc, ps, count)
!DEC$ ATTRIBUTES DEFAULT :: LINETOAREX
!DEC$ IF DEFINED(_X86_)
      !DEC$ ATTRIBUTES STDCALL, ALIAS: '__linetoarrayex@28' :: LINETOAREX
!DEC$ ELSE
      !DEC$ ATTRIBUTES STDCALL, ALIAS: '_linetoarrayex' :: LINETOAREX
!DEC$ ENDIF
      INTEGER(4) pfx, pfy, ptx, pty, pc, ps, count
      end function
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	INTEGER*4 FUNCTION loadimage(fname,x,y)
!DEC$ ATTRIBUTES DEFAULT :: loadimage
!DEC$ ATTRIBUTES ALIAS:"__f_loadimage@16" :: loadimage
!DEC$ ELSE
	INTEGER*4 FUNCTION loadimage(fname,x,y)
!DEC$ ATTRIBUTES DEFAULT :: loadimage
!DEC$ ATTRIBUTES ALIAS: "_f_loadimage"    :: loadimage
!DEC$ ENDIF
	  CHARACTER*(*) fname
!DEC$ ATTRIBUTES REFERENCE ::   fname
	  INTEGER*4 x,y
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	INTEGER*4 FUNCTION loadimage_w(fname,wx,wy)
!DEC$ ATTRIBUTES DEFAULT :: loadimage_w
!DEC$ ATTRIBUTES C, ALIAS:"__loadimage_w" :: loadimage_w
!DEC$ ELSE
	INTEGER*4 FUNCTION loadimage_w(fname,wx,wy)
!DEC$ ATTRIBUTES DEFAULT :: loadimage_w
!DEC$ ATTRIBUTES C, ALIAS: "_loadimage_w" :: loadimage_w
!DEC$ ENDIF
	  CHARACTER*(*) fname
!DEC$ ATTRIBUTES REFERENCE ::   fname
	  DOUBLE PRECISION wx, wy
	END FUNCTION
      END INTERFACE
      INTERFACE MOVETO
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$MOVETO$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$22
!DEC$ ATTRIBUTES alias:'__f_moveto@12' ::  $$MSFLIB$MOVETO$22
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$MOVETO$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$22
!DEC$ ATTRIBUTES alias: '_f_moveto'    ::  $$MSFLIB$MOVETO$22
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$MOVETO$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$24
!DEC$ ATTRIBUTES alias:'__f_moveto@12' ::  $$MSFLIB$MOVETO$24
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$MOVETO$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$24
!DEC$ ATTRIBUTES alias: '_f_moveto'    ::  $$MSFLIB$MOVETO$24
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$MOVETO$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$42
!DEC$ ATTRIBUTES alias:'__f_moveto@12' ::  $$MSFLIB$MOVETO$42
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$MOVETO$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$42
!DEC$ ATTRIBUTES alias: '_f_moveto'    ::  $$MSFLIB$MOVETO$42
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$MOVETO$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$44
!DEC$ ATTRIBUTES alias:'__f_moveto@12' ::  $$MSFLIB$MOVETO$44
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$MOVETO$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$MOVETO$44
!DEC$ ATTRIBUTES alias: '_f_moveto'    ::  $$MSFLIB$MOVETO$44
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE moveto_w(wx,wy,s)
!DEC$ ATTRIBUTES DEFAULT :: moveto_w
!DEC$ ATTRIBUTES ALIAS:"__f_moveto_w@12" ::  moveto_w
!DEC$ ELSE
	SUBROUTINE moveto_w(wx,wy,s)
!DEC$ ATTRIBUTES DEFAULT :: moveto_w
!DEC$ ATTRIBUTES ALIAS: "_f_moveto_w"    ::  moveto_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	  STRUCTURE/wxycoord/
	      DOUBLE PRECISION wx
	      DOUBLE PRECISION wy
	  END STRUCTURE
	  RECORD/wxycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE outtext(text)
!DEC$ ATTRIBUTES DEFAULT :: outtext
!DEC$ ATTRIBUTES ALIAS:"__fq_outtext@8" ::  outtext
!DEC$ ELSE
	SUBROUTINE outtext(text)
!DEC$ ATTRIBUTES DEFAULT :: outtext
!DEC$ ATTRIBUTES ALIAS: "_fq_outtext"   ::  outtext
!DEC$ ENDIF
	  CHARACTER*(*) text
!DEC$ ATTRIBUTES REFERENCE ::   text
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION pie(i,x1,y1,x2,y2,x3,y3,x4,y4)
!DEC$ ATTRIBUTES DEFAULT :: pie
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 pie,i,x1,y1,x2,y2,x3,y3,x4,y4
!DEC$ ATTRIBUTES C,ALIAS:"__pie" ::  pie
!DEC$ ELSE
	  INTEGER*2 pie,i,x1,y1,x2,y2,x3,y3,x4,y4
!DEC$ ATTRIBUTES C,ALIAS: "_pie" ::  pie
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION pie_w(i,wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4)
!DEC$ ATTRIBUTES DEFAULT :: pie_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 pie_w,i
!DEC$ ATTRIBUTES C,ALIAS:"__pie_w" ::  pie_w
!DEC$ ELSE
	  INTEGER*2 pie_w,i
!DEC$ ATTRIBUTES C,ALIAS: "_pie_w" ::  pie_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION polygon(control,lppoints,cpoints)
!DEC$ ATTRIBUTES DEFAULT :: polygon
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 polygon,control,cpoints
!DEC$ ATTRIBUTES C,ALIAS:"__polygon" ::  polygon
!DEC$ ELSE
	  INTEGER*2 polygon,control,cpoints
!DEC$ ATTRIBUTES C,ALIAS: "_polygon" ::  polygon
!DEC$ ENDIF
	  STRUCTURE/xycoord/
	      INTEGER*2 xcoord
	      INTEGER*2 ycoord
	  END STRUCTURE
	  RECORD/xycoord/lppoints(*)
!DEC$ ATTRIBUTES REFERENCE ::  lppoints
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION polygon_w(control,lppoints,cpoints)
!DEC$ ATTRIBUTES DEFAULT :: polygon_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 polygon_w,control,cpoints
!DEC$ ATTRIBUTES C,ALIAS:"__polygon_w" ::  polygon_w
!DEC$ ELSE
	  INTEGER*2 polygon_w,control,cpoints
!DEC$ ATTRIBUTES C,ALIAS: "_polygon_w" ::  polygon_w
!DEC$ ENDIF
	  STRUCTURE/wxycoord/
	      DOUBLE PRECISION wx
	      DOUBLE PRECISION wy
	  END STRUCTURE
	  RECORD/wxycoord/lppoints(*)
!DEC$ ATTRIBUTES REFERENCE ::  lppoints
	END FUNCTION
      END INTERFACE

      INTERFACE
	FUNCTION polybezier(lppoints,cpoints)
!DEC$ ATTRIBUTES DEFAULT :: polybezier
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 polybezier,cpoints
!DEC$ ATTRIBUTES C,ALIAS:"__polybezier" ::  polybezier
!DEC$ ELSE
	  INTEGER*2 polybezier,control,cpoints
!DEC$ ATTRIBUTES C,ALIAS: "_polybezier" ::  polybezier
!DEC$ ENDIF
	  STRUCTURE/xycoord/
	      INTEGER*2 xcoord
	      INTEGER*2 ycoord
	  END STRUCTURE
	  RECORD/xycoord/lppoints(*)
!DEC$ ATTRIBUTES REFERENCE ::  lppoints
	END FUNCTION
      END INTERFACE

      INTERFACE
	FUNCTION polybezier_w(lppoints,cpoints)
!DEC$ ATTRIBUTES DEFAULT :: polybezier_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 polybezier_w,cpoints
!DEC$ ATTRIBUTES C,ALIAS:"__polybezier_w" ::  polybezier_w
!DEC$ ELSE
	  INTEGER*2 polybezier_w,cpoints
!DEC$ ATTRIBUTES C,ALIAS: "_polybezier_w" ::  polybezier_w
!DEC$ ENDIF
	  STRUCTURE/wxycoord/
	      DOUBLE PRECISION wx
	      DOUBLE PRECISION wy
	  END STRUCTURE
	  RECORD/wxycoord/lppoints(*)
!DEC$ ATTRIBUTES REFERENCE ::  lppoints
	END FUNCTION
      END INTERFACE

      INTERFACE
	FUNCTION polybezierto(lppoints,cpoints)
!DEC$ ATTRIBUTES DEFAULT :: polybezierto
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 polybezierto,cpoints
!DEC$ ATTRIBUTES C,ALIAS:"__polybezierto" ::  polybezierto
!DEC$ ELSE
	  INTEGER*2 polybezierto,cpoints
!DEC$ ATTRIBUTES C,ALIAS: "_polybezierto" ::  polybezierto
!DEC$ ENDIF
	  STRUCTURE/xycoord/
	      INTEGER*2 xcoord
	      INTEGER*2 ycoord
	  END STRUCTURE
	  RECORD/xycoord/lppoints(*)
!DEC$ ATTRIBUTES REFERENCE ::  lppoints
	END FUNCTION
      END INTERFACE

      INTERFACE
	FUNCTION polybezierto_w(lppoints,cpoints)
!DEC$ ATTRIBUTES DEFAULT :: polybezierto_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 polybezierto_w,cpoints
!DEC$ ATTRIBUTES C,ALIAS:"__polybezierto_w" ::  polybezierto_w
!DEC$ ELSE
	  INTEGER*2 polybezierto_w,cpoints
!DEC$ ATTRIBUTES C,ALIAS: "_polybezierto_w" ::  polybezierto_w
!DEC$ ENDIF
	  STRUCTURE/wxycoord/
	      DOUBLE PRECISION wx
	      DOUBLE PRECISION wy
	  END STRUCTURE
	  RECORD/wxycoord/lppoints(*)
!DEC$ ATTRIBUTES REFERENCE ::  lppoints
	END FUNCTION
      END INTERFACE

      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE putimage(x,y,image,action)
!DEC$ ATTRIBUTES DEFAULT :: putimage
!DEC$ ATTRIBUTES C,ALIAS:"__putimage" ::  putimage
!DEC$ ELSE
	SUBROUTINE putimage(x,y,image,action)
!DEC$ ATTRIBUTES DEFAULT :: putimage
!DEC$ ATTRIBUTES C,ALIAS: "_putimage" ::  putimage
!DEC$ ENDIF
	  INTEGER*2 x,y,action
	  INTEGER*1 image(*)
!DEC$ ATTRIBUTES REFERENCE ::   image
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE putimage_w(wx,wy,image,action)
!DEC$ ATTRIBUTES DEFAULT :: putimage_w
!DEC$ ATTRIBUTES C,ALIAS:"__putimage_w" ::  putimage_w
!DEC$ ELSE
	SUBROUTINE putimage_w(wx,wy,image,action)
!DEC$ ATTRIBUTES DEFAULT :: putimage_w
!DEC$ ATTRIBUTES C,ALIAS: "_putimage_w" ::  putimage_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	  INTEGER*1 image(*)
!DEC$ ATTRIBUTES REFERENCE ::   image
	  INTEGER*2 action
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION rectangle(control,x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: rectangle
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 rectangle
!DEC$ ATTRIBUTES C,ALIAS:"__rectangle" ::  rectangle
!DEC$ ELSE
	  INTEGER*2 rectangle
!DEC$ ATTRIBUTES C,ALIAS: "_rectangle" ::  rectangle
!DEC$ ENDIF
	  INTEGER*2 control,x1,y1,x2,y2
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION rectangle_w(control,wx1,wy1,wx2,wy2)
!DEC$ ATTRIBUTES DEFAULT :: rectangle_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 rectangle_w,control
!DEC$ ATTRIBUTES C,ALIAS:"__rectangle_w" ::  rectangle_w
!DEC$ ELSE
	  INTEGER*2 rectangle_w,control
!DEC$ ATTRIBUTES C,ALIAS: "_rectangle_w" ::  rectangle_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx1,wy1,wx2,wy2
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION remappalette(index,color)
!DEC$ ATTRIBUTES DEFAULT :: remappalette
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 remappalette,color
!DEC$ ATTRIBUTES C,ALIAS:"__remappalette" ::  remappalette
!DEC$ ELSE
	  INTEGER*4 remappalette,color
!DEC$ ATTRIBUTES C,ALIAS: "_remappalette" ::  remappalette
!DEC$ ENDIF
	  INTEGER*2 index
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION remappalettergb(index,color)
!DEC$ ATTRIBUTES DEFAULT :: remappalettergb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 remappalettergb,color
!DEC$ ATTRIBUTES C,ALIAS:"__remappalettergb" ::  remappalettergb
!DEC$ ELSE
	  INTEGER*4 remappalettergb,color
!DEC$ ATTRIBUTES C,ALIAS: "_remappalettergb" ::  remappalettergb
!DEC$ ENDIF
	  INTEGER*2 index
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION remapallpalette(colors)
!DEC$ ATTRIBUTES DEFAULT :: remapallpalette
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 remapallpalette
!DEC$ ATTRIBUTES C,ALIAS:"__remapallpalette" ::  remapallpalette
!DEC$ ELSE
	  INTEGER*2 remapallpalette
!DEC$ ATTRIBUTES C,ALIAS: "_remapallpalette" ::  remapallpalette
!DEC$ ENDIF
	  INTEGER*4 colors(*)
!DEC$ ATTRIBUTES REFERENCE ::   colors
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION remapallpalettergb(colors)
!DEC$ ATTRIBUTES DEFAULT :: remapallpalettergb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 remapallpalettergb
!DEC$ ATTRIBUTES C,ALIAS:"__remapallpalettergb" ::  remapallpalettergb
!DEC$ ELSE
	  INTEGER*2 remapallpalettergb
!DEC$ ATTRIBUTES C,ALIAS: "_remapallpalettergb" ::  remapallpalettergb
!DEC$ ENDIF
	  INTEGER*4 colors(*)
!DEC$ ATTRIBUTES REFERENCE ::   colors
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	INTEGER*4 FUNCTION saveimage(fname,x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: saveimage
!DEC$ ATTRIBUTES ALIAS:"__f_saveimage@24" :: saveimage
!DEC$ ELSE
	INTEGER*4 FUNCTION saveimage(fname,x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: saveimage
!DEC$ ATTRIBUTES ALIAS: "_f_saveimage"    :: saveimage
!DEC$ ENDIF
	  CHARACTER*(*) fname
!DEC$ ATTRIBUTES REFERENCE ::   fname
	  INTEGER*4 x1,y1,x2,y2
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	INTEGER*4 FUNCTION saveimage_w(fname,wx1,wy1,wx2,wy2)
!DEC$ ATTRIBUTES DEFAULT :: saveimage_w
!DEC$ ATTRIBUTES C, ALIAS:"__saveimage_w" :: saveimage_w
!DEC$ ELSE
	INTEGER*4 FUNCTION saveimage_w(fname,wx1,wy1,wx2,wy2)
!DEC$ ATTRIBUTES DEFAULT :: saveimage_w
!DEC$ ATTRIBUTES C, ALIAS: "_saveimage_w" :: saveimage_w
!DEC$ ENDIF
	  CHARACTER*(*) fname
!DEC$ ATTRIBUTES REFERENCE ::   fname
	  DOUBLE PRECISION wx1,wy1,wx2,wy2
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE scrolltextwindow(rows)
!DEC$ ATTRIBUTES DEFAULT :: scrolltextwindow
!DEC$ ATTRIBUTES C,ALIAS:"__FQscrolltextwindow" ::  scrolltextwindow
!DEC$ ELSE
	SUBROUTINE scrolltextwindow(rows)
!DEC$ ATTRIBUTES DEFAULT :: scrolltextwindow
!DEC$ ATTRIBUTES C,ALIAS: "_FQscrolltextwindow" ::  scrolltextwindow
!DEC$ ENDIF
	  INTEGER*2 rows
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION selectpalette(number)
!DEC$ ATTRIBUTES DEFAULT :: selectpalette
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 selectpalette,number
!DEC$ ATTRIBUTES C,ALIAS:"__selectpalette" ::  selectpalette
!DEC$ ELSE
	  INTEGER*2 selectpalette,number
!DEC$ ATTRIBUTES C,ALIAS: "_selectpalette" ::  selectpalette
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setactivepage(page)
!DEC$ ATTRIBUTES DEFAULT :: setactivepage
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setactivepage,page
!DEC$ ATTRIBUTES C,ALIAS:"__setactivepage" ::  setactivepage
!DEC$ ELSE
	  INTEGER*2 setactivepage,page
!DEC$ ATTRIBUTES C,ALIAS: "_setactivepage" ::  setactivepage
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setbkcolor(color)
!DEC$ ATTRIBUTES DEFAULT :: setbkcolor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 setbkcolor,color
!DEC$ ATTRIBUTES C,ALIAS:"__setbkcolor" ::  setbkcolor
!DEC$ ELSE
	  INTEGER*4 setbkcolor,color
!DEC$ ATTRIBUTES C,ALIAS: "_setbkcolor" ::  setbkcolor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setcliprgn(x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: setcliprgn
!DEC$ ATTRIBUTES C,ALIAS:"__setcliprgn" ::  setcliprgn
!DEC$ ELSE
	SUBROUTINE setcliprgn(x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: setcliprgn
!DEC$ ATTRIBUTES C,ALIAS: "_setcliprgn" ::  setcliprgn
!DEC$ ENDIF
	  INTEGER*2 x1,y1,x2,y2
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION setcolor(color)
!DEC$ ATTRIBUTES DEFAULT :: setcolor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setcolor
!DEC$ ATTRIBUTES C,ALIAS:"__setcolor" ::  setcolor
!DEC$ ELSE
	  INTEGER*2 setcolor
!DEC$ ATTRIBUTES C,ALIAS: "_setcolor" ::  setcolor
!DEC$ ENDIF
	  INTEGER*2 color
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setfillmask(mask)
!DEC$ ATTRIBUTES DEFAULT :: setfillmask
!DEC$ ATTRIBUTES C,ALIAS:"__setfillmask" ::  setfillmask
!DEC$ ELSE
	SUBROUTINE setfillmask(mask)
!DEC$ ATTRIBUTES DEFAULT :: setfillmask
!DEC$ ATTRIBUTES C,ALIAS: "_setfillmask" ::  setfillmask
!DEC$ ENDIF
	  INTEGER*1 mask(8)
!DEC$ ATTRIBUTES REFERENCE ::   mask
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setlinestyle(mask)
!DEC$ ATTRIBUTES DEFAULT :: setlinestyle
!DEC$ ATTRIBUTES C,ALIAS:"__setlinestyle" ::  setlinestyle
!DEC$ ELSE
	SUBROUTINE setlinestyle(mask)
!DEC$ ATTRIBUTES DEFAULT :: setlinestyle
!DEC$ ATTRIBUTES C,ALIAS: "_setlinestyle" ::  setlinestyle
!DEC$ ENDIF
	  INTEGER*2 mask
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION setpixel(x,y)
!DEC$ ATTRIBUTES DEFAULT :: setpixel
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setpixel,x,y
!DEC$ ATTRIBUTES C,ALIAS:"__setpixel" ::  setpixel
!DEC$ ELSE
	  INTEGER*2 setpixel,x,y
!DEC$ ATTRIBUTES C,ALIAS: "_setpixel" ::  setpixel
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setpixel_w(wx,wy)
!DEC$ ATTRIBUTES DEFAULT :: setpixel_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setpixel_w
!DEC$ ATTRIBUTES C,ALIAS:"__setpixel_w" ::  setpixel_w
!DEC$ ELSE
	  INTEGER*2 setpixel_w
!DEC$ ATTRIBUTES C,ALIAS: "_setpixel_w" ::  setpixel_w
!DEC$ ENDIF
	  DOUBLE PRECISION wx,wy
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setpixels(n, x, y, c)
!DEC$ ATTRIBUTES DEFAULT :: setpixels
!DEC$ ATTRIBUTES C, ALIAS:"__setpixels" ::  setpixels
!DEC$ ELSE
	SUBROUTINE setpixels(n, x, y, c)
!DEC$ ATTRIBUTES DEFAULT :: setpixels
!DEC$ ATTRIBUTES C, ALIAS: "_setpixels" ::  setpixels
!DEC$ ENDIF
	  INTEGER*4 n                 ! input : size of arrays
	  INTEGER*2 x(*)   ! input : x coordinates
!DEC$ ATTRIBUTES REFERENCE ::   x
	  INTEGER*2 y(*)   ! input : y coordinates
!DEC$ ATTRIBUTES REFERENCE ::   y
	  INTEGER*2 c(*)   ! input : palette indices
!DEC$ ATTRIBUTES REFERENCE ::   c
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION settextcolor(index)
!DEC$ ATTRIBUTES DEFAULT :: settextcolor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 settextcolor,index
!DEC$ ATTRIBUTES C,ALIAS:"__settextcolor" ::  settextcolor
!DEC$ ELSE
	  INTEGER*2 settextcolor,index
!DEC$ ATTRIBUTES C,ALIAS: "_settextcolor" ::  settextcolor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION settextcursor(attr)
!DEC$ ATTRIBUTES DEFAULT :: settextcursor
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 settextcursor,attr
!DEC$ ATTRIBUTES C,ALIAS:"__settextcursor" ::  settextcursor
!DEC$ ELSE
	  INTEGER*2 settextcursor,attr
!DEC$ ATTRIBUTES C,ALIAS: "_settextcursor" ::  settextcursor
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setmousecursor(cursor)
!DEC$ ATTRIBUTES DEFAULT :: setmousecursor
!DEC$ IF DEFINED(_X86_)
	  INTEGER setmousecursor
!DEC$ ATTRIBUTES C,ALIAS:"__QWGsetmousecursor" ::  setmousecursor
!DEC$ ELSE
	  INTEGER setmousecursor
!DEC$ ATTRIBUTES C,ALIAS: "QWGsetmousecursor" ::  setmousecursor
!DEC$ ENDIF
	  INTEGER cursor
	END FUNCTION
      END INTERFACE
      INTERFACE SETTEXTPOSITION
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$22(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$22
!DEC$ ATTRIBUTES alias:'__fq_settextposition@12' ::  $$MSFLIB$SETTEXTPOSITION$22
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$22(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$22
!DEC$ ATTRIBUTES alias: '_fq_settextposition'    ::  $$MSFLIB$SETTEXTPOSITION$22
!DEC$ ENDIF
      INTEGER*2 row
      INTEGER*2 col
      STRUCTURE/rccoord/
	  INTEGER*2 row
	  INTEGER*2 col
      END STRUCTURE
      RECORD/rccoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$24(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$24
!DEC$ ATTRIBUTES alias:'__fq_settextposition@12' ::  $$MSFLIB$SETTEXTPOSITION$24
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$24(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$24
!DEC$ ATTRIBUTES alias: '_fq_settextposition'    ::  $$MSFLIB$SETTEXTPOSITION$24
!DEC$ ENDIF
      INTEGER*2 row
      INTEGER*4 col
      STRUCTURE/rccoord/
	  INTEGER*2 row
	  INTEGER*2 col
      END STRUCTURE
      RECORD/rccoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$42(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$42
!DEC$ ATTRIBUTES alias:'__fq_settextposition@12' ::  $$MSFLIB$SETTEXTPOSITION$42
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$42(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$42
!DEC$ ATTRIBUTES alias: '_fq_settextposition'    ::  $$MSFLIB$SETTEXTPOSITION$42
!DEC$ ENDIF
      INTEGER*4 row
      INTEGER*2 col
      STRUCTURE/rccoord/
	  INTEGER*2 row
	  INTEGER*2 col
      END STRUCTURE
      RECORD/rccoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$44(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$44
!DEC$ ATTRIBUTES alias:'__fq_settextposition@12' ::  $$MSFLIB$SETTEXTPOSITION$44
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETTEXTPOSITION$44(row, col, s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETTEXTPOSITION$44
!DEC$ ATTRIBUTES alias: '_fq_settextposition'    ::  $$MSFLIB$SETTEXTPOSITION$44
!DEC$ ENDIF
      INTEGER*4 row
      INTEGER*4 col
      STRUCTURE/rccoord/
	  INTEGER*2 row
	  INTEGER*2 col
      END STRUCTURE
      RECORD/rccoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION settextrows(rows)
!DEC$ ATTRIBUTES DEFAULT :: settextrows
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 settextrows,rows
!DEC$ ATTRIBUTES C,ALIAS:"__settextrows" ::  settextrows
!DEC$ ELSE
	  INTEGER*2 settextrows,rows
!DEC$ ATTRIBUTES C,ALIAS: "_settextrows" ::  settextrows
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE settextwindow(r1,c1,r2,c2)
!DEC$ ATTRIBUTES DEFAULT :: settextwindow
!DEC$ ATTRIBUTES C,ALIAS:"__settextwindow" ::  settextwindow
!DEC$ ELSE
	SUBROUTINE settextwindow(r1,c1,r2,c2)
!DEC$ ATTRIBUTES DEFAULT :: settextwindow
!DEC$ ATTRIBUTES C,ALIAS: "_settextwindow" ::  settextwindow
!DEC$ ENDIF
	  INTEGER*2 r1,c1,r2,c2
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION setvideomode(mode)
!DEC$ ATTRIBUTES DEFAULT :: setvideomode
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setvideomode,mode
!DEC$ ATTRIBUTES C,ALIAS:"__setvideomode" ::  setvideomode
!DEC$ ELSE
	  INTEGER*2 setvideomode,mode
!DEC$ ATTRIBUTES C,ALIAS: "_setvideomode" ::  setvideomode
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setvideomoderows(mode,rows)
!DEC$ ATTRIBUTES DEFAULT :: setvideomoderows
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setvideomoderows
!DEC$ ATTRIBUTES C,ALIAS:"__setvideomoderows" ::  setvideomoderows
!DEC$ ELSE
	  INTEGER*2 setvideomoderows
!DEC$ ATTRIBUTES C,ALIAS: "_setvideomoderows" ::  setvideomoderows
!DEC$ ENDIF
	  INTEGER*2 mode,rows
	END FUNCTION
      END INTERFACE
      INTERFACE SETVIEWORG
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETVIEWORG$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$22
!DEC$ ATTRIBUTES alias:'__f_setvieworg@12' ::  $$MSFLIB$SETVIEWORG$22
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETVIEWORG$22(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$22
!DEC$ ATTRIBUTES alias: '_f_setvieworg'    ::  $$MSFLIB$SETVIEWORG$22
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETVIEWORG$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$24
!DEC$ ATTRIBUTES alias:'__f_setvieworg@12' ::  $$MSFLIB$SETVIEWORG$24
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETVIEWORG$24(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$24
!DEC$ ATTRIBUTES alias: '_f_setvieworg'    ::  $$MSFLIB$SETVIEWORG$24
!DEC$ ENDIF
      INTEGER*2 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETVIEWORG$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$42
!DEC$ ATTRIBUTES alias:'__f_setvieworg@12' ::  $$MSFLIB$SETVIEWORG$42
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETVIEWORG$42(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$42
!DEC$ ATTRIBUTES alias: '_f_setvieworg'    ::  $$MSFLIB$SETVIEWORG$42
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*2 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
!DEC$ IF DEFINED(_X86_)
      SUBROUTINE $$MSFLIB$SETVIEWORG$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$44
!DEC$ ATTRIBUTES alias:'__f_setvieworg@12' ::  $$MSFLIB$SETVIEWORG$44
!DEC$ ELSE
      SUBROUTINE $$MSFLIB$SETVIEWORG$44(x,y,s)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$SETVIEWORG$44
!DEC$ ATTRIBUTES alias: '_f_setvieworg'    ::  $$MSFLIB$SETVIEWORG$44
!DEC$ ENDIF
      INTEGER*4 x
      INTEGER*4 y
      STRUCTURE/xycoord/
	  INTEGER*2 xcoord
	  INTEGER*2 ycoord
      END STRUCTURE
      RECORD/xycoord/s
!DEC$ ATTRIBUTES REFERENCE ::  s
      END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setviewport(x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: setviewport
!DEC$ ATTRIBUTES C,ALIAS:"__setviewport" ::  setviewport
!DEC$ ELSE
	SUBROUTINE setviewport(x1,y1,x2,y2)
!DEC$ ATTRIBUTES DEFAULT :: setviewport
!DEC$ ATTRIBUTES C,ALIAS: "_setviewport" ::  setviewport
!DEC$ ENDIF
	  INTEGER*2 x1,y1,x2,y2
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION setvisualpage(page)
!DEC$ ATTRIBUTES DEFAULT :: setvisualpage
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setvisualpage,page
!DEC$ ATTRIBUTES C,ALIAS:"__setvisualpage" ::  setvisualpage
!DEC$ ELSE
	  INTEGER*2 setvisualpage,page
!DEC$ ATTRIBUTES C,ALIAS: "_setvisualpage" ::  setvisualpage
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setwindow(finvert,wx1,wy1,wx2,wy2)
!DEC$ ATTRIBUTES DEFAULT :: setwindow
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setwindow
!DEC$ ATTRIBUTES C,ALIAS:"__setwindow" ::  setwindow
!DEC$ ELSE
	  INTEGER*2 setwindow
!DEC$ ATTRIBUTES C,ALIAS: "_setwindow" ::  setwindow
!DEC$ ENDIF
	  LOGICAL*2 finvert
	  DOUBLE PRECISION wx1,wy1,wx2,wy2
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setwritemode(wmode)
!DEC$ ATTRIBUTES DEFAULT :: setwritemode
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setwritemode,wmode
!DEC$ ATTRIBUTES C,ALIAS:"__setwritemode" ::  setwritemode
!DEC$ ELSE
	  INTEGER*2 setwritemode,wmode
!DEC$ ATTRIBUTES C,ALIAS: "_setwritemode" ::  setwritemode
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION wrapon(option)
!DEC$ ATTRIBUTES DEFAULT :: wrapon
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 wrapon,option
!DEC$ ATTRIBUTES C,ALIAS:"__wrapon" ::  wrapon
!DEC$ ELSE
	  INTEGER*2 wrapon,option
!DEC$ ATTRIBUTES C,ALIAS: "_wrapon" ::  wrapon
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
! FONTS
      INTERFACE
	FUNCTION getfontinfo(fi)
!DEC$ ATTRIBUTES DEFAULT :: getfontinfo
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getfontinfo
!DEC$ ATTRIBUTES ALIAS:"__f_getfontinfo@4" ::  getfontinfo
!DEC$ ELSE
	  INTEGER*2 getfontinfo
!DEC$ ATTRIBUTES ALIAS: "_f_getfontinfo"   ::  getfontinfo
!DEC$ ENDIF
	  STRUCTURE/fontinfo/
	      INTEGER*4 type        ! b0 set = vector,clear = bit map
	      INTEGER*4 ascent      ! pix dist from top to baseline
	      INTEGER*4 pixwidth    ! character width in pixels, 0=prop
	      INTEGER*4 pixheight   ! character height in pixels
	      INTEGER*4 avgwidth    ! average character width in pixels
	      CHARACTER*81 filename ! file name including path
	      CHARACTER*32 facename ! font name
	      LOGICAL*1 italic      ! .true. - font  is italic
	      LOGICAL*1 emphasized  ! .true. - font is  emphasized (bold)
	      LOGICAL*1 underline   ! .true. - font is underline
	  END STRUCTURE
	  RECORD/fontinfo/fi
!DEC$ ATTRIBUTES REFERENCE ::  fi
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getgtextextent(text)
!DEC$ ATTRIBUTES DEFAULT :: getgtextextent
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 getgtextextent
!DEC$ ATTRIBUTES ALIAS:"__f_getgtextextent@8" ::  getgtextextent
!DEC$ ELSE
	  INTEGER*2 getgtextextent
!DEC$ ATTRIBUTES ALIAS: "_f_getgtextextent"   ::  getgtextextent
!DEC$ ENDIF
	  CHARACTER*(*) text
!DEC$ ATTRIBUTES REFERENCE ::   text
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getgtextvector(x,y)
!DEC$ ATTRIBUTES DEFAULT :: getgtextvector
!DEC$ ATTRIBUTES ALIAS:"__f_getgtextvector@8" ::  getgtextvector
!DEC$ ELSE
	SUBROUTINE getgtextvector(x,y)
!DEC$ ATTRIBUTES DEFAULT :: getgtextvector
!DEC$ ATTRIBUTES ALIAS: "_f_getgtextvector"   ::  getgtextvector
!DEC$ ENDIF
	  INTEGER*2 x,y
!DEC$ ATTRIBUTES REFERENCE ::   x
!DEC$ ATTRIBUTES REFERENCE ::   y
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE outgtext(text)
!DEC$ ATTRIBUTES DEFAULT :: outgtext
!DEC$ ATTRIBUTES ALIAS:"__f_outgtext@8" ::  outgtext
!DEC$ ELSE
	SUBROUTINE outgtext(text)
!DEC$ ATTRIBUTES DEFAULT :: outgtext
!DEC$ ATTRIBUTES ALIAS: "_f_outgtext"   ::  outgtext
!DEC$ ENDIF
	  CHARACTER*(*) text
!DEC$ ATTRIBUTES REFERENCE ::   text
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION registerfonts(filename)
!DEC$ ATTRIBUTES DEFAULT :: registerfonts
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 registerfonts
!DEC$ ATTRIBUTES ALIAS:"__f_registerfonts@8" ::  registerfonts
!DEC$ ELSE
	  INTEGER*2 registerfonts
!DEC$ ATTRIBUTES ALIAS: "_f_registerfonts"   ::  registerfonts
!DEC$ ENDIF
	  CHARACTER*(*) filename
!DEC$ ATTRIBUTES REFERENCE ::   filename
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION initializefonts()
!DEC$ ATTRIBUTES DEFAULT :: initializefonts
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 initializefonts
!DEC$ ATTRIBUTES ALIAS:"__initializefonts" ::  initializefonts
!DEC$ ELSE
	  INTEGER*2 initializefonts
!DEC$ ATTRIBUTES ALIAS: "_initializefonts" ::  initializefonts
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setfont(options)
!DEC$ ATTRIBUTES DEFAULT :: setfont
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 setfont
!DEC$ ATTRIBUTES ALIAS:"__f_setfont@8" ::  setfont
!DEC$ ELSE
	  INTEGER*2 setfont
!DEC$ ATTRIBUTES ALIAS: "_f_setfont"   ::  setfont
!DEC$ ENDIF
	  CHARACTER*(*) options
!DEC$ ATTRIBUTES REFERENCE ::   options
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE settextfont (fontname)
!DEC$ ATTRIBUTES DEFAULT :: settextfont
!DEC$ ATTRIBUTES ALIAS:"__f_settextfont@4" ::  settextfont
!DEC$ ELSE
	SUBROUTINE settextfont (fontname)
!DEC$ ATTRIBUTES DEFAULT :: settextfont
!DEC$ ATTRIBUTES ALIAS: "_f_settextfont"   ::  settextfont
!DEC$ ENDIF
	  CHARACTER*(*) fontname
!DEC$ ATTRIBUTES REFERENCE ::   fontname
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setgtextvector(x,y)
!DEC$ ATTRIBUTES DEFAULT :: setgtextvector
!DEC$ ATTRIBUTES C,ALIAS:"__setgtextvector" ::  setgtextvector
!DEC$ ELSE
	SUBROUTINE setgtextvector(x,y)
!DEC$ ATTRIBUTES DEFAULT :: setgtextvector
!DEC$ ATTRIBUTES C,ALIAS: "_setgtextvector" ::  setgtextvector
!DEC$ ENDIF
	  INTEGER*2 x,y
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE unregisterfonts()
!DEC$ ATTRIBUTES DEFAULT :: unregisterfonts
!DEC$ ATTRIBUTES C,ALIAS:"__unregisterfonts" ::  unregisterfonts
!DEC$ ELSE
	SUBROUTINE unregisterfonts()
!DEC$ ATTRIBUTES DEFAULT :: unregisterfonts
!DEC$ ATTRIBUTES C,ALIAS: "_unregisterfonts" ::  unregisterfonts
!DEC$ ENDIF
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setgtextrotation(degrees)
!DEC$ ATTRIBUTES DEFAULT :: setgtextrotation
!DEC$ ATTRIBUTES C,ALIAS:"__setgtextrotation" ::  setgtextrotation
!DEC$ ELSE
	SUBROUTINE setgtextrotation(degrees)
!DEC$ ATTRIBUTES DEFAULT :: setgtextrotation
!DEC$ ATTRIBUTES C,ALIAS: "_setgtextrotation" ::  setgtextrotation
!DEC$ ENDIF
	  INTEGER*4 degrees
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION getgtextrotation()
!DEC$ ATTRIBUTES DEFAULT :: getgtextrotation
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 getgtextrotation
!DEC$ ATTRIBUTES C,ALIAS:"__getgtextrotation" ::  getgtextrotation
!DEC$ ELSE
	  INTEGER*4 getgtextrotation
!DEC$ ATTRIBUTES C,ALIAS: "_getgtextrotation" ::  getgtextrotation
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getcolorrgb()
!DEC$ ATTRIBUTES DEFAULT :: getcolorrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 getcolorrgb
!DEC$ ATTRIBUTES C,ALIAS:"__getcolorrgb" ::  getcolorrgb
!DEC$ ELSE
	  INTEGER*4 getcolorrgb
!DEC$ ATTRIBUTES C,ALIAS: "_getcolorrgb" ::  getcolorrgb
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getbkcolorrgb()
!DEC$ ATTRIBUTES DEFAULT :: getbkcolorrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 getbkcolorrgb
!DEC$ ATTRIBUTES C,ALIAS:"__getbkcolorrgb" ::  getbkcolorrgb
!DEC$ ELSE
	  INTEGER*4 getbkcolorrgb
!DEC$ ATTRIBUTES C,ALIAS: "_getbkcolorrgb" ::  getbkcolorrgb
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION gettextcolorrgb()
!DEC$ ATTRIBUTES DEFAULT :: gettextcolorrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 gettextcolorrgb
!DEC$ ATTRIBUTES C,ALIAS:"__gettextcolorrgb" ::  gettextcolorrgb
!DEC$ ELSE
	  INTEGER*4 gettextcolorrgb
!DEC$ ATTRIBUTES C,ALIAS: "_gettextcolorrgb" ::  gettextcolorrgb
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getpixelrgb(x,y)
!DEC$ ATTRIBUTES DEFAULT :: getpixelrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 getpixelrgb
!DEC$ ATTRIBUTES C,ALIAS:"__getpixelrgb" ::  getpixelrgb
!DEC$ ELSE
	  INTEGER*4 getpixelrgb
!DEC$ ATTRIBUTES C,ALIAS: "_getpixelrgb" ::  getpixelrgb
!DEC$ ENDIF
	  INTEGER*2 x
	  INTEGER*2 y
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION getpixelrgb_w(wx, wy)
!DEC$ ATTRIBUTES DEFAULT :: getpixelrgb_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 getpixelrgb_w
!DEC$ ATTRIBUTES C,ALIAS:"__getpixelrgb_w" ::  getpixelrgb_w
!DEC$ ELSE
	  INTEGER*4 getpixelrgb_w
!DEC$ ATTRIBUTES C,ALIAS: "_getpixelrgb_w" ::  getpixelrgb_w
!DEC$ ENDIF
	  REAL*8          wx
	  REAL*8          wy
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setpixelsrgb(n,x,y,color)
!DEC$ ATTRIBUTES DEFAULT :: setpixelsrgb
!DEC$ ATTRIBUTES C,ALIAS:"__setpixelsrgb" ::  setpixelsrgb
!DEC$ ELSE
	SUBROUTINE setpixelsrgb(n,x,y,color)
!DEC$ ATTRIBUTES DEFAULT :: setpixelsrgb
!DEC$ ATTRIBUTES C,ALIAS: "_setpixelsrgb" ::  setpixelsrgb
!DEC$ ENDIF
	  INTEGER*4 n
	  INTEGER*2 x (*)
!DEC$ ATTRIBUTES REFERENCE ::   x 
	  INTEGER*2 y (*)
!DEC$ ATTRIBUTES REFERENCE ::   y 
	  INTEGER*4 color (*)
!DEC$ ATTRIBUTES REFERENCE ::   color 
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE getpixelsrgb(n,x,y,color)
!DEC$ ATTRIBUTES DEFAULT :: getpixelsrgb
!DEC$ ATTRIBUTES C,ALIAS:"__getpixelsrgb" ::  getpixelsrgb
!DEC$ ELSE
	SUBROUTINE getpixelsrgb(n,x,y,color)
!DEC$ ATTRIBUTES DEFAULT :: getpixelsrgb
!DEC$ ATTRIBUTES C,ALIAS: "_getpixelsrgb" ::  getpixelsrgb
!DEC$ ENDIF
	  INTEGER*4 n
	  INTEGER*2 x (*)
!DEC$ ATTRIBUTES REFERENCE ::   x 
	  INTEGER*2 y (*)
!DEC$ ATTRIBUTES REFERENCE ::   y 
	  INTEGER*4 color (*)
!DEC$ ATTRIBUTES REFERENCE ::   color 
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION setcolorrgb(color)
!DEC$ ATTRIBUTES DEFAULT :: setcolorrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 setcolorrgb
!DEC$ ATTRIBUTES C,ALIAS:"__setcolorrgb" ::  setcolorrgb
!DEC$ ELSE
	  INTEGER*4 setcolorrgb
!DEC$ ATTRIBUTES C,ALIAS: "_setcolorrgb" ::  setcolorrgb
!DEC$ ENDIF
	  INTEGER*4 color
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setbkcolorrgb(color)
!DEC$ ATTRIBUTES DEFAULT :: setbkcolorrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 setbkcolorrgb
!DEC$ ATTRIBUTES C,ALIAS:"__setbkcolorrgb" ::  setbkcolorrgb
!DEC$ ELSE
	  INTEGER*4 setbkcolorrgb
!DEC$ ATTRIBUTES C,ALIAS: "_setbkcolorrgb" ::  setbkcolorrgb
!DEC$ ENDIF
	  INTEGER*4 color
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setpixelrgb(x,y,color)
!DEC$ ATTRIBUTES DEFAULT :: setpixelrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 setpixelrgb
!DEC$ ATTRIBUTES C,ALIAS:"__setpixelrgb" ::  setpixelrgb
!DEC$ ELSE
	  INTEGER*4 setpixelrgb
!DEC$ ATTRIBUTES C,ALIAS: "_setpixelrgb" ::  setpixelrgb
!DEC$ ENDIF
	  INTEGER*2 x
	  INTEGER*2 y
	  INTEGER*4 color
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION setpixelrgb_w(x,y,color)
!DEC$ ATTRIBUTES DEFAULT :: setpixelrgb_w
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 setpixelrgb_w
!DEC$ ATTRIBUTES C,ALIAS:"__setpixelrgb_w" ::  setpixelrgb_w
!DEC$ ELSE
	  INTEGER*4 setpixelrgb_w
!DEC$ ATTRIBUTES C,ALIAS: "_setpixelrgb_w" ::  setpixelrgb_w
!DEC$ ENDIF
	  REAL*8          x
	  REAL*8          y
	  INTEGER*4       color
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION settextcolorrgb(color)
!DEC$ ATTRIBUTES DEFAULT :: settextcolorrgb
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 settextcolorrgb
!DEC$ ATTRIBUTES C,ALIAS:"__settextcolorrgb" ::  settextcolorrgb
!DEC$ ELSE
	  INTEGER*4 settextcolorrgb
!DEC$ ATTRIBUTES C,ALIAS: "_settextcolorrgb" ::  settextcolorrgb
!DEC$ ENDIF
	  INTEGER*4 color
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION rgbtointeger(red,green,blue)
!DEC$ ATTRIBUTES DEFAULT :: rgbtointeger
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 rgbtointeger
!DEC$ ATTRIBUTES C,ALIAS:"__rgbtointeger" ::  rgbtointeger
!DEC$ ELSE
	  INTEGER*4 rgbtointeger
!DEC$ ATTRIBUTES C,ALIAS: "_rgbtointeger" ::  rgbtointeger
!DEC$ ENDIF
	  INTEGER*4 red,green,blue
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE integertorgb (rgb, red, green, blue)
!DEC$ ATTRIBUTES DEFAULT :: integertorgb
!DEC$ ATTRIBUTES C,ALIAS:"__integertorgb" ::  integertorgb
!DEC$ ELSE
	SUBROUTINE integertorgb (rgb, red, green, blue)
!DEC$ ATTRIBUTES DEFAULT :: integertorgb
!DEC$ ATTRIBUTES C,ALIAS: "_integertorgb" ::  integertorgb
!DEC$ ENDIF
	  INTEGER*4 rgb
	  INTEGER*4 red    
!DEC$ ATTRIBUTES REFERENCE ::   red    
	  INTEGER*4 green  
!DEC$ ATTRIBUTES REFERENCE ::   green  
	  INTEGER*4 blue   
!DEC$ ATTRIBUTES REFERENCE ::   blue   
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setdblclkinterval(interval)
!DEC$ ATTRIBUTES DEFAULT :: setdblclkinterval
!DEC$ ATTRIBUTES C,ALIAS:"_setdblclkintervalqq" ::  setdblclkinterval
!DEC$ ELSE
	SUBROUTINE setdblclkinterval(interval)
!DEC$ ATTRIBUTES DEFAULT :: setdblclkinterval
!DEC$ ATTRIBUTES C,ALIAS: "setdblclkintervalqq" ::  setdblclkinterval
!DEC$ ENDIF
	  INTEGER interval
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	FUNCTION unregistermouseevent(Unit,MouseEvents)
!DEC$ ATTRIBUTES DEFAULT :: unregistermouseevent
!DEC$ IF DEFINED(_X86_)
	  INTEGER unregistermouseevent
!DEC$ ATTRIBUTES C,ALIAS:"_unregistermouseeventqq" ::  unregistermouseevent
!DEC$ ELSE
	  INTEGER unregistermouseevent
!DEC$ ATTRIBUTES C,ALIAS: "unregistermouseeventqq" ::  unregistermouseevent
!DEC$ ENDIF
	  INTEGER Unit
	  INTEGER MouseEvents
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION registermouseevent(Unit,MouseEvents,CallBackRoutine)
!DEC$ ATTRIBUTES DEFAULT :: registermouseevent
!DEC$ IF DEFINED(_X86_)
	  INTEGER registermouseevent
!DEC$ ATTRIBUTES C,ALIAS:"_registermouseeventqq" ::  registermouseevent
!DEC$ ELSE
	  INTEGER registermouseevent
!DEC$ ATTRIBUTES C,ALIAS: "registermouseeventqq" ::  registermouseevent
!DEC$ ENDIF
	  INTEGER Unit
	  INTEGER MouseEvents
	  EXTERNAL CallBackRoutine
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION waitonmouseevent(MouseEvents,KeyState,x,y)
!DEC$ ATTRIBUTES DEFAULT :: waitonmouseevent
!DEC$ IF DEFINED(_X86_)
	  INTEGER waitonmouseevent
!DEC$ ATTRIBUTES C,ALIAS:"_waitonmouseeventqq" ::  waitonmouseevent
!DEC$ ELSE
	  INTEGER waitonmouseevent
!DEC$ ATTRIBUTES C,ALIAS: "waitonmouseeventqq" ::  waitonmouseevent
!DEC$ ENDIF
	  INTEGER MouseEvents
	  INTEGER KeyState 
!DEC$ ATTRIBUTES REFERENCE ::   KeyState 
	  INTEGER x 
!DEC$ ATTRIBUTES REFERENCE ::   x 
	  INTEGER y 
!DEC$ ATTRIBUTES REFERENCE ::   y 
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setframewindow(X,Y,width,height)
!DEC$ ATTRIBUTES DEFAULT :: setframewindow
!DEC$ ATTRIBUTES C,ALIAS:"__setframewindow" ::  setframewindow
!DEC$ ELSE
	SUBROUTINE setframewindow(X,Y,width,height)
!DEC$ ATTRIBUTES DEFAULT :: setframewindow
!DEC$ ATTRIBUTES C,ALIAS: "_setframewindow" ::  setframewindow
!DEC$ ENDIF
	  INTEGER X
	  INTEGER Y
	  INTEGER width
	  INTEGER height
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setmessageqq(msg, id)
!DEC$ ATTRIBUTES DEFAULT :: setmessageqq
!DEC$ ATTRIBUTES C,ALIAS:"__f_setmessageqq" ::  setmessageqq
!DEC$ ELSE
	SUBROUTINE setmessageqq(msg, id)
!DEC$ ATTRIBUTES DEFAULT :: setmessageqq
!DEC$ ATTRIBUTES C,ALIAS: "_f_setmessageqq" ::  setmessageqq
!DEC$ ENDIF
	  CHARACTER*(*) msg
!DEC$ ATTRIBUTES reference ::   msg
	  INTEGER*4     id
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE setstatusmessage(msg, id)
!DEC$ ATTRIBUTES DEFAULT :: setstatusmessage
!DEC$ ATTRIBUTES C,ALIAS:"__f_setstatusmessage@8" ::  setstatusmessage
!DEC$ ELSE
	SUBROUTINE setstatusmessage(msg, id)
!DEC$ ATTRIBUTES DEFAULT :: setstatusmessage
!DEC$ ATTRIBUTES C,ALIAS: "_f_setstatusmessage"   ::  setstatusmessage
!DEC$ ENDIF
	  CHARACTER*(*) msg
!DEC$ ATTRIBUTES reference ::   msg
	  INTEGER*4     id
	END SUBROUTINE
      END INTERFACE
! We only include the following code once inside the same program unit.
! This code is shared with flib.fi.
!DEC$ IF $DFLIB$FIProgUnitNum .ne. $DFLIB$ProgramUnitNumber
$undefine $DFLIB$FIProgUnitNum
!DEC$ DEFINE $DFLIB$FIProgUnitNum = $DFLIB$ProgramUnitNumber
      INTERFACE
	FUNCTION INCHARQQ()
!DEC$ ATTRIBUTES DEFAULT :: INCHARQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 INCHARQQ
!DEC$ ATTRIBUTES C,ALIAS:"__inchar" ::  INCHARQQ
!DEC$ ELSE
	  INTEGER*2 INCHARQQ
!DEC$ ATTRIBUTES C,ALIAS: "_inchar" ::  INCHARQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGOPENQQ(name)
!DEC$ ATTRIBUTES DEFAULT :: WGOPENQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGOPENQQ
!DEC$ ATTRIBUTES C,ALIAS:"__wgopen" ::  WGOPENQQ
!DEC$ ELSE
	  INTEGER*4 WGOPENQQ
!DEC$ ATTRIBUTES C,ALIAS: "_wgopen" ::  WGOPENQQ
!DEC$ ENDIF
	  CHARACTER*(*) name
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGCLOSEQQ(dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: WGCLOSEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGCLOSEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS:"__wgclose" ::  WGCLOSEQQ
!DEC$ ELSE
	  INTEGER*4 WGCLOSEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS: "_wgclose" ::  WGCLOSEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGSETACTIVEQQ(dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: WGSETACTIVEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGSETACTIVEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS:"__wgsetactive" ::  WGSETACTIVEQQ
!DEC$ ELSE
	  INTEGER*4 WGSETACTIVEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS: "_wgsetactive" ::  WGSETACTIVEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGGETACTIVEQQ()
!DEC$ ATTRIBUTES DEFAULT :: WGGETACTIVEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGGETACTIVEQQ
!DEC$ ATTRIBUTES C,ALIAS:"__wggetactive" ::  WGGETACTIVEQQ
!DEC$ ELSE
	  INTEGER*4 WGGETACTIVEQQ
!DEC$ ATTRIBUTES C,ALIAS: "_wggetactive" ::  WGGETACTIVEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
!DEC$ ENDIF
!DEC$ ENDIF  ! !DEC$ IF .NOT. DEFINED (__DFLIB_FLIB_INCLUDE)
!****************************** Module Header ******************************
!*
!* Copyright (c) 1990-1995  Microsoft Corporation
!*
!* Module Name: FLIB.FI
!*
!* This module provides interface descriptions for subprograms found
!* in the various Fortran libraries.  
!*
!* The functional areas covered are the following.
!*
!*    Math error support
!*    Signal support
!*    Coprocessor Control
!*    Time and Date Support
!*    Command Line Arguments
!*    Random Numbers
!*    Running Programs and System Commands
!*    Drives and Directories
!*    Files
!*    Keyboard
!*    Errors
!*    Environment
!*    Beep and Sleep
!*    Sorting and Searching Arrays
!*    Configuration
!*    QuickWin Support
!*    Access to Windows Handles for QuickWin components
!*    QuickWin Default Menu Support
!*    
!*
!***************************************************************************
!* NOTE: When modifying this file, you must follow the following rules to
!* ensure compatibility with fixed form and free form source:
!*   1) All comments must start with '!'
!*   2) All code must be within columns 7 to 72
!*   3) For continuation, place a '&' in column 73,
!*      and a '&' in column 6 of the continuation line
!DEC$ IF .NOT. DEFINED($DFLIB$ProgramUnitNumber)
!DEC$ DEFINE $DFLIB$ProgramUnitNumber = -1
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED($DFLIB$FIProgUnitNum)
!DEC$ DEFINE $DFLIB$FIProgUnitNum = -2
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED(__DFLIB_FGRAPH_INCLUDE)
! -----------------------------------------------------------------
! Math Error Support
! -----------------------------------------------------------------
! MATHERRQQ -- user callbacks cannot be in the module MSFLIB
! -----------------------------------------------------------------
! Signal support
! -----------------------------------------------------------------
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	INTEGER*4 FUNCTION SIGNALQQ(SIGNAL, HANDLER)
!DEC$ ATTRIBUTES DEFAULT :: SIGNALQQ
!DEC$ ATTRIBUTES c,alias:'_signal' :: SIGNALQQ
!DEC$ ELSE
	INTEGER*4 FUNCTION SIGNALQQ(SIGNAL, HANDLER)
!DEC$ ATTRIBUTES DEFAULT :: SIGNALQQ
!DEC$ ATTRIBUTES c,alias: 'signal' :: SIGNALQQ
!DEC$ ENDIF
	  INTEGER*4 SIGNAL
!DEC$ ATTRIBUTES VALUE ::   SIGNAL
	  integer*4 handler
	  EXTERNAL HANDLER
	END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	INTEGER*4 FUNCTION RAISEQQ(SIGNAL)
!DEC$ ATTRIBUTES DEFAULT :: RAISEQQ
!DEC$ ATTRIBUTES c,alias:'_raise' :: RAISEQQ
!DEC$ ELSE
	INTEGER*4 FUNCTION RAISEQQ(SIGNAL)
!DEC$ ATTRIBUTES DEFAULT :: RAISEQQ
!DEC$ ATTRIBUTES c,alias: 'raise' :: RAISEQQ
!DEC$ ENDIF
	  INTEGER*4 SIGNAL
!DEC$ ATTRIBUTES VALUE ::   SIGNAL
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Coprocessor Control
! -----------------------------------------------------------------
      INTERFACE
	SUBROUTINE LCWRQQ(CONTROL)
!DEC$ ATTRIBUTES DEFAULT :: LCWRQQ
	  INTEGER*2 CONTROL
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE SCWRQQ(CONTROL)
!DEC$ ATTRIBUTES DEFAULT :: SCWRQQ
	  INTEGER*2 CONTROL
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE SSWRQQ(STATUS)
!DEC$ ATTRIBUTES DEFAULT :: SSWRQQ
	  INTEGER*2 STATUS
	END SUBROUTINE
      END INTERFACE
!  Add additional interfaces for base rtl routines.
!  First, constants required for these routines...
! 
! This is a copy of fpeflags.for.
! ****************************************************************************
! *                                                                          *
! *  Copyright (c) 1997                                                      *
! *  by DIGITAL Equipment Corporation, Maynard, Mass.                        *
! *                                                                          *
! *  This software is furnished under a license and may be used and  copied  *
! *  only  in  accordance  with  the  terms  of  such  license and with the  *
! *  inclusion of the above copyright notice.  This software or  any  other  *
! *  copies  thereof may not be provided or otherwise made available to any  *
! *  other person.  No title to and ownership of  the  software  is  hereby  *
! *  transferred.                                                            *
! *                                                                          *
! *  The information in this software is subject to change  without  notice  *
! *  and  should  not  be  construed  as  a commitment by DIGITAL Equipment  *
! *  Corporation.                                                            *
! *                                                                          *
! *                                                                          *
! ****************************************************************************
 
!*** MODULE for_fpe_flags IDENT DJM1-003 ***
	PARAMETER FOR_K_FPE_CNT_UNDERFLOW = '00000001'X
	PARAMETER FOR_K_FPE_CNT_OVERFLOW = '00000002'X
	PARAMETER FOR_K_FPE_CNT_DIVIDE0 = '00000003'X
	PARAMETER FOR_K_FPE_CNT_INVALID = '00000004'X
	PARAMETER FOR_K_FPE_CNT_ARRAY_MAX = '00000004'X
	PARAMETER FPE_M_TRAP_UND = '00000001'X
	PARAMETER FPE_M_TRAP_OVF = '00000002'X
	PARAMETER FPE_M_TRAP_DIV0 = '00000004'X
	PARAMETER FPE_M_TRAP_INV = '00000008'X
	PARAMETER FPE_M_RESERVED_00 = '00000010'X
	PARAMETER FPE_M_RESERVED_01 = '00000020'X
	PARAMETER FPE_M_RESERVED_02 = '00000040'X
	PARAMETER FPE_M_RESERVED_03 = '00000080'X
	PARAMETER FPE_M_MSG_OVF = '00000100'X
	PARAMETER FPE_M_MSG_UND = '00000200'X
	PARAMETER FPE_M_MSG_DIV0 = '00000400'X
	PARAMETER FPE_M_MSG_INV = '00000800'X
	PARAMETER FPE_M_RESERVED_04 = '00001000'X
	PARAMETER FPE_M_RESERVED_05 = '00002000'X
	PARAMETER FPE_M_RESERVED_06 = '00004000'X
	PARAMETER FPE_M_RESERVED_07 = '00008000'X
	PARAMETER FPE_M_ABRUPT_UND = '00010000'X
	PARAMETER FPE_M_ABRUPT_OVF = '00020000'X
	PARAMETER FPE_M_ABRUPT_DIV0 = '00040000'X
	PARAMETER FPE_M_ABRUPT_INV = '00080000'X
	PARAMETER FPE_M_RESERVED_08 = '00100000'X
	PARAMETER FPE_M_RESERVED_09 = '00200000'X
	PARAMETER FPE_M_RESERVED_10 = '00400000'X
	PARAMETER FPE_M_RESERVED_11 = '00800000'X
	PARAMETER FPE_M_RESERVED_12 = '01000000'X
	PARAMETER FPE_M_RESERVED_13 = '02000000'X
	PARAMETER FPE_M_RESERVED_14 = '04000000'X
	PARAMETER FPE_M_RESERVED_15 = '08000000'X
	PARAMETER FPE_M_RESERVED_16 = '10000000'X
	PARAMETER FPE_M_RESERVED_17 = '20000000'X
	PARAMETER FPE_M_RESERVED_18 = '40000000'X
	PARAMETER FPE_M_RESERVED_19 = '80000000'X
	STRUCTURE /for_fpe_flags/
	    PARAMETER FPE_S_TRAP_UND = 1
	    PARAMETER FPE_V_TRAP_UND = 0
	    PARAMETER FPE_S_TRAP_OVF = 1
	    PARAMETER FPE_V_TRAP_OVF = 1
	    PARAMETER FPE_S_TRAP_DIV0 = 1
	    PARAMETER FPE_V_TRAP_DIV0 = 2
	    PARAMETER FPE_S_TRAP_INV = 1
	    PARAMETER FPE_V_TRAP_INV = 3
	    PARAMETER FPE_S_RESERVED_00 = 1
	    PARAMETER FPE_V_RESERVED_00 = 4
	    PARAMETER FPE_S_RESERVED_01 = 1
	    PARAMETER FPE_V_RESERVED_01 = 5
	    PARAMETER FPE_S_RESERVED_02 = 1
	    PARAMETER FPE_V_RESERVED_02 = 6
	    PARAMETER FPE_S_RESERVED_03 = 1
	    PARAMETER FPE_V_RESERVED_03 = 7
	    PARAMETER FPE_S_MSG_OVF = 1
	    PARAMETER FPE_V_MSG_OVF = 8
	    PARAMETER FPE_S_MSG_UND = 1
	    PARAMETER FPE_V_MSG_UND = 9
	    PARAMETER FPE_S_MSG_DIV0 = 1
	    PARAMETER FPE_V_MSG_DIV0 = 10
	    PARAMETER FPE_S_MSG_INV = 1
	    PARAMETER FPE_V_MSG_INV = 11
	    PARAMETER FPE_S_RESERVED_04 = 1
	    PARAMETER FPE_V_RESERVED_04 = 12
	    PARAMETER FPE_S_RESERVED_05 = 1
	    PARAMETER FPE_V_RESERVED_05 = 13
	    PARAMETER FPE_S_RESERVED_06 = 1
	    PARAMETER FPE_V_RESERVED_06 = 14
	    PARAMETER FPE_S_RESERVED_07 = 1
	    PARAMETER FPE_V_RESERVED_07 = 15
	    PARAMETER FPE_S_ABRUPT_UND = 1
	    PARAMETER FPE_V_ABRUPT_UND = 16
	    PARAMETER FPE_S_ABRUPT_OVF = 1
	    PARAMETER FPE_V_ABRUPT_OVF = 17
	    PARAMETER FPE_S_ABRUPT_DIV0 = 1
	    PARAMETER FPE_V_ABRUPT_DIV0 = 18
	    PARAMETER FPE_S_ABRUPT_INV = 1
	    PARAMETER FPE_V_ABRUPT_INV = 19
	    PARAMETER FPE_S_RESERVED_08 = 1
	    PARAMETER FPE_V_RESERVED_08 = 20
	    PARAMETER FPE_S_RESERVED_09 = 1
	    PARAMETER FPE_V_RESERVED_09 = 21
	    PARAMETER FPE_S_RESERVED_10 = 1
	    PARAMETER FPE_V_RESERVED_10 = 22
	    PARAMETER FPE_S_RESERVED_11 = 1
	    PARAMETER FPE_V_RESERVED_11 = 23
	    PARAMETER FPE_S_RESERVED_12 = 1
	    PARAMETER FPE_V_RESERVED_12 = 24
	    PARAMETER FPE_S_RESERVED_13 = 1
	    PARAMETER FPE_V_RESERVED_13 = 25
	    PARAMETER FPE_S_RESERVED_14 = 1
	    PARAMETER FPE_V_RESERVED_14 = 26
	    PARAMETER FPE_S_RESERVED_15 = 1
	    PARAMETER FPE_V_RESERVED_15 = 27
	    PARAMETER FPE_S_RESERVED_16 = 1
	    PARAMETER FPE_V_RESERVED_16 = 28
	    PARAMETER FPE_S_RESERVED_17 = 1
	    PARAMETER FPE_V_RESERVED_17 = 29
	    PARAMETER FPE_S_RESERVED_18 = 1
	    PARAMETER FPE_V_RESERVED_18 = 30
	    PARAMETER FPE_S_RESERVED_19 = 1
	    PARAMETER FPE_V_RESERVED_19 = 31
	    BYTE %FILL (4)
	END STRUCTURE   ! for_fpe_flags
! 
! This is a copy of forreent.for.
! 
! ****************************************************************************
! *                                                                          *
! *  Copyright (c) 1997                                                      *
! *  by DIGITAL Equipment Corporation, Maynard, Mass.                        *
! *                                                                          *
! *  This software is furnished under a license and may be used and  copied  *
! *  only  in  accordance  with  the  terms  of  such  license and with the  *
! *  inclusion of the above copyright notice.  This software or  any  other  *
! *  copies  thereof may not be provided or otherwise made available to any  *
! *  other person.  No title to and ownership of  the  software  is  hereby  *
! *  transferred.                                                            *
! *                                                                          *
! *  The information in this software is subject to change  without  notice  *
! *  and  should  not  be  construed  as  a commitment by DIGITAL Equipment  *
! *  Corporation.                                                            *
! *                                                                          *
! *                                                                          *
! ****************************************************************************
 
!*** MODULE for_reent_codes IDENT SAR1-002 ***
	PARAMETER FOR_K_REENTRANCY_NONE = '00000000'X
	PARAMETER FOR_K_REENTRANCY_ASYNCH = '00000001'X
	PARAMETER FOR_K_REENTRANCY_THREADED = '00000002'X
	PARAMETER FOR_K_REENTRANCY_INFO = '00000003'X
! Now, the routines...
      INTERFACE
!DEC$ IF DEFINED(_X86_)
       INTEGER*4 FUNCTION FOR_SET_FPE(ENABLE_MASK)
!DEC$ ATTRIBUTES DEFAULT :: FOR_SET_FPE
!DEC$ ATTRIBUTES alias:'_for_set_fpe_@4' ::  FOR_SET_FPE
!DEC$ ELSE
	INTEGER*4 FUNCTION FOR_SET_FPE(ENABLE_MASK)
!DEC$ ATTRIBUTES DEFAULT :: FOR_SET_FPE
!DEC$ ATTRIBUTES alias: 'for_set_fpe_'   ::  FOR_SET_FPE
!DEC$ ENDIF
       INTEGER*4 ENABLE_MASK
       END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
       INTEGER*4 FUNCTION  FOR_SET_REENTRANCY(NEW_MODE)
!DEC$ ATTRIBUTES DEFAULT :: FOR_SET_REENTRANCY
!DEC$ ATTRIBUTES alias:'_for_set_reentrancy@4' ::  FOR_SET_REENTRANCY
!DEC$ ELSE
	INTEGER*4 FUNCTION  FOR_SET_REENTRANCY(NEW_MODE)
!DEC$ ATTRIBUTES DEFAULT :: FOR_SET_REENTRANCY
!DEC$ ATTRIBUTES alias: 'for_set_reentrancy'   ::  FOR_SET_REENTRANCY
!DEC$ ENDIF
       INTEGER*4 NEW_MODE
       END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
       INTEGER*4 FUNCTION  FOR_GET_FPE()
!DEC$ ATTRIBUTES DEFAULT :: FOR_GET_FPE
!DEC$ ATTRIBUTES alias:'_for_get_fpe_@0' ::  FOR_GET_FPE
!DEC$ ELSE
	INTEGER*4 FUNCTION  FOR_GET_FPE()
!DEC$ ATTRIBUTES DEFAULT :: FOR_GET_FPE
!DEC$ ATTRIBUTES alias: 'for_get_fpe_'   ::  FOR_GET_FPE
!DEC$ ENDIF
       END FUNCTION
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
       SUBROUTINE FOR_CHECK_FLAWED_PENTIUM()
!DEC$ ATTRIBUTES DEFAULT :: FOR_CHECK_FLAWED_PENTIUM
!DEC$ ATTRIBUTES alias:'_for_check_flawed_pentium@0' :: FOR_CHECK_FLAWED_PENTIUM
!DEC$ ELSE
       SUBROUTINE FOR_CHECK_FLAWED_PENTIUM()
!DEC$ ATTRIBUTES DEFAULT :: FOR_CHECK_FLAWED_PENTIUM
!DEC$ ATTRIBUTES alias:'for_check_flawed_pentium' :: FOR_CHECK_FLAWED_PENTIUM
!DEC$ ENDIF
       END SUBROUTINE
      END INTERFACE
! End of new routines...
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE SETCONTROLFPQQ(CONTROL)
!DEC$ ATTRIBUTES DEFAULT :: SETCONTROLFPQQ
!DEC$ ATTRIBUTES alias:'_LCWRQQ@4' ::  SETCONTROLFPQQ
!DEC$ ELSE
	SUBROUTINE SETCONTROLFPQQ(CONTROL)
!DEC$ ATTRIBUTES DEFAULT :: SETCONTROLFPQQ
!DEC$ ATTRIBUTES alias: 'LCWRQQ'   ::  SETCONTROLFPQQ
!DEC$ ENDIF
	  INTEGER*2 CONTROL
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE GETCONTROLFPQQ(CONTROL)
!DEC$ ATTRIBUTES DEFAULT :: GETCONTROLFPQQ
!DEC$ ATTRIBUTES alias:'_SCWRQQ@4' ::  GETCONTROLFPQQ
!DEC$ ELSE
	SUBROUTINE GETCONTROLFPQQ(CONTROL)
!DEC$ ATTRIBUTES DEFAULT :: GETCONTROLFPQQ
!DEC$ ATTRIBUTES alias: 'SCWRQQ'   ::  GETCONTROLFPQQ
!DEC$ ENDIF
	  INTEGER*2 CONTROL
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE GETSTATUSFPQQ(STATUS)
!DEC$ ATTRIBUTES DEFAULT :: GETSTATUSFPQQ
!DEC$ ATTRIBUTES alias:'_SSWRQQ@4' ::  GETSTATUSFPQQ
!DEC$ ELSE
	SUBROUTINE GETSTATUSFPQQ(STATUS)
!DEC$ ATTRIBUTES DEFAULT :: GETSTATUSFPQQ
!DEC$ ATTRIBUTES alias: 'SSWRQQ'   ::  GETSTATUSFPQQ
!DEC$ ENDIF
	  INTEGER*2 STATUS
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE CLEARSTATUSFPQQ()
!DEC$ ATTRIBUTES DEFAULT :: CLEARSTATUSFPQQ
!DEC$ ATTRIBUTES alias:'_CLEARSTATUSFPQQ@0' ::  CLEARSTATUSFPQQ
!DEC$ ELSE
	SUBROUTINE CLEARSTATUSFPQQ()
!DEC$ ATTRIBUTES DEFAULT :: CLEARSTATUSFPQQ
!DEC$ ATTRIBUTES alias: 'CLEARSTATUSFPQQ'   ::  CLEARSTATUSFPQQ
!DEC$ ENDIF
	END SUBROUTINE
      END INTERFACE
      INTERFACE
!DEC$ IF DEFINED(_X86_)
       INTEGER*4 FUNCTION  GETEXCEPTIONPTRSQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETEXCEPTIONPTRSQQ
!DEC$ ATTRIBUTES alias:'_GETEXCEPTIONPTRSQQ@0' ::  GETEXCEPTIONPTRSQQ
!DEC$ ELSE
	INTEGER*4 FUNCTION  GETEXCEPTIONPTRSQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETEXCEPTIONPTRSQQ
!DEC$ ATTRIBUTES alias: 'GETEXCEPTIONPTRSQQ'   ::  GETEXCEPTIONPTRSQQ
!DEC$ ENDIF
       END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Time and Date Support
! -----------------------------------------------------------------
      INTERFACE
	SUBROUTINE GETTIM(IHR, IMIN, ISEC, I100TH)
!DEC$ ATTRIBUTES DEFAULT :: GETTIM
	  INTEGER*2 IHR, IMIN, ISEC, I100TH
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	LOGICAL FUNCTION SETTIM(IHR, IMIN, ISEC, I100TH)
!DEC$ ATTRIBUTES DEFAULT :: SETTIM
	  INTEGER*2 IHR, IMIN, ISEC, I100TH
	END FUNCTION
      END INTERFACE
      INTERFACE
	SUBROUTINE GETDAT(IYR, IMON, IDAY)
!DEC$ ATTRIBUTES DEFAULT :: GETDAT
	  INTEGER*2 IYR, IMON, IDAY
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	LOGICAL FUNCTION SETDAT(IYR, IMON, IDAY)
!DEC$ ATTRIBUTES DEFAULT :: SETDAT
	  INTEGER*2 IYR, IMON, IDAY
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Command Line Arguments
! -----------------------------------------------------------------
      INTERFACE
	INTEGER*4 FUNCTION NARGS()
!DEC$ ATTRIBUTES DEFAULT :: NARGS
	END FUNCTION
      END INTERFACE
      INTERFACE
	SUBROUTINE GETARG(N, BUFFER, STATUS)
!DEC$ ATTRIBUTES DEFAULT :: GETARG
	  INTEGER*2 N
	  CHARACTER*(*) BUFFER
	  INTEGER*2, OPTIONAL :: STATUS      
	END SUBROUTINE
      END INTERFACE
! -----------------------------------------------------------------
! Random Numbers
! -----------------------------------------------------------------
! Random is a generic interface for use with the RANDOM in portlib
      INTERFACE RANDOM
	 SUBROUTINE $$MSFLIB$RANDOM(ARG)
!DEC$ ATTRIBUTES DEFAULT :: $$MSFLIB$RANDOM
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES ALIAS:'_RANDOM@4' :: $$MSFLIB$RANDOM
!DEC$ ELSE
!DEC$ ATTRIBUTES ALIAS: 'RANDOM'   :: $$MSFLIB$RANDOM
!DEC$ ENDIF
	 REAL*4 ARG
	 END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE SEED(ARG)
!DEC$ ATTRIBUTES DEFAULT :: SEED
	  INTEGER*4 ARG
	END SUBROUTINE
      END INTERFACE
! -----------------------------------------------------------------
! Running Programs and System Commands
! -----------------------------------------------------------------
      INTERFACE
	INTEGER*4 FUNCTION RUNQQ(FILENAME, COMMANDLINE)
!DEC$ ATTRIBUTES DEFAULT :: RUNQQ
	  CHARACTER*(*) FILENAME, COMMANDLINE
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION SYSTEMQQ(COMMANDLINE)
!DEC$ ATTRIBUTES DEFAULT :: SYSTEMQQ
	  CHARACTER*(*) COMMANDLINE
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Drives and Directories
! -----------------------------------------------------------------
      INTERFACE GETDRIVESIZEQQ
!New interface for 64 bit result values as well as the
!original 32 bit result values.
!
! Original interface with 32-bit integer sizes
!
	LOGICAL(4) FUNCTION GETDRIVESIZEQQI4(DRIVE,TOTAL,AVAIL)
!DEC$ IF DEFINED (_X86_)
!DEC$ ATTRIBUTES DEFAULT,ALIAS:"_GETDRIVESIZEQQ@16" :: GETDRIVESIZEQQI4
!DEC$ ELSE
!DEC$ ATTRIBUTES DEFAULT,ALIAS:"GETDRIVESIZEQQ" :: GETDRIVESIZEQQI4
!DEC$ ENDIF
	  CHARACTER(*) DRIVE
	  INTEGER(4) TOTAL, AVAIL
	END FUNCTION GETDRIVESIZEQQI4

! Define interface with TOTAL and AVAIL as an array of two 
! INTEGER(4) elements to receive the 64-bit size
!
	LOGICAL(4) FUNCTION GETDRIVESIZEQQI4A (DRIVE,TOTAL,AVAIL)
!DEC$ IF DEFINED (_X86_)
!DEC$ ATTRIBUTES DEFAULT,ALIAS:"_GETDRIVESIZEEXQQ@16" :: GETDRIVESIZEQQI4A
!DEC$ ELSE
!DEC$ ATTRIBUTES DEFAULT,ALIAS:"GETDRIVESIZEEXQQ" :: GETDRIVESIZEQQI4A
!DEC$ ENDIF
      CHARACTER(*) DRIVE
	  INTEGER(4), DIMENSION(2) :: TOTAL, AVAIL
	  END FUNCTION GETDRIVESIZEQQI4A

! Define interface for ALPHA with INTEGER(8) -
! And also for X86 since it now supports INTEGER(8).

	LOGICAL(4) FUNCTION GETDRIVESIZEQQI8 (DRIVE,TOTAL,AVAIL)
!DEC$ IF DEFINED (_X86_)
!DEC$ ATTRIBUTES DEFAULT,ALIAS:"_GETDRIVESIZEEXQQ@16" :: GETDRIVESIZEQQI8
!DEC$ ELSE
!DEC$ ATTRIBUTES DEFAULT,ALIAS:"GETDRIVESIZEEXQQ" :: GETDRIVESIZEQQI8
!DEC$ ENDIF
      CHARACTER(*) DRIVE
	  INTEGER(8) TOTAL, AVAIL
	  END FUNCTION GETDRIVESIZEQQI8

      END INTERFACE GETDRIVESIZEQQ
!---------------------------------------------------------------------
      INTERFACE
	CHARACTER*26 FUNCTION GETDRIVESQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETDRIVESQQ
	END FUNCTION
      END INTERFACE
      INTERFACE
	INTEGER*4 FUNCTION GETDRIVEDIRQQ(BUFFER)
!DEC$ ATTRIBUTES DEFAULT :: GETDRIVEDIRQQ
	  CHARACTER*(*) BUFFER
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION CHANGEDRIVEQQ(DRIVE)
!DEC$ ATTRIBUTES DEFAULT :: CHANGEDRIVEQQ
	  CHARACTER*(*) DRIVE
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION CHANGEDIRQQ(DIR)
!DEC$ ATTRIBUTES DEFAULT :: CHANGEDIRQQ
	  CHARACTER*(*) DIR
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION MAKEDIRQQ(DIR)
!DEC$ ATTRIBUTES DEFAULT :: MAKEDIRQQ
	  CHARACTER*(*) DIR
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION DELDIRQQ(DIR)
!DEC$ ATTRIBUTES DEFAULT :: DELDIRQQ
	  CHARACTER*(*) DIR
	END FUNCTION
      END INTERFACE
      INTERFACE
	INTEGER*4 FUNCTION FULLPATHQQ(NAME, FULLPATH)
!DEC$ ATTRIBUTES DEFAULT :: FULLPATHQQ
	  CHARACTER*(*) NAME, FULLPATH
	END FUNCTION
      END INTERFACE
      INTERFACE
	INTEGER*4 FUNCTION SPLITPATHQQ(PATH, DRIVE, DIR,NAME, EXT)
!DEC$ ATTRIBUTES DEFAULT :: SPLITPATHQQ
	  CHARACTER*(*) PATH, DRIVE, DIR, NAME, EXT
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Files
! -----------------------------------------------------------------
      INTERFACE
	INTEGER*4 FUNCTION GETFILEINFOQQ(FILES, BUFFER,dwHANDLE)
!DEC$ ATTRIBUTES DEFAULT :: GETFILEINFOQQ
	  CHARACTER*(*) FILES
	  STRUCTURE / FILE$INFO /
	    INTEGER*4       CREATION          ! Creation time (-1 on FAT)
	    INTEGER*4       LASTWRITE         ! Last write to file
	    INTEGER*4       LASTACCESS        ! Last access (-1 on FAT)
	    INTEGER*4       LENGTH            ! Length of file
	    INTEGER*2       PERMIT            ! File access mode
	    CHARACTER*255   NAME              ! File name
	  END STRUCTURE
	  RECORD / FILE$INFO / BUFFER
	  INTEGER*4 dwHANDLE
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION SETFILETIMEQQ(NAME, TIMEDATE)
!DEC$ ATTRIBUTES DEFAULT :: SETFILETIMEQQ
	  CHARACTER*(*) NAME
	  INTEGER*4 TIMEDATE
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION SETFILEACCESSQQ(NAME, ACCESS)
!DEC$ ATTRIBUTES DEFAULT :: SETFILEACCESSQQ
	  CHARACTER*(*) NAME
	  INTEGER*4 ACCESS
	END FUNCTION
      END INTERFACE
      INTERFACE
	INTEGER*4 FUNCTION DELFILESQQ(FILES)
!DEC$ ATTRIBUTES DEFAULT :: DELFILESQQ
	  CHARACTER*(*) FILES
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION RENAMEFILEQQ(OLDNAME, NEWNAME)
!DEC$ ATTRIBUTES DEFAULT :: RENAMEFILEQQ
	  CHARACTER*(*) OLDNAME, NEWNAME
	END FUNCTION
      END INTERFACE
      INTERFACE
	INTEGER*4 FUNCTION FINDFILEQQ(FILE, ENV, BUF)
!DEC$ ATTRIBUTES DEFAULT :: FINDFILEQQ
	  CHARACTER*(*) FILE, ENV, BUF
	END FUNCTION
      END INTERFACE
      INTERFACE
	SUBROUTINE PACKTIMEQQ(TIMEDATE, IYR, IMON, IDAY,IHR, IMIN, ISEC)
!DEC$ ATTRIBUTES DEFAULT :: PACKTIMEQQ
	  INTEGER*4 TIMEDATE
	  INTEGER*2 IYR, IMON, IDAY, IHR, IMIN, ISEC
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE UNPACKTIMEQQ(TIMEDATE, IYR, IMON, IDAY,IHR, IMIN, ISEC)
!DEC$ ATTRIBUTES DEFAULT :: UNPACKTIMEQQ
	  INTEGER*4 TIMEDATE
	  INTEGER*2 IYR, IMON, IDAY, IHR, IMIN, ISEC
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION COMMITQQ(UNIT)
!DEC$ ATTRIBUTES DEFAULT :: COMMITQQ
	  INTEGER*4 UNIT
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Keyboard
! -----------------------------------------------------------------
      INTERFACE
	CHARACTER*1 FUNCTION GETCHARQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETCHARQQ
	END FUNCTION
      END INTERFACE

! argument values for the integer version of PASSDIRKEYSQQ 
integer*4, parameter :: PASS_DIR_FALSE  = 0 ! pass nothing special
integer*4, parameter :: PASS_DIR_TRUE   = 1 ! pass direction keys
integer*4, parameter :: PASS_DIR_INSDEL = 2 ! pass above + insert and delete
integer*4, parameter :: PASS_DIR_CNTRLC = 3 ! pass above + control c
 
      INTERFACE PASSDIRKEYSQQ
	LOGICAL*4 FUNCTION PASSDIRKEYSQQ1(BV)
!DEC$ ATTRIBUTES DEFAULT :: PASSDIRKEYSQQ1
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES  ALIAS : '_PASSDIRKEYSQQ@4' :: PASSDIRKEYSQQ1
!DEC$ ELSE
!DEC$ ATTRIBUTES  ALIAS :  'PASSDIRKEYSQQ'    :: PASSDIRKEYSQQ1
!DEC$ ENDIF
	LOGICAL*4 BV 
	END FUNCTION PASSDIRKEYSQQ1
	INTEGER*4 FUNCTION PASSDIRKEYSQQ2(IV)
!DEC$ ATTRIBUTES DEFAULT :: PASSDIRKEYSQQ2
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES  ALIAS : '_PASSDIRKEYSQQ@4' :: PASSDIRKEYSQQ2
!DEC$ ELSE
!DEC$ ATTRIBUTES  ALIAS :  'PASSDIRKEYSQQ'    :: PASSDIRKEYSQQ2
!DEC$ ENDIF
	INTEGER*4 IV 
	END FUNCTION PASSDIRKEYSQQ2
      END INTERFACE

      INTERFACE
	LOGICAL*4 FUNCTION PEEKCHARQQ()
!DEC$ ATTRIBUTES DEFAULT :: PEEKCHARQQ
	END FUNCTION
      END INTERFACE

      INTERFACE
	INTEGER*4 FUNCTION GETSTRQQ(BUFFER)
!DEC$ ATTRIBUTES DEFAULT :: GETSTRQQ
	  CHARACTER*(*) BUFFER
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Errors
! -----------------------------------------------------------------
      INTERFACE
	INTEGER*4 FUNCTION GETLASTERRORQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETLASTERRORQQ
	END FUNCTION
      END INTERFACE
      INTERFACE
	SUBROUTINE SETERRORMODEQQ(PROMPT)
!DEC$ ATTRIBUTES DEFAULT :: SETERRORMODEQQ
	  LOGICAL*4 PROMPT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE TRACEBACKQQ(STRING, USER_EXIT_CODE, STATUS, EPTR)
	USE DFWINTY,ONLY:T_EXCEPTION_POINTERS
!DEC$ ATTRIBUTES DEFAULT :: TRACEBACKQQ
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES  ALIAS : '_TRACEBACKQQ@20' :: TRACEBACKQQ
!DEC$ ELSE
!DEC$ ATTRIBUTES  ALIAS :  'TRACEBACKQQ'    :: TRACEBACKQQ
!DEC$ ENDIF
	  CHARACTER*(*), INTENT(IN), OPTIONAL :: STRING
	  INTEGER*4, INTENT(IN), OPTIONAL :: USER_EXIT_CODE
	  INTEGER*4, INTENT(OUT), OPTIONAL :: STATUS
	  OPTIONAL EPTR
	  TYPE(T_EXCEPTION_POINTERS) :: EBASE
	  POINTER(EPTR,EBASE)
	END SUBROUTINE
      END INTERFACE
! -----------------------------------------------------------------
! Environment
! -----------------------------------------------------------------
      INTERFACE
	INTEGER*4 FUNCTION GETENVQQ(NAME, VALUE)
!DEC$ ATTRIBUTES DEFAULT :: GETENVQQ
	  CHARACTER*(*) NAME, VALUE
	END FUNCTION
      END INTERFACE
      INTERFACE
	LOGICAL*4 FUNCTION SETENVQQ(NAMVAL)
!DEC$ ATTRIBUTES DEFAULT :: SETENVQQ
	  CHARACTER*(*) NAMVAL
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Beep and Sleep
! -----------------------------------------------------------------
      INTERFACE
	SUBROUTINE SLEEPQQ(DURATION)
!DEC$ ATTRIBUTES DEFAULT :: SLEEPQQ
	  INTEGER*4 DURATION
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE BEEPQQ(FREQUENCY, DURATION)
!DEC$ ATTRIBUTES DEFAULT :: BEEPQQ
	  INTEGER*4 FREQUENCY, DURATION
	END SUBROUTINE
      END INTERFACE
! ----------------------------------------------------------------
! Sorting and Searching Arrays
! ----------------------------------------------------------------
      INTERFACE
	SUBROUTINE SORTQQ(ADRARRAY, LENGTH, SIZE)
!DEC$ ATTRIBUTES DEFAULT :: SORTQQ
	  INTEGER*4 ADRARRAY, LENGTH, SIZE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	INTEGER*4 FUNCTION BSEARCHQQ(ADRKEY, ADRARRAY,LENGTH, SIZE)
!DEC$ ATTRIBUTES DEFAULT :: BSEARCHQQ
	  INTEGER*4 ADRKEY, ADRARRAY, LENGTH, SIZE
	END FUNCTION
      END INTERFACE
! ----------------------------------------------------------------
! Configuration
! ----------------------------------------------------------------
      INTERFACE
	INTEGER*4 FUNCTION GETCONFIGQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETCONFIGQQ
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! QuickWin Support
! -----------------------------------------------------------------
!DEC$ PACK:1
      INTERFACE
	FUNCTION GETWINDOWCONFIG(wc)
!DEC$ ATTRIBUTES DEFAULT :: GETWINDOWCONFIG
!DEC$ IF DEFINED(_X86_)
	  LOGICAL GETWINDOWCONFIG
!DEC$ ATTRIBUTES ALIAS:"__f_getwindowconfig@4" ::  GETWINDOWCONFIG
!DEC$ ELSE
	  LOGICAL GETWINDOWCONFIG
!DEC$ ATTRIBUTES ALIAS: "_f_getwindowconfig"   ::  GETWINDOWCONFIG
!DEC$ ENDIF
	  STRUCTURE/windowconfig/
	  INTEGER*2 numxpixels
	  INTEGER*2 numypixels
	  INTEGER*2 numtextcols
	  INTEGER*2 numtextrows
	  INTEGER*2 numcolors
	  INTEGER*4 fontsize
	  CHARACTER*(80) title
	  INTEGER*2 bitsperpixel
	  INTEGER*2 numvideopages
	  INTEGER*2 mode
	  INTEGER*2 adapter
	  INTEGER*2 monitor
	  INTEGER*2 memory
	  INTEGER*2 environment
	  CHARACTER*(32) extendfontname
	  INTEGER*4 extendfontsize
	  INTEGER*4 extendfontattributes
	  END STRUCTURE
	  RECORD/windowconfig/wc
!DEC$ ATTRIBUTES REFERENCE ::  wc
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION SETWINDOWCONFIG(wc)
!DEC$ ATTRIBUTES DEFAULT :: SETWINDOWCONFIG
!DEC$ IF DEFINED(_X86_)
	  LOGICAL SETWINDOWCONFIG
!DEC$ ATTRIBUTES ALIAS:"__f_setwindowconfig@4" ::  SETWINDOWCONFIG
!DEC$ ELSE
	  LOGICAL SETWINDOWCONFIG
!DEC$ ATTRIBUTES ALIAS: "_f_setwindowconfig"   ::  SETWINDOWCONFIG
!DEC$ ENDIF
	  STRUCTURE/windowconfig/
	  INTEGER*2 numxpixels
	  INTEGER*2 numypixels
	  INTEGER*2 numtextcols
	  INTEGER*2 numtextrows
	  INTEGER*2 numcolors
	  INTEGER*4 fontsize
	  CHARACTER*(80) title
	  INTEGER*2 bitsperpixel
	  INTEGER*2 numvideopages
	  INTEGER*2 mode
	  INTEGER*2 adapter
	  INTEGER*2 monitor
	  INTEGER*2 memory
	  INTEGER*2 environment
	  CHARACTER*(32) extendfontname
	  INTEGER*4 extendfontsize
	  INTEGER*4 extendfontattributes
	  END STRUCTURE
	  RECORD/windowconfig/wc
!DEC$ ATTRIBUTES REFERENCE ::  wc
	END FUNCTION
      END INTERFACE
!DEC$ PACK
      INTERFACE
	FUNCTION APPENDMENUQQ(menuID,flags,text,routine)
!DEC$ ATTRIBUTES DEFAULT :: APPENDMENUQQ
	  LOGICAL APPENDMENUQQ
!DEC$ ATTRIBUTES C :: APPENDMENUQQ  
	  INTEGER*4 menuID,flags
	  CHARACTER*(*) text
!DEC$ ATTRIBUTES REFERENCE ::   text
	  EXTERNAL routine
!DEC$ ATTRIBUTES STDCALL :: routine  
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION INSERTMENUQQ(menuID,itemID,flags,text,routine)
!DEC$ ATTRIBUTES DEFAULT :: INSERTMENUQQ
	  LOGICAL INSERTMENUQQ
!DEC$ ATTRIBUTES C :: INSERTMENUQQ  
	  INTEGER*4 menuID,itemID,flags
	  CHARACTER*(*) text
!DEC$ ATTRIBUTES REFERENCE ::   text
	  EXTERNAL routine
!DEC$ ATTRIBUTES STDCALL :: routine  
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION DELETEMENUQQ(menuID,itemID)
!DEC$ ATTRIBUTES DEFAULT :: DELETEMENUQQ
	  LOGICAL DELETEMENUQQ
!DEC$ ATTRIBUTES C :: DELETEMENUQQ  
	  INTEGER*4 menuID,itemID
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION MODIFYMENUFLAGSQQ(menuID,itemID,flags)
!DEC$ ATTRIBUTES DEFAULT :: MODIFYMENUFLAGSQQ
	 LOGICAL MODIFYMENUFLAGSQQ
!DEC$ ATTRIBUTES C :: MODIFYMENUFLAGSQQ  
	  INTEGER*4 menuID,itemID,flags
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION MODIFYMENUSTRINGQQ(menuID,itemID,text)
!DEC$ ATTRIBUTES DEFAULT :: MODIFYMENUSTRINGQQ
	  LOGICAL MODIFYMENUSTRINGQQ
!DEC$ ATTRIBUTES C :: MODIFYMENUSTRINGQQ  
	  INTEGER*4 menuID,itemID
	  CHARACTER*(*) text
!DEC$ ATTRIBUTES REFERENCE ::   text
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION MODIFYMENUROUTINEQQ(menuID,itemID,routine)
!DEC$ ATTRIBUTES DEFAULT :: MODIFYMENUROUTINEQQ
	  LOGICAL MODIFYMENUROUTINEQQ
!DEC$ ATTRIBUTES C :: MODIFYMENUROUTINEQQ  
	  INTEGER*4 menuID,itemID
	  EXTERNAL routine
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION SETWINDOWMENUQQ(menuID)
!DEC$ ATTRIBUTES DEFAULT :: SETWINDOWMENUQQ
	  LOGICAL SETWINDOWMENUQQ
!DEC$ ATTRIBUTES C :: SETWINDOWMENUQQ  
	  INTEGER*4 menuID
	END FUNCTION
      END INTERFACE
      INTERFACE
	SUBROUTINE YIELDQQ()
!DEC$ ATTRIBUTES DEFAULT :: YIELDQQ
	END SUBROUTINE
      END INTERFACE
! We only include the following code once inside the same program unit.
! This code is shared with fgraph.fi.
!DEC$ IF $DFLIB$FIProgUnitNum .ne. $DFLIB$ProgramUnitNumber
$undefine $DFLIB$FIProgUnitNum
!DEC$ DEFINE $DFLIB$FIProgUnitNum = $DFLIB$ProgramUnitNumber
      INTERFACE
	FUNCTION INCHARQQ()
!DEC$ ATTRIBUTES DEFAULT :: INCHARQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*2 INCHARQQ
!DEC$ ATTRIBUTES C,ALIAS:"__inchar" ::  INCHARQQ
!DEC$ ELSE
	  INTEGER*2 INCHARQQ
!DEC$ ATTRIBUTES C,ALIAS: "_inchar" ::  INCHARQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGOPENQQ(name)
!DEC$ ATTRIBUTES DEFAULT :: WGOPENQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGOPENQQ
!DEC$ ATTRIBUTES C,ALIAS:"__wgopen" ::  WGOPENQQ
!DEC$ ELSE
	  INTEGER*4 WGOPENQQ
!DEC$ ATTRIBUTES C,ALIAS: "_wgopen" ::  WGOPENQQ
!DEC$ ENDIF
	  CHARACTER*(*) name
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGCLOSEQQ(dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: WGCLOSEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGCLOSEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS:"__wgclose" ::  WGCLOSEQQ
!DEC$ ELSE
	  INTEGER*4 WGCLOSEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS: "_wgclose" ::  WGCLOSEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGSETACTIVEQQ(dwhandle)
!DEC$ ATTRIBUTES DEFAULT :: WGSETACTIVEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGSETACTIVEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS:"__wgsetactive" ::  WGSETACTIVEQQ
!DEC$ ELSE
	  INTEGER*4 WGSETACTIVEQQ, dwhandle
!DEC$ ATTRIBUTES C,ALIAS: "_wgsetactive" ::  WGSETACTIVEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION WGGETACTIVEQQ()
!DEC$ ATTRIBUTES DEFAULT :: WGGETACTIVEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 WGGETACTIVEQQ
!DEC$ ATTRIBUTES C,ALIAS:"__wggetactive" ::  WGGETACTIVEQQ
!DEC$ ELSE
	  INTEGER*4 WGGETACTIVEQQ
!DEC$ ATTRIBUTES C,ALIAS: "_wggetactive" ::  WGGETACTIVEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
!DEC$ ENDIF
      INTERFACE
	FUNCTION SETACTIVEQQ(lunit)
!DEC$ ATTRIBUTES DEFAULT :: SETACTIVEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 SETACTIVEQQ, lunit
!DEC$ ATTRIBUTES C,ALIAS:"__wgsetactiveunit" ::  SETACTIVEQQ
!DEC$ ELSE
	  INTEGER*4 SETACTIVEQQ, lunit
!DEC$ ATTRIBUTES C,ALIAS: "_wgsetactiveunit" ::  SETACTIVEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETACTIVEQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETACTIVEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 GETACTIVEQQ
!DEC$ ATTRIBUTES C,ALIAS:"__wggetactiveunit" ::  GETACTIVEQQ
!DEC$ ELSE
	  INTEGER*4 GETACTIVEQQ
!DEC$ ATTRIBUTES C,ALIAS: "_wggetactiveunit" ::  GETACTIVEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION FOCUSQQ(IUNIT)
!DEC$ ATTRIBUTES DEFAULT :: FOCUSQQ
	  INTEGER*4 FOCUSQQ, IUNIT
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION INQFOCUSQQ(IUNIT)
!DEC$ ATTRIBUTES DEFAULT :: INQFOCUSQQ
	  INTEGER*4 INQFOCUSQQ,IUNIT
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETHANDLEQQ(IUNIT)
!DEC$ ATTRIBUTES DEFAULT :: GETHANDLEQQ
	  INTEGER*4 GETHANDLEQQ, IUNIT
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETHWNDQQ(IUNIT)
!DEC$ ATTRIBUTES DEFAULT :: GETHWNDQQ
	  INTEGER*4 GETHWNDQQ, IUNIT
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETUNITQQ(IHANDLE)
!DEC$ ATTRIBUTES DEFAULT :: GETUNITQQ
	  INTEGER*4 GETUNITQQ, IHANDLE
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION ABOUTBOXQQ(STR)
!DEC$ ATTRIBUTES DEFAULT :: ABOUTBOXQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 ABOUTBOXQQ
!DEC$ ATTRIBUTES C,ALIAS:"__QWINSetAboutString" ::  ABOUTBOXQQ
!DEC$ ELSE
	  INTEGER*4 ABOUTBOXQQ
!DEC$ ATTRIBUTES C,ALIAS: "_QWINSetAboutString" ::  ABOUTBOXQQ
!DEC$ ENDIF
	  CHARACTER*(*) STR
!DEC$ ATTRIBUTES REFERENCE ::   STR
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION CLICKQQ(ITEM)
!DEC$ ATTRIBUTES DEFAULT :: CLICKQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 CLICKQQ,ITEM
!DEC$ ATTRIBUTES C,ALIAS:"__QWINMenuClick" ::  CLICKQQ
!DEC$ ELSE
	  INTEGER*4 CLICKQQ,ITEM
!DEC$ ATTRIBUTES C,ALIAS: "_QWINMenuClick" ::  CLICKQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION CLICKMENUQQ(ITEM)
!DEC$ ATTRIBUTES DEFAULT :: CLICKMENUQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 CLICKMENUQQ
!DEC$ ATTRIBUTES C,ALIAS:"__QWINMenuClick" ::  CLICKMENUQQ
!DEC$ ELSE
	  INTEGER*4 CLICKMENUQQ
!DEC$ ATTRIBUTES C,ALIAS: "_QWINMenuClick" ::  CLICKMENUQQ
!DEC$ ENDIF
	  INTEGER*4 ITEM
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION SETWSIZEQQ(IUNIT,WINFO)
!DEC$ ATTRIBUTES DEFAULT :: SETWSIZEQQ
	  STRUCTURE /QWINFO/
	      INTEGER*2 TYPE          ! request type
	      INTEGER*2 X             ! x coordinate for upper left
	      INTEGER*2 Y             ! y coordinate for upper left
	      INTEGER*2 H             ! window height
	      INTEGER*2 W             ! window width
	  END STRUCTURE
	  INTEGER*4 SETWSIZEQQ, IUNIT
	  RECORD /QWINFO/ WINFO
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETWSIZEQQ(IUNIT,IREQ,WINFO)
!DEC$ ATTRIBUTES DEFAULT :: GETWSIZEQQ
	  STRUCTURE /QWINFO/
	      INTEGER*2 TYPE          ! request type
	      INTEGER*2 X             ! x coordinate for upper left
	      INTEGER*2 Y             ! y coordinate for upper left
	      INTEGER*2 H             ! window height
	      INTEGER*2 W             ! window width
	  END STRUCTURE
	  INTEGER*4 GETWSIZEQQ, IUNIT
	  INTEGER*4 IREQ
	  RECORD /QWINFO/ WINFO
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION MESSAGEBOXQQ(MSG,CAPTION,MTYPE)
!DEC$ ATTRIBUTES DEFAULT :: MESSAGEBOXQQ
	  CHARACTER*(*) MSG
!DEC$ ATTRIBUTES REFERENCE ::   MSG
	  CHARACTER*(*) CAPTION
!DEC$ ATTRIBUTES REFERENCE ::   CAPTION
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4  MESSAGEBOXQQ,MTYPE
!DEC$ ATTRIBUTES C,ALIAS:"__QWINMsgBox" ::   MESSAGEBOXQQ
!DEC$ ELSE
	  INTEGER*4  MESSAGEBOXQQ,MTYPE
!DEC$ ATTRIBUTES C,ALIAS: "_QWINMsgBox" ::   MESSAGEBOXQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETEXITQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETEXITQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 GETEXITQQ
!DEC$ ATTRIBUTES C, ALIAS:"__QWINGetExit" ::  GETEXITQQ
!DEC$ ELSE
	  INTEGER*4 GETEXITQQ
!DEC$ ATTRIBUTES C, ALIAS: "_QWINGetExit" ::  GETEXITQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION SETEXITQQ(exitmode)
!DEC$ ATTRIBUTES DEFAULT :: SETEXITQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 SETEXITQQ
!DEC$ ATTRIBUTES C, ALIAS:"__QWINSetExit" ::  SETEXITQQ
!DEC$ ELSE
	  INTEGER*4 SETEXITQQ
!DEC$ ATTRIBUTES C, ALIAS: "_QWINSetExit" ::  SETEXITQQ
!DEC$ ENDIF
	  INTEGER*4 exitmode
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Access to Windows Handles for QuickWin components
! -----------------------------------------------------------------
      INTERFACE
	FUNCTION GETHANDLEFRAMEQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETHANDLEFRAMEQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 GETHANDLEFRAMEQQ
!DEC$ ATTRIBUTES C,ALIAS:"__QWINTGethFrame" ::  GETHANDLEFRAMEQQ
!DEC$ ELSE
	  INTEGER*4 GETHANDLEFRAMEQQ
!DEC$ ATTRIBUTES C,ALIAS: "_QWINTGethFrame" ::  GETHANDLEFRAMEQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETHANDLECLIENTQQ()
!DEC$ ATTRIBUTES DEFAULT :: GETHANDLECLIENTQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 GETHANDLECLIENTQQ
!DEC$ ATTRIBUTES C,ALIAS:"__QWINTGethClient" ::  GETHANDLECLIENTQQ
!DEC$ ELSE
	  INTEGER*4 GETHANDLECLIENTQQ
!DEC$ ATTRIBUTES C,ALIAS: "_QWINTGethClient" ::  GETHANDLECLIENTQQ
!DEC$ ENDIF
	END FUNCTION
      END INTERFACE
      INTERFACE
	FUNCTION GETHANDLECHILDQQ(QUICKHND)
!DEC$ ATTRIBUTES DEFAULT :: GETHANDLECHILDQQ
!DEC$ IF DEFINED(_X86_)
	  INTEGER*4 GETHANDLECHILDQQ
!DEC$ ATTRIBUTES C,ALIAS:"__QWINGethWnd" ::  GETHANDLECHILDQQ
!DEC$ ELSE
	  INTEGER*4 GETHANDLECHILDQQ
!DEC$ ATTRIBUTES C,ALIAS: "_QWINGethWnd" ::  GETHANDLECHILDQQ
!DEC$ ENDIF
	  INTEGER*4 QUICKHND
	END FUNCTION
      END INTERFACE
! -----------------------------------------------------------------
! Unused Routine -- simply returns, used to avoid "unused" warnings
! -----------------------------------------------------------------
      INTERFACE
!DEC$ IF DEFINED(_X86_)
	SUBROUTINE UNUSEDQQ()
!DEC$ ATTRIBUTES DEFAULT :: UNUSEDQQ
!DEC$ ATTRIBUTES C,REFERENCE,VARYING,ALIAS:"__FFunusedqq" ::  UNUSEDQQ
!DEC$ ELSE
	SUBROUTINE UNUSEDQQ()
!DEC$ ATTRIBUTES DEFAULT :: UNUSEDQQ
!DEC$ ATTRIBUTES C,REFERENCE,VARYING,ALIAS: "_FFunusedqq" ::  UNUSEDQQ
!DEC$ ENDIF
	END SUBROUTINE
      END INTERFACE
      
! -----------------------------------------------------------------
! QuickWin Default Menu Support
! -----------------------------------------------------------------
! INITIALMENU -- user callbacks cannot be in the module MSFLIB
! INITIALSETTINGS -- user callbacks cannot be in the module MSFLIB
!DEC$ IF DEFINED(_X86_)
      INTERFACE
       SUBROUTINE WINPRINT()
!DEC$ ATTRIBUTES DEFAULT :: WINPRINT
!DEC$ ATTRIBUTES stdcall, alias:'_WINPRINT@0' ::  WINPRINT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSAVE()
!DEC$ ATTRIBUTES DEFAULT :: WINSAVE
!DEC$ ATTRIBUTES stdcall, alias:'_WINSAVE@0' ::  WINSAVE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINEXIT()
!DEC$ ATTRIBUTES DEFAULT :: WINEXIT
!DEC$ ATTRIBUTES stdcall, alias:'_WINEXIT@0' ::  WINEXIT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINCOPY()
!DEC$ ATTRIBUTES DEFAULT :: WINCOPY
!DEC$ ATTRIBUTES stdcall, alias:'_WINCOPY@0' ::  WINCOPY
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINPASTE()
!DEC$ ATTRIBUTES DEFAULT :: WINPASTE
!DEC$ ATTRIBUTES stdcall, alias:'_WINPASTE@0' ::  WINPASTE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSIZETOFIT()
!DEC$ ATTRIBUTES DEFAULT :: WINSIZETOFIT
!DEC$ ATTRIBUTES stdcall, alias:'_WINSIZETOFIT@0' ::  WINSIZETOFIT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINFULLSCREEN()
!DEC$ ATTRIBUTES DEFAULT :: WINFULLSCREEN
!DEC$ ATTRIBUTES stdcall, alias:'_WINFULLSCREEN@0' ::  WINFULLSCREEN
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSTATE()
!DEC$ ATTRIBUTES DEFAULT :: WINSTATE
!DEC$ ATTRIBUTES stdcall, alias:'_WINSTATE@0' ::  WINSTATE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINCASCADE()
!DEC$ ATTRIBUTES DEFAULT :: WINCASCADE
!DEC$ ATTRIBUTES stdcall, alias:'_WINCASCADE@0' ::  WINCASCADE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINTILE()
!DEC$ ATTRIBUTES DEFAULT :: WINTILE
!DEC$ ATTRIBUTES stdcall, alias:'_WINTILE@0' ::  WINTILE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINARRANGE()
!DEC$ ATTRIBUTES DEFAULT :: WINARRANGE
!DEC$ ATTRIBUTES stdcall, alias:'_WINARRANGE@0' ::  WINARRANGE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WININPUT()
!DEC$ ATTRIBUTES DEFAULT :: WININPUT
!DEC$ ATTRIBUTES stdcall, alias:'_WININPUT@0' ::  WININPUT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINCLEARPASTE()
!DEC$ ATTRIBUTES DEFAULT :: WINCLEARPASTE
!DEC$ ATTRIBUTES stdcall, alias:'_WINCLEARPASTE@0' ::  WINCLEARPASTE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSTATUS()
!DEC$ ATTRIBUTES DEFAULT :: WINSTATUS
!DEC$ ATTRIBUTES stdcall, alias:'_WINSTATUS@0' ::  WINSTATUS
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WININDEX()
!DEC$ ATTRIBUTES DEFAULT :: WININDEX
!DEC$ ATTRIBUTES stdcall, alias:'_WININDEX@0' ::  WININDEX
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINUSING()
!DEC$ ATTRIBUTES DEFAULT :: WINUSING
!DEC$ ATTRIBUTES stdcall, alias:'_WINUSING@0' ::  WINUSING
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINABOUT()
!DEC$ ATTRIBUTES DEFAULT :: WINABOUT
!DEC$ ATTRIBUTES stdcall, alias:'_WINABOUT@0' ::  WINABOUT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSELECTTEXT()
!DEC$ ATTRIBUTES DEFAULT :: WINSELECTTEXT
!DEC$ ATTRIBUTES stdcall, alias:'_WINSELECTTEXT@0' ::  WINSELECTTEXT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSELECTGRAPHICS()
!DEC$ ATTRIBUTES DEFAULT :: WINSELECTGRAPHICS
!DEC$ ATTRIBUTES stdcall,alias:'_WINSELECTGRAPHICS@0' ::  WINSELECTGRAPHICS
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE WINSELECTALL()
!DEC$ ATTRIBUTES DEFAULT :: WINSELECTALL
!DEC$ ATTRIBUTES stdcall, alias:'_WINSELECTALL@0' ::  WINSELECTALL
	END SUBROUTINE
      END INTERFACE
      INTERFACE
       SUBROUTINE NUL()
!DEC$ ATTRIBUTES DEFAULT :: NUL
!DEC$ ATTRIBUTES stdcall, alias:'_NUL@0' ::  NUL
	END SUBROUTINE
      END INTERFACE
!DEC$ ELSE
!--------------------------------------------------------
      INTERFACE
	SUBROUTINE WINPRINT()
!DEC$ ATTRIBUTES DEFAULT :: WINPRINT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSAVE()
!DEC$ ATTRIBUTES DEFAULT :: WINSAVE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINEXIT()
!DEC$ ATTRIBUTES DEFAULT :: WINEXIT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINCOPY()
!DEC$ ATTRIBUTES DEFAULT :: WINCOPY
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINPASTE()
!DEC$ ATTRIBUTES DEFAULT :: WINPASTE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSIZETOFIT()
!DEC$ ATTRIBUTES DEFAULT :: WINSIZETOFIT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINFULLSCREEN()
!DEC$ ATTRIBUTES DEFAULT :: WINFULLSCREEN
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSTATE()
!DEC$ ATTRIBUTES DEFAULT :: WINSTATE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINCASCADE()
!DEC$ ATTRIBUTES DEFAULT :: WINCASCADE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINTILE()
!DEC$ ATTRIBUTES DEFAULT :: WINTILE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINARRANGE()
!DEC$ ATTRIBUTES DEFAULT :: WINARRANGE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WININPUT()
!DEC$ ATTRIBUTES DEFAULT :: WININPUT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINCLEARPASTE()
!DEC$ ATTRIBUTES DEFAULT :: WINCLEARPASTE
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSTATUS()
!DEC$ ATTRIBUTES DEFAULT :: WINSTATUS
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WININDEX()
!DEC$ ATTRIBUTES DEFAULT :: WININDEX
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINUSING()
!DEC$ ATTRIBUTES DEFAULT :: WINUSING
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINABOUT()
!DEC$ ATTRIBUTES DEFAULT :: WINABOUT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSELECTTEXT()
!DEC$ ATTRIBUTES DEFAULT :: WINSELECTTEXT
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSELECTGRAPHICS()
!DEC$ ATTRIBUTES DEFAULT :: WINSELECTGRAPHICS
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE WINSELECTALL()
!DEC$ ATTRIBUTES DEFAULT :: WINSELECTALL
	END SUBROUTINE
      END INTERFACE
      INTERFACE
	SUBROUTINE NUL()
!DEC$ ATTRIBUTES DEFAULT :: NUL
	END SUBROUTINE
      END INTERFACE
!DEC$ ENDIF
!DEC$ ENDIF  ! !DEC$ IF .NOT. DEFINED(__DFLIB_FGRAPH_INCLUDE)
!* fgraph.fd - declare constants and functions for graphics library
!*
!*   Copyright (c) 1987-1995 Microsoft Corporation.  All rights reserved.
!*
!* Purpose:
!*   This file declares the graphics library functions and
!*   the constants that are used with them.
!*
!* NOTE: When modifying this file, you must follow the following rules to
!* ensure compatibility with fixed form and free form source:
!*   1) All comments must start with '!'
!*   2) All code must be within columns 7 to 72
!*   3) For continuation, place a '&' in column 73,
!*      and a '&' in column 6 of the continuation line
!DEC$ IF .NOT. DEFINED($DFLIB$ProgramUnitNumber)
!DEC$ DEFINE $DFLIB$ProgramUnitNumber = -1
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED($DFLIB$FDProgUnitNum) 
!DEC$ DEFINE $DFLIB$FDProgUnitNum = -2
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED(__DFLIB_FLIB_INCLUDE)
!     User-visible declarations for FORTRAN Graphics Library
!     Structure for getvideoconfig() as visible to user
      STRUCTURE/videoconfig/
	INTEGER*2 numxpixels       ! number of pixels on X axis
	INTEGER*2 numypixels       ! number of pixels on Y axis
	INTEGER*2 numtextcols      ! number of text columns available
	INTEGER*2 numtextrows      ! number of text rows available
	INTEGER*2 numcolors        ! number of actual colors
	INTEGER*2 bitsperpixel     ! number of bits per pixel
	INTEGER*2 numvideopages    ! number of available video pages
	INTEGER*2 mode             ! current video mode
	INTEGER*2 adapter          ! active display adapter
	INTEGER*2 monitor          ! active display monitor
	INTEGER*2 memory           ! adapter video memory in K bytes
      END STRUCTURE
!     Return value of getcurrentposition(), etc.
      STRUCTURE/xycoord/
	INTEGER*2 xcoord
	INTEGER*2 ycoord
      END STRUCTURE
!     Structure for text position
      STRUCTURE/rccoord/
	INTEGER*2 row
	INTEGER*2 col
      END STRUCTURE
!     ERROR HANDLING
!     Status info returned by grstatus()
      INTEGER*2 $GRPARAMETERALTERED,$GRCLIPPED,$GRNOOUTPUT,$GROK,       &
     &            $GRERROR,$GRMODENOTSUPPORTED,$GRNOTINPROPERMODE,      &
     &            $GRINVALIDPARAMETER,$GRFONTFILENOTFOUND,              &
     &            $GRINVALIDFONTFILE,$GRCORRUPTEDFONTFILE,              &
     &            $GRINSUFFICIENTMEMORY,$GRINVALIDIMAGEBUFFER,          &
     &            $GRNOBITMAPFILE, $GRFILEREADERROR,                    &
     &            $GRIMPROPERBITMAPFORMAT, $GRBITMAPTOOLARGE,           &
     &            $GRBITMAPDISPLAYERROR, $GRIMAGEREADERROR,             &
     &            $GRFILEOPENERROR, $GRFILEWRITERROR
!     Successful
      PARAMETER($GROK                     = 0)  ! success
!     Warnings
      PARAMETER($GRNOOUTPUT               = 1)  ! nothing drawn
      PARAMETER($GRCLIPPED                = 2)  ! output was partially clipped
      PARAMETER($GRPARAMETERALTERED       = 3)  ! input parameters adjusted
!     Errors
      PARAMETER($GRERROR                  = -1)  ! generic graphics error
      PARAMETER($GRMODENOTSUPPORTED       = -2)  ! video mode not supported
      PARAMETER($GRNOTINPROPERMODE        = -3)  ! not supported in current mode
      PARAMETER($GRINVALIDPARAMETER       = -4)  ! bad parameter
      PARAMETER($GRFONTFILENOTFOUND       = -5)  ! font file not found
      PARAMETER($GRINVALIDFONTFILE        = -6)  ! not a font file
      PARAMETER($GRCORRUPTEDFONTFILE      = -7)  ! inconsistent font file
      PARAMETER($GRINSUFFICIENTMEMORY     = -8)  ! out of memory
      PARAMETER($GRINVALIDIMAGEBUFFER     = -9)  ! bad image buffer detected
      PARAMETER($GRNOBITMAPFILE           = -10) ! bitmap file not found
      PARAMETER($GRFILEREADERROR          = -11) ! error reading bitmap file
      PARAMETER($GRIMPROPERBITMAPFORMAT   = -12) ! bitmap format not supported
      PARAMETER($GRBITMAPTOOLARGE         = -13) ! bitmap size > window config
      PARAMETER($GRBITMAPDISPLAYERROR     = -14) ! error displaying bitmap
      PARAMETER($GRIMAGEREADERROR         = -15) ! error reading image
      PARAMETER($GRFILEOPENERROR          = -16) ! error opening bitmap file
      PARAMETER($GRFILEWRITERROR          = -17) ! error writing bitmap file
!     SETUP AND CONFIGURATION
!     Arguments to setvideomode()
      INTEGER*2 $MAXRESMODE,$MAXCOLORMODE,$DEFAULTMODE,$TEXTBW40,       &
     &            $TEXTC40,$TEXTBW80,$TEXTC80,$TEXTMONO,$MRES16COLOR,   &
     &            $HRES16COLOR,$ERESNOCOLOR,$ERESCOLOR,$VRES2COLOR,     &
     &            $VRES16COLOR,$MRES256COLOR,$ORESCOLOR,$ORES256COLOR,  &
     &            $VRES256COLOR,$SRES16COLOR,$SRES256COLOR,$XRES16COLOR,&
     &            $XRES256COLOR,$ZRES16COLOR,$ZRES256COLOR
      PARAMETER($MAXRESMODE   =-3)    ! graphics mode with highest resolution
      PARAMETER($MAXCOLORMODE =-2)    ! graphics mode with most colors
      PARAMETER($DEFAULTMODE  =-1)    ! restore screen to original mode
      PARAMETER($TEXTBW40      =0)    ! 40 x 25 text, 16 grey
      PARAMETER($TEXTC40       =1)    ! 40 x 25 text, 16/8 color
      PARAMETER($TEXTBW80      =2)    ! 80 x 25 text, 16 grey
      PARAMETER($TEXTC80       =3)    ! 80 x 25 text, 16/8 color
      PARAMETER($TEXTMONO      =7)    ! 80 x 25 text, BW
      PARAMETER($MRES16COLOR   =13)   ! 320 x 200, 16 color
      PARAMETER($HRES16COLOR   =14)   ! 640 x 200, 16 color
      PARAMETER($ERESNOCOLOR   =15)   ! 640 x 350, BW
      PARAMETER($ERESCOLOR     =16)   ! 640 x 350, 4 or 16 color
      PARAMETER($VRES2COLOR    =17)   ! 640 x 480, BW
      PARAMETER($VRES16COLOR   =18)   ! 640 x 480, 16 color
      PARAMETER($MRES256COLOR  =19)   ! 320 x 200, 256 color
      PARAMETER($ORESCOLOR     =64)   ! 640 x 400, 1 of 16 colors (Olivetti)
!     The following 8 modes require VESA SuperVGA BIOS extensions
      PARAMETER($ORES256COLOR  =#0100)        ! 640 x 400, 256 color
      PARAMETER($VRES256COLOR  =#0101)        ! 640 x 480, 256 color
!     WARNING: DO NOT attempt to set the following modes without ensuring
!     that your monitor can safely handle that resolution. Otherwise, you
!     may risk damaging your display monitor! Consult your owner's manual
!     for details.
!     Note: _MAXRESMODE and _MAXCOLORMODE never select SRES, XRES, or ZRES
!     modes.
!     Requires NEC MultiSync 3D or equivalent, or better
      PARAMETER($SRES16COLOR   =#0102)        ! 800 x 600, 16 color
      PARAMETER($SRES256COLOR  =#0103)        ! 800 x 600, 256 color
!     Requires NEC MultiSync 4D or equivalent, or better
      PARAMETER($XRES16COLOR   =#0104)        ! 1024 x 768, 16 color
      PARAMETER($XRES256COLOR  =#0105)        ! 1024 x 768, 256 color
!     Requires NEC MultiSync 5D or equivalent, or better
      PARAMETER($ZRES16COLOR   =#0106)        ! 1280 x 1024, 16 color
      PARAMETER($ZRES256COLOR  =#0107)        ! 1280 x 1024, 256 color
!     VIDEOCONFIG adapter values
!     These constants can be used to determine the type of the active
!     adapter, using either simple comparisons or the bitwise-AND
!     operator
      INTEGER*2 $QUICKWIN, $MDPA,$EGA,$VGA,$OEGA,$OVGA,$SVGA
      PARAMETER($QUICKWIN =#0000)  ! Quick Win Graphics is devide independent
      PARAMETER($MDPA     =#0001)  ! Monochrome Display Adapter (MDPA)
      PARAMETER($EGA      =#0004)  ! Enhanced Graphics Adapter  (EGA)
      PARAMETER($VGA      =#0008)  ! Video Graphics Array       (VGA)
      PARAMETER($OEGA     =#0044)  ! Olivetti Enhanced Graphics Adapter (OEGA)
      PARAMETER($OVGA     =#0048)  ! Olivetti Video Graphics Array (OVGA)
      PARAMETER($SVGA     =#0088)  ! Super VGA with VESA BIOS support (SVGA)
!     VIDEOCONFIG monitor values
!     These constants can be used to determine the type of monitor in use,
!     using either simple comparisons or the bitwise-AND operator
      INTEGER*2 $MONO,$COLOR,$ENHCOLOR,$ANALOGMONO,                     &
     &            $ANALOGCOLOR,$ANALOG
      PARAMETER($MONO       =#0001)     ! Monochrome
      PARAMETER($COLOR      =#0002)     ! Color (or Enhanced emulating color)
      PARAMETER($ENHCOLOR   =#0004)     ! Enhanced Color
      PARAMETER($ANALOGMONO =#0008)     ! Analog Monochrome only
      PARAMETER($ANALOGCOLOR=#0010)     ! Analog Color only
      PARAMETER($ANALOG     =#0018)     ! Analog Color + Analog Monochrome
!     COORDINATE SYSTEMS
!     OUTPUT ROUTINES
!     Control parameters for rectangle(), polygon(), ellipse(), and pie()
      INTEGER*2 $GBORDER,$GFILLINTERIOR
      PARAMETER($GBORDER       =2)      ! draw outline only
      PARAMETER($GFILLINTERIOR =3)      ! fill using current fill mask
!     Parameters for clearscreen()
      INTEGER*2 $GCLEARSCREEN,$GVIEWPORT,$GWINDOW
      PARAMETER($GCLEARSCREEN  =0)
      PARAMETER($GVIEWPORT     =1)
      PARAMETER($GWINDOW       =2)
! TEXT
!     Parameters for displaycursor()
      INTEGER*2 $GCURSOROFF,$GCURSORON
      PARAMETER($GCURSOROFF =0)
      PARAMETER($GCURSORON  =1)
!     Parameters for wrapon()
      INTEGER*2 $GWRAPOFF,$GWRAPON
      PARAMETER($GWRAPOFF  =0)
      PARAMETER($GWRAPON   =1)
!     Parameters for scrolltextwindow()
      INTEGER*2 $GSCROLLUP,$GSCROLLDOWN
      PARAMETER($GSCROLLUP   =1)
      PARAMETER($GSCROLLDOWN =-1)
!     Request maximum number of rows in _settextrows() and _setvideomoderows()
      INTEGER*2 $MAXTEXTROWS
      PARAMETER($MAXTEXTROWS =-1)
!     "Action verbs" for putimage(), setwritemode()
      INTEGER*2 $GPSET,$GPRESET,$GAND,$GOR,$GXOR
      PARAMETER($GPSET         =3)
      PARAMETER($GPRESET       =2)
      PARAMETER($GAND          =1)
      PARAMETER($GOR           =0)
      PARAMETER($GXOR          =4)
    !   Binary raster operations   
    integer(2), parameter  :: $GR2_BLACK        = #8000+1   !   0         
    integer(2), parameter  :: $GR2_NOTMERGEPEN  = #8000+2   !  DPon       
    integer(2), parameter  :: $GR2_MASKNOTPEN   = #8000+3   !  DPna       
    integer(2), parameter  :: $GR2_NOTCOPYPEN   = #8000+4   !  PN         
    integer(2), parameter  :: $GR2_MASKPENNOT   = #8000+5   !  PDna       
    integer(2), parameter  :: $GR2_NOT          = #8000+6   !  Dn         
    integer(2), parameter  :: $GR2_XORPEN       = #8000+7   !  DPx        
    integer(2), parameter  :: $GR2_NOTMASKPEN   = #8000+8   !  DPan       
    integer(2), parameter  :: $GR2_MASKPEN      = #8000+9   !  DPa        
    integer(2), parameter  :: $GR2_NOTXORPEN    = #8000+10  !  DPxn       
    integer(2), parameter  :: $GR2_NOP          = #8000+11  !  D          
    integer(2), parameter  :: $GR2_MERGENOTPEN  = #8000+12  !  DPno       
    integer(2), parameter  :: $GR2_COPYPEN      = #8000+13  !  P          
    integer(2), parameter  :: $GR2_MERGEPENNOT  = #8000+14  !  PDno       
    integer(2), parameter  :: $GR2_MERGEPEN     = #8000+15  !  DPo        
    integer(2), parameter  :: $GR2_WHITE        = #8000+16  !   1         
    !   Ternary raster operations  
    integer(2), parameter  :: $GSRCCOPY         = #0020 !   dest = source                     
    integer(2), parameter  :: $GSRCPAINT        = #0086 !   dest = source OR dest             
    integer(2), parameter  :: $GSRCAND          = #00C6 !   dest = source AND dest            
    integer(2), parameter  :: $GSRCINVERT       = #0046 !   dest = source XOR dest            
    integer(2), parameter  :: $GSRCERASE        = #0328 !   dest = source AND (NOT dest )     
    integer(2), parameter  :: $GNOTSRCCOPY      = #0008 !   dest = (NOT source)               
    integer(2), parameter  :: $GNOTSRCERASE     = #00A6 !   dest = (NOT src) AND (NOT dest)   
    integer(2), parameter  :: $GMERGECOPY       = #00CA !   dest = (source AND pattern)       
    integer(2), parameter  :: $GMERGEPAINT      = #0226 !   dest = (NOT source) OR dest       
    integer(2), parameter  :: $GPATCOPY         = #0021 !   dest = pattern                    
    integer(2), parameter  :: $GPATPAINT        = #0A09 !   dest = DPSnoo                     
    integer(2), parameter  :: $GPATINVERT       = #0049 !   dest = pattern XOR dest           
    integer(2), parameter  :: $GDSTINVERT       = #0009 !   dest = (NOT dest)                 
    integer(2), parameter  :: $GBLACKNESS       = #0042 !   dest = BLACK                      
    integer(2), parameter  :: $GWHITENESS       = #0062 !   dest = WHITE 

!     The following values are used in QuickWin to set up the
!     initial palette.  They provide stronger colors than are
!     given by $BLUE, $LIGHTBLUE, etc. which do not seem to be
!     quite correct for modern video adaptors.

    INTEGER*4, PARAMETER :: $LOBLACK            = #000000 !  0
    INTEGER*4, PARAMETER :: $LOBLUE             = #800000 !  1
    INTEGER*4, PARAMETER :: $LOGREEN            = #008000 !  2
    INTEGER*4, PARAMETER :: $LOCYAN             = #808000 !  3
    INTEGER*4, PARAMETER :: $LORED              = #000080 !  4
    INTEGER*4, PARAMETER :: $LOMAGENTA          = #800080 !  5
    INTEGER*4, PARAMETER :: $LOBROWN            = #008080 !  6
    INTEGER*4, PARAMETER :: $LOWHITE            = #C0C0C0 !  7

    INTEGER*4, PARAMETER :: $LOGRAY             = #808080 !  8
    INTEGER*4, PARAMETER :: $HIBLUE             = #FF0000 !  9  
    INTEGER*4, PARAMETER :: $HIGREEN            = #00FF00 ! 10
    INTEGER*4, PARAMETER :: $HICYAN             = #FFFF00 ! 11
    INTEGER*4, PARAMETER :: $HIRED              = #0000FF ! 12
    INTEGER*4, PARAMETER :: $HIMAGENTA          = #FF00FF ! 13
    INTEGER*4, PARAMETER :: $HIYELLOW           = #00FFFF ! 14
    INTEGER*4, PARAMETER :: $HIWHITE            = #FFFFFF ! 15
		     
! The color values below produce weak colors with many video adaptors.
! Please use the new color values above ($LOx, $HIx) unless you like
! the softer color intensity.
!
!     Color values are used with setbkcolor in graphics modes and also by
!     remappalette and remapallpalette.  Also known as palette colors.
!     Not to be confused with color indices (aka. color attributes).
!     Universal color values (all color modes):
      INTEGER*4 $BLACK,$BLUE,$GREEN,$CYAN,$RED,$MAGENTA,$BROWN,         &
     &            $WHITE,$GRAY,$LIGHTBLUE,$LIGHTGREEN,$LIGHTCYAN,       &
     &            $LIGHTRED,$LIGHTMAGENTA,$YELLOW,$BRIGHTWHITE
      PARAMETER($BLACK         =#000000)
      PARAMETER($BLUE          =#200000)
      PARAMETER($GREEN         =#002000)
      PARAMETER($CYAN          =#202000)
      PARAMETER($RED           =#000020)
      PARAMETER($MAGENTA       =#200020)
      PARAMETER($BROWN         =#002020)
      PARAMETER($WHITE         =#303030)
      PARAMETER($GRAY          =#202020)
      PARAMETER($LIGHTBLUE     =#3F0000)
      PARAMETER($LIGHTGREEN    =#003f00)
      PARAMETER($LIGHTCYAN     =#3f3f00)
      PARAMETER($LIGHTRED      =#00003f)
      PARAMETER($LIGHTMAGENTA  =#3f003f)
      PARAMETER($YELLOW        =#003f3f)
      PARAMETER($BRIGHTWHITE   =#3f3f3f)
!     The following is obsolescent and defined only for backwards
!     compatibility
      INTEGER*4 $LIGHTYELLOW
      PARAMETER($LIGHTYELLOW   =#153f3f)
!     Mono mode F ($ERESNOCOLOR) color values:
      INTEGER*4 $MODEFOFF,$MODEFOFFTOON,$MODEFOFFTOHI,$MODEFONTOOFF,    &
     &            $MODEFON,$MODEFONTOHI,$MODEFHITOOFF,$MODEFHITOON,     &
     &            $MODEFHI
      PARAMETER($MODEFOFF      =0)
      PARAMETER($MODEFOFFTOON  =1)
      PARAMETER($MODEFOFFTOHI  =2)
      PARAMETER($MODEFONTOOFF  =3)
      PARAMETER($MODEFON       =4)
      PARAMETER($MODEFONTOHI   =5)
      PARAMETER($MODEFHITOOFF  =6)
      PARAMETER($MODEFHITOON   =7)
      PARAMETER($MODEFHI       =8)
!     Mono mode 7 ($TEXTMONO) color values:
       INTEGER*4 $MODE7OFF,$MODE7ON,$MODE7HI
      PARAMETER($MODE7OFF      =0)
      PARAMETER($MODE7ON       =1)
      PARAMETER($MODE7HI       =2)
!     QWIN Message IDS
     
      INTEGER*4 QWIN$MSG_TERM ,QWIN$MSG_EXITQ, QWIN$MSG_FINISHED,        &
     & QWIN$MSG_PAUSED, QWIN$MSG_RUNNING, QWIN$MSG_FILEOPENDLG,          &
     & QWIN$MSG_BMPSAVEDLG, QWIN$MSG_INPUTPEND,                          &
     & QWIN$MSG_PASTEINPUTPEND, QWIN$MSG_MOUSEINPUTPEND,                 &
     & QWIN$MSG_SELECTTEXT, QWIN$MSG_SELECTGRAPHICS,                     &
     & QWIN$MSG_PRINTABORT, QWIN$MSG_PRINTLOAD, QWIN$MSG_PRINTNODEFAULT, &
     & QWIN$MSG_PRINTDRIVER, QWIN$MSG_PRINTINGERROR, QWIN$MSG_PRINTING,  &
     & QWIN$MSG_PRINTCANCEL, QWIN$MSG_PRINTINPROGRESS,                   &
     & QWIN$MSG_HELPNOTAVAIL, QWIN$MSG_TITLETEXT
      PARAMETER (QWIN$MSG_TERM              =1)
      PARAMETER (QWIN$MSG_EXITQ =2)
      PARAMETER (QWIN$MSG_FINISHED=3)
      PARAMETER (QWIN$MSG_PAUSED =4)
      PARAMETER (QWIN$MSG_RUNNING =5)
      PARAMETER (QWIN$MSG_FILEOPENDLG =6)
      PARAMETER (QWIN$MSG_BMPSAVEDLG =7)
      PARAMETER (QWIN$MSG_INPUTPEND =8)
      PARAMETER (QWIN$MSG_PASTEINPUTPEND =9)
      PARAMETER (QWIN$MSG_MOUSEINPUTPEND =10)
      PARAMETER (QWIN$MSG_SELECTTEXT =11)
      PARAMETER (QWIN$MSG_SELECTGRAPHICS =12)
      PARAMETER (QWIN$MSG_PRINTABORT =13)
      PARAMETER (QWIN$MSG_PRINTLOAD =14)
      PARAMETER (QWIN$MSG_PRINTNODEFAULT =15)
      PARAMETER (QWIN$MSG_PRINTDRIVER =16)
      PARAMETER (QWIN$MSG_PRINTINGERROR =17)
      PARAMETER (QWIN$MSG_PRINTING =18)
      PARAMETER (QWIN$MSG_PRINTCANCEL =19)
      PARAMETER (QWIN$MSG_PRINTINPROGRESS =20)
      PARAMETER (QWIN$MSG_HELPNOTAVAIL =21)
      PARAMETER (QWIN$MSG_TITLETEXT =22)
!     WINDOW COORDINATE SYSTEM
!     Structure for window coordinate pair
      STRUCTURE/wxycoord/
	DOUBLE PRECISION wx   ! window x coordinate
	DOUBLE PRECISION wy   ! window y coordinate
      END STRUCTURE
!     Window coordinate entry points for graphics output routines
 
      STRUCTURE/fontinfo/
	INTEGER*4 type        ! b0 set = vector,clear = bit map
	INTEGER*4 ascent      ! pix dist from top to baseline
	INTEGER*4 pixwidth    ! character width in pixels, 0=prop
	INTEGER*4 pixheight   ! character height in pixels
	INTEGER*4 avgwidth    ! average character width in pixels
	CHARACTER*81 filename ! file name including path
	CHARACTER*32 facename ! font name
	LOGICAL*1 italic      ! .true. - font  is italic
	LOGICAL*1 emphasized  ! .true. - font is  emphasized (bold)
	LOGICAL*1 underline   ! .true. - font is underline
      END STRUCTURE
!     Font parameters
      INTEGER*2 $NO_SPACE,$FIXED_SPACE,$PROP_SPACE
      PARAMETER ($NO_SPACE    = 0)
      PARAMETER ($FIXED_SPACE = 1)
      PARAMETER ($PROP_SPACE  = 2)
      INTEGER*2 $NO_FONT_MAP,$VECTOR_MAP,$BIT_MAP
      PARAMETER ($NO_FONT_MAP = 0)
      PARAMETER ($VECTOR_MAP  = 1)
      PARAMETER ($BIT_MAP     = 2)
      INTEGER MOUSE$LBUTTONDOWN,MOUSE$MOVE,MOUSE$LBUTTONUP,             &
     & MOUSE$RBUTTONDOWN,MOUSE$RBUTTONUP,MOUSE$LBUTTONDBLCLK,           &
     & MOUSE$RBUTTONDBLCLK,MOUSE$KS_LBUTTON,MOUSE$KS_RBUTTON,           &
     & MOUSE$KS_SHIFT,MOUSE$KS_CONTROL,MOUSE$BADUNIT, MOUSE$BADEVENT
      PARAMETER(MOUSE$LBUTTONDOWN           = #1)
      PARAMETER(MOUSE$LBUTTONUP             = #2)
      PARAMETER(MOUSE$LBUTTONDBLCLK         = #4)
      PARAMETER(MOUSE$RBUTTONDOWN           = #8)
      PARAMETER(MOUSE$RBUTTONUP             = #10)
      PARAMETER(MOUSE$RBUTTONDBLCLK         = #20)
      PARAMETER(MOUSE$MOVE                  = #40)
      PARAMETER(MOUSE$KS_LBUTTON            = #1)
      PARAMETER(MOUSE$KS_RBUTTON            = #2)
      PARAMETER(MOUSE$KS_SHIFT              = #4)
      PARAMETER(MOUSE$KS_CONTROL            = #8)
      PARAMETER(MOUSE$BADUNIT               = -2)
      PARAMETER(MOUSE$BADEVENT              = -1)
!DEC$ ENDIF  ! !DEC$ IF .NOT. DEFINED(__DFLIB_FLIB_INCLUDE)
!****************************** Module Header ******************************
!*
!* Copyright (c) 1990-1995  Microsoft Corporation
!*
!* Module Name: FLIB.FD
!*
!* This module provides parameter and structure type declarations
!* needed to communicate with subprograms found in the various Fortran
!* libraries.  
!*
!* The functional areas covered are the following.
!*
!*    Data Type Codes
!*    Math error support
!*    Signal support
!*    Coprocessor Control
!*    Random Numbers
!*    Drives and Directories
!*    Files
!*    Keyboard
!*    Errors
!*    Sorting and Searching Arrays
!*    Configuration
!*    QuickWin Support
!*
!***************************************************************************
!* NOTE: When modifying this file, you must follow the following rules to
!* ensure compatibility with fixed form and free form source:
!*   1) All comments must start with '!'
!*   2) All code must be within columns 7 to 72
!*   3) For continuation, place a '&' in column 73,
!*      and a '&' in column 6 of the continuation line
!DEC$ IF .NOT. DEFINED($DFLIB$ProgramUnitNumber)
!DEC$ DEFINE $DFLIB$ProgramUnitNumber = -1
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED($DFLIB$FDProgUnitNum) 
!DEC$ DEFINE $DFLIB$FDProgUnitNum = -2
!DEC$ ENDIF
!DEC$ IF .NOT. DEFINED(__DFLIB_FGRAPH_INCLUDE)
! -----------------------------------------------------------------
! Data Type Codes
! -----------------------------------------------------------------
      INTEGER*4 TY$REAL4
      INTEGER*4 TY$REAL8
      INTEGER*4 TY$CMPLX8
      INTEGER*4 TY$CMPLX16
      PARAMETER (TY$REAL4           = 1)
      PARAMETER (TY$REAL8           = 2)
      PARAMETER (TY$CMPLX8          = 3)
      PARAMETER (TY$CMPLX16         = 4)
! -----------------------------------------------------------------
! Math Error Support
! -----------------------------------------------------------------
! Codes for function failure.
      INTEGER*4 MTH$E_DOMAIN              ! Argument domain error
      INTEGER*4 MTH$E_SINGULARITY         ! Argument Singularity
      INTEGER*4 MTH$E_OVERFLOW            ! Overflow range error
      INTEGER*4 MTH$E_UNDERFLOW           ! Underflow range error
      INTEGER*4 MTH$E_TLOSS               ! Total loss of precision
      INTEGER*4 MTH$E_PLOSS               ! Partial loss of precision
      PARAMETER (MTH$E_DOMAIN      = 1)
      PARAMETER (MTH$E_SINGULARITY = 2)
      PARAMETER (MTH$E_OVERFLOW    = 3)
      PARAMETER (MTH$E_UNDERFLOW   = 4)
      PARAMETER (MTH$E_TLOSS       = 5)
      PARAMETER (MTH$E_PLOSS       = 6)
! Math error information structure.
!
! Added filler's to keep 16 bytes per member for input args and result.
! This is so the layout of the Fortran definition of this structure
! matches the layout implemented in the Intel math library code.
! See dec_fortran_bugs 2649 for discussion.
!
      STRUCTURE /MTH$E_INFO/
	INTEGER*4 ERRCODE        ! INPUT : One of the MTH$ values above
	INTEGER*4 FTYPE          ! INPUT : One of the TY$ values above
	UNION
	MAP
	    REAL*4 R4ARG1        ! INPUT : FIrst argument
	    CHARACTER*12 R4FILL1
	    REAL*4 R4ARG2        ! INPUT : Second argument (if any)
	    CHARACTER*12 R4FILL2
	    REAL*4 R4RES         ! OUTPUT : Desired result
	    CHARACTER*12 R4FILL3
	END MAP
	MAP
	    REAL*8 R8ARG1        ! INPUT : FIrst argument
	    CHARACTER*8 R8FILL1
	    REAL*8 R8ARG2        ! INPUT : Second argument (if any)
	    CHARACTER*8 R8FILL2
	    REAL*8 R8RES         ! OUTPUT : Desired result
	    CHARACTER*8 R8FILL3
	END MAP
	MAP
	    COMPLEX*8 C8ARG1     ! INPUT : FIrst argument
	    CHARACTER*8 C8FILL1
	    COMPLEX*8 C8ARG2     ! INPUT : Second argument (if any)
	    CHARACTER*8 C8FILL2
	    COMPLEX*8 C8RES      ! OUTPUT : Desired result
	    CHARACTER*8 C8FILL3
	END MAP
	MAP
	    COMPLEX*16 C16ARG1   ! INPUT : FIrst argument
	    COMPLEX*16 C16ARG2   ! INPUT : Second argument (if any)
	    COMPLEX*16 C16RES    ! OUTPUT : Desired result
	END MAP
	END UNION
      END STRUCTURE
! -----------------------------------------------------------------
! Signal support
! -----------------------------------------------------------------
      INTEGER*4 SIG$ERR                   ! SIGNALQQ return value
      INTEGER*4 SIG$NSIG
      INTEGER*4 SIG$INT
      INTEGER*4 SIG$ILL
      INTEGER*4 SIG$FPE
      INTEGER*4 SIG$SEGV
      INTEGER*4 SIG$TERM
      INTEGER*4 SIG$USR1
      INTEGER*4 SIG$USR2
      INTEGER*4 SIG$USR3
      INTEGER*4 SIG$BREAK
      INTEGER*4 SIG$ABORT
      PARAMETER (SIG$ERR   = -1)
      PARAMETER (SIG$NSIG  = 23)
      PARAMETER (SIG$INT   =  2)
      PARAMETER (SIG$ILL   =  4)
      PARAMETER (SIG$FPE   =  8)
      PARAMETER (SIG$SEGV  = 11)
      PARAMETER (SIG$TERM  = 15)
      PARAMETER (SIG$USR1  = 16)
      PARAMETER (SIG$USR2  = 17)
      PARAMETER (SIG$USR3  = 20)
      PARAMETER (SIG$BREAK = 21)
      PARAMETER (SIG$ABORT = 22)
      INTEGER*4 FPE$INVALID
      INTEGER*4 FPE$DENORMAL
      INTEGER*4 FPE$ZERODIVIDE
      INTEGER*4 FPE$OVERFLOW
      INTEGER*4 FPE$UNDERFLOW
      INTEGER*4 FPE$INEXACT
      INTEGER*4 FPE$UNEMULATED
      INTEGER*4 FPE$SQRTNEG
      INTEGER*4 FPE$STACKOVERFLOW
      INTEGER*4 FPE$STACKUNDERFLOW
      INTEGER*4 FPE$EXPLICITGEN                 ! RAISEQQ( SIGFPE )
      PARAMETER (FPE$INVALID        = #81)
      PARAMETER (FPE$DENORMAL       = #82)
      PARAMETER (FPE$ZERODIVIDE     = #83)
      PARAMETER (FPE$OVERFLOW       = #84)
      PARAMETER (FPE$UNDERFLOW      = #85)
      PARAMETER (FPE$INEXACT        = #86)
      PARAMETER (FPE$UNEMULATED     = #87)
      PARAMETER (FPE$SQRTNEG        = #88)
      PARAMETER (FPE$STACKOVERFLOW  = #8a)
      PARAMETER (FPE$STACKUNDERFLOW = #8b)
      PARAMETER (FPE$EXPLICITGEN    = #8c)
! -----------------------------------------------------------------
! Coprocessor control
! -----------------------------------------------------------------
      INTEGER*2 FPCW$MCW_EM
      INTEGER*2 FPCW$INEXACT
      INTEGER*2 FPCW$UNDERFLOW
      INTEGER*2 FPCW$OVERFLOW
      INTEGER*2 FPCW$ZERODIVIDE
      INTEGER*2 FPCW$INVALID
      INTEGER*2 FPCW$DENORMAL
      INTEGER*2 FPCW$MCW_PC
      INTEGER*2 FPCW$64
      INTEGER*2 FPCW$53
      INTEGER*2 FPCW$24
      INTEGER*2 FPCW$MCW_IC
      INTEGER*2 FPCW$AFFINE
      INTEGER*2 FPCW$PROJECTIVE
      INTEGER*2 FPCW$MCW_RC
      INTEGER*2 FPCW$NEAR
      INTEGER*2 FPCW$DOWN
      INTEGER*2 FPCW$UP
      INTEGER*2 FPCW$CHOP
      INTEGER*2 FPSW$MSW_EM
      INTEGER*2 FPSW$INVALID
      INTEGER*2 FPSW$DENORMAL
      INTEGER*2 FPSW$ZERODIVIDE
      INTEGER*2 FPSW$OVERFLOW
      INTEGER*2 FPSW$UNDERFLOW
      INTEGER*2 FPSW$INEXACT
      PARAMETER (FPCW$MCW_EM        = #003F)  ! exception mask
      PARAMETER (FPCW$INVALID       = #0001)  ! invalid
      PARAMETER (FPCW$DENORMAL      = #0002)  ! denormal
      PARAMETER (FPCW$ZERODIVIDE    = #0004)  ! zero divide
      PARAMETER (FPCW$OVERFLOW      = #0008)  ! overflow
      PARAMETER (FPCW$UNDERFLOW     = #0010)  ! underflow
      PARAMETER (FPCW$INEXACT       = #0020)  ! inexact (precision)
      PARAMETER (FPCW$MCW_PC        = #0300)  ! precision control mask
      PARAMETER (FPCW$64            = #0300)  ! 64 bits
      PARAMETER (FPCW$53            = #0200)  ! 53 bits
      PARAMETER (FPCW$24            = #0000)  ! 24 bits
      PARAMETER (FPCW$MCW_IC        = #1000)  ! infinity control mask
      PARAMETER (FPCW$AFFINE        = #1000)  ! affine
      PARAMETER (FPCW$PROJECTIVE    = #0000)  ! projective
      PARAMETER (FPCW$MCW_RC        = #0C00)  ! rounding control mask
      PARAMETER (FPCW$CHOP          = #0C00)  ! chop
      PARAMETER (FPCW$UP            = #0800)  ! up
      PARAMETER (FPCW$DOWN          = #0400)  ! down
      PARAMETER (FPCW$NEAR          = #0000)  ! near
      PARAMETER (FPSW$MSW_EM        = #003F)  ! exception mask
      PARAMETER (FPSW$INVALID       = #0001)  ! invalid
      PARAMETER (FPSW$DENORMAL      = #0002)  ! denormal
      PARAMETER (FPSW$ZERODIVIDE    = #0004)  ! zero divide
      PARAMETER (FPSW$OVERFLOW      = #0008)  ! overflow
      PARAMETER (FPSW$UNDERFLOW     = #0010)  ! underflow
      PARAMETER (FPSW$INEXACT       = #0020)  ! inexact (precision)
! -----------------------------------------------------------------
! Random Numbers
! -----------------------------------------------------------------
      INTEGER*4 RND$TIMESEED
      PARAMETER (RND$TIMESEED = -1)
! -----------------------------------------------------------------
! Drives and Directories
! -----------------------------------------------------------------
      CHARACTER*1 FILE$CURDRIVE
      INTEGER*4   FILE$MAXNAME
      INTEGER*4   $MAXPATH
      PARAMETER (FILE$CURDRIVE = ' ')
      PARAMETER (FILE$MAXNAME = 255)
      PARAMETER ($MAXPATH = 260)
! -----------------------------------------------------------------
! Files
! -----------------------------------------------------------------
      STRUCTURE / FILE$INFO /
	INTEGER*4       CREATION          ! Creation time (-1 on FAT)
	INTEGER*4       LASTWRITE         ! Last write to file
	INTEGER*4       LASTACCESS        ! Last access (-1 on FAT)
	INTEGER*4       LENGTH            ! Length of file
	INTEGER*2       PERMIT            ! File access mode
	CHARACTER*255   NAME              ! File name
      END STRUCTURE
      INTEGER*4 FILE$NORMAL
      INTEGER*4 FILE$READONLY
      INTEGER*4 FILE$HIDDEN
      INTEGER*4 FILE$SYSTEM
      INTEGER*4 FILE$VOLUME
      INTEGER*4 FILE$DIR
      INTEGER*4 FILE$ARCHIVE
      INTEGER*4 FILE$FIRST
      INTEGER*4 FILE$LAST
      INTEGER*4 FILE$ERROR
      INTEGER*4 FILE$INVALID
      INTEGER*4 FILE$CURTIME
      PARAMETER (FILE$NORMAL      = #0000)
      PARAMETER (FILE$READONLY    = #0001)
      PARAMETER (FILE$HIDDEN      = #0002)
      PARAMETER (FILE$SYSTEM      = #0004)
      PARAMETER (FILE$VOLUME      = #0008)
      PARAMETER (FILE$DIR         = #0010)
      PARAMETER (FILE$ARCHIVE     = #0020)
      PARAMETER (FILE$FIRST       = -1)
      PARAMETER (FILE$LAST        = -2)
      PARAMETER (FILE$ERROR       = -3)
      PARAMETER (FILE$INVALID     = -1) ! For PACKTIMEQQ and UNPACKTIMEQQ
      PARAMETER (FILE$CURTIME     = -1) ! For SETFILETIMEQQ
! -----------------------------------------------------------------
! Keyboard
! -----------------------------------------------------------------
! -----------------------------------------------------------------
! Errors
! -----------------------------------------------------------------
      INTEGER*4 ERR$ZERO
      INTEGER*4 ERR$PERM
      INTEGER*4 ERR$NOENT
      INTEGER*4 ERR$SRCH
      INTEGER*4 ERR$INTR
      INTEGER*4 ERR$IO
      INTEGER*4 ERR$NXIO
      INTEGER*4 ERR$2BIG
      INTEGER*4 ERR$NOEXEC
      INTEGER*4 ERR$BADF
      INTEGER*4 ERR$CHILD
      INTEGER*4 ERR$AGAIN
      INTEGER*4 ERR$NOMEM
      INTEGER*4 ERR$ACCES
      INTEGER*4 ERR$FAULT
      INTEGER*4 ERR$NOTBLK
      INTEGER*4 ERR$BUSY
      INTEGER*4 ERR$EXIST
      INTEGER*4 ERR$XDEV
      INTEGER*4 ERR$NODEV
      INTEGER*4 ERR$NOTDIR
      INTEGER*4 ERR$ISDIR
      INTEGER*4 ERR$INVAL
      INTEGER*4 ERR$NFILE
      INTEGER*4 ERR$MFILE
      INTEGER*4 ERR$NOTTY
      INTEGER*4 ERR$TXTBSY
      INTEGER*4 ERR$FBIG
      INTEGER*4 ERR$NOSPC
      INTEGER*4 ERR$SPIPE
      INTEGER*4 ERR$ROFS
      INTEGER*4 ERR$MLINK
      INTEGER*4 ERR$PIPE
      INTEGER*4 ERR$DOM
      INTEGER*4 ERR$RANGE
      INTEGER*4 ERR$UCLEAN
      INTEGER*4 ERR$DEADLOCK
      PARAMETER (ERR$ZERO         =  0)
      PARAMETER (ERR$PERM         =  1)
      PARAMETER (ERR$NOENT        =  2)
      PARAMETER (ERR$SRCH         =  3)
      PARAMETER (ERR$INTR         =  4)
      PARAMETER (ERR$IO           =  5)
      PARAMETER (ERR$NXIO         =  6)
      PARAMETER (ERR$2BIG         =  7)
      PARAMETER (ERR$NOEXEC       =  8)
      PARAMETER (ERR$BADF         =  9)
      PARAMETER (ERR$CHILD        = 10)
      PARAMETER (ERR$AGAIN        = 11)
      PARAMETER (ERR$NOMEM        = 12)
      PARAMETER (ERR$ACCES        = 13)
      PARAMETER (ERR$FAULT        = 14)
      PARAMETER (ERR$NOTBLK       = 15)
      PARAMETER (ERR$BUSY         = 16)
      PARAMETER (ERR$EXIST        = 17)
      PARAMETER (ERR$XDEV         = 18)
      PARAMETER (ERR$NODEV        = 19)
      PARAMETER (ERR$NOTDIR       = 20)
      PARAMETER (ERR$ISDIR        = 21)
      PARAMETER (ERR$INVAL        = 22)
      PARAMETER (ERR$NFILE        = 23)
      PARAMETER (ERR$MFILE        = 24)
      PARAMETER (ERR$NOTTY        = 25)
      PARAMETER (ERR$TXTBSY       = 26)
      PARAMETER (ERR$FBIG         = 27)
      PARAMETER (ERR$NOSPC        = 28)
      PARAMETER (ERR$SPIPE        = 29)
      PARAMETER (ERR$ROFS         = 30)
      PARAMETER (ERR$MLINK        = 31)
      PARAMETER (ERR$PIPE         = 32)
      PARAMETER (ERR$DOM          = 33)
      PARAMETER (ERR$RANGE        = 34)
      PARAMETER (ERR$UCLEAN       = 35)
      PARAMETER (ERR$DEADLOCK     = 36)
      LOGICAL*4 ERR$HARDPROMPT      ! For SETERRORMODEQQ
      LOGICAL*4 ERR$HARDFAIL
      PARAMETER (ERR$HARDPROMPT   = .TRUE.)
      PARAMETER (ERR$HARDFAIL     = .FALSE.)
! ----------------------------------------------------------------
! Sorting and Searching Arrays
! ----------------------------------------------------------------
      INTEGER*4 SRT$REAL4
      INTEGER*4 SRT$REAL8
      INTEGER*4 SRT$INTEGER1
      INTEGER*4 SRT$INTEGER2
      INTEGER*4 SRT$INTEGER4
      PARAMETER (SRT$REAL4          = #00010000)
      PARAMETER (SRT$REAL8          = #00020000)
      PARAMETER (SRT$INTEGER1       = #00030000)
      PARAMETER (SRT$INTEGER2       = #00040000)
      PARAMETER (SRT$INTEGER4       = #00050000)
! ----------------------------------------------------------------
! Configuration
! ----------------------------------------------------------------
      INTEGER*4 CFG$WINNT
      PARAMETER (CFG$WINNT          = #00000001)
! ----------------------------------------------------------------
! QuickWin Support
! ----------------------------------------------------------------
!DEC$ PACK:1
!DEC$ OPTIONS/WARNING=NOALIGNMENT
! structure for setwindowconfig/getwindowconfig
      STRUCTURE /windowconfig/
	INTEGER*2 numxpixels
	INTEGER*2 numypixels
	INTEGER*2 numtextcols
	INTEGER*2 numtextrows
	INTEGER*2 numcolors
	INTEGER*4 fontsize
	CHARACTER*(80) title
	INTEGER*2 bitsperpixel
	INTEGER*2 numvideopages
	INTEGER*2 mode
	INTEGER*2 adapter
	INTEGER*2 monitor
	INTEGER*2 memory
	INTEGER*2 environment
	CHARACTER*(32) extendfontname
	INTEGER*4 extendfontsize
	INTEGER*4 extendfontattributes
      END STRUCTURE
!DEC$ ENDOPTIONS
!DEC$ PACK

! Assign this to the windowconfig structures mode field
! if you want the last line to always be visible..

integer(2), parameter :: QWIN$SCROLLDOWN = #0080


!     Parameters for APPENDMENUQQ, INSERTMENUQQ, MODIFYMENUFLAGSQQ
      INTEGER*4 $MENUGRAYED, $MENUDISABLED, $MENUENABLED
      INTEGER*4 $MENUSEPARATOR, $MENUCHECKED, $MENUUNCHECKED
      PARAMETER($MENUGRAYED=1)
      PARAMETER($MENUDISABLED=2)
      PARAMETER($MENUENABLED=4)
      PARAMETER($MENUSEPARATOR=8)
      PARAMETER($MENUCHECKED=16)
      PARAMETER($MENUUNCHECKED=32)
! Clicking on menus.
      INTEGER*4 QWIN$STATUS
      INTEGER*4 QWIN$TILE
      INTEGER*4 QWIN$CASCADE
      INTEGER*4 QWIN$ARRANGE
      PARAMETER (QWIN$STATUS  = 1)
      PARAMETER (QWIN$TILE    = 2)
      PARAMETER (QWIN$CASCADE = 3)
      PARAMETER (QWIN$ARRANGE = 4)
! Extended font information
      INTEGER*4 QWIN$EXTENDFONT
      INTEGER*4 QWIN$EXTENDFONT_NORMAL
      INTEGER*4 QWIN$EXTENDFONT_UNDERLINE
      INTEGER*4 QWIN$EXTENDFONT_BOLD
      INTEGER*4 QWIN$EXTENDFONT_ITALIC
      PARAMETER (QWIN$EXTENDFONT            =#FFFFFFFE)
      PARAMETER (QWIN$EXTENDFONT_NORMAL     =#80000000)
      PARAMETER (QWIN$EXTENDFONT_BOLD       =#00000001)
      PARAMETER (QWIN$EXTENDFONT_UNDERLINE  =#00000002)
      PARAMETER (QWIN$EXTENDFONT_ITALIC     =#00000004)

!
!Additional extended font values (taken from WINGDI.H).
!
!In ExtendFontAttributes, the layout is as follows.
!bit     0     used by QWIN$EXTENDFONT_NORMAL.
!bits    1-11  reseved, not currently used
!bits   12-19  character set
!bits   20-23  Font Family
!bits   24-27  Pitch
!bits   28-31  used by QWIN$EXTENDFONT_BOLD, _UNDERLINE, and _ITALIC.
!
!if the above is shifted right 4 bits and the low 16 bits
!are taken, which is done when it is processed internally,
!we have the following 2 bytes:
!  |char set| |Font and Pitch|
!with the same numberic values as used in the C header file WINGDI.H.
! 

!Pitch
integer, parameter :: QWIN$EXTENDFONT_FIXED_PITCH    =  1 * (2**4)  ! Qwin default
integer, parameter :: QWIN$EXTENDFONT_VARIABLE_PITCH =  2 * (2**4) 

!Font Families
integer, parameter :: QWIN$EXTENDFONT_FF_ROMAN       =  1 * (2**8)
				    ! Variable stroke width, serifed. 
				    ! Times Roman, Century Schoolbook, etc.
integer, parameter :: QWIN$EXTENDFONT_FF_SWISS       =  2 * (2**8) 
				    ! Variable stroke width, sans-serifed.
				    ! Helvetica, Swiss, etc. 
integer, parameter :: QWIN$EXTENDFONT_FF_MODERN      =  3 * (2**8)  !  Qwin default
				    ! Constant stroke width, serifed or sans-serifed. 
				    ! Pica, Elite, Courier, etc. */
integer, parameter :: QWIN$EXTENDFONT_FF_SCRIPT      =  4 * (2**8)
				    ! Cursive, etc. 
integer, parameter :: QWIN$EXTENDFONT_FF_DECORATIVE  =  5 * (2**8) 
				    ! Old English, etc.

!Character Sets
integer, parameter :: QWIN$EXTENDFONT_ANSI_CHARSET   =  0  * (2**12) ! Qwin default  
integer, parameter :: QWIN$EXTENDFONT_DEFAULT_CHARSET=  1  * (2**12)
integer, parameter :: QWIN$EXTENDFONT_SYMBOL_CHARSET =  2  * (2**12)
integer, parameter :: QWIN$EXTENDFONT_OEM_CHARSET    =  255* (2**12) ! for MS LineDraw


! Size/Move a window
      STRUCTURE /QWINFO/
	  INTEGER*2 TYPE          ! request type
	  INTEGER*2 X             ! x coordinate for upper left
	  INTEGER*2 Y             ! y coordinate for upper left
	  INTEGER*2 H             ! window height
	  INTEGER*2 W             ! window width
      END STRUCTURE
      INTEGER*2 QWIN$MIN
      INTEGER*2 QWIN$MAX
      INTEGER*2 QWIN$RESTORE
      INTEGER*2 QWIN$SET
      PARAMETER (QWIN$MIN     = 1)
      PARAMETER (QWIN$MAX     = 2)
      PARAMETER (QWIN$RESTORE = 3)
      PARAMETER (QWIN$SET     = 4)
      INTEGER*4 QWIN$FRAMEWINDOW
      INTEGER*4 QWIN$NOACTIVEWINDOW
      PARAMETER (QWIN$FRAMEWINDOW = #80000000) 
      PARAMETER (QWIN$NOACTIVEWINDOW = #C0000000)
      INTEGER*4 QWIN$FRAMEMAX
      INTEGER*4 QWIN$FRAMECURR
      INTEGER*4 QWIN$CHILDMAX
      INTEGER*4 QWIN$CHILDCURR
      INTEGER*4 QWIN$SIZEMAX
      INTEGER*4 QWIN$SIZECURR
      PARAMETER (QWIN$FRAMEMAX  = 1)
      PARAMETER (QWIN$FRAMECURR = 2)
      PARAMETER (QWIN$CHILDMAX  = 3)
      PARAMETER (QWIN$CHILDCURR = 4)
      PARAMETER (QWIN$SIZEMAX   = 3)
      PARAMETER (QWIN$SIZECURR  = 4)
!Get/Set Exit
      INTEGER*4 QWIN$EXITPROMPT, QWIN$EXITNOPERSIST, QWIN$EXITPERSIST
      PARAMETER(QWIN$EXITPROMPT= 1)     ! prompt before exiting
      PARAMETER(QWIN$EXITNOPERSIST= 2)  ! exit immediately
      PARAMETER(QWIN$EXITPERSIST= 3)    ! do not exit appilcation
! Message Boxes
      INTEGER*4 MB$ABORTRETRYIGNORE
      INTEGER*4 MB$DEFBUTTON1
      INTEGER*4 MB$DEFBUTTON2
      INTEGER*4 MB$DEFBUTTON3
      INTEGER*4 MB$ICONASTERISK
      INTEGER*4 MB$ICONEXCLAMATION
      INTEGER*4 MB$ICONHAND
      INTEGER*4 MB$ICONINFORMATION
      INTEGER*4 MB$ICONQUESTION
      INTEGER*4 MB$ICONSTOP
      INTEGER*4 MB$OK
      INTEGER*4 MB$OKCANCEL
      INTEGER*4 MB$RETRYCANCEL
      INTEGER*4 MB$SYSTEMMODAL
      INTEGER*4 MB$TASKMODAL
      INTEGER*4 MB$YESNO
      INTEGER*4 MB$YESNOCANCEL
      PARAMETER (MB$ABORTRETRYIGNORE = #00000002)
      PARAMETER (MB$DEFBUTTON1       = #00000000)
      PARAMETER (MB$DEFBUTTON2       = #00000100)
      PARAMETER (MB$DEFBUTTON3       = #00000200)
      PARAMETER (MB$ICONASTERISK     = #00000040)
      PARAMETER (MB$ICONEXCLAMATION  = #00000030)
      PARAMETER (MB$ICONHAND         = #00000010)
      PARAMETER (MB$ICONINFORMATION  = #00000040)
      PARAMETER (MB$ICONQUESTION     = #00000020)
      PARAMETER (MB$ICONSTOP         = #00000010)
      PARAMETER (MB$OK               = #00000000)
      PARAMETER (MB$OKCANCEL         = #00000001)
      PARAMETER (MB$RETRYCANCEL      = #00000005)
      PARAMETER (MB$SYSTEMMODAL      = #00001000)
      PARAMETER (MB$TASKMODAL        = #00002000)
      PARAMETER (MB$YESNO            = #00000004)
      PARAMETER (MB$YESNOCANCEL      = #00000003)
      INTEGER*4 MB$IDOK
      INTEGER*4 MB$IDCANCEL
      INTEGER*4 MB$IDABORT
      INTEGER*4 MB$IDRETRY
      INTEGER*4 MB$IDIGNORE
      INTEGER*4 MB$IDYES
      INTEGER*4 MB$IDNO
      PARAMETER (MB$IDOK     = 1)
      PARAMETER (MB$IDCANCEL = 2)
      PARAMETER (MB$IDABORT  = 3)
      PARAMETER (MB$IDRETRY  = 4)
      PARAMETER (MB$IDIGNORE = 5)
      PARAMETER (MB$IDYES    = 6)
      PARAMETER (MB$IDNO     = 7)
! InitialMenu should not be typed here, so that when InitialMenu is
! defined by the user it can include FLIB.FD.  Nor should it be external.
!     LOGICAL*4 INITIALMENU
!xx DxExC$ ATTRIBUTES EXTERN :: INITIALMENU  
!x's to disable directive

INTERFACE
    SUBROUTINE FOR_DESCRIPTOR_ASSIGN(DP,BASE,SIZE,RESERVED,RANK,DIMS_INFO)
    USE DFWINTY,ONLY:FOR_DIMS_INFO
!DEC$ ATTRIBUTES DEFAULT :: FOR_DESCRIPTOR_ASSIGN
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES ALIAS: "_for_descriptor_assign@24" ::  FOR_DESCRIPTOR_ASSIGN
!DEC$ ELSE
!DEC$ ATTRIBUTES ALIAS: "for_descriptor_assign" ::  FOR_DESCRIPTOR_ASSIGN
!DEC$ ENDIF
    INTEGER, POINTER :: DP(:)
!DEC$ ATTRIBUTES NO_ARG_CHECK :: DP
    INTEGER(4) :: BASE
!DEC$ ATTRIBUTES VALUE :: BASE
    INTEGER(4) :: SIZE
!DEC$ ATTRIBUTES VALUE :: SIZE
    INTEGER(4) :: RESERVED
!DEC$ ATTRIBUTES VALUE :: RESERVED
    INTEGER(4) :: RANK
!DEC$ ATTRIBUTES VALUE :: RANK
    TYPE(FOR_DIMS_INFO) :: DIMS_INFO(RANK)
    END SUBROUTINE
END INTERFACE
!DEC$ ENDIF  ! !DEC$ IF .NOT. DEFINED(__DFLIB_FGRAPH_INCLUDE)


!DEC$ IF .NOT. DEFINED(__DFLIB_SPORT_ALREADY_INCLUDED)
!DEC$ DEFINE __DFLIB_SPORT_ALREADY_INCLUDED = 1

!!!************************ SPORT defs *************************************

!
!**  TOSS = what to throw away on input
!**  OUT = what to terminate records with on output
!**  TERM = what to look for for termination on input
!--------------------------------------------

integer, parameter :: DL_TOSS_CR    = '01'X
integer, parameter :: DL_TOSS_LF    = '02'X
integer, parameter :: DL_TERM_CR    = '04'X
integer, parameter :: DL_TERM_LF    = '08'X
integer, parameter :: DL_TERM_CRLF  = '0C'X
integer, parameter :: DL_OUT_CR     = '10'X
integer, parameter :: DL_OUT_LF     = '20'X

!  istat = sport_connect( port, delim_options )

interface
integer*4 function SPORT_CONNECT ( port, options )
!dec$ attributes default :: SPORT_CONNECT
integer(4), intent(in) :: port
integer(4), intent(in), optional :: options
end function SPORT_CONNECT
end interface

!  istat = sport_release( port )

interface
integer*4 function SPORT_RELEASE ( port )
!dec$ attributes default :: SPORT_RELEASE
integer(4), intent(in) :: port
end function SPORT_RELEASE
end interface

!  ihnd = sport_get_handle( port, handle )

interface
integer*4 function SPORT_GET_HANDLE ( port, handle )
!dec$ attributes default :: SPORT_GET_HANDLE
integer(4), intent(in) :: port
integer(4), intent(out) :: handle
end function SPORT_GET_HANDLE
end interface

!   istat = sport_set/get_state( port, baud, parity, data, stop )

interface
integer*4 function SPORT_GET_STATE ( port, baud, parity, dbits, sbits )
!dec$ attributes default :: SPORT_GET_STATE
integer(4), intent(in) :: port
integer(4), intent(out), optional :: baud
integer(4), intent(out), optional :: parity
integer(4), intent(out), optional :: dbits
integer(4), intent(out), optional :: sbits
end function SPORT_GET_STATE
end interface


interface
integer*4 function SPORT_SET_STATE ( port, baud, parity, dbits, sbits )
!dec$ attributes default :: SPORT_SET_STATE
integer(4), intent(in) :: port
integer(4), intent(in), optional :: baud
integer(4), intent(in), optional :: parity
integer(4), intent(in), optional :: dbits
integer(4), intent(in), optional :: sbits
end function SPORT_SET_STATE
end interface


interface
integer*4 function SPORT_SHOW_STATE ( port, level )
!dec$ attributes default :: SPORT_SHOW_STATE
integer(4), intent(in) :: port
integer(4), intent(in), optional :: level
end function SPORT_SHOW_STATE
end interface

!   istat = sport_set/get_timeouts( port, ... )

interface
integer*4 function SPORT_GET_TIMEOUTS ( port, rx_int, tx_tot_mult, &
			tx_tot_const )
!dec$ attributes default :: SPORT_GET_TIMEOUTS
integer(4), intent(in) :: port
integer(4), intent(out), optional :: rx_int
integer(4), intent(out), optional :: tx_tot_mult
integer(4), intent(out), optional :: tx_tot_const
end function SPORT_GET_TIMEOUTS
end interface

interface
integer*4 function SPORT_SET_TIMEOUTS ( port, rx_int, tx_tot_mult, &
			tx_tot_const )
!dec$ attributes default :: SPORT_SET_TIMEOUTS
integer(4), intent(in) :: port
integer(4), intent(in), optional :: rx_int
integer(4), intent(in), optional :: tx_tot_mult
integer(4), intent(in), optional :: tx_tot_const
end function SPORT_SET_TIMEOUTS
end interface


!   istat = sport_special_func( port, func )

interface
integer*4 function SPORT_SPECIAL_FUNC ( port, function )
!dec$ attributes default :: SPORT_SPECIAL_FUNC
integer(4), intent(in) :: port
integer(4), intent(in) :: function
end function SPORT_SPECIAL_FUNC
end interface


!    istat = sport_write_data( port, buff, hidden-len, count )

interface
integer*4 function SPORT_WRITE_DATA ( port, data, count )
!dec$ attributes default :: SPORT_WRITE_DATA
integer(4), intent(in) :: port
character*(*), intent(in) :: data
integer(4), intent(in), optional :: count
end function SPORT_WRITE_DATA
end interface

interface
integer*4 function SPORT_WRITE_LINE ( port, data, count )
!dec$ attributes default :: SPORT_WRITE_LINE
integer(4), intent(in) :: port
character*(*), intent(in) :: data
integer(4), intent(in), optional :: count
end function SPORT_WRITE_LINE
end interface

!    istat = sport_read_data( port, buffer, len, count )

interface
integer*4 function SPORT_READ_DATA ( port, buffer, count )
!dec$ attributes default :: SPORT_READ_DATA
integer(4), intent(in) :: port
character*(*), intent(out) :: buffer
integer(4), intent(out), optional :: count
end function SPORT_READ_DATA
end interface

!    istat = sport_read_line( port, buffer, len, count )

interface
integer*4 function SPORT_READ_LINE ( port, buffer, count )
!dec$ attributes default :: SPORT_READ_LINE
integer(4), intent(in) :: port
character*(*), intent(out) :: buffer
integer(4), intent(out), optional :: count
end function SPORT_READ_LINE
end interface

!    istat = sport_peek_data( port, present, count )

interface
integer*4 function SPORT_PEEK_DATA ( port, present, count )
!dec$ attributes default :: SPORT_PEEK_DATA
integer(4), intent(in) :: port
integer(4), intent(out), optional :: present
integer(4), intent(out), optional :: count
end function SPORT_PEEK_DATA
end interface


!    istat = sport_peek_line( port, present, count )

interface
integer*4 function SPORT_PEEK_LINE ( port, present, count )
!dec$ attributes default :: SPORT_PEEK_LINE
integer(4), intent(in) :: port
integer(4), intent(out), optional :: present
integer(4), intent(out), optional :: count
end function SPORT_PEEK_LINE
end interface


!    istat = sport_purge( port, function )

interface
integer*4 function SPORT_PURGE ( port, function )
!dec$ attributes default :: SPORT_PURGE
integer(4), intent(in) :: port
integer(4), intent(in) :: function
end function SPORT_PURGE
end interface

!    istat = sport_cancel_io( port )

interface
integer*4 function SPORT_CANCEL_IO ( port )
!dec$ attributes default :: SPORT_CANCEL_IO
integer(4), intent(in) :: port
end function SPORT_CANCEL_IO
end interface

!!!********************* End SPORT defs *************************************
!DEC$ ENDIF     !  DEFINED(__DFLIB_SPORT_ALREADY_INCLUDED)

!DEC$ IF .NOT. DEFINED(__DFLIB_INCLUDE)
END MODULE DFLIB
!DEC$ ENDIF

