I have found the usual answer for determining the size on an array - \'variable = sizeof buffer/sizeof *buffer;\' or similar which gives the declared size<