On Thu, Oct 7, 2010 at 9:25 AM, David Nicol <davidni...@gmail.com> wrote: > anyway I think I got the logic wrong: the function as given yesterday > would misparse > > PT1M1M
no it wouldn't! because of the post-increment on the how-to-parse 'M' state variable, the BIGM label can only get jumped to the first time, and not following T, W, D or H. Rearranging it to have a forward jump would lose this. Better to have an initial sanity-check pass to verify that all non-numerics are expected and in an acceptable order, and switch one of the kinds of Ms to some other letter at that time, then zip through the pieces with a case statement with no logic in it at all, just stacked multiplications. Goffredo -- this thinking-out-loud is not noise? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html