Addchar should provide some feedback.
Don't save the pointers in masked form.
Re-arrange the structure for convenience.
Count dropped characters.
Add code for future use.
All done.  Works.  Hopefully a bit more efficient.
Don't forget to count dropped entries.