port to win32
format code