!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Routines to manage the MAPPING package
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
subroutine mapping_pack_set(pack)
  use gpack_def
  use gkernel_interfaces
  !
  type(gpack_info_t), intent(out) :: pack
  !
  external :: mapping_pack_init
  external :: mapping_pack_on_exit
  !
  pack%name='mapping'
  pack%ext = '.map'
  pack%depend(1:1) = (/ locwrd(greg_pack_set) /)
  pack%init=locwrd(mapping_pack_init)
  pack%on_exit=locwrd(mapping_pack_on_exit)
  pack%authors="J.Pety, S.Guilloteau, F.Gueth, N.Rodriguez-Fernandez"
  !
end subroutine mapping_pack_set
!
subroutine mapping_pack_init(gpack_id,error)
  use gkernel_interfaces
  use sic_def
  !----------------------------------------------------------------------
  !
  !----------------------------------------------------------------------
  integer :: gpack_id
  logical :: error
  !
  ! Local language
  call init_clean
  !
  ! One time initialization
  call map_message_set_id(gpack_id)  ! Set library id
  !
  ! Language priorities
  call exec_program('SIC'//backslash//'SIC PRIORITY 1 CLEAN')
  !
  ! Specific initializations
  !
end subroutine mapping_pack_init
!
subroutine mapping_pack_on_exit(error)
  !----------------------------------------------------------------------
  !
  !----------------------------------------------------------------------
  logical :: error
  !
  call save_result(error)
  !
end subroutine mapping_pack_on_exit
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
