SUBROUTINE WR_USGI_(A,B,C) BIND(C,NAME='usgi__')
  USE iso_c_binding
  INTEGER(c_int),VALUE :: B
  CHARACTER(1,c_char) :: A(B)
  INTEGER(c_int) :: C(*)
  CHARACTER(3) :: USGI

  CALL CHAR_TRIM(USGI(C),A,3)

END

SUBROUTINE WR_CSGI_(A,B,C) BIND(C,NAME='csgi__')
  USE iso_c_binding
  CHARACTER(1,c_char) :: A
  INTEGER(c_int),VALUE :: B
  INTEGER(c_int) :: C(*)
  CHARACTER(1) :: CSGI

  A=CSGI(C)

END
