Non-Fermi-liquid behaviour in magnetic d- and f-electron systems