#pragma once
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <printf.h>
#include <stdarg.h>
#include <stdio.h>
#include "macro.h"
assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
do { \
int _argtypes[128]; \
continue; \
} \
\
case PA_INT: \
case PA_INT|PA_FLAG_SHORT: \
case PA_CHAR: \
break; \
case PA_INT|PA_FLAG_LONG: \
break; \
case PA_INT|PA_FLAG_LONG_LONG: \
break; \
case PA_WCHAR: \
break; \
case PA_WSTRING: \
case PA_STRING: \
case PA_POINTER: \
break; \
case PA_FLOAT: \
case PA_DOUBLE: \
break; \
case PA_DOUBLE|PA_FLAG_LONG_DOUBLE: \
break; \
default: \
assert_not_reached("Unknown format string argument."); \
} \
} \
} while(false)