aboutsummaryrefslogtreecommitdiff
path: root/tr.c
diff options
context:
space:
mode:
authormarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-10 15:50:26 +0000
committermarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-10 15:50:26 +0000
commit9f0bd313486f7e9f4f9b9cf586dae7f1f65dafcb (patch)
tree468f03558df985a32c0631338c7a64c5919da92b /tr.c
parentb71a0fe71e5b0b450afc392a182ec5f3b7488408 (diff)
downloadbusybox-w32-9f0bd313486f7e9f4f9b9cf586dae7f1f65dafcb.tar.gz
busybox-w32-9f0bd313486f7e9f4f9b9cf586dae7f1f65dafcb.tar.bz2
busybox-w32-9f0bd313486f7e9f4f9b9cf586dae7f1f65dafcb.zip
Applied patch from Matt Kraai as per his email:
However, the case of grep foo$ file didn't work, due to a problem with the flags used in regular expression compilation. The attached patch fixes this problem. ---patch------- Index: grep.c =================================================================== RCS file: /var/cvs/busybox/grep.c,v retrieving revision 1.30 diff -u -r1.30 grep.c --- grep.c 2000/07/04 22:17:01 1.30 +++ grep.c 2000/07/10 08:57:04 @@ -141,8 +141,10 @@ if (argv[optind] == NULL) usage(grep_usage); - /* compile the regular expression */ - reflags = REG_NOSUB; /* we're not going to mess with sub-expressions */ + /* compile the regular expression + * we're not going to mess with sub-expressions, and we need to + * treat newlines right. */ + reflags = REG_NOSUB | REG_NEWLINE; if (ignore_case) reflags |= REG_ICASE; if ((ret = regcomp(&regex, argv[optind], reflags)) != 0) { ---patch------- Thanks, Matt, it works great. git-svn-id: svn://busybox.net/trunk/busybox@796 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tr.c')
0 files changed, 0 insertions, 0 deletions