24 Commits

Author SHA1 Message Date
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
e7b6ab5345 stream: using namespace in UnitTests
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-21 10:22:32 +02:00
42a38802d3 stream: fix Win32
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-19 08:31:08 +02:00
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
4965d1eac5 unicode: add unit tests
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-18 15:05:19 +02:00
43d0c4ba05 ring: add
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-18 15:05:19 +02:00
501183ca3e math: add
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-08-18 15:05:19 +02:00
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
516b428d4b ios: Add diagstreambuf
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-07-25 16:32:46 +02:00
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
991f81254d ios: add
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-07-23 14:02:58 +02:00
c5f972971e parser: revise
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-07-17 17:05:31 +02:00
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
1fb78a78f2 parser: Stabilize HTTP suite
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-03-16 12:35:52 +01:00
127704d2d8 parser: Rename "tester" to "parser"
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-03-16 10:58:15 +01:00
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
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
b43b853235 Add SGML↔Unicode conversion
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-03-15 09:02:25 +01:00