X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspstring.h;h=ccc77da663156644b8723c34d6b998408ab07987;hb=3ccf0065d43db80f31c6404aeac4d65551481508;hp=eb7b7218f7798a833fbcf7aee1aa370fb2ac64be;hpb=780757cbc172daa4d9973e8e3b87fd42cfac5541;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspstring.h b/include/inspstring.h index eb7b7218f..ccc77da66 100644 --- a/include/inspstring.h +++ b/include/inspstring.h @@ -24,6 +24,15 @@ #include "config.h" #include +/** Sets ret to the formated string. last is the last parameter before ..., and format is the format in printf-style */ +#define VAFORMAT(ret, last, format) \ + do { \ + va_list _vaList; \ + va_start(_vaList, last); \ + ret = InspIRCd::Format(_vaList, format); \ + va_end(_vaList); \ + } while (false); + /** Compose a hex string from raw data. * @param raw The raw data to compose hex from (can be NULL if rawsize is 0) * @param rawsize The size of the raw data buffer