Simon Rozman
49b741c94f
Replace errno_error with std::system_error
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-10-01 23:09:50 +02:00
Simon Rozman
b8fae2d0dd
pch.h -> pch.hpp
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-25 15:05:36 +02:00
Simon Rozman
4e25c13d08
hash: macOS support
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-25 15:04:19 +02:00
Simon Rozman
c4e94150d1
hash: add
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-25 14:57:14 +02:00
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
b5984ea8f2
Port to macOS
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-19 18:02:18 +02:00
Simon Rozman
27afd7afa5
parser: add IBAN, RF and SI support
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-19 16:53:16 +02:00
Simon Rozman
bb2578f65c
UnitTests: Revert to XCode 13
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-14 16:10:13 +02:00
Simon Rozman
edd480d64b
macOS fixes
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-14 15:57:55 +02:00
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
83d7fd844d
Port to macOS
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-09-12 16:55:16 +02:00
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
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
Simon Rozman
e7b6ab5345
stream: using namespace in UnitTests
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-08-21 10:22:32 +02:00
Simon Rozman
42a38802d3
stream: fix Win32
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-08-19 08:31:08 +02:00
Simon Rozman
8457226168
ios, stream: replace <iostream> with leaner and faster own streaming
...
Our test program runs 15 minutes using our streams vs. 25 minutes using
std::iostream derived streams.
Streams were ported from Amebis AOsn project.
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-08-18 15:05:24 +02:00
Simon Rozman
4965d1eac5
unicode: add unit tests
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-08-18 15:05:19 +02:00
Simon Rozman
43d0c4ba05
ring: add
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-08-18 15:05:19 +02:00
Simon Rozman
501183ca3e
math: add
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-08-18 15:05:19 +02:00
Simon Rozman
6aa63f3bd6
ios: Combine and simplify i/odiagstream
...
We need this for a rare use-case, so maintaining three flavors of
diagstream is too expensive. Furthermore, the buffering was removed
for simplicity.
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-07-25 16:38:55 +02:00
Simon Rozman
516b428d4b
ios: Add diagstreambuf
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-07-25 16:32:46 +02:00
Simon Rozman
58caa542ac
Add missing UTF-8 BOM
...
Many many many Windows out there are still using Windows-1252 and
similar ancient encodings.
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-07-23 14:02:58 +02:00
Simon Rozman
991f81254d
ios: add
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-07-23 14:02:58 +02:00
Simon Rozman
c5f972971e
parser: revise
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-07-17 17:05:31 +02:00
Simon Rozman
6cdcb08365
sgml: rename str -> wstr
...
The sgml.hpp is about converting between SGML and UTF-16/Unicode
actually. The "wstr" naming aligns better with std::wstring, wchar_t
etc.
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-07-17 12:51:41 +02:00
Simon Rozman
1fb78a78f2
parser: Stabilize HTTP suite
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-03-16 12:35:52 +01:00
Simon Rozman
127704d2d8
parser: Rename "tester" to "parser"
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-03-16 10:58:15 +01:00
Simon Rozman
308f63490c
Rename .h to .hpp
...
These files are C++ only. They should either have no extension like
standard C++ headers (which is cumbersome on Windows environments), or
.hpp.
.h is used for C and hybrid C/C++ headers.
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-03-15 21:49:41 +01:00
Simon Rozman
261ad98812
Add string parsers
...
Ported from Amebis AOsn library to standard C++
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-03-15 21:38:57 +01:00
Simon Rozman
b43b853235
Add SGML↔Unicode conversion
...
Signed-off-by: Simon Rozman <simon@rozman.si >
2023-03-15 09:02:25 +01:00