around the walls , enormous stands of long halberds and arrow-headed spears had been planted on the ground in lines , so a great company of men might sleep safe from aerial assault , and the remnants of the infantry and cavalry were bivouacked among them .