Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
8f098fc7
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8f098fc7
编写于
12月 28, 2010
作者:
D
dav
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6999766: Changes to correct c/c++ language issues for use of parfait
Reviewed-by: uta, amenkov
上级
e46db277
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
53 addition
and
44 deletion
+53
-44
src/windows/native/sun/windows/Devices.h
src/windows/native/sun/windows/Devices.h
+1
-1
src/windows/native/sun/windows/awt.h
src/windows/native/sun/windows/awt.h
+1
-1
src/windows/native/sun/windows/awt_Debug.cpp
src/windows/native/sun/windows/awt_Debug.cpp
+10
-1
src/windows/native/sun/windows/awt_Debug.h
src/windows/native/sun/windows/awt_Debug.h
+4
-1
src/windows/native/sun/windows/awt_DesktopProperties.cpp
src/windows/native/sun/windows/awt_DesktopProperties.cpp
+9
-9
src/windows/native/sun/windows/awt_TextArea.h
src/windows/native/sun/windows/awt_TextArea.h
+27
-30
src/windows/native/sun/windows/awt_Toolkit.h
src/windows/native/sun/windows/awt_Toolkit.h
+1
-1
未找到文件。
src/windows/native/sun/windows/Devices.h
浏览文件 @
8f098fc7
...
@@ -54,7 +54,7 @@ static BOOL UpdateInstance(JNIEnv *env);
...
@@ -54,7 +54,7 @@ static BOOL UpdateInstance(JNIEnv *env);
InstanceAccess
&
operator
=
(
const
InstanceAccess
&
);
InstanceAccess
&
operator
=
(
const
InstanceAccess
&
);
InstanceAccess
*
operator
&
();
InstanceAccess
*
operator
&
();
};
};
friend
InstanceAccess
;
friend
class
InstanceAccess
;
private:
private:
Devices
(
int
numElements
);
Devices
(
int
numElements
);
...
...
src/windows/native/sun/windows/awt.h
浏览文件 @
8f098fc7
...
@@ -173,7 +173,7 @@ extern JavaVM *jvm;
...
@@ -173,7 +173,7 @@ extern JavaVM *jvm;
// Platform encoding is Unicode (UTF-16), re-define JNU_ functions
// Platform encoding is Unicode (UTF-16), re-define JNU_ functions
// to proper JNI functions.
// to proper JNI functions.
#define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast<jchar*>(x), static_cast<jsize>(_tcslen(x)))
#define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast<
const
jchar*>(x), static_cast<jsize>(_tcslen(x)))
#define JNU_GetStringPlatformChars(env, x, y) reinterpret_cast<LPCWSTR>(env->GetStringChars(x, y))
#define JNU_GetStringPlatformChars(env, x, y) reinterpret_cast<LPCWSTR>(env->GetStringChars(x, y))
#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast<const jchar*>(y))
#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast<const jchar*>(y))
...
...
src/windows/native/sun/windows/awt_Debug.cpp
浏览文件 @
8f098fc7
...
@@ -47,12 +47,21 @@ void * operator new(size_t size, const char * filename, int linenumber) {
...
@@ -47,12 +47,21 @@ void * operator new(size_t size, const char * filename, int linenumber) {
return
ptr
;
return
ptr
;
}
}
void
*
operator
new
[](
size_t
size
,
const
char
*
filename
,
int
linenumber
)
{
void
*
ptr
=
DMem_AllocateBlock
(
size
,
filename
,
linenumber
);
if
(
ptr
==
NULL
)
{
throw
std
::
bad_alloc
();
}
return
ptr
;
}
#if _MSC_VER >= 1200
#if _MSC_VER >= 1200
void
operator
delete
(
void
*
ptr
,
const
char
*
,
int
)
{
void
operator
delete
(
void
*
ptr
,
const
char
*
,
int
)
{
DASSERTMSG
(
FALSE
,
"This version of 'delete' should never get called!!!"
);
DASSERTMSG
(
FALSE
,
"This version of 'delete' should never get called!!!"
);
}
}
#endif
#endif
void
operator
delete
(
void
*
ptr
)
{
void
operator
delete
(
void
*
ptr
)
throw
()
{
DMem_FreeBlock
(
ptr
);
DMem_FreeBlock
(
ptr
);
}
}
...
...
src/windows/native/sun/windows/awt_Debug.h
浏览文件 @
8f098fc7
...
@@ -48,11 +48,14 @@
...
@@ -48,11 +48,14 @@
};
};
extern
void
*
operator
new
(
size_t
size
,
const
char
*
filename
,
int
linenumber
);
extern
void
*
operator
new
(
size_t
size
,
const
char
*
filename
,
int
linenumber
);
extern
void
*
operator
new
[](
size_t
size
,
const
char
*
filename
,
int
linenumber
);
#if _MSC_VER >= 1200
#if _MSC_VER >= 1200
/* VC 6.0 is more strict about enforcing matching placement new & delete */
/* VC 6.0 is more strict about enforcing matching placement new & delete */
extern
void
operator
delete
(
void
*
ptr
,
const
char
*
,
int
);
extern
void
operator
delete
(
void
*
ptr
,
const
char
*
,
int
);
#endif
#endif
extern
void
operator
delete
(
void
*
ptr
);
extern
void
operator
delete
(
void
*
ptr
)
throw
();
extern
void
DumpClipRectangle
(
const
char
*
file
,
int
line
,
int
argc
,
const
char
*
fmt
,
va_list
arglist
);
extern
void
DumpClipRectangle
(
const
char
*
file
,
int
line
,
int
argc
,
const
char
*
fmt
,
va_list
arglist
);
extern
void
DumpUpdateRectangle
(
const
char
*
file
,
int
line
,
int
argc
,
const
char
*
fmt
,
va_list
arglist
);
extern
void
DumpUpdateRectangle
(
const
char
*
file
,
int
line
,
int
argc
,
const
char
*
fmt
,
va_list
arglist
);
...
...
src/windows/native/sun/windows/awt_DesktopProperties.cpp
浏览文件 @
8f098fc7
...
@@ -650,7 +650,7 @@ UINT AwtDesktopProperties::GetIntegerParameter(UINT spi) {
...
@@ -650,7 +650,7 @@ UINT AwtDesktopProperties::GetIntegerParameter(UINT spi) {
}
}
void
AwtDesktopProperties
::
SetStringProperty
(
LPCTSTR
propName
,
LPTSTR
value
)
{
void
AwtDesktopProperties
::
SetStringProperty
(
LPCTSTR
propName
,
LPTSTR
value
)
{
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
GetEnv
()
->
CallVoidMethod
(
self
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setStringPropertyID
,
AwtDesktopProperties
::
setStringPropertyID
,
key
,
JNU_NewStringPlatform
(
GetEnv
(),
value
));
key
,
JNU_NewStringPlatform
(
GetEnv
(),
value
));
...
@@ -658,7 +658,7 @@ void AwtDesktopProperties::SetStringProperty(LPCTSTR propName, LPTSTR value) {
...
@@ -658,7 +658,7 @@ void AwtDesktopProperties::SetStringProperty(LPCTSTR propName, LPTSTR value) {
}
}
void
AwtDesktopProperties
::
SetIntegerProperty
(
LPCTSTR
propName
,
int
value
)
{
void
AwtDesktopProperties
::
SetIntegerProperty
(
LPCTSTR
propName
,
int
value
)
{
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
GetEnv
()
->
CallVoidMethod
(
self
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setIntegerPropertyID
,
AwtDesktopProperties
::
setIntegerPropertyID
,
key
,
(
jint
)
value
);
key
,
(
jint
)
value
);
...
@@ -666,7 +666,7 @@ void AwtDesktopProperties::SetIntegerProperty(LPCTSTR propName, int value) {
...
@@ -666,7 +666,7 @@ void AwtDesktopProperties::SetIntegerProperty(LPCTSTR propName, int value) {
}
}
void
AwtDesktopProperties
::
SetBooleanProperty
(
LPCTSTR
propName
,
BOOL
value
)
{
void
AwtDesktopProperties
::
SetBooleanProperty
(
LPCTSTR
propName
,
BOOL
value
)
{
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
GetEnv
()
->
CallVoidMethod
(
self
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setBooleanPropertyID
,
AwtDesktopProperties
::
setBooleanPropertyID
,
key
,
value
?
JNI_TRUE
:
JNI_FALSE
);
key
,
value
?
JNI_TRUE
:
JNI_FALSE
);
...
@@ -674,7 +674,7 @@ void AwtDesktopProperties::SetBooleanProperty(LPCTSTR propName, BOOL value) {
...
@@ -674,7 +674,7 @@ void AwtDesktopProperties::SetBooleanProperty(LPCTSTR propName, BOOL value) {
}
}
void
AwtDesktopProperties
::
SetColorProperty
(
LPCTSTR
propName
,
DWORD
value
)
{
void
AwtDesktopProperties
::
SetColorProperty
(
LPCTSTR
propName
,
DWORD
value
)
{
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
GetEnv
()
->
CallVoidMethod
(
self
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setColorPropertyID
,
AwtDesktopProperties
::
setColorPropertyID
,
key
,
GetRValue
(
value
),
GetGValue
(
value
),
key
,
GetRValue
(
value
),
GetGValue
(
value
),
...
@@ -726,7 +726,7 @@ void AwtDesktopProperties::SetFontProperty(HDC dc, int fontID,
...
@@ -726,7 +726,7 @@ void AwtDesktopProperties::SetFontProperty(HDC dc, int fontID,
style
|=
java_awt_Font_ITALIC
;
style
|=
java_awt_Font_ITALIC
;
}
}
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
GetEnv
()
->
CallVoidMethod
(
self
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setFontPropertyID
,
AwtDesktopProperties
::
setFontPropertyID
,
key
,
fontName
,
style
,
pointSize
);
key
,
fontName
,
style
,
pointSize
);
...
@@ -744,7 +744,7 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon
...
@@ -744,7 +744,7 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon
jint
pointSize
;
jint
pointSize
;
jint
style
;
jint
style
;
fontName
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPWSTR
>
(
font
.
lfFaceName
)
);
fontName
=
JNU_NewStringPlatform
(
GetEnv
(),
font
.
lfFaceName
);
#if 0
#if 0
HDC hdc;
HDC hdc;
...
@@ -767,7 +767,7 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon
...
@@ -767,7 +767,7 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon
style
|=
java_awt_Font_ITALIC
;
style
|=
java_awt_Font_ITALIC
;
}
}
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setFontPropertyID
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setFontPropertyID
,
key
,
fontName
,
style
,
pointSize
);
key
,
fontName
,
style
,
pointSize
);
...
@@ -776,8 +776,8 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon
...
@@ -776,8 +776,8 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon
}
}
void
AwtDesktopProperties
::
SetSoundProperty
(
LPCTSTR
propName
,
LPCTSTR
winEventName
)
{
void
AwtDesktopProperties
::
SetSoundProperty
(
LPCTSTR
propName
,
LPCTSTR
winEventName
)
{
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
propName
)
);
jstring
key
=
JNU_NewStringPlatform
(
GetEnv
(),
propName
);
jstring
event
=
JNU_NewStringPlatform
(
GetEnv
(),
const_cast
<
LPTSTR
>
(
winEventName
)
);
jstring
event
=
JNU_NewStringPlatform
(
GetEnv
(),
winEventName
);
GetEnv
()
->
CallVoidMethod
(
self
,
GetEnv
()
->
CallVoidMethod
(
self
,
AwtDesktopProperties
::
setSoundPropertyID
,
AwtDesktopProperties
::
setSoundPropertyID
,
key
,
event
);
key
,
event
);
...
...
src/windows/native/sun/windows/awt_TextArea.h
浏览文件 @
8f098fc7
...
@@ -41,9 +41,6 @@
...
@@ -41,9 +41,6 @@
class
AwtTextArea
:
public
AwtTextComponent
{
class
AwtTextArea
:
public
AwtTextComponent
{
// inner classes
class
OleCallback
;
public:
public:
/* java.awt.TextArea fields ids */
/* java.awt.TextArea fields ids */
...
@@ -89,36 +86,11 @@ public:
...
@@ -89,36 +86,11 @@ public:
static
void
_ReplaceText
(
void
*
param
);
static
void
_ReplaceText
(
void
*
param
);
protected:
protected:
INLINE
static
OleCallback
&
GetOleCallback
()
{
return
sm_oleCallback
;
}
void
EditSetSel
(
CHARRANGE
&
cr
);
void
EditGetSel
(
CHARRANGE
&
cr
);
LONG
EditGetCharFromPos
(
POINT
&
pt
);
private:
// RichEdit 1.0 control generates EN_CHANGE notifications not only
// on text changes, but also on any character formatting change.
// This flag is true when the latter case is detected.
BOOL
m_bIgnoreEnChange
;
// RichEdit 1.0 control undoes a character formatting change
// if it is the latest. We don't create our own undo buffer,
// but just prohibit undo in case if the latest operation
// is a formatting change.
BOOL
m_bCanUndo
;
HWND
m_hEditCtrl
;
static
WNDPROC
sm_pDefWindowProc
;
LONG
m_lHDeltaAccum
;
LONG
m_lVDeltaAccum
;
static
OleCallback
sm_oleCallback
;
/*****************************************************************
/*****************************************************************
* Inner class OleCallback declaration.
* Inner class OleCallback declaration.
*/
*/
class
OleCallback
:
public
IRichEditOleCallback
{
class
AwtTextArea
::
OleCallback
:
public
IRichEditOleCallback
{
public:
public:
OleCallback
();
OleCallback
();
...
@@ -143,7 +115,32 @@ protected:
...
@@ -143,7 +115,32 @@ protected:
CHARRANGE
FAR
*
pchrg
,
HMENU
FAR
*
phmenu
);
CHARRANGE
FAR
*
pchrg
,
HMENU
FAR
*
phmenu
);
private:
private:
ULONG
m_refs
;
// Reference count
ULONG
m_refs
;
// Reference count
};
};
//OleCallback class
INLINE
static
OleCallback
&
GetOleCallback
()
{
return
sm_oleCallback
;
}
void
EditSetSel
(
CHARRANGE
&
cr
);
void
EditGetSel
(
CHARRANGE
&
cr
);
LONG
EditGetCharFromPos
(
POINT
&
pt
);
private:
// RichEdit 1.0 control generates EN_CHANGE notifications not only
// on text changes, but also on any character formatting change.
// This flag is true when the latter case is detected.
BOOL
m_bIgnoreEnChange
;
// RichEdit 1.0 control undoes a character formatting change
// if it is the latest. We don't create our own undo buffer,
// but just prohibit undo in case if the latest operation
// is a formatting change.
BOOL
m_bCanUndo
;
HWND
m_hEditCtrl
;
static
WNDPROC
sm_pDefWindowProc
;
LONG
m_lHDeltaAccum
;
LONG
m_lVDeltaAccum
;
static
OleCallback
sm_oleCallback
;
};
};
...
...
src/windows/native/sun/windows/awt_Toolkit.h
浏览文件 @
8f098fc7
...
@@ -110,7 +110,7 @@ class CriticalSection {
...
@@ -110,7 +110,7 @@ class CriticalSection {
private:
private:
const
CriticalSection
&
critSec
;
const
CriticalSection
&
critSec
;
};
};
friend
Lock
;
friend
class
Lock
;
private:
private:
CRITICAL_SECTION
rep
;
CRITICAL_SECTION
rep
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录