  We extend the transfer matrix method of one-dimensional hard core fluids
placed between confining walls for that case where the particles can pass each
other and at most two layers can form. We derive an eigenvalue equation for a
quasi-one-dimensional system of hard squares confined between two parallel
walls, where the pore width is between $\sigma$ and $3\sigma$ ( $\sigma$ is the
side length of the square). The exact equation of state and the nearest
neighbour distribution functions show three different structures: a fluid phase
with one layer, a fluid phase with two layers and a solid-like structure where
the fluid layers are strongly correlated. The structural transition between
differently ordered fluids develops continuously with increasing density, i.e.
no thermodynamic phase transition occurs. The high density structure of the
system consists of clusters with two layers which are broken with particles
staying in the middle of the pore.
