The addition of new computational code essentially requires writing three new C code routines. The first is an initialization routine which we shall name example_init(). This routine will be called by dstool each time a new dynamical system is loaded. The second routine, which we shall name example_go(), is the routine to do the analysis. This routine will be called by the user by selecting an item on the Panels Menu of the Command Window. The third routine, which we shall name example_handler(), is a routine required by the windowing system. This is the routine which will actually call the example_go() routine when the menu item is selected. Once these routines have been written, we must modify some dstool code which allows these routines to be accessed. This code is contained in the file $DSTOOL_USER/userlib/user_panels.c.
For this example, the three new routines will be written in a file named example.c in the directory $DSTOOL_USER/userlib. We shall now describe each of the three routines in more detail.