      SUBROUTINE PLHOST.IMPORT(HOSTFILE,CONV,SRC)
*PIC-LAN
*
*MVBASE D3 UV UD JB QM
*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
      INCLUDE PLW.COMMON
*
      EQUATE BLK.SIZE TO 1000000
*
      SRC = ''
*
      IF INDEX(HOSTFILE,'..',1) THEN
         RETURN
      END
*
      HOSTFILE = CHANGE(HOSTFILE,'//','/')
      HOSTFILE = CHANGE(HOSTFILE,'//','/')
*
      OPENSEQ HOSTFILE READONLY TO HOST.FD ELSE
         RETURN
      END
*
      EOF = NO
      LOOP
         READBLK BLK FROM HOST.FD , BLK.SIZE THEN
            IF LEN(BLK) < BLK.SIZE THEN EOF = YES
            BEGIN CASE
               CASE CONV = ''
               CASE CONV = 'A'
                  BLK = CHANGE(BLK,CHAR(10),CHAR(254))
                  BLK = CHANGE(BLK,CHAR(13),'')
                  BLK = CHANGE(BLK,CHAR(255),CHAR(127))
               CASE CONV = 'X'
                  BLK = OCONV(BLK,'MX0C')
               CASE YES
                  CLOSE HOST.FD
                  RETURN
            END CASE
            SRC = SRC : BLK
         END ELSE
            EOF = YES
         END
      UNTIL EOF DO REPEAT

      CLOSE HOST.FD
*
      RETURN
END
