Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
220b6ab3
Commit
220b6ab3
authored
Apr 05, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _wassert implementation.
parent
0aebe831
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
22 deletions
+58
-22
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
exit.c
dlls/msvcrt/exit.c
+51
-18
msvcrt.h
dlls/msvcrt/msvcrt.h
+3
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
No files found.
dlls/msvcr100/msvcr100.spec
View file @
220b6ab3
...
...
@@ -1277,7 +1277,7 @@
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
@ cdecl _wasctime(ptr) msvcrt._wasctime
@ stub _wasctime_s
@
stub
_wassert
@
cdecl _wassert(wstr wstr long) msvcrt.
_wassert
@ cdecl _wchdir(wstr) msvcrt._wchdir
@ cdecl _wchmod(wstr long) msvcrt._wchmod
@ extern _wcmdln msvcrt._wcmdln
...
...
dlls/msvcr80/msvcr80.spec
View file @
220b6ab3
...
...
@@ -1130,7 +1130,7 @@
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
@ cdecl _wasctime(ptr) msvcrt._wasctime
@ stub _wasctime_s
@
stub
_wassert
@
cdecl _wassert(wstr wstr long) msvcrt.
_wassert
@ cdecl _wchdir(wstr) msvcrt._wchdir
@ cdecl _wchmod(wstr long) msvcrt._wchmod
@ extern _wcmdln msvcrt._wcmdln
...
...
dlls/msvcr90/msvcr90.spec
View file @
220b6ab3
...
...
@@ -1117,7 +1117,7 @@
@ cdecl _waccess_s(wstr long) msvcrt._waccess_s
@ cdecl _wasctime(ptr) msvcrt._wasctime
@ stub _wasctime_s
@
stub
_wassert
@
cdecl _wassert(wstr wstr long) msvcrt.
_wassert
@ cdecl _wchdir(wstr) msvcrt._wchdir
@ cdecl _wchmod(wstr long) msvcrt._wchmod
@ extern _wcmdln msvcrt._wcmdln
...
...
dlls/msvcrt/exit.c
View file @
220b6ab3
...
...
@@ -37,7 +37,7 @@ static MSVCRT_purecall_handler purecall_handler = NULL;
static
const
char
szMsgBoxTitle
[]
=
"Wine C++ Runtime Library"
;
extern
int
MSVCRT_app_type
;
extern
char
*
MSVCRT__
pgmptr
;
extern
MSVCRT_wchar_t
*
MSVCRT__w
pgmptr
;
static
unsigned
int
MSVCRT_abort_behavior
=
MSVCRT__WRITE_ABORT_MSG
|
MSVCRT__CALL_REPORTFAULT
;
static
int
MSVCRT_error_mode
=
MSVCRT__OUT_TO_DEFAULT
;
...
...
@@ -103,32 +103,45 @@ void CDECL MSVCRT__exit(int exitcode)
}
/* Print out an error message with an option to debug */
static
void
DoMessageBox
(
LPCSTR
lead
,
LPCSTR
message
)
static
void
DoMessageBox
W
(
const
MSVCRT_wchar_t
*
lead
,
const
MSVCRT_wchar_t
*
message
)
{
MSGBOXPARAMSA
msgbox
;
char
text
[
2048
];
static
const
MSVCRT_wchar_t
message_format
[]
=
{
'%'
,
's'
,
'\n'
,
'\n'
,
'P'
,
'r'
,
'o'
,
'g'
,
'r'
,
'a'
,
'm'
,
':'
,
' '
,
'%'
,
's'
,
'\n'
,
'%'
,
's'
,
'\n'
,
'\n'
,
'P'
,
'r'
,
'e'
,
's'
,
's'
,
' '
,
'O'
,
'K'
,
' '
,
't'
,
'o'
,
' '
,
'e'
,
'x'
,
'i'
,
't'
,
' '
,
't'
,
'h'
,
'e'
,
' '
,
'p'
,
'r'
,
'o'
,
'g'
,
'r'
,
'a'
,
'm'
,
','
,
' '
,
'o'
,
'r'
,
' '
,
'C'
,
'a'
,
'n'
,
'c'
,
'e'
,
'l'
,
' '
,
't'
,
'o'
,
' '
,
's'
,
't'
,
'a'
,
'r'
,
't'
,
' '
,
't'
,
'h'
,
'e'
,
' '
,
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'd'
,
'e'
,
'b'
,
'b'
,
'u'
,
'g'
,
'e'
,
'r'
,
'.'
,
'\n'
,
0
};
MSGBOXPARAMSW
msgbox
;
MSVCRT_wchar_t
text
[
2048
];
INT
ret
;
snprintf
(
text
,
sizeof
(
text
),
"%s
\n\n
Program: %s
\n
%s
\n\n
"
"Press OK to exit the program, or Cancel to start the Wine debugger.
\n
"
,
lead
,
MSVCRT__pgmptr
,
message
);
MSVCRT__snwprintf
(
text
,
sizeof
(
text
),
message_format
,
lead
,
MSVCRT__wpgmptr
,
message
);
msgbox
.
cbSize
=
sizeof
(
msgbox
);
msgbox
.
hwndOwner
=
GetActiveWindow
();
msgbox
.
hInstance
=
0
;
msgbox
.
lpszText
=
text
;
msgbox
.
lpszCaption
=
szMsgBoxTitle
;
msgbox
.
lpszText
=
(
LPCWSTR
)
text
;
msgbox
.
lpszCaption
=
(
LPCWSTR
)
szMsgBoxTitle
;
msgbox
.
dwStyle
=
MB_OKCANCEL
|
MB_ICONERROR
;
msgbox
.
lpszIcon
=
NULL
;
msgbox
.
dwContextHelpId
=
0
;
msgbox
.
lpfnMsgBoxCallback
=
NULL
;
msgbox
.
dwLanguageId
=
LANG_NEUTRAL
;
ret
=
MessageBoxIndirect
A
(
&
msgbox
);
ret
=
MessageBoxIndirect
W
(
&
msgbox
);
if
(
ret
==
IDCANCEL
)
DebugBreak
();
}
static
void
DoMessageBox
(
const
char
*
lead
,
const
char
*
message
)
{
MSVCRT_wchar_t
leadW
[
1024
],
messageW
[
1024
];
MSVCRT_mbstowcs
(
leadW
,
lead
,
1024
);
MSVCRT_mbstowcs
(
messageW
,
message
,
1024
);
return
DoMessageBoxW
(
leadW
,
messageW
);
}
/*********************************************************************
* _amsg_exit (MSVCRT.@)
*/
...
...
@@ -188,26 +201,46 @@ unsigned int CDECL MSVCRT__set_abort_behavior(unsigned int flags, unsigned int m
}
/*********************************************************************
*
_
assert (MSVCRT.@)
*
_w
assert (MSVCRT.@)
*/
void
CDECL
MSVCRT__
assert
(
const
char
*
str
,
const
char
*
file
,
unsigned
int
line
)
void
CDECL
MSVCRT__
wassert
(
const
MSVCRT_wchar_t
*
str
,
const
MSVCRT_wchar_t
*
file
,
unsigned
int
line
)
{
TRACE
(
"(%s,%s,%d)
\n
"
,
str
,
file
,
line
);
static
const
MSVCRT_wchar_t
assertion_failed
[]
=
{
'A'
,
's'
,
's'
,
'e'
,
'r'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'f'
,
'a'
,
'i'
,
'l'
,
'e'
,
'd'
,
'!'
,
0
};
static
const
MSVCRT_wchar_t
format_msgbox
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
':'
,
' '
,
'%'
,
's'
,
'\n'
,
'L'
,
'i'
,
'n'
,
'e'
,
':'
,
' '
,
'%'
,
'd'
,
'\n'
,
'\n'
,
'E'
,
'x'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'i'
,
'o'
,
'n'
,
':'
,
' '
,
'\"'
,
'%'
,
's'
,
'\"'
,
0
};
static
const
MSVCRT_wchar_t
format_console
[]
=
{
'A'
,
's'
,
's'
,
'e'
,
'r'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'f'
,
'a'
,
'i'
,
'l'
,
'e'
,
'd'
,
':'
,
' '
,
'%'
,
's'
,
','
,
' '
,
'f'
,
'i'
,
'l'
,
'e'
,
' '
,
'%'
,
's'
,
','
,
' '
,
'l'
,
'i'
,
'n'
,
'e'
,
' '
,
'%'
,
'd'
,
'\n'
,
'\n'
,
0
};
TRACE
(
"(%s,%s,%d)
\n
"
,
debugstr_w
(
str
),
debugstr_w
(
file
),
line
);
if
((
MSVCRT_error_mode
==
MSVCRT__OUT_TO_MSGBOX
)
||
((
MSVCRT_error_mode
==
MSVCRT__OUT_TO_DEFAULT
)
&&
(
MSVCRT_app_type
==
2
)))
{
char
text
[
2048
];
snprintf
(
text
,
sizeof
(
text
),
"File: %s
\n
Line: %d
\n\n
Expression:
\"
%s
\"
"
,
file
,
line
,
str
);
DoMessageBox
(
"Assertion failed!"
,
text
);
MSVCRT_wchar_t
text
[
2048
];
MSVCRT__snwprintf
(
text
,
sizeof
(
text
),
format_msgbox
,
file
,
line
,
str
);
DoMessageBox
W
(
assertion_failed
,
text
);
}
else
_cprintf
(
"Assertion failed: %s, file %s, line %d
\n\n
"
,
str
,
file
,
line
);
_cwprintf
(
format_console
,
str
,
file
,
line
);
MSVCRT_raise
(
MSVCRT_SIGABRT
);
/* in case raise() returns */
MSVCRT__exit
(
3
);
}
/*********************************************************************
* _assert (MSVCRT.@)
*/
void
CDECL
MSVCRT__assert
(
const
char
*
str
,
const
char
*
file
,
unsigned
int
line
)
{
MSVCRT_wchar_t
strW
[
1024
],
fileW
[
1024
];
MSVCRT_mbstowcs
(
strW
,
str
,
1024
);
MSVCRT_mbstowcs
(
fileW
,
file
,
1024
);
MSVCRT__wassert
(
strW
,
fileW
,
line
);
}
/*********************************************************************
* _c_exit (MSVCRT.@)
*/
void
CDECL
MSVCRT__c_exit
(
void
)
...
...
dlls/msvcrt/msvcrt.h
View file @
220b6ab3
...
...
@@ -804,6 +804,7 @@ MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *);
int
__cdecl
MSVCRT_vsnprintf
(
char
*
str
,
MSVCRT_size_t
len
,
const
char
*
format
,
__ms_va_list
valist
);
int
__cdecl
MSVCRT_vsnwprintf
(
MSVCRT_wchar_t
*
str
,
MSVCRT_size_t
len
,
const
MSVCRT_wchar_t
*
format
,
__ms_va_list
valist
);
int
__cdecl
MSVCRT__snwprintf
(
MSVCRT_wchar_t
*
,
unsigned
int
,
const
MSVCRT_wchar_t
*
,
...);
int
__cdecl
MSVCRT_sprintf
(
char
*
,
const
char
*
,...);
int
__cdecl
MSVCRT__scprintf
(
const
char
*
,...);
int
__cdecl
MSVCRT_raise
(
int
sig
);
...
...
@@ -871,6 +872,7 @@ int __cdecl MSVCRT__write(int,const void*,unsigned int);
int
__cdecl
_getch
(
void
);
int
__cdecl
_ismbblead
(
unsigned
int
);
int
__cdecl
_ismbstrail
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
);
MSVCRT_size_t
__cdecl
MSVCRT_mbstowcs
(
MSVCRT_wchar_t
*
,
const
char
*
,
MSVCRT_size_t
);
MSVCRT_intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_intptr_t
__cdecl
MSVRT__spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_intptr_t
__cdecl
_wspawnve
(
int
,
const
MSVCRT_wchar_t
*
,
const
MSVCRT_wchar_t
*
const
*
,
const
MSVCRT_wchar_t
*
const
*
);
...
...
@@ -883,6 +885,7 @@ char* __cdecl _strset(char*,int);
int
__cdecl
_ungetch
(
int
);
int
__cdecl
_cputs
(
const
char
*
);
int
__cdecl
_cprintf
(
const
char
*
,...);
int
__cdecl
_cwprintf
(
const
MSVCRT_wchar_t
*
,...);
char
***
__cdecl
__p__environ
(
void
);
int
*
__cdecl
__p___mb_cur_max
(
void
);
unsigned
int
*
__cdecl
__p__fmode
(
void
);
...
...
dlls/msvcrt/msvcrt.spec
View file @
220b6ab3
...
...
@@ -1052,7 +1052,7 @@
@ cdecl _waccess_s(wstr long)
@ cdecl _wasctime(ptr) MSVCRT__wasctime
# stub _wasctime_s
# stub
_wassert
@ cdecl _wassert(wstr wstr long) MSVCRT_
_wassert
@ cdecl _wchdir(wstr)
@ cdecl _wchmod(wstr long)
@ extern _wcmdln MSVCRT__wcmdln
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment