"multiple errors" indeed.Too many to itemise and correct, in fact.
You are far better to write the whole thing in Pascal from scratch, using ideas/algorithms from the C code if it helps you.
A few points about the code:
"C" isms like the operators && (and in Pascal) and % (mod in Pascal) clearly have to go.
To both pass an array parameter, and pass it back changed in Pascal you have to declare it as
SomeRoutine(var c: TArray);
begin ...end;
The "c" you declare as an "array of Char" should be a matrix.
You want something like this:
type
TRange = 1..3;
TCharMatrix = array[TRange, TRange] of Char;
at the start of your program, and then use TCharMatrix as the type of the array you manipulate.
The compiler will then save you from range errors like trying to access c[0][0] when c's lower indexes are both 1 (provided you enable all the debugging checks, in your project, which you definitely should).
Note that Pascal for loops increment the counter variable for you. You cannot increment it yourself.