On Fri, Feb 14, 2020 at 7:06 AM Robert Helling <[email protected]> wrote:
>
> it almost does: It has an Obiwan error: when the stepping back finds a ‘\0’, 
> it returns a pointer to the 0 rather than the next character. But that’s easy 
> to fix.

Ok.

> I was wondering if a better patch might be in another direction that keeps 
> the “one string per entry” property: We could save those events as something 
> like “modechange:OC” and then take a bit more effort when parsing those. What 
> do you think?

Well, I'd prefer to not mess with the parsing code too  much, since it
generally has worked.

And the main use is actually for things like the notes section etc,
where you get a whole line (or multiple lines!) in the string. So
prefixes etc aren't wonderful.

The "modechange" thing should never have been a string in the first
place - it's not freeform, and it doesn't have spaces or anything like
that in it.

So it was not just violating the "don't do multiple strings for
different things on the same line" format, it was unnecessary to begin
with.

For example, we don't make other things strings just because they
aren't simple numbers.

Anyway, I'll try to come up with something, including a fix for old
files (ie maybe "if name and modechange matches, then the name is
corrupt, lets fix it up").

              Linus
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to