File indexing completed on 2024-04-28 16:37:51
0001 /* 0002 kmime_warning.h 0003 0004 KMime, the KDE Internet mail/usenet news message library. 0005 SPDX-FileCopyrightText: 2001-2002 Marc Mutz <mutz@kde.org> 0006 See file AUTHORS for details 0007 0008 SPDX-License-Identifier: LGPL-2.0-or-later 0009 */ 0010 0011 #ifndef KMIME_WARNING_H 0012 #define KMIME_WARNING_H 0013 0014 #ifndef KMIME_NO_WARNING 0015 # include "kmime_debug.h" 0016 # define KMIME_WARN qCDebug(KMIME_LOG) << "Tokenizer Warning:" 0017 # define KMIME_WARN_UNKNOWN(x,y) KMIME_WARN << "unknown " #x ": \"" \ 0018 << y << "\""; 0019 # define KMIME_WARN_UNKNOWN_ENCODING KMIME_WARN << "unknown encoding in " \ 0020 "RFC 2047 encoded-word (only know 'q' and 'b')"; 0021 # define KMIME_WARN_UNKNOWN_CHARSET(c) KMIME_WARN << "unknown charset \"" \ 0022 << c << "\" in RFC 2047 encoded-word"; 0023 # define KMIME_WARN_8BIT(ch) KMIME_WARN \ 0024 << "8Bit character '" << ch << "'" 0025 # define KMIME_WARN_IF_8BIT(ch) if ( (unsigned char)(ch) > 127 ) \ 0026 { KMIME_WARN_8BIT(ch); } 0027 # define KMIME_WARN_PREMATURE_END_OF(x) KMIME_WARN \ 0028 << "Premature end of " #x 0029 # define KMIME_WARN_LONE(x) KMIME_WARN << "Lonely " #x " character" 0030 # define KMIME_WARN_NON_FOLDING(x) KMIME_WARN << "Non-folding " #x 0031 # define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_WARN << "Control character " \ 0032 #x " outside quoted-string" 0033 # define KMIME_WARN_INVALID_X_IN_Y(X,Y) KMIME_WARN << "Invalid character '" \ 0034 QString(QChar(X)) << "' in " #Y; 0035 # define KMIME_WARN_TOO_LONG(x) KMIME_WARN << #x \ 0036 " too long or missing delimiter"; 0037 #else 0038 # define KMIME_NOP do {} while (0) 0039 # define KMIME_WARN_8BIT(ch) KMIME_NOP 0040 # define KMIME_WARN_IF_8BIT(ch) KMIME_NOP 0041 # define KMIME_WARN_PREMATURE_END_OF(x) KMIME_NOP 0042 # define KMIME_WARN_LONE(x) KMIME_NOP 0043 # define KMIME_WARN_NON_FOLDING(x) KMIME_NOP 0044 # define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_NOP 0045 #endif 0046 0047 #endif