summaryrefslogtreecommitdiff
path: root/lib/printhash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/printhash.c')
-rw-r--r--lib/printhash.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/printhash.c b/lib/printhash.c
index 8e7948b88d897..77cde960d2080 100644
--- a/lib/printhash.c
+++ b/lib/printhash.c
@@ -1,20 +1,19 @@
/*
- * Copyright (C) 2002-2005 by Darren Reed.
+ * Copyright (C) 2012 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*/
#include "ipf.h"
-#define PRINTF (void)printf
-#define FPRINTF (void)fprintf
-
-iphtable_t *printhash(hp, copyfunc, name, opts)
-iphtable_t *hp;
-copyfunc_t copyfunc;
-char *name;
-int opts;
+iphtable_t *
+printhash(hp, copyfunc, name, opts, fields)
+ iphtable_t *hp;
+ copyfunc_t copyfunc;
+ char *name;
+ int opts;
+ wordtab_t *fields;
{
iphtent_t *ipep, **table;
iphtable_t iph;
@@ -27,7 +26,8 @@ int opts;
if ((name != NULL) && strncmp(name, iph.iph_name, FR_GROUPLEN))
return iph.iph_next;
- printhashdata(hp, opts);
+ if (fields == NULL)
+ printhashdata(hp, opts);
if ((hp->iph_flags & IPHASH_DELETE) != 0)
PRINTF("# ");
@@ -41,7 +41,7 @@ int opts;
return NULL;
for (printed = 0, ipep = iph.iph_list; ipep != NULL; ) {
- ipep = printhashnode(&iph, ipep, copyfunc, opts);
+ ipep = printhashnode(&iph, ipep, copyfunc, opts, fields);
printed++;
}
if (printed == 0)