POSIX specifies that that multiple '!' characters preceding a
authormillert <millert@openbsd.org>
Tue, 23 Jun 2015 22:52:55 +0000 (22:52 +0000)
committermillert <millert@openbsd.org>
Tue, 23 Jun 2015 22:52:55 +0000 (22:52 +0000)
function should be treated as a single negation.  From FreeBSD
via Liviu Daia.

usr.bin/sed/compile.c

index 266da71..5e8cce9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: compile.c,v 1.37 2014/12/12 03:32:55 jsg Exp $        */
+/*     $OpenBSD: compile.c,v 1.38 2015/06/23 22:52:55 millert Exp $    */
 
 /*-
  * Copyright (c) 1992 Diomidis Spinellis.
@@ -208,7 +208,7 @@ nonsel:             /* Now parse the command */
                case NONSEL:                    /* ! */
                        p++;
                        EATSPACE();
-                       cmd->nonsel = ! cmd->nonsel;
+                       cmd->nonsel = 1;
                        goto nonsel;
                case GROUP:                     /* { */
                        p++;