Hello community, here is the log from the commit of package grep checked in at Thu May 17 11:38:38 CEST 2007. -------- --- grep/grep.changes 2007-05-07 15:41:34.000000000 +0200 +++ /mounts/work_src_done/STABLE/grep/grep.changes 2007-05-15 15:00:59.000000000 +0200 @@ -1,0 +2,5 @@ +Tue May 15 15:00:53 CEST 2007 - schwab@suse.de + +- Fix some icase bugs. + +------------------------------------------------------------------- New: ---- icase.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grep.spec ++++++ --- /var/tmp/diff_new_pack.xT2373/_old 2007-05-17 11:38:34.000000000 +0200 +++ /var/tmp/diff_new_pack.xT2373/_new 2007-05-17 11:38:34.000000000 +0200 @@ -19,7 +19,7 @@ Autoreqprov: on PreReq: %{install_info_prereq} Version: 2.5.2 -Release: 1 +Release: 3 Summary: Print lines matching a pattern Source: grep-%{version}.tar.bz2 Patch: grep-%{version}.diff @@ -29,6 +29,7 @@ Patch4: wordmatch.patch Patch5: grep-2.5.1a-mbcset.diff Patch6: xfail-tests.diff +Patch7: icase.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -55,6 +56,7 @@ %patch4 %patch5 %patch6 +%patch7 %build %{suse_update_config -f} @@ -96,6 +98,8 @@ /usr/share/locale/*/LC_MESSAGES/grep.mo %changelog +* Tue May 15 2007 - schwab@suse.de +- Fix some icase bugs. * Mon May 07 2007 - schwab@suse.de - Try to get something sensible out of CVS. * Thu Mar 22 2007 - schwab@suse.de ++++++ icase.diff ++++++ --- src/grep.c.~1.121.~ 2006-08-25 17:43:30.000000000 +0200 +++ src/grep.c 2007-05-15 14:13:24.000000000 +0200 @@ -789,28 +789,10 @@ print_line_middle (const char *beg, cons size_t match_offset; const char *cur = beg; const char *mid = NULL; - char *buf; /* XXX */ - const char *ibeg; /* XXX */ - - if (match_icase) /* XXX - None of the -i stuff should be here. */ - { - int i = lim - beg; - - ibeg = buf = (char *) xmalloc(i); - /* This can't possibly be correct with UTF-8, - but it's equivalent to what was there so far. */ - while (--i >= 0) - buf[i] = tolower(beg[i]); - } - else - { - buf = NULL; - ibeg = beg; - } while ( lim > cur - && ((match_offset = execute(ibeg, lim - beg, &match_size, - ibeg + (cur - beg))) != (size_t) -1)) + && ((match_offset = execute(beg, lim - beg, &match_size, + beg + (cur - beg))) != (size_t) -1)) { char const *b = beg + match_offset; @@ -854,9 +836,6 @@ print_line_middle (const char *beg, cons cur = b + match_size; } - if (buf) - free(buf); /* XXX */ - if (only_matching) cur = lim; else if (mid) --- src/search.c.~1.40.~ 2005-12-12 16:26:59.000000000 +0100 +++ src/search.c 2007-05-15 14:49:38.000000000 +0200 @@ -192,11 +192,18 @@ GEAcompile (char const *pattern, size_t const char *sep; size_t total = size; char const *motif = pattern; + static char translate[NCHAR]; -#if 0 - if (match_icase) - syntax_bits |= RE_ICASE; + if (match_icase +#ifdef MBS_SUPPORT + && MB_CUR_MAX == 1) #endif + { + int i; + for (i = 0; i < NCHAR; i++) + translate[i] = ISUPPER (i) ? TOLOWER (i) : i; + } + re_set_syntax (syntax_bits); dfasyntax (syntax_bits, match_icase, eolbyte); @@ -224,6 +231,11 @@ GEAcompile (char const *pattern, size_t if (patterns == NULL) error (2, errno, _("memory exhausted")); patterns[pcount] = patterns0; + if (match_icase +#ifdef MBS_SUPPORT + && MB_CUR_MAX == 1) +#endif + patterns[pcount].regexbuf.translate = translate; if ((err = re_compile_pattern (motif, len, &(patterns[pcount].regexbuf))) != 0) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de