bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19193: Announcing "untangle" for Grep 2.21; R.I.P. Dad


From: behoffski
Subject: bug#19193: Announcing "untangle" for Grep 2.21; R.I.P. Dad
Date: Thu, 27 Nov 2014 00:08:04 +1030
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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.









Attachment: untangle
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]