prepare to move 'test pattern' code into HdmiOut
preserve line numbers when processing `if lines