KMime

kmime_warning.h
1 /*
2  kmime_warning.h
3 
4  KMime, the KDE Internet mail/usenet news message library.
5  SPDX-FileCopyrightText: 2001-2002 Marc Mutz <[email protected]>
6  See file AUTHORS for details
7 
8  SPDX-License-Identifier: LGPL-2.0-or-later
9 */
10 
11 #ifndef KMIME_WARNING_H
12 #define KMIME_WARNING_H
13 
14 #ifndef KMIME_NO_WARNING
15 # include "kmime_debug.h"
16 # define KMIME_WARN qCDebug(KMIME_LOG) << "Tokenizer Warning:"
17 # define KMIME_WARN_UNKNOWN(x,y) KMIME_WARN << "unknown " #x ": \"" \
18  << y << "\"";
19 # define KMIME_WARN_UNKNOWN_ENCODING KMIME_WARN << "unknown encoding in " \
20  "RFC 2047 encoded-word (only know 'q' and 'b')";
21 # define KMIME_WARN_UNKNOWN_CHARSET(c) KMIME_WARN << "unknown charset \"" \
22  << c << "\" in RFC 2047 encoded-word";
23 # define KMIME_WARN_8BIT(ch) KMIME_WARN \
24  << "8Bit character '" << ch << "'"
25 # define KMIME_WARN_IF_8BIT(ch) if ( (unsigned char)(ch) > 127 ) \
26  { KMIME_WARN_8BIT(ch); }
27 # define KMIME_WARN_PREMATURE_END_OF(x) KMIME_WARN \
28  << "Premature end of " #x
29 # define KMIME_WARN_LONE(x) KMIME_WARN << "Lonely " #x " character"
30 # define KMIME_WARN_NON_FOLDING(x) KMIME_WARN << "Non-folding " #x
31 # define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_WARN << "Control character " \
32  #x " outside quoted-string"
33 # define KMIME_WARN_INVALID_X_IN_Y(X,Y) KMIME_WARN << "Invalid character '" \
34  QString(QChar(X)) << "' in " #Y;
35 # define KMIME_WARN_TOO_LONG(x) KMIME_WARN << #x \
36  " too long or missing delimiter";
37 #else
38 # define KMIME_NOP do {} while (0)
39 # define KMIME_WARN_8BIT(ch) KMIME_NOP
40 # define KMIME_WARN_IF_8BIT(ch) KMIME_NOP
41 # define KMIME_WARN_PREMATURE_END_OF(x) KMIME_NOP
42 # define KMIME_WARN_LONE(x) KMIME_NOP
43 # define KMIME_WARN_NON_FOLDING(x) KMIME_NOP
44 # define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_NOP
45 #endif
46 
47 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Sep 27 2021 23:15:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.