[MERGE] more refactoring of re_intuit_start()
authorDavid Mitchell <davem@iabyn.com>
Sun, 16 Mar 2014 18:04:13 +0000 (18:04 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 16 Mar 2014 18:04:13 +0000 (18:04 +0000)
commit61eef0f5eac901e462178b0556cbaacb988b8a58
tree5f49f563888f8c081337f37689a15fa25e070391
parenta0f6433d30e7c146a90edcb5eaaf811eaf5f20eb
parent1a4edc3cc873a3a3fc67edf3a036e5dba2ba3dc4
[MERGE] more refactoring of re_intuit_start()

This is the second merge commit of work I've done on re_intuit_start().
This one mostly concentrates on the block of code that looks for a start
class. It does a lot of reorganisation of the ordering of the various
nested if/elses, and by doing do manages to eliminate three labels and
associated gotos.

It also audits that block for UTF8 correctness, either fixing or
documenting areas where byte rather than char arithmetic was being
performed. At this point I've now done a basic audit of the whole
function.

It also swaps the start class and 'update BmUSEFUL' blocks. This seems
more logical, and makes the code simpler.

Finally, it cleans up and updates a lot of comments in the function
generally.

This merge has mainly been simplifying, cleaning up and fixing work.
I still have a big list of stuff that *could* be done, including further
optimisations.