PROGRAM DESCRIPTION - As each node is drawn, it's coordinates are stored in an array. Drawing lines and additional nodes is straightforward. - When a user selects delete and clicks on the canvas, the program evaluates first whether the user has clicked inside the arc of one of the nodes. If the click occurs outside the arc of all nodes, then nothing happens. If the user clicks inside the arc, then the program evaluats for the node center that is the smalles radial distance from the button press and then selects this node. This node is replaced by the last node in the array and then the entire graph is cleared and re-drawn - The curses interface obtains the size of the terminal display area and then uses the ratio between that display and the 400 pixel by 400 pixel drawing canvas to place the node coordinates in the appropriate location. - When deleting nodes of the curses interface the program calculates the length of the text originally printed for the node and then deletes exactly that amount of text on the curses interface. - The modal interface is supported by a variable "mode" which is used throughout the functions to track whether in draw or delete mode and also when quitting or erasing and to perform the appropriate action. FILES - dcg.c This is a c++ file that contains motif, xlib and curses code - makefile Makefile to compile the dcg.c code to output file dcg - dcg_environment Contains motif interface environment entries SPECIAL INSTRUCTIONS TO GRADE - Type "dcg" to run the program once compiled - The program assumes that you have set your DISPLAY to an Xwin output The shell script setenv DISPLAY `who am i | cut -d"(" -f2| cut -d"." -f1`:0 does not work if you are logging-in like I was using remote desktop. Instead, I selected the option to allow X11 tunneling in SSH and when the dcg program runs it opens an xwin display connected to that terminal.