<?xml version="1.0"?>
<rss version="2.0">
<channel>
	<title>My blogspace - Kjartan Maraas : 2005-03-16</title>
	<link>http://www.gnome.org/~kmaraas/blog/2005-03-16</link>
	<description>Random notes about life, work and play</description>
	<language>en</language>
	<managingEditor>kmaraas@gnome.org</managingEditor>
	<webMaster>kmaraas@gnome.org</webMaster>
	<image>
		<url>http://www.gnome.org/img/gnome-16.png</url>
		<title>My blogspace - Kjartan Maraas : 2005-03-16</title>
		<link>http://www.gnome.org/~kmaraas/blog/2005-03-16</link>
		<width>16</width>
		<height>16</height>
	</image>
	<item>
		<title>And the snow came late...</title>
		<guid isPermaLink="true">http://www.gnome.org/~kmaraas/blog/2005-03-16</guid>
		<link>http://www.gnome.org/~kmaraas/blog/2005-03-16</link>
		<description>&lt;p&gt;
So it looks like the 2.8.3 release went mostly ok. The 2.10.0
work definitely rocks and &lt;a href=&quot;http://live.gnome.org/&quot;&gt;the wiki&lt;/a&gt;
is really alive and cooking these days.
&lt;p&gt;
After 2.8.x I&apos;ve spent most of my time running valgrind on GNOME and
it&apos;s looking good so far. A few leaks found and some other cases of
bogus memory management fixed. I also started porting some pieces
away from the deprecated widgets and doing general cleanups in various
modules. There&apos;s a lot of cruft all over the place that should be
excised.
&lt;p&gt;
On the topic of header includes - we have tons of files that do
things wrong here. It would be nice if the coding style guidelines
for GNOME said something about this in my opinion.
&lt;br&gt;
The de-facto standard seems to be to:
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;include &amp;lt;config.h&amp;gt; first in every C-file
&lt;li&gt;avoid having &amp;lt;config.h&amp;gt; in other headers
&lt;li&gt;start at the bottom of the stack when ordering includes
&lt;/ul&gt;
&lt;br&gt;
This gives something like what we see in GTK+:
&lt;br&gt;
&lt;code&gt;
#include &amp;lt;config.h&amp;gt;&lt;br&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br&gt;
#include &amp;lt;string.h&amp;gt;&lt;br&gt;
#include &amp;lt;glib.h&amp;gt;&lt;br&gt;
#include &amp;lt;glib/gprintf.h&amp;gt;&lt;br&gt;
#include &amp;lt;gobject/gvaluecollector.h&amp;gt;&lt;br&gt;
#include &quot;gtkalias.h&quot;&lt;br&gt;
#include &quot;gtktreemodel.h&quot;&lt;br&gt;
#include &quot;gtktreeview.h&quot;&lt;br&gt;
#include &quot;gtktreeprivate.h&quot;&lt;br&gt;
#include &quot;gtkmarshalers.h&quot;&lt;br&gt;
&lt;/code&gt;
&lt;br&gt;
Also, I think it&apos;s mostly agreed on that including the specific
header you need from a library is better than to include the catch-all
headers like &amp;lt;gtk/gtk.h&amp;gt;, &amp;lt;libgnome/libgnome.h&amp;gt;,
&amp;lt;gnome.h&amp;gt; and so on.&lt;br&gt;
It definitely makes it clearer what parts of a library is being used
in the file at least, which is a good thing when trying to port to
newer widgets later on.
&lt;/p&gt;
&lt;p&gt;
The sparsing, valgrinding and cruft-excising tour is coming to a module
near you real soon now (tm)
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
Sven Neumann pointed out to me that using the specific
headers was ok within a library but that the catch-all headers are
the documented way to use GTK+ at least. Thanks for that clarification.
&lt;br&gt;
The point I tried to make was that there&apos;s room for improvement when
it comes to following *any* standard from what little I&apos;ve seen in
CVS.
&lt;/p&gt;

</description>
		<pubDate>Wed, 16 Mar 2005 20:45 -0400</pubDate>
	</item>
</channel>
</rss>
