Joe Korty wrote: > This release of the bitmap parser/printer continues the cycle of making > ever-smaller changes to the base code. > > The most significant change this time around is to be sure every > character in the string is scanned for correctness. In the previous > version, the scan would stop on the first whitespace character following > a non-whitespace character. There was no determination made if that was > the start of either embedded or trailing whitspace -- it was assumed to > be trailing. > > I gradually came to feel that examining the whole string was important, as > the parser does not return a pointer to where it stopped as the string(3) > family does, so it is not possible for the caller to easily determine > if the condition stopping the scan was reasonable or not. > > ChangeLog: > o remove trailing whitespace early termination. > o add leading / embedded / trailing whitespace tests. > o 'extern' not needed on prototypes (Bill Irwin) > o made terse variable names readable. > o continued the reduction of the algorithm to simpler forms. > > This release concludes my contributions to this patch, other than changes > driven by user requests and experience. > > Against 2.6.1-mm4. > > Joe Joe, I've attatched a small patch with some *small* changes, and the addition of a whole lotta comments. I'd like to see what you think. Changes: 1) Added a missing '"' in the comment for the bitmap_parse function 2) Renamed 'oc' to 'old_c' for readability 3) Remove "totaldigits == 0" check at the end of bitmap_parse. I believe this check is redundant. The only way that totaldigits could be 0 at the end of the function is if ndigits is also 0 (because they're both incremented at the same time), and this condition is already checked for at the end of each chunk parsed. Is this correct? Additions: 4) A whole bunch of comments. Are these all correct? None of the things in my patch (with the possible exception of #3) change the functionality of the code, which looks great. Andrew, I agree with Paul's "thumbs-up" of Joe's patch. My patch is solely meant to increase the readability of the bitmap_parse function. Cheers! -Matt