Issue#27: C interface implementation

following issue #27
@zdne these's been corrected.