Convert C code to .Call interface

 - due to dup=FALSE being deprecated in .C interface