[Kst] ASCII config patch

Brisset, Nicolas Nicolas.Brisset at eurocopter.com
Mon Jan 31 18:58:47 CET 2005


>   I reviewed the patch and tried to apply it, but it's against some
old
> code and I can't easily merge it.  Only about half of it is applicable
> anymore.
Attached you will find the complete files I'm using locally. I
understand it is not the best way to work, but the changes are so
invasive that patching does not really make sense. For your information,
I started out from kst-1.1.0-dr1 and tried to take into account the
patches that you applied while I was also changing the datasource (I
took them from the mailing list). If you kdiff3 my code against either
HEAD or 1.1.0-dr1, I believe it is understandable. I agree that there
are probably many things that can be optimized, but to have a consistent
datasource with all these options really _does_ require many changes. If
I had been able to use CVS to commit the changes in smaller bits, it
would probably have been easier, but I don't have a CVS account and I
must go through a proxy when I'm at work, so that this wasn't so
practical either.
To sum up, I'm sorry about it but it looks like you are going to have to
use whole files again :-( Well, at least you will be able to get an
overview of the changed files, which probably was getting complicated
with partly applicable patches...

> 1) This code needs to be changed to use the configured delimiters I
think.
> (It was a bug in the old code too.)
>       } else if (tmpbuf[ch] == '#' || tmpbuf[ch] == '!' ||
>           tmpbuf[ch] == '/' || tmpbuf[ch] == ';' ||
>           tmpbuf[ch] == 'c') {
You are right, and I _have_ indeed removed it !! Looks like we're really
in merge hell ?

> 2) Why did you remove the calls to update the number of frames scalar?
Because I thought it wasn't needed as we set _numFrames in update(). But
I must admit I then forgot to check what it really did...

> 3) In general, there are lots of little optimizations to be done in
your
> changes before they go into CVS.
I know, I still have to learn some. I tried my best to not waste
resources, but there may be smarter ways.

>    Any chance you can merge in the changes from HEAD?  Otherwise,
please
> tell
> me exactly which revision of ascii.cpp you are using so I can merge it
> when I
> have time.
As I wrote above, I started from 1.1.0-dr1 and I tried to merge your
changes as well (like the test with bufread <= 0, notice it's there).
The only one I have removed is the _fieldList.clear() call which I don't
really understand. I added some comments in the code and I tried to
prepare it so that allowing to check whether variables have changed is
easy. I haven't done it though as I don't think it is very important,
and it could be very penalizing with frequent updates. I'd rather make
it optional, but I thought that could go into a second series of changes
:-)

To sum up, I hope you'll be able to work with whole files if patching is
not OK. I'm sorry I did so many changes at once, but I really had to
considering the number of "features" I introduced. Do not hesitate to
contact me if you have any question, I'd really like all this to get
into the official tree (and not in a separate source as Barth suggested,
I think it really belongs here even though I agree it needs to be
cleaned up a bit) and I'll do all that I can to help in that respect.

Nicolas


More information about the Kst mailing list