Oxidation and nitridation of vitreous carbon at high temperatures