[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves
From: |
Richard Levitte - VMS Whacker |
Subject: |
Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste... |
Date: |
Wed, 18 Aug 2004 23:31:19 +0200 (CEST) |
In message <address@hidden> on Wed, 18 Aug 2004 10:46:10 -0600, Derek Scherger
<address@hidden> said:
derek> I dug a bit further into this one, extracting, decoding and
derek> uzipping the raw file data from the db and they do seem to have
derek> doubled up LF's. I don't know what I my get_linesep_conv hook
derek> was set to when those files were created and to complicate
derek> things I'm running monotone under cygwin, whether that has any
derek> implications or not I don't know.
What actually happens is that somewhere, split_into_lines() getc
called. That function uses a boost::tokenizer with the separator
functor boost::char_separator. This is used in a manner that much
reminds of a series of calls to strtok_r() like this:
char *tmp = NULL;
char *token;
while((token = strtok_r(input, "\r\n", &tmp))) {
input = NULL;
add_to_token_list(token);
}
Basically, it's regarding \r and \n as separate token (line)
separators. This means that the string "foo\r\n" will end up being
split in the 'lines' "foo" and "" by split_into_lines(), REGARDLESS of
what you wrote in get_linesep_conv, since split_into_lines() doesn't
take any such data.
-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.
--
Richard Levitte address@hidden
http://richard.levitte.org/
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., (continued)
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Adam Logghe, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Jon Bright, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Richard Levitte - VMS Whacker, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Tim Larson, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Jon Bright, 2004/08/18
- [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Bruce Stephens, 2004/08/18
- [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Bruce Stephens, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Richard Levitte - VMS Whacker, 2004/08/18
- [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Bruce Stephens, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Derek Scherger, 2004/08/18
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste...,
Richard Levitte - VMS Whacker <=
- Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Derek Scherger, 2004/08/18
- [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste..., Hans Fuchs, 2004/08/18