a4 - cs201 - tted - teeny-tiny editor - 2 weeks - due March 11 -------------------------------------------------------------- overview: create "tted" a very small editor that only does line editing. tted has a small number of commands aimed at a linked list that is its central data structure. malloc(3) and free(3) must be used in this assignment. The central data structure should have the following approximate form: struct line { int linenumber; char *contents; char *next; }; tted should have a shell structure. Basically read a string and carry out a command. The only logical limit on lines edited by tted should be available memory. features: 1. add If the add command is given, the string following the command should be put at the end of the list of lines. 2. rm number If the rm command is given, the line specified by number should be deleted. 3. list If the list command is given, the lines in the file should be listed with their line numbers starting from 1 to MAXLINE. 4. write filename If the write command is given, the output should be written to a file as a series of newline terminated lines. 5. read filename If the read command is given, the contents of the file should be read in and concatenated at the end of any lines in the editor. 6. you may have an exit command or simply use EOF to terminate. extra credit: For 5 optional extra credit points, you may modify the add command so that it can add after any line number as opposed to only adding at the end of all lines. You should specify the syntax and point out that you did this optional work in your test typescript. Turn-in: 1. typescript showing tests. 2. Makefile 3. all *.c and *.h files System and library calls: 1. malloc/free(3) 2. fgets(3) 3. use stdio for read/write of files