chomp removes all \r \n chars
add buffer_reset() macro
Added buffer_len() macro