need simple code fragment please

need help with animation which isnt simple rotation. Could someone point me in the direction of code/write an example of code that increases and decreases the size of a square (or any shape) every 1 second (or any time period or delay) using GLUT. Whenever I try writing my code the screen doesnt update until the program has finished, and doesnt draw itself properly in the first place. (ie the glut window is transparent and seemingly crashed whilst the program is running, and when the program has stopped it may display the final frame of animation) Im not sure I am using glutPostRedisplay() or the idle function properly? should be easy for you experts!!!

take a look at the glut examples on my website, the spinning ball example would be a good place to start. With a simple variable you could add scale function over time.