When waveflag.c was forked from behdad's repo one of the changes that
was made effectively removed the ability to generate different sizes
of flags, despite leaving the SIZE value in the source. Recently we
needed to generate waved flags at a different power-of-two size, and
found it no longer functioned as the original. These changes restore
that while leaving the other changes in this forked version (mostly
formatting changes) intact.