fix warning with clang

fix warning with clang
warning: data argument not used by format string
Fix implicit declarations
apply screen-rfc1345-digraph.patch

patch from http://aperiodic.net/phil/screen/screen-rfc1345-digraph.patch
remove __P macro it's obsolete

inspired by https://github.com/wrp/wscreen/commit/a434e5d6126a8160b91118db32010476998e05d3

Conflicts:
	src/extern.h
	src/layout.h
remove osdef

inspired by https://github.com/wrp/wscreen/commit/18c44170a960eb3a152982af483f6817674df244

put curses stuff it term.sh, it's actually in /usr/include/term.h
but it will mess up build if included directly
remove unused function argument
remove USEVERARGS
rewrite functions definitions
change main definition
*wi -> *win
remove #if 0'ed code
define functions directly, not by macro
remove braille support

it's not like i can test it and code had comment that it probably has bugs
also comments on ml suggest that there are better ways and it's not used
make most features as always built in from now on

removed #define SIMPLESCREEN and it's #defines
also removed #define DETACH and RXVT_SOC
all of this options are now default
not needed
remove some unneeded stuff
replace bzero with memset
replace bcopy with memmove
remove unused variables xs xe ys
fix possible repeated close() in file