W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2009

Re: Questions about access.c

From: Arnaud Desitter <arnaud02@users.sourceforge.net>
Date: Fri, 3 Jul 2009 14:27:10 +0100
Message-ID: <a240ddd00907030627t5441b7adq16fc1a50d8a1be1d@mail.gmail.com>
To: aditsu <aditsu@yahoo.com>
Cc: html-tidy@w3.org
Hi,

access.c was not part of tidy originally and was originally written
seperately. You probably noticed that its quality is not as good as
other parts of tidy.

On 03/07/2009, aditsu <aditsu@yahoo.com> wrote:
> [resending after subscribing]
>
> Hi, I was looking through the code, and I found a couple of things that I
> didn't quite understand:
> - why does GetRgb use strstr with color names?

It looks wrong. strcmp should be used.

> - when checking for d-links in CheckImage (lines 821 and 852) why does it
> use strcmp? doesn't seem to match the comments

It looks wrong as well.

> - also in CheckImage, what's up with the empty ifs at line 861?

Not sure. Check the history in CVS.

> - getTextNode doesn't seem to do anything for non-text nodes, shouldn't the
> content traversal be in an "else" branch?

The code looks pretty bad as well.

There is no real point in fixing the code it if some test cases are
not added to the test suite to illustrate why the code change is
useful.

There are a bunch of patches in the tracker waiting to be merged. I
have very little time for tidy these days unfortunately.

Regards,

>
> Could somebody take a look?
>
> Thanks
> Adrian
> --
> View this message in context: http://www.nabble.com/Questions-about-access.c-tp24313470p24313470.html
> Sent from the w3.org - html-tidy mailing list archive at Nabble.com.
>
>
>
>
Received on Friday, 3 July 2009 13:30:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:59 GMT