[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] includes, XARLIB and camtypes.h

I think I am going to have to untangle a bit of it.  Relying on e.g.
camfiltr.h to include ccfile.h is a bit nasty and there are quite a few
other similar things (list.h, listitem.h, fixmem.h, memblk.h etc) that
are indirectly included in camtypes.h but are so "standard" that it
makes more sense to me to include them directly and use your script
afterwards to remove the uses that are then redundant.

I've got the fixstr updates and will get the latest gendeps before
trying to use it.


-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Alex Bligh
Sent: 09 June 2006 12:05
To: dev@xxxxxxxxxxxxxx
Cc: Alex Bligh
Subject: Re: [XaraXtreme-dev] includes, XARLIB and camtypes.h


Gerry Iles wrote:
> That's more like it.  That updated a lot of the files in XarLib and
> there are build problems...
> I should be able to sort them out fairly easily but they mostly seem
> be caused by include spaghetti (e.g. camresource.cpp needs ccfile.h so
> that it will compile but that is currently included via camfiltr.h
> possibly other things) that isn't part of XarLib.  I should be able to
> sort this out by explicitly including files like ccfile.h directly in
> camtypes.h rather than relying on another header to pull them in.
> Presumably then your removal script can be run again to remove
> from all the other places it gets included.

I removed ALL instances of ccfile.h being included and indeed any
other headers indirectly included in camtypes (not just the
direct ones).

camtypes has a list of what was removed down the bottom (commented
out). Equally you can just look at PreComp/.deps/camtypes.h.gch.Po

> To help this, is there an easy way (presumably using one of your
> scripts) to tell how a particular header file is being included?

Something like
   Scripts/gendeps.pl -e -i ccfile.h PreComp/.deps/camtypes.h.Po
will tell you what files ccfile.h is included by, whereas
   Scripts/gendeps.pl -e -t ccfile.h PreComp/.deps/camtypes.h.Po
will tell you what files include ccfile.h

Note the above will restrict itself to files inside camtypes.h.
If you want all files in the project, replace the last parameter
with */.deps/*.Po

There is some distinct horribleness here. For instance, coord.h
is somewhat circularly including camtypes.h. This should not be
necessary. By definition, when compiling any .cpp file, camtypes
is the first thing included, so it will always already have been
included. I have not yet tried spaghetti chopping inside
camtypes so you might want to have a go. My own view is no
files within camtypes should include camtypes.

BTW please get the latest fix to fixstr.xxx or things will randomly
segv, and the latest gendeps.