Second-harmonic-generation spectra of the hexagonal manganites RMnO3