!***********************************************************************
! This file is part of OpenMolcas.                                     *
!                                                                      *
! OpenMolcas is free software; you can redistribute it and/or modify   *
! it under the terms of the GNU Lesser General Public License, v. 2.1. *
! OpenMolcas is distributed in the hope that it will be useful, but it *
! is provided "as is" and without any express or implied warranties.   *
! For more details see the full text of the license in the file        *
! LICENSE or in <http://www.gnu.org/licenses/>.                        *
!***********************************************************************

subroutine cRdMCK(rc,Option,InLab,iComp,cData,iSymLab)

use, intrinsic :: iso_c_binding, only: c_f_pointer, c_loc
use Definitions, only: iwp

#include "intent.fh"

implicit none
integer(kind=iwp), intent(inout) :: rc
integer(kind=iwp), intent(in) :: Option, iComp, iSymLab
character(len=*), intent(inout) :: InLab
character, intent(_OUT_) :: cData(*)

call cRdMCK_Internal(cData)

! This is to allow type punning without an explicit interface
contains

subroutine cRdMCK_Internal(cData)

  character, target, intent(_OUT_) :: cData(*)
  integer(kind=iwp), pointer :: iData(:)

  call c_f_pointer(c_loc(cData(1)),iData,[1])
  call RdMCK(rc,Option,InLab,iComp,iData,iSymLab)
  nullify(iData)

  return

end subroutine cRdMCK_Internal

end subroutine cRdMCK
