(tput) 1>/dev/null 2>&1
if [ $? = 1 ]; then
  CLEAR="clear"; export CLEAR
else
  CLEAR="tput clear"; export CLEAR
fi
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

  Demo Program Build and Run Procedure
  ====================================
 
  This Procedure will compile and run the library
  demonstration programs.  The library object archive
  file 'libdevice.a' must be created, and the
  library environment variable DEVICE must be
  defined, prior to performing this Procedure.
 "
echo "  <CR> to Continue"
read answer
if [ "$SYSID" = "" ]; then
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

       Select System
      ===============
         1. APOLLO
         2. RISC6K
         3. CONVEX
         4. SGIRIX
         5. SUNOS
         6. UNICOS
         7. HP9000
         8. DECOSF
         9. LINUX
 "
read SYSID; export SYSID
fi
LINK="f77 "; export LINK
FORTRAN=FORTRAN;export FORTRAN
LIBX11="libX11.a";export LIBX11
if [ "$SYSID" = "1" ]; then
  LINK="f77 "
fi
if [ "$SYSID" = "2" ]; then
  LINK='xlf '
fi
if [ "$SYSID" = "3" ]; then
  LINK='fc '
fi
if [ "$SYSID" = "4" ]; then
  LINK='f77 '
fi
if [ "$SYSID" = "5" ]; then
  LINK='f77 '
fi
if [ "$SYSID" = "6" ]; then
  LINK='cf77 -Wl"-D DUPENTRY=IGNORE" '
fi
if [ "$SYSID" = "7" ]; then
  LINK='fort77 '
fi
if [ "$SYSID" = "8" ]; then
  LINK='f77 -taso '
  LIBX11='libX11.so'
  echo " "
fi
if [ "$SYSID" = "9" ]; then
  LINK='g77 -Wunused '
fi
$CLEAR
echo "
 
        Creating demo program source files.
 "
echo "  Generating =====> [ ./DEVICE.INC ]"
cat <<"STOP_CAT"> ././DEVICE.INC
C     ------------------Start DEVICE.INC Include File---------------------
C
C                       DEVICE Object Hidden Information
C
C
C
      INTEGER   MAXDEV, IDEV, LUNOUT, KZERR, KZSUM, KZNPLT, KZHCLP
     *        , KZSHD, KZTXT, KZCOPY, NDCLRS, IDVBTS
      REAL      XLENCM, YLENCM, XRES, YRES
      LOGICAL   LWIDE
C
      COMMON /DEVICEC/  MAXDEV, IDEV, LUNOUT, KZERR, KZSUM, LWIDE
     *        , KZNPLT, KZHCLP, KZSHD, KZTXT, KZCOPY, NDCLRS, IDVBTS
     *        , XLENCM, YLENCM, XRES, YRES
C
C     PRIVATE CONSTANTS
C       None
C
C     PRIVATE VARIABLES
C       MAXDEV = maximum number of supported devices
C       IDEV   = id number of current device
C                0            no device initialized
C                1            (reserved)
C                2            Tektronix 4014
C                3            VECTOR Save
C                4            QMS Laser
C                5            Tektronix 4115
C                6            Tektronix 4510 Rasterizer
C                7            VT-240
C                8            PC (ST-240)
C                9            Film Recorder (JSC only)
C                10           Tektronix 4107
C                11           LN03+
C                12           POSTSC Level II
C                13           X Windows
C                14           POSTSC Level I
C                15           HP LaserJet
C       LUNOUT = logical unit of graphics output device
C                31           default
C       KZERR  = logical unit of graphics error message
C                             device
C                6            default (standard error #)
C       KZSUM  = logical unit of graphics summary message
C                             device
C                6            default (standard output #)
C       LWIDE  = landscape/portrait mode switch
C                .T.          device initialized in landscape mode
C                .F.          device initialized in portrait mode
C       KZNPLT = number of plots sent to output device
C                [0]          initial value
C       KZHCLP = hardware clipping enable switch
C                111          Y: hardware clipping enabled
C                222          N: hardware clipping disabled,
C                                use software clipping (default)
C       KZSHD  = hardware shading enable switch
C                111          Y: hardware shading enabled
C                222          N: hw shading disabled (default)
C       KZTXT  = hardware character drawing enable switch
C                111          Y: hardware char drawing enabled
C                222          N: hw char drawing disabled, draw
C                                characters using software (default)
C       KZCOPY = graphics hardware function enable switch
C                111          Y: enable hw autoprint on 4014
C                222          N: disable hw autoprint (default)
C       NDCLRS = number of foreground colors supported
C       IDVBTS = device characteristics bits, sum of:
C                0            device is a stroke (plotter) device
C                1            device is a raster device
C                2            device is a DVST (storage tube)
C                3            device is a printer/plotter
C                4            can draw in background color (color 0)
C                8            device is hardcopy (filewriter) device
C                16           device is a shareable device
C                32           device recognizes HSI color model
C                64           device recognizes RGB color model
C                128          "pick character" input is supported
C                256          device supports hardware area fill
C                512          device fills convex polygons only
C                1024         device supports hardware characters
C                2048         device supports landscape and portrait
C                4096         device supports hardware clipping
C       XLENCM = X page length for the device, cm
C       YLENCM = Y page length for the device, cm
C       XRES   = X resolution for device, device units/cm
C       YRES   = Y resolution for device, device units/cm
C
C     ------------------End DEVICE.INC Include File---------------------
STOP_CAT
echo "  Generating =====> [ ./FILEWRITER.INC ]"
cat <<"STOP_CAT"> ././FILEWRITER.INC
C     ------------------Start FILEWRITER.INC Include File---------------------
C
C                       FILEWRITER Object Hidden Information
C
      INTEGER   MAXFIL
C
      PARAMETER (MAXFIL = 8)
C
      INTEGER   NPLTS(MAXFIL), OFLAG(MAXFIL)
      CHARACTER   FILNM(MAXFIL)*30
C
      COMMON /FILEWRITERC/  FILNM
      COMMON /FILEWRITER/  NPLTS, OFLAG
C
C     PRIVATE CONSTANTS
C       MAXFIL = subscript size constant for FILNM, NPLTS, OFLAG
C
C     PRIVATE VARIABLES
C       FILNM  = graphics output file name
C                             (i)=i'th filewriter device, 8 max
C                             (1)=name of QMS Laser file
C                             (2)=name of Tektronix 4510 file
C                             (3)=name of VECTOR Save file
C                             (4)=name of LN03+ file
C                             (5)=name of Film Recorder file
C                             (6)=name of POSTSC Level II file
C                             (7)=name of POSTSC Level I file
C                             (8)=name of HP LaserJet file
C       NPLTS  = number of plots written to output file
C                             (i)=i'th filewriter device, 8 max
C                [0]          no plots written to file (default)
C       OFLAG  = graphics output file content flag
C                             (i)=i'th filewriter device, 8 max
C                0            output file not written (default)
C                1            output file previously written
C
C     ------------------End FILEWRITER.INC Include File---------------------
STOP_CAT
echo "  Generating =====> [ ./_device.tk ]"
cat <<"STOP_CAT"> ././_device.tk
#!/tmp/tk/usr/X386/bin/wish -f
#
#       Programmer's Reusable Library, Version 0.7      (TM)
#
#            Copyright (C) 1995 Object Access (SM)
#
#     Permission is granted to any individual or institution
#     to use, copy, modify, and distribute this single program
#     unit, provided that this complete copyright and
#     permission notice is maintained, intact, in all copies.
#
#     Object Access Incorporated provides this software
#     "as is" without express or implied warranty.
#
#     PURPOSE: Demonstrate features of the PRL-DEVICE library
#
#     NOTES:
#
#     ******************************************************************
#
#                       Define window title
#
set auto_path "$tk_library/demos $auto_path"
wm title . "PRL-DEVICE Demonstration"
#
#     ******************************************************************
#
#                       Create the main window, consisting of a menu
#                       bar and a message explaining the basic operation
#                       of the program
#
frame .menu -relief raised -borderwidth 1
#
message .msg -font -Adobe-times-medium-r-normal--*-180* -relief raised \
-width 600 -borderwidth 1 -text \
"This window demonstrates the Programmer's Reuseable Library \
PRL-DEVICE, Version 0.7 \
using a graphical user interface provided by the Tk toolkit.
 
To invoke a demonstration, press the left mouse button over one of the \
menu buttons, drag the mouse to the desired menu file, then release the \
mouse button.
 
The Demo menu tells more about using this window.
The More menu has more information about PRL-DEVICE.
 
To exit, select the \"Quit\" option in the Demo menu.
 
----------------------------------------------------
 
Copyright (C) 1995 Object Access (SM)
 
Permission is granted to any individual or institution \
to use, copy, modify, and distribute this single program \
unit, provided that this complete copyright and \
permission notice is maintained, intact, in all copies.
 
Object Access Incorporated provides this software \
\"as is\" without express or implied warranty."
#
pack .menu -side top -fill x
pack .msg -side bottom -expand yes -fill both
#
#     ******************************************************************
#
#                       DEFINE MENUS FOR TOP MENU ROW
#
#     ******************************************************************
#
#                       "Demo" menu
#
menubutton .menu.demo -text "Demo  " -menu .menu.demo.m
#
#     ------------------------------------------------------------------
#
                        menu .menu.demo.m
#
#                       "Tear-off menus" button
.menu.demo.m add command -label "Tear-off menus" -command mkTear
#
#                       "Quit" button
.menu.demo.m add command -label "Quit" -command "destroy ."
#
#     ******************************************************************
#
#                       "PRL" menu
#
menubutton .menu.prl -text "PRL  " -menu .menu.prl.m
#
#     ------------------------------------------------------------------
#
                        menu .menu.prl.m
#
#                       "prl1" button
.menu.prl.m add command -label "prl1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e prl1.x }
#
#     ******************************************************************
#
#                       "DEVICE" menu
#
menubutton .menu.device -text "DEVICE  " -menu .menu.device.m
#
#     ------------------------------------------------------------------
#
                        menu .menu.device.m
#
#                       "device1" button
.menu.device.m add command -label "device1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device1.x }
#
#                       "device2" button
.menu.device.m add command -label "device2" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device2.x }
#
#                       "device3" button
.menu.device.m add command -label "device3" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device3.x }
#
#                       "device4" button
.menu.device.m add command -label "device4" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device4.x }
#
#                       "device5" button
.menu.device.m add command -label "device5" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device5.x }
#
#                       "device6" button
.menu.device.m add command -label "device6" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device6.x }
#
#                       "device7" button
.menu.device.m add command -label "device7" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device7.x }
#
#                       "device8" button
.menu.device.m add command -label "device8" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device8.x }
#
#                       "device9" button
.menu.device.m add command -label "device9" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device9.x }
#
#                       "device10" button
.menu.device.m add command -label "device10" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e device10.x }
#
#     ******************************************************************
#
#                       "File_Writers" menu
#
menubutton .menu.fw -text "File_Writers " -menu .menu.fw.m
#
#     ******************************************************************
#
                        menu .menu.fw.m
#
#                       "FILEWRITER" menu
.menu.fw.m add cascade -label "FILEWRITER" -menu .menu.fw.filewriter
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.filewriter
#
#                       "filewriter1" button
.menu.fw.filewriter add command -label "filewriter1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e filewriter1.x }
#
#                       "filewriter2" button
.menu.fw.filewriter add command -label "filewriter2" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e filewriter2.x }
#
#                       "filewriter3" button
.menu.fw.filewriter add command -label "filewriter3" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e filewriter3.x }
#
#     ******************************************************************
#
#                       "FRL" menu
.menu.fw.m add cascade -label "FRL" -menu .menu.fw.frl
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.frl
#
#                       "frl1" button
.menu.fw.frl add command -label "frl1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e frl1.x }
#
#                       "frl2" button
.menu.fw.frl add command -label "frl2" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e frl2.x }
#
#     ******************************************************************
#
#                       "HPLASER" menu
.menu.fw.m add cascade -label "HPLASER" -menu .menu.fw.hplaser
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.hplaser
#
#                       "hplaser1" button
.menu.fw.hplaser add command -label "hplaser1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e hplaser1.x }
#
#     ******************************************************************
#
#                       "LN03LASER" menu
.menu.fw.m add cascade -label "LN03LASER" -menu .menu.fw.ln03laser
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.ln03laser
#
#                       "ln03laser1" button
.menu.fw.ln03laser add command -label "ln03laser1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e ln03laser1.x }
#
#     ******************************************************************
#
#                       "POST" menu
.menu.fw.m add cascade -label "POST" -menu .menu.fw.postsc
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.postsc
#
#                       "post1" button
.menu.fw.postsc add command -label "post1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e post1.x }
#
#                       "post2" button
.menu.fw.postsc add command -label "post2" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e post2.x }
#
#     ******************************************************************
#
#                       "QMSLASER" menu
.menu.fw.m add cascade -label "QMSLASER" -menu .menu.fw.qmslaser
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.qmslaser
#
#                       "qmslaser1" button
.menu.fw.qmslaser add command -label "qmslaser1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e qmslaser1.x }
#
#     ******************************************************************
#
#                       "TEK4510" menu
.menu.fw.m add cascade -label "TEK4510" -menu .menu.fw.tek4510
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.tek4510
#
#                       "tek45101" button
.menu.fw.tek4510 add command -label "tek45101" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e tek45101.x }
#
#     ******************************************************************
#
#                       "VECSAVE" menu
.menu.fw.m add cascade -label "VECSAVE" -menu .menu.fw.vecsave
#
#     ------------------------------------------------------------------
#
                        menu .menu.fw.vecsave
#
#                       "vecsave1" button
.menu.fw.vecsave add command -label "vecsave1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e vecsave1.x }
#
#     ******************************************************************
#
#                       "Terminals" menu
#
menubutton .menu.term -text "Terminals " -menu .menu.term.m
#
#     ******************************************************************
#
                        menu .menu.term.m
#
#                       "XWIN" menu
.menu.term.m add cascade -label "XWIN" -menu .menu.term.xwin
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.xwin
#
#                       "xwin1" button
.menu.term.xwin add command -label "xwin1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e xwin1.x }
#
#     ******************************************************************
#
#                       "VT240" menu
#
.menu.term.m add cascade -label "VT240" -menu .menu.term.vt240
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.vt240
#
#                       "vt2401" button
.menu.term.vt240 add command -label "vt2401" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e vt2401.x }
#
#     ******************************************************************
#
#                       "ST240" menu
#
.menu.term.m add cascade -label "ST240" -menu .menu.term.st240
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.st240
#
#                       "st2401" button
.menu.term.st240 add command -label "st2401" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e st2401.x }
#
#     ******************************************************************
#
#                       "TEK4014" menu
#
.menu.term.m add cascade -label "TEK4014" -menu .menu.term.tek4014
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.tek4014
#
#                       "tek40141" button
.menu.term.tek4014 add command -label "tek40141" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e tek40141.x }
#
#     ******************************************************************
#
#                       "TEK4100" menu
#
.menu.term.m add cascade -label "TEK4100" -menu .menu.term.tek4100
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.tek4100
#
#                       "tek41001" button
.menu.term.tek4100 add command -label "tek41001" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e tek41001.x }
#
#     ******************************************************************
#
#                       "TEK4107" menu
#
.menu.term.m add cascade -label "TEK4107" -menu .menu.term.tek4107
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.tek4107
#
#                       "tek41071" button
.menu.term.tek4107 add command -label "tek41071" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e tek41071.x }
#
#     ******************************************************************
#
#                       "TEK4115" menu
#
.menu.term.m add cascade -label "TEK4115" -menu .menu.term.tek4115
#
#     ------------------------------------------------------------------
#
                        menu .menu.term.tek4115
