Add some C functions