libvisio_utils.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libvisio
3  * Version: MPL 1.1 / GPLv2+ / LGPLv2+
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License or as specified alternatively below. You may obtain a copy of
8  * the License at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * Major Contributor(s):
16  * Copyright (C) 2011 Fridrich Strba <fridrich.strba@bluewin.ch>
17  * Copyright (C) 2011 Eilidh McAdam <tibbylickle@gmail.com>
18  *
19  *
20  * All Rights Reserved.
21  *
22  * For minor contributions see the git repository.
23  *
24  * Alternatively, the contents of this file may be used under the terms of
25  * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
26  * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
27  * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
28  * instead of those above.
29  */
30 
31 #ifndef __LIBVISIO_UTILS_H__
32 #define __LIBVISIO_UTILS_H__
33 
34 #include <stdio.h>
35 
36 #ifdef _MSC_VER
37 
38 typedef unsigned char uint8_t;
39 typedef unsigned short uint16_t;
40 typedef unsigned uint32_t;
41 typedef unsigned __int64 uint64_t;
42 
43 #else
44 
45 #ifdef HAVE_CONFIG_H
46 #include <config.h>
47 #endif
48 
49 #ifdef HAVE_STDINT_H
50 #include <stdint.h>
51 #endif
52 
53 #ifdef HAVE_INTTYPES_H
54 #include <inttypes.h>
55 #endif
56 
57 #endif
58 
59 #include <libwpd-stream/libwpd-stream.h>
60 
61 // debug message includes source file and line number
62 //#define VERBOSE_DEBUG 1
63 
64 // do nothing with debug messages in a release compile
65 #ifdef DEBUG
66 #ifdef VERBOSE_DEBUG
67 #define VSD_DEBUG_MSG(M) printf("%15s:%5d: ", __FILE__, __LINE__); printf M
68 #define VSD_DEBUG(M) M
69 #else
70 #define VSD_DEBUG_MSG(M) printf M
71 #define VSD_DEBUG(M) M
72 #endif
73 #else
74 #define VSD_DEBUG_MSG(M)
75 #define VSD_DEBUG(M)
76 #endif
77 
78 namespace libvisio
79 {
80 
81 uint8_t readU8(WPXInputStream *input);
82 uint16_t readU16(WPXInputStream *input);
83 uint32_t readU32(WPXInputStream *input);
84 uint64_t readU64(WPXInputStream *input);
85 
86 double readDouble(WPXInputStream *input);
87 
89 {
90 };
91 
93 {
94 };
95 
96 } // namespace libvisio
97 
98 #endif // __LIBVISIO_UTILS_H__
99 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: libvisio_utils.h:88
uint8_t readU8(WPXInputStream *input)
Definition: libvisio_utils.cpp:35
uint64_t readU64(WPXInputStream *input)
Definition: libvisio_utils.cpp:83
Definition: libvisio_utils.h:78
Definition: libvisio_utils.h:92
double readDouble(WPXInputStream *input)
Definition: libvisio_utils.cpp:99
uint16_t readU16(WPXInputStream *input)
Definition: libvisio_utils.cpp:51
uint32_t readU32(WPXInputStream *input)
Definition: libvisio_utils.cpp:67

Generated for libvisio by doxygen 1.8.13