gdi32: Don't add duplicate system_links entries

Paul TBBle Hampson Paul.Hampson at Pobox.com
Wed Apr 15 09:00:51 CDT 2009


On Wed, Apr 15, 2009 at 01:59:50PM +0900, Dmitry Timoshkov wrote:
> "Paul TBBle Hampson" <Paul.Hampson at Pobox.com> wrote:

> >+            /* Make sure we haven't already got an entry for this due to substitution */
> >+            duplicate = FALSE;
> >+            LIST_FOR_EACH_ENTRY(system_font_link, &system_links, SYSTEM_LINKS, entry)
> >+            {
> >+                if(!strcmpW(system_font_link->font_name, font_link->font_name))
> >+                {
> >+                    duplicate = TRUE;
> >+                    break;
> >+                }
> >+            }

> Font name comparison should be case insensitive. If there are other places
> that do that they should be fixed.

I'll fix that. I might have miscopied it, but I suspect I didn't, so
I'll add a patch to the series to fix the other instances.

> >+            if(duplicate)
> >+            {
> >+                TRACE("\tDuplicate font_link entry, ignoring\n");
> >+                HeapFree(GetProcessHeap(), 0, font_link);
> >+                continue;
> >+            }

> A '\t' at the start of a trace message doesn't improve readability.

It's consistent with the other path for this code, which is a
tab-indented listing of fonts being added to the entry.

If needs be I could rearrange the messages to not do so, but again this
would be a different patch.

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, B.Sc, LPI, MCSE
Very-later-year Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson at Pobox.com

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.5/au/
-----------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090416/b768ccb6/attachment.pgp>


More information about the wine-devel mailing list