  In the paper we consider the Heun functions, which are solutions of the
equation introduced by Karl Heun in 1889. The Heun functions generalize many
known special functions and appear in many fields of modern physics. Evaluation
of the functions was described in [1]. It is based on local power series
solutions near the origin, derived by the Frobenius method, and analytic
continuation to the whole complex plane with branch cuts. However, exceptional
cases can occur at integer values of an exponent-related parameter $\gamma$ of
the equation, when one of the two local solutions should include a logarithmic
term. This also means singular behavior of the Heun functions as $\gamma$
approaches the integer values. Here we suggest a method of regularization and
redefine the Heun functions in some vicinities of the integer values of
$\gamma$, where the new functions depend smoothly on the parameter.
