Text editor written in C