The structure of a model nematic liquid crystal confined between two symmetric aligning walls has been investigated using density-functional theory. In the case where wall-particle and particle-particle potentials favor different orientations at the surface, their relative ranges are found to play a crucial role in determining the equilibrium director configuration. If the surface interaction is the longer ranged, it will align the nematic fairly uniformly throughout the whole sample, along a direction close to that which we would obtain if the wall were the sole source of anchoring. If, on the other hand, the ranges of the two interactions are comparable, anchoring at the surfaces will still be dominated by the wall potential but the director will rotate (in general, incompletely) towards the orientation favored by the intermolecular potential, over a distance of the order of the molecular diameter, thereby producing a strong subsurface deformation. In this context I will critically discuss some related theoretical work.