[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [BusyBox] sed /d now is order sensitive?
From: Matt Kraai <kraai () alumni ! cmu ! edu>
Date: 2002-03-31 21:08:03
[Download RAW message or body]
On Sun, Mar 31, 2002 at 08:34:17PM -0500, Tom Oehser wrote:
> When I move the -e /\\.map/d to be the *last* command, it works...
Would you please try the following patch?
Matt
--- busybox-0.60.2/sed.c Mon Nov 19 15:34:17 2001
+++ busybox/sed.c Sun Mar 31 20:09:17 2002
@@ -650,8 +650,6 @@
/* for every line, go through all the commands */
for (i = 0; i < ncmds; i++) {
-
-
/*
* entry point into sedding...
*/
@@ -667,6 +665,7 @@
/* we are currently within the beginning & ending address range */
still_in_range
) {
+ int deleted = 0;
/*
* actual sedding
@@ -679,6 +678,7 @@
case 'd':
altered++;
+ deleted = 1;
break;
case 's':
@@ -783,6 +783,9 @@
else {
still_in_range = 1;
}
+
+ if (deleted)
+ break;
}
}
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic