]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add printer for not_equal expression.
authorTed Lemon <source@isc.org>
Sun, 14 Nov 1999 00:01:08 +0000 (00:01 +0000)
committerTed Lemon <source@isc.org>
Sun, 14 Nov 1999 00:01:08 +0000 (00:01 +0000)
common/print.c

index 6b33b2bbd5e7b3c43c7190bde06c22ae1d8e012a..ca92c2c70f62c846a467cc98df3faa5585a7b22b 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: print.c,v 1.27 1999/10/07 06:35:44 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: print.c,v 1.28 1999/11/14 00:01:08 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -299,6 +299,21 @@ static unsigned print_subexpression (expr, buf, len)
                }
                break;
 
+             case expr_not_equal:
+               if (len > 7) {
+                       rv = 5;
+                       strcpy (buf, "(neq ");
+                       rv += print_subexpression (expr -> data.equal [0],
+                                                  buf + rv, len - rv - 2);
+                       buf [rv++] = ' ';
+                       rv += print_subexpression (expr -> data.equal [1],
+                                                  buf + rv, len - rv - 1);
+                       buf [rv++] = ')';
+                       buf [rv] = 0;
+                       return rv;
+               }
+               break;
+
              case expr_substring:
                if (len > 11) {
                        rv = 8;