#
#                       "tek41151" button
.menu.term.tek4115 add command -label "tek41151" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e tek41151.x }
#
#     ******************************************************************
#
#                       "PROCESS" menu
#
menubutton .menu.process -text "PROCESS  " -menu .menu.process.m
#
#     ------------------------------------------------------------------
#
                        menu .menu.process.m
#
#                       "process1" button
.menu.process.m add command -label "process1" -command { \
exec xterm -rw -cr black -ms black -fg black -bg CadetBlue1 \
-sb -e process1.x }
#
#     ******************************************************************
#
#                       "More" menu
#
menubutton .menu.more -text "More" -menu .menu.more.m
#
#     ------------------------------------------------------------------
#
                        menu .menu.more.m
#
#                       "MENU Definitions" button
.menu.more.m add cascade -label "MENU Definitions" -menu .menu.more.defs
#
#     ------------------------------------------------------------------
#
                        menu .menu.more.defs
#
#                       "DEVICE" button
.menu.more.defs add command -label "DEVICE" -command \
{ mkDialog .modal {-text \
{The DEVICE menu invokes demonstrations of the PRL-DEVICE \
DEVICE object subprograms.  The DEVICE object is \
the parent object for all other PRL-DEVICE objects. \
} -aspect 450 -justify left} {OK {}}
}
#                       "FILEWRITER" button
.menu.more.defs add command -label "FILEWRITER" -command \
{ mkDialog .modal {-text \
{The FILEWRITER menu invokes demonstrations of the PRL-DEVICE \
FILEWRITER object subprograms.  The FILEWRITER object is \
a device to which communication is via an intermediate computer file. \
} -aspect 450 -justify left} {OK {}}
}
#                       "FRL" button
.menu.more.defs add command -label "FRL" -command \
{ mkDialog .modal {-text \
{The FRL menu invokes demonstrations of the PRL-DEVICE \
FRL object subprograms.  The FRL object is \
a Film Recorder Library filewriter (JSC only). \
} -aspect 450 -justify left} {OK {}}
}
#                       "HPLASER" button
.menu.more.defs add command -label "HPLASER" -command \
{ mkDialog .modal {-text \
{The HPLASER menu invokes demonstrations of the PRL-DEVICE \
HPLASER object subprograms.  The HPLASER object is \
a HP LaserJet Printer Control Language (PCL) filewriter. \
} -aspect 450 -justify left} {OK {}}
}
#                       "LN03LASER" button
.menu.more.defs add command -label "LN03LASER" -command \
{ mkDialog .modal {-text \
{The LN03LASER menu invokes demonstrations of the PRL-DEVICE \
LN03LASER object subprograms.  The LN03LASER object is \
a DEC LN03 Plus laser printer filewriter. \
} -aspect 450 -justify left} {OK {}}
}
#                       "POST" button
.menu.more.defs add command -label "POST" -command \
{ mkDialog .modal {-text \
{The POST menu invokes demonstrations of the PRL-DEVICE \
POST object subprograms.  The POST object is \
an Adobe PostScript printer filewriter. \
} -aspect 450 -justify left} {OK {}}
}
#                       "PRL" button
.menu.more.defs add command -label "PRL" -command \
{ mkDialog .modal {-text \
{The PRL menu invokes demonstrations of the PRL-DEVICE \
PRL object subprograms.  The PRL object is \
the grandparent object of all Programmer's Reusable Library objects. \
} -aspect 450 -justify left} {OK {}}
}
#                       "PROCESS" button
.menu.more.defs add command -label "PROCESS" -command \
{ mkDialog .modal {-text \
{The PROCESS menu invokes demonstrations of the PRL-DEVICE \
PROCESS object subprograms.  The PROCESS object is \
a single thread of control that executes within an address space. \
} -aspect 450 -justify left} {OK {}}
}
#                       "QMSLASER" button
.menu.more.defs add command -label "QMSLASER" -command \
{ mkDialog .modal {-text \
{The QMSLASER menu invokes demonstrations of the PRL-DEVICE \
QMSLASER object subprograms.  The QMSLASER object is \
a QMS laser printer file. \
} -aspect 450 -justify left} {OK {}}
}
#                       "ST240" button
.menu.more.defs add command -label "ST240" -command \
{ mkDialog .modal {-text \
{The ST240 menu invokes demonstrations of the PRL-DEVICE \
ST240 object subprograms.  The ST240 object is \
a SmartTerm 240 terminal. \
} -aspect 450 -justify left} {OK {}}
}
#                       "TEK4014" button
.menu.more.defs add command -label "TEK4014" -command \
{ mkDialog .modal {-text \
{The TEK4014 menu invokes demonstrations of the PRL-DEVICE \
TEK4014 object subprograms.  The TEK4014 object is \
a Tektronix 4014 terminal. \
} -aspect 450 -justify left} {OK {}}
}
#                       "TEK4100" button
.menu.more.defs add command -label "TEK4100" -command \
{ mkDialog .modal {-text \
{The TEK4100 menu invokes demonstrations of the PRL-DEVICE \
TEK4100 object subprograms.  The TEK4100 object is \
a Tektronix 4100-series terminal (i.e., 4107 or 4115). \
} -aspect 450 -justify left} {OK {}}
}
#                       "TEK4107" button
.menu.more.defs add command -label "TEK4107" -command \
{ mkDialog .modal {-text \
{The TEK4107 menu invokes demonstrations of the PRL-DEVICE \
TEK4107 object subprograms.  The TEK4107 object is \
a Tektronix 4107 terminal. \
} -aspect 450 -justify left} {OK {}}
}
#                       "TEK4115" button
.menu.more.defs add command -label "TEK4115" -command \
{ mkDialog .modal {-text \
{The TEK4115 menu invokes demonstrations of the PRL-DEVICE \
TEK4115 object subprograms.  The TEK4115 object is \
a Tektronix 4115 terminal. \
} -aspect 450 -justify left} {OK {}}
}
#                       "TEK4510" button
.menu.more.defs add command -label "TEK4510" -command \
{ mkDialog .modal {-text \
{The TEK4510 menu invokes demonstrations of the PRL-DEVICE \
TEK4510 object subprograms.  The TEK4510 object is \
a Tektronix 4510 inkjet printer filewriter. \
} -aspect 450 -justify left} {OK {}}
}
#                       "VECSAVE" button
.menu.more.defs add command -label "VECSAVE" -command \
{ mkDialog .modal {-text \
{The VECSAVE menu invokes demonstrations of the PRL-DEVICE \
VECSAVE object subprograms.  The VECSAVE object is \
a Vector Save filewriter. \
} -aspect 450 -justify left} {OK {}}
}
#                       "VT240" button
.menu.more.defs add command -label "VT240" -command \
{ mkDialog .modal {-text \
{The VT240 menu invokes demonstrations of the PRL-DEVICE \
VT240 object subprograms.  The VT240 object is \
a DEC VT240 terminal. \
} -aspect 450 -justify left} {OK {}}
}
#                       "XWIN" button
.menu.more.defs add command -label "XWIN" -command \
{ mkDialog .modal {-text \
{The XWIN menu invokes demonstrations of the PRL-DEVICE \
XWIN object subprograms.  The XWIN object is \
an X windows terminal. \
} -aspect 450 -justify left} {OK {}}
}
#     ******************************************************************
#
#                       Pack menus
#
pack .menu.demo \
     .menu.prl \
     .menu.device \
     .menu.fw \
     .menu.term \
     .menu.process \
     .menu.more -side left
#
#     ******************************************************************
#
#                       Set up for keyboard-based menu traversal
#
bind . <Any-FocusIn> {
    if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} {
	focus .menu
    }
}
tk_menuBar .menu .menu.demo \
           .menu.prl \
           .menu.device \
           .menu.fw \
           .menu.term \
           .menu.process \
           .menu.more
#
#     ******************************************************************
#
#                       Position a dialog box on the screen
#
proc dpos w {
    wm geometry $w +300+300
}
#
STOP_CAT
echo "  Generating =====> [ ./device1.f ]"
cat <<"STOP_CAT"> ././device1.f
C     PROGRAM DEVICE1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_INIT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              DEVICE Object Demo Program #1'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_INIT.'//
     * ' DEVICE_INIT must be used to initialize the PRL-DEVICE library'/
     * ' prior to invoking any other PRL-DEVICE subprograms.  Failure'/
     * ' to initialize the library will cause erroneous program'/
     * ' operation.'//
     * ' DEVICE_INIT was called before printing this message'/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device10.f ]"
cat <<"STOP_CAT"> ././device10.f
C     PROGRAM DEVICE10
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_ISCOLOR
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_ISCOLOR
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
      PARAMETER (NVV102 = 16)
      PARAMETER (NVV105 = 17)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101, TMP102, TMP104, KTYPP, TMP105, KOLOR, TMP107
C
C                       Real variables and arrays
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
      CHARACTER DSPL*8, TMP106*8
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
      INTEGER VV102(NVV102)
      INTEGER VV105(NVV105)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /15/
C
      DATA VV102 /0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15/
C
      DATA VV105 /0, 1,  2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
     *           15, 100/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_iscolor.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #10'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_ISCOLOR.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test DEVICE_ISCOLOR object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        MAXDEV = VV101(IVV101)
C
      DO 588 IVV102 = 1,NVV102
        IDEV = VV102(IVV102)
C
      DO 587 IVV105 = 1,NVV105
        KTYPP = VV105(IVV105)
