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 #include "VSDTypes.h"
36 
37 #ifdef _MSC_VER
38 
39 typedef unsigned char uint8_t;
40 typedef unsigned short uint16_t;
41 typedef short int16_t;
42 typedef unsigned uint32_t;
43 typedef int int32_t;
44 typedef unsigned __int64 uint64_t;
45 
46 #else /* !defined _MSC_VER */
47 
48 #ifdef HAVE_CONFIG_H
49 
50 #include <config.h>
51 
52 #ifdef HAVE_STDINT_H
53 #include <stdint.h>
54 #endif
55 
56 #ifdef HAVE_INTTYPES_H
57 #include <inttypes.h>
58 #endif
59 
60 #else /* !defined HAVE_CONFIG_H */
61 
62 #include <stdint.h>
63 #include <inttypes.h>
64 
65 #endif /* HAVE_CONFIG_H */
66 
67 #endif /* _MSC_VER */
68 
69 #include <libwpd/libwpd.h>
70 #include <libwpd-stream/libwpd-stream.h>
71 
72 // debug message includes source file and line number
73 //#define VERBOSE_DEBUG 1
74 
75 // do nothing with debug messages in a release compile
76 #ifdef DEBUG
77 #ifdef VERBOSE_DEBUG
78 #define VSD_DEBUG_MSG(M) printf("%15s:%5d: ", __FILE__, __LINE__); printf M
79 #define VSD_DEBUG(M) M
80 #else
81 #define VSD_DEBUG_MSG(M) printf M
82 #define VSD_DEBUG(M) M
83 #endif
84 #else
85 #define VSD_DEBUG_MSG(M)
86 #define VSD_DEBUG(M)
87 #endif
88 
89 namespace libvisio
90 {
91 
92 uint8_t readU8(WPXInputStream *input);
93 uint16_t readU16(WPXInputStream *input);
94 int16_t readS16(WPXInputStream *input);
95 uint32_t readU32(WPXInputStream *input);
96 int32_t readS32(WPXInputStream *input);
97 uint64_t readU64(WPXInputStream *input);
98 
99 double readDouble(WPXInputStream *input);
100 
101 void appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, size_t base64DataLength);
102 
103 const ::WPXString getColourString(const Colour &c);
104 
106 {
107 };
108 
110 {
111 };
112 
114 {
115 };
116 
117 } // namespace libvisio
118 
119 #endif // __LIBVISIO_UTILS_H__
120 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: libvisio_utils.h:105
uint8_t readU8(WPXInputStream *input)
Definition: libvisio_utils.cpp:40
Definition: VSDTypes.h:78
int32_t readS32(WPXInputStream *input)
Definition: libvisio_utils.cpp:93
int16_t readS16(WPXInputStream *input)
Definition: libvisio_utils.cpp:72
uint64_t readU64(WPXInputStream *input)
Definition: libvisio_utils.cpp:98
void appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, size_t base64DataLength)
Definition: libvisio_utils.cpp:127
Definition: libvisio_utils.h:109
Definition: libvisio_utils.h:113
const ::WPXString getColourString(const Colour &c)
Definition: libvisio_utils.cpp:141
double readDouble(WPXInputStream *input)
Definition: libvisio_utils.cpp:114
uint16_t readU16(WPXInputStream *input)
Definition: libvisio_utils.cpp:56
uint32_t readU32(WPXInputStream *input)
Definition: libvisio_utils.cpp:77

Generated for libvisio by doxygen 1.8.5