[BusyBox-cvs] busybox/editors sed.c,1.103,1.104

Glenn McGrath bug1 at busybox.net
Mon Mar 10 02:57:00 UTC 2003


Update of /var/cvs/busybox/editors
In directory winder:/tmp/cvs-serv13272/editors

Modified Files:
	sed.c 
Log Message:
add the 'n' command


Index: sed.c
===================================================================
RCS file: /var/cvs/busybox/editors/sed.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- sed.c	10 Mar 2003 02:21:14 -0000	1.103
+++ sed.c	10 Mar 2003 02:56:56 -0000	1.104
@@ -382,7 +382,7 @@
 {
 	/* if it was a single-letter command that takes no arguments (such as 'p'
 	 * or 'd') all we need to do is increment the index past that command */
-	if (strchr("pqd=", sed_cmd->cmd)) {
+	if (strchr("npqd=", sed_cmd->cmd)) {
 		cmdstr++;
 	}
 	/* handle (s)ubstitution command */
@@ -807,6 +807,9 @@
 					case 'q':	/* Branch to end of script and quit */
 						free(line);
 						return;
+					case 'n':	/* Read next line from input */
+						i = ncmds;
+						break;
 				}
 			}
 




More information about the busybox-cvs mailing list