diff options
author | Caleb Michael Moore <cmoore@src.gnome.org> | 2004-11-17 05:30:14 +0000 |
---|---|---|
committer | Caleb Michael Moore <cmoore@src.gnome.org> | 2004-11-17 05:30:14 +0000 |
commit | fbb6780313c44fd84bea4db3fdced77ce1a4bd1b (patch) | |
tree | afa509ce0232929fb6bfb1075e9393e6b16367b5 /rsvg-mask.c | |
parent | 03d4b91975aa49e75ecd2f419d9e04170a31a446 (diff) | |
download | librsvg-fbb6780313c44fd84bea4db3fdced77ce1a4bd1b.tar.gz |
interfile linking, w00t
Diffstat (limited to 'rsvg-mask.c')
-rw-r--r-- | rsvg-mask.c | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/rsvg-mask.c b/rsvg-mask.c index b64bf011..918b5b24 100644 --- a/rsvg-mask.c +++ b/rsvg-mask.c @@ -259,22 +259,18 @@ rsvg_mask_parse (const RsvgDefs * defs, const char *str) while (g_ascii_isspace (*p)) p++; - if (*p == '#') + for (ix = 0; p[ix]; ix++) + if (p[ix] == ')') + break; + + if (p[ix] == ')') { - p++; - for (ix = 0; p[ix]; ix++) - if (p[ix] == ')') - break; - - if (p[ix] == ')') - { - name = g_strndup (p, ix); - val = rsvg_defs_lookup (defs, name); - g_free (name); - - if (val && val->type == RSVG_DEF_MASK) - return (RsvgDefsDrawable *) val; - } + name = g_strndup (p, ix); + val = rsvg_defs_lookup (defs, name); + g_free (name); + + if (val && val->type == RSVG_DEF_MASK) + return (RsvgDefsDrawable *) val; } } return NULL; @@ -408,22 +404,18 @@ rsvg_clip_path_parse (const RsvgDefs * defs, const char *str) while (g_ascii_isspace (*p)) p++; - if (*p == '#') + for (ix = 0; p[ix]; ix++) + if (p[ix] == ')') + break; + + if (p[ix] == ')') { - p++; - for (ix = 0; p[ix]; ix++) - if (p[ix] == ')') - break; - - if (p[ix] == ')') - { - name = g_strndup (p, ix); - val = rsvg_defs_lookup (defs, name); - g_free (name); - - if (val && val->type == RSVG_DEF_CLIP_PATH) - return (RsvgDefsDrawable *) val; - } + name = g_strndup (p, ix); + val = rsvg_defs_lookup (defs, name); + g_free (name); + + if (val && val->type == RSVG_DEF_CLIP_PATH) + return (RsvgDefsDrawable *) val; } } return NULL; |