G'day, Congratulations to all on the GNU Grep 2.21 release. I'm continuing my attempt to do a "bottom-up" refactoring of the code to make it more modular, via the Lua script "untangle" that you've seen recently. This email contains an updated version of the script, tracking the changes to the sources (especially to dfa.c) since the last release. I've also added some code to make the modules more robust: 1. Added C++ C wrappers to the header files: #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ [... body of header goes here ... ] #ifdef __cplusplus } #endif /* __cplusplus */ 2. Strengthened pointer passing between modules Although the code uses strong typing (opaque types) for pointers representing instances created, manipulated and destroyed by each module, there are various ways -- intentional or unintentional -- that an invalid pointer might be presented, masquerading as an instance of the module. To reduce the likelihood of this happening, along with adding checking fro some other cases such as gross memory corruption, and perhaps also use-after-free, I've added sentinel magic numbers at the top and bottom of each of the refactored modules, and these sentinels are checked each time an external party interacts with the module. The charclass module has had a couple of extra additions: "bitcount" reports how many members of the class are set; and "next_member" allows a client to enumerate the members in an ordered fashion. I've tested the "untangle" script with Lua 5.1. I haven't included the files generated by this script -- if people are interested, I'm happy to post these to the list. cheers, behoffski (Brenton Hoff) Programmer, Grouse Software FINALLY: RIP to my Dad, who passed away a year ago today (27 November 2013): He did so much to encourage my interest in science and technology, and also personally did a lot to help me through some tough times. Thanks Dad, for everything. This release is dedicated to his memory.