Date: Fri, 20 Jun 2008 12:08:56 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 143817 for review Message-ID: <200806201208.m5KC8ueq095233@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143817 Change 143817 by gabor@gabor_server on 2008/06/20 12:08:52 - GNU compatibility: allow two repetition operators after one another Affected files ... .. //depot/projects/soc2008/gabor_textproc/grep/grep.c#27 edit Differences ... ==== //depot/projects/soc2008/gabor_textproc/grep/grep.c#27 (text+ko) ==== @@ -198,7 +198,13 @@ while (((ptr = strstr(pat, "(|")) != NULL) && (strstr(pat, "(\\|") != ptr) && (strstr(pat, "\\(|") != (ptr - 1))) { strlcpy(&(ptr[1]), &(ptr[2]), strlen(ptr)); } - while ((ptr = strstr(pat, "||")) != NULL) { + while (((ptr = strstr(pat, "||")) != NULL) && (strstr(pat, "\\||") != (ptr - 1))) { + strlcpy(&(ptr[1]), &(ptr[2]), strlen(ptr)); + } + while (((ptr = strstr(pat, "*?")) != NULL) && (strstr(pat, "\\*?") != (ptr - 1))) { + strlcpy(&(ptr[1]), &(ptr[2]), strlen(ptr)); + } + while (((ptr = strstr(pat, "?*")) != NULL) && (strstr(pat, "\\?*") != (ptr - 1))) { strlcpy(&(ptr[1]), &(ptr[2]), strlen(ptr)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806201208.m5KC8ueq095233>