fix scope bug in line_drawing.c