Re: info:gcc bugfix



Hi,

Haven't seen anyone reply to this yet, so I figured I'd offer some
feedback.

On Thu, 2005-11-03 at 08:37 +0100, Krzysztof Foltman wrote:
> Looks like some info pages (like one for gcc) use (DIR) instead of
> (dir), which causes a blowup in node2page. I've both fixed the problem
> (don't know if it's THE correct solution, but it seems to work), and
> added an error message for broken links.

> ChangeLog:
>  * make comparisons with "(dir)" case-insensitive
You're using g_strcasecmp for comparison.  This is depreciated and
shouldn't be used in new code [1].  Not sure of the best route around
this, but I have used g_utf8_strup and then compared when I've needed
it.  Someone else can probably offer a better work around.

>  * g_error for missing nodes in node2page
I don't really know the info parser code (just started looking at it)
but this seems sensible.

>  * added initialization of nodes2offsets, so that when there's no
> PAGE_TAG_TABLE, the crash is less mysterious (it also silences a
> compile-time warning)
This was commited to CVS as part of a general cleanup of compiler
warnings

>  * added assertion for nodes2offsets (so that the
> lack of PAGE_TAG_TABLE is more evident)
Again, looks sensible although I'm not sure an asserts the way to go.
Maybe make it fail gracefully if PAGE_TAG_TABLE doesn't exist (i.e. go
back to the previous page or the toc).

> 
> Hope it's OK, first patch and all :)
> 
> Krzysztof
> _______________________________________________
> gnome-doc-devel-list mailing list
> gnome-doc-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-doc-devel-list

As I say though, I'm not familiar with the info-parser code, so someone
more knowledgable may have something else to say...

Don

[1]
http://developer.gnome.org/doc/API/2.0/glib/glib-String-Utility-Functions.html#g-strcasecmp




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