Buffer with detection of the 6 types of lines that could occur.