[PATCH] Improve the check for "built-ins" in fontpath

Rémi Cardona remi at gentoo.org
Mon Sep 14 15:08:42 PDT 2009


Le 14/09/2009 19:44, Alan Coopersmith a écrit :
> Why split the string twice in this function?  Why not something
> more like (untested, diff vs. master):

> +    if (!builtins_seen) {
> +       *cp++ = BUILTIN_PATH_LEN;
> +       memcpy(cp, BUILTIN_PATH, BUILTIN_PATH_LEN);
> +       num++;
> +    }
>

Yeah, I had something like that in mind, but I wasn't 100% sure I 
understood the rest of the function so I decided it was safer to muck 
around with plain strings rather than the weird string array format used 
later.

> There's also the question of whether xset fp should be able to
> remove built-ins from the path - perhaps the whole thing should
> move into SetFontPathElements, so it's handled every time the font
> path is set.

Again, I tried to see what was going further down, but that really 
scared me so I stuck with a simple approach.

Rémi


More information about the xorg-devel mailing list