That's a humorous translation of the first code. He claims (I'm no expert either) that xtermAppPending() is poll(), GetBytesAvailable() is poll() and then xevents is invoked, which calls xtermAppPending() again in a loop.
The code you're confused about is basically combining the two previous methods (hence: 'manual inlining' with a wink) and replacing both xtermAppPending() and GetBytesAvailable() with poll() to make the problem stand out.
The code you're confused about is basically combining the two previous methods (hence: 'manual inlining' with a wink) and replacing both xtermAppPending() and GetBytesAvailable() with poll() to make the problem stand out.