[765] in Moira

home help back first fref pref prev next nref lref last post

libss: newline should be treated as whitespace

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Thu Sep 1 17:56:32 1994

Date: Thu, 1 Sep 1994 17:57:05 -0400
From: "Jonathan I. Kamens" <jik@cam.ov.com>
To: krb5-bugs@MIT.EDU, bug-zephyr@MIT.EDU, bug-sipb@MIT.EDU
To: bugs@MIT.EDU, bug-moira@MIT.EDU

Because the ss library has an ss_execute_line which can be called by
users of the library and given an arbitrary string to execute, it's
possible for ss to be asked to execute a string containing newlines,
even though it's a line-oriented command language.

I believe that it should treat the newline character as whitespace
just as it treats spaces and tabs as whitespace.

The patch to the library below fixes this problem.

Jonathan Kamens  |  OpenVision Technologies, Inc.  |   jik@cam.ov.com

--- parse.c	1994/03/31 17:11:35	1.2
+++ parse.c	1994/09/01 20:36:40
@@ -89,7 +89,8 @@
 		*cp++ = '\0';
 		goto end_of_line;
 	    }
-	    else if (*line_ptr == ' ' || *line_ptr == '\t') {
+	    else if (*line_ptr == ' ' || *line_ptr == '\t' ||
+		     *line_ptr == '\n') {
 		*cp++ = '\0';
 		line_ptr++;
 		parse_mode = WHITESPACE;

home help back first fref pref prev next nref lref last post