A rewrite of screenFetch in C.