Revert "changed spaghetti code to 'for' cycle"

This reverts commit 83f7950dd1e31c106139c69e2f5ea3ba89be20d6.
+ buffer_t
+ preprocessed_buffer
+ simple client
preprocess 'type' event
fixed warnings
+ poll
bugfix
+ send new window size
+ change terminal size
+ handle errors