but earendil came , shining with white flame , and about vingilot were gathered all the great birds of heaven and thorondor was their captain , and there was battle in the air all the day and through a dark night of doubt .