You haven't tried anything. This isn't a question, but a request for us to do your work.
s are C++. Take them out and find C equivalents for what no longer compiles. For example, the C equivalent of
. See here
]. You will need to find equivalents for
, and probably other things that I didn't notice while quickly scanning this code.
This isn't an exercise for a beginner. Most C++ to C conversion requests posted here have a lot less work to do than this, so you must have some experience. Good luck.