… | |
… | |
843 | { |
843 | { |
844 | const rxvt_enumerate_closure *data = (const rxvt_enumerate_closure *)closure; |
844 | const rxvt_enumerate_closure *data = (const rxvt_enumerate_closure *)closure; |
845 | |
845 | |
846 | if (*quarks == NULLQUARK) return False; |
846 | if (*quarks == NULLQUARK) return False; |
847 | |
847 | |
848 | // if the quark list starts with a tighly bound quark, we skip it, |
848 | // if the quark list starts with a tightly bound quark, we skip it, |
849 | // as it is the exactly matched the prefix. Otherwise, it matched because |
849 | // as it exactly matched the prefix. Otherwise, it matched because |
850 | // it started with "*", in which case we assuime the prefix is part |
850 | // it started with "*", in which case we assume the prefix is part |
851 | // of the "*". |
851 | // of the "*". |
852 | if (*bindings == XrmBindTightly) |
852 | if (*bindings == XrmBindTightly) |
853 | { |
853 | { |
854 | ++quarks, ++bindings; // skip if this is a fixed prefix, rather than a *-match |
854 | ++quarks, ++bindings; // skip if this is a fixed prefix, rather than a *-match |
855 | if (*quarks == NULLQUARK) return False; |
855 | if (*quarks == NULLQUARK) return False; |
… | |
… | |
869 | if (*quarks == NULLQUARK) return False; |
869 | if (*quarks == NULLQUARK) return False; |
870 | } |
870 | } |
871 | |
871 | |
872 | char *pattern; |
872 | char *pattern; |
873 | if (quarks[1] == NULLQUARK) |
873 | if (quarks[1] == NULLQUARK) |
874 | pattern = XrmQuarkToString (quarks[0]); // single component, fats path |
874 | pattern = XrmQuarkToString (quarks[0]); // single component, fast path |
875 | else |
875 | else |
876 | { |
876 | { |
877 | // multiple components, slow path - should be rare, to don't optimize for speed |
877 | // multiple components, slow path - should be rare, don't optimize for speed |
878 | int size = 0; |
878 | int size = 0; |
879 | |
879 | |
880 | for (int i = 0; quarks[i] != NULLQUARK; ++i) |
880 | for (int i = 0; quarks[i] != NULLQUARK; ++i) |
881 | size += strlen (XrmQuarkToString (quarks[i])) + 1; |
881 | size += strlen (XrmQuarkToString (quarks[i])) + 1; |
882 | |
882 | |