Mercurial > libpst
annotate src/define.h @ 189:dc807f71d9d2
Added tag stable-0-6-36 for changeset d588dafd03e8
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 14 Apr 2009 08:05:46 -0700 |
parents | ac6e22c8a9cf |
children | d360f96f71f6 |
rev | line source |
---|---|
16 | 1 /*** |
2 * define.h | |
3 * Part of the LibPST project | |
4 * Written by David Smith | |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
5 * dave.s@earthcorp.com |
16 | 6 */ |
7 | |
120
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
8 #ifndef DEFINEH_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
9 #define DEFINEH_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
10 |
163
03fbb0269f3c
fix large file support, some sytems require config.h to be included earlier in the compilation.
Carl Byington <carl@five-ten-sg.com>
parents:
153
diff
changeset
|
11 #ifdef HAVE_CONFIG_H |
03fbb0269f3c
fix large file support, some sytems require config.h to be included earlier in the compilation.
Carl Byington <carl@five-ten-sg.com>
parents:
153
diff
changeset
|
12 #include "config.h" |
03fbb0269f3c
fix large file support, some sytems require config.h to be included earlier in the compilation.
Carl Byington <carl@five-ten-sg.com>
parents:
153
diff
changeset
|
13 #endif |
03fbb0269f3c
fix large file support, some sytems require config.h to be included earlier in the compilation.
Carl Byington <carl@five-ten-sg.com>
parents:
153
diff
changeset
|
14 |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
15 #include "libpst.h" |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
16 #include "timeconv.h" |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
17 #include "libstrfunc.h" |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
18 #include "vbuf.h" |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
19 |
16 | 20 #define DEBUG_MODE_GEN |
21 #define DEBUGPRINT | |
22 #define DEBUG_MODE_WARN | |
23 #define DEBUG_MODE_READ | |
24 #define DEBUG_MODE_EMAIL | |
25 #define DEBUG_MODE_MAIN | |
26 #define DEBUG_MODE_INDEX | |
27 #define DEBUG_MODE_CODE | |
28 #define DEBUG_MODE_INFO | |
29 #define DEBUG_MODE_HEXDUMP | |
30 #define DEBUG_MODE_FUNC | |
31 | |
32 //number of items to save in memory between writes | |
33 #define DEBUG_MAX_ITEMS 0 | |
34 | |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
35 #define DEBUG_FILE_NO 1 |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
36 #define DEBUG_INDEX_NO 2 |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
37 #define DEBUG_EMAIL_NO 3 |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
38 #define DEBUG_WARN_NO 4 |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
39 #define DEBUG_READ_NO 5 |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
40 #define DEBUG_INFO_NO 6 |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
41 #define DEBUG_MAIN_NO 7 |
36 | 42 #define DEBUG_DECRYPT_NO 8 |
43 #define DEBUG_FUNCENT_NO 9 | |
44 #define DEBUG_FUNCRET_NO 10 | |
16 | 45 #define DEBUG_HEXDUMP_NO 11 |
46 | |
120
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
47 #ifdef HAVE_TIME_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
48 #include <time.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
49 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
50 |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
51 #ifdef HAVE_STRING_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
52 #include <string.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
53 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
54 |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
55 #ifdef HAVE_CTYPE_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
56 #include <ctype.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
57 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
58 |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
59 #ifdef HAVE_LIMITS_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
60 #include <limits.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
61 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
62 |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
63 #ifdef HAVE_WCHAR_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
64 #include <wchar.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
65 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
66 |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
67 #ifdef HAVE_SIGNAL_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
68 #include <signal.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
69 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
70 |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
71 #ifdef HAVE_ERRNO_H |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
72 #include <errno.h> |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
73 #endif |
6395ced2b8b2
disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents:
118
diff
changeset
|
74 |
153
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
133
diff
changeset
|
75 #ifdef HAVE_ICONV |
123
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
76 #include <iconv.h> |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
77 #endif |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
78 |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
79 #ifdef HAVE_REGEX_H |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
80 #include <regex.h> |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
81 #endif |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
82 |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
83 #ifdef HAVE_GD_H |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
84 #include <gd.h> |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
85 #endif |
ab2a11e72250
more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents:
122
diff
changeset
|
86 |
16 | 87 |
75
987aa872294e
Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents:
73
diff
changeset
|
88 #define PERM_DIRS 0777 |
987aa872294e
Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents:
73
diff
changeset
|
89 |
118
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
90 #ifdef _WIN32 |
133
2ec889a79e51
patch from Fridrich Strba, some systems need extra library for regex
Carl Byington <carl@five-ten-sg.com>
parents:
130
diff
changeset
|
91 #include <direct.h> |
118
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
92 |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
93 #define D_MKDIR(x) mkdir(x) |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
94 #define chdir _chdir |
122
bdb38b434c0a
more changes from Fridrich Strba to avoid installing our config.h
Carl Byington <carl@five-ten-sg.com>
parents:
120
diff
changeset
|
95 #define strcasecmp _stricmp |
118
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
96 #define vsnprintf _vsnprintf |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
97 #define snprintf _snprintf |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
98 #ifdef _MSC_VER |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
99 #define ftello _ftelli64 |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
100 #define fseeko _fseeki64 |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
101 #elif defined (__MINGW32__) |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
102 #define ftello ftello64 |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
103 #define fseeko fseeko64 |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
104 #else |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
105 #error Only MSC and mingw supported for Windows |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
106 #endif |
118
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
107 #ifndef __MINGW32__ |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
108 #define size_t __int64 |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
109 #endif |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
110 #ifndef UINT64_MAX |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
111 #define UINT64_MAX ((uint64_t)0xffffffffffffffff) |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
112 #endif |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
113 #define PRIx64 "I64x" |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
114 int __cdecl _fseeki64(FILE *, __int64, int); |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
115 __int64 __cdecl _ftelli64(FILE *); |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
116 |
118
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
117 #ifdef __MINGW32__ |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
118 #include <getopt.h> |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
119 #else |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
120 #include "XGetopt.h" |
75
987aa872294e
Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents:
73
diff
changeset
|
121 #endif |
118
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
122 #else |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
123 #ifdef HAVE_UNISTD_H |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
124 #include <unistd.h> |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
125 #else |
0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents:
75
diff
changeset
|
126 #include "XGetopt.h" |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
127 #endif |
133
2ec889a79e51
patch from Fridrich Strba, some systems need extra library for regex
Carl Byington <carl@five-ten-sg.com>
parents:
130
diff
changeset
|
128 #define D_MKDIR(x) mkdir(x, PERM_DIRS) |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
129 #endif |
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
130 |
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
131 #ifdef HAVE_SYS_STAT_H |
75
987aa872294e
Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents:
73
diff
changeset
|
132 #include <sys/stat.h> |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
133 #endif |
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
134 |
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
135 #ifdef HAVE_SYS_TYPES_H |
75
987aa872294e
Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents:
73
diff
changeset
|
136 #include <sys/types.h> |
59
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
137 #endif |
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
138 |
7d5c637aaafb
General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents:
48
diff
changeset
|
139 #ifdef HAVE_DIRENT_H |
75
987aa872294e
Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents:
73
diff
changeset
|
140 #include <dirent.h> |
16 | 141 #endif |
142 | |
143 | |
176
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
144 void pst_debug(const char *fmt, ...); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
145 void pst_debug_hexdumper(FILE* out, char* buf, size_t size, int col, int delta); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
146 void pst_debug_hexprint(char *data, int size); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
147 void pst_debug_init(const char *fname); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
148 void pst_debug_msg_info (int line, const char *file, int type); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
149 void pst_debug_msg_text(const char* fmt, ...); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
150 void pst_debug_hexdump(char *x, size_t y, int cols, int delta); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
151 void pst_debug_func(const char *function); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
152 void pst_debug_func_ret(); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
153 void pst_debug_close(void); |
ac6e22c8a9cf
build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents:
172
diff
changeset
|
154 void* pst_malloc(size_t size); |
16 | 155 |
46 | 156 #define MESSAGEPRINT(x,y) {pst_debug_msg_info(__LINE__,__FILE__,y);\ |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
157 pst_debug_msg_text x;} |
16 | 158 |
159 #define LOGSTOP() {MESSAGESTOP();DEBUGSTOP();} | |
160 | |
161 #define DIE(x) {\ | |
162 MESSAGEPRINT(x, 0);\ | |
163 printf x;\ | |
164 exit(EXIT_FAILURE);\ | |
165 } | |
166 #define WARN(x) {\ | |
167 MESSAGEPRINT(x, 0);\ | |
168 printf x;\ | |
169 } | |
170 | |
171 #ifdef DEBUGPRINT | |
46 | 172 #define DEBUG_PRINT(x) pst_debug x; |
16 | 173 #else |
174 #define DEBUG_PRINT(x) {} | |
175 #endif | |
176 | |
177 #ifdef DEBUG_MODE_GEN | |
178 #define DEBUG(x) {DEBUG_PRINT(x);} | |
179 #else | |
180 #define DEBUG(x) {} | |
181 #endif | |
182 | |
183 #ifdef DEBUG_MODE_INDEX | |
184 #define DEBUG_INDEX(x) MESSAGEPRINT(x, DEBUG_INDEX_NO); | |
185 #else | |
186 #define DEBUG_INDEX(x) {} | |
187 #endif | |
188 | |
189 #ifdef DEBUG_MODE_EMAIL | |
190 #define DEBUG_EMAIL(x) MESSAGEPRINT(x, DEBUG_EMAIL_NO); | |
46 | 191 #define DEBUG_EMAIL_HEXPRINT(x,y) {pst_debug_msg_info(__LINE__, __FILE__, 11);\ |
73
3cb02cb1e6cd
Patch from Robert Simpson to fix doubly-linked list in the cache_ptr code, and allow arrays of unicode strings (without converting them).
Carl Byington <carl@five-ten-sg.com>
parents:
63
diff
changeset
|
192 pst_debug_hexdump((char*)x, y, 0x10, 0);} |
16 | 193 #else |
194 #define DEBUG_EMAIL(x) {} | |
195 #define DEBUG_EMAIL_HEXPRINT(x,y) {} | |
196 #endif | |
197 | |
198 #ifdef DEBUG_MODE_WARN | |
199 #define DEBUG_WARN(x) MESSAGEPRINT(x, DEBUG_WARN_NO); | |
200 #else | |
201 #define DEBUG_WARN(x) {} | |
202 #endif | |
203 | |
204 #ifdef DEBUG_MODE_READ | |
205 #define DEBUG_READ(x) MESSAGEPRINT(x, DEBUG_READ_NO); | |
206 #else | |
207 #define DEBUG_READ(x) {} | |
208 #endif | |
209 | |
210 #ifdef DEBUG_MODE_INFO | |
211 #define DEBUG_INFO(x) MESSAGEPRINT(x, DEBUG_INFO_NO); | |
212 #else | |
213 #define DEBUG_INFO(x) {} | |
214 #endif | |
215 | |
216 #ifdef DEBUG_MODE_MAIN | |
217 #define DEBUG_MAIN(x) MESSAGEPRINT(x, DEBUG_MAIN_NO); | |
218 #else | |
219 #define DEBUG_MAIN(x) {} | |
220 #endif | |
221 | |
222 #ifdef DEBUG_MODE_CODE | |
223 #define DEBUG_CODE(x) {x} | |
224 #else | |
225 #define DEBUG_CODE(x) {} | |
226 #endif | |
227 | |
228 #ifdef DEBUG_MODE_DECRYPT | |
229 #define DEBUG_DECRYPT(x) MESSAGEPRINT(x, DEBUG_DECRYPT_NO); | |
230 #else | |
231 #define DEBUG_DECRYPT(x) {} | |
232 #endif | |
233 | |
234 #ifdef DEBUG_MODE_HEXDUMP | |
235 #define DEBUG_HEXDUMP(x, s)\ | |
46 | 236 {pst_debug_msg_info(__LINE__, __FILE__, DEBUG_HEXDUMP_NO);\ |
73
3cb02cb1e6cd
Patch from Robert Simpson to fix doubly-linked list in the cache_ptr code, and allow arrays of unicode strings (without converting them).
Carl Byington <carl@five-ten-sg.com>
parents:
63
diff
changeset
|
237 pst_debug_hexdump((char*)x, s, 0x10, 0);} |
16 | 238 #define DEBUG_HEXDUMPC(x, s, c)\ |
46 | 239 {pst_debug_msg_info(__LINE__, __FILE__, DEBUG_HEXDUMP_NO);\ |
73
3cb02cb1e6cd
Patch from Robert Simpson to fix doubly-linked list in the cache_ptr code, and allow arrays of unicode strings (without converting them).
Carl Byington <carl@five-ten-sg.com>
parents:
63
diff
changeset
|
240 pst_debug_hexdump((char*)x, s, c, 0);} |
16 | 241 #else |
242 #define DEBUG_HEXDUMP(x, s) {} | |
243 #define DEBUG_HEXDUMPC(x, s, c) {} | |
244 #endif | |
245 | |
46 | 246 #define DEBUG_FILE(x) {pst_debug_msg_info(__LINE__, __FILE__, DEBUG_FILE_NO);\ |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
247 pst_debug_msg_text x;} |
16 | 248 |
249 #ifdef DEBUG_MODE_FUNC | |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
250 # define DEBUG_ENT(x) \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
251 { \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
252 pst_debug_func(x); \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
253 MESSAGEPRINT(("Entering function %s\n",x),DEBUG_FUNCENT_NO); \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
254 } |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
255 # define DEBUG_RET() \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
256 { \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
257 MESSAGEPRINT(("Leaving function\n"),DEBUG_FUNCRET_NO); \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
258 pst_debug_func_ret(); \ |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
259 } |
16 | 260 #else |
261 # define DEBUG_ENT(x) {} | |
262 # define DEBUG_RET() {} | |
263 #endif | |
264 | |
46 | 265 #define DEBUG_INIT(fname) {pst_debug_init(fname);} |
266 #define DEBUG_CLOSE() {pst_debug_close();} | |
267 #define DEBUG_REGISTER_CLOSE() {if(atexit(pst_debug_close)!=0) fprintf(stderr, "Error registering atexit function\n");} | |
16 | 268 |
269 #define RET_DERROR(res, ret_val, x)\ | |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
270 if (res) { DIE(x);} |
16 | 271 |
272 #define RET_ERROR(res, ret_val)\ | |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
273 if (res) {return ret_val;} |
16 | 274 |
275 #define DEBUG_VERSION 1 | |
46 | 276 struct pst_debug_file_rec_m { |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
277 unsigned short int funcname; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
278 unsigned short int filename; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
279 unsigned short int text; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
280 unsigned short int end; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
281 unsigned int line; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
282 unsigned int type; |
16 | 283 }; |
284 | |
46 | 285 struct pst_debug_file_rec_l { |
63
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
286 unsigned int funcname; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
287 unsigned int filename; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
288 unsigned int text; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
289 unsigned int end; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
290 unsigned int line; |
cfd6175f9334
Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents:
59
diff
changeset
|
291 unsigned int type; |
16 | 292 }; |
293 | |
128
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
294 #if BYTE_ORDER == BIG_ENDIAN |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
295 # define LE64_CPU(x) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
296 x = ((((x) & UINT64_C(0xff00000000000000)) >> 56) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
297 (((x) & UINT64_C(0x00ff000000000000)) >> 40) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
298 (((x) & UINT64_C(0x0000ff0000000000)) >> 24) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
299 (((x) & UINT64_C(0x000000ff00000000)) >> 8 ) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
300 (((x) & UINT64_C(0x00000000ff000000)) << 8 ) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
301 (((x) & UINT64_C(0x0000000000ff0000)) << 24) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
302 (((x) & UINT64_C(0x000000000000ff00)) << 40) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
303 (((x) & UINT64_C(0x00000000000000ff)) << 56)); |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
304 # define LE32_CPU(x) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
305 x = ((((x) & 0xff000000) >> 24) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
306 (((x) & 0x00ff0000) >> 8 ) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
307 (((x) & 0x0000ff00) << 8 ) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
308 (((x) & 0x000000ff) << 24)); |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
309 # define LE16_CPU(x) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
310 x = ((((x) & 0xff00) >> 8) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
311 (((x) & 0x00ff) << 8)); |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
312 #elif BYTE_ORDER == LITTLE_ENDIAN |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
313 # define LE64_CPU(x) {} |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
314 # define LE32_CPU(x) {} |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
315 # define LE16_CPU(x) {} |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
316 #else |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
317 # error "Byte order not supported by this library" |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
318 #endif // BYTE_ORDER |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
319 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
320 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
321 #define PST_LE_GET_UINT64(p) \ |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
322 (uint64_t)((((uint8_t const *)(p))[0] << 0) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
323 (((uint8_t const *)(p))[1] << 8) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
324 (((uint8_t const *)(p))[2] << 16) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
325 (((uint8_t const *)(p))[3] << 24) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
326 (((uint8_t const *)(p))[4] << 32) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
327 (((uint8_t const *)(p))[5] << 40) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
328 (((uint8_t const *)(p))[6] << 48) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
329 (((uint8_t const *)(p))[7] << 56)) |
128
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
330 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
331 #define PST_LE_GET_INT64(p) \ |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
332 (int64_t)((((uint8_t const *)(p))[0] << 0) | \ |
128
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
333 (((uint8_t const *)(p))[1] << 8) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
334 (((uint8_t const *)(p))[2] << 16) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
335 (((uint8_t const *)(p))[3] << 24) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
336 (((uint8_t const *)(p))[4] << 32) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
337 (((uint8_t const *)(p))[5] << 40) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
338 (((uint8_t const *)(p))[6] << 48) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
339 (((uint8_t const *)(p))[7] << 56)) |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
340 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
341 #define PST_LE_GET_UINT32(p) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
342 (uint32_t)((((uint8_t const *)(p))[0] << 0) | \ |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
343 (((uint8_t const *)(p))[1] << 8) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
344 (((uint8_t const *)(p))[2] << 16) | \ |
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
345 (((uint8_t const *)(p))[3] << 24)) |
128
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
346 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
347 #define PST_LE_GET_INT32(p) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
348 (int32_t)((((uint8_t const *)(p))[0] << 0) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
349 (((uint8_t const *)(p))[1] << 8) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
350 (((uint8_t const *)(p))[2] << 16) | \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
351 (((uint8_t const *)(p))[3] << 24)) |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
352 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
353 #define PST_LE_GET_UINT16(p) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
354 (uint16_t)((((uint8_t const *)(p))[0] << 0) | \ |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
355 (((uint8_t const *)(p))[1] << 8)) |
128
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
356 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
357 #define PST_LE_GET_INT16(p) \ |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
358 (int16_t)((((uint8_t const *)(p))[0] << 0) | \ |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
359 (((uint8_t const *)(p))[1] << 8)) |
128
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
360 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
361 #define PST_LE_GET_UINT8(p) (*(uint8_t const *)(p)) |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
362 |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
363 #define PST_LE_GET_INT8(p) (*(int8_t const *)(p)) |
7f747c8c9d02
cleanup installed headers
Carl Byington <carl@five-ten-sg.com>
parents:
123
diff
changeset
|
364 |
129
fc11b1d1ad34
fix initial from header in mbox format.
Carl Byington <carl@five-ten-sg.com>
parents:
128
diff
changeset
|
365 |
16 | 366 #endif //DEFINEH_H |