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
d44b0dba
Commit
d44b0dba
authored
Nov 02, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Nov 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Move documented functions to string.c.
parent
86c28920
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
142 deletions
+139
-142
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+0
-142
string.c
dlls/comctl32/string.c
+139
-0
No files found.
dlls/comctl32/comctl32undoc.c
View file @
d44b0dba
...
@@ -883,148 +883,6 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
...
@@ -883,148 +883,6 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
return
datasize
;
return
datasize
;
}
}
/**************************************************************************
* Str_GetPtrA [COMCTL32.233]
*
* Copies a string into a destination buffer.
*
* PARAMS
* lpSrc [I] Source string
* lpDest [O] Destination buffer
* nMaxLen [I] Size of buffer in characters
*
* RETURNS
* The number of characters copied.
*/
INT
WINAPI
Str_GetPtrA
(
LPCSTR
lpSrc
,
LPSTR
lpDest
,
INT
nMaxLen
)
{
INT
len
;
TRACE
(
"(%p %p %d)
\n
"
,
lpSrc
,
lpDest
,
nMaxLen
);
if
(
!
lpDest
&&
lpSrc
)
return
strlen
(
lpSrc
);
if
(
nMaxLen
==
0
)
return
0
;
if
(
lpSrc
==
NULL
)
{
lpDest
[
0
]
=
'\0'
;
return
0
;
}
len
=
strlen
(
lpSrc
);
if
(
len
>=
nMaxLen
)
len
=
nMaxLen
-
1
;
RtlMoveMemory
(
lpDest
,
lpSrc
,
len
);
lpDest
[
len
]
=
'\0'
;
return
len
;
}
/**************************************************************************
* Str_SetPtrA [COMCTL32.234]
*
* Makes a copy of a string, allocating memory if necessary.
*
* PARAMS
* lppDest [O] Pointer to destination string
* lpSrc [I] Source string
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* Set lpSrc to NULL to free the memory allocated by a previous call
* to this function.
*/
BOOL
WINAPI
Str_SetPtrA
(
LPSTR
*
lppDest
,
LPCSTR
lpSrc
)
{
TRACE
(
"(%p %p)
\n
"
,
lppDest
,
lpSrc
);
if
(
lpSrc
)
{
LPSTR
ptr
=
ReAlloc
(
*
lppDest
,
strlen
(
lpSrc
)
+
1
);
if
(
!
ptr
)
return
FALSE
;
strcpy
(
ptr
,
lpSrc
);
*
lppDest
=
ptr
;
}
else
{
if
(
*
lppDest
)
{
Free
(
*
lppDest
);
*
lppDest
=
NULL
;
}
}
return
TRUE
;
}
/**************************************************************************
* Str_GetPtrW [COMCTL32.235]
*
* See Str_GetPtrA.
*/
INT
WINAPI
Str_GetPtrW
(
LPCWSTR
lpSrc
,
LPWSTR
lpDest
,
INT
nMaxLen
)
{
INT
len
;
TRACE
(
"(%p %p %d)
\n
"
,
lpSrc
,
lpDest
,
nMaxLen
);
if
(
!
lpDest
&&
lpSrc
)
return
strlenW
(
lpSrc
);
if
(
nMaxLen
==
0
)
return
0
;
if
(
lpSrc
==
NULL
)
{
lpDest
[
0
]
=
L'\0'
;
return
0
;
}
len
=
strlenW
(
lpSrc
);
if
(
len
>=
nMaxLen
)
len
=
nMaxLen
-
1
;
RtlMoveMemory
(
lpDest
,
lpSrc
,
len
*
sizeof
(
WCHAR
));
lpDest
[
len
]
=
L'\0'
;
return
len
;
}
/**************************************************************************
* Str_SetPtrW [COMCTL32.236]
*
* See Str_SetPtrA.
*/
BOOL
WINAPI
Str_SetPtrW
(
LPWSTR
*
lppDest
,
LPCWSTR
lpSrc
)
{
TRACE
(
"(%p %p)
\n
"
,
lppDest
,
lpSrc
);
if
(
lpSrc
)
{
INT
len
=
strlenW
(
lpSrc
)
+
1
;
LPWSTR
ptr
=
ReAlloc
(
*
lppDest
,
len
*
sizeof
(
WCHAR
));
if
(
!
ptr
)
return
FALSE
;
strcpyW
(
ptr
,
lpSrc
);
*
lppDest
=
ptr
;
}
else
{
if
(
*
lppDest
)
{
Free
(
*
lppDest
);
*
lppDest
=
NULL
;
}
}
return
TRUE
;
}
/**************************************************************************
/**************************************************************************
* Str_GetPtrWtoA [internal]
* Str_GetPtrWtoA [internal]
*
*
...
...
dlls/comctl32/string.c
View file @
d44b0dba
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
#include "winuser.h"
#include "winuser.h"
#include "winnls.h"
#include "winnls.h"
#include "comctl32.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -145,6 +147,143 @@ static BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
...
@@ -145,6 +147,143 @@ static BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
}
}
/**************************************************************************
/**************************************************************************
* Str_GetPtrA [COMCTL32.233]
*
* Copies a string into a destination buffer.
*
* PARAMS
* lpSrc [I] Source string
* lpDest [O] Destination buffer
* nMaxLen [I] Size of buffer in characters
*
* RETURNS
* The number of characters copied.
*/
INT
WINAPI
Str_GetPtrA
(
LPCSTR
lpSrc
,
LPSTR
lpDest
,
INT
nMaxLen
)
{
INT
len
;
TRACE
(
"(%p %p %d)
\n
"
,
lpSrc
,
lpDest
,
nMaxLen
);
if
(
!
lpDest
&&
lpSrc
)
return
strlen
(
lpSrc
);
if
(
nMaxLen
==
0
)
return
0
;
if
(
lpSrc
==
NULL
)
{
lpDest
[
0
]
=
'\0'
;
return
0
;
}
len
=
strlen
(
lpSrc
);
if
(
len
>=
nMaxLen
)
len
=
nMaxLen
-
1
;
RtlMoveMemory
(
lpDest
,
lpSrc
,
len
);
lpDest
[
len
]
=
'\0'
;
return
len
;
}
/**************************************************************************
* Str_SetPtrA [COMCTL32.234]
*
* Makes a copy of a string, allocating memory if necessary.
*
* PARAMS
* lppDest [O] Pointer to destination string
* lpSrc [I] Source string
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* Set lpSrc to NULL to free the memory allocated by a previous call
* to this function.
*/
BOOL
WINAPI
Str_SetPtrA
(
LPSTR
*
lppDest
,
LPCSTR
lpSrc
)
{
TRACE
(
"(%p %p)
\n
"
,
lppDest
,
lpSrc
);
if
(
lpSrc
)
{
LPSTR
ptr
=
ReAlloc
(
*
lppDest
,
strlen
(
lpSrc
)
+
1
);
if
(
!
ptr
)
return
FALSE
;
strcpy
(
ptr
,
lpSrc
);
*
lppDest
=
ptr
;
}
else
{
if
(
*
lppDest
)
{
Free
(
*
lppDest
);
*
lppDest
=
NULL
;
}
}
return
TRUE
;
}
/**************************************************************************
* Str_GetPtrW [COMCTL32.235]
*
* See Str_GetPtrA.
*/
INT
WINAPI
Str_GetPtrW
(
LPCWSTR
lpSrc
,
LPWSTR
lpDest
,
INT
nMaxLen
)
{
INT
len
;
TRACE
(
"(%p %p %d)
\n
"
,
lpSrc
,
lpDest
,
nMaxLen
);
if
(
!
lpDest
&&
lpSrc
)
return
strlenW
(
lpSrc
);
if
(
nMaxLen
==
0
)
return
0
;
if
(
lpSrc
==
NULL
)
{
lpDest
[
0
]
=
L'\0'
;
return
0
;
}
len
=
strlenW
(
lpSrc
);
if
(
len
>=
nMaxLen
)
len
=
nMaxLen
-
1
;
RtlMoveMemory
(
lpDest
,
lpSrc
,
len
*
sizeof
(
WCHAR
));
lpDest
[
len
]
=
L'\0'
;
return
len
;
}
/**************************************************************************
* Str_SetPtrW [COMCTL32.236]
*
* See Str_SetPtrA.
*/
BOOL
WINAPI
Str_SetPtrW
(
LPWSTR
*
lppDest
,
LPCWSTR
lpSrc
)
{
TRACE
(
"(%p %p)
\n
"
,
lppDest
,
lpSrc
);
if
(
lpSrc
)
{
INT
len
=
strlenW
(
lpSrc
)
+
1
;
LPWSTR
ptr
=
ReAlloc
(
*
lppDest
,
len
*
sizeof
(
WCHAR
));
if
(
!
ptr
)
return
FALSE
;
strcpyW
(
ptr
,
lpSrc
);
*
lppDest
=
ptr
;
}
else
{
if
(
*
lppDest
)
{
Free
(
*
lppDest
);
*
lppDest
=
NULL
;
}
}
return
TRUE
;
}
/**************************************************************************
* StrChrA [COMCTL32.350]
* StrChrA [COMCTL32.350]
*
*
* Find a given character in a string.
* Find a given character in a string.
...
...
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