Update stack.c

Added file header, copyright message & file descriptions, etc.