  Shell corrections of finite, spherical, one-body potentials are analyzed
using a smoothing procedure which properly accounts for the contribution from
the particle continuum, i.e., unbound states. Since the plateau condition for
the smoothed single-particle energy seldom holds, a new recipe is suggested for
the definition of the shell correction. The generalized Strutinsky smoothing
procedure is compared with the results of the semi-classical Wigner-Kirkwood
expansion. A good agreement has been found for weakly bound nuclei in the
vicinity of the proton drip line. However, some deviations remain for extremely
neutron-rich systems due to the pathological behavior of the semi-classical
level density around the particle threshold.
