1#ifndef CRYPTOPP_FLTRIMPL_H
2#define CRYPTOPP_FLTRIMPL_H
4#if CRYPTOPP_MSC_VERSION
6# pragma warning(disable: 4100)
9#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
10# pragma GCC diagnostic push
11# pragma GCC diagnostic ignored "-Wunused-value"
15 switch (m_continueAt) \
20#define FILTER_END_NO_MESSAGE_END_NO_RETURN \
23 CRYPTOPP_ASSERT(false); \
26#define FILTER_END_NO_MESSAGE_END \
27 FILTER_END_NO_MESSAGE_END_NO_RETURN \
38#define FILTER_OUTPUT3(site, statement, output, length, messageEnd, channel) \
42 if (Output(site, output, length, messageEnd, blocking, channel)) \
43 return STDMAX(size_t(1), length-m_inputPosition);\
46#define FILTER_OUTPUT2(site, statement, output, length, messageEnd) \
47 FILTER_OUTPUT3(site, statement, output, length, messageEnd, DEFAULT_CHANNEL)
49#define FILTER_OUTPUT(site, output, length, messageEnd) \
50 FILTER_OUTPUT2(site, 0, output, length, messageEnd)
52#define FILTER_OUTPUT_BYTE(site, output) \
53 FILTER_OUTPUT(site, &(const byte &)(byte)output, 1, 0)
55#define FILTER_OUTPUT2_MODIFIABLE(site, statement, output, length, messageEnd) \
60 if (OutputModifiable(site, output, length, messageEnd, blocking)) \
61 return STDMAX(size_t(1), length-m_inputPosition);\
64#define FILTER_OUTPUT_MODIFIABLE(site, output, length, messageEnd) \
65 FILTER_OUTPUT2_MODIFIABLE(site, 0, output, length, messageEnd)
67#define FILTER_OUTPUT2_MAYBE_MODIFIABLE(site, statement, output, length, messageEnd, modifiable) \
72 if (modifiable ? OutputModifiable(site, output, length, messageEnd, blocking) : Output(site, output, length, messageEnd, blocking)) \
73 return STDMAX(size_t(1), length-m_inputPosition);\
76#define FILTER_OUTPUT_MAYBE_MODIFIABLE(site, output, length, messageEnd, modifiable) \
77 FILTER_OUTPUT2_MAYBE_MODIFIABLE(site, 0, output, length, messageEnd, modifiable)
79#if CRYPTOPP_MSC_VERSION
83#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
84# pragma GCC diagnostic pop