Ported C++ to C