From: Ted Lemon Date: Sun, 14 Nov 1999 00:01:08 +0000 (+0000) Subject: Add printer for not_equal expression. X-Git-Tag: BCTEL_SPECIAL_19991124~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed0a7998adb2d9017590a7db11ac0ff440687d77;p=thirdparty%2Fdhcp.git Add printer for not_equal expression. --- diff --git a/common/print.c b/common/print.c index 6b33b2bbd..ca92c2c70 100644 --- a/common/print.c +++ b/common/print.c @@ -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;