Martchus
5deb077fe5
Extend Binary{Reader,Writer} to ease binary (de)serialization
...
To implement reflection-enabled binary (de)serialization
in https://github.com/Martchus/reflective-rapidjson .
2018-06-20 23:07:08 +02:00
Martchus
1aa8b387e1
Apply clang-format
2018-05-08 00:35:51 +02:00
Martchus
a4435bbcf3
Fix usage of enable_if with GCC 8
...
Seems like the trick with the three dots isn't working
with GCC 8 anymore. So let's make it a default template
parameter then.
Not sure whether GCC 8 is here correct and whether this
workaround causes further trouble.
2018-05-07 23:22:43 +02:00
Martchus
64be5bce63
Document the whole story behind catchiofailure.cpp
2018-04-14 14:48:36 +02:00
Martchus
51e87f3740
Don't wrongly detect libstdc++ 6.4 as >= 7
...
6.4 has been release after 20170502 but still throws
ios_base::failure with old ABI. It is not a good idea
to use the timestamp to distinguish release versions.
Note that _GLIBCXX_RELEASE is not defined in older
GCC versions. But if the macro is not present, we also
know that it will throw the old version.
2018-04-14 14:43:35 +02:00
Martchus
557856dc5c
Apply clang-format
2018-04-01 23:08:41 +02:00
Martchus
8bc3cf9615
Add phrase for overriding current line
2018-04-01 23:08:31 +02:00
Martchus
76ee4a158b
Add color overload for ANSI escape codes
2018-03-25 20:02:21 +02:00
Martchus
e2e4b4641f
Add EscapeCodes::Strikethrough
2018-03-25 20:00:01 +02:00
Martchus
df7a3ee93c
Apply clang-format from LLVM 6
2018-03-24 17:00:30 +01:00
Martchus
cdecc48a1d
Fix warning about signedness conversion in BinaryReader
...
Length is expected to be positive
2018-03-04 21:06:29 +01:00
Martchus
b375ea80b0
Deprecate BinaryReader::readTerminatedString() methods
2018-01-29 16:30:46 +01:00
Martchus
209a59106e
Fix BinaryReader::readMultibyteTerminatedStringXX methods
2018-01-29 16:29:49 +01:00
Martchus
d6361e1cfd
Fix some mistakes in ANSI escape codes
2018-01-29 16:26:28 +01:00
Martchus
fe3929c340
Add phrase for info
2017-11-27 10:25:41 +01:00
Martchus
9829dbe727
Make use of escape codes configurable
2017-10-17 00:00:46 +02:00
Martchus
4011040e57
Add Phrases::EndFlush
2017-10-09 20:43:18 +02:00
Martchus
0b19d0b523
Export std::ostream&operator<<(std::ostream&,Phrases) correctly
2017-10-07 22:52:06 +02:00
Martchus
784f3d963a
Add 'makepkg'-style messages to Phrases
2017-09-30 19:16:43 +02:00
Martchus
09efb1ff3e
Move phrases from tag editor to c++utilities
...
because they are also useful for syncthingctl
2017-09-26 15:23:23 +02:00
Martchus
72806d69fd
Add << overloads for formatting output
2017-09-22 00:22:08 +02:00
Martchus
e52fd5a4af
Apply tidy after updating to clang-format 5.0.0
...
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:45:23 +02:00
Martchus
1d4a4bd2be
binary reader/writer: Increase limit of length-prefixed strings
...
So strings with a size up to 0xFFFFFFFFFFFFFF byte can be handled.
2017-07-28 20:34:50 +02:00
Steven Penny
7f140c7058
catchiofailure: defined _GLIBCXX_USE_CXX11_ABI first to cover GCC 5
...
Fix #7
2017-06-25 12:29:32 -05:00
Martchus
9429f7e23f
Fix BitReader::bitsAvailable()
2017-06-25 16:00:11 +02:00
Martchus
2625f82e49
ios_base::failure workaround: Ensure c++config.h is included
2017-06-01 11:29:33 +02:00
Martchus
dc73538170
Adjust ios_base::failure workaround for GCC 7
...
* Use new ABI under GCC >= 7
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145
2017-05-31 00:35:31 +02:00
Martchus
db46948f2f
Apply clang-format
2017-05-04 22:44:15 +02:00
Martchus
59e20b1043
Apply clang-format
2017-05-01 03:13:11 +02:00
Martchus
c4cf107de2
Make cast in binary reader explicit
2017-02-06 18:32:27 +01:00
Martchus
06af1c4a73
Use std::make_unique provided by C++14
2017-02-05 21:00:52 +01:00
Martchus
6115933756
Add convenience function to read entire file at once
2017-02-03 01:06:38 +01:00
Martchus
94a6b47811
Improve documentation
2017-02-03 00:54:44 +01:00
Martchus
33d368397f
Make use of newly introduced string builder
2017-01-27 18:51:54 +01:00
Martchus
8d95b4497f
Clean io/path.h
2017-01-14 00:33:02 +01:00
Steven Penny
025be1e54e
io/nativefilestream.cpp: proper catchiofailure.h include
...
1. Using <> makes no sense if cpp-utilities is being built for first time
2. Again, search in <prefix>/c++utilities/io makes no sense if cpp-utilities is
being built for first time
2016-12-29 22:16:38 -06:00
Martchus
9d91cfca07
Add NativeFileStream to support unicode filenames under Windows
2016-12-21 00:29:57 +01:00
Martchus
aed4788c64
Make 'DirectoryEntryType &operator|=' not constexpr
2016-10-29 00:24:18 +02:00
Martchus
72426e2d4c
Fix bash completion when dir/file contains single quote
...
Also a few other improvements in bash completion code
2016-10-22 20:52:08 +02:00
Martchus
4c40004f0b
Improve CLI utils
...
- Add ArgumentParser::readArgs()
- Add Indentation
- Fix eraseLine()
2016-10-02 21:53:58 +02:00
Martchus
4829aa40b9
Fix mistakes in doc
2016-09-17 11:44:49 +02:00
Martchus
d6b08b8ed9
Fix decoration for static builds
...
- Also add improvemnts a few other things in the build system
2016-08-29 15:35:48 +02:00
Martchus
551867485c
Throw IO failure always via throwIoFailure
2016-08-06 21:20:25 +02:00
Martchus
df8d942e1c
Improve argument parser
...
- Fix completion of values already containing '='
- Fix completion when current word contains '='
- Improve formatting of help
- Fix typo
2016-07-31 23:20:31 +02:00
Martchus
ec53cf339d
Improve doc
2016-07-27 18:21:29 +02:00
Martchus
cb4246e202
Add methods to get dir path and entries
2016-07-02 02:01:26 +02:00
Martchus
980794066b
Provide workaround for GCC Bug 66145
2016-06-14 22:53:19 +02:00
Martchus
db7b02b1db
Make header guards more unique and consistent
2016-06-11 19:09:14 +02:00
Martchus
d28d477ffe
Complete generation of API doc
...
- Use README.md for main page
- Add install target for API doc
- Improve some doc comments
2016-06-10 22:59:22 +02:00
Martchus
c7c64e0784
Improve documentation
2016-06-10 14:08:56 +02:00
Martchus
41c44a5f43
Delete m_streamSize member of BinaryReader
2016-06-08 00:38:58 +02:00
Martchus
009a2268ec
Fix small issues of BinaryReader/BinaryWriter
...
- fix documentation
- fix useless checks
2016-06-08 00:36:01 +02:00
Martchus
bd0cbd5802
reduce code duplication in build system
...
- get rid of qmake project file
- provide CMake modules for common tasks
- provide templates for *.desktop files
2016-04-16 02:11:05 +02:00
Martchus
3d510a0682
avoid copy in BinaryReader::readString(size_t length)
2016-02-20 01:35:42 +01:00
Martchus
a7941b92e2
added BitReader::readUnsignedExpGolombCodedBits() and
...
BitReader::readSignedExpGolombCodedBits()
2016-02-16 17:25:03 +01:00
Martchus
93582b4ac0
added more tests, fixed some bugs
2016-01-27 02:25:28 +01:00
Martchus
7299299a40
fixed showBits()
2016-01-27 01:13:30 +01:00
Martchus
1d8177ba41
added missing methods
2016-01-27 01:00:38 +01:00
Martchus
a8f7644350
minor adjustments
2016-01-18 23:41:30 +01:00
Martchus
d5eb8a1608
fixed doc
2015-12-27 18:16:23 +01:00
Martchus
aff51370d9
implemented computeCrc32()
2015-10-20 08:49:38 +02:00
Martchus
cd01df9c64
access CRC tab directly
2015-10-16 21:34:58 +02:00
Martchus
4495067484
fixed aliasing warning
2015-09-16 17:54:40 +02:00
Martchus
33e5585844
using a vector instead of a map for the scopes
...
Finding a specific scope might be more unhandy
but this way the original order is preserved.
2015-09-16 17:36:52 +02:00
Martchus
4d6bf67188
fixed includes
2015-09-06 20:19:09 +02:00
Martchus
603dbf823a
fixed includes
2015-09-06 15:30:16 +02:00
Martchus
5689cb8058
added missing includes
2015-09-01 16:06:37 +02:00
Martchus
a59e0b7478
make methods const
2015-08-25 19:13:17 +02:00
Martchus
72b7afb17e
added method for reading a single bit
2015-08-08 01:18:24 +02:00
Martchus
7956635de1
added method to read without advancing the current position, added
...
method to re-establish alignment
2015-07-31 01:23:42 +02:00
Martchus
9f25d76afe
improved BitReader
2015-07-27 23:16:49 +02:00
Martchus
c62e25ee2a
improved conversion utilities
2015-07-18 01:11:12 +02:00
Martchus
feaa059375
fixed "end of buffer" condition
2015-07-13 00:59:21 +02:00
Martchus
f462d71200
added INI parser
2015-07-07 00:50:49 +02:00
Martchus
f396b8afa1
added method for restting the bit reader
2015-07-07 00:50:03 +02:00
Martchus
3c395a955a
updated brief
2015-06-21 21:42:32 +02:00
Martchus
6bf736af0e
completed BitReader class; small improvements
2015-06-10 21:00:44 +02:00
Martchus
3ede66098f
added BitReader class
2015-06-08 22:09:09 +02:00
Martchus
24ba96a17f
First commit
2015-04-22 18:36:40 +02:00