      SUBROUTINE PLIP.INIT.SUB
*PIC-LAN
*
*ALL
*PC
*N
*
*
*
*
******************************************************************************
******************************************************************************
***                                                                        ***
*** (C) Copyright 1990-2005 Doug Dumitru, All Rights Reserved.             ***
***                                                                        ***
*** This program is licensed under the terms of the GNU General Public     ***
*** License, version 2.0 with attached notices.                            ***
***                                                                        ***
*** The full text can be found in the LICENSE.TXT file in the              ***
*** PLIP.BP database file (the /usr/qmweb/PLIP.BP/PLIP.BP directory).      ***
***                                                                        ***
******************************************************************************
******************************************************************************
*
      INCLUDE SYS.TYPE.INCLUDE
*
      INCLUDE PL.COMMON
      INCLUDE PL.COMMON.DEFS
      INCLUDE PL.DEFS
      INCLUDE PLIP.COMMON
*
      MAT PLIP$VARS = ''
*
      OPEN 'PLIP.CTRL' TO PLIP$CTRL.FD ELSE CALL PLXX.STOP(201,'PLIP.CTRL')
      OPEN 'PLIP.CTRL,IP.RESOURCES' TO PLIP$RES.FD ELSE CALL PLXX.STOP(201,'PLIP.CTRL,IP.RESOURCES')
      OPEN 'ERROR.LOG' TO PLIP$ERROR.LOG.FD ELSE CALL PLXX.STOP(201,'ERROR.LOG')
*
      CALL PLIP.READ.CONFIG(MAT PLIP$VARS)
*
      IF @TTY <> 'phantom' THEN
         PLIP$RESTART.CTR = 0
      END
*
      NUL80 = STR(CHAR(0),80)
      NUL.MAXREAD = STR(CHAR(0),PLIP$MAX.IO.LEN)
      HEX.MAXREAD = OCONV(PLIP$MAX.IO.LEN,'MCDX') 'R%4'
*
      NULDIR = STR(CHAR(0),257)
      HEX.MAXDIR = OCONV(257,'MCDX') 'R%4'
*
      OPEN 'VOC' TO MD.FD ELSE CALL PLXX.STOP(201,'MD')
      PLIP$FIX.WRITE = NO
*
      RETURN
   END
