Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d61e43ca
Commit
d61e43ca
authored
Jan 30, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Jan 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove writable-strings support.
parent
07f773d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
70 deletions
+1
-70
winnt.h
include/winnt.h
+1
-39
port.c
library/port.c
+0
-31
No files found.
include/winnt.h
View file @
d61e43ca
...
...
@@ -337,49 +337,11 @@ typedef const WCHAR *PCWSTR, *LPCWSTR;
* macro which only exists in the user's code.
*/
#ifndef __WINESRC__
# ifdef WINE_UNICODE_REWRITE
/* Use this if your compiler does not provide a 16bit wchar_t type.
* Note that you will need to specify -fwritable-strings or an option
* to this effect.
* In C++ both WINE_UNICODE_TEXT('c') and WINE_UNICODE_TEXT("str") are
* supported, but only the string form can be supported in C.
*/
EXTERN_C
unsigned
short
*
wine_rewrite_s4tos2
(
const
wchar_t
*
str4
);
# ifdef __cplusplus
inline
WCHAR
*
wine_unicode_text
(
const
wchar_t
*
str4
)
{
return
(
WCHAR
*
)
wine_rewrite_s4tos2
(
str4
);
}
inline
WCHAR
wine_unicode_text
(
wchar_t
chr4
)
{
return
(
WCHAR
)
chr4
;
}
# define WINE_UNICODE_TEXT(x) wine_unicode_text(L##x)
# else
/* __cplusplus */
# define WINE_UNICODE_TEXT(x) ((WCHAR*)wine_rewrite_s4tos2(L##x))
# endif
/* __cplusplus */
# else
/* WINE_UNICODE_REWRITE */
/* Define WINE_UNICODE_NATIVE if:
* - your compiler provides a 16bit wchar_t type, e.g. gcc >= 2.96 with
* -fshort-wchar option
* - or if you decide to use the native 32bit Unix wchar_t type. Be aware
* though that the Wine APIs only support 16bit WCHAR characters for
* binary compatibility reasons.
* - or define nothing at all if you don't use Unicode, and blissfully
* ignore the issue :-)
*/
# define WINE_UNICODE_TEXT(string) L##string
# endif
/* WINE_UNICODE_REWRITE */
# ifdef UNICODE
typedef
WCHAR
TCHAR
,
*
PTCHAR
;
typedef
LPWSTR
PTSTR
,
LPTSTR
;
typedef
LPCWSTR
PCTSTR
,
LPCTSTR
;
# define __TEXT(string)
WINE_UNICODE_TEXT(string)
# define __TEXT(string)
L##string
# else
/* UNICODE */
typedef
CHAR
TCHAR
,
*
PTCHAR
;
typedef
LPSTR
PTSTR
,
LPTSTR
;
...
...
library/port.c
View file @
d61e43ca
...
...
@@ -588,37 +588,6 @@ int wine_dlclose( void *handle, char *error, int errorsize )
#endif
}
/***********************************************************************
* wine_rewrite_s4tos2
*
* Convert 4 byte Unicode strings to 2 byte Unicode strings in-place.
* This is only practical if literal strings are writable.
*/
unsigned
short
*
wine_rewrite_s4tos2
(
const
wchar_t
*
str4
)
{
unsigned
short
*
str2
,
*
s2
;
if
(
str4
==
NULL
)
return
NULL
;
if
((
*
str4
&
0xffff0000
)
!=
0
)
{
/* This string has already been converted. Return it as is */
return
(
unsigned
short
*
)
str4
;
}
/* Note that we can also end up here if the string has a single
* character. In such a case we will convert the string over and
* over again. But this is harmless.
*/
str2
=
s2
=
(
unsigned
short
*
)
str4
;
do
{
*
s2
=
(
unsigned
short
)
*
str4
;
s2
++
;
}
while
(
*
str4
++
!=
L'\0'
);
return
str2
;
}
#ifndef HAVE_ECVT
/***********************************************************************
* ecvt
...
...
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