Gravitation and cosmology in generalized (1+1)-dimensional dilaton gravity