Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __LIBWPG_UTILS_H__
00027 #define __LIBWPG_UTILS_H__
00028
00029 #include <stdio.h>
00030
00031 #include <librevenge-stream/librevenge-stream.h>
00032
00033 #if defined(__clang__) || defined(__GNUC__)
00034 #define WPG_ATTRIBUTE_PRINTF(fmt, arg) __attribute__((format(printf, fmt, arg)))
00035 #else
00036 #define WPG_ATTRIBUTE_PRINTF(fmt, arg)
00037 #endif
00038
00039
00040
00041
00042
00043
00044
00045 #ifdef DEBUG
00046
00047 namespace libwpg
00048 {
00049 void debugPrint(const char *format, ...) WPG_ATTRIBUTE_PRINTF(1, 2);
00050 }
00051
00052 #ifdef VERBOSE_DEBUG
00053 #define WPG_DEBUG_MSG(M) libwpg::debugPrint("%15s:%5d: ", __FILE__, __LINE__); libwpg::debugPrint M
00054 #define WPG_DEBUG(M) M
00055 #else
00056 #define WPG_DEBUG_MSG(M) libwpg::debugPrint M
00057 #define WPG_DEBUG(M) M
00058 #endif
00059 #else
00060 #define WPG_DEBUG_MSG(M)
00061 #define WPG_DEBUG(M)
00062 #endif
00063
00064 namespace libwpg
00065 {
00066
00067 unsigned long getRemainingLength(librevenge::RVNGInputStream *input);
00068
00069 struct EndOfStreamException
00070 {
00071 };
00072
00073 }
00074
00075 #endif // __LIBWPG_UTILS_H__
00076