Usually you can pretty easiely rewrite C to Pascal, but you can also link pascal and c code together and call C functions from pascal.
There are just a few things to keep in mind when linking pascal and C together, Pascal has managed memory (strings, dynamic arrays), C doesn't, these won't survive the transition between C and Pascal code. Also when linking C and pascal together, you should use the C memory manager from the cmem unit (must be the first unit in the uses clause of your lpr)