Interpretation of x-ray spectra emitted by Ar ions in an electron-cyclotron resonance ion source