The event tables supplied by Vermont Views have only two empty entries in each table. This is designed to save space for applications that do not modify the event tables.
If you wish to add more than two new event code-event function pairs to an event table at run-time, you will need to modify the event tables in vv_glob.h to add more empty entries. Simply find the correct event table in vv_glob.h, go to the end of the table, and insert more entries before the end-of-table marker ET_END. An empty entry should look like this:
|
Be sure to use the null function pointer value NULLFP, rather than NULLP. Under some memory models, using NULLP instead of NULLFP produces a memory overwrite. Also, casting NULLFP to be of type EVENTPTR may not be necessary on some terminal systems.
If you link with the development libraries and get an error message "Function table full," you need to modify the event table to add empty entries. You will not see this error message if you link with the production libraries, but you will encounter memory overwrite problems in your program if you add entries to a full event table.