Fix C90 compile warnings in cmd-know.c

Reorder statements to avoid warning.
This time only one file in the commit.
Fix compile warnings in cmd4.c.

Cygwin requires int arguments to character test/conversion library
functions.
Fix C90 compiler warnings in melee2.c.

Reorganize statements to avoid compiler warning.
Fix compiler warning in ui-birth.c.

Fix a bad cast.
Fix compiler warnings in util.c.

Cygwin requires int arguments to character test/conversion library
functions.
Fix compiler warning in z-file.c.

Cygwin requires int arguments to character test/conversion library
functions.