akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
f69e1fe697
[clang-tidy] readability-duplicate-include
2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d
[clang-tidy] cppcoreguidelines-init-variables
2024-02-15 11:49:16 +01:00
akallabeth
207def5c56
[clang-tidy] readability-isolate-declaration
2024-02-15 11:49:16 +01:00
Armin Novak
5b0ee107bf
[winpr,crt] fix wcstok_s
2023-12-20 09:03:58 +01:00
Armin Novak
9575f386cd
fixed WCHAR constants, use endian safe definitions
2023-12-20 09:03:58 +01:00
Armin Novak
da49127a78
[unicode] remove obsolete bigendian defines
2023-12-20 09:03:58 +01:00
Armin Novak
879e68c02b
[warnings] fixed -Wincompatible-pointer-types
2023-12-13 13:24:22 +01:00
Armin Novak
6f723e9f4d
[winpr,crt] add InitializeConstWCharFromUtf8
2023-12-12 19:36:54 +01:00
Armin Novak
30494d0c93
[winpr,crt] add return to ByteSwapUnicode
2023-12-12 19:36:54 +01:00
Armin Novak
fad30cce1b
[winpr,crt] fix ICU string convert
...
use ucnv_convert to make conversion endian safe
2023-12-11 21:25:31 +01:00
akallabeth
1b31852d32
[git] remove .gitignore
...
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
Armin Novak
3f3f5010bd
[test,unicode] fix test result comparison
...
If the buffer size was too small do not expect success and skip the
memcmp.
2023-11-24 18:19:03 +01:00
Armin Novak
0bd76e256b
Revert "Refactor TestUnicodeConversion"
...
This reverts commit d1dcae5b4a
.
2023-11-24 18:19:03 +01:00
Armin Novak
88697183b9
[winpr,unicode] simplify unicode functions
2023-11-24 18:19:03 +01:00
Armin Novak
f1ddc19806
[winpr,str] add winpr_vasprintf
2023-11-20 18:00:42 +01:00
Armin Novak
c91a250623
[warnings] add WINPR_FORMAT_ARG
...
with WINPR_FORMAT_ARG format strings are marked for MSVC to avoid
warnings
2023-10-16 15:10:13 +02:00
akallabeth
8dedcc9068
[winpr,string] add uriparse as optional
2023-10-10 19:35:27 +02:00
Armin Novak
fe2595eaeb
[winpr,crt] fix unicode conversion
...
fix erroneous cast to wrong pointer type
2023-08-31 11:39:22 +02:00
akallabeth
4e824b243f
[winpr] add WINPR_ATTR_FORMAT_ARG
...
this macro declares the function argument (pos,arg) to be a printf
style format string and enables compiler checks for that.
2023-08-25 12:56:36 +02:00
akallabeth
9cee9b3c08
[c standard] use WINPR_FALLTHROUGH
...
use the macro to silence intentional switch fallthrough locations
2023-08-25 12:56:36 +02:00
akallabeth
4a82980983
[winpr] fix compiler warnings
2023-08-25 12:56:36 +02:00
David VERON
d1dcae5b4a
Refactor TestUnicodeConversion
...
* added testcases when buffers reprensented empty string
* corrected the code to behave as the doc says
* added tests for the alloc versions
2023-08-24 07:41:27 +02:00
David VERON
fb406feb33
libwinpr/crt/unicode: unicode conversion functions with allocation
...
Unicode conversion functions with allocation returned NULL when the input was
a string of len = 0. Now those functions allocate buffers with the
corresponding empty string that the caller has to free.
2023-08-03 17:23:52 +02:00
Armin Novak
b46a4ce750
[winpr,string] remove duplicate string functions
...
prefer standard C functions over window specific ones
2023-07-28 13:42:12 +02:00
Armin Novak
e61880d077
[standard] replace __FUNCTION__ with __func__
2023-07-27 20:02:43 +02:00
Armin Novak
14d5cbeacb
[winpr,file] fix issues with FindFirstFile
2023-07-26 10:57:42 +02:00
akallabeth
ee078cdda4
[warnings] fix format string warnings
2023-07-20 14:20:28 +02:00
akallabeth
b7ff113780
[winpr,crt] fix missing include
2023-06-29 18:34:51 +02:00
akallabeth
64486828bb
[winpr,crt] fix winpr_aligned_offset_recalloc
...
the copied data was taken from the wrong offset
2023-06-12 16:32:23 +02:00
Armin Novak
a4c6b36a19
[build] fix memory sanitizer stack frame warnings
2023-06-07 09:14:45 +02:00
akallabeth
734ae69756
[winpr] fix some msan warnings
...
initialize local stack variables
2023-06-07 09:14:45 +02:00
fifthdegree
ba7fdcb5f0
Move alloc_sprintf into the winpr string api
2023-05-23 06:04:55 +02:00
akallabeth
4a006322af
[winpr,clipboard] fix url unescape for file uri
2023-05-12 13:57:56 +02:00
Marc-André Moreau
32264b90cc
add WITH_UNICODE_BUILTIN option to use built-in UTF conversion functions
2023-04-18 16:51:08 -04:00
akallabeth
37aaa7802a
[winpr,crt] added winpr_aligned_calloc
2023-03-28 11:34:52 +02:00
akallabeth
ee07a13130
[cleanup] fix compiler warnings
2023-01-26 09:30:17 +01:00
Armin Novak
641022b795
[logging] remove __FUNCTION__ from actual message
...
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
92d3e3c64a
[winpr] use WINPR_ prefix for conditional includes
2023-01-10 17:38:00 +01:00
akallabeth
d4808dd3e1
Fixed various compiler warnings
2022-12-09 15:58:26 +01:00
akallabeth
7ab917dca8
Fixed Wsign-compare warnings
2022-12-09 15:58:26 +01:00
Armin Novak
bd7e2263ad
fixed const and type cast warnings
2022-12-09 15:58:26 +01:00
akallabeth
3ddf99ad64
Fixed Wformat warnings
2022-12-09 15:58:26 +01:00
Armin Novak
bbf893a5d8
[winpr,crt] fix unicode conversion functions
...
There are subtle differences between MultiByteToWideChar,
WideCharToMultibyte and the ICU equivalents
2022-11-29 15:42:10 +01:00
akallabeth
66dad5deae
fixed review issues
...
* Overallocation in unicode functions
* Removed useless statements
* Fixed loop indices
2022-11-28 10:42:36 +01:00
Armin Novak
2784d54d6f
Deprecate MultiByteToWideChar and WideCharToMultiByte
2022-11-28 10:42:36 +01:00
Armin Novak
6f2d7f94cf
Deprecate ConvertFromUnicode and ConvertToUnicode
2022-11-28 10:42:36 +01:00
Armin Novak
0fb8c9e87e
[winpr,crt] Added ConvertMszWCharNToUtf8*
2022-11-28 10:42:36 +01:00
akallabeth
4f7114a140
[winpr,crt] Added ConvertMszUtf8NToWChar*
...
A conversion function that can handle multistrings (e.g. each element is
'\0' delimited, termination is '\0\0')
2022-11-28 10:42:36 +01:00
akallabeth
5c91c30a18
[winpr,crt] Added new unicode conversion functions
...
* Added functions converting WCHAR to/from UTF-8 with given buffers
and proper size_t arguments to have a centralized check for
integer overflows on RDP deserialization
* Added allocating functions converting WCHAR to/from UTF-8 as
convenience
2022-11-28 10:42:36 +01:00