fix a bug when line is all space
add c support