{
va_list ap;
char *s = NULL;
- uint32_t i;
int ret;
int dbgc_class;
return;
}
- for (i=0;i<ndr->depth;i++) {
- DEBUGADDC(dbgc_class, 1,(" "));
- }
-
- DEBUGADDC(dbgc_class, 1,("%s\n", s));
+ DEBUGADDC(dbgc_class, 1, ("%*.s\n", 4 * ndr->depth, s));
free(s);
}
{
va_list ap;
char *s = NULL;
- uint32_t i;
int ret;
va_start(ap, format);
return;
}
- for (i=0;i<ndr->depth;i++) {
- DEBUGADD(1,(" "));
- }
-
- DEBUGADD(1,("%s\n", s));
+ DEBUGADD(1, ("%*.s%s\n", 4 * ndr->depth, "", s));
free(s);
}
_PUBLIC_ void ndr_print_printf_helper(struct ndr_print *ndr, const char *format, ...)
{
va_list ap;
- uint32_t i;
if (!ndr->no_newline) {
- for (i=0;i<ndr->depth;i++) {
- printf(" ");
- }
+ printf("%*.s", 4 * ndr->depth, "");
}
va_start(ap, format);
_PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...)
{
va_list ap;
- uint32_t i;
if (!ndr->no_newline) {
- for (i=0;i<ndr->depth;i++) {
- ndr->private_data = talloc_asprintf_append_buffer(
- (char *)ndr->private_data, " ");
- }
+ talloc_asprintf_addbuf((char **)&ndr->private_data,
+ "%*.s",
+ ndr->depth * 4,
+ "");
}
va_start(ap, format);
format, ap);
va_end(ap);
if (!ndr->no_newline) {
- ndr->private_data = talloc_asprintf_append_buffer((char *)ndr->private_data,
- "\n");
+ talloc_asprintf_addbuf((char **)&ndr->private_data, "\n");
}
}
uint32_t i;
ndr->no_newline = true;
- for (i=0; i<ndr->depth; i++) {
- ndr->print(ndr, " ");
- }
- ndr->print(ndr, "%-25s:", name);
+ ndr->print(ndr, "%*.s%-25s:", 4 * ndr->depth, "", name);
for (i=0; i<list->count; i++) {
ndr->print(ndr, " \"%s\"", list->str[i]);
}