aboutsummaryrefslogtreecommitdiff
path: root/cutl/details/boost/regex/src/regex_raw_buffer.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-16 20:29:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-24 16:40:04 +0300
commit8e761289a2446367267c6c0d9a26e734f0f78306 (patch)
treefb495d8c18801f271d124ee48731f10df396ca89 /cutl/details/boost/regex/src/regex_raw_buffer.cxx
parent4c8104756b92b9fa16b3a725e8a6aa620dfd606e (diff)
Get rid of legacy build systems and rename cutl/ to libcutl/
Diffstat (limited to 'cutl/details/boost/regex/src/regex_raw_buffer.cxx')
-rw-r--r--cutl/details/boost/regex/src/regex_raw_buffer.cxx72
1 files changed, 0 insertions, 72 deletions
diff --git a/cutl/details/boost/regex/src/regex_raw_buffer.cxx b/cutl/details/boost/regex/src/regex_raw_buffer.cxx
deleted file mode 100644
index 7b06725..0000000
--- a/cutl/details/boost/regex/src/regex_raw_buffer.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_raw_buffer.cpp
- * VERSION see <cutl/details/boost/version.hpp>
- * DESCRIPTION: Member functions for class raw_storage.
- */
-
-
-#define BOOST_REGEX_SOURCE
-#include <cutl/details/boost/config.hpp>
-#include <memory>
-#include <cstring>
-#include <cutl/details/boost/assert.hpp>
-#include <cutl/details/boost/regex/v4/regex_raw_buffer.hpp>
-
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::memcpy;
- using ::memmove;
-}
-#endif
-
-
-namespace cutl_details_boost{ namespace re_detail{
-
-void BOOST_REGEX_CALL raw_storage::resize(size_type n)
-{
- register size_type newsize = start ? last - start : 1024;
- while(newsize < n)
- newsize *= 2;
- register size_type datasize = end - start;
- // extend newsize to WORD/DWORD boundary:
- newsize = (newsize + padding_mask) & ~(padding_mask);
-
- // allocate and copy data:
- register pointer ptr = static_cast<pointer>(::operator new(newsize));
- BOOST_REGEX_NOEH_ASSERT(ptr)
- if(start)
- std::memcpy(ptr, start, datasize);
-
- // get rid of old buffer:
- ::operator delete(start);
-
- // and set up pointers:
- start = ptr;
- end = ptr + datasize;
- last = ptr + newsize;
-}
-
-void* BOOST_REGEX_CALL raw_storage::insert(size_type pos, size_type n)
-{
- BOOST_ASSERT(pos <= size_type(end - start));
- if(size_type(last - end) < n)
- resize(n + (end - start));
- register void* result = start + pos;
- std::memmove(start + pos + n, start + pos, (end - start) - pos);
- end += n;
- return result;
-}
-
-}} // namespaces