Re: ostringstream question

2002-03-14 Thread Andre Poenitz
On Thu, Mar 14, 2002 at 06:32:29PM +, Angus Leeming wrote: > So did I quote you incorrectly? (below) > > > Do I not remember André telling me that code like this is very bad > > practise: > > > > ostringstream word; > > word << "some string"; > > ... > > word.str(""); > > > > because resettin

Re: ostringstream question

2002-03-14 Thread Angus Leeming
On Thursday 14 March 2002 6:17 pm, Andre Poenitz wrote: > On Thu, Mar 14, 2002 at 06:15:36PM +, Angus Leeming wrote: > > We certainly haven't used "ends" at all. > > 'ends' is not necessary when using ostringstreams. And one does not have to > handle freezing. > > Andre' So did I quote you

Re: ostringstream question

2002-03-14 Thread Andre Poenitz
On Thu, Mar 14, 2002 at 06:15:36PM +, Angus Leeming wrote: > We certainly haven't used "ends" at all. 'ends' is not necessary when using ostringstreams. And one does not have to handle freezing. Andre' -- André Pönitz .. [EMAIL PROTECTED]

Re: ostringstream question

2002-03-14 Thread Angus Leeming
On Thursday 14 March 2002 6:05 pm, Kuba Ober wrote: Kuba, we have been wondering about whether our use of stringstream was correct. It may well be that it isn't, hence the problems I have been occasionally suffereing from with my (DEC Alpha) implementation of the STL. We certainly haven't use

Re: ostringstream question

2002-03-14 Thread Kuba Ober
On Thursday 07 March 2002 13:10, you wrote: > Do I not remember André telling me that code like this is very bad > practise: > > ostringstream word; > word << "some string"; > ... > word.str(""); > > because resetting the the pointers inside the ostringstream isn't > guaranteed? Instead he suggest

Re: ostringstream question

2002-03-12 Thread Andre Poenitz
On Thu, Mar 07, 2002 at 03:15:15PM +0100, Lars Gullik Bjønnes wrote: > I actually thingk that the whole functions should be rewritten into > two parts... one part that just emmits "lines" to an ostream, and > another that takes this stream and breaks overlong lines. Probably yes. Especially if on

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Juergen Vigna <[EMAIL PROTECTED]> writes: | On 07-Mar-2002 Lars Gullik Bjønnes wrote: > >> What about this patch... > | Well a fast look would tell me that it could work. Just one thing | does lyxstring have the push_back() functionallity? sure it does. -- Lgb

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 07 March 2002 2:15 pm, Lars Gullik Bjønnes wrote: >> I actually thingk that the whole functions should be rewritten into >> two parts... one part that just emmits "lines" to an ostream, and >> another that takes this stream and breaks overlo

Re: ostringstream question

2002-03-07 Thread Juergen Vigna
On 07-Mar-2002 Lars Gullik Bjønnes wrote: > What about this patch... Well a fast look would tell me that it could work. Just one thing does lyxstring have the push_back() functionallity? Jug -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen Vigna

Re: ostringstream question

2002-03-07 Thread Angus Leeming
On Thursday 07 March 2002 2:15 pm, Lars Gullik Bjønnes wrote: > I actually thingk that the whole functions should be rewritten into > two parts... one part that just emmits "lines" to an ostream, and > another that takes this stream and breaks overlong lines. > > Hmm... > > What about this patch

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Juergen Vigna <[EMAIL PROTECTED]> writes: | On 07-Mar-2002 Lars Gullik Bjønnes wrote: > >> well yes... _but_ that is not absolutely true I guess... >> >> I think we can have an algorithm that is almost as good without the >> word stringstream complexity. >> >> (and the best would be to have a

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 07 March 2002 1:34 pm, Angus Leeming wrote: >> > a patch like this: (I have not even tried to compile it...) >> >> SIGH would you like me to have a go? Ok. > | Actually, having read Jürgen's response, I'm not going to do this. I don't

Re: ostringstream question

2002-03-07 Thread Juergen Vigna
On 07-Mar-2002 Lars Gullik Bjønnes wrote: > well yes... _but_ that is not absolutely true I guess... > > I think we can have an algorithm that is almost as good without the > word stringstream complexity. > > (and the best would be to have a lyxasciistreambuf...) Well we can have this for 1.

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 07 March 2002 1:22 pm, Lars Gullik Bjønnes wrote: >> Angus Leeming <[EMAIL PROTECTED]> writes: >> >> | On Thursday 07 March 2002 12:10 pm, Angus Leeming wrote: >> >> Do I not remember André telling me that code like this is very bad | prac

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Juergen Vigna <[EMAIL PROTECTED]> writes: | On 07-Mar-2002 Lars Gullik Bjønnes wrote: >> - buffer << word.str() << "\n"; >> - word.str(""); >> + buffer << "\n"; >> + last_word_l

Re: ostringstream question

2002-03-07 Thread Angus Leeming
On Thursday 07 March 2002 1:34 pm, Angus Leeming wrote: > > a patch like this: (I have not even tried to compile it...) > > SIGH would you like me to have a go? Ok. Actually, having read Jürgen's response, I'm not going to do this. I don't want to replace one bug with another! A

Re: ostringstream question

2002-03-07 Thread Angus Leeming
On Thursday 07 March 2002 1:22 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | On Thursday 07 March 2002 12:10 pm, Angus Leeming wrote: > >> Do I not remember André telling me that code like this is very bad practise: > >> > >> ostringstream word; > >> word << "

Re: ostringstream question

2002-03-07 Thread Juergen Vigna
On 07-Mar-2002 Lars Gullik Bjønnes wrote: > - buffer << word.str() << "\n"; > - word.str(""); > + buffer << "\n"; > + last_word_length = 0; Well this patch will most probably f

Re: ostringstream question

2002-03-07 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 07 March 2002 12:10 pm, Angus Leeming wrote: >> Do I not remember André telling me that code like this is very bad practise: >> >> ostringstream word; >> word << "some string"; >> ... >> word.str(""); > | or even > | word = ostringstream()

Re: ostringstream question

2002-03-07 Thread Angus Leeming
On Thursday 07 March 2002 12:10 pm, Angus Leeming wrote: > Do I not remember André telling me that code like this is very bad practise: > > ostringstream word; > word << "some string"; > ... > word.str(""); or even word = ostringstream(); Angus