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
|
diff -ru ./common/filefn.cpp ../../wxPythonSrc-2.4.1.2/src/common/filefn.cpp
--- wxGTK-2.4.1/src/common/filefn.cpp 2003-06-08 09:13:13.000000000 +0100
+++ wxGTK-2.4.1/src/common/filefn.cpp 2003-06-11 21:20:15.000000000 +0100
@@ -1595,6 +1595,8 @@
wxChar buf[256];
GetWindowsDirectory(buf, 256);
return wxString(buf);
+#elif defined(__WXMAC__)
+ return wxMacFindFolder(kOnSystemDisk, 'macs', false);
#else
return wxEmptyString;
#endif
diff -ru ./common/log.cpp ../../wxPythonSrc-2.4.1.2/src/common/log.cpp
--- wxGTK-2.4.1/src/common/log.cpp 2003-06-08 09:13:14.000000000 +0100
+++ wxGTK-2.4.1/src/common/log.cpp 2003-06-16 21:46:45.000000000 +0100
@@ -114,13 +114,24 @@
// macros and not all compilers inline vararg functions.
// ----------------------------------------------------------------------------
+// wrapper for wxVsnprintf(s_szBuf) which always NULL-terminates it
+static inline void PrintfInLogBug(const wxChar *szFormat, va_list argptr)
+{
+ if ( wxVsnprintf(s_szBuf, s_szBufSize, szFormat, argptr) < 0 )
+ {
+ // must NUL-terminate it manually
+ s_szBuf[s_szBufSize - 1] = _T('\0');
+ }
+ //else: NUL-terminated by vsnprintf()
+}
+
// generic log function
void wxVLogGeneric(wxLogLevel level, const wxChar *szFormat, va_list argptr)
{
if ( IsLoggingEnabled() ) {
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
- wxVsnprintf(s_szBuf, s_szBufSize, szFormat, argptr);
+ PrintfInLogBug(szFormat, argptr);
wxLog::OnLog(level, s_szBuf, time(NULL));
}
@@ -140,11 +151,12 @@
if ( IsLoggingEnabled() ) { \
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \
\
- wxVsnprintf(s_szBuf, s_szBufSize, szFormat, argptr); \
+ PrintfInLogBug(szFormat, argptr); \
\
wxLog::OnLog(wxLOG_##level, s_szBuf, time(NULL)); \
} \
} \
+ \
void wxLog##level(const wxChar *szFormat, ...) \
{ \
va_list argptr; \
diff -ru ./common/menucmn.cpp ../../wxPythonSrc-2.4.1.2/src/common/menucmn.cpp
--- wxGTK-2.4.1/src/common/menucmn.cpp 2003-06-08 09:13:14.000000000 +0100
+++ wxGTK-2.4.1/src/common/menucmn.cpp 2003-06-11 00:48:46.000000000 +0100
@@ -332,6 +332,7 @@
wxCHECK_MSG( item, FALSE, wxT("invalid item in wxMenu::Append()") );
m_items.Append(item);
+ item->SetMenu((wxMenu*)this);
if ( item->IsSubMenu() )
{
AddSubMenu(item->GetSubMenu());
@@ -365,6 +366,7 @@
wxCHECK_MSG( node, FALSE, wxT("invalid index in wxMenu::Insert()") );
m_items.Insert(node, item);
+ item->SetMenu((wxMenu*)this);
if ( item->IsSubMenu() )
{
AddSubMenu(item->GetSubMenu());
@@ -393,6 +395,7 @@
m_items.DeleteNode(node);
// item isn't attached to anything any more
+ item->SetMenu((wxMenu *)NULL);
wxMenu *submenu = item->GetSubMenu();
if ( submenu )
{
diff -ru ./common/regex.cpp ../../wxPythonSrc-2.4.1.2/src/common/regex.cpp
--- wxGTK-2.4.1/src/common/regex.cpp 2003-06-08 09:13:14.000000000 +0100
+++ wxGTK-2.4.1/src/common/regex.cpp 2003-06-16 21:46:45.000000000 +0100
@@ -204,21 +204,24 @@
m_nMatches = 1;
// and some more for bracketed subexperessions
- const wxChar *cptr = expr.c_str();
- wxChar prev = _T('\0');
- while ( *cptr != _T('\0') )
+ for ( const wxChar *cptr = expr.c_str(); *cptr; cptr++ )
{
- // is this a subexpr start, i.e. "(" for extended regex or
- // "\(" for a basic one?
- if ( *cptr == _T('(') &&
- (flags & wxRE_BASIC ? prev == _T('\\')
- : prev != _T('\\')) )
+ if ( *cptr == _T('\\') )
{
+ // in basic RE syntax groups are inside \(...\)
+ if ( *++cptr == _T('(') && (flags & wxRE_BASIC) )
+ {
+ m_nMatches++;
+ }
+ }
+ else if ( *cptr == _T('(') && !(flags & wxRE_BASIC) )
+ {
+ // we know that the previous character is not an unquoted
+ // backslash because it would have been eaten above, so we
+ // have a bar '(' and this indicates a group start for the
+ // extended syntax
m_nMatches++;
}
-
- prev = *cptr;
- cptr++;
}
}
diff -ru ./gtk/timer.cpp ../../wxPythonSrc-2.4.1.2/src/gtk/timer.cpp
--- wxGTK-2.4.1/src/gtk/timer.cpp 2003-06-08 09:13:21.000000000 +0100
+++ wxGTK-2.4.1/src/gtk/timer.cpp 2003-06-17 18:23:24.000000000 +0100
@@ -41,12 +41,7 @@
gdk_threads_leave();
if ( timer->IsOneShot() )
- {
- // This sets m_tag to -1
- timer->Stop();
-
return FALSE;
- }
return TRUE;
}
diff -ru ./gtk/window.cpp ../../wxPythonSrc-2.4.1.2/src/gtk/window.cpp
--- wxGTK-2.4.1/src/gtk/window.cpp 2003-06-08 09:13:22.000000000 +0100
+++ wxGTK-2.4.1/src/gtk/window.cpp 2003-06-19 20:14:52.000000000 +0100
@@ -3629,12 +3629,10 @@
wxapp_install_idle_handler();
wxRect myRect(0,0,0,0);
- if (m_wxwindow)
+ if (m_wxwindow && rect)
+ {
myRect.SetSize(wxSize( m_wxwindow->allocation.width,
m_wxwindow->allocation.height));
-
- if (rect)
- {
myRect.Intersect(*rect);
if (!myRect.width || !myRect.height)
// nothing to do, rectangle is empty
@@ -4072,7 +4070,7 @@
{
#ifdef __WXGTK20__
pango_font_description_free( style->font_desc );
- pango_font_description_copy( m_font.GetNativeFontInfo()->description );
+ style->font_desc = pango_font_description_copy( m_font.GetNativeFontInfo()->description );
#else
gdk_font_unref( style->font );
style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) );
diff -ru ./html/htmlpars.cpp ../../wxPythonSrc-2.4.1.2/src/html/htmlpars.cpp
--- wxGTK-2.4.1/src/html/htmlpars.cpp 2003-06-08 09:13:16.000000000 +0100
+++ wxGTK-2.4.1/src/html/htmlpars.cpp 2003-06-11 00:34:25.000000000 +0100
@@ -872,7 +872,7 @@
}
if (tag.HasParam(_T("HTTP-EQUIV")) &&
- tag.GetParam(_T("HTTP-EQUIV")) == _T("Content-Type") &&
+ tag.GetParam(_T("HTTP-EQUIV")).IsSameAs(_T("Content-Type"), FALSE) &&
tag.HasParam(_T("CONTENT")))
{
wxString content = tag.GetParam(_T("CONTENT"));
diff -ru ./html/m_layout.cpp ../../wxPythonSrc-2.4.1.2/src/html/m_layout.cpp
--- wxGTK-2.4.1/src/html/m_layout.cpp 2003-06-08 09:13:16.000000000 +0100
+++ wxGTK-2.4.1/src/html/m_layout.cpp 2003-06-09 23:25:08.000000000 +0100
@@ -80,7 +80,7 @@
};
// Comparison routine for bsearch into an int* array of pagebreaks.
-static int integer_compare(void const* i0, void const* i1)
+extern "C" int wxCMPFUNC_CONV wxInteger_compare(void const* i0, void const* i1)
{
return *(int*)i0 - *(int*)i1;
}
@@ -130,7 +130,7 @@
// zero plus one element for each page.
int* where = (int*) bsearch(&total_height, known_pagebreaks,
1 + number_of_pages, sizeof(int),
- integer_compare);
+ wxInteger_compare);
// Add a pagebreak only if there isn't one already set here.
if(NULL != where)
{
diff -ru ./make.env.in ../../wxPythonSrc-2.4.1.2/src/make.env.in
--- wxGTK-2.4.1/src/make.env.in 2003-06-08 09:13:13.000000000 +0100
+++ wxGTK-2.4.1/src/make.env.in 2003-06-17 00:47:18.000000000 +0100
@@ -14,6 +14,7 @@
# see comment near LDFLAGS at the end of file
EXTRALIBS = @LDFLAGS@ @LDFLAGS_VERSIONING@ @LIBS@ @DMALLOC_LIBS@
OPENGLLIBS = @OPENGL_LIBS@
+LDFLAGS_GL = @LDFLAGS_GL@
LDLIBS = ${APPEXTRALIBS} ${top_builddir}/lib/@WX_TARGET_LIBRARY@ ${EXTRALIBS}
TOOLKIT = @TOOLKIT@
|