Concerning the memcpy: I don't really see the need for such low-level
stuff in that place. Even if it is safe, nobody can check it by a
glance. I think it is *much* wiser to trust the compiler to put in the
right code in and use 'higher level' operation (such as assignments of
whole objects etc). The assignment will probably get translated to exactly
the same memcpy, but if you trust the compilers, you can assume that the
binary will be correct - on all architectures, regardless of fancy
memory usage, pointer representation and the like.
I once was at a point to have a closer look at the LyX sources and I
really wondered why there are all these funny pointers and direct memory
access operations in it. Using *real* C++ (not 'C with classes') should
make all but a few low level operations unnecessary and the occurence of
memory-related bug less likely. No, speed is no issue, since the C++
'overhead' will occur only at compilation time, the binaries might even
be identical. The code is usually even more compact, easier to
read and thus less error prone.
Anyway, my conclusion from my expedition into the guts of LyX was that I
do not really want to fiddle around with it and I rather stick to being
a user of some really nice program (with occasional unexpected behaviour)
than to become once more aquainted with "the good ol' way of hackin' in C"
(now that I know that C++ can be real fun).
Andre'
--
Andre' Poenitz, TU Chemnitz, Fakultaet fuer Mathematik
[EMAIL PROTECTED] ... +49 3727 58 1381