libs/chessx-pgn/guess/common.h
// square_Last():
//   Return the last square reached by moving as far as possible in
//   the direction d from the square sq. If sq is a valid on-board
//   square and d is a valid direction, the result will always be
//   a valid on-board square; the result will be the same as the
//   input square if moving in the specified direction would end
//   up off the board.

Return the last square reached by moving as far as possible in
the direction d from the square sq. If sq is a valid on-board
square and d is a valid direction, the result will always be
a valid on-board square; the result will be the same as the
input square if moving in the specified direction would end
up off the board.
Return the last square reached by moving as far as possible in the direction d from the square sq . If sq is a valid on - board square and d is a valid direction the result will always be a valid on - board square ; the result will be the same as the input square if moving in the specified direction would end up off the board .
inline squareT
square_Last(squareT sq, directionT dir)
{
    return sqLast[sq][dir];
}
inline squareT square_Last ( squareT sq , directionT dir ) { return sqLast [ sq ] [ dir ] ; }
square_Last():
Return the last square reached by moving as far as possible in
the direction d from the square sq.
square_Last () : Return the last square reached by moving as far as possible in the direction d from the square sq .