Use MALLOC for save_screen_shot
Pass unsigned dimensions to write_bmp
Make OGL_VIEWPORT static inline
Add realloc cast to gr_set_mode