       SUBROUTINE Z_DEALLOC(address)
C
C----------------------------------------------------------------------
C
C.IDENTIFICATION: Subroutine Z_DEALLOC
C.LIBRARY:        VOS (Unix experimental version)
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 21 Jul 92 - Original version
C.VERSIONS:       1.0 - 29 Oct 92 - New error handling codes
C                 1.1 - 24 Jun 94 - New error codes from zc_free
C.PURPOSE:        Dellocate memory allocated with Z_ALLOC                            
C.METHOD:         call system routine free
C.SYNTAX:         CALL Z_DEALLOC(address)               
C.PARAMETERS:     INTEGER address  : address of memory allocated            (in)
C.RESTRICTIONS:   address is the value returned by Z_ALLOC
C.NOTES:          error code is set in VOSCOMMON_ERROR
C.FILES:          none
C.REFERENCES      zc_free in VOS library
C
C----------------------------------------------------------------------
C
C
C      INCLUDE 'implicit_none.inc'
       INTEGER  address
       INTEGER  ZC_FREE
       INCLUDE 'voscommon.inc'
       INCLUDE 'errors.inc'
C
C      set default return error codes, and verify string length
C
       VOSCOMMON_ERROR=0
       VOSCOMMON_SYSTEMERROR=0
       VOSCOMMON_SYSTEMERROR=ZC_FREE(address)
C-->   provisional error code handling
C      free returns 1 if OK, 0 and "sets errno" if not OK 
C      now zc_free returns "errno"
       IF(VOSCOMMON_SYSTEMERROR.NE.0)VOSCOMMON_ERROR=VE_FREE
       RETURN
       END    
