Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 3:34 pm, Martin Vermeer wrote: > Here it is. Tested as well as I could, but give it hell. > If still alive after that, commit it. It seemed Ok to me, so I committed it, although I admit I didn't try /really/ hard. Keep up the good work and I look forward to Counters for

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Monday 12 August 2002 6:01 pm, Angus Leeming wrote: | > On Monday 12 August 2002 6:13 pm, Lars Gullik Bjønnes wrote: | > > The real problem comes when you allocate _two_ pointers. | | Lars, since we're on this subject, I'd like to make the following

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Martin Vermeer
On Mon, Aug 12, 2002 at 08:02:32PM +0100, Angus Leeming wrote: > On Monday 12 August 2002 8:03 pm, Martin Vermeer wrote: > > > Why are you changing back something I just changed? > > Because it crashed... see Angus' comment. > > > > I said that your change reset() -> reset("") will resul

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 6:01 pm, Angus Leeming wrote: > On Monday 12 August 2002 6:13 pm, Lars Gullik Bjønnes wrote: > > The real problem comes when you allocate _two_ pointers. Lars, since we're on this subject, I'd like to make the following change. Are you happy now that this is safe? I'll

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 8:03 pm, Martin Vermeer wrote: > > Why are you changing back something I just changed? > Because it crashed... see Angus' comment. I said that your change reset() -> reset("") will result in an instant crash. Angus

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Martin Vermeer
On Mon, Aug 12, 2002 at 05:33:44PM +0200, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | Index: buffer.C > | === > | RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v > | retrieving revision 1.367 > | diff

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 6:13 pm, Lars Gullik Bjønnes wrote: > The real problem comes when you allocate _two_ pointers. And in this case I wrap by new inside a boost::scoped_ptr, so it's guaranteed to be safe. Just to check, here's the code snippet. Angus class Counters; class Buffer { pr

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Monday 12 August 2002 4:36 pm, Lars Gullik Bjønnes wrote: >> Angus Leeming <[EMAIL PROTECTED]> writes: >> | == >> | +#include "counters.h" >> | >> | Buffer::Buffer(string const & file, bool ronly) >> | >> |: niceFile(true), lyx_clean(true), b

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 4:36 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | == > | +#include "counters.h" > | > | Buffer::Buffer(string const & file, bool ronly) > | > | : niceFile(true), lyx_clean(true), bak_clean(true), > | > | unnamed(false), dep_c

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | Index: buffer.C | === | RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v | retrieving revision 1.367 | diff -u -p -r1.367 buffer.C | --- buffer.C 2002/08/12 00:15:16 1.367 | +++ buffer.C

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | == | +#include "counters.h" > | Buffer::Buffer(string const & file, bool ronly) | : niceFile(true), lyx_clean(true), bak_clean(true), | unnamed(false), dep_clean(0), read_only(ronly), | - filename_(file), users(0) | + file

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 3:34 pm, Martin Vermeer wrote: > Here it is. Tested as well as I could, but give it hell. > If still alive after that, commit it. Did you really test it against current CVS? - par->counters().reset(); + buf->counters().reset(""

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Andre Poenitz
On Mon, Aug 12, 2002 at 03:39:18PM +0100, Angus Leeming wrote: > U. Would anyone mind terribly if I changed buffer.[Ch]: > > buffer.h > == > -#include "counters.h" > +class Counters; Seems worthwhile. Andre' -- Those who desire to give up Freedom in order to gain Security, will not ha

Re: PATCH: Per-buffer counters, updateCounters clean-up

2002-08-12 Thread Angus Leeming
On Monday 12 August 2002 3:34 pm, Martin Vermeer wrote: > Here it is. Tested as well as I could, but give it hell. > If still alive after that, commit it. > > ChangeLog: > > 2002-08-12 Martin Vermeer <[EMAIL PROTECTED]> > > * buffer.C: > buffer.h: > lyxtext.h: > paragraph.