Re: Questions about access.c

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 UTC