#include <config.h>#include <stdio.h>#include <stdarg.h>#include "mprintf.h"// TODO: check for asprintf in configure and// write a replacement for such situations.char*mprintf(constchar*fmt,...){char*p;intr;va_listva;va_start(va,fmt);r=vasprintf(&p,fmt,va);va_end(va);if(r<0)returnNULL;elsereturnp;}char*vmprintf(constchar*fmt,va_listva){char*p;intr;r=vasprintf(&p,fmt,va);if(r<0)returnNULL;elsereturnp;}