#ifdef ASCEND_BINARY
/* filters.c */
int ascend_parse_filter(VALUE_PAIR *pair);
-void print_abinary(VALUE_PAIR *vp, char *buffer, size_t len);
+void print_abinary(const VALUE_PAIR *vp, char *buffer, size_t len, int delimitst);
#endif /*ASCEND_BINARY*/
/* random numbers in isaac.c */
* Note we don't bother checking 'len' after the snprintf's.
* This function should ONLY be called with a large (~1k) buffer.
*/
-void print_abinary(VALUE_PAIR *vp, char *buffer, size_t len)
+void print_abinary(const VALUE_PAIR *vp, char *buffer, size_t len, int delimitst)
{
size_t i;
char *p;
return;
}
- *(p++) = '"';
- len -= 3; /* account for leading & trailing quotes */
+ if (delimitst) {
+ *(p++) = '"';
+ len -= 3; /* account for leading & trailing quotes */
+ }
filter = (ascend_filter_t *) &(vp->vp_filter);
i = snprintf(p, len, "%s %s %s",
}
}
- *(p++) = '"';
+ if (delimitst) *(p++) = '"';
*p = '\0';
}
#endif
case PW_TYPE_ABINARY:
#ifdef ASCEND_BINARY
a = buf;
- print_abinary(vp, buf, sizeof(buf));
+ print_abinary(vp, buf, sizeof(buf), delimitst);
break;
#else
/* FALL THROUGH */