C
C                       Determine if graphics device supports color
      CALL DEVICE_ISCOLOR (KTYPP,DSPL,KOLOR)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP104,TMP105,TMP106,
     *       TMP107
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (IDEV .NE. TMP102 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (NDCLRS .NE. TMP104 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (DSPL .NE. TMP106 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (KOLOR .NE. TMP107 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) MAXDEV,IDEV,NDCLRS,KTYPP,DSPL,KOLOR
  502 FORMAT (I21,I21,I21,I21,A,I21)
  503 CONTINUE
C
C                       Repeat for next variable value
  587 CONTINUE
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #10 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device2.f ]"
cat <<"STOP_CAT"> ././device2.f
C     PROGRAM DEVICE2
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access programs DEVICE_PROMPT and
C              DEVICE_END
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_PROMPT, DEVICE_END
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
      PARAMETER (NVV104 = 15)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101, TMP102, TMP103, KTYPE, TMP104
C
C                       Real variables and arrays
      REAL    XPAGE, TMP105, YPAGE, TMP106
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
      INTEGER VV104(NVV104)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /15/
C
      DATA VV104 /0, -2, -3, -4, -5, -6, -7, -8, -10, -11
     *            , -12, -13, -14, -15, 32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_prompt.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #2'/
     * ' This program tests the DEVICE object access programs'/
     * ' DEVICE_PROMPT and DEVICE_END.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A//
     * ' This program will generate several files with names such as'/
     * ' POST_LIS.  These are empty graphics output files that are'/
     * ' produced when testing the initialization of the various'/
     * ' graphics output devices.  These files may be deleted after'/
     * ' demo program has finished.'//
     * '                      Press <CR> to continue')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test DEVICE_PROMPT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        MAXDEV = VV101(IVV101)
C
      DO 588 IVV104 = 1,NVV104
        KTYPE = VV104(IVV104)
C
C                       Interactively select a graphics output device
      CALL DEVICE_PROMPT (KTYPE,XPAGE,YPAGE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP103,TMP104,TMP105,
     *       TMP106
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (KZERR .NE. TMP102 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (LUNOUT .NE. TMP103 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (.NOT. REAL_IDIF0(XPAGE ,TMP105 )) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (.NOT. REAL_IDIF0(YPAGE ,TMP106 )) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) MAXDEV,KZERR,LUNOUT,KTYPE,XPAGE,YPAGE
  502 FORMAT (I21,I21,I21,I21,E15.7,E15.7)
  503 CONTINUE
C
C                       Repeat for next variable value
      CALL DEVICE_END ()
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * ' Note:'/
     * ' In the above output, occasional strings of "garbage"'/
     * ' characters are normal,  They are the result of printing'/
     * ' Tektronix control code sequences to a non-Tektronix'/
     * ' terminal while exercising the Tektronix drivers.'//
     * '              DEVICE Demo Program #2 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device3.f ]"
cat <<"STOP_CAT"> ././device3.f
C     PROGRAM DEVICE3
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access programs DEVICE_SELECT and
C              DEVICE_RELEASE
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_SELECT, DEVICE_RELEASE
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 = 26)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER KTYPQ, TMP101
C
C                       Real variables and arrays
      REAL    XPAGE, TMP102, YPAGE, TMP103
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 / 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15,
     *            -2,-3,-4,-5,-6,-7,-8,-10,-11,-12,-13,-14,-15/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #3'/
     * ' This program tests the DEVICE object access programs'/
     * ' DEVICE_SELECT and DEVICE_RELEASE.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A//
     * ' This program will generate several files with names such as'/
     * ' POSTSC_LIS.  These are empty graphics output files that are'/
     * ' produced when testing the initialization of the various'/
     * ' graphics output devices.  These files may be deleted after'/
     * ' demo program has finished.'//
     * '                      Press <CR> to continue')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test DEVICE_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        KTYPQ = VV101(IVV101)
C
C                       Non-interactively select a graphics output
C                       device
      CALL DEVICE_SELECT (KTYPQ,XPAGE,YPAGE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP103
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (.NOT. REAL_IDIF0(XPAGE ,TMP102 )) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (.NOT. REAL_IDIF0(YPAGE ,TMP103 )) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) KTYPQ,XPAGE,YPAGE
  502 FORMAT (I21,E15.7,E15.7)
  503 CONTINUE
C
C                       Repeat for next variable value
      CALL DEVICE_RELEASE ()
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * ' Note:'/
     * ' In the above output, occasional strings of "garbage"'/
     * ' characters are normal,  They are the result of printing'/
     * ' Tektronix control code sequences to a non-Tektronix'/
     * ' terminal while exercising the Tektronix drivers.'//
     * '              DEVICE Demo Program #3 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device4.f ]"
cat <<"STOP_CAT"> ././device4.f
C     PROGRAM DEVICE4
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_STDIO
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_STDIO
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV103 =  3)
      PARAMETER (NVV104 =  3)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101, TMP102, IERR, TMP103, ISUM, TMP104
C
C                       Real variables and arrays
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV103(NVV103)
      INTEGER VV104(NVV104)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV103 /0, 99, 6/
C
      DATA VV104 /0, 99, 6/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_stdio.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #4'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_STDIO.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test DEVICE_STDIO object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV103 = 1,NVV103
        IERR = VV103(IVV103)
C
      DO 588 IVV104 = 1,NVV104
        ISUM = VV104(IVV104)
C
C                       Set logical unit for graphics status and error
C                       messages
      CALL DEVICE_STDIO (IERR,ISUM)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP103,TMP104
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (KZERR .NE. TMP101 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (KZSUM .NE. TMP102 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) KZERR,KZSUM,IERR,ISUM
  502 FORMAT (I21,I21,I21,I21)
  503 CONTINUE
C
C                       Repeat for next variable value
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #4 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device5.f ]"
cat <<"STOP_CAT"> ././device5.f
C     PROGRAM DEVICE5
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_ISFILEW
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_ISFILEW
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
      PARAMETER (NVV102 =  2)
      PARAMETER (NVV104 = 17)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101, TMP102, KTYPP, TMP104, KFILE, TMP105
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
      INTEGER VV102(NVV102)
      INTEGER VV104(NVV104)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /15/
C
      DATA VV102 /1, 15/
C
      DATA VV104 /0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
     *            32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_isfilew.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #5'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_ISFILEW.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test DEVICE_ISFILEW object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        MAXDEV = VV101(IVV101)
C
      DO 588 IVV102 = 1,NVV102
        IDEV = VV102(IVV102)
C
      DO 587 IVV104 = 1,NVV104
        KTYPP = VV104(IVV104)
C
C                       Determine if graphics device is a filewriter
      CALL DEVICE_ISFILEW (KTYPP,KFILE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP104,TMP105
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (IDEV .NE. TMP102 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ELSE IF (KFILE .NE. TMP105 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) MAXDEV,IDEV,KTYPP,KFILE
  502 FORMAT (I21,I21,I21,I21)
  503 CONTINUE
C
C                       Repeat for next variable value
  587 CONTINUE
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #5 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device6.f ]"
cat <<"STOP_CAT"> ././device6.f
C     PROGRAM DEVICE6
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_CLIPON
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_CLIPON
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_SELECT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101
C
C                       Real variables and arrays
      REAL    XPAGE, YPAGE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     None
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_clipon.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #6'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_CLIPON.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Set proper environment for access program
C                       under test
C
C                       Advance graphics package to level 1
      CALL DEVICE_SELECT (2,XPAGE,YPAGE)
C
C     ******************************************************************
C
C                       Test DEVICE_CLIPON object access program
C
C                       Loop for each input variable of access program
C     None
C                       Enable hardware clipping on current graphics
C                       device
      CALL DEVICE_CLIPON ()
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (KZHCLP .NE. TMP101 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) KZHCLP
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #6 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device7.f ]"
cat <<"STOP_CAT"> ././device7.f
C     PROGRAM DEVICE7
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_HWFUNC
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_HWFUNC
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_SELECT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV102 =  2)
      PARAMETER (NVV103 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101
C
C                       Real variables and arrays
      REAL    SWITCH, TMP102
      REAL    XPAGE, YPAGE
C
C                       Character variables and arrays
      CHARACTER FUNC*6, TMP103*6
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      REAL    VV102(NVV102)
      CHARACTER*6 VV103(NVV103)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV102 /0.0, 1.0/
C
      DATA VV103 /'COPY'/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_hwfunc.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #7'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_HWFUNC.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Set proper environment for access program
C                       under test
C
C                       Advance graphics package to level 1
      CALL DEVICE_SELECT (2,XPAGE,YPAGE)
C
C     ******************************************************************
C
C                       Test DEVICE_HWFUNC object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV102 = 1,NVV102
        SWITCH = VV102(IVV102)
C
      DO 588 IVV103 = 1,NVV103
        FUNC = VV103(IVV103)
C
C                       Enable hardware function on current graphics
C                       device
      CALL DEVICE_HWFUNC (SWITCH,FUNC)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP103
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (KZCOPY .NE. TMP101 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) KZCOPY,SWITCH,FUNC
  502 FORMAT (I21,E15.7,A)
  503 CONTINUE
C
C                       Repeat for next variable value
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #7 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device8.f ]"
cat <<"STOP_CAT"> ././device8.f
C     PROGRAM DEVICE8
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_FILLON
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_FILLON
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_SELECT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101
C
C                       Real variables and arrays
      REAL    XPAGE, YPAGE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     None
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_fillon.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #8'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_FILLON.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Set proper environment for access program
C                       under test
C
C                       Advance graphics package to level 1
      CALL DEVICE_SELECT (2,XPAGE,YPAGE)
C
C     ******************************************************************
C
C                       Test DEVICE_FILLON object access program
C
C                       Loop for each input variable of access program
C     None
C                       Enable hardware area fill on current graphics
C                       device
      CALL DEVICE_FILLON ()
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (KZSHD .NE. TMP101 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) KZSHD
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Repeat for next variable value
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #8 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device9.f ]"
cat <<"STOP_CAT"> ././device9.f
C     PROGRAM DEVICE9
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program DEVICE_TEXTON
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       DEVICE object access program
      EXTERNAL DEVICE_TEXTON
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_SELECT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'DEVICE.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101
C
C                       Real variables and arrays
      REAL    XPAGE, YPAGE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     None
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'device_texton.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              DEVICE Object Demo Program #9'/
     * ' This program tests the DEVICE object access program'/
     * ' DEVICE_TEXTON.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Set proper environment for access program
C                       under test
C
C                       Advance graphics package to level 1
      CALL DEVICE_SELECT (2,XPAGE,YPAGE)
C
C     ******************************************************************
C
C                       Test DEVICE_TEXTON object access program
C
C                       Loop for each input variable of access program
C     None
C                       Enable hardware text string drawing on current
C                       graphics device
      CALL DEVICE_TEXTON ()
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (KZTXT .NE. TMP101 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) KZTXT
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Repeat for next variable value
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              DEVICE Demo Program #9 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./device_clipon.dat ]"
cat <<"STOP_CAT"> ././device_clipon.uuu
begin 660 ./device_clipon.dat
6("`@("`@("`@("`@("`@("`@,3$Q"O^_
`
end
STOP_CAT
echo "  Generating =====> [ ./device_fillon.dat ]"
cat <<"STOP_CAT"> ././device_fillon.uuu
begin 660 ./device_fillon.dat
6("`@("`@("`@("`@("`@("`@,3$Q"O^_
`
end
STOP_CAT
echo "  Generating =====> [ ./device_hwfunc.dat ]"
cat <<"STOP_CAT"> ././device_hwfunc.uuu
begin 660 ./device_hwfunc.dat
M("`@("`@("`@("`@("`@("`@,C(R("`@+C`P,#`P,#!%*S`P0T]062`@"B`@
I("`@("`@("`@("`@("`@(#$Q,2`@("XQ,#`P,#`P12LP,4-/4%D@(`H@
`
end
STOP_CAT
echo "  Generating =====> [ ./device_iscolor.dat ]"
cat <<"STOP_CAT"> ././device_iscolor.uuu
begin 660 ./device_iscolor.dat
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@
M("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`P("`@("`@
M("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`P("`@
M("`@("`@("`@("`@("`@("`Q```````````@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+
M-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`P("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T
M*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`P("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@
M("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`P("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@
M("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@
M("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@("`@
M("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@,C4U("`@("`@
M("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`P("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-2
M3"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`P("`@
M("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`Q*$A03%-23"D@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R
M*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@
M("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,C4U("`@("`@
M("`@("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@
M("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,C4U("`@
M("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A0
M3%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`P
M("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`Q*$A03%-23"D@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@
M("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@
M("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K
M*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@,C4U("`@
M("`@("`@("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`R
M("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I
M("`@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@,C4U
M("`@("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U
M*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`R("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`Q*$A03%-23"D@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@
M("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@
M("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@
M("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.
M,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@("`@,C4U
M("`@("`@("`@("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`S("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S
M*%@I("`@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@("`@
M,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M(#$U*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`S("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`T("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q*$A03%-23"D@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`T("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`T("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@("`@("`@,C4U("`@("`@
M("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T
M,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T
M("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$92
M3"D@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`T("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q
M*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@("`@("`@
M,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`T("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@
M(#$S*%@I("`@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@("`@
M("`@,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`T("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@(#$U*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`T("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q*$A03%-23"D@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q
M-2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@,C4U("`@
M("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94
M+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y
M*$923"D@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@("`@("`@
M("`@,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`U("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@
M("`@(#$S*%@I("`@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@("`@
M("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@(#$U*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q*$A03%-23"D@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`S*$9I;&4I
M("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U*%1+
M-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@,C4U
M("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`V("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`W
M*%94+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`V("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@
M("`Y*$923"D@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`V("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@
M("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/4U130RD@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@
M("`@("`@(#$S*%@I("`@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@
M("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@(#$U*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,3`P("`@("`@("`@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q*$A03%-2
M3"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`S*$9I
M;&4I("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`W("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`U
M*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@
M,C4U("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`W("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`W*%94+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`W("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@
M("`@("`Y*$923"D@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@
M("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/4U130RD@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@
M("`@("`@("`@(#$S*%@I("`@("`@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@
M("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/4U13,2D@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@(#$U*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,3`P("`@("`@
M("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q*$A0
M3%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`X("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`S
M*$9I;&4I("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`X("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@
M("`@,C4U("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`X("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`W*%94+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@
M("`@("`@("`Y*$923"D@("`@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X("`@("`@
M("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/4U130RD@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@,C4U("`@("`@
M("`@("`@("`@("`@(#$S*%@I("`@("`@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X("`@
M("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/4U13
M,2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`X("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@(#$U*$A03%-23"D@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`X
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,3`P("`@
M("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`Y("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q
M*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`Y("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`S*$9I;&4I("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`Y("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@
M("`@("`@,C4U("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`W*%94+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@
M("`@("`@("`@("`Y*$923"D@("`@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P-RD@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Y("`@
M("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/4U13
M0RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@,C4U("`@
M("`@("`@("`@("`@("`@(#$S*%@I("`@("`@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Y
M("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$T*%!/
M4U13,2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@(#$U*$A03%-23"D@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`Y("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@,3`P
M("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$P("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`Q*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$P("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@
M("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`X*%-4+3(T,"D@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@("`W("`@("`@
M("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+-#$P
M-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P
M("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$R*%!/
M4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@,C4U
M("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$P("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$T
M*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-23"D@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$P("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`Q*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@
M("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q,"D@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`X*%-4+3(T
M,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@("`W("`@
M("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P*%1+
M-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$Q("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$R
M*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@
M,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$Q("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@
M(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-23"D@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$Q("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@("`Q*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!4T52*2`@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@
M("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@("`V*%1+-#4Q
M,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`X*%-4
M+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@("`W
M("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$R("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$P
M*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$R("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@
M(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@("`@
M("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$R("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@
M("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$R("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-23"D@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$R("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@
M("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@("`Q*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q-"D@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!4T52
M*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@("`@
M(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S
M("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@("`V*%1+
M-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`X
M*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@
M("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$S("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$S("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@
M("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@("`@
M("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@
M("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$S("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-23"D@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$S("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@
M("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@("`Q*$A03%-23"D@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+-#`Q
M-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T*$Q!
M4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@("`@
M("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$T("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@("`V
M*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@
M("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@("`@
M("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$T("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@
M("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@("`@
M("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$T("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@
M("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@
M("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@("`@
M("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@("`@
M("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@
M("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$T("`@("`@
M("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-23"D@
M("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$T("`@("`@("`@("`@("`@("`@("`Q("`@("`@
M("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`P("`@("`@
M("`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`Q*$A03%-23"D@("`@("`@("`@("`@("`@("`@
M(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`R*%1+
M-#`Q-"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q
M("`@("`@("`@("`@("`@("`@("`S*$9I;&4I("`@("`@("`@("`@("`@("`@
M("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`T
M*$Q!4T52*2`@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$U("`@("`@("`@("`@("`@("`@("`U*%1+-#$Q-2D@("`@("`@("`@("`@
M("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@
M("`V*%1+-#4Q,"D@("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@
M("`@("`Q("`@("`@("`@("`@("`@("`@("`W*%94+3(T,"D@("`@("`@("`@
M("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@
M("`@("`X*%-4+3(T,"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`W("`@("`@("`@("`@("`@("`@("`Y*$923"D@("`@("`@("`@
M("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@(#$P*%1+-#$P-RD@("`@("`@("`@("`@("`@("`@(#(*("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$Q*$Q.,#,K*2`@("`@
M("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@,C4U("`@("`@("`@
M("`@("`@("`@(#$R*%!/4U130RD@("`@("`@("`@("`@("`@("`@(#(*("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@
M("`@("`@("`@("`@,C4U("`@("`@("`@("`@("`@("`@(#$S*%@I("`@("`@
M("`@("`@("`@("`@("`@("`@(#(*("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@,C4U("`@("`@
M("`@("`@("`@("`@(#$T*%!/4U13,2D@("`@("`@("`@("`@("`@("`@(#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U*$A03%-2
M3"D@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@,3`P("`@("`@("`@("`@("`@("`@("`@("`@("`@
#(#$*
`
end
STOP_CAT
echo "  Generating =====> [ ./device_isfilew.dat ]"
cat <<"STOP_CAT"> ././device_isfilew.uuu
begin 660 ./device_isfilew.dat
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`P"B`@("`@
M("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`@,2`@("`@("`@
M("`@("`@("`@("`@,2`@("`@("`@("`@("`@("`@("`@,`H@("`@("`@("`@
M("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@(#$@("`@("`@("`@("`@
M("`@("`@(#(@("`@("`@("`@("`@("`@("`@(#`*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M("`S("`@("`@("`@("`@("`@("`@("`Q"B`@("`@("`@("`@("`@("`@("`Q
M-2`@("`@("`@("`@("`@("`@("`@,2`@("`@("`@("`@("`@("`@("`@-"`@
M("`@("`@("`@("`@("`@("`@,0H@("`@("`@("`@("`@("`@("`@,34@("`@
M("`@("`@("`@("`@("`@(#$@("`@("`@("`@("`@("`@("`@(#4@("`@("`@
M("`@("`@("`@("`@(#`*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@
M("`@("`@("`Q"B`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@
M("`@("`@,2`@("`@("`@("`@("`@("`@("`@-R`@("`@("`@("`@("`@("`@
M("`@,`H@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@
M(#$@("`@("`@("`@("`@("`@("`@(#@@("`@("`@("`@("`@("`@("`@(#`*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`Y("`@("`@("`@("`@("`@("`@("`Q"B`@("`@
M("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`@,2`@("`@("`@
M("`@("`@("`@("`Q,"`@("`@("`@("`@("`@("`@("`@,`H@("`@("`@("`@
M("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@(#$@("`@("`@("`@("`@
M("`@("`@,3$@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@
M(#$R("`@("`@("`@("`@("`@("`@("`Q"B`@("`@("`@("`@("`@("`@("`Q
M-2`@("`@("`@("`@("`@("`@("`@,2`@("`@("`@("`@("`@("`@("`Q,R`@
M("`@("`@("`@("`@("`@("`@,`H@("`@("`@("`@("`@("`@("`@,34@("`@
M("`@("`@("`@("`@("`@(#$@("`@("`@("`@("`@("`@("`@,30@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@
M("`@("`@("`Q"B`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@
M("`@("`@,2`@("`@("`@("`@("`@("`S,C<V-R`@("`@("`@("`@("`@("`@
M("`@,`H@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@
M,34@("`@("`@("`@("`@("`@("`@(#`@("`@("`@("`@("`@("`@("`@(#`*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@("`Q("`@("`@("`@("`@("`@("`@("`Q"B`@("`@
M("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@
M("`@("`@("`@("`@,B`@("`@("`@("`@("`@("`@("`@,`H@("`@("`@("`@
M("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@
M("`@("`@(#,@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M("`T("`@("`@("`@("`@("`@("`@("`Q"B`@("`@("`@("`@("`@("`@("`Q
M-2`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`@-2`@
M("`@("`@("`@("`@("`@("`@,`H@("`@("`@("`@("`@("`@("`@,34@("`@
M("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@(#8@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`W("`@("`@("`@("`@
M("`@("`@("`P"B`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@
M("`@("`Q-2`@("`@("`@("`@("`@("`@("`@."`@("`@("`@("`@("`@("`@
M("`@,`H@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@
M,34@("`@("`@("`@("`@("`@("`@(#D@("`@("`@("`@("`@("`@("`@(#$*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@
M("`@("`@("`@("`@("`@(#$P("`@("`@("`@("`@("`@("`@("`P"B`@("`@
M("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@
M("`@("`@("`@("`Q,2`@("`@("`@("`@("`@("`@("`@,0H@("`@("`@("`@
M("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@
M("`@("`@,3(@("`@("`@("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@
M(#$S("`@("`@("`@("`@("`@("`@("`P"B`@("`@("`@("`@("`@("`@("`Q
M-2`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`Q-"`@
M("`@("`@("`@("`@("`@("`@,0H@("`@("`@("`@("`@("`@("`@,34@("`@
M("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@,34@("`@("`@
M("`@("`@("`@("`@(#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@(#$U("`@("`@("`@("`@("`@(#,R-S8W("`@("`@("`@("`@
*("`@("`@("`P"C$U
`
end
STOP_CAT
echo "  Generating =====> [ ./device_prompt.dat ]"
cat <<"STOP_CAT"> ././device_prompt.uuu
begin 660 ./device_prompt.dat
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@
M("`@("`@("`@("`@("`@("TQ("`@("`@("`@("`@("`@("`@(#$S("`@+C$S
M-CDP,#!%*S`R("`@+C$P.34P,#!%*S`R"B`@("`@("`@("`@("`@("`@("`Q
M-2`@("`@("`@("`@("`@("`@("`@-B`@("`@("`@("`@("`@("`@("`M,2`@
M("`@("`@("`@("`@("`@("`@,B`@("XQ-#(X,#`P12LP,B`@("XQ,#@W,#`P
M12LP,@H@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@
M(#8@("`@("`@("`@("`@("`@("`@,3$@("`@("`@("`@("`@("`@("`@(#,@
M("`N,3$P,#`P,$4K,#(@("`N.#4P,#`P,$4K,#$*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@
M(#$Q("`@("`@("`@("`@("`@("`@("`T("`@+C$Q,#`P,#!%*S`R("`@+C@U
M,#`P,#!%*S`Q"B`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@
M("`@("`@-B`@("`@("`@("`@("`@("`@("`Q,2`@("`@("`@("`@("`@("`@
M("`@-2`@("XQ-#`P,#`P12LP,B`@("XQ,#4P,#`P12LP,@H@("`@("`@("`@
M("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@(#8@("`@("`@("`@("`@
M("`@("`@,3$@("`@("`@("`@("`@("`@("`@(#8@("`N,3$P,#`P,$4K,#(@
M("`N.#4P,#`P,$4K,#$*("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@
M("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@
M("`@("`@("`W("`@+C$T,C@P,#!%*S`R("`@+C$P.#<P,#!%*S`R"B`@("`@
M("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@("`@("`@-B`@("`@("`@
M("`@("`@("`@("`Q,2`@("`@("`@("`@("`@("`@("`@."`@("XQ-#(X,#`P
M12LP,B`@("XQ,#@W,#`P12LP,@H@("`@("`@("`@("`@("`@("`@,34@("`@
M("`@("`@("`@("`@("`@(#8@("`@("`@("`@("`@("`@("`@,3$@("`@("`@
M("`@("`@("`@("`@,3`@("`N,3,V.3`P,$4K,#(@("`N,3`Y-3`P,$4K,#(*
M("`@("`@("`@("`@("`@("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@
M("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@("`@(#$Q("`@+C$P
M,#`P,#!%*S`R("`@+C<U.3`P,#!%*S`Q"B`@("`@("`@("`@("`@("`@("`Q
M-2`@("`@("`@("`@("`@("`@("`@-B`@("`@("`@("`@("`@("`@("`Q,2`@
M("`@("`@("`@("`@("`@("`Q,B`@("XQ,#(U,#`P12LP,B`@("XW-S4P,#`P
M12LP,0H@("`@("`@("`@("`@("`@("`@,34@("`@("`@("`@("`@("`@("`@
M(#8@("`@("`@("`@("`@("`@("`@,3$@("`@("`@("`@("`@("`@("`@,3,@
M("`N,3,V.3`P,$4K,#(@("`N,3`Y-3`P,$4K,#(*("`@("`@("`@("`@("`@
M("`@(#$U("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@("`@("`@
M(#$Q("`@("`@("`@("`@("`@("`@(#$T("`@+C$P,C4P,#!%*S`R("`@+C<W
M-3`P,#!%*S`Q"B`@("`@("`@("`@("`@("`@("`Q-2`@("`@("`@("`@("`@
M("`@("`@-B`@("`@("`@("`@("`@("`@("`Q,2`@("`@("`@("`@("`@("`@
C("`Q-2`@("XQ,3`P,#`P12LP,B`@("XX-3`P,#`P12LP,0H@
`
end
STOP_CAT
echo "  Generating =====> [ ./device_select.dat ]"
cat <<"STOP_CAT"> ././device_select.uuu
begin 660 ./device_select.dat
M("`@("`@("`@("`@("`@("`@("`R("`@+C$T,C@P,#!%*S`R("`@+C$P.#<P
M,#!%*S`R"B`@("`@("`@("`@("`@("`@("`@,R`@("XQ,3`P,#`P12LP,B`@
M("XX-3`P,#`P12LP,0H@("`@("`@("`@("`@("`@("`@(#0@("`N,3$P,#`P
M,$4K,#(@("`N.#4P,#`P,$4K,#$*("`@("`@("`@("`@("`@("`@("`U("`@
M+C$T,#`P,#!%*S`R("`@+C$P-3`P,#!%*S`R"B`@("`@("`@("`@("`@("`@
M("`@-B`@("XQ,3`P,#`P12LP,B`@("XX-3`P,#`P12LP,0H@("`@("`@("`@
M("`@("`@("`@(#<@("`N,30R.#`P,$4K,#(@("`N,3`X-S`P,$4K,#(*("`@
M("`@("`@("`@("`@("`@("`X("`@+C$T,C@P,#!%*S`R("`@+C$P.#<P,#!%
M*S`R"B`@("`@("`@("`@("`@("`@("`Q,"`@("XQ,S8Y,#`P12LP,B`@("XQ
M,#DU,#`P12LP,@H@("`@("`@("`@("`@("`@("`@,3$@("`N,3`P,#`P,$4K
M,#(@("`N-S4Y,#`P,$4K,#$*("`@("`@("`@("`@("`@("`@(#$R("`@+C$P
M,C4P,#!%*S`R("`@+C<W-3`P,#!%*S`Q"B`@("`@("`@("`@("`@("`@("`Q
M,R`@("XQ,S8Y,#`P12LP,B`@("XQ,#DU,#`P12LP,@H@("`@("`@("`@("`@
M("`@("`@,30@("`N,3`R-3`P,$4K,#(@("`N-S<U,#`P,$4K,#$*("`@("`@
M("`@("`@("`@("`@(#$U("`@+C$Q,#`P,#!%*S`R("`@+C@U,#`P,#!%*S`Q
M"B`@("`@("`@("`@("`@("`@("`M,B`@("XQ-#(X,#`P12LP,B`@("XQ,#@W
M,#`P12LP,@H@("`@("`@("`@("`@("`@("`@+3,@("`N,3$P,#`P,$4K,#(@
M("`N.#4P,#`P,$4K,#$*("`@("`@("`@("`@("`@("`@("TT("`@+C$Q,#`P
M,#!%*S`R("`@+C@U,#`P,#!%*S`Q"B`@("`@("`@("`@("`@("`@("`M-2`@
M("XQ-#`P,#`P12LP,B`@("XQ,#4P,#`P12LP,@H@("`@("`@("`@("`@("`@
M("`@+38@("`N,3$P,#`P,$4K,#(@("`N.#4P,#`P,$4K,#$*("`@("`@("`@
M("`@("`@("`@("TW("`@+C$T,C@P,#!%*S`R("`@+C$P.#<P,#!%*S`R"B`@
M("`@("`@("`@("`@("`@("`M."`@("XQ-#(X,#`P12LP,B`@("XQ,#@W,#`P
M12LP,@H@("`@("`@("`@("`@("`@("`M,3`@("`N,3,V.3`P,$4K,#(@("`N
M,3`Y-3`P,$4K,#(*("`@("`@("`@("`@("`@("`@+3$Q("`@+C$P,#`P,#!%
M*S`R("`@+C<U.3`P,#!%*S`Q"B`@("`@("`@("`@("`@("`@("TQ,B`@("XQ
M,#(U,#`P12LP,B`@("XW-S4P,#`P12LP,0H@("`@("`@("`@("`@("`@("`M
M,3,@("`N,3,V.3`P,$4K,#(@("`N,3`Y-3`P,$4K,#(*("`@("`@("`@("`@
M("`@("`@+3$T("`@+C$P,C4P,#!%*S`R("`@+C<W-3`P,#!%*S`Q"B`@("`@
M("`@("`@("`@("`@("TQ-2`@("XQ,3`P,#`P12LP,B`@("XX-3`P,#`P12LP
",0H@
`
end
STOP_CAT
echo "  Generating =====> [ ./device_stdio.dat ]"
cat <<"STOP_CAT"> ././device_stdio.uuu
begin 660 ./device_stdio.dat
M("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`P("`@
M("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`P"B`@("`@
M("`@("`@("`@("`@("`@,"`@("`@("`@("`@("`@("`@("`Y.2`@("`@("`@
M("`@("`@("`@("`@,"`@("`@("`@("`@("`@("`@("`Y.0H@("`@("`@("`@
M("`@("`@("`@(#`@("`@("`@("`@("`@("`@("`@(#8@("`@("`@("`@("`@
M("`@("`@(#`@("`@("`@("`@("`@("`@("`@(#8*("`@("`@("`@("`@("`@
M("`@(#DY("`@("`@("`@("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@
M(#DY("`@("`@("`@("`@("`@("`@("`P"B`@("`@("`@("`@("`@("`@("`Y
M.2`@("`@("`@("`@("`@("`@("`Y.2`@("`@("`@("`@("`@("`@("`Y.2`@
M("`@("`@("`@("`@("`@("`Y.0H@("`@("`@("`@("`@("`@("`@.3D@("`@
M("`@("`@("`@("`@("`@(#8@("`@("`@("`@("`@("`@("`@.3D@("`@("`@
M("`@("`@("`@("`@(#8*("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@
M("`@("`@("`@("`P("`@("`@("`@("`@("`@("`@("`V("`@("`@("`@("`@
M("`@("`@("`P"B`@("`@("`@("`@("`@("`@("`@-B`@("`@("`@("`@("`@
M("`@("`Y.2`@("`@("`@("`@("`@("`@("`@-B`@("`@("`@("`@("`@("`@
M("`Y.0H@("`@("`@("`@("`@("`@("`@(#8@("`@("`@("`@("`@("`@("`@
M(#8@("`@("`@("`@("`@("`@("`@(#8@("`@("`@("`@("`@("`@("`@(#8*
`
end
STOP_CAT
echo "  Generating =====> [ ./device_texton.dat ]"
cat <<"STOP_CAT"> ././device_texton.uuu
begin 660 ./device_texton.dat
6("`@("`@("`@("`@("`@("`@,3$Q"O^_
`
end
STOP_CAT
echo "  Generating =====> [ ./filewriter1.f ]"
cat <<"STOP_CAT"> ././filewriter1.f
C     PROGRAM FILEWRITER1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program FILEWRITER_PRINT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       FILEWRITER object access program
      EXTERNAL FILEWRITER_PRINT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  3)
      PARAMETER (NVV102 =  1)
      PARAMETER (NVV103 =  1)
C
C                       Argument maximum array sizes
      PARAMETER (MX101 = 1)
      PARAMETER (MX102 = 1)
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'FILEWRITER.INC'
C
C                       Integer variables and arrays
      INTEGER TMP101(MX101), ISPARE, TMP103
C
C                       Real variables and arrays
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
      CHARACTER TMP102(MX102)*30
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
      CHARACTER*30 VV102(NVV102)
      INTEGER VV103(NVV103)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /0, 32767, -32767/
C
      DATA VV102 /'POST_LIS'/
C
      DATA VV103 /-32768/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'filewriter_print.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              FILEWRITER Object Demo Program #1'/
     * ' This program tests the FILEWRITER object access program'/
     * ' FILEWRITER_PRINT.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A//
     * ' The FILEWRITER_PRINT access program does not produce output'/
     * ' values but, rather, allows the user to interactively print'/
     * ' graphics output files during execution of the graphics'/
     * ' application program.  You may wish to run this demo several'/
     * ' times, responding to the prompts differently each time, to'/
     * ' become familiar with the various interactive prompts.'//
     * '                      Press <CR> to continue')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test FILEWRITER_PRINT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        NPLTS(1) = VV101(IVV101)
C
      DO 588 IVV102 = 1,NVV102
        FILNM(1) = VV102(IVV102)
C
      DO 587 IVV103 = 1,NVV103
        ISPARE = VV103(IVV103)
C
C                       Print graphics output files during program
C                       execution
      CALL FILEWRITER_PRINT (ISPARE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP103
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) NPLTS(1),FILNM(1),ISPARE
  502 FORMAT (I21,A,I21)
  503 CONTINUE
C
C                       Repeat for next variable value
  587 CONTINUE
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              FILEWRITER Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./filewriter2.f ]"
cat <<"STOP_CAT"> ././filewriter2.f
C     PROGRAM FILEWRITER2
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program FILEWRITER_MENU
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       FILEWRITER object access program
      EXTERNAL FILEWRITER_MENU
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
C     None
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
C     None
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              FILEWRITER Object Demo Program #2'/
     * ' This program tests the FILEWRITER object access program'/
     * ' FILEWRITER_MENU.'/
     * ' This access program has no input values.  It simply displays'/
     * ' a list of the supported graphics filewriter output devices'/
     * ' for use in writing application programs that do customzed'/
     * ' graphics prompting.'/
     * '                      Press <CR> to continue')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test FILEWRITER_MENU object access program
C
C                       Display menu of graphics filewriter devices
      CALL FILEWRITER_MENU ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              FILEWRITER Demo Program #2 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./filewriter3.f ]"
cat <<"STOP_CAT"> ././filewriter3.f
C     PROGRAM FILEWRITER3
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program FILEWRITER_STAT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       FILEWRITER object access program
      EXTERNAL FILEWRITER_STAT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
      PARAMETER (NVV102 =  3)
C
C                       Argument maximum array sizes
      PARAMETER (MX101 = 1)
      PARAMETER (MX102 = 1)
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Private variables and arrays
      INCLUDE 'FILEWRITER.INC'
C
C                       Integer variables and arrays
      INTEGER TMP102(MX102)
C
C                       Real variables and arrays
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
      CHARACTER TMP101(MX101)*30
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      CHARACTER*30 VV101(NVV101)
      INTEGER VV102(NVV102)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /'POST_LIS'/
C
      DATA VV102 /0, 32767, -32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'filewriter_stat.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              FILEWRITER Object Demo Program #3'/
     * ' This program tests the FILEWRITER object access program'/
     * ' FILEWRITER_STAT.'/
     * ' The input variables are varied through a wide range of'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A//
     * ' The FILEWRITER_STAT access program does not produce output'/
     * ' values but, rather, prints a summary of graphics output'/
     * ' files produced during the run as of the time it is called.'//
     * '                      Press <CR> to continue')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test FILEWRITER_STAT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        FILNM(1) = VV101(IVV101)
C
      DO 588 IVV102 = 1,NVV102
        NPLTS(1) = VV102(IVV102)
C
C                       Print message listing the number and type of
C                       graphics output files created
      CALL FILEWRITER_STAT ()
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) FILNM(1),NPLTS(1)
  502 FORMAT (A,I21)
  503 CONTINUE
C
C                       Repeat for next variable value
  588 CONTINUE
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (/' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              FILEWRITER Demo Program #3 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./filewriter_print.dat ]"
cat <<"STOP_CAT"> ././filewriter_print.uuu
begin 660 ./filewriter_print.dat
M("`@("`@("`@("`@("`@("`@("`P4$]35%],25,@("`@("`@("`@("`@("`@
M("`@("`@("`@("`@("`@("`@("`@+3,R-S8X"B`@("`@("`@("`@("`@("`S
M,C<V-U!/4U1?3$E3("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("TS,C<V.`H@("`@("`@("`@("`@("`M,S(W-C=03U-47TQ)4R`@("`@
G("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`M,S(W-C@*
`
end
STOP_CAT
echo "  Generating =====> [ ./filewriter_stat.dat ]"
cat <<"STOP_CAT"> ././filewriter_stat.uuu
begin 660 ./filewriter_stat.dat
M4$]35%],25,@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`P"E!/4U1?3$E3("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`@("`S,C<V-PI03U-47TQ)4R`@("`@("`@("`@("`@("`@("`@("`@
5("`@("`@("`@("`@("`M,S(W-C<*
`
end
STOP_CAT
echo "  Generating =====> [ ./frl1.f ]"
cat <<"STOP_CAT"> ././frl1.f
C     PROGRAM FRL1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program FRL_SELECT and
C              FRL_RESTART
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       FRL object access program
      EXTERNAL FRL_SELECT, FRL_RESTART
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN, PXFUNL
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     Computed by PXFOPN
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'frl_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              FRL Object Demo Program #1'/
     * ' This program tests the FRL object access programs'/
     * ' FRL_SELECT and FRL_RESTART.'/
     * ' The FRL_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended to it if FRL_RESTART'/
     * ' is not called, or the contents will be overwritten if'/
     * ' FRL_RESTART is called prior to invoking FRL_SELECT.  See'/
     * ' the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test FRL_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'frl.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the Film Recorder Lab filewriter
C                       device
      CALL FRL_SELECT (IUNIT)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL FRL_RESTART
C                       Repeat for next variable value
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              FRL Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./frl2.f ]"
cat <<"STOP_CAT"> ././frl2.f
C     PROGRAM FRL2
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program FRL_USERS
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       FRL object access program
      EXTERNAL FRL_USERS
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER ISPARE, TMP101
C
C                       Real variables and arrays
C
C                       Double precision variables and arrays
C
C                       Complex variables and arrays
C
C                       Logical variables and arrays
C
C                       Character variables and arrays
      CHARACTER INFO*60, TMP102*60
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'frl_users.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              FRL Object Demo Program #2'/
     * ' This program tests the FRL object access program'/
     * ' FRL_USERS.'/
     * ' This access program reads information about the user from'/
     * ' the Film Recorder Lab User Database.  If an entry for the'/
     * ' user is not found, an interactive query for the desired'/
     * ' information is performed.  The results of the interaction'/
     * ' and the program input may be inspected in the file'/
     * ' ',A//
     * ' Note that the Film Recorder Lab driver is specific to'/
     * ' Johnson Space Center.'//
     * '                      Press <CR> to continue')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test FRL_USERS object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        ISPARE = VV101(IVV101)
C
C                       Access the Film Recorder Lab user data base
      CALL FRL_USERS (ISPARE,INFO)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102
C
C                       Compare output with previously-computed values
C                       and write to error device if they do not match
        IF (INFO .NE. TMP102 ) THEN
          IO = IER
          IOK = 1
          GOTO 501
        ENDIF
C                       Test combination matches previous results
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) ISPARE,INFO
  502 FORMAT (I21,A)
  503 CONTINUE
C
C                       Repeat for next variable value
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              FRL Demo Program #2 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./frl_select.dat ]"
cat <<"STOP_CAT"> ././frl_select.uuu
begin 660 ./frl_select.dat
L("`@("`@("`@("`@("`@("`@(#$Q"B`@("`@("`@("`@("`@("`@("`Q,0J,
`
end
STOP_CAT
echo "  Generating =====> [ ./frl_users.dat ]"
cat <<"STOP_CAT"> ././frl_users.uuu
begin 660 ./frl_users.dat
M("`@("`@("`@("`@("`@(#,R-S8W<FEC:R`@("`@("`@4DE#2$%21"!.+B!,
E551/5U-+22`@("`@("`@("`@2$$@("`@("`U-30M-S8Q-R`Q"D%2
`
end
STOP_CAT
echo "  Generating =====> [ ./hplaser1.f ]"
cat <<"STOP_CAT"> ././hplaser1.f
C     PROGRAM HPLASER1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program HPLASER_SELECT and
C              HPLASER_RESTART
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       HPLASER object access program
      EXTERNAL HPLASER_SELECT, HPLASER_RESTART
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN, PXFUNL
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
      PARAMETER (NVV102 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101, ISPARE, TMP102
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV102(NVV102)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
      DATA VV102 /32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'hplaser_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              HPLASER Object Demo Program #1'/
     * ' This program tests the HPLASER object access program'/
     * ' HPLASER_SELECT and HPLASER_RESTART.'/
     * ' The HPLASER_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended if HPLASER_RESTART'/
     * ' is not called, or the contents will be overwritten if'/
     * ' HPLASER_RESTART is called prior to invoking HPLASER_SELECT.'/
     * ' See the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test HPLASER_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
      DO 588 IVV102 = 1,NVV102
        ISPARE = VV102(IVV102)
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'hplaser.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the HP LaserJet filewriter device
      CALL HPLASER_SELECT (IUNIT,ISPARE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT,ISPARE
  502 FORMAT (I21,I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL HPLASER_RESTART
C                       Repeat for next variable value
  588 CONTINUE
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              HPLASER Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./hplaser_select.dat ]"
cat <<"STOP_CAT"> ././hplaser_select.uuu
begin 660 ./hplaser_select.dat
M("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@(#,R-S8W"B`@
I("`@("`@("`@("`@("`@("`Q,2`@("`@("`@("`@("`@("`S,C<V-PHW
`
end
STOP_CAT
echo "  Generating =====> [ ./ln03laser1.f ]"
cat <<"STOP_CAT"> ././ln03laser1.f
C     PROGRAM LN03LASER1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program LN03LASER_SELECT and
C              LN03LASER_RESTART
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       LN03LASER object access program
      EXTERNAL LN03LASER_SELECT, LN03LASER_RESTART
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN, PXFUNL
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     Computed by PXFOPN
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'ln03laser_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              LN03LASER Object Demo Program #1'/
     * ' This program tests the LN03LASER object access program'/
     * ' LN03LASER_SELECT and LN03LASER_RESTART.'/
     * ' The LN03LASER_SELECT program opens a specific device type in'/
     * ' a non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended if LN03LASER_RESTART'/
     * ' is not called, or the contents will be overwritten if'/
     * ' LN03LASER_RESTART is called prior to LN03LASER_SELECT.  See'/
     * ' the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test LN03LASER_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'ln03laser.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the DEC LN03 Plus filewriter device
      CALL LN03LASER_SELECT (IUNIT)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL LN03LASER_RESTART
C
C                       Repeat for next variable value
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              LN03LASER Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./ln03laser_select.dat ]"
cat <<"STOP_CAT"> ././ln03laser_select.uuu
begin 660 ./ln03laser_select.dat
L("`@("`@("`@("`@("`@("`@(#$Q"B`@("`@("`@("`@("`@("`@("`Q,0J`
`
end
STOP_CAT
echo "  Generating =====> [ ./post1.f ]"
cat <<"STOP_CAT"> ././post1.f
C     PROGRAM POST1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program POST_SELECT1 and
C              POST_RESTART1
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       POST object access program
      EXTERNAL POST_SELECT1, POST_RESTART1
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN, PXFUNL
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     Computed by PXFOPN
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'post_select1.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              POST Object Demo Program #1'/
     * ' This program tests the POST object access program'/
     * ' POST_SELECT1 and POST_RESTART1.'/
     * ' The POST_SELECT1 program opens a specific device type in a'/
     * ' non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended if POST_RESTART1'/
     * ' is not called, or the contents will be overwritten if'/
     * ' POST_RESTART1 is called prior to invoking POST_SELECT1.'/
     * ' See the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test POST_SELECT1 object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'postsc.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the PostScript Level I filewriter
C                       device
      CALL POST_SELECT1 (IUNIT)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL POST_RESTART1
C
C                       Repeat for next variable value
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              POST Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./post2.f ]"
cat <<"STOP_CAT"> ././post2.f
C     PROGRAM POST1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program POST_SELECT2 and
C              POST_RESTART2
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       POST object access program
      EXTERNAL POST_SELECT2, POST_RESTART2
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN, PXFUNL
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     Computed by PXFOPN
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'postsc_select2.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              POST Object Demo Program #2'/
     * ' This program tests the POST object access program'/
     * ' POST_SELECT2 and POST_RESTART2.'/
     * ' The POST_SELECT2 program opens a specific device type in a'/
     * ' non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended if POST_RESTART2'/
     * ' is not called, or the contents will be overwritten if'/
     * ' POST_RESTART2 is called prior to invoking POST_SELECT2.'/
     * ' See the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test POST_SELECT2 object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'postsc.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the PostScript Level I filewriter
C                       device
      CALL POST_SELECT2 (IUNIT)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL POST_RESTART2
C
C                       Repeat for next variable value
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              POST Demo Program #2 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./post_select1.dat ]"
cat <<"STOP_CAT"> ././post_select1.uuu
begin 660 ./post_select1.dat
L("`@("`@("`@("`@("`@("`@(#$Q"B`@("`@("`@("`@("`@("`@("`Q,0J(
`
end
STOP_CAT
echo "  Generating =====> [ ./postsc_select2.dat ]"
cat <<"STOP_CAT"> ././postsc_select2.uuu
begin 660 ./postsc_select2.dat
L("`@("`@("`@("`@("`@("`@(#$Q"B`@("`@("`@("`@("`@("`@("`Q,0J$
`
end
STOP_CAT
echo "  Generating =====> [ ./prl1.f ]"
cat <<"STOP_CAT"> ././prl1.f
C     PROGRAM PRL1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program PRL_LIBVER
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
      INTRINSIC INDEX,LEN
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       POSIX object access programs
      EXTERNAL POSIX_INIT
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
      PARAMETER (MAXVER=9)
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERSQ(MAXVER)
      CHARACTER*80 STRING
C
C                       Required PRL version number (update DATA value
C                       when program updated to new version of library)
      DATA VERSQ /'0.7     ',
     2            '0.6     ',
     3            '0.6.10  ',
     4            '0.7.1   ',
     5            '0.8     ',
     6            '0.8.1   ',
     9            '1.6     ',
     7            '1.7     ',
     8            '1.8     '/
C
C     ******************************************************************
C
C                       STEP 1 - Initialize library
C
      CALL POSIX_INIT (0)
C
C     ******************************************************************
C
C                       Write demo program introduction message
C
C                       Write intro message
C                       (use * for logical unit since TERM_SETSIO will
C                       not be called in this demo)
      WRITE (*,401)
  401 FORMAT (
     * '                   PRL "PRL1" Object Demo Program'//
     * ' PRL_LIBVER should be used to check the version of the'/
     * ' Programmer''s Reusable Library being used and print the'/
     * ' following types of WARNING or ERROR messages if the'/
     * ' version is not correct.')
C
C     ******************************************************************
C
C                       STEP 2 - Check PRL version
C
C                       Loop for each test case
      DO 200 IVER=1,MAXVER
C
C                       Get actual PRL version being used
C                       but do not perform check
      CALL PRL_LIBVER (VERAQ,' ')
C
C                       Compare actual & required major release numbers
      LOCAQ = INDEX (VERAQ,'.')
      LOCRQ = INDEX (VERSQ(IVER),'.')
      LENAQ = LEN (VERAQ)
      LENRQ = LEN (VERSQ(IVER))
      IF (VERAQ(1:LOCAQ) .NE. VERSQ(IVER)(1:LOCRQ)) THEN
        WRITE (*,213) VERAQ,VERSQ(IVER)
  213   FORMAT (/
     *  ' SAMPLE MESSAGE FOR INCORRECT LIBRARY VERSION:'/
     *  ' ERROR: Incompatible version of Programmer''s Reusable Library'
     *  /' Program is using version ',A,'but requires version ',A)
        GOTO 200
C
C                       Compare actual & reqd secondary release numbers
      ELSE IF (VERAQ(LOCAQ+1:LENAQ) .LT.
     *         VERSQ(IVER)(LOCRQ+1:LENRQ)) THEN
        WRITE (*,223) VERAQ,VERSQ(IVER)
  223   FORMAT (/
     *   ' SAMPLE MESSAGE FOR OUT-OF-DATE LIBRARY VERSION:'/
     *   ' WARNING: Old version of Programmer''s Reusable Library'/
     *   ' Program is using version ',A,'but requires version ',A)
C                       Print message for acceptable version
      ELSE
        WRITE (*,233) VERAQ,VERSQ(IVER)
  233   FORMAT (/
     *   ' NO MESSAGE PRINTED WHEN LIBRARY VERSION IS ACCEPTABLE:'/
     *   ' (Program is using version ',A,'and requires version ',A,' )')
      ENDIF
  200 CONTINUE
C
C     ******************************************************************
C
C                       STEP 5 - Terminate program execution
C                       Wait until user presses a key before exiting
C
      WRITE (*,810)
  810 FORMAT (/
     * '                 Demo Program PRL1 Execution Completed'/
     * '                         Press <CR> to exit demo')
      READ (*,811) STRING
  811 FORMAT (A)
C                       Exit demo
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./process1.f ]"
cat <<"STOP_CAT"> ././process1.f
C     PROGRAM PROCESS1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program PROCESS_EXIT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       POSIX object access programs
      EXTERNAL POSIX_INIT
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
      CHARACTER*80 STRING
C
C     ******************************************************************
C
C                       STEP 1 - Initialize library
C
      CALL POSIX_INIT (0)
C
C     ******************************************************************
C
C                       Write demo program introduction message
C
C                       Write intro message
C                       (use * for logical unit since TERM_SETSIO will
C                       not be called in this demo)
      WRITE (*,401)
  401 FORMAT (
     * '                PRL-POSIX "PROCESS" Object Demo Program #1'//
     * ' PROCESS_EXIT may be used to terminate execution of programs'/
     * ' that use the PRL-POSIX library.  PROCESS_EXIT will be used'/
     * ' to exit from this demo after you press the Carriage Return'/
     * ' or Enter key <CR>.')
C
C     ******************************************************************
C
C                       STEP 5 - Terminate program execution
C                       Wait until user presses a key before exiting
C
      WRITE (*,810)
  810 FORMAT (/
     * '                 Demo Program PROCESS1 Execution Completed'/
     * '                         Press <CR> to exit demo')
      READ (*,811) STRING
  811 FORMAT (A)
C                       Exit demo
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./qmslaser1.f ]"
cat <<"STOP_CAT"> ././qmslaser1.f
C     PROGRAM QMSLASER1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program QMSLASER_SELECT and
C              QMSLASER_RESTART
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       QMSLASER object access program
      EXTERNAL QMSLASER_SELECT, QMSLASER_RESTART
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN, PXFUNL
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
      PARAMETER (NVV102 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101, ISPARE, TMP102
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV102(NVV102)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV102 /32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'qmslaser_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              QMSLASER Object Demo Program #1'/
     * ' This program tests the QMSLASER object access program'/
     * ' QMSLASER_SELECT and QMSLASER_RESTART.'/
     * ' The QMSLASER_SELECT program opens a specific device type in'/
     * ' a non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended if QMSLASER_RESTART'/
     * ' is not called, or the contents will be overwritten if'/
     * ' QMSLASER_RESTART is called prior to invoking QMSLASER_SELECT.'/
     * ' See the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test QMSLASER_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
      DO 588 IVV102 = 1,NVV102
        ISPARE = VV102(IVV102)
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'qmslaser.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the QMS laser filewriter device
      CALL QMSLASER_SELECT (IUNIT,ISPARE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT,ISPARE
  502 FORMAT (I21,I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL QMSLASER_RESTART
C                       Repeat for next variable value
  588 CONTINUE
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              QMSLASER Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./qmslaser_select.dat ]"
cat <<"STOP_CAT"> ././qmslaser_select.uuu
begin 660 ./qmslaser_select.dat
M("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@(#,R-S8W"B`@
I("`@("`@("`@("`@("`@("`Q,2`@("`@("`@("`@("`@("`S,C<V-PHW
`
end
STOP_CAT
echo "  Generating =====> [ ./skeleton.f ]"
cat <<"STOP_CAT"> ././skeleton.f
C     PROGRAM SKELETON
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate use of PRL-DEVICE library
C
C     LOCAL VARIABLES:
C
C
C     NOTES:
C       1. This is a program skeleton that may be used for development
C          of any program that uses the PRL-DEVICE library.  Customize
C          to your needs by retaining desired lines.
C
C       2. Steps 1 through 2 must be performed first in sequence, and
C          step  6 must be performed last.  Other steps may be mixed
C          as necessary.
C
C     ******************************************************************
C
C     INTRINSIC
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_CLIPON, DEVICE_END, DEVICE_FILLON, DEVICE_HWFUNC
     *        , DEVICE_INIT, DEVICE_ISCOLOR, DEVICE_ISFILEW
     *        , DEVICE_PROMPT, DEVICE_RELEASE, DEVICE_SELECT
     *        , DEVICE_STDIO, DEVICE_TEXTON
C
C                       FILEWRITER object access programs
      EXTERNAL FILEWRITER_MENU, FILEWRITER_PRINT, FILEWRITER_STAT
C
C                       FRL object access programs
      EXTERNAL FRL_RESTART, FRL_SELECT, FRL_USERS
C
C                       HPLASER object access programs
      EXTERNAL HPLASER_RESTART, HPLASER_SELECT
C
C                       LN03LASER object access programs
      EXTERNAL LN03LASER_RESTART, LN03LASER_SELECT
C
C                       POST object access programs
      EXTERNAL POST_RESTART1, POST_RESTART2, POST_SELECT1
     *        , POST_SELECT2
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       QMSLASER object access programs
      EXTERNAL QMSLASER_RESTART, QMSLASER_SELECT
C
C                       ST240 object access programs
      EXTERNAL ST240_SELECT
C
C                       TEK4014 object access programs
      EXTERNAL TEK4014_SELECT
C
C                       TEK4100 object access programs
      EXTERNAL TEK4100_SELECT
C
C                       TEK4107 object access programs
      EXTERNAL TEK4107_SELECT
C
C                       TEK4115 object access programs
      EXTERNAL TEK4115_SELECT
C
C                       TEK4510 object access programs
      EXTERNAL TEK4510_RESTART, TEK4510_SELECT
C
C                       VECSAVE object access programs
      EXTERNAL VECSAVE_SELECT
C
C                       VT240 object access programs
      EXTERNAL VT240_SELECT
C
C                       XWIN object access programs
      EXTERNAL XWIN_SELECT
C
C     ------------------------------------------------------------------
C
C                       Integer variables and arrays
      INTEGER ISCOPE, KTYPP, KOLOR, KFILE, KTYPE, KTYPQ, IERR, ISUM
     *        , ISPARE, IUNIT, JSPARE, JDEV
C
C                       Real variables and arrays
      REAL SWITCH, XPAGE, YPAGE
C
C                       Double precision variables and arrays
C     DOUBLE PRECISION
C
C                       Complex variables and arrays
C     COMPLEX
C
C                       Logical variables and arrays
C     LOGICAL
C
C                       Character variables and arrays
      CHARACTER INFO*60, VERAQ*8, FUNC*6, DSPL*8, VERRQ*8
C
C                       Program required PRL version (update DATA value
C                       when program updated to new version of library)
      DATA VERRQ /'0.7     '/
C
C     ******************************************************************
C
C                       STEP 1  - Initialize the library
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_INIT object access program
C
C                       Initialize the PRL-DEVICE library
C     ISCOPE =
      CALL DEVICE_INIT (ISCOPE)
C
C     ******************************************************************
C
C                       STEP 2  - Check the Programmer's Reusable
C                       Library version
C
C     ------------------------------------------------------------------
C
C                       Use PRL_LIBVER object access program
C
C                       Return the version of the Programmer's Reusable
C                       Librar
C     VERRQ =
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       STEP 3  - Initialize a graphics device
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_ISCOLOR object access program
C
C                       Determine if graphics device supports color
C     KTYPP =
      CALL DEVICE_ISCOLOR (KTYPP,DSPL,KOLOR)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_PROMPT object access program
C
C                       Interactively select a graphics output device
C     KTYPE =
      CALL DEVICE_PROMPT (KTYPE,XPAGE,YPAGE)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_ISFILEW object access program
C
C                       Determine if graphics device is a filewriter
C     KTYPP =
      CALL DEVICE_ISFILEW (KTYPP,KFILE)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_SELECT object access program
C
C                       Non-interactively select a graphics output
C                       device
C     KTYPQ =
      CALL DEVICE_SELECT (KTYPQ,XPAGE,YPAGE)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_STDIO object access program
C
C                       Set logical unit for graphics status and error
C                       messages
C     IERR =
C     ISUM =
      CALL DEVICE_STDIO (IERR,ISUM)
C
C     ------------------------------------------------------------------
C
C                       Use FILEWRITER_MENU object access program
C
C                       Display menu of graphics filewriter devices
      CALL FILEWRITER_MENU ()
C
C     ------------------------------------------------------------------
C
C                       Use FRL_SELECT object access program
C
C                       Initialize the Film Recorder Lab filewriter
C                       device
C     IUNIT =
      CALL FRL_SELECT (IUNIT)
C
C     ------------------------------------------------------------------
C
C                       Use FRL_USERS object access program
C
C                       Access the Film Recorder Lab user data base
C     ISPARE =
      CALL FRL_USERS (ISPARE,INFO)
C
C     ------------------------------------------------------------------
C
C                       Use HPLASER_SELECT object access program
C
C                       Initialize the HP LaserJet filewriter device
C     IUNIT =
C     ISPARE =
      CALL HPLASER_SELECT (IUNIT,ISPARE)
C
C     ------------------------------------------------------------------
C
C                       Use LN03LASER_SELECT object access program
C
C                       Initialize the DEC LN03 Plus filewriter device
C     IUNIT =
      CALL LN03LASER_SELECT (IUNIT)
C
C     ------------------------------------------------------------------
C
C                       Use POST_SELECT1 object access program
C
C                       Initialize the PostScript Level I filewriter
C                       device
C     IUNIT =
      CALL POST_SELECT1 (IUNIT)
C
C     ------------------------------------------------------------------
C
C                       Use POST_SELECT2 object access program
C
C                       Initialize the PostScript Level II filewriter
C                       device
C     IUNIT =
      CALL POST_SELECT2 (IUNIT)
C
C     ------------------------------------------------------------------
C
C                       Use QMSLASER_SELECT object access program
C
C                       Initialize the QMS laser filewriter device
C     IUNIT =
C     ISPARE =
      CALL QMSLASER_SELECT (IUNIT,ISPARE)
C
C     ------------------------------------------------------------------
C
C                       Use ST240 object access programs
C
C                       Initialize the SmarTerm 240 graphics terminal
C                       device
      CALL ST240_SELECT ()
C
C     ------------------------------------------------------------------
C
C                       Use TEK4014 object access programs
C
C                       Initialize the Tektronix 4014 graphics terminal
C                       device
C     ISPARE =
C     JSPARE =
      CALL TEK4014_SELECT (ISPARE,JSPARE)
C
C     ------------------------------------------------------------------
C
C                       Use TEK4100 object access programs
C
C                       Initialize a Tektronix 4100-series graphics
C                       terminal device
C     JDEV =
      CALL TEK4100_SELECT (JDEV)
C
C     ------------------------------------------------------------------
C
C                       Use TEK4107 object access programs
C
C                       Initialize the Tektronix 4107 graphics terminal
C                       device
C     ISPARE =
      CALL TEK4107_SELECT (ISPARE)
C
C     ------------------------------------------------------------------
C
C                       Use TEK4115 object access programs
C
C                       Initialize the Tektronix 4115 graphics terminal
C                       device
C     ISPARE =
      CALL TEK4115_SELECT (ISPARE)
C
C     ------------------------------------------------------------------
C
C                       Use TEK4510 object access programs
C
C                       Trigger opening of new Tektronix 4510 graphics
C                       output file
      CALL TEK4510_RESTART ()
C
C                       Initialize the Tektronix 4510 inkjet filewriter
C                       device
C     IUNIT =
C     ISPARE =
C     JSPARE =
      CALL TEK4510_SELECT (IUNIT,ISPARE,JSPARE)
C
C     ------------------------------------------------------------------
C
C                       Use VECSAVE object access programs
C
C                       Initialize the Vector Save filewriter device
C     IUNIT =
      CALL VECSAVE_SELECT (IUNIT)
C
C     ------------------------------------------------------------------
C
C                       Use VT240 object access programs
C
C                       Initialize the DEC VT240 graphics terminal
C                       device
C     ISPARE =
C     JSPARE =
      CALL VT240_SELECT (ISPARE,JSPARE)
C
C     ------------------------------------------------------------------
C
C                       Use XWIN object access programs
C
C                       Initialize the X11R5 X windows graphics terminal
C                       device
      CALL XWIN_SELECT ()
C
C     ******************************************************************
C
C                       STEP 4  - Invoke library objects as needed
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_ISCOLOR object access program
C
C                       Determine if graphics device supports color
C     KTYPP =
      CALL DEVICE_ISCOLOR (KTYPP,DSPL,KOLOR)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_ISFILEW object access program
C
C                       Determine if graphics device is a filewriter
C     KTYPP =
      CALL DEVICE_ISFILEW (KTYPP,KFILE)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_CLIPON object access program
C
C                       Enable hardware clipping on current graphics
C                       device
      CALL DEVICE_CLIPON ()
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_FILLON object access program
C
C                       Enable hardware area fill on current graphics
C                       device
      CALL DEVICE_FILLON ()
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_HWFUNC object access program
C
C                       Enable hardware function on current graphics
C                       device
C     SWITCH =
C     FUNC =
      CALL DEVICE_HWFUNC (SWITCH,FUNC)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_STDIO object access program
C
C                       Set logical unit for graphics status and error
C                       messages
C     IERR =
C     ISUM =
      CALL DEVICE_STDIO (IERR,ISUM)
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_TEXTON object access program
C
C                       Enable hardware text string drawing on current
C                       graphics device
      CALL DEVICE_TEXTON ()
C
C     ------------------------------------------------------------------
C
C                       Use FILEWRITER object access programs
C
C                       Display menu of graphics filewriter devices
      CALL FILEWRITER_MENU ()
C
C                       Print message listing the number and type of
C                       graphics output files created
      CALL FILEWRITER_STAT ()
C
C     ------------------------------------------------------------------
C
C                       Use FRL_RESTART object access program
C
C                       Trigger opening of new Film Recorder Lab
C                       graphics output file
      CALL FRL_RESTART ()
C
C     ------------------------------------------------------------------
C
C                       Use HPLASER_RESTART object access program
C
C                       Trigger opening of new HP LaserJet graphics
C                       output file
      CALL HPLASER_RESTART ()
C
C     ------------------------------------------------------------------
C
C                       Use LN03LASER_RESTART object access program
C
C                       Trigger opening of new DEC LN03 Plus graphics
C                       output file
      CALL LN03LASER_RESTART ()
C
C     ------------------------------------------------------------------
C
C                       Use POST_RESTART1 object access program
C
C                       Trigger opening of new PostScript Level I
C                       graphics output file
      CALL POST_RESTART1 ()
C
C     ------------------------------------------------------------------
C
C                       Use POST_RESTART2 object access program
C
C                       Trigger opening of new PostScript Level II
C                       graphics output file
      CALL POST_RESTART2 ()
C
C     ------------------------------------------------------------------
C
C                       Use QMSLASER_RESTART object access program
C
C                       Trigger opening of new QMS laser graphics output
C                       file
      CALL QMSLASER_RESTART ()
C
C     ******************************************************************
C
C                       STEP 5  - Release the graphics device
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_RELEASE object access program
C
C                       Release the current graphics device
      CALL DEVICE_RELEASE ()
C
C     ------------------------------------------------------------------
C
C                       Use DEVICE_END object access program
C
C                       End plotting and release the current graphics
C                       device
      CALL DEVICE_END ()
C
C     ------------------------------------------------------------------
C
C                       Use FILEWRITER_PRINT object access program
C
C                       Print graphics output files during program
C                       execution
C     ISPARE =
      CALL FILEWRITER_PRINT (ISPARE)
C
C     ******************************************************************
C
C                       STEP 6  - Use PRL-POSIX to terminate program
C                       execution
C
C     ------------------------------------------------------------------
C
C                       Use PROCESS_EXIT object access program
C
C                       Silently terminate process execution
      CALL PROCESS_EXIT ()
      END
STOP_CAT
echo "  Generating =====> [ ./st2401.f ]"
cat <<"STOP_CAT"> ././st2401.f
C     PROGRAM ST2401
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program ST240_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       ST240 object access program
      EXTERNAL ST240_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
C     None
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              ST240 Object Demo Program #1'/
     * ' This program tests the ST240 object access program'/
     * ' ST240_SELECT.'/
     * ' The ST240_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  No input is required.'/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test ST240_SELECT object access program
C
C                       Loop for each input variable of access program
C                       Initialize the SmarTerm 240 graphics terminal
C                       device
      CALL ST240_SELECT ()
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              ST240 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./tek40141.f ]"
cat <<"STOP_CAT"> ././tek40141.f
C     PROGRAM TEK40141
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program TEK4014_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       TEK4014 object access program
      EXTERNAL TEK4014_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
      PARAMETER (NVV102 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER ISPARE, JSPARE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
      INTEGER VV102(NVV102)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /32767/
C
      DATA VV102 /-32768/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              TEK4014 Object Demo Program #1'/
     * ' This program tests the TEK4014 object access program'/
     * ' TEK4014_SELECT.'/
     * ' The TEK4014_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  No input is required.'/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test TEK4014_SELECT object access program
C
C                       Initialize the Tektronix 4014 graphics terminal
C                       device
      ISPARE = VV101(NVV101)
      JSPARE = VV102(NVV102)
      CALL TEK4014_SELECT (ISPARE,JSPARE)
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              TEK4014 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./tek41001.f ]"
cat <<"STOP_CAT"> ././tek41001.f
C     PROGRAM TEK41001
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program TEK4100_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       TEK4100 object access program
      EXTERNAL TEK4100_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER JDEV, TMP101
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /4115, 4107/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'tek4100_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              TEK4100 Object Demo Program #1'/
     * ' This program tests the TEK4100 object access program'/
     * ' TEK4100_SELECT. The TEK4100_SELECT program opens a specific'/
     * ' device type in a non-interactive manner.'/
     * ' The input variables are varied through a wide range of valid'/
     * ' combinations.  The results for each combination are compared'/
     * ' to previously-computed results stored on file, and any '/
     * ' differences are displayed.  If no results file is found, the'/
     * ' computed results are saved in a file named'/
     * ' ',A//
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test TEK4100_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
        JDEV = VV101(IVV101)
C
C                       Initialize a Tektronix 4100-series graphics
C                       terminal device
      CALL TEK4100_SELECT (JDEV)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) JDEV
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Repeat for next variable value
  589 CONTINUE
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (//
     * ' Note:'/
     * ' In the above output, occasional strings of "garbage"'/
     * ' characters are normal,  They are the result of printing'/
     * ' Tektronix control code sequences to a non-Tektronix'/
     * ' terminal.'//
     * '              TEK4100 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./tek4100_select.dat ]"
cat <<"STOP_CAT"> ././tek4100_select.uuu
begin 660 ./tek4100_select.dat
L("`@("`@("`@("`@("`@("`T,3$U"B`@("`@("`@("`@("`@("`@-#$P-PJ$
`
end
STOP_CAT
echo "  Generating =====> [ ./tek41071.f ]"
cat <<"STOP_CAT"> ././tek41071.f
C     PROGRAM TEK41071
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program TEK4107_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       TEK4107 object access program
      EXTERNAL TEK4107_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER ISPARE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              TEK4107 Object Demo Program #1'/
     * ' This program tests the TEK4107 object access program'/
     * ' TEK4107_SELECT.'/
     * ' The TEK4107_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  No input is required.'//
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test TEK4107_SELECT object access program
C
C                       Initialize the Tektronix 4107 graphics terminal
C                       device
      ISPARE = VV101(NVV101)
      CALL TEK4107_SELECT (ISPARE)
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (//
     * ' Note:'/
     * ' In the above output, occasional strings of "garbage"'/
     * ' characters are normal,  They are the result of printing'/
     * ' Tektronix control code sequences to a non-Tektronix'/
     * ' terminal while exercising the Tektronix drivers.'//
     * '              TEK4107 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./tek41151.f ]"
cat <<"STOP_CAT"> ././tek41151.f
C     PROGRAM TEK4115
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program TEK4115_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       TEK4115 object access program
      EXTERNAL TEK4115_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER ISPARE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /32767/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              TEK4115 Object Demo Program #1'/
     * ' This program tests the TEK4115 object access program'/
     * ' TEK4115_SELECT.'/
     * ' The TEK4115_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  No input is required.'//
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test TEK4115_SELECT object access program
C
C                       Initialize the Tektronix 4115 graphics terminal
C                       device
      ISPARE = VV101(NVV101)
      CALL TEK4115_SELECT (ISPARE)
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (//
     * ' Note:'/
     * ' In the above output, occasional strings of "garbage"'/
     * ' characters are normal,  They are the result of printing'/
     * ' Tektronix control code sequences to a non-Tektronix'/
     * ' terminal while exercising the Tektronix drivers.'//
     * '              TEK4115 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./tek45101.f ]"
cat <<"STOP_CAT"> ././tek45101.f
C     PROGRAM TEK45101
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program TEK4510_SELECT and
C              TEK4510_RESTART
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       TEK4510 object access program
      EXTERNAL TEK4510_SELECT, TEK4510_RESTART
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
      PARAMETER (NVV102 =  1)
      PARAMETER (NVV103 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101, ISPARE, TMP102, JSPARE, TMP103
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV102(NVV102)
      INTEGER VV103(NVV103)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV102 /32767/
C
      DATA VV103 /-32768/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'tek4510_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              TEK4510 Object Demo Program #1'/
     * ' This program tests the TEK4510 object access program'/
     * ' TEK4510_SELECT.'/
     * ' The TEK4510_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended if TEK4510_RESTART'/
     * ' is not called, or the contents will be overwritten if'/
     * ' TEK4510_RESTART is called prior to invoking TEK4510_SELECT.'/
     * ' See the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test TEK4510_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
      ISPARE = VV102(NVV102)
      JSPARE = VV103(NVV103)
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'tek4510.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the Tektronix 4510 inkjet filewriter
C                       device
      CALL TEK4510_SELECT (IUNIT,ISPARE,JSPARE)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101,TMP102,TMP103
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT,ISPARE,JSPARE
  502 FORMAT (I21,I21,I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C                       Trigger overwriting of existing graphics
C                       output file
      CALL TEK4510_RESTART
C
C                       Repeat for next variable value
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              TEK4510 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./tek4510_select.dat ]"
cat <<"STOP_CAT"> ././tek4510_select.uuu
begin 660 ./tek4510_select.dat
M("`@("`@("`@("`@("`@("`@(#$Q("`@("`@("`@("`@("`@(#,R-S8W("`@
M("`@("`@("`@("`@+3,R-S8X"B`@("`@("`@("`@("`@("`@("`Q,2`@("`@
F("`@("`@("`@("`S,C<V-R`@("`@("`@("`@("`@("TS,C<V.`HQ
`
end
STOP_CAT
echo "  Generating =====> [ ./vecsave1.f ]"
cat <<"STOP_CAT"> ././vecsave1.f
C     PROGRAM VECSAVE1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program VECSAVE_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       VECSAVE object access program
      EXTERNAL VECSAVE_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       REAL object access programs
      EXTERNAL REAL_IDIF0, REAL_SETTOL
      LOGICAL  REAL_IDIF0
C
C                       DBL object access programs
      EXTERNAL DBL_IDIF0, DBL_SETTOL
      LOGICAL  DBL_IDIF0
C
C                       CMPLX object access programs
      EXTERNAL CMPLX_IDIF0
      LOGICAL  CMPLX_IDIF0
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C                       FILE object access programs
      EXTERNAL PXFCLS, PXFOPN
C
C                       PCONS object access programs
      EXTERNAL IPXCON
      INTEGER  IPXCON
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       REAL subtraction tolerance
      PARAMETER (TOLER=0.00001)
C                       DBL subtraction tolerance
      DOUBLE PRECISION DTOLER
      PARAMETER (DTOLER=1.0D-13)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  2)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER IUNIT, TMP101
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER, IFILE, IO
C
C                       Name of results file for the access program
      CHARACTER*(40) FILNAM, GROUT
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
C     Computed by PXFOPN
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C                       REAL subtraction tolerance
      CALL REAL_SETTOL (TOLER)
C
C                       DBL subtraction tolerance
      CALL DBL_SETTOL (DTOLER)
C
C     ******************************************************************
C
C                       Print introduction message
C
C                       Set file pathname
      FILNAM = 'vecsave_select.dat'
C
      WRITE (IOUT,301) FILNAM
  301 FORMAT (
     * '              VECSAVE Object Demo Program #1'/
     * ' This program tests the VECSAVE object access program'/
     * ' VECSAVE_SELECT.'/
     * ' The VECSAVE_SELECT program opens a specific device type in'/
     * ' a non-interactive manner.  The user must open a graphics'/
     * ' output file prior to invoking the access program.  If a file'/
     * ' already exists, output will be appended to it.  See'/
     * ' the demo program code for details.  The access program'/
     * ' input may be inspected in the file '/
     * ' ',A/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Open test results file
C
C                       Open read-only
      IOPFLG = IPXCON ('O_RDONLY')
C
C                       Assume file exists and open read-only
      CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IRESLT)
C
C                       If file does not exist,
C                       create and open read/write
      IF (IRESLT .NE. 0) THEN
        IF (IRESLT .EQ. IPXCON('ENOENT')) THEN
C                       Open read-only
          IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *            +IPXCON ('O_CREAT')
C                       Create file and open read/write
          CALL PXFOPN (FILNAM,0,IOPFLG,0,IFILE,IERROR)
C
C                       If error creating and opening file,
C                       print error message and exit
          IF (IERROR .NE. 0) THEN
            WRITE (IER,409) FILNAM
  409       FORMAT (' Error opening results file ',A)
            GOTO 900
          ENDIF
C                       Print message that file is being created
          WRITE (IOUT,411) FILNAM
  411     FORMAT (' Creating file ',A)
          IOK = 1
C
C                       If error opening existing file,
C                       print error message and exit
        ELSE
          WRITE (IER,409) FILNAM
          GOTO 900
        ENDIF
      ENDIF
C
C     ******************************************************************
C
C                       Test VECSAVE_SELECT object access program
C
C                       Loop for each input variable of access program
      DO 589 IVV101 = 1,NVV101
C
C     ------------------------------------------------------------------
C
C                       Set proper environment for access program
C                       under test
C
C                       Set graphics output file pathname
      GROUT = 'vecsave.outfil'
C
C                       Open graphics output file read-write
      IOPFLG = IPXCON ('O_RDWR')
C                       Allow file creation
     *        +IPXCON ('O_CREAT')
C                       Create file and open read/write
      CALL PXFOPN (GROUT,0,IOPFLG,0,IUNIT,IERROR)
C
C     ------------------------------------------------------------------
C
C                       Initialize the Vector Save filewriter device
      CALL VECSAVE_SELECT (IUNIT)
C
C                       Read input and output variable values from file
      IF (IRESLT .EQ. 0) THEN
        READ (IFILE,502,ERR=610) TMP101
        GOTO 503
C
C                       Write input and output variable values to file
      ELSE
        IO = IFILE
        GOTO 501
      ENDIF
C                       Write input and output variable values
C                       to file or error device
  501 CONTINUE
      WRITE (IO,502,ERR=612) IUNIT
  502 FORMAT (I21)
  503 CONTINUE
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C                       Repeat for next variable value
  589 CONTINUE
C                       Delete graphics output file
      CALL PXFUNL (GROUT,0,IERR)
C
C     ******************************************************************
C
C                       Print program status message
C
      IF (IOK .EQ. 0) THEN
        WRITE (IOUT,601)
  601   FORMAT (' Program results identical to file values')
      ENDIF
      GOTO 700
C
  610 WRITE (IER,611) FILNAM
  611 FORMAT (' Error reading file ',A)
      GOTO 700
C
  612 WRITE (IER,613) FILNAM
  613 FORMAT (' Error writing file ',A)
C
C     ******************************************************************
C
C                       Close test results file
C
C                       Close file
  700 CALL PXFCLS (IFILDS,IERROR)
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              VECSAVE Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
  900 CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./vecsave_select.dat ]"
cat <<"STOP_CAT"> ././vecsave_select.uuu
begin 660 ./vecsave_select.dat
L("`@("`@("`@("`@("`@("`@(#$Q"B`@("`@("`@("`@("`@("`@("`Q,0J$
`
end
STOP_CAT
echo "  Generating =====> [ ./vt2401.f ]"
cat <<"STOP_CAT"> ././vt2401.f
C     PROGRAM VT2401
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program VT240_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       VT240 object access program
      EXTERNAL VT240_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C                       Number of input variable test values
      PARAMETER (NVV101 =  1)
      PARAMETER (NVV102 =  1)
C
C                       Argument maximum array sizes
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
      INTEGER ISPARE, JSPARE
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
      INTEGER VV101(NVV101)
      INTEGER VV102(NVV102)
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C                       Input variable test values
      DATA VV101 /32767/
C
      DATA VV102 /-32768/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              VT240 Object Demo Program #1'/
     * ' This program tests the VT240 object access program'/
     * ' VT240_SELECT.'/
     * ' The VT240_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  No input is required.'/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test VT240_SELECT object access program
C
C                       Initialize the Tektronix 4014 graphics terminal
C                       device
      ISPARE = VV101(NVV101)
      JSPARE = VV102(NVV102)
      CALL VT240_SELECT (ISPARE,JSPARE)
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              VT240 Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  Generating =====> [ ./xwin1.f ]"
cat <<"STOP_CAT"> ././xwin1.f
C     PROGRAM XWIN1
C
C       Programmer's Reusable Library, Version 0.7      (TM)
C
C            Copyright (C) 1995 Object Access (SM)
C
C     Permission is granted to any individual or institution
C     to use, copy, modify, and distribute this single program
C     unit, provided that this complete copyright and
C     permission notice is maintained, intact, in all copies.
C
C     Object Access Incorporated provides this software
C     "as is" without express or implied warranty.
C
C     PURPOSE: Demonstrate and test access program XWIN_SELECT
C
C     LOCAL VARIABLES:
C
C
C     NOTES:  None
C
C     ******************************************************************
C
C                       External subprogram declarations
C
C     INTRINSIC
C
C                       XWIN object access program
      EXTERNAL XWIN_SELECT
C
C                       DEVICE object access programs
      EXTERNAL DEVICE_INIT, DEVICE_RELEASE
C
C                       PRL object access programs
      EXTERNAL PRL_LIBVER
C
C                       TERM object access programs
      EXTERNAL TERM_GETIN, TERM_GETOUT, TERM_GETERR, TERM_SETSIO
      INTEGER  TERM_GETIN, TERM_GETOUT, TERM_GETERR
C
C                       PROCESS object access programs
      EXTERNAL PROCESS_EXIT
C
C     ------------------------------------------------------------------
C
C                       Test program parameter values
C
C                       Standard input logical unit for the system
      PARAMETER (LUNSI=5)
C                       Standard output logical unit for the system
      PARAMETER (LUNSO=6)
C                       Standard error logical unit for the system
      PARAMETER (LUNSE=6)
C
C     ------------------------------------------------------------------
C
C                       Access program variables
C
C                       Integer variables and arrays
C     None
C
C     ------------------------------------------------------------------
C
C                       Test program variables
C
      CHARACTER*1 PAUS
C                       Program logical unit numbers
      INTEGER     IN, IOUT, IER
C
C                       Library version numbers (actual & required)
      CHARACTER*8  VERAQ,VERRQ
C
C                       Input variable test value arrays
C
C                       Program required PRL version
      DATA VERRQ /'0.7     '/
C
C     ******************************************************************
C
C                       Initialize library
C
      CALL DEVICE_INIT (0)
C
C     ******************************************************************
C
C                       Check PRL version
C
C                       Get actual PRL version being used
      CALL PRL_LIBVER (VERAQ,VERRQ)
C
C     ******************************************************************
C
C                       Set machine-specific constants
C
      CALL TERM_SETSIO (LUNSI,LUNSO,LUNSE)
C
C                       Logical unit number (LUN) of standard in
      IN = TERM_GETIN ()
C                       LUN of standard out
      IOUT = TERM_GETOUT ()
C                       LUN of standard error
      IER = TERM_GETERR ()
C
C     ******************************************************************
C
C                       Print introduction message
C
      WRITE (IOUT,301)
  301 FORMAT (
     * '              XWIN Object Demo Program #1'/
     * ' This program tests the XWIN object access program'/
     * ' XWIN_SELECT.'/
     * ' The XWIN_SELECT program opens a specific device type in a'/
     * ' non-interactive manner.  No input is required.'/)
C
C                       Initialize program completion status
      IOK = 0
C
C     ******************************************************************
C
C                       Test XWIN_SELECT object access program
C
C                       Loop for each input variable of access program
C                       Initialize the SmarTerm 240 graphics terminal
C                       device
      CALL XWIN_SELECT ()
C
C                       Release device
      CALL DEVICE_RELEASE ()
C
C     ******************************************************************
C
C                       Print demo termination message
C
C                       Wait until user presses a key before exiting
      WRITE (IOUT,810)
  810 FORMAT (/
     * '              XWIN Demo Program #1 Execution Completed'/
     * '                      Press <CR> to exit demo')
      READ (IN,811) PAUS
  811 FORMAT (A)
C
C     ******************************************************************
C
C                       Terminate program execution
C
      CALL PROCESS_EXIT
      END
STOP_CAT
echo "  <CR> to Continue"
read answer
cat <<STOP_CAT> ./compile
echo "
 
  Compiling and linking demo programs.
 "
echo "  Compiling ======> [ ./device1.f ]"
$LINK ./device1.f -o ./device1.x $DEVICE
chmod 0770 ./device1.x
echo "  Compiling ======> [ ./device10.f ]"
$LINK ./device10.f -o ./device10.x $DEVICE
chmod 0770 ./device10.x
echo "  Compiling ======> [ ./device2.f ]"
$LINK ./device2.f -o ./device2.x $DEVICE
chmod 0770 ./device2.x
echo "  Compiling ======> [ ./device3.f ]"
$LINK ./device3.f -o ./device3.x $DEVICE
chmod 0770 ./device3.x
echo "  Compiling ======> [ ./device4.f ]"
$LINK ./device4.f -o ./device4.x $DEVICE
chmod 0770 ./device4.x
echo "  Compiling ======> [ ./device5.f ]"
$LINK ./device5.f -o ./device5.x $DEVICE
chmod 0770 ./device5.x
echo "  Compiling ======> [ ./device6.f ]"
$LINK ./device6.f -o ./device6.x $DEVICE
chmod 0770 ./device6.x
echo "  Compiling ======> [ ./device7.f ]"
$LINK ./device7.f -o ./device7.x $DEVICE
chmod 0770 ./device7.x
echo "  Compiling ======> [ ./device8.f ]"
$LINK ./device8.f -o ./device8.x $DEVICE
chmod 0770 ./device8.x
echo "  Compiling ======> [ ./device9.f ]"
$LINK ./device9.f -o ./device9.x $DEVICE
chmod 0770 ./device9.x
echo "  Converting ======> [ ./device_clipon.uuu ]"
uudecode ./device_clipon.uuu
chmod 0660 ./device_clipon.dat
echo "  Converting ======> [ ./device_fillon.uuu ]"
uudecode ./device_fillon.uuu
chmod 0660 ./device_fillon.dat
echo "  Converting ======> [ ./device_hwfunc.uuu ]"
uudecode ./device_hwfunc.uuu
chmod 0660 ./device_hwfunc.dat
echo "  Converting ======> [ ./device_iscolor.uuu ]"
uudecode ./device_iscolor.uuu
chmod 0660 ./device_iscolor.dat
echo "  Converting ======> [ ./device_isfilew.uuu ]"
uudecode ./device_isfilew.uuu
chmod 0660 ./device_isfilew.dat
echo "  Converting ======> [ ./device_prompt.uuu ]"
uudecode ./device_prompt.uuu
chmod 0660 ./device_prompt.dat
echo "  Converting ======> [ ./device_select.uuu ]"
uudecode ./device_select.uuu
chmod 0660 ./device_select.dat
echo "  Converting ======> [ ./device_stdio.uuu ]"
uudecode ./device_stdio.uuu
chmod 0660 ./device_stdio.dat
echo "  Converting ======> [ ./device_texton.uuu ]"
uudecode ./device_texton.uuu
chmod 0660 ./device_texton.dat
echo "  Compiling ======> [ ./filewriter1.f ]"
$LINK ./filewriter1.f -o ./filewriter1.x $DEVICE
chmod 0770 ./filewriter1.x
echo "  Compiling ======> [ ./filewriter2.f ]"
$LINK ./filewriter2.f -o ./filewriter2.x $DEVICE
chmod 0770 ./filewriter2.x
echo "  Compiling ======> [ ./filewriter3.f ]"
$LINK ./filewriter3.f -o ./filewriter3.x $DEVICE
chmod 0770 ./filewriter3.x
echo "  Converting ======> [ ./filewriter_print.uuu ]"
uudecode ./filewriter_print.uuu
chmod 0660 ./filewriter_print.dat
echo "  Converting ======> [ ./filewriter_stat.uuu ]"
uudecode ./filewriter_stat.uuu
chmod 0660 ./filewriter_stat.dat
echo "  Compiling ======> [ ./frl1.f ]"
$LINK ./frl1.f -o ./frl1.x $DEVICE
chmod 0770 ./frl1.x
echo "  Compiling ======> [ ./frl2.f ]"
$LINK ./frl2.f -o ./frl2.x $DEVICE
chmod 0770 ./frl2.x
echo "  Converting ======> [ ./frl_select.uuu ]"
uudecode ./frl_select.uuu
chmod 0660 ./frl_select.dat
echo "  Converting ======> [ ./frl_users.uuu ]"
uudecode ./frl_users.uuu
chmod 0660 ./frl_users.dat
echo "  Compiling ======> [ ./hplaser1.f ]"
$LINK ./hplaser1.f -o ./hplaser1.x $DEVICE
chmod 0770 ./hplaser1.x
echo "  Converting ======> [ ./hplaser_select.uuu ]"
uudecode ./hplaser_select.uuu
chmod 0660 ./hplaser_select.dat
echo "  Compiling ======> [ ./ln03laser1.f ]"
$LINK ./ln03laser1.f -o ./ln03laser1.x $DEVICE
chmod 0770 ./ln03laser1.x
echo "  Converting ======> [ ./ln03laser_select.uuu ]"
uudecode ./ln03laser_select.uuu
chmod 0660 ./ln03laser_select.dat
echo "  Compiling ======> [ ./post1.f ]"
$LINK ./post1.f -o ./post1.x $DEVICE
chmod 0770 ./post1.x
echo "  Compiling ======> [ ./post2.f ]"
$LINK ./post2.f -o ./post2.x $DEVICE
chmod 0770 ./post2.x
echo "  Converting ======> [ ./post_select1.uuu ]"
uudecode ./post_select1.uuu
chmod 0660 ./post_select1.dat
echo "  Converting ======> [ ./postsc_select2.uuu ]"
uudecode ./postsc_select2.uuu
chmod 0660 ./postsc_select2.dat
echo "  Compiling ======> [ ./prl1.f ]"
$LINK ./prl1.f -o ./prl1.x $DEVICE
chmod 0770 ./prl1.x
echo "  Compiling ======> [ ./process1.f ]"
$LINK ./process1.f -o ./process1.x $DEVICE
chmod 0770 ./process1.x
echo "  Compiling ======> [ ./qmslaser1.f ]"
$LINK ./qmslaser1.f -o ./qmslaser1.x $DEVICE
chmod 0770 ./qmslaser1.x
echo "  Converting ======> [ ./qmslaser_select.uuu ]"
uudecode ./qmslaser_select.uuu
chmod 0660 ./qmslaser_select.dat
echo "  Compiling ======> [ ./st2401.f ]"
$LINK ./st2401.f -o ./st2401.x $DEVICE
chmod 0770 ./st2401.x
echo "  Compiling ======> [ ./tek40141.f ]"
$LINK ./tek40141.f -o ./tek40141.x $DEVICE
chmod 0770 ./tek40141.x
echo "  Compiling ======> [ ./tek41001.f ]"
$LINK ./tek41001.f -o ./tek41001.x $DEVICE
chmod 0770 ./tek41001.x
echo "  Converting ======> [ ./tek4100_select.uuu ]"
uudecode ./tek4100_select.uuu
chmod 0660 ./tek4100_select.dat
echo "  Compiling ======> [ ./tek41071.f ]"
$LINK ./tek41071.f -o ./tek41071.x $DEVICE
chmod 0770 ./tek41071.x
echo "  Compiling ======> [ ./tek41151.f ]"
$LINK ./tek41151.f -o ./tek41151.x $DEVICE
chmod 0770 ./tek41151.x
echo "  Compiling ======> [ ./tek45101.f ]"
$LINK ./tek45101.f -o ./tek45101.x $DEVICE
chmod 0770 ./tek45101.x
echo "  Converting ======> [ ./tek4510_select.uuu ]"
uudecode ./tek4510_select.uuu
chmod 0660 ./tek4510_select.dat
echo "  Compiling ======> [ ./vecsave1.f ]"
$LINK ./vecsave1.f -o ./vecsave1.x $DEVICE
chmod 0770 ./vecsave1.x
echo "  Converting ======> [ ./vecsave_select.uuu ]"
uudecode ./vecsave_select.uuu
chmod 0660 ./vecsave_select.dat
echo "  Compiling ======> [ ./vt2401.f ]"
$LINK ./vt2401.f -o ./vt2401.x $DEVICE
chmod 0770 ./vt2401.x
echo "  Compiling ======> [ ./xwin1.f ]"
$LINK ./xwin1.f -o ./xwin1.x $DEVICE
chmod 0770 ./xwin1.x
echo "
 
  All demo programs have been compiled.
 "
Proceed="No"
while [ "\$Proceed" = "No" ]
do
echo "
 
  Delete demo program source?
  ( Y or N )
 "
read answer
if [ "\$answer" = "y" ]; then
  Proceed="Yes"
  echo "
  All demo programs are being deleted"
  rm ./*.f
  rm ./*.uuu 2>/dev/null
  rm ./*.INC 2>/dev/null
else
  if [ "\$answer" = "Y" ]; then
    Proceed="Yes"
    echo "
  All demo programs are being deleted"
    rm ./*.f
    rm ./*.uuu 2>/dev/null
    rm ./*.INC 2>/dev/null
  fi
fi
if [ "\$answer" = "n" ]; then
  Proceed="Yes"
else
  if [ "\$answer" = "N" ]; then
    Proceed="Yes"
  fi
fi
echo "  <CR> to Continue"
read answer
done
STOP_CAT
chmod 770 ./compile
cat <<"STOP_CAT"> ./run_demo
(tput) 1>/dev/null 2>&1
if [ $? = 1 ]; then
  CLEAR="clear"; export CLEAR
else
  CLEAR="tput clear"; export CLEAR
fi
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

 
  PRL-DEVICE demonstration programs. These programs
  test and demonstrate the capabilities of the
  PRL-DEVICE library.
 
  <CR> to Continue"
read answer
while [ 1 -eq 1 ]; do
$CLEAR
echo "
 Select Demo Program
 ===================
   1 ./_device.tk  2 ./device1     3 ./device10    4 ./device2                  
   5 ./device3     6 ./device4     7 ./device5     8 ./device6                  
   9 ./device7    10 ./device8    11 ./device9    12 ./filewriter1              
  13 ./filewriter 14 ./filewriter 15 ./frl1       16 ./frl2                     
  17 ./hplaser1   18 ./ln03laser1 19 ./post1      20 ./post2                    
  21 ./prl1       22 ./process1   23 ./qmslaser1  24 ./st2401                   
  25 ./tek40141   26 ./tek41001   27 ./tek41071   28 ./tek41151                 
  29 ./tek45101   30 ./vecsave1   31 ./vt2401     32 ./xwin1                    
 
   x. Exit, delete demo executables
   s. Exit, save demo executables"
read answer
$CLEAR
case "$answer" in
  "x") rm ./*.o ./*.x ./*.tk ./*.dat ./*.inp 2>/dev/null; break;;
  "s") rm ./*.o 2>/dev/null; break;;
  1) wish -f ./_device.tk;;
  2) ./device1.x;;
  3) ./device10.x;;
  4) ./device2.x;;
  5) ./device3.x;;
  6) ./device4.x;;
  7) ./device5.x;;
  8) ./device6.x;;
  9) ./device7.x;;
 10) ./device8.x;;
 11) ./device9.x;;
 12) ./filewriter1.x;;
 13) ./filewriter2.x;;
 14) ./filewriter3.x;;
 15) ./frl1.x;;
 16) ./frl2.x;;
 17) ./hplaser1.x;;
 18) ./ln03laser1.x;;
 19) ./post1.x;;
 20) ./post2.x;;
 21) ./prl1.x;;
 22) ./process1.x;;
 23) ./qmslaser1.x;;
 24) ./st2401.x;;
 25) ./tek40141.x;;
 26) ./tek41001.x;;
 27) ./tek41071.x;;
 28) ./tek41151.x;;
 29) ./tek45101.x;;
 30) ./vecsave1.x;;
 31) ./vt2401.x;;
 32) ./xwin1.x;;
  *) echo "Invalid Choice
 
  <CR> to Continue"
read answer;;
esac
done
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

 
       For more information contact:
 
         Object Access
         2023 Leisure Lane
         League City, TX  77573
 
         e-mail:   oa@iah.com
         homepage: http://www.iah.com/oa
         phone:    713-332-7281, 713-554-7617
 
 "
STOP_CAT
chmod 770 ./run_demo
if [ "$SYSID" = "" ]; then
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

  If you had selected a supported system, the demos
  would be installed automatically now.  Since you
  did not, you must perform the following procedures
  to complete the demo installation:
 
  1. Compile the demo programs using the FORTRAN command
     for your system, or by executing the 'compile' 
     script by typing its name.
 
  2. Execute the demo programs by typing 'run_demo'
 
  "
else
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

  All files required to run the demo programs are
  prepared.  If you wish to continue, press ENTER.
  To stop and continue manually, type any character
  and press ENTER.
 
  <CR> to Continue"
read answer
$CLEAR
if [ "$answer" = "" ]; then
  ./compile
  rm ./compile
  ./run_demo
else
$CLEAR
echo "
                    Object Access
            Programmer's Reusable Library
                        DEVICE
 

  If you had elected to proceed, the demos
  would be installed automatically now.  Since you
  did not, you must perform the following procedures
  to complete the demo installation:
 
  1. Compile the demo programs using the FORTRAN command
     for your system, or by executing the 'compile' 
     script by typing its name.
 
  2. Execute the demo programs by typing 'run_demo'
 
  "
fi
fi
