text editor using C