aboutsummaryrefslogtreecommitdiff
path: root/libbutl/manifest-rewriter.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-04-06 23:47:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-04-08 16:51:41 +0300
commita16982956c5e87d9b2f238522d902df177ece98e (patch)
tree71f049508596a2004b872d8b5fbdeaf473148696 /libbutl/manifest-rewriter.cxx
parent89659b66de7611e9a3f33e7354493ac1c540fe70 (diff)
Add support for manifest_serializer long lines mode
Diffstat (limited to 'libbutl/manifest-rewriter.cxx')
-rw-r--r--libbutl/manifest-rewriter.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbutl/manifest-rewriter.cxx b/libbutl/manifest-rewriter.cxx
index 2be53f1..e5b4eae 100644
--- a/libbutl/manifest-rewriter.cxx
+++ b/libbutl/manifest-rewriter.cxx
@@ -41,8 +41,9 @@ using namespace std;
namespace butl
{
manifest_rewriter::
- manifest_rewriter (path p)
+ manifest_rewriter (path p, bool long_lines)
: path_ (move (p)),
+ long_lines_ (long_lines),
fd_ (fdopen (path_,
fdopen_mode::in |
fdopen_mode::out |
@@ -99,7 +100,7 @@ namespace butl
{
os << ' ';
- manifest_serializer s (os, path_.string ());
+ manifest_serializer s (os, path_.string (), long_lines_);
s.write_value (nv.value,
static_cast<size_t> (nv.colon_pos - nv.start_pos + 2));
@@ -127,7 +128,7 @@ namespace butl
ofdstream os (move (fd_));
os << '\n';
- manifest_serializer s (os, path_.string ());
+ manifest_serializer s (os, path_.string (), long_lines_);
s.write_name (nv.name);
os << ':';