Rewritten from C++ to C

Anyway, there is nothing to do with C++, so don't bother with addition deps.