ANSI'fy and remove redundant casts.
ANSI'fy and remove redundant casts. See comment prefixed with XXX for code needing more scrutiny.
ANSI'fy and remove redundant casts.
ANSI'fy.
ANSI'fy.
ANSI'fy and tidy up function arguments to use specific X event types where possible.
Remove redundant include.