Specific heat of magnetic and semiconductor quasiperiodic structures