GPM text console mouse support

add search backwards

change tempnam->mkstemp
