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
1fdbf850
Commit
1fdbf850
authored
Nov 29, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Move the non-inline version of the string functions to libwine.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e03ad24
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
17 deletions
+32
-17
unicode.h
include/wine/unicode.h
+23
-6
Makefile.in
libs/port/Makefile.in
+0
-1
Makefile.in
libs/wine/Makefile.in
+1
-0
port.c
libs/wine/port.c
+2
-10
string.c
libs/wine/string.c
+6
-0
No files found.
include/wine/unicode.h
View file @
1fdbf850
...
...
@@ -40,7 +40,7 @@ extern "C" {
#endif
#ifndef WINE_UNICODE_INLINE
#define WINE_UNICODE_INLINE static
inline
#define WINE_UNICODE_INLINE static
FORCEINLINE
#endif
/* code page info common to SBCS and DBCS */
...
...
@@ -79,11 +79,6 @@ union cptable
struct
dbcs_table
dbcs
;
};
extern
int
sprintfW
(
WCHAR
*
str
,
const
WCHAR
*
format
,
...
);
extern
int
snprintfW
(
WCHAR
*
str
,
size_t
len
,
const
WCHAR
*
format
,
...
);
extern
int
vsprintfW
(
WCHAR
*
str
,
const
WCHAR
*
format
,
va_list
valist
);
extern
int
vsnprintfW
(
WCHAR
*
str
,
size_t
len
,
const
WCHAR
*
format
,
va_list
valist
);
WINE_UNICODE_INLINE
WCHAR
tolowerW
(
WCHAR
ch
)
{
extern
const
WCHAR
wine_casemap_lower
[];
...
...
@@ -401,6 +396,28 @@ WINE_UNICODE_INLINE int atoiW( const WCHAR *str )
return
(
int
)
atolW
(
str
);
}
NTSYSAPI
int
__cdecl
_vsnwprintf
(
WCHAR
*
,
size_t
,
const
WCHAR
*
,
__ms_va_list
);
static
inline
int
WINAPIV
snprintfW
(
WCHAR
*
str
,
size_t
len
,
const
WCHAR
*
format
,
...)
{
int
retval
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
retval
=
_vsnwprintf
(
str
,
len
,
format
,
valist
);
__ms_va_end
(
valist
);
return
retval
;
}
static
inline
int
WINAPIV
sprintfW
(
WCHAR
*
str
,
const
WCHAR
*
format
,
...)
{
int
retval
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
retval
=
_vsnwprintf
(
str
,
MAXLONG
,
format
,
valist
);
__ms_va_end
(
valist
);
return
retval
;
}
#undef WINE_UNICODE_INLINE
#ifdef __cplusplus
...
...
libs/port/Makefile.in
View file @
1fdbf850
...
...
@@ -17,7 +17,6 @@ C_SRCS = \
rint.c
\
spawn.c
\
statvfs.c
\
string.c
\
strnlen.c
\
symlink.c
\
usleep.c
\
...
...
libs/wine/Makefile.in
View file @
1fdbf850
...
...
@@ -81,6 +81,7 @@ C_SRCS = \
mmap.c
\
port.c
\
sortkey.c
\
string.c
\
utf8.c
\
wctomb.c
...
...
libs/wine/port.c
View file @
1fdbf850
...
...
@@ -27,16 +27,8 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "wine/unicode.h"
/* functions from libwine_port that are also exported from libwine for backwards compatibility,
* on platforms that require it */
const
void
*
libwine_port_functions
[]
=
{
strtolW
,
vsnprintfW
,
};
#include <stdarg.h>
#include <windef.h>
/* no longer used, for backwards compatibility only */
struct
wine_pthread_functions
;
...
...
libs/
port
/string.c
→
libs/
wine
/string.c
View file @
1fdbf850
...
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/asm.h"
#ifdef __ASM_OBSOLETE
#include <assert.h>
#include <errno.h>
#include <limits.h>
...
...
@@ -711,3 +715,5 @@ int sprintfW( WCHAR *str, const WCHAR *format, ...)
va_end
(
valist
);
return
retval
;
}
#endif
/* __ASM_OBSOLETE */
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