add setbuffsize and setterm