Помогите перевести код с Паскаля на Си.
****unit grxx_nazwisko_imie;
interface
uses 
    crt, dos;
type
    TPoint = record
        x: real;
        y: real;
    end;
    TRoad = array of integer;
    TPoints = array of TPoint;
function Find_grxx_nazwisko_imie(N: integer; Points: TPoints; var Road: TRoad):real;
implementation
function Find_grxx_nazwisko_imie(N: integer; Points: TPoints; var Road: TRoad):real;
var
    Point: TPoint;
    i,j,k,l,ClosestPoint,PointOnRoad,IsSet,IsSet2: integer;
    Length1,Length2,RoadLength,ShortestRoadLength: real;
    ShortestRoad: TRoad;
begin
    ShortestRoadLength:=0;
    IsSet2:=0;
    for l:=0 to n-1 do begin
        fillchar(Road[0],n,0);
        Point := Points[l];
        Road[0] := l;
        RoadLength:=0;
        for i:=1 to n-1 do begin
            Length1:=0;
            Length2:=0;
            IsSet:=0;
            ClosestPoint:=0;
            for j:=0 to n-1 do begin
                if (Point.x = Points[j].x) and (Point.y = Points[j].y) then continue;
                PointOnRoad := 0;
                for k:=0 to i do begin
                    if j = Road[k] then begin
                        PointOnRoad := 1;
                    end;
                end;
                if PointOnRoad = 1 then continue;
            Length1 := sqrt(sqr((Point.x - Points[j].x)) + sqr((Point.y - Points[j].y)));
            if IsSet = 0 then begin
                Length2 := Length1;
                ClosestPoint := j;
                IsSet := 1;
            end
            else begin
                if Length1<Length2 then begin
                    Length2 := Length1;
                    ClosestPoint := j;
                end;
            end;
        end;
        RoadLength := RoadLength + Length2;
        Road[i] := ClosestPoint;
        Point := Points[ClosestPoint];
    end;
    if IsSet2=0 then begin
        ShortestRoadLength := RoadLength;
        ShortestRoad := copy(Road, 0, n);
        IsSet2:=1;
    end 
    else if RoadLength<ShortestRoadLength then begin
        ShortestRoadLength := RoadLength;
        ShortestRoad := copy(Road, 0, n);
    end;
end;
Road := copy(ShortestRoad, 0, n);
Find_grxx_nazwisko_imie := ShortestRoadLength;
end;
end.
