Re: [elinks-dev] [resent][PATCH] elinks 0.12pre3 fails to search double-width characters
"Yuriy M. Kaminskiy" writes: > Ok, fixed. Thanks, pushed to elinks-0.12. > Eww, fine. An expression of disgust? pgpT71OD2mSwi.pgp Description: PGP signature ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [resent][PATCH] elinks 0.12pre3 fails to search double-width characters
Kalle Olavi Niemitalo wrote: >> PPS did not checked with --disable-utf-8; should be no-op with gcc >> warning about "cond. always false", I think. > In ELinks, configure --enable-debug adds -Werror Ok, fixed. > ELinks is currently licensed under GPLv2 only. I hope we can > eventually change the licence to also allow later versions of > GPL and permit linking with OpenSSL. Do you allow such > relicensing for your patch? (A more permissive licence would be > fine too.) I'm perfectly fine with GPL v2-or-later (or, considering amount of added code ;-), any other OSL-approved license too). > Do you give permission to add your name and email address to the > commit information, to the AUTHORS file, and similar places > (e.g. a list of contributors in release notes)? Eww, fine. Fixes failure to search for more than one double-width character. --- elinks-0.12~pre3.orig/src/viewer/text/search.c +++ elinks-0.12~pre3/src/viewer/text/search.c @@ -174,6 +174,12 @@ get_srch(struct document *document) if (document->data[y].chars[x].attr & SCREEN_ATTR_UNSEARCHABLE) continue; +#ifdef CONFIG_UTF8 +/* skip double-width char placeholders */ +if (c == UCS_NO_CHAR) + continue; +#endif + if (c > ' ') { add_srch_chr(document, c, x, y, 1); continue; ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [resent][PATCH] elinks 0.12pre3 fails to search double-width characters
"Yuriy M. Kaminskiy" writes: > I noticed that search for more than 1 double-width (japanese) > character fails (search for single char works), and found that get_srch > don't skip placeholders (UCS_NO_CHAR) for double-width character. > Attached patch should solve this problem. That is indeed a bug and your patch fixes it. > PS just in case, same bug was in 0.12pre2 (not sure about earlier releases). ELinks 0.12pre1 has the same bug. The elinks-0.11 branch does not support fullwidth characters. > PPS did not checked with --disable-utf-8; should be no-op with gcc > warning about "cond. always false", I think. This appears to cause a warning with gcc-4.1 and gcc-4.2 but not with gcc-4.3. In ELinks, configure --enable-debug adds -Werror to CFLAGS, so there must not be any warnings. Please add #ifdef CONFIG_UTF8. ELinks is currently licensed under GPLv2 only. I hope we can eventually change the licence to also allow later versions of GPL and permit linking with OpenSSL. Do you allow such relicensing for your patch? (A more permissive licence would be fine too.) Do you give permission to add your name and email address to the commit information, to the AUTHORS file, and similar places (e.g. a list of contributors in release notes)? The cia.vc and ohloh.com web sites are already collecting this information and others might do so in the future. pgp7b4JmfSsr1.pgp Description: PGP signature ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
[elinks-dev] [resent][PATCH] elinks 0.12pre3 fails to search double-width characters
[first message seems lost (not appear in any of ml archives), if this is duplicate - sorry.] Hello! I noticed that search for more than 1 double-width (japanese) character fails (search for single char works), and found that get_srch don't skip placeholders (UCS_NO_CHAR) for double-width character. Attached patch should solve this problem. PS just in case, same bug was in 0.12pre2 (not sure about earlier releases). PPS did not checked with --disable-utf-8; should be no-op with gcc warning about "cond. always false", I think. --- elinks-0.12~pre3.orig/src/viewer/text/search.c +++ elinks-0.12~pre3/src/viewer/text/search.c @@ -174,6 +174,10 @@ get_srch(struct document *document) if (document->data[y].chars[x].attr & SCREEN_ATTR_UNSEARCHABLE) continue; +/* skip double-width char placeholders */ +if (c == UCS_NO_CHAR) + continue; + if (c > ' ') { add_srch_chr(document, c, x, y, 1); continue; ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev