1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
Every other package these days seems to come with its own MD5
implementation. Try to trim this insanity, where we can...
-mi
diff -ruN src/definition.cpp src/definition.cpp
--- src/definition.cpp.orig 2010-09-11 08:17:27.000000000 -0400
+++ src/definition.cpp 2010-10-10 22:53:55.000000000 -0400
@@ -18,6 +18,7 @@
#include "qtbc.h"
#include <ctype.h>
#include <qregexp.h>
+#include <sys/types.h>
#include <md5.h>
#include <stdio.h>
#include <stdlib.h>
@@ -361,13 +362,11 @@
bool Definition::_docsAlreadyAdded(const QCString &doc)
{
- uchar md5_sig[16];
QCString sigStr(33);
// to avoid mismatches due to differences in indenting, we first remove
// double whitespaces...
QCString docStr = doc.simplifyWhiteSpace();
- MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)docStr.data(),docStr.length(),sigStr.data());
if (m_impl->docSignatures.find(sigStr)==-1) // new docs, add signature to prevent re-adding it
{
m_impl->docSignatures+=":"+sigStr;
diff -ruN src/dirdef.cpp src/dirdef.cpp
--- src/dirdef.cpp.orig 2010-07-27 14:26:29.000000000 -0400
+++ src/dirdef.cpp 2010-10-10 22:56:08.000000000 -0400
@@ -1,3 +1,4 @@
+#include <sys/types.h>
#include <md5.h>
#include "dirdef.h"
@@ -75,10 +76,8 @@
QCString result;
// convert to md5 hash
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)anchor.data(),anchor.length(),sigStr.data());
return sigStr;
// old algorithm
diff -ruN src/dot.cpp src/dot.cpp
--- src/dot.cpp.orig 2010-08-10 14:30:49.000000000 -0400
+++ src/dot.cpp 2010-10-10 22:59:36.000000000 -0400
@@ -39,6 +39,7 @@
#include <qdir.h>
#include <qfile.h>
#include "ftextstream.h"
+#include <sys/types.h>
#include <md5.h>
#include <qqueue.h>
@@ -1610,10 +1611,8 @@
}
writeGraphFooter(md5stream);
resetReNumbering();
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)theGraph.data(),theGraph.length(),sigStr.data());
bool regenerate=FALSE;
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
!checkDeliverables(absImgName,absMapName))
@@ -2271,10 +2270,8 @@
}
}
writeGraphFooter(md5stream);
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)buf.data(),buf.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)buf.data(),buf.length(),sigStr.data());
if (reNumber)
{
resetReNumbering();
@@ -3065,10 +3062,8 @@
QGString theGraph;
FTextStream md5stream(&theGraph);
m_dir->writeDepGraph(md5stream);
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)theGraph.data(),theGraph.length(),sigStr.data());
bool regenerate=FALSE;
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
!checkDeliverables(format==BITMAP ? absImgName :
@@ -3178,10 +3173,8 @@
md5stream << " Node18 -> Node9 [dir=back,color=\"darkorchid3\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"m_usedClass\",fontname=\"" << FONTNAME << "\"];\n";
md5stream << " Node18 [shape=\"box\",label=\"Used\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classUsed" << Doxygen::htmlFileExtension << "\"];\n";
writeGraphFooter(md5stream);
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)theGraph.data(),theGraph.length(),sigStr.data());
QCString absBaseName = (QCString)path+"/graph_legend";
QCString absDotName = absBaseName+".dot";
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
@@ -3545,10 +3538,8 @@
writeGraphFooter(md5stream);
resetReNumbering();
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)theGraph.data(),theGraph.length(),sigStr.data());
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString baseName = m_diskName;
QCString imgName = baseName+"."+imgExt;
diff -ruN src/doxygen.pro.in src/doxygen.pro.in
--- src/doxygen.pro.in.orig 2010-05-08 04:57:08.000000000 -0400
+++ src/doxygen.pro.in 2010-06-15 07:58:47.000000000 -0400
@@ -18,7 +18,7 @@
CONFIG = console warn_on $extraopts
HEADERS = doxygen.h
SOURCES = main.cpp
-unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
+unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd -lpthread
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
@@ -28,7 +28,7 @@
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
-INCLUDEPATH += ../qtools ../libmd5 .
+INCLUDEPATH += ../qtools .
DESTDIR = ../bin
TARGET = doxygen
unix:TARGETDEPS = ../lib/libdoxygen.a ../lib/libdoxycfg.a
diff -ruN src/memberdef.cpp src/memberdef.cpp
--- src/memberdef.cpp.orig 2010-09-10 17:27:09.000000000 -0400
+++ src/memberdef.cpp 2010-10-10 23:02:53.000000000 -0400
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <qregexp.h>
#include <assert.h>
+#include <sys/types.h>
#include <md5.h>
#include "memberdef.h"
#include "membername.h"
@@ -2556,10 +2557,8 @@
memAnchor.prepend(definition());
// convert to md5 hash
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)memAnchor.data(),memAnchor.length(),sigStr.data());
m_impl->anc = "a"+sigStr;
}
diff -ruN src/membergroup.cpp src/membergroup.cpp
--- src/membergroup.cpp.orig 2010-07-29 14:51:15.000000000 -0400
+++ src/membergroup.cpp 2010-10-10 23:04:12.000000000 -0400
@@ -262,12 +262,10 @@
QCString MemberGroup::anchor() const
{
- uchar md5_sig[16];
QCString sigStr(33);
QCString locHeader = grpHeader;
if (locHeader.isEmpty()) locHeader="[NOHEADER]";
- MD5Buffer((const unsigned char *)locHeader.data(),locHeader.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)locHeader.data(),locHeader.length(),sigStr.data());
return "amgrp"+sigStr;
}
diff -ruN src/util.cpp src/util.cpp
--- src/util.cpp.orig 2010-09-11 13:54:37.000000000 -0400
+++ src/util.cpp 2010-10-10 23:08:11.000000000 -0400
@@ -19,6 +19,7 @@
#include <ctype.h>
#include <errno.h>
+#include <sys/types.h>
#include <md5.h>
#include "qtbc.h"
@@ -4922,16 +4923,16 @@
if (resultLen>=128) // prevent names that cannot be created!
{
// third algorithm based on MD5 hash
- uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig);
- MD5SigToString(md5_sig,sigStr.data(),33);
+ MD5Data((const unsigned char *)result.data(),resultLen,sigStr.data());
result=result.left(128-32)+sigStr;
}
}
if (createSubdirs)
{
+#if MAP_ALGO==ALGO_COUNT || MAP_ALGO==ALGO_CRC16
int l1Dir=0,l2Dir=0;
+#endif
#if MAP_ALGO==ALGO_COUNT
// old algorithm, has the problem that after regeneration the
@@ -4962,12 +4963,13 @@
l2Dir = (dirNum>>4)&0xff;
#elif MAP_ALGO==ALGO_MD5
// third algorithm based on MD5 hash
- uchar md5_sig[16];
- MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig);
- l1Dir = md5_sig[14]&0xf;
- l2Dir = md5_sig[15];
+ char md5[33];
+ MD5Data((const unsigned char *)result.data(),result.length(),md5);
+ result.prepend(QCString().sprintf("d%c/d%c%c/",md5[29],md5[30],md5[31]));
#endif
+#if MAP_ALGO==ALGO_COUNT || MAP_ALGO==ALGO_CRC16
result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
+#endif
}
//printf("*** convertNameToFile(%s)->%s\n",name,result.data());
return result;
|