31a53e9e43
UnitTests: Specify intermediate and output folders
...
Microsoft changed defaults in recent Visual Studio update. To worse
IMHO.
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-21 15:50:30 +01:00
0a719e3081
Xcode: turn on and resolve all warnings
2024-02-14 15:05:41 +01:00
0560c7bce9
Add missing UTF-8 BOM
...
This is required on Windows with default charset set to Windows-1252 or
another non-UTF-8 charset.
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-14 12:33:29 +01:00
8ac0efa85d
Xcode: resolve -Wsign-compare
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-14 12:28:39 +01:00
681a6955d8
Xcode: resolve -Wunknown-pragmas
...
This is a multi-platform project and while trying to reduce amount of
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-14 12:26:52 +01:00
2232b0d23e
UnitTests: remove Xcode settings set as default already
2024-02-14 08:49:36 +01:00
b0c682edd6
Fix to compile for Windows
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-08 15:26:20 +01:00
9acd185d44
UnitTest: redesing to avoid #include ".cpp" in Xcode
...
Each unit test .cpp file is not a separate compilation unit in Xcode project
like it is in Visual Studio. Hopefully, Visual Studio test tool still likes
this arrangement.
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-08 15:18:42 +01:00
1e627e1c6b
UnitTests: add zlib testing
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-08 14:38:34 +01:00
6e121395f3
UnitTest: switch to C++17
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-08 14:17:15 +01:00
b5e35922f1
string: revert emojis in unit test
...
Actually, using ill-created locale was the cause sprintf returned EILSEQ on %ls inserts containing emoji.
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-08 14:04:15 +01:00
08a18d1519
macOS support
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-08 12:09:33 +01:00
cf73f8a48d
zlib: Update
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-01-23 11:01:12 +01:00
9f3d65d910
zlib: add
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-01-09 20:07:06 +01:00
c5feba2ed0
string: add unit test for sprintf
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-01-09 19:31:07 +01:00
38c6b40b21
Bump Copyright year
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-01-06 10:55:09 +01:00
2610547137
Cleanup
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-12-21 09:21:32 +01:00
2e65d0351c
Trim excessive inline
...
Methods and templates are implicitly marked as inline already.
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-12-11 11:33:27 +01:00
bb9988933e
unicode: add unit test for normalize
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-12-08 14:21:52 +01:00
6d1d9bd1b8
sgml: fix unit tests
2023-12-08 14:21:20 +01:00
5a4194c9ba
wav: add
2023-12-01 19:06:20 +01:00
87c41c0947
html: add simple tokenizer and parser
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-17 15:14:54 +01:00
424f297c7b
sgml: sgml2wstr→sgml2str, wstr2sgml→str2sgml 🧨
...
This is analogous to string.hpp's strlen, strcpy, strcat, which use C++
polymorphism rather than function name decorations for char/wchar_t
flavors.
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-17 15:14:53 +01:00
bea4b5b408
spinlock, pool: add
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-10 12:38:13 +01:00
3dfd62ec2f
socket: add own cross-platform declaration
...
Like with stdex::locale_t, this frees us from using Windowsizms on other
platforms. Sockets came from Unix to Windows and not the other way
around in the first place.
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-09 09:25:42 +01:00
2c45749f78
string, locale: make stdex::locale(_t) independent .hpp file
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-09 08:12:31 +01:00
89a5c6e5e6
sys_info: move to a separate .hpp
...
The stdex::sys_info is instantiated for each compilation unit. To reduce
amount of copies, move it to a separate .hpp as system.hpp is almost
always #included.
Breaking-change: Add #include <stdex/sys_info.hpp>
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-10-19 10:16:53 +02:00
67d328a550
watchdog: add
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-10-10 16:42:03 +02:00
49b741c94f
Replace errno_error with std::system_error
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-10-01 23:09:50 +02:00
b8fae2d0dd
pch.h -> pch.hpp
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-25 15:05:36 +02:00
4e25c13d08
hash: macOS support
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-25 15:04:19 +02:00
c4e94150d1
hash: add
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-25 14:57:14 +02:00
10d74988aa
Add mising UTF-8 BOM's
...
Curse you XCode! 😔
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-22 13:07:14 +02:00
921d235459
unicode: upgrade and promote use of charset_encoder
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-22 13:02:27 +02:00
cb010bd72e
UnitTests: upgrade XCode project to include all .hpp files
...
This simplifies source code browsing.
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-20 14:02:40 +02:00
6689aa5210
stream: add file::exists and file::readonly
...
We are targeting C++14, while C++17 already has std::filesystem::exists. 😢
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-20 13:00:20 +02:00
475e6734a7
stream: extend open/create disposition flags
...
User could not create file only if it did not exist.
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-20 11:13:16 +02:00
613bba9e05
parser: refine IBAN checking
...
Allow arbitrary spacing, minor optimizations...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-19 21:40:36 +02:00
b5984ea8f2
Port to macOS
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-19 18:02:18 +02:00
27afd7afa5
parser: add IBAN, RF and SI support
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-19 16:53:16 +02:00
bb2578f65c
UnitTests: Revert to XCode 13
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-14 16:10:13 +02:00
edd480d64b
macOS fixes
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-14 15:57:55 +02:00
13703b1747
unicode: extend conversion with reusable charset_encoder
...
Windows takes care of internal converter state in MultiByteToWideChar
and WideCharToMultiByte and keeps them thread-safe. On other platforms,
iconv requires user to setup and keep converter state for thread-safe
conversions. This sounds time consuming for every string conversion,
therefore the concept of string converter (or converter state) has been
extended to Windows too, allowing uniform client code. On Windows, using
charset_encoder has no performance benefit, where on Linux and macOS,
there should be. To be measured...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-14 12:28:05 +02:00
66f8a6c3b7
Re-add UTF-8 BOM XCode is removing
...
Visual Studio IDE really needs it on non-UTF-8 PCs.
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-14 09:13:04 +02:00
bd14f7c629
Fix issues introduced with porting to macOS and sync with Windows
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-12 17:15:33 +02:00
83d7fd844d
Port to macOS
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-12 16:55:16 +02:00
aa4de5aa40
Make space for and add macOS unit testing stub project
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-11 16:11:57 +02:00
b76db46076
system: simplify and streamline system char and string type names
...
"sys_char" sticks out of "wchar_t", "char32_t", "uint32_t"...
Likewise, "sys_string" out of "string", "wstring", "u16string",
"u32string"...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-29 10:09:35 +02:00
2c2680dfb3
Resolve _WINSOCKAPI_ and WIN32_LEAN_AND_MEAN hell. Hopefully!
...
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-25 03:56:27 +02:00
55d39b1566
stream: fix cache handling in open and close
...
Reusing same class instance for different files reused cache content
as well.
Reported-by: Peter Holozan <peter.holozan@amebis.si>
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-21 10:27:43 +02:00