void btd_config_print(struct btd_config *config, FILE *fp) { safe_fprintf(fp, "BTD Config digest\n" "-----------------\n" "configpath: '%s'\n" "\n" "datadir: '%s'\n" "database:'%s'\n" "filefmt: '%s'\n" "pidfile: '%s'\n" "check_fields: '%s'\n" "multithread: '%s'\n", config->configpath, config->datadir, config->db, config->filefmt, config->pidfile, config->check_fields ? "true": "false", config->multithread ? "true": "false" ); safe_fputs(fp, "sockets:\n"); char *s; for (struct addrinfo *r = config->socket; r != NULL; r=r->ai_next){ s = pprint_address(r); safe_fprintf(fp, "%s\n", s); free(s); } }
static void print_name(mddl_clo_t clo, mddl_name_t n, const char *ctx) { FILE *out = clo->out; fputs(ctx, out); fputc('\t', out); safe_fputs(n->Simple, out); fputc('\t', out); if (!__source_null_p(n->source)) { fputs(n->source->Simple, out); } fputc('\n', out); return; }