├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── LICENSE.txt ├── Quick Installer ├── 7zS2.sfx ├── 7zr.exe ├── build quick installer.bat ├── license for 7zip files.txt └── setup.bat ├── README.md ├── ZipForRelease.ps1 ├── help.htm ├── source.txt ├── src ├── About.cpp ├── Align.cpp ├── Boost │ ├── LICENSE_1_0.txt │ ├── boost │ │ ├── cregex.hpp │ │ ├── regex.h │ │ ├── regex.hpp │ │ ├── regex │ │ │ ├── concepts.hpp │ │ │ ├── config.hpp │ │ │ ├── config │ │ │ │ ├── borland.hpp │ │ │ │ └── cwchar.hpp │ │ │ ├── icu.hpp │ │ │ ├── mfc.hpp │ │ │ ├── pattern_except.hpp │ │ │ ├── pending │ │ │ │ ├── object_cache.hpp │ │ │ │ ├── static_mutex.hpp │ │ │ │ └── unicode_iterator.hpp │ │ │ ├── regex_traits.hpp │ │ │ ├── user.hpp │ │ │ └── v5 │ │ │ │ ├── basic_regex.hpp │ │ │ │ ├── basic_regex_creator.hpp │ │ │ │ ├── basic_regex_parser.hpp │ │ │ │ ├── c_regex_traits.hpp │ │ │ │ ├── char_regex_traits.hpp │ │ │ │ ├── cpp_regex_traits.hpp │ │ │ │ ├── cregex.hpp │ │ │ │ ├── error_type.hpp │ │ │ │ ├── icu.hpp │ │ │ │ ├── iterator_category.hpp │ │ │ │ ├── iterator_traits.hpp │ │ │ │ ├── match_flags.hpp │ │ │ │ ├── match_results.hpp │ │ │ │ ├── mem_block_cache.hpp │ │ │ │ ├── object_cache.hpp │ │ │ │ ├── pattern_except.hpp │ │ │ │ ├── perl_matcher.hpp │ │ │ │ ├── perl_matcher_common.hpp │ │ │ │ ├── perl_matcher_non_recursive.hpp │ │ │ │ ├── primary_transform.hpp │ │ │ │ ├── regbase.hpp │ │ │ │ ├── regex.hpp │ │ │ │ ├── regex_format.hpp │ │ │ │ ├── regex_fwd.hpp │ │ │ │ ├── regex_grep.hpp │ │ │ │ ├── regex_iterator.hpp │ │ │ │ ├── regex_match.hpp │ │ │ │ ├── regex_merge.hpp │ │ │ │ ├── regex_raw_buffer.hpp │ │ │ │ ├── regex_replace.hpp │ │ │ │ ├── regex_search.hpp │ │ │ │ ├── regex_split.hpp │ │ │ │ ├── regex_token_iterator.hpp │ │ │ │ ├── regex_traits.hpp │ │ │ │ ├── regex_traits_defaults.hpp │ │ │ │ ├── regex_workaround.hpp │ │ │ │ ├── states.hpp │ │ │ │ ├── sub_match.hpp │ │ │ │ ├── syntax_type.hpp │ │ │ │ ├── u32regex_iterator.hpp │ │ │ │ ├── u32regex_token_iterator.hpp │ │ │ │ ├── unicode_iterator.hpp │ │ │ │ └── w32_regex_traits.hpp │ │ └── regex_fwd.hpp │ └── regex-boost-1.86.0.txt ├── ColumnsPlusPlus.cpp ├── ColumnsPlusPlus.h ├── ColumnsPlusPlus.rc ├── Configuration.cpp ├── Convert.cpp ├── Host │ ├── BoostRegexSearch.h │ ├── Notepad_plus_msgs.h │ ├── PluginInterface.h │ ├── Sci_Position.h │ ├── Scintilla.h │ ├── ScintillaCall.cxx │ ├── ScintillaCall.h │ ├── ScintillaMessages.h │ ├── ScintillaStructures.h │ ├── ScintillaTypes.h │ ├── menuCmdID.h │ └── original │ │ └── ScintillaCall.h ├── Numeric.cpp ├── Numeric.h ├── NumericFormat.cpp ├── Options.cpp ├── Plugin.cpp ├── Profiles.cpp ├── PropertySheet.props ├── Rectangular.cpp ├── RegularExpression.cpp ├── RegularExpression.h ├── RegularExpressionTS.h ├── Search.cpp ├── Search.h ├── Selection.cpp ├── Sort.cpp ├── TimeFormats.cpp ├── Timestamps.cpp ├── Timestamps.h ├── TimestampsHelpers.cpp ├── Unicode │ ├── BuildUnicodeTables.py │ ├── UCD │ │ ├── CaseFolding.txt │ │ ├── DerivedCoreProperties.txt │ │ ├── GraphemeBreakProperty.txt │ │ ├── License.txt │ │ ├── UnicodeData.txt │ │ └── emoji-data.txt │ ├── UnicodeCharacterData.cpp │ ├── UnicodeCharacterData.h │ ├── UnicodeCharacterDataFixed.h │ ├── UnicodeRegexTraits.cpp │ └── UnicodeRegexTraits.h ├── Update.cpp ├── WindowsScintillaCommon.h ├── exprtk │ ├── exprtk.hpp │ └── readme.txt ├── nlohmann │ ├── LICENSE.MIT │ └── json.hpp └── resource.h └── vs.proj ├── ColumnsPlusPlus.sln └── ColumnsPlusPlus.vcxproj /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/* 2 | vs.proj/* 3 | !vs.proj/ColumnsPlusPlus.sln 4 | !vs.proj/ColumnsPlusPlus.vcxproj 5 | *.aps 6 | *.exe 7 | !Quick installer/7zr.exe 8 | *.zip 9 | -------------------------------------------------------------------------------- /Quick Installer/7zS2.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coises/ColumnsPlusPlus/d8e2c8bcd9b753852f80422fabae6890e5418003/Quick Installer/7zS2.sfx -------------------------------------------------------------------------------- /Quick Installer/7zr.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coises/ColumnsPlusPlus/d8e2c8bcd9b753852f80422fabae6890e5418003/Quick Installer/7zr.exe -------------------------------------------------------------------------------- /Quick Installer/build quick installer.bat: -------------------------------------------------------------------------------- 1 | @set version=%1 2 | @if .%version%==. set /p version="Version?" 3 | @if .%version%==. goto :skipit 4 | copy /b ..\vs.proj\bin\Win32\Release\ColumnsPlusPlus.dll ColumnsPlusPlus32.dll 5 | copy /b ..\vs.proj\bin\x64\Release\ColumnsPlusPlus.dll ColumnsPlusPlus64.dll 6 | 7zr a ColumnsPlusPlus.7z ..\CHANGELOG.md ..\help.htm ..\LICENSE.txt ..\source.txt ColumnsPlusPlus32.dll ColumnsPlusPlus64.dll setup.bat 7 | del ColumnsPlusPlus32.dll 8 | del ColumnsPlusPlus64.dll 9 | copy /b 7zS2.sfx + ColumnsPlusPlus.7z ..\ColumnsPlusPlus-%version%.exe 10 | del ColumnsPlusPlus.7z 11 | :skipit 12 | @pause -------------------------------------------------------------------------------- /Quick Installer/license for 7zip files.txt: -------------------------------------------------------------------------------- 1 | 7zr.exe and 7zS2.sfx are from the LZMA SDK; see : 2 | 3 | License 4 | 5 | LZMA SDK is placed in the public domain. 6 | 7 | Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, 8 | either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, 9 | and by any means. -------------------------------------------------------------------------------- /Quick Installer/setup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if not exist "%PROGRAMFILES(x86)%\Notepad++\plugins" goto :done32 3 | if exist "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus" (set inup=Update) else (set inup=Install) 4 | choice /m "%inup% Columns++ extension for 32-bit Notepad++?" 5 | if errorlevel 2 goto :done32 6 | echo Copying files to "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus" 7 | if %inup%==Install mkdir "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus" 8 | copy "%~dp0\ColumnsPlusPlus32.dll" "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus\ColumnsPlusPlus.dll" 9 | copy "%~dp0\CHANGELOG.md" "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus\" 10 | copy "%~dp0\help.htm" "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus\" 11 | copy "%~dp0\LICENSE.txt" "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus\" 12 | copy "%~dp0\source.txt" "%PROGRAMFILES(x86)%\Notepad++\plugins\ColumnsPlusPlus\" 13 | 14 | :done32 15 | 16 | if not exist "%PROGRAMW6432%\Notepad++\plugins" goto :done64 17 | if exist "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus" (set inup=Update) else (set inup=Install) 18 | choice /m "%inup% Columns++ extension for 64-bit Notepad++?" 19 | if errorlevel 2 goto :done64 20 | echo Copying files to "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus" 21 | if %inup%==Install mkdir "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus" 22 | copy "%~dp0\ColumnsPlusPlus64.dll" "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus\ColumnsPlusPlus.dll" 23 | copy "%~dp0\CHANGELOG.md" "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus\" 24 | copy "%~dp0\help.htm" "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus\" 25 | copy "%~dp0\LICENSE.txt" "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus\" 26 | copy "%~dp0\source.txt" "%PROGRAMW6432%\Notepad++\plugins\ColumnsPlusPlus\" 27 | 28 | :done64 29 | 30 | @pause -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Columns++ 2 | 3 | Columns++ is a plugin for [Notepad++](https://github.com/notepad-plus-plus/notepad-plus-plus) which offers features for working with text and data arranged in columns, including an implementation of elastic tabstops, enhanced searching and sorting, column alignment and numeric calulations. 4 | 5 | Like Notepad++, Columns++ is released under the GNU General Public License (either version 3 of the License, or, at your option, any later version). Some original source code files which are not dependent on Notepad++ are released under the [MIT (Expat) license](https://www.opensource.org/licenses/MIT): see individual files for details. 6 | 7 | Columns++ uses the [C++ Mathematical Expression Toolkit Library 8 | (ExprTk)](https://github.com/ArashPartow/exprtk) by Arash Partow (https://www.partow.net/), which is released under the [MIT License](https://www.opensource.org/licenses/MIT). 9 | 10 | Columns++ uses [JSON for Modern C++](https://github.com/nlohmann/json) by Niels Lohmann (https://nlohmann.me), which is released under the [MIT License](https://www.opensource.org/licenses/MIT). 11 | 12 | Columns++ uses the [Boost.Regex library](https://github.com/boostorg/regex/), which is released under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt). 13 | 14 | Columns++ uses some files from the [Unicode Character Database](https://www.unicode.org/ucd/), which is released under the [Unicode License](https://www.unicode.org/license.txt). 15 | 16 | ## Purpose 17 | 18 | Columns++ is designed to provide some helpful functions for editing text or data that is lined up visually in columns, so that you can make a rectangular selection of the column(s) you want to process. 19 | 20 | The integrated implementation of __Elastic tabstops__ works to line up columns when tabs are used as logical separators, including tab-separated values data files as well as any ordinary text or code document containing sections in which you want to line up columns easily using tabs. You can use this feature on its own or with the other functions in Columns++. 21 | 22 | ## Main Features 23 | 24 | * __Elastic tabstops:__ Columns++ includes a new implementation of Nick Gravgaard's [Elastic tabstops](https://nickgravgaard.com/elastic-tabstops/). _(Please note that as of this writing I have not communicated with Mr. Gravgaard about my implementation of his proposal, and no endorsement on his part is implied.)_ 25 | * __Find and replace:__ Columns++ supports find and replace within regions, which can be defined by rectangular selections or multiple selections. Numeric formulas are supported in regular expression replacement strings. Regular expressions in Unicode documents support code points beyond the basic multiligual plane, the Unicode General Category property, recognition of grapheme clusters and finding invalid UTF-8 sequences. 26 | * __Calculations:__ There are commands to add or average numbers in one or more columns and to insert the results of a calculation into each line of a rectangular selection. 27 | * __Alignment:__ You can left- or right-align text, or line up numbers. 28 | * __Sorting:__ Columns++ includes sort commands that work correctly with rectangular selections in files that use tabs. Sorts can be based on multiple columns or on regular expression capture groups. 29 | * __Conversion:__ Commands to convert tabs to spaces and to convert between comma (or other delimiter) separated values and tabbed presentation are included. 30 | 31 | There is a [help file](https://coises.github.io/ColumnsPlusPlus/help.htm). 32 | 33 | ## Limitations 34 | 35 | Columns++ is optimized for use with Elastic tabstops. It also works with files that use traditional, fixed tabs for alignment, or no tabs at all; however, you should ordinarily select only one column at a time in files that don't use Elastic tabstops. 36 | 37 | Columns++ is generally not helpful when columns do not line up visually, such as in comma-separated values files. However, Columns++ can convert between delimiter-separated values and tabbed presentation; and there are some features, particularly search using numeric formulas in regular expression replacement strings and sorting with custom criteria, which may be useful in documents that are not column-oriented. 38 | 39 | Elastic tabstops can cause loading and editing to be slow for large files. Performance can be significantly improved by avoiding proportionally-spaced fonts. By default, Elastic tabstops is automatically turned off for files over 1000 KB or 5000 lines. You can change these limits. 40 | 41 | ## Installation 42 | 43 | Columns++ is available through the Notepad++ Plugins Admin interface, though the version found there will not always be the newest. 44 | 45 | You can use the Quick Installer for the [latest stable release](https://github.com/Coises/ColumnsPlusPlus/releases/latest/) or the [newest (possibly less stable) release](https://github.com/Coises/ColumnsPlusPlus/releases) if you have Notepad++ (either 32-bit, 64-bit or both) installed in the default location(s). 46 | 47 | Otherwise, download an x86 or x64 zip file from the Releases section, depending on whether you're using 32-bit or 64-bit Notepad++. Unzip the file to a folder named __ColumnsPlusPlus__ (the name must be exactly this, or Notepad++ will not load the plugin) and copy that folder into the plugins directory where Notepad++ is installed (usually __C:\Program Files (x86)\Notepad++\plugins__ for 32-bit versions or __C:\Program Files\Notepad++\plugins__ for 64-bit versions). 48 | -------------------------------------------------------------------------------- /ZipForRelease.ps1: -------------------------------------------------------------------------------- 1 | $x86Version = (Get-Command "vs.proj\bin\Win32\Release\ColumnsPlusPlus.dll").FileVersionInfo.ProductVersion 2 | Compress-Archive -DestinationPath "ColumnsPlusPlus-$x86Version-x86.zip" -Path "vs.proj\bin\Win32\Release\ColumnsPlusPlus.dll","CHANGELOG.md","help.htm","LICENSE.txt","source.txt" 3 | $x64Version = (Get-Command "vs.proj\bin\x64\Release\ColumnsPlusPlus.dll").FileVersionInfo.ProductVersion 4 | Compress-Archive -DestinationPath "ColumnsPlusPlus-$x64Version-x64.zip" -Path "vs.proj\bin\x64\Release\ColumnsPlusPlus.dll","CHANGELOG.md","help.htm","LICENSE.txt","source.txt" 5 | $x86Hash = (Get-FileHash "ColumnsPlusPlus-$x86Version-x86.zip" -Algorithm SHA256).Hash 6 | $x64Hash = (Get-FileHash "ColumnsPlusPlus-$x64Version-x64.zip" -Algorithm SHA256).Hash 7 | $Hashes = "SHA-256 Hash (ColumnsPlusPlus-$x64Version-x64.zip): " + $x64Hash + "`nSHA-256 Hash (ColumnsPlusPlus-$x86Version-x86.zip): " + $x86Hash 8 | Write-Output $Hashes 9 | Write-Output "" 10 | Set-Clipboard -Value $Hashes 11 | Read-Host -Prompt "Press Enter to exit" 12 | -------------------------------------------------------------------------------- /source.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coises/ColumnsPlusPlus/d8e2c8bcd9b753852f80422fabae6890e5418003/source.txt -------------------------------------------------------------------------------- /src/Boost/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /src/Boost/boost/cregex.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org/libs/regex for most recent version. 14 | * FILE cregex.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares POSIX API functions 17 | * + boost::RegEx high level wrapper. 18 | */ 19 | 20 | #ifndef BOOST_RE_CREGEX_HPP 21 | #define BOOST_RE_CREGEX_HPP 22 | 23 | #ifndef BOOST_REGEX_CONFIG_HPP 24 | #include 25 | #endif 26 | 27 | #ifdef BOOST_REGEX_CXX03 28 | #include 29 | #else 30 | #include 31 | #endif 32 | 33 | #endif /* include guard */ 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/Boost/boost/regex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2000 4 | * Dr John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org/libs/regex for documentation. 14 | * FILE regex.h 15 | * VERSION 3.12 16 | * DESCRIPTION: Declares POSIX API functions 17 | */ 18 | 19 | #ifndef BOOST_RE_REGEX_H 20 | #define BOOST_RE_REGEX_H 21 | 22 | #include 23 | 24 | /* 25 | * add using declarations to bring POSIX API functions into 26 | * global scope, only if this is C++ (and not C). 27 | */ 28 | #ifdef __cplusplus 29 | 30 | using boost::regoff_t; 31 | using boost::regex_tA; 32 | using boost::regmatch_t; 33 | using boost::REG_BASIC; 34 | using boost::REG_EXTENDED; 35 | using boost::REG_ICASE; 36 | using boost::REG_NOSUB; 37 | using boost::REG_NEWLINE; 38 | using boost::REG_NOSPEC; 39 | using boost::REG_PEND; 40 | using boost::REG_DUMP; 41 | using boost::REG_NOCOLLATE; 42 | using boost::REG_ESCAPE_IN_LISTS; 43 | using boost::REG_NEWLINE_ALT; 44 | using boost::REG_PERL; 45 | using boost::REG_AWK; 46 | using boost::REG_GREP; 47 | using boost::REG_EGREP; 48 | using boost::REG_ASSERT; 49 | using boost::REG_INVARG; 50 | using boost::REG_ATOI; 51 | using boost::REG_ITOA; 52 | 53 | using boost::REG_NOTBOL; 54 | using boost::REG_NOTEOL; 55 | using boost::REG_STARTEND; 56 | 57 | using boost::reg_comp_flags; 58 | using boost::reg_exec_flags; 59 | using boost::regcompA; 60 | using boost::regerrorA; 61 | using boost::regexecA; 62 | using boost::regfreeA; 63 | 64 | #ifndef BOOST_NO_WREGEX 65 | using boost::regcompW; 66 | using boost::regerrorW; 67 | using boost::regexecW; 68 | using boost::regfreeW; 69 | using boost::regex_tW; 70 | #endif 71 | 72 | using boost::REG_NOERROR; 73 | using boost::REG_NOMATCH; 74 | using boost::REG_BADPAT; 75 | using boost::REG_ECOLLATE; 76 | using boost::REG_ECTYPE; 77 | using boost::REG_EESCAPE; 78 | using boost::REG_ESUBREG; 79 | using boost::REG_EBRACK; 80 | using boost::REG_EPAREN; 81 | using boost::REG_EBRACE; 82 | using boost::REG_BADBR; 83 | using boost::REG_ERANGE; 84 | using boost::REG_ESPACE; 85 | using boost::REG_BADRPT; 86 | using boost::REG_EEND; 87 | using boost::REG_ESIZE; 88 | using boost::REG_ERPAREN; 89 | using boost::REG_EMPTY; 90 | using boost::REG_E_MEMORY; 91 | using boost::REG_E_UNKNOWN; 92 | using boost::reg_errcode_t; 93 | 94 | #endif /* __cplusplus */ 95 | 96 | #endif /* BOOST_RE_REGEX_H */ 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/Boost/boost/regex.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org/libs/regex for documentation. 14 | * FILE regex.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares boost::basic_regex<> and associated 17 | * functions and classes. This header is the main 18 | * entry point for the template regex code. 19 | */ 20 | 21 | 22 | /* start with C compatibility API */ 23 | 24 | #ifndef BOOST_RE_REGEX_HPP 25 | #define BOOST_RE_REGEX_HPP 26 | 27 | #ifndef BOOST_REGEX_CONFIG_HPP 28 | #include 29 | #endif 30 | 31 | #ifdef BOOST_REGEX_CXX03 32 | #include 33 | #else 34 | #include 35 | #endif 36 | 37 | #endif // include 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/config/borland.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE boost/regex/config/borland.hpp 15 | * VERSION see 16 | * DESCRIPTION: regex borland-specific config setup. 17 | */ 18 | 19 | 20 | #if defined(__BORLANDC__) && !defined(__clang__) 21 | # if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551) 22 | // problems with std::basic_string and dll RTL: 23 | # if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE) 24 | # ifdef BOOST_REGEX_BUILD_DLL 25 | # error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL 26 | # else 27 | # pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!") 28 | # endif 29 | # endif 30 | # ifndef _RTLDLL 31 | // this is harmless for a staic link: 32 | # define _RWSTD_COMPILE_INSTANTIATE 33 | # endif 34 | // external templates cause problems for some reason: 35 | # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES 36 | # endif 37 | # if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL) 38 | // C++ Builder 4 and earlier, we can't tell whether we should be using 39 | // the VCL runtime or not, do a static link instead: 40 | # define BOOST_REGEX_STATIC_LINK 41 | # endif 42 | // 43 | // VCL support: 44 | // if we're building a console app then there can't be any VCL (can there?) 45 | # if !defined(__CONSOLE__) && !defined(_NO_VCL) 46 | # define BOOST_REGEX_USE_VCL 47 | # endif 48 | // 49 | // if this isn't Win32 then don't automatically select link 50 | // libraries: 51 | // 52 | # ifndef _Windows 53 | # ifndef BOOST_REGEX_NO_LIB 54 | # define BOOST_REGEX_NO_LIB 55 | # endif 56 | # ifndef BOOST_REGEX_STATIC_LINK 57 | # define BOOST_REGEX_STATIC_LINK 58 | # endif 59 | # endif 60 | 61 | #if __BORLANDC__ < 0x600 62 | // 63 | // string workarounds: 64 | // 65 | #include 66 | #undef strcmp 67 | #undef strcpy 68 | #endif 69 | 70 | #endif 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/config/cwchar.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE boost/regex/config/cwchar.hpp 15 | * VERSION see 16 | * DESCRIPTION: regex wide character string fixes. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP 20 | #define BOOST_REGEX_CONFIG_CWCHAR_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) 27 | // apparently this is required for the RW STL on Linux: 28 | #undef iswalnum 29 | #undef iswalpha 30 | #undef iswblank 31 | #undef iswcntrl 32 | #undef iswdigit 33 | #undef iswgraph 34 | #undef iswlower 35 | #undef iswprint 36 | #undef iswprint 37 | #undef iswpunct 38 | #undef iswspace 39 | #undef iswupper 40 | #undef iswxdigit 41 | #undef iswctype 42 | #undef towlower 43 | #undef towupper 44 | #undef towctrans 45 | #undef wctrans 46 | #undef wctype 47 | #endif 48 | 49 | namespace std{ 50 | 51 | #ifndef BOOST_NO_STDC_NAMESPACE 52 | extern "C"{ 53 | #endif 54 | 55 | #ifdef iswalnum 56 | inline int (iswalnum)(wint_t i) 57 | { return iswalnum(i); } 58 | #undef iswalnum 59 | #elif defined(BOOST_NO_STDC_NAMESPACE) 60 | using ::iswalnum; 61 | #endif 62 | 63 | #ifdef iswalpha 64 | inline int (iswalpha)(wint_t i) 65 | { return iswalpha(i); } 66 | #undef iswalpha 67 | #elif defined(BOOST_NO_STDC_NAMESPACE) 68 | using ::iswalpha; 69 | #endif 70 | 71 | #ifdef iswcntrl 72 | inline int (iswcntrl)(wint_t i) 73 | { return iswcntrl(i); } 74 | #undef iswcntrl 75 | #elif defined(BOOST_NO_STDC_NAMESPACE) 76 | using ::iswcntrl; 77 | #endif 78 | 79 | #ifdef iswdigit 80 | inline int (iswdigit)(wint_t i) 81 | { return iswdigit(i); } 82 | #undef iswdigit 83 | #elif defined(BOOST_NO_STDC_NAMESPACE) 84 | using ::iswdigit; 85 | #endif 86 | 87 | #ifdef iswgraph 88 | inline int (iswgraph)(wint_t i) 89 | { return iswgraph(i); } 90 | #undef iswgraph 91 | #elif defined(BOOST_NO_STDC_NAMESPACE) 92 | using ::iswgraph; 93 | #endif 94 | 95 | #ifdef iswlower 96 | inline int (iswlower)(wint_t i) 97 | { return iswlower(i); } 98 | #undef iswlower 99 | #elif defined(BOOST_NO_STDC_NAMESPACE) 100 | using ::iswlower; 101 | #endif 102 | 103 | #ifdef iswprint 104 | inline int (iswprint)(wint_t i) 105 | { return iswprint(i); } 106 | #undef iswprint 107 | #elif defined(BOOST_NO_STDC_NAMESPACE) 108 | using ::iswprint; 109 | #endif 110 | 111 | #ifdef iswpunct 112 | inline int (iswpunct)(wint_t i) 113 | { return iswpunct(i); } 114 | #undef iswpunct 115 | #elif defined(BOOST_NO_STDC_NAMESPACE) 116 | using ::iswpunct; 117 | #endif 118 | 119 | #ifdef iswspace 120 | inline int (iswspace)(wint_t i) 121 | { return iswspace(i); } 122 | #undef iswspace 123 | #elif defined(BOOST_NO_STDC_NAMESPACE) 124 | using ::iswspace; 125 | #endif 126 | 127 | #ifdef iswupper 128 | inline int (iswupper)(wint_t i) 129 | { return iswupper(i); } 130 | #undef iswupper 131 | #elif defined(BOOST_NO_STDC_NAMESPACE) 132 | using ::iswupper; 133 | #endif 134 | 135 | #ifdef iswxdigit 136 | inline int (iswxdigit)(wint_t i) 137 | { return iswxdigit(i); } 138 | #undef iswxdigit 139 | #elif defined(BOOST_NO_STDC_NAMESPACE) 140 | using ::iswxdigit; 141 | #endif 142 | 143 | #ifdef towlower 144 | inline wint_t (towlower)(wint_t i) 145 | { return towlower(i); } 146 | #undef towlower 147 | #elif defined(BOOST_NO_STDC_NAMESPACE) 148 | using ::towlower; 149 | #endif 150 | 151 | #ifdef towupper 152 | inline wint_t (towupper)(wint_t i) 153 | { return towupper(i); } 154 | #undef towupper 155 | #elif defined(BOOST_NO_STDC_NAMESPACE) 156 | using :: towupper; 157 | #endif 158 | 159 | #ifdef wcscmp 160 | inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2) 161 | { return wcscmp(p1,p2); } 162 | #undef wcscmp 163 | #elif defined(BOOST_NO_STDC_NAMESPACE) 164 | using ::wcscmp; 165 | #endif 166 | 167 | #ifdef wcscoll 168 | inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2) 169 | { return wcscoll(p1,p2); } 170 | #undef wcscoll 171 | #elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(UNDER_CE) 172 | using ::wcscoll; 173 | #endif 174 | 175 | #ifdef wcscpy 176 | inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2) 177 | { return wcscpy(p1,p2); } 178 | #undef wcscpy 179 | #elif defined(BOOST_NO_STDC_NAMESPACE) 180 | using ::wcscpy; 181 | #endif 182 | 183 | #ifdef wcslen 184 | inline size_t (wcslen)(const wchar_t *p) 185 | { return wcslen(p); } 186 | #undef wcslen 187 | #elif defined(BOOST_NO_STDC_NAMESPACE) 188 | using ::wcslen; 189 | #endif 190 | 191 | #ifdef wcsxfrm 192 | size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s) 193 | { return wcsxfrm(p1,p2,s); } 194 | #undef wcsxfrm 195 | #elif defined(BOOST_NO_STDC_NAMESPACE) 196 | using ::wcsxfrm; 197 | #endif 198 | 199 | 200 | #ifndef BOOST_NO_STDC_NAMESPACE 201 | } // extern "C" 202 | #endif 203 | 204 | } // namespace std 205 | 206 | #endif 207 | 208 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/icu.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2020 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE icu.hpp 15 | * VERSION see 16 | * DESCRIPTION: Unicode regular expressions on top of the ICU Library. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_ICU_HPP 20 | #define BOOST_REGEX_ICU_HPP 21 | 22 | #include 23 | 24 | #ifdef BOOST_REGEX_CXX03 25 | #include 26 | #else 27 | #include 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/mfc.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2004 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE mfc.hpp 15 | * VERSION see 16 | * DESCRIPTION: Overloads and helpers for using MFC/ATL string types with Boost.Regex. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_MFC_HPP 20 | #define BOOST_REGEX_MFC_HPP 21 | 22 | #include 23 | #include 24 | 25 | namespace boost{ 26 | 27 | // 28 | // define the types used for TCHAR's: 29 | typedef basic_regex tregex; 30 | typedef match_results tmatch; 31 | typedef regex_iterator tregex_iterator; 32 | typedef regex_token_iterator tregex_token_iterator; 33 | 34 | // Obsolete. Remove 35 | #define SIMPLE_STRING_PARAM class B, bool b 36 | #define SIMPLE_STRING_ARG_LIST B, b 37 | 38 | // 39 | // define regex creation functions: 40 | // 41 | template 42 | inline basic_regex 43 | make_regex(const ATL::CSimpleStringT& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) 44 | { 45 | basic_regex result(s.GetString(), s.GetString() + s.GetLength(), f); 46 | return result; 47 | } 48 | // 49 | // regex_match overloads: 50 | // 51 | template 52 | inline bool regex_match(const ATL::CSimpleStringT& s, 53 | match_results& what, 54 | const basic_regex& e, 55 | boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 56 | { 57 | return ::boost::regex_match(s.GetString(), 58 | s.GetString() + s.GetLength(), 59 | what, 60 | e, 61 | f); 62 | } 63 | 64 | template 65 | inline bool regex_match(const ATL::CSimpleStringT& s, 66 | const basic_regex& e, 67 | boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 68 | { 69 | return ::boost::regex_match(s.GetString(), 70 | s.GetString() + s.GetLength(), 71 | e, 72 | f); 73 | } 74 | // 75 | // regex_search overloads: 76 | // 77 | template 78 | inline bool regex_search(const ATL::CSimpleStringT& s, 79 | match_results& what, 80 | const basic_regex& e, 81 | boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 82 | { 83 | return ::boost::regex_search(s.GetString(), 84 | s.GetString() + s.GetLength(), 85 | what, 86 | e, 87 | f); 88 | } 89 | 90 | template 91 | inline bool regex_search(const ATL::CSimpleStringT& s, 92 | const basic_regex& e, 93 | boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 94 | { 95 | return ::boost::regex_search(s.GetString(), 96 | s.GetString() + s.GetLength(), 97 | e, 98 | f); 99 | } 100 | // 101 | // regex_iterator creation: 102 | // 103 | template 104 | inline regex_iterator 105 | make_regex_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 106 | { 107 | regex_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, f); 108 | return result; 109 | } 110 | 111 | template 112 | inline regex_token_iterator 113 | make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 114 | { 115 | regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f); 116 | return result; 117 | } 118 | 119 | template 120 | inline regex_token_iterator 121 | make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const std::vector& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 122 | { 123 | regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); 124 | return result; 125 | } 126 | 127 | template 128 | inline regex_token_iterator 129 | make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) 130 | { 131 | regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); 132 | return result; 133 | } 134 | 135 | template 137 | OutputIterator regex_replace(OutputIterator out, 138 | BidirectionalIterator first, 139 | BidirectionalIterator last, 140 | const basic_regex& e, 141 | const ATL::CSimpleStringT& fmt, 142 | match_flag_type flags = match_default) 143 | { 144 | return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags); 145 | } 146 | 147 | namespace BOOST_REGEX_DETAIL_NS{ 148 | 149 | template 150 | class mfc_string_out_iterator 151 | { 152 | ATL::CSimpleStringT* out; 153 | public: 154 | mfc_string_out_iterator(ATL::CSimpleStringT& s) : out(&s) {} 155 | mfc_string_out_iterator& operator++() { return *this; } 156 | mfc_string_out_iterator& operator++(int) { return *this; } 157 | mfc_string_out_iterator& operator*() { return *this; } 158 | mfc_string_out_iterator& operator=(B v) 159 | { 160 | out->AppendChar(v); 161 | return *this; 162 | } 163 | typedef std::ptrdiff_t difference_type; 164 | typedef B value_type; 165 | typedef value_type* pointer; 166 | typedef value_type& reference; 167 | typedef std::output_iterator_tag iterator_category; 168 | }; 169 | 170 | } 171 | 172 | template 173 | ATL::CSimpleStringT regex_replace(const ATL::CSimpleStringT& s, 174 | const basic_regex& e, 175 | const ATL::CSimpleStringT& fmt, 176 | match_flag_type flags = match_default) 177 | { 178 | ATL::CSimpleStringT result(s.GetManager()); 179 | BOOST_REGEX_DETAIL_NS::mfc_string_out_iterator i(result); 180 | regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags); 181 | return result; 182 | } 183 | 184 | } // namespace boost. 185 | 186 | #endif 187 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/pattern_except.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE pattern_except.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares pattern-matching exception classes. 17 | */ 18 | 19 | #ifndef BOOST_RE_PAT_EXCEPT_HPP 20 | #define BOOST_RE_PAT_EXCEPT_HPP 21 | 22 | #ifndef BOOST_REGEX_CONFIG_HPP 23 | #include 24 | #endif 25 | 26 | #ifdef BOOST_REGEX_CXX03 27 | #include 28 | #else 29 | #include 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/pending/object_cache.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2004 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE object_cache.hpp 15 | * VERSION see 16 | * DESCRIPTION: Implements a generic object cache. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_OBJECT_CACHE_HPP 20 | #define BOOST_REGEX_OBJECT_CACHE_HPP 21 | 22 | #include 23 | #ifdef BOOST_REGEX_CXX03 24 | #include 25 | #else 26 | #include 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/pending/static_mutex.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2004 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE static_mutex.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares static_mutex lock type, there are three different 17 | * implementations: POSIX pthreads, WIN32 threads, and portable, 18 | * these are described in more detail below. 19 | */ 20 | 21 | #ifndef BOOST_REGEX_STATIC_MUTEX_HPP 22 | #define BOOST_REGEX_STATIC_MUTEX_HPP 23 | 24 | #include 25 | #include // dll import/export options. 26 | 27 | #ifdef BOOST_HAS_PTHREADS 28 | #include 29 | #endif 30 | 31 | #if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER) 32 | // 33 | // pthreads version: 34 | // simple wrap around a pthread_mutex_t initialized with 35 | // PTHREAD_MUTEX_INITIALIZER. 36 | // 37 | namespace boost{ 38 | 39 | class static_mutex; 40 | 41 | #define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, } 42 | 43 | class BOOST_REGEX_DECL scoped_static_mutex_lock 44 | { 45 | public: 46 | scoped_static_mutex_lock(static_mutex& mut, bool lk = true); 47 | ~scoped_static_mutex_lock(); 48 | inline bool locked()const 49 | { 50 | return m_have_lock; 51 | } 52 | inline operator void const*()const 53 | { 54 | return locked() ? this : 0; 55 | } 56 | void lock(); 57 | void unlock(); 58 | private: 59 | static_mutex& m_mutex; 60 | bool m_have_lock; 61 | }; 62 | 63 | class static_mutex 64 | { 65 | public: 66 | typedef scoped_static_mutex_lock scoped_lock; 67 | pthread_mutex_t m_mutex; 68 | }; 69 | 70 | } // namespace boost 71 | #elif defined(BOOST_HAS_WINTHREADS) 72 | // 73 | // Win32 version: 74 | // Use a 32-bit int as a lock, along with a test-and-set 75 | // implementation using InterlockedCompareExchange. 76 | // 77 | 78 | #include 79 | 80 | namespace boost{ 81 | 82 | class BOOST_REGEX_DECL scoped_static_mutex_lock; 83 | 84 | class static_mutex 85 | { 86 | public: 87 | typedef scoped_static_mutex_lock scoped_lock; 88 | boost::int32_t m_mutex; 89 | }; 90 | 91 | #define BOOST_STATIC_MUTEX_INIT { 0, } 92 | 93 | class BOOST_REGEX_DECL scoped_static_mutex_lock 94 | { 95 | public: 96 | scoped_static_mutex_lock(static_mutex& mut, bool lk = true); 97 | ~scoped_static_mutex_lock(); 98 | operator void const*()const 99 | { 100 | return locked() ? this : 0; 101 | } 102 | bool locked()const 103 | { 104 | return m_have_lock; 105 | } 106 | void lock(); 107 | void unlock(); 108 | private: 109 | static_mutex& m_mutex; 110 | bool m_have_lock; 111 | scoped_static_mutex_lock(const scoped_static_mutex_lock&); 112 | scoped_static_mutex_lock& operator=(const scoped_static_mutex_lock&); 113 | }; 114 | 115 | } // namespace 116 | 117 | #else 118 | // 119 | // Portable version of a static mutex based on Boost.Thread library: 120 | // This has to use a single mutex shared by all instances of static_mutex 121 | // because boost::call_once doesn't alow us to pass instance information 122 | // down to the initialisation proceedure. In fact the initialisation routine 123 | // may need to be called more than once - but only once per instance. 124 | // 125 | // Since this preprocessor path is almost never taken, we hide these header 126 | // dependencies so that build tools don't find them. 127 | // 128 | #define BOOST_REGEX_H1 129 | #define BOOST_REGEX_H2 130 | #define BOOST_REGEX_H3 131 | #include BOOST_REGEX_H1 132 | #include BOOST_REGEX_H2 133 | #include BOOST_REGEX_H3 134 | #undef BOOST_REGEX_H1 135 | #undef BOOST_REGEX_H2 136 | #undef BOOST_REGEX_H3 137 | 138 | namespace boost{ 139 | 140 | class BOOST_REGEX_DECL scoped_static_mutex_lock; 141 | extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex(); 142 | 143 | class BOOST_REGEX_DECL static_mutex 144 | { 145 | public: 146 | typedef scoped_static_mutex_lock scoped_lock; 147 | static void init(); 148 | static boost::recursive_mutex* m_pmutex; 149 | static boost::once_flag m_once; 150 | }; 151 | 152 | #define BOOST_STATIC_MUTEX_INIT { } 153 | 154 | class BOOST_REGEX_DECL scoped_static_mutex_lock 155 | { 156 | public: 157 | scoped_static_mutex_lock(static_mutex& mut, bool lk = true); 158 | ~scoped_static_mutex_lock(); 159 | operator void const*()const; 160 | bool locked()const; 161 | void lock(); 162 | void unlock(); 163 | private: 164 | boost::unique_lock* m_plock; 165 | bool m_have_lock; 166 | }; 167 | 168 | inline scoped_static_mutex_lock::operator void const*()const 169 | { 170 | return locked() ? this : 0; 171 | } 172 | 173 | inline bool scoped_static_mutex_lock::locked()const 174 | { 175 | return m_have_lock; 176 | } 177 | 178 | } // namespace 179 | 180 | #endif 181 | 182 | #endif 183 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/pending/unicode_iterator.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2020 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE unicode_iterator.hpp 15 | * VERSION see 16 | * DESCRIPTION: Iterator adapters for converting between different Unicode encodings. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_PENDING_UNICODE_ITERATOR_HPP 20 | #define BOOST_REGEX_PENDING_UNICODE_ITERATOR_HPP 21 | 22 | #include 23 | 24 | #if defined(BOOST_REGEX_CXX03) 25 | #include 26 | #else 27 | #include 28 | #endif 29 | 30 | 31 | #endif // BOOST_REGEX_PENDING_UNICODE_ITERATOR_HPP 32 | 33 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/regex_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_traits.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares regular expression traits classes. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_TRAITS_HPP 20 | #define BOOST_REGEX_TRAITS_HPP 21 | 22 | #ifndef BOOST_REGEX_CONFIG_HPP 23 | # include 24 | #endif 25 | 26 | # ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED 27 | #ifdef BOOST_REGEX_CXX03 28 | # include 29 | #else 30 | # include 31 | #endif 32 | # endif 33 | 34 | #endif // include 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/user.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE user.hpp 15 | * VERSION see 16 | * DESCRIPTION: User settable options. 17 | */ 18 | 19 | // define if you want the regex library to use the C locale 20 | // even on Win32: 21 | // #define BOOST_REGEX_USE_C_LOCALE 22 | 23 | // define this is you want the regex library to use the C++ 24 | // locale: 25 | // #define BOOST_REGEX_USE_CPP_LOCALE 26 | 27 | // define this if the runtime library is a dll, and you 28 | // want BOOST_REGEX_DYN_LINK to set up dll exports/imports 29 | // with __declspec(dllexport)/__declspec(dllimport.) 30 | // #define BOOST_REGEX_HAS_DLL_RUNTIME 31 | 32 | // define this if you want to dynamically link to regex, 33 | // if the runtime library is also a dll (Probably Win32 specific, 34 | // and has no effect unless BOOST_REGEX_HAS_DLL_RUNTIME is set): 35 | // #define BOOST_REGEX_DYN_LINK 36 | 37 | // define this if you don't want the lib to automatically 38 | // select its link libraries: 39 | // #define BOOST_REGEX_NO_LIB 40 | 41 | // define this if templates with switch statements cause problems: 42 | // #define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE 43 | 44 | // define this to disable Win32 support when available: 45 | // #define BOOST_REGEX_NO_W32 46 | 47 | // define this if bool is not a real type: 48 | // #define BOOST_REGEX_NO_BOOL 49 | 50 | // define this if no template instances are to be placed in 51 | // the library rather than users object files: 52 | // #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES 53 | 54 | // define this if the forward declarations in regex_fwd.hpp 55 | // cause more problems than they are worth: 56 | // #define BOOST_REGEX_NO_FWD 57 | 58 | // define this if your compiler supports MS Windows structured 59 | // exception handling. 60 | // #define BOOST_REGEX_HAS_MS_STACK_GUARD 61 | 62 | // define this if you want to use the recursive algorithm 63 | // even if BOOST_REGEX_HAS_MS_STACK_GUARD is not defined. 64 | // NOTE: OBSOLETE!! 65 | // #define BOOST_REGEX_RECURSIVE 66 | 67 | // define this if you want to use the non-recursive 68 | // algorithm, even if the recursive version would be the default. 69 | // NOTE: OBSOLETE!! 70 | // #define BOOST_REGEX_NON_RECURSIVE 71 | 72 | // define this if you want to set the size of the memory blocks 73 | // used by the non-recursive algorithm. 74 | // #define BOOST_REGEX_BLOCKSIZE 4096 75 | 76 | // define this if you want to set the maximum number of memory blocks 77 | // used by the non-recursive algorithm. 78 | // #define BOOST_REGEX_MAX_BLOCKS 1024 79 | 80 | // define this if you want to set the maximum number of memory blocks 81 | // cached by the non-recursive algorithm: Normally this is 16, but can be 82 | // higher if you have multiple threads all using boost.regex, or lower 83 | // if you don't want boost.regex to cache memory. 84 | // #define BOOST_REGEX_MAX_CACHE_BLOCKS 16 85 | 86 | // define this if you want to be able to access extended capture 87 | // information in your sub_match's (caution this will slow things 88 | // down quite a bit). 89 | // #define BOOST_REGEX_MATCH_EXTRA 90 | 91 | // define this if you want to enable support for Unicode via ICU. 92 | // #define BOOST_HAS_ICU 93 | 94 | // define this if you want regex to use __cdecl calling convensions, even when __fastcall is available: 95 | // #define BOOST_REGEX_NO_FASTCALL 96 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/char_regex_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE char_regex_traits.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares deprecated traits classes char_regex_traits<>. 17 | */ 18 | 19 | 20 | #ifndef BOOST_REGEX_V5_CHAR_REGEX_TRAITS_HPP 21 | #define BOOST_REGEX_V5_CHAR_REGEX_TRAITS_HPP 22 | 23 | namespace boost{ 24 | 25 | namespace deprecated{ 26 | // 27 | // class char_regex_traits_i 28 | // provides case insensitive traits classes (deprecated): 29 | template 30 | class char_regex_traits_i : public regex_traits {}; 31 | 32 | template<> 33 | class char_regex_traits_i : public regex_traits 34 | { 35 | public: 36 | typedef char char_type; 37 | typedef unsigned char uchar_type; 38 | typedef unsigned int size_type; 39 | typedef regex_traits base_type; 40 | 41 | }; 42 | 43 | #ifndef BOOST_NO_WREGEX 44 | template<> 45 | class char_regex_traits_i : public regex_traits 46 | { 47 | public: 48 | typedef wchar_t char_type; 49 | typedef unsigned short uchar_type; 50 | typedef unsigned int size_type; 51 | typedef regex_traits base_type; 52 | 53 | }; 54 | #endif 55 | } // namespace deprecated 56 | } // namespace boost 57 | 58 | #endif // include 59 | 60 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/cregex.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE cregex.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares POSIX API functions 17 | * + boost::RegEx high level wrapper. 18 | */ 19 | 20 | #ifndef BOOST_RE_CREGEX_HPP_INCLUDED 21 | #define BOOST_RE_CREGEX_HPP_INCLUDED 22 | 23 | #ifndef BOOST_REGEX_CONFIG_HPP 24 | #include 25 | #endif 26 | #include 27 | #include 28 | 29 | #ifndef BOOST_REGEX_STANDALONE 30 | #if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus) 31 | # define BOOST_LIB_NAME boost_regex 32 | # if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK) 33 | # define BOOST_DYN_LINK 34 | # endif 35 | # ifdef BOOST_REGEX_DIAG 36 | # define BOOST_LIB_DIAGNOSTIC 37 | # endif 38 | # include 39 | #endif 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | #include 44 | #else 45 | #include 46 | #endif 47 | 48 | /* include these defs only for POSIX compatablity */ 49 | #ifdef __cplusplus 50 | namespace boost{ 51 | extern "C" { 52 | #endif 53 | 54 | #if defined(__cplusplus) 55 | typedef std::ptrdiff_t regoff_t; 56 | typedef std::size_t regsize_t; 57 | #else 58 | typedef ptrdiff_t regoff_t; 59 | typedef size_t regsize_t; 60 | #endif 61 | 62 | typedef struct 63 | { 64 | unsigned int re_magic; 65 | #ifdef __cplusplus 66 | std::size_t re_nsub; /* number of parenthesized subexpressions */ 67 | #else 68 | size_t re_nsub; 69 | #endif 70 | const char* re_endp; /* end pointer for REG_PEND */ 71 | void* guts; /* none of your business :-) */ 72 | match_flag_type eflags; /* none of your business :-) */ 73 | } regex_tA; 74 | 75 | #ifndef BOOST_NO_WREGEX 76 | typedef struct 77 | { 78 | unsigned int re_magic; 79 | #ifdef __cplusplus 80 | std::size_t re_nsub; /* number of parenthesized subexpressions */ 81 | #else 82 | size_t re_nsub; 83 | #endif 84 | const wchar_t* re_endp; /* end pointer for REG_PEND */ 85 | void* guts; /* none of your business :-) */ 86 | match_flag_type eflags; /* none of your business :-) */ 87 | } regex_tW; 88 | #endif 89 | 90 | typedef struct 91 | { 92 | regoff_t rm_so; /* start of match */ 93 | regoff_t rm_eo; /* end of match */ 94 | } regmatch_t; 95 | 96 | /* regcomp() flags */ 97 | typedef enum{ 98 | REG_BASIC = 0000, 99 | REG_EXTENDED = 0001, 100 | REG_ICASE = 0002, 101 | REG_NOSUB = 0004, 102 | REG_NEWLINE = 0010, 103 | REG_NOSPEC = 0020, 104 | REG_PEND = 0040, 105 | REG_DUMP = 0200, 106 | REG_NOCOLLATE = 0400, 107 | REG_ESCAPE_IN_LISTS = 01000, 108 | REG_NEWLINE_ALT = 02000, 109 | REG_PERLEX = 04000, 110 | 111 | REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS | REG_PERLEX, 112 | REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS, 113 | REG_GREP = REG_BASIC | REG_NEWLINE_ALT, 114 | REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT, 115 | 116 | REG_ASSERT = 15, 117 | REG_INVARG = 16, 118 | REG_ATOI = 255, /* convert name to number (!) */ 119 | REG_ITOA = 0400 /* convert number to name (!) */ 120 | } reg_comp_flags; 121 | 122 | /* regexec() flags */ 123 | typedef enum{ 124 | REG_NOTBOL = 00001, 125 | REG_NOTEOL = 00002, 126 | REG_STARTEND = 00004 127 | } reg_exec_flags; 128 | 129 | /* 130 | * POSIX error codes: 131 | */ 132 | typedef unsigned reg_error_t; 133 | typedef reg_error_t reg_errcode_t; /* backwards compatibility */ 134 | 135 | static const reg_error_t REG_NOERROR = 0; /* Success. */ 136 | static const reg_error_t REG_NOMATCH = 1; /* Didn't find a match (for regexec). */ 137 | 138 | /* POSIX regcomp return error codes. (In the order listed in the 139 | standard.) */ 140 | static const reg_error_t REG_BADPAT = 2; /* Invalid pattern. */ 141 | static const reg_error_t REG_ECOLLATE = 3; /* Undefined collating element. */ 142 | static const reg_error_t REG_ECTYPE = 4; /* Invalid character class name. */ 143 | static const reg_error_t REG_EESCAPE = 5; /* Trailing backslash. */ 144 | static const reg_error_t REG_ESUBREG = 6; /* Invalid back reference. */ 145 | static const reg_error_t REG_EBRACK = 7; /* Unmatched left bracket. */ 146 | static const reg_error_t REG_EPAREN = 8; /* Parenthesis imbalance. */ 147 | static const reg_error_t REG_EBRACE = 9; /* Unmatched \{. */ 148 | static const reg_error_t REG_BADBR = 10; /* Invalid contents of \{\}. */ 149 | static const reg_error_t REG_ERANGE = 11; /* Invalid range end. */ 150 | static const reg_error_t REG_ESPACE = 12; /* Ran out of memory. */ 151 | static const reg_error_t REG_BADRPT = 13; /* No preceding re for repetition op. */ 152 | static const reg_error_t REG_EEND = 14; /* unexpected end of expression */ 153 | static const reg_error_t REG_ESIZE = 15; /* expression too big */ 154 | static const reg_error_t REG_ERPAREN = 8; /* = REG_EPAREN : unmatched right parenthesis */ 155 | static const reg_error_t REG_EMPTY = 17; /* empty expression */ 156 | static const reg_error_t REG_E_MEMORY = 15; /* = REG_ESIZE : out of memory */ 157 | static const reg_error_t REG_ECOMPLEXITY = 18; /* complexity too high */ 158 | static const reg_error_t REG_ESTACK = 19; /* out of stack space */ 159 | static const reg_error_t REG_E_PERL = 20; /* Perl (?...) error */ 160 | static const reg_error_t REG_E_UNKNOWN = 21; /* unknown error */ 161 | static const reg_error_t REG_ENOSYS = 21; /* = REG_E_UNKNOWN : Reserved. */ 162 | 163 | BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int); 164 | BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t); 165 | BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int); 166 | BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*); 167 | 168 | #ifndef BOOST_NO_WREGEX 169 | BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int); 170 | BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t); 171 | BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int); 172 | BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*); 173 | #endif 174 | 175 | #ifdef UNICODE 176 | #define regcomp regcompW 177 | #define regerror regerrorW 178 | #define regexec regexecW 179 | #define regfree regfreeW 180 | #define regex_t regex_tW 181 | #else 182 | #define regcomp regcompA 183 | #define regerror regerrorA 184 | #define regexec regexecA 185 | #define regfree regfreeA 186 | #define regex_t regex_tA 187 | #endif 188 | 189 | #ifdef __cplusplus 190 | } /* extern "C" */ 191 | } /* namespace */ 192 | #endif 193 | 194 | #endif /* include guard */ 195 | 196 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/error_type.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2003-2005 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE error_type.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares regular expression error type enumerator. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_ERROR_TYPE_HPP 20 | #define BOOST_REGEX_ERROR_TYPE_HPP 21 | 22 | #ifdef __cplusplus 23 | namespace boost{ 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | namespace regex_constants{ 28 | 29 | enum error_type{ 30 | 31 | error_ok = 0, /* not used */ 32 | error_no_match = 1, /* not used */ 33 | error_bad_pattern = 2, 34 | error_collate = 3, 35 | error_ctype = 4, 36 | error_escape = 5, 37 | error_backref = 6, 38 | error_brack = 7, 39 | error_paren = 8, 40 | error_brace = 9, 41 | error_badbrace = 10, 42 | error_range = 11, 43 | error_space = 12, 44 | error_badrepeat = 13, 45 | error_end = 14, /* not used */ 46 | error_size = 15, 47 | error_right_paren = 16, /* not used */ 48 | error_empty = 17, 49 | error_complexity = 18, 50 | error_stack = 19, 51 | error_perl_extension = 20, 52 | error_unknown = 21 53 | }; 54 | 55 | } 56 | } 57 | #endif /* __cplusplus */ 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/iterator_category.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_match.hpp 15 | * VERSION see 16 | * DESCRIPTION: Iterator traits for selecting an iterator type as 17 | * an integral constant expression. 18 | */ 19 | 20 | 21 | #ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP 22 | #define BOOST_REGEX_ITERATOR_CATEGORY_HPP 23 | 24 | #include 25 | #include 26 | 27 | namespace boost{ 28 | namespace detail{ 29 | 30 | template 31 | struct is_random_imp 32 | { 33 | private: 34 | typedef typename std::iterator_traits::iterator_category cat; 35 | public: 36 | static const bool value = (std::is_convertible::value); 37 | }; 38 | 39 | template 40 | struct is_random_pointer_imp 41 | { 42 | static const bool value = true; 43 | }; 44 | 45 | template 46 | struct is_random_imp_selector 47 | { 48 | template 49 | struct rebind 50 | { 51 | typedef is_random_imp type; 52 | }; 53 | }; 54 | 55 | template <> 56 | struct is_random_imp_selector 57 | { 58 | template 59 | struct rebind 60 | { 61 | typedef is_random_pointer_imp type; 62 | }; 63 | }; 64 | 65 | } 66 | 67 | template 68 | struct is_random_access_iterator 69 | { 70 | private: 71 | typedef detail::is_random_imp_selector< std::is_pointer::value> selector; 72 | typedef typename selector::template rebind bound_type; 73 | typedef typename bound_type::type answer; 74 | public: 75 | static const bool value = answer::value; 76 | }; 77 | 78 | template 79 | const bool is_random_access_iterator::value; 80 | 81 | } 82 | 83 | #endif 84 | 85 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/iterator_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE iterator_traits.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares iterator traits workarounds. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_ITERATOR_TRAITS_HPP 20 | #define BOOST_REGEX_V5_ITERATOR_TRAITS_HPP 21 | 22 | namespace boost{ 23 | namespace BOOST_REGEX_DETAIL_NS{ 24 | 25 | template 26 | struct regex_iterator_traits : public std::iterator_traits {}; 27 | 28 | } // namespace BOOST_REGEX_DETAIL_NS 29 | } // namespace boost 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/match_flags.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE match_flags.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares match_flags type. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_MATCH_FLAGS 20 | #define BOOST_REGEX_V5_MATCH_FLAGS 21 | 22 | #ifdef __cplusplus 23 | # include 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | namespace boost{ 28 | namespace regex_constants{ 29 | #endif 30 | 31 | #ifdef BOOST_REGEX_MSVC 32 | #pragma warning(push) 33 | #if BOOST_REGEX_MSVC >= 1800 34 | #pragma warning(disable : 26812) 35 | #endif 36 | #endif 37 | 38 | typedef enum _match_flags 39 | { 40 | match_default = 0, 41 | match_not_bol = 1, /* first is not start of line */ 42 | match_not_eol = match_not_bol << 1, /* last is not end of line */ 43 | match_not_bob = match_not_eol << 1, /* first is not start of buffer */ 44 | match_not_eob = match_not_bob << 1, /* last is not end of buffer */ 45 | match_not_bow = match_not_eob << 1, /* first is not start of word */ 46 | match_not_eow = match_not_bow << 1, /* last is not end of word */ 47 | match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */ 48 | match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */ 49 | match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */ 50 | match_init = match_prev_avail << 1, /* internal use */ 51 | match_any = match_init << 1, /* don't care what we match */ 52 | match_not_null = match_any << 1, /* string can't be null */ 53 | match_continuous = match_not_null << 1, /* each grep match must continue from */ 54 | /* uninterrupted from the previous one */ 55 | match_partial = match_continuous << 1, /* find partial matches */ 56 | 57 | match_stop = match_partial << 1, /* stop after first match (grep) V3 only */ 58 | match_not_initial_null = match_stop, /* don't match initial null, V4 only */ 59 | match_all = match_stop << 1, /* must find the whole of input even if match_any is set */ 60 | match_perl = match_all << 1, /* Use perl matching rules */ 61 | match_posix = match_perl << 1, /* Use POSIX matching rules */ 62 | match_nosubs = match_posix << 1, /* don't trap marked subs */ 63 | match_extra = match_nosubs << 1, /* include full capture information for repeated captures */ 64 | match_single_line = match_extra << 1, /* treat text as single line and ignore any \n's when matching ^ and $. */ 65 | match_unused1 = match_single_line << 1, /* unused */ 66 | match_unused2 = match_unused1 << 1, /* unused */ 67 | match_unused3 = match_unused2 << 1, /* unused */ 68 | match_max = match_unused3, 69 | 70 | format_perl = 0, /* perl style replacement */ 71 | format_default = 0, /* ditto. */ 72 | format_sed = match_max << 1, /* sed style replacement. */ 73 | format_all = format_sed << 1, /* enable all extensions to syntax. */ 74 | format_no_copy = format_all << 1, /* don't copy non-matching segments. */ 75 | format_first_only = format_no_copy << 1, /* Only replace first occurrence. */ 76 | format_is_if = format_first_only << 1, /* internal use only. */ 77 | format_literal = format_is_if << 1, /* treat string as a literal */ 78 | 79 | match_not_any = match_not_bol | match_not_eol | match_not_bob 80 | | match_not_eob | match_not_bow | match_not_eow | match_not_dot_newline 81 | | match_not_dot_null | match_prev_avail | match_init | match_not_null 82 | | match_continuous | match_partial | match_stop | match_not_initial_null 83 | | match_stop | match_all | match_perl | match_posix | match_nosubs 84 | | match_extra | match_single_line | match_unused1 | match_unused2 85 | | match_unused3 | match_max | format_perl | format_default | format_sed 86 | | format_all | format_no_copy | format_first_only | format_is_if 87 | | format_literal 88 | 89 | 90 | } match_flags; 91 | 92 | typedef match_flags match_flag_type; 93 | 94 | #ifdef __cplusplus 95 | inline match_flags operator&(match_flags m1, match_flags m2) 96 | { return static_cast(static_cast(m1) & static_cast(m2)); } 97 | inline match_flags operator|(match_flags m1, match_flags m2) 98 | { return static_cast(static_cast(m1) | static_cast(m2)); } 99 | inline match_flags operator^(match_flags m1, match_flags m2) 100 | { return static_cast(static_cast(m1) ^ static_cast(m2)); } 101 | inline match_flags operator~(match_flags m1) 102 | { return static_cast(~static_cast(m1)); } 103 | inline match_flags& operator&=(match_flags& m1, match_flags m2) 104 | { m1 = m1&m2; return m1; } 105 | inline match_flags& operator|=(match_flags& m1, match_flags m2) 106 | { m1 = m1|m2; return m1; } 107 | inline match_flags& operator^=(match_flags& m1, match_flags m2) 108 | { m1 = m1^m2; return m1; } 109 | #endif 110 | 111 | #ifdef __cplusplus 112 | } /* namespace regex_constants */ 113 | /* 114 | * import names into boost for backwards compatibility: 115 | */ 116 | using regex_constants::match_flag_type; 117 | using regex_constants::match_default; 118 | using regex_constants::match_not_bol; 119 | using regex_constants::match_not_eol; 120 | using regex_constants::match_not_bob; 121 | using regex_constants::match_not_eob; 122 | using regex_constants::match_not_bow; 123 | using regex_constants::match_not_eow; 124 | using regex_constants::match_not_dot_newline; 125 | using regex_constants::match_not_dot_null; 126 | using regex_constants::match_prev_avail; 127 | /* using regex_constants::match_init; */ 128 | using regex_constants::match_any; 129 | using regex_constants::match_not_null; 130 | using regex_constants::match_continuous; 131 | using regex_constants::match_partial; 132 | /*using regex_constants::match_stop; */ 133 | using regex_constants::match_all; 134 | using regex_constants::match_perl; 135 | using regex_constants::match_posix; 136 | using regex_constants::match_nosubs; 137 | using regex_constants::match_extra; 138 | using regex_constants::match_single_line; 139 | /*using regex_constants::match_max; */ 140 | using regex_constants::format_all; 141 | using regex_constants::format_sed; 142 | using regex_constants::format_perl; 143 | using regex_constants::format_default; 144 | using regex_constants::format_no_copy; 145 | using regex_constants::format_first_only; 146 | /*using regex_constants::format_is_if;*/ 147 | 148 | #ifdef BOOST_REGEX_MSVC 149 | #pragma warning(pop) 150 | #endif 151 | 152 | 153 | } /* namespace boost */ 154 | #endif /* __cplusplus */ 155 | #endif /* include guard */ 156 | 157 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/mem_block_cache.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002 3 | * John Maddock 4 | * 5 | * Use, modification and distribution are subject to the 6 | * Boost Software License, Version 1.0. (See accompanying file 7 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | * 9 | */ 10 | 11 | /* 12 | * LOCATION: see http://www.boost.org for most recent version. 13 | * FILE mem_block_cache.hpp 14 | * VERSION see 15 | * DESCRIPTION: memory block cache used by the non-recursive matcher. 16 | */ 17 | 18 | #ifndef BOOST_REGEX_V5_MEM_BLOCK_CACHE_HPP 19 | #define BOOST_REGEX_V5_MEM_BLOCK_CACHE_HPP 20 | 21 | #include 22 | #ifdef BOOST_HAS_THREADS 23 | #include 24 | #endif 25 | 26 | #ifndef BOOST_NO_CXX11_HDR_ATOMIC 27 | #include 28 | #if ATOMIC_POINTER_LOCK_FREE == 2 29 | #define BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE 30 | #define BOOST_REGEX_ATOMIC_POINTER std::atomic 31 | #endif 32 | #endif 33 | 34 | namespace boost{ 35 | namespace BOOST_REGEX_DETAIL_NS{ 36 | 37 | #if BOOST_REGEX_MAX_CACHE_BLOCKS != 0 38 | #ifdef BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE /* lock free implementation */ 39 | struct mem_block_cache 40 | { 41 | std::atomic cache[BOOST_REGEX_MAX_CACHE_BLOCKS]; 42 | 43 | ~mem_block_cache() 44 | { 45 | for (size_t i = 0;i < BOOST_REGEX_MAX_CACHE_BLOCKS; ++i) { 46 | if (cache[i].load()) ::operator delete(cache[i].load()); 47 | } 48 | } 49 | void* get() 50 | { 51 | for (size_t i = 0;i < BOOST_REGEX_MAX_CACHE_BLOCKS; ++i) { 52 | void* p = cache[i].load(); 53 | if (p != NULL) { 54 | if (cache[i].compare_exchange_strong(p, NULL)) return p; 55 | } 56 | } 57 | return ::operator new(BOOST_REGEX_BLOCKSIZE); 58 | } 59 | void put(void* ptr) 60 | { 61 | for (size_t i = 0;i < BOOST_REGEX_MAX_CACHE_BLOCKS; ++i) { 62 | void* p = cache[i].load(); 63 | if (p == NULL) { 64 | if (cache[i].compare_exchange_strong(p, ptr)) return; 65 | } 66 | } 67 | ::operator delete(ptr); 68 | } 69 | 70 | static mem_block_cache& instance() 71 | { 72 | static mem_block_cache block_cache = { { {nullptr} } }; 73 | return block_cache; 74 | } 75 | }; 76 | 77 | 78 | #else /* lock-based implementation */ 79 | 80 | 81 | struct mem_block_node 82 | { 83 | mem_block_node* next; 84 | }; 85 | 86 | struct mem_block_cache 87 | { 88 | // this member has to be statically initialsed: 89 | mem_block_node* next { nullptr }; 90 | unsigned cached_blocks { 0 }; 91 | #ifdef BOOST_HAS_THREADS 92 | std::mutex mut; 93 | #endif 94 | 95 | ~mem_block_cache() 96 | { 97 | while(next) 98 | { 99 | mem_block_node* old = next; 100 | next = next->next; 101 | ::operator delete(old); 102 | } 103 | } 104 | void* get() 105 | { 106 | #ifdef BOOST_HAS_THREADS 107 | std::lock_guard g(mut); 108 | #endif 109 | if(next) 110 | { 111 | mem_block_node* result = next; 112 | next = next->next; 113 | --cached_blocks; 114 | return result; 115 | } 116 | return ::operator new(BOOST_REGEX_BLOCKSIZE); 117 | } 118 | void put(void* p) 119 | { 120 | #ifdef BOOST_HAS_THREADS 121 | std::lock_guard g(mut); 122 | #endif 123 | if(cached_blocks >= BOOST_REGEX_MAX_CACHE_BLOCKS) 124 | { 125 | ::operator delete(p); 126 | } 127 | else 128 | { 129 | mem_block_node* old = static_cast(p); 130 | old->next = next; 131 | next = old; 132 | ++cached_blocks; 133 | } 134 | } 135 | static mem_block_cache& instance() 136 | { 137 | static mem_block_cache block_cache; 138 | return block_cache; 139 | } 140 | }; 141 | #endif 142 | #endif 143 | 144 | #if BOOST_REGEX_MAX_CACHE_BLOCKS == 0 145 | 146 | inline void* get_mem_block() 147 | { 148 | return ::operator new(BOOST_REGEX_BLOCKSIZE); 149 | } 150 | 151 | inline void put_mem_block(void* p) 152 | { 153 | ::operator delete(p); 154 | } 155 | 156 | #else 157 | 158 | inline void* get_mem_block() 159 | { 160 | return mem_block_cache::instance().get(); 161 | } 162 | 163 | inline void put_mem_block(void* p) 164 | { 165 | mem_block_cache::instance().put(p); 166 | } 167 | 168 | #endif 169 | } 170 | } // namespace boost 171 | 172 | #endif 173 | 174 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/object_cache.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2004 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE object_cache.hpp 15 | * VERSION see 16 | * DESCRIPTION: Implements a generic object cache. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_OBJECT_CACHE_HPP 20 | #define BOOST_REGEX_OBJECT_CACHE_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #ifdef BOOST_HAS_THREADS 29 | #include 30 | #endif 31 | 32 | namespace boost{ 33 | 34 | template 35 | class object_cache 36 | { 37 | public: 38 | typedef std::pair< ::std::shared_ptr, Key const*> value_type; 39 | typedef std::list list_type; 40 | typedef typename list_type::iterator list_iterator; 41 | typedef std::map map_type; 42 | typedef typename map_type::iterator map_iterator; 43 | typedef typename list_type::size_type size_type; 44 | static std::shared_ptr get(const Key& k, size_type l_max_cache_size); 45 | 46 | private: 47 | static std::shared_ptr do_get(const Key& k, size_type l_max_cache_size); 48 | 49 | struct data 50 | { 51 | list_type cont; 52 | map_type index; 53 | }; 54 | 55 | // Needed by compilers not implementing the resolution to DR45. For reference, 56 | // see http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#45. 57 | friend struct data; 58 | }; 59 | 60 | #ifdef BOOST_REGEX_MSVC 61 | #pragma warning(push) 62 | #pragma warning(disable: 4702) 63 | #endif 64 | template 65 | std::shared_ptr object_cache::get(const Key& k, size_type l_max_cache_size) 66 | { 67 | #ifdef BOOST_HAS_THREADS 68 | static std::mutex mut; 69 | std::lock_guard l(mut); 70 | return do_get(k, l_max_cache_size); 71 | #else 72 | return do_get(k, l_max_cache_size); 73 | #endif 74 | } 75 | #ifdef BOOST_REGEX_MSVC 76 | #pragma warning(pop) 77 | #endif 78 | 79 | template 80 | std::shared_ptr object_cache::do_get(const Key& k, size_type l_max_cache_size) 81 | { 82 | typedef typename object_cache::data object_data; 83 | typedef typename map_type::size_type map_size_type; 84 | static object_data s_data; 85 | 86 | // 87 | // see if the object is already in the cache: 88 | // 89 | map_iterator mpos = s_data.index.find(k); 90 | if(mpos != s_data.index.end()) 91 | { 92 | // 93 | // Eureka! 94 | // We have a cached item, bump it up the list and return it: 95 | // 96 | if(--(s_data.cont.end()) != mpos->second) 97 | { 98 | // splice out the item we want to move: 99 | list_type temp; 100 | temp.splice(temp.end(), s_data.cont, mpos->second); 101 | // and now place it at the end of the list: 102 | s_data.cont.splice(s_data.cont.end(), temp, temp.begin()); 103 | BOOST_REGEX_ASSERT(*(s_data.cont.back().second) == k); 104 | // update index with new position: 105 | mpos->second = --(s_data.cont.end()); 106 | BOOST_REGEX_ASSERT(&(mpos->first) == mpos->second->second); 107 | BOOST_REGEX_ASSERT(&(mpos->first) == s_data.cont.back().second); 108 | } 109 | return s_data.cont.back().first; 110 | } 111 | // 112 | // if we get here then the item is not in the cache, 113 | // so create it: 114 | // 115 | std::shared_ptr result(new Object(k)); 116 | // 117 | // Add it to the list, and index it: 118 | // 119 | s_data.cont.push_back(value_type(result, static_cast(0))); 120 | s_data.index.insert(std::make_pair(k, --(s_data.cont.end()))); 121 | s_data.cont.back().second = &(s_data.index.find(k)->first); 122 | map_size_type s = s_data.index.size(); 123 | BOOST_REGEX_ASSERT(s_data.index[k]->first.get() == result.get()); 124 | BOOST_REGEX_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second); 125 | BOOST_REGEX_ASSERT(s_data.index.find(k)->first == k); 126 | if(s > l_max_cache_size) 127 | { 128 | // 129 | // We have too many items in the list, so we need to start 130 | // popping them off the back of the list, but only if they're 131 | // being held uniquely by us: 132 | // 133 | list_iterator pos = s_data.cont.begin(); 134 | list_iterator last = s_data.cont.end(); 135 | while((pos != last) && (s > l_max_cache_size)) 136 | { 137 | if(pos->first.use_count() == 1) 138 | { 139 | list_iterator condemmed(pos); 140 | ++pos; 141 | // now remove the items from our containers, 142 | // then order has to be as follows: 143 | BOOST_REGEX_ASSERT(s_data.index.find(*(condemmed->second)) != s_data.index.end()); 144 | s_data.index.erase(*(condemmed->second)); 145 | s_data.cont.erase(condemmed); 146 | --s; 147 | } 148 | else 149 | ++pos; 150 | } 151 | BOOST_REGEX_ASSERT(s_data.index[k]->first.get() == result.get()); 152 | BOOST_REGEX_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second); 153 | BOOST_REGEX_ASSERT(s_data.index.find(k)->first == k); 154 | } 155 | return result; 156 | } 157 | 158 | } 159 | 160 | #endif 161 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/pattern_except.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE pattern_except.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares pattern-matching exception classes. 17 | */ 18 | 19 | #ifndef BOOST_RE_V5_PAT_EXCEPT_HPP 20 | #define BOOST_RE_V5_PAT_EXCEPT_HPP 21 | 22 | #ifndef BOOST_REGEX_CONFIG_HPP 23 | #include 24 | #endif 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | namespace boost{ 32 | 33 | #ifdef BOOST_REGEX_MSVC 34 | #pragma warning(push) 35 | #pragma warning(disable : 4275) 36 | #if BOOST_REGEX_MSVC >= 1800 37 | #pragma warning(disable : 26812 4459) 38 | #endif 39 | #endif 40 | class regex_error : public std::runtime_error 41 | { 42 | public: 43 | explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0) 44 | : std::runtime_error(s) 45 | , m_error_code(err) 46 | , m_position(pos) 47 | { 48 | } 49 | explicit regex_error(regex_constants::error_type err) 50 | : std::runtime_error(::boost::BOOST_REGEX_DETAIL_NS::get_default_error_string(err)) 51 | , m_error_code(err) 52 | , m_position(0) 53 | { 54 | } 55 | ~regex_error() noexcept override {} 56 | regex_constants::error_type code()const 57 | { return m_error_code; } 58 | std::ptrdiff_t position()const 59 | { return m_position; } 60 | void raise()const 61 | { 62 | #ifndef BOOST_NO_EXCEPTIONS 63 | #ifndef BOOST_REGEX_STANDALONE 64 | ::boost::throw_exception(*this); 65 | #else 66 | throw* this; 67 | #endif 68 | #endif 69 | } 70 | private: 71 | regex_constants::error_type m_error_code; 72 | std::ptrdiff_t m_position; 73 | }; 74 | 75 | typedef regex_error bad_pattern; 76 | typedef regex_error bad_expression; 77 | 78 | namespace BOOST_REGEX_DETAIL_NS{ 79 | 80 | template 81 | inline void raise_runtime_error(const E& ex) 82 | { 83 | #ifndef BOOST_REGEX_STANDALONE 84 | ::boost::throw_exception(ex); 85 | #else 86 | throw ex; 87 | #endif 88 | } 89 | 90 | template 91 | void raise_error(const traits& t, regex_constants::error_type code) 92 | { 93 | (void)t; // warning suppression 94 | regex_error e(t.error_string(code), code, 0); 95 | ::boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(e); 96 | } 97 | 98 | } 99 | 100 | #ifdef BOOST_REGEX_MSVC 101 | #pragma warning(pop) 102 | #endif 103 | 104 | } // namespace boost 105 | 106 | #endif 107 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/primary_transform.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE: primary_transform.hpp 15 | * VERSION: see 16 | * DESCRIPTION: Heuristically determines the sort string format in use 17 | * by the current locale. 18 | */ 19 | 20 | #ifndef BOOST_REGEX_PRIMARY_TRANSFORM 21 | #define BOOST_REGEX_PRIMARY_TRANSFORM 22 | 23 | namespace boost{ 24 | namespace BOOST_REGEX_DETAIL_NS{ 25 | 26 | 27 | enum{ 28 | sort_C, 29 | sort_fixed, 30 | sort_delim, 31 | sort_unknown 32 | }; 33 | 34 | template 35 | unsigned count_chars(const S& s, charT c) 36 | { 37 | // 38 | // Count how many occurrences of character c occur 39 | // in string s: if c is a delimeter between collation 40 | // fields, then this should be the same value for all 41 | // sort keys: 42 | // 43 | unsigned int count = 0; 44 | for(unsigned pos = 0; pos < s.size(); ++pos) 45 | { 46 | if(s[pos] == c) ++count; 47 | } 48 | return count; 49 | } 50 | 51 | 52 | template 53 | unsigned find_sort_syntax(const traits* pt, charT* delim) 54 | { 55 | // 56 | // compare 'a' with 'A' to see how similar they are, 57 | // should really use a-accute but we can't portably do that, 58 | // 59 | typedef typename traits::string_type string_type; 60 | typedef typename traits::char_type char_type; 61 | 62 | // Suppress incorrect warning for MSVC 63 | (void)pt; 64 | 65 | char_type a[2] = {'a', '\0', }; 66 | string_type sa(pt->transform(a, a+1)); 67 | if(sa == a) 68 | { 69 | *delim = 0; 70 | return sort_C; 71 | } 72 | char_type A[2] = { 'A', '\0', }; 73 | string_type sA(pt->transform(A, A+1)); 74 | char_type c[2] = { ';', '\0', }; 75 | string_type sc(pt->transform(c, c+1)); 76 | 77 | int pos = 0; 78 | while((pos <= static_cast(sa.size())) && (pos <= static_cast(sA.size())) && (sa[pos] == sA[pos])) ++pos; 79 | --pos; 80 | if(pos < 0) 81 | { 82 | *delim = 0; 83 | return sort_unknown; 84 | } 85 | // 86 | // at this point sa[pos] is either the end of a fixed width field 87 | // or the character that acts as a delimiter: 88 | // 89 | charT maybe_delim = sa[pos]; 90 | if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(sc, maybe_delim))) 91 | { 92 | *delim = maybe_delim; 93 | return sort_delim; 94 | } 95 | // 96 | // OK doen't look like a delimiter, try for fixed width field: 97 | // 98 | if((sa.size() == sA.size()) && (sa.size() == sc.size())) 99 | { 100 | // note assumes that the fixed width field is less than 101 | // (numeric_limits::max)(), should be true for all types 102 | // I can't imagine 127 character fields... 103 | *delim = static_cast(++pos); 104 | return sort_fixed; 105 | } 106 | // 107 | // don't know what it is: 108 | // 109 | *delim = 0; 110 | return sort_unknown; 111 | } 112 | 113 | 114 | } // namespace BOOST_REGEX_DETAIL_NS 115 | } // namespace boost 116 | 117 | #endif 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regbase.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regbase.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares class regbase. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_REGBASE_HPP 20 | #define BOOST_REGEX_V5_REGBASE_HPP 21 | 22 | namespace boost{ 23 | // 24 | // class regbase 25 | // handles error codes and flags 26 | // 27 | class regbase 28 | { 29 | public: 30 | enum flag_type_ 31 | { 32 | // 33 | // Divide the flags up into logical groups: 34 | // bits 0-7 indicate main synatx type. 35 | // bits 8-15 indicate syntax subtype. 36 | // bits 16-31 indicate options that are common to all 37 | // regex syntaxes. 38 | // In all cases the default is 0. 39 | // 40 | // Main synatx group: 41 | // 42 | perl_syntax_group = 0, // default 43 | basic_syntax_group = 1, // POSIX basic 44 | literal = 2, // all characters are literals 45 | main_option_type = literal | basic_syntax_group | perl_syntax_group, // everything! 46 | // 47 | // options specific to perl group: 48 | // 49 | no_bk_refs = 1 << 8, // \d not allowed 50 | no_perl_ex = 1 << 9, // disable perl extensions 51 | no_mod_m = 1 << 10, // disable Perl m modifier 52 | mod_x = 1 << 11, // Perl x modifier 53 | mod_s = 1 << 12, // force s modifier on (overrides match_not_dot_newline) 54 | no_mod_s = 1 << 13, // force s modifier off (overrides match_not_dot_newline) 55 | 56 | // 57 | // options specific to basic group: 58 | // 59 | no_char_classes = 1 << 8, // [[:CLASS:]] not allowed 60 | no_intervals = 1 << 9, // {x,y} not allowed 61 | bk_plus_qm = 1 << 10, // uses \+ and \? 62 | bk_vbar = 1 << 11, // use \| for alternatives 63 | emacs_ex = 1 << 12, // enables emacs extensions 64 | 65 | // 66 | // options common to all groups: 67 | // 68 | no_escape_in_lists = 1 << 16, // '\' not special inside [...] 69 | newline_alt = 1 << 17, // \n is the same as | 70 | no_except = 1 << 18, // no exception on error 71 | failbit = 1 << 19, // error flag 72 | icase = 1 << 20, // characters are matched regardless of case 73 | nocollate = 0, // don't use locale specific collation (deprecated) 74 | collate = 1 << 21, // use locale specific collation 75 | nosubs = 1 << 22, // don't mark sub-expressions 76 | save_subexpression_location = 1 << 23, // save subexpression locations 77 | no_empty_expressions = 1 << 24, // no empty expressions allowed 78 | optimize = 0, // not really supported 79 | 80 | 81 | 82 | basic = basic_syntax_group | collate | no_escape_in_lists, 83 | extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists, 84 | normal = 0, 85 | emacs = basic_syntax_group | collate | emacs_ex | bk_vbar, 86 | awk = no_bk_refs | collate | no_perl_ex, 87 | grep = basic | newline_alt, 88 | egrep = extended | newline_alt, 89 | sed = basic, 90 | perl = normal, 91 | ECMAScript = normal, 92 | JavaScript = normal, 93 | JScript = normal 94 | }; 95 | typedef unsigned int flag_type; 96 | 97 | enum restart_info 98 | { 99 | restart_any = 0, 100 | restart_word = 1, 101 | restart_line = 2, 102 | restart_buf = 3, 103 | restart_continue = 4, 104 | restart_lit = 5, 105 | restart_fixed_lit = 6, 106 | restart_count = 7 107 | }; 108 | }; 109 | 110 | // 111 | // provide std lib proposal compatible constants: 112 | // 113 | namespace regex_constants{ 114 | 115 | enum flag_type_ 116 | { 117 | 118 | no_except = ::boost::regbase::no_except, 119 | failbit = ::boost::regbase::failbit, 120 | literal = ::boost::regbase::literal, 121 | icase = ::boost::regbase::icase, 122 | nocollate = ::boost::regbase::nocollate, 123 | collate = ::boost::regbase::collate, 124 | nosubs = ::boost::regbase::nosubs, 125 | optimize = ::boost::regbase::optimize, 126 | bk_plus_qm = ::boost::regbase::bk_plus_qm, 127 | bk_vbar = ::boost::regbase::bk_vbar, 128 | no_intervals = ::boost::regbase::no_intervals, 129 | no_char_classes = ::boost::regbase::no_char_classes, 130 | no_escape_in_lists = ::boost::regbase::no_escape_in_lists, 131 | no_mod_m = ::boost::regbase::no_mod_m, 132 | mod_x = ::boost::regbase::mod_x, 133 | mod_s = ::boost::regbase::mod_s, 134 | no_mod_s = ::boost::regbase::no_mod_s, 135 | save_subexpression_location = ::boost::regbase::save_subexpression_location, 136 | no_empty_expressions = ::boost::regbase::no_empty_expressions, 137 | 138 | basic = ::boost::regbase::basic, 139 | extended = ::boost::regbase::extended, 140 | normal = ::boost::regbase::normal, 141 | emacs = ::boost::regbase::emacs, 142 | awk = ::boost::regbase::awk, 143 | grep = ::boost::regbase::grep, 144 | egrep = ::boost::regbase::egrep, 145 | sed = basic, 146 | perl = normal, 147 | ECMAScript = normal, 148 | JavaScript = normal, 149 | JScript = normal 150 | }; 151 | typedef ::boost::regbase::flag_type syntax_option_type; 152 | 153 | } // namespace regex_constants 154 | 155 | } // namespace boost 156 | 157 | #endif 158 | 159 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares boost::basic_regex<> and associated 17 | * functions and classes. This header is the main 18 | * entry point for the template regex code. 19 | */ 20 | 21 | #ifndef BOOST_RE_REGEX_HPP_INCLUDED 22 | #define BOOST_RE_REGEX_HPP_INCLUDED 23 | 24 | #ifdef __cplusplus 25 | 26 | // what follows is all C++ don't include in C builds!! 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | namespace boost{ 48 | #ifdef BOOST_REGEX_NO_FWD 49 | typedef basic_regex > regex; 50 | #ifndef BOOST_NO_WREGEX 51 | typedef basic_regex > wregex; 52 | #endif 53 | #endif 54 | 55 | typedef match_results cmatch; 56 | typedef match_results smatch; 57 | #ifndef BOOST_NO_WREGEX 58 | typedef match_results wcmatch; 59 | typedef match_results wsmatch; 60 | #endif 61 | 62 | } // namespace boost 63 | 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | 73 | #endif // __cplusplus 74 | 75 | #endif // include 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_fwd.cpp 15 | * VERSION see 16 | * DESCRIPTION: Forward declares boost::basic_regex<> and 17 | * associated typedefs. 18 | */ 19 | 20 | #ifndef BOOST_REGEX_FWD_HPP_INCLUDED 21 | #define BOOST_REGEX_FWD_HPP_INCLUDED 22 | 23 | #ifndef BOOST_REGEX_CONFIG_HPP 24 | #include 25 | #endif 26 | 27 | // 28 | // define BOOST_REGEX_NO_FWD if this 29 | // header doesn't work! 30 | // 31 | #ifdef BOOST_REGEX_NO_FWD 32 | # ifndef BOOST_RE_REGEX_HPP 33 | # include 34 | # endif 35 | #else 36 | 37 | namespace boost{ 38 | 39 | template 40 | class cpp_regex_traits; 41 | template 42 | struct c_regex_traits; 43 | template 44 | class w32_regex_traits; 45 | 46 | #ifdef BOOST_REGEX_USE_WIN32_LOCALE 47 | template > 48 | struct regex_traits; 49 | #elif defined(BOOST_REGEX_USE_CPP_LOCALE) 50 | template > 51 | struct regex_traits; 52 | #else 53 | template > 54 | struct regex_traits; 55 | #endif 56 | 57 | template > 58 | class basic_regex; 59 | 60 | typedef basic_regex > regex; 61 | #ifndef BOOST_NO_WREGEX 62 | typedef basic_regex > wregex; 63 | #endif 64 | 65 | } // namespace boost 66 | 67 | #endif // BOOST_REGEX_NO_FWD 68 | 69 | #endif 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_grep.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_grep.hpp 15 | * VERSION see 16 | * DESCRIPTION: Provides regex_grep implementation. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_REGEX_GREP_HPP 20 | #define BOOST_REGEX_V5_REGEX_GREP_HPP 21 | 22 | 23 | namespace boost{ 24 | 25 | // 26 | // regex_grep: 27 | // find all non-overlapping matches within the sequence first last: 28 | // 29 | template 30 | inline unsigned int regex_grep(Predicate foo, 31 | BidiIterator first, 32 | BidiIterator last, 33 | const basic_regex& e, 34 | match_flag_type flags = match_default) 35 | { 36 | if(e.flags() & regex_constants::failbit) 37 | return false; 38 | 39 | typedef typename match_results::allocator_type match_allocator_type; 40 | 41 | match_results m; 42 | BOOST_REGEX_DETAIL_NS::perl_matcher matcher(first, last, m, e, flags, first); 43 | unsigned int count = 0; 44 | while(matcher.find()) 45 | { 46 | ++count; 47 | if(0 == foo(m)) 48 | return count; // caller doesn't want to go on 49 | if(m[0].second == last) 50 | return count; // we've reached the end, don't try and find an extra null match. 51 | if(m.length() == 0) 52 | { 53 | if(m[0].second == last) 54 | return count; 55 | // we found a NULL-match, now try to find 56 | // a non-NULL one at the same position: 57 | match_results m2(m); 58 | matcher.setf(match_not_null | match_continuous); 59 | if(matcher.find()) 60 | { 61 | ++count; 62 | if(0 == foo(m)) 63 | return count; 64 | } 65 | else 66 | { 67 | // reset match back to where it was: 68 | m = m2; 69 | } 70 | matcher.unsetf((match_not_null | match_continuous) & ~flags); 71 | } 72 | } 73 | return count; 74 | } 75 | 76 | // 77 | // regex_grep convenience interfaces: 78 | // 79 | template 80 | inline unsigned int regex_grep(Predicate foo, const charT* str, 81 | const basic_regex& e, 82 | match_flag_type flags = match_default) 83 | { 84 | return regex_grep(foo, str, str + traits::length(str), e, flags); 85 | } 86 | 87 | template 88 | inline unsigned int regex_grep(Predicate foo, const std::basic_string& s, 89 | const basic_regex& e, 90 | match_flag_type flags = match_default) 91 | { 92 | return regex_grep(foo, s.begin(), s.end(), e, flags); 93 | } 94 | 95 | } // namespace boost 96 | 97 | #endif // BOOST_REGEX_V5_REGEX_GREP_HPP 98 | 99 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_iterator.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2003 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_iterator.hpp 15 | * VERSION see 16 | * DESCRIPTION: Provides regex_iterator implementation. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_REGEX_ITERATOR_HPP 20 | #define BOOST_REGEX_V5_REGEX_ITERATOR_HPP 21 | 22 | #include 23 | 24 | namespace boost{ 25 | 26 | template 29 | class regex_iterator_implementation 30 | { 31 | typedef basic_regex regex_type; 32 | 33 | match_results what; // current match 34 | BidirectionalIterator base; // start of sequence 35 | BidirectionalIterator end; // end of sequence 36 | const regex_type re; // the expression 37 | match_flag_type flags; // flags for matching 38 | 39 | public: 40 | regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) 41 | : base(), end(last), re(*p), flags(f){} 42 | regex_iterator_implementation(const regex_iterator_implementation& other) 43 | :what(other.what), base(other.base), end(other.end), re(other.re), flags(other.flags){} 44 | bool init(BidirectionalIterator first) 45 | { 46 | base = first; 47 | return regex_search(first, end, what, re, flags); 48 | } 49 | bool compare(const regex_iterator_implementation& that) 50 | { 51 | if(this == &that) return true; 52 | return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); 53 | } 54 | const match_results& get() 55 | { return what; } 56 | bool next() 57 | { 58 | //if(what.prefix().first != what[0].second) 59 | // flags |= match_prev_avail; 60 | BidirectionalIterator next_start = what[0].second; 61 | match_flag_type f(flags); 62 | if(!what.length() || (f & regex_constants::match_posix)) 63 | f |= regex_constants::match_not_initial_null; 64 | //if(base != next_start) 65 | // f |= regex_constants::match_not_bob; 66 | bool result = regex_search(next_start, end, what, re, f, base); 67 | if(result) 68 | what.set_base(base); 69 | return result; 70 | } 71 | private: 72 | regex_iterator_implementation& operator=(const regex_iterator_implementation&); 73 | }; 74 | 75 | template ::value_type, 77 | class traits = regex_traits > 78 | class regex_iterator 79 | { 80 | private: 81 | typedef regex_iterator_implementation impl; 82 | typedef std::shared_ptr pimpl; 83 | public: 84 | typedef basic_regex regex_type; 85 | typedef match_results value_type; 86 | typedef typename std::iterator_traits::difference_type 87 | difference_type; 88 | typedef const value_type* pointer; 89 | typedef const value_type& reference; 90 | typedef std::forward_iterator_tag iterator_category; 91 | 92 | regex_iterator(){} 93 | regex_iterator(BidirectionalIterator a, BidirectionalIterator b, 94 | const regex_type& re, 95 | match_flag_type m = match_default) 96 | : pdata(new impl(&re, b, m)) 97 | { 98 | if(!pdata->init(a)) 99 | { 100 | pdata.reset(); 101 | } 102 | } 103 | regex_iterator(const regex_iterator& that) 104 | : pdata(that.pdata) {} 105 | regex_iterator& operator=(const regex_iterator& that) 106 | { 107 | pdata = that.pdata; 108 | return *this; 109 | } 110 | bool operator==(const regex_iterator& that)const 111 | { 112 | if((pdata.get() == 0) || (that.pdata.get() == 0)) 113 | return pdata.get() == that.pdata.get(); 114 | return pdata->compare(*(that.pdata.get())); 115 | } 116 | bool operator!=(const regex_iterator& that)const 117 | { return !(*this == that); } 118 | const value_type& operator*()const 119 | { return pdata->get(); } 120 | const value_type* operator->()const 121 | { return &(pdata->get()); } 122 | regex_iterator& operator++() 123 | { 124 | cow(); 125 | if(0 == pdata->next()) 126 | { 127 | pdata.reset(); 128 | } 129 | return *this; 130 | } 131 | regex_iterator operator++(int) 132 | { 133 | regex_iterator result(*this); 134 | ++(*this); 135 | return result; 136 | } 137 | private: 138 | 139 | pimpl pdata; 140 | 141 | void cow() 142 | { 143 | // copy-on-write 144 | if(pdata.get() && (pdata.use_count() > 1)) 145 | { 146 | pdata.reset(new impl(*(pdata.get()))); 147 | } 148 | } 149 | }; 150 | 151 | typedef regex_iterator cregex_iterator; 152 | typedef regex_iterator sregex_iterator; 153 | #ifndef BOOST_NO_WREGEX 154 | typedef regex_iterator wcregex_iterator; 155 | typedef regex_iterator wsregex_iterator; 156 | #endif 157 | 158 | // make_regex_iterator: 159 | template 160 | inline regex_iterator make_regex_iterator(const charT* p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 161 | { 162 | return regex_iterator(p, p+traits::length(p), e, m); 163 | } 164 | template 165 | inline regex_iterator::const_iterator, charT, traits> make_regex_iterator(const std::basic_string& p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 166 | { 167 | return regex_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, m); 168 | } 169 | 170 | } // namespace boost 171 | 172 | #endif // BOOST_REGEX_V5_REGEX_ITERATOR_HPP 173 | 174 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_match.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_match.hpp 15 | * VERSION see 16 | * DESCRIPTION: Regular expression matching algorithms. 17 | * Note this is an internal header file included 18 | * by regex.hpp, do not include on its own. 19 | */ 20 | 21 | 22 | #ifndef BOOST_REGEX_MATCH_HPP 23 | #define BOOST_REGEX_MATCH_HPP 24 | 25 | namespace boost{ 26 | 27 | // 28 | // proc regex_match 29 | // returns true if the specified regular expression matches 30 | // the whole of the input. Fills in what matched in m. 31 | // 32 | template 33 | bool regex_match(BidiIterator first, BidiIterator last, 34 | match_results& m, 35 | const basic_regex& e, 36 | match_flag_type flags = match_default) 37 | { 38 | BOOST_REGEX_DETAIL_NS::perl_matcher matcher(first, last, m, e, flags, first); 39 | return matcher.match(); 40 | } 41 | template 42 | bool regex_match(iterator first, iterator last, 43 | const basic_regex& e, 44 | match_flag_type flags = match_default) 45 | { 46 | match_results m; 47 | return regex_match(first, last, m, e, flags | regex_constants::match_any); 48 | } 49 | // 50 | // query_match convenience interfaces: 51 | // 52 | template 53 | inline bool regex_match(const charT* str, 54 | match_results& m, 55 | const basic_regex& e, 56 | match_flag_type flags = match_default) 57 | { 58 | return regex_match(str, str + traits::length(str), m, e, flags); 59 | } 60 | 61 | template 62 | inline bool regex_match(const std::basic_string& s, 63 | match_results::const_iterator, Allocator>& m, 64 | const basic_regex& e, 65 | match_flag_type flags = match_default) 66 | { 67 | return regex_match(s.begin(), s.end(), m, e, flags); 68 | } 69 | template 70 | inline bool regex_match(const charT* str, 71 | const basic_regex& e, 72 | match_flag_type flags = match_default) 73 | { 74 | match_results m; 75 | return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any); 76 | } 77 | 78 | template 79 | inline bool regex_match(const std::basic_string& s, 80 | const basic_regex& e, 81 | match_flag_type flags = match_default) 82 | { 83 | typedef typename std::basic_string::const_iterator iterator; 84 | match_results m; 85 | return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); 86 | } 87 | 88 | 89 | } // namespace boost 90 | 91 | #endif // BOOST_REGEX_MATCH_HPP 92 | 93 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_merge.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_format.hpp 15 | * VERSION see 16 | * DESCRIPTION: Provides formatting output routines for search and replace 17 | * operations. Note this is an internal header file included 18 | * by regex.hpp, do not include on its own. 19 | */ 20 | 21 | #ifndef BOOST_REGEX_V5_REGEX_MERGE_HPP 22 | #define BOOST_REGEX_V5_REGEX_MERGE_HPP 23 | 24 | 25 | namespace boost{ 26 | 27 | template 28 | inline OutputIterator regex_merge(OutputIterator out, 29 | Iterator first, 30 | Iterator last, 31 | const basic_regex& e, 32 | const charT* fmt, 33 | match_flag_type flags = match_default) 34 | { 35 | return regex_replace(out, first, last, e, fmt, flags); 36 | } 37 | 38 | template 39 | inline OutputIterator regex_merge(OutputIterator out, 40 | Iterator first, 41 | Iterator last, 42 | const basic_regex& e, 43 | const std::basic_string& fmt, 44 | match_flag_type flags = match_default) 45 | { 46 | return regex_merge(out, first, last, e, fmt.c_str(), flags); 47 | } 48 | 49 | template 50 | inline std::basic_string regex_merge(const std::basic_string& s, 51 | const basic_regex& e, 52 | const charT* fmt, 53 | match_flag_type flags = match_default) 54 | { 55 | return regex_replace(s, e, fmt, flags); 56 | } 57 | 58 | template 59 | inline std::basic_string regex_merge(const std::basic_string& s, 60 | const basic_regex& e, 61 | const std::basic_string& fmt, 62 | match_flag_type flags = match_default) 63 | { 64 | return regex_replace(s, e, fmt, flags); 65 | } 66 | 67 | } // namespace boost 68 | 69 | #endif // BOOST_REGEX_V5_REGEX_MERGE_HPP 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_raw_buffer.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_raw_buffer.hpp 15 | * VERSION see 16 | * DESCRIPTION: Raw character buffer for regex code. 17 | * Note this is an internal header file included 18 | * by regex.hpp, do not include on its own. 19 | */ 20 | 21 | #ifndef BOOST_REGEX_RAW_BUFFER_HPP 22 | #define BOOST_REGEX_RAW_BUFFER_HPP 23 | 24 | #ifndef BOOST_REGEX_CONFIG_HPP 25 | #include 26 | #endif 27 | 28 | #include 29 | #include 30 | 31 | namespace boost{ 32 | namespace BOOST_REGEX_DETAIL_NS{ 33 | 34 | struct empty_padding{}; 35 | 36 | union padding 37 | { 38 | void* p; 39 | unsigned int i; 40 | }; 41 | 42 | template 43 | struct padding3 44 | { 45 | enum{ 46 | padding_size = 8, 47 | padding_mask = 7 48 | }; 49 | }; 50 | 51 | template<> 52 | struct padding3<2> 53 | { 54 | enum{ 55 | padding_size = 2, 56 | padding_mask = 1 57 | }; 58 | }; 59 | 60 | template<> 61 | struct padding3<4> 62 | { 63 | enum{ 64 | padding_size = 4, 65 | padding_mask = 3 66 | }; 67 | }; 68 | 69 | template<> 70 | struct padding3<8> 71 | { 72 | enum{ 73 | padding_size = 8, 74 | padding_mask = 7 75 | }; 76 | }; 77 | 78 | template<> 79 | struct padding3<16> 80 | { 81 | enum{ 82 | padding_size = 16, 83 | padding_mask = 15 84 | }; 85 | }; 86 | 87 | enum{ 88 | padding_size = padding3::padding_size, 89 | padding_mask = padding3::padding_mask 90 | }; 91 | 92 | // 93 | // class raw_storage 94 | // basically this is a simplified vector 95 | // this is used by basic_regex for expression storage 96 | // 97 | 98 | class raw_storage 99 | { 100 | public: 101 | typedef std::size_t size_type; 102 | typedef unsigned char* pointer; 103 | private: 104 | pointer last, start, end; 105 | public: 106 | 107 | raw_storage(); 108 | raw_storage(size_type n); 109 | 110 | ~raw_storage() 111 | { 112 | ::operator delete(start); 113 | } 114 | 115 | void resize(size_type n) 116 | { 117 | size_type newsize = start ? last - start : 1024; 118 | while (newsize < n) 119 | newsize *= 2; 120 | size_type datasize = end - start; 121 | // extend newsize to WORD/DWORD boundary: 122 | newsize = (newsize + padding_mask) & ~(padding_mask); 123 | 124 | // allocate and copy data: 125 | pointer ptr = static_cast(::operator new(newsize)); 126 | BOOST_REGEX_NOEH_ASSERT(ptr) 127 | if (start) 128 | std::memcpy(ptr, start, datasize); 129 | 130 | // get rid of old buffer: 131 | ::operator delete(start); 132 | 133 | // and set up pointers: 134 | start = ptr; 135 | end = ptr + datasize; 136 | last = ptr + newsize; 137 | } 138 | 139 | void* extend(size_type n) 140 | { 141 | if(size_type(last - end) < n) 142 | resize(n + (end - start)); 143 | pointer result = end; 144 | end += n; 145 | return result; 146 | } 147 | 148 | void* insert(size_type pos, size_type n) 149 | { 150 | BOOST_REGEX_ASSERT(pos <= size_type(end - start)); 151 | if (size_type(last - end) < n) 152 | resize(n + (end - start)); 153 | void* result = start + pos; 154 | std::memmove(start + pos + n, start + pos, (end - start) - pos); 155 | end += n; 156 | return result; 157 | } 158 | 159 | size_type size() 160 | { 161 | return size_type(end - start); 162 | } 163 | 164 | size_type capacity() 165 | { 166 | return size_type(last - start); 167 | } 168 | 169 | void* data()const 170 | { 171 | return start; 172 | } 173 | 174 | size_type index(void* ptr) 175 | { 176 | return size_type(static_cast(ptr) - static_cast(data())); 177 | } 178 | 179 | void clear() 180 | { 181 | end = start; 182 | } 183 | 184 | void align() 185 | { 186 | // move end up to a boundary: 187 | end = start + (((end - start) + padding_mask) & ~padding_mask); 188 | } 189 | void swap(raw_storage& that) 190 | { 191 | std::swap(start, that.start); 192 | std::swap(end, that.end); 193 | std::swap(last, that.last); 194 | } 195 | }; 196 | 197 | inline raw_storage::raw_storage() 198 | { 199 | last = start = end = 0; 200 | } 201 | 202 | inline raw_storage::raw_storage(size_type n) 203 | { 204 | start = end = static_cast(::operator new(n)); 205 | BOOST_REGEX_NOEH_ASSERT(start) 206 | last = start + n; 207 | } 208 | 209 | } // namespace BOOST_REGEX_DETAIL_NS 210 | } // namespace boost 211 | 212 | #endif 213 | 214 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_replace.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2009 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_format.hpp 15 | * VERSION see 16 | * DESCRIPTION: Provides formatting output routines for search and replace 17 | * operations. Note this is an internal header file included 18 | * by regex.hpp, do not include on its own. 19 | */ 20 | 21 | #ifndef BOOST_REGEX_V5_REGEX_REPLACE_HPP 22 | #define BOOST_REGEX_V5_REGEX_REPLACE_HPP 23 | 24 | 25 | namespace boost{ 26 | 27 | template 28 | OutputIterator regex_replace(OutputIterator out, 29 | BidirectionalIterator first, 30 | BidirectionalIterator last, 31 | const basic_regex& e, 32 | Formatter fmt, 33 | match_flag_type flags = match_default) 34 | { 35 | regex_iterator i(first, last, e, flags); 36 | regex_iterator j; 37 | if(i == j) 38 | { 39 | if(!(flags & regex_constants::format_no_copy)) 40 | out = BOOST_REGEX_DETAIL_NS::copy(first, last, out); 41 | } 42 | else 43 | { 44 | BidirectionalIterator last_m(first); 45 | while(i != j) 46 | { 47 | if(!(flags & regex_constants::format_no_copy)) 48 | out = BOOST_REGEX_DETAIL_NS::copy(i->prefix().first, i->prefix().second, out); 49 | out = i->format(out, fmt, flags, e); 50 | last_m = (*i)[0].second; 51 | if(flags & regex_constants::format_first_only) 52 | break; 53 | ++i; 54 | } 55 | if(!(flags & regex_constants::format_no_copy)) 56 | out = BOOST_REGEX_DETAIL_NS::copy(last_m, last, out); 57 | } 58 | return out; 59 | } 60 | 61 | template 62 | std::basic_string regex_replace(const std::basic_string& s, 63 | const basic_regex& e, 64 | Formatter fmt, 65 | match_flag_type flags = match_default) 66 | { 67 | std::basic_string result; 68 | BOOST_REGEX_DETAIL_NS::string_out_iterator > i(result); 69 | regex_replace(i, s.begin(), s.end(), e, fmt, flags); 70 | return result; 71 | } 72 | 73 | } // namespace boost 74 | 75 | #endif // BOOST_REGEX_V5_REGEX_REPLACE_HPP 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_search.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_search.hpp 15 | * VERSION see 16 | * DESCRIPTION: Provides regex_search implementation. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_REGEX_SEARCH_HPP 20 | #define BOOST_REGEX_V5_REGEX_SEARCH_HPP 21 | 22 | 23 | namespace boost{ 24 | 25 | template 26 | bool regex_search(BidiIterator first, BidiIterator last, 27 | match_results& m, 28 | const basic_regex& e, 29 | match_flag_type flags = match_default) 30 | { 31 | return regex_search(first, last, m, e, flags, first); 32 | } 33 | 34 | template 35 | bool regex_search(BidiIterator first, BidiIterator last, 36 | match_results& m, 37 | const basic_regex& e, 38 | match_flag_type flags, 39 | BidiIterator base) 40 | { 41 | if(e.flags() & regex_constants::failbit) 42 | return false; 43 | 44 | BOOST_REGEX_DETAIL_NS::perl_matcher matcher(first, last, m, e, flags, base); 45 | return matcher.find(); 46 | } 47 | 48 | // 49 | // regex_search convenience interfaces: 50 | // 51 | template 52 | inline bool regex_search(const charT* str, 53 | match_results& m, 54 | const basic_regex& e, 55 | match_flag_type flags = match_default) 56 | { 57 | return regex_search(str, str + traits::length(str), m, e, flags); 58 | } 59 | 60 | template 61 | inline bool regex_search(const std::basic_string& s, 62 | match_results::const_iterator, Allocator>& m, 63 | const basic_regex& e, 64 | match_flag_type flags = match_default) 65 | { 66 | return regex_search(s.begin(), s.end(), m, e, flags); 67 | } 68 | 69 | template 70 | bool regex_search(BidiIterator first, BidiIterator last, 71 | const basic_regex& e, 72 | match_flag_type flags = match_default) 73 | { 74 | if(e.flags() & regex_constants::failbit) 75 | return false; 76 | 77 | match_results m; 78 | typedef typename match_results::allocator_type match_alloc_type; 79 | BOOST_REGEX_DETAIL_NS::perl_matcher matcher(first, last, m, e, flags | regex_constants::match_any, first); 80 | return matcher.find(); 81 | } 82 | 83 | template 84 | inline bool regex_search(const charT* str, 85 | const basic_regex& e, 86 | match_flag_type flags = match_default) 87 | { 88 | return regex_search(str, str + traits::length(str), e, flags); 89 | } 90 | 91 | template 92 | inline bool regex_search(const std::basic_string& s, 93 | const basic_regex& e, 94 | match_flag_type flags = match_default) 95 | { 96 | return regex_search(s.begin(), s.end(), e, flags); 97 | } 98 | 99 | } // namespace boost 100 | 101 | #endif // BOOST_REGEX_V5_REGEX_SEARCH_HPP 102 | 103 | 104 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_split.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_split.hpp 15 | * VERSION see 16 | * DESCRIPTION: Implements regex_split and associated functions. 17 | * Note this is an internal header file included 18 | * by regex.hpp, do not include on its own. 19 | */ 20 | 21 | #ifndef BOOST_REGEX_SPLIT_HPP 22 | #define BOOST_REGEX_SPLIT_HPP 23 | 24 | namespace boost{ 25 | 26 | #ifdef BOOST_REGEX_MSVC 27 | # pragma warning(push) 28 | #if BOOST_REGEX_MSVC < 1910 29 | #pragma warning(disable:4800) 30 | #endif 31 | #endif 32 | 33 | namespace BOOST_REGEX_DETAIL_NS{ 34 | 35 | template 36 | const basic_regex& get_default_expression(charT) 37 | { 38 | static const charT expression_text[4] = { '\\', 's', '+', '\00', }; 39 | static const basic_regex e(expression_text); 40 | return e; 41 | } 42 | 43 | template 44 | class split_pred 45 | { 46 | typedef std::basic_string string_type; 47 | typedef typename string_type::const_iterator iterator_type; 48 | iterator_type* p_last; 49 | OutputIterator* p_out; 50 | std::size_t* p_max; 51 | std::size_t initial_max; 52 | public: 53 | split_pred(iterator_type* a, OutputIterator* b, std::size_t* c) 54 | : p_last(a), p_out(b), p_max(c), initial_max(*c) {} 55 | 56 | bool operator()(const match_results& what); 57 | }; 58 | 59 | template 60 | bool split_pred::operator() 61 | (const match_results& what) 62 | { 63 | *p_last = what[0].second; 64 | if(what.size() > 1) 65 | { 66 | // output sub-expressions only: 67 | for(unsigned i = 1; i < what.size(); ++i) 68 | { 69 | *(*p_out) = what.str(i); 70 | ++(*p_out); 71 | if(0 == --*p_max) return false; 72 | } 73 | return *p_max != 0; 74 | } 75 | else 76 | { 77 | // output $` only if it's not-null or not at the start of the input: 78 | const sub_match& sub = what[-1]; 79 | if((sub.first != sub.second) || (*p_max != initial_max)) 80 | { 81 | *(*p_out) = sub.str(); 82 | ++(*p_out); 83 | return --*p_max; 84 | } 85 | } 86 | // 87 | // initial null, do nothing: 88 | return true; 89 | } 90 | 91 | } // namespace BOOST_REGEX_DETAIL_NS 92 | 93 | template 94 | std::size_t regex_split(OutputIterator out, 95 | std::basic_string& s, 96 | const basic_regex& e, 97 | match_flag_type flags, 98 | std::size_t max_split) 99 | { 100 | typedef typename std::basic_string::const_iterator ci_t; 101 | //typedef typename match_results::allocator_type match_allocator; 102 | ci_t last = s.begin(); 103 | std::size_t init_size = max_split; 104 | BOOST_REGEX_DETAIL_NS::split_pred pred(&last, &out, &max_split); 105 | ci_t i, j; 106 | i = s.begin(); 107 | j = s.end(); 108 | regex_grep(pred, i, j, e, flags); 109 | // 110 | // if there is still input left, do a final push as long as max_split 111 | // is not exhausted, and we're not splitting sub-expressions rather 112 | // than whitespace: 113 | if(max_split && (last != s.end()) && (e.mark_count() == 0)) 114 | { 115 | *out = std::basic_string((ci_t)last, (ci_t)s.end()); 116 | ++out; 117 | last = s.end(); 118 | --max_split; 119 | } 120 | // 121 | // delete from the string everything that has been processed so far: 122 | s.erase(0, last - s.begin()); 123 | // 124 | // return the number of new records pushed: 125 | return init_size - max_split; 126 | } 127 | 128 | template 129 | inline std::size_t regex_split(OutputIterator out, 130 | std::basic_string& s, 131 | const basic_regex& e, 132 | match_flag_type flags = match_default) 133 | { 134 | return regex_split(out, s, e, flags, UINT_MAX); 135 | } 136 | 137 | template 138 | inline std::size_t regex_split(OutputIterator out, 139 | std::basic_string& s) 140 | { 141 | return regex_split(out, s, BOOST_REGEX_DETAIL_NS::get_default_expression(charT(0)), match_default, UINT_MAX); 142 | } 143 | 144 | #ifdef BOOST_REGEX_MSVC 145 | # pragma warning(pop) 146 | #endif 147 | 148 | } // namespace boost 149 | 150 | #endif 151 | 152 | 153 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_traits.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2003 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_traits.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares regular expression traits classes. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED 20 | #define BOOST_REGEX_TRAITS_HPP_INCLUDED 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) 30 | # include 31 | #endif 32 | #include 33 | 34 | namespace boost{ 35 | 36 | template 37 | struct regex_traits : public implementationT 38 | { 39 | regex_traits() : implementationT() {} 40 | }; 41 | 42 | // 43 | // class regex_traits_wrapper. 44 | // this is what our implementation will actually store; 45 | // it provides default implementations of the "optional" 46 | // interfaces that we support, in addition to the 47 | // required "standard" ones: 48 | // 49 | namespace BOOST_REGEX_DETAIL_NS{ 50 | 51 | template 52 | struct has_boost_extensions_tag 53 | { 54 | template 55 | static double checker(U*, typename U::boost_extensions_tag* = nullptr); 56 | static char checker(...); 57 | static T* get(); 58 | 59 | static const bool value = sizeof(checker(get())) > 1; 60 | }; 61 | 62 | 63 | template 64 | struct default_wrapper : public BaseT 65 | { 66 | typedef typename BaseT::char_type char_type; 67 | std::string error_string(::boost::regex_constants::error_type e)const 68 | { 69 | return ::boost::BOOST_REGEX_DETAIL_NS::get_default_error_string(e); 70 | } 71 | ::boost::regex_constants::syntax_type syntax_type(char_type c)const 72 | { 73 | return (char_type(c & 0x7f) == c) ? get_default_syntax_type(static_cast(c)) : ::boost::regex_constants::syntax_char; 74 | } 75 | ::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c)const 76 | { 77 | return (char_type(c & 0x7f) == c) ? get_default_escape_syntax_type(static_cast(c)) : ::boost::regex_constants::escape_type_identity; 78 | } 79 | std::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const 80 | { 81 | return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this); 82 | } 83 | char_type translate(char_type c, bool icase)const 84 | { 85 | return (icase ? this->translate_nocase(c) : this->translate(c)); 86 | } 87 | char_type translate(char_type c)const 88 | { 89 | return BaseT::translate(c); 90 | } 91 | char_type tolower(char_type c)const 92 | { 93 | return ::boost::BOOST_REGEX_DETAIL_NS::global_lower(c); 94 | } 95 | char_type toupper(char_type c)const 96 | { 97 | return ::boost::BOOST_REGEX_DETAIL_NS::global_upper(c); 98 | } 99 | }; 100 | 101 | template 102 | struct compute_wrapper_base 103 | { 104 | typedef BaseT type; 105 | }; 106 | template 107 | struct compute_wrapper_base 108 | { 109 | typedef default_wrapper type; 110 | }; 111 | 112 | } // namespace BOOST_REGEX_DETAIL_NS 113 | 114 | template 115 | struct regex_traits_wrapper 116 | : public ::boost::BOOST_REGEX_DETAIL_NS::compute_wrapper_base< 117 | BaseT, 118 | ::boost::BOOST_REGEX_DETAIL_NS::has_boost_extensions_tag::value 119 | >::type 120 | { 121 | regex_traits_wrapper(){} 122 | private: 123 | regex_traits_wrapper(const regex_traits_wrapper&); 124 | regex_traits_wrapper& operator=(const regex_traits_wrapper&); 125 | }; 126 | 127 | } // namespace boost 128 | 129 | #endif // include 130 | 131 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/regex_workaround.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2005 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE regex_workarounds.cpp 15 | * VERSION see 16 | * DESCRIPTION: Declares Misc workarounds. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_WORKAROUND_HPP 20 | #define BOOST_REGEX_WORKAROUND_HPP 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #ifndef BOOST_REGEX_STANDALONE 28 | #include 29 | #include 30 | #endif 31 | 32 | #ifdef BOOST_REGEX_NO_BOOL 33 | # define BOOST_REGEX_MAKE_BOOL(x) static_cast((x) ? true : false) 34 | #else 35 | # define BOOST_REGEX_MAKE_BOOL(x) static_cast(x) 36 | #endif 37 | 38 | /***************************************************************************** 39 | * 40 | * helper functions pointer_construct/pointer_destroy: 41 | * 42 | ****************************************************************************/ 43 | 44 | #ifdef __cplusplus 45 | namespace boost{ namespace BOOST_REGEX_DETAIL_NS{ 46 | 47 | #ifdef BOOST_REGEX_MSVC 48 | #pragma warning (push) 49 | #pragma warning (disable : 4100) 50 | #endif 51 | 52 | template 53 | inline void pointer_destroy(T* p) 54 | { p->~T(); (void)p; } 55 | 56 | #ifdef BOOST_REGEX_MSVC 57 | #pragma warning (pop) 58 | #endif 59 | 60 | template 61 | inline void pointer_construct(T* p, const T& t) 62 | { new (p) T(t); } 63 | 64 | }} // namespaces 65 | #endif 66 | 67 | /***************************************************************************** 68 | * 69 | * helper function copy: 70 | * 71 | ****************************************************************************/ 72 | 73 | #if defined(BOOST_WORKAROUND) 74 | #if BOOST_WORKAROUND(BOOST_REGEX_MSVC, >= 1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ 75 | #define BOOST_REGEX_HAS_STRCPY_S 76 | #endif 77 | #endif 78 | 79 | #ifdef __cplusplus 80 | namespace boost{ namespace BOOST_REGEX_DETAIL_NS{ 81 | 82 | #if defined(BOOST_REGEX_MSVC) && (BOOST_REGEX_MSVC < 1910) 83 | // 84 | // MSVC 10 will either emit warnings or else refuse to compile 85 | // code that makes perfectly legitimate use of std::copy, when 86 | // the OutputIterator type is a user-defined class (apparently all user 87 | // defined iterators are "unsafe"). What's more Microsoft have removed their 88 | // non-standard "unchecked" versions, even though they are still in the MS 89 | // documentation!! Work around this as best we can: 90 | // 91 | template 92 | inline OutputIterator copy( 93 | InputIterator first, 94 | InputIterator last, 95 | OutputIterator dest 96 | ) 97 | { 98 | while (first != last) 99 | *dest++ = *first++; 100 | return dest; 101 | } 102 | #else 103 | using std::copy; 104 | #endif 105 | 106 | 107 | #if defined(BOOST_REGEX_HAS_STRCPY_S) 108 | 109 | // use safe versions of strcpy etc: 110 | using ::strcpy_s; 111 | using ::strcat_s; 112 | #else 113 | inline std::size_t strcpy_s( 114 | char *strDestination, 115 | std::size_t sizeInBytes, 116 | const char *strSource 117 | ) 118 | { 119 | std::size_t lenSourceWithNull = std::strlen(strSource) + 1; 120 | if (lenSourceWithNull > sizeInBytes) 121 | return 1; 122 | std::memcpy(strDestination, strSource, lenSourceWithNull); 123 | return 0; 124 | } 125 | inline std::size_t strcat_s( 126 | char *strDestination, 127 | std::size_t sizeInBytes, 128 | const char *strSource 129 | ) 130 | { 131 | std::size_t lenSourceWithNull = std::strlen(strSource) + 1; 132 | std::size_t lenDestination = std::strlen(strDestination); 133 | if (lenSourceWithNull + lenDestination > sizeInBytes) 134 | return 1; 135 | std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull); 136 | return 0; 137 | } 138 | 139 | #endif 140 | 141 | inline void overflow_error_if_not_zero(std::size_t i) 142 | { 143 | if(i) 144 | { 145 | std::overflow_error e("String buffer too small"); 146 | #ifndef BOOST_REGEX_STANDALONE 147 | boost::throw_exception(e); 148 | #else 149 | throw e; 150 | #endif 151 | } 152 | } 153 | 154 | }} // namespaces 155 | 156 | #endif // __cplusplus 157 | 158 | #endif // include guard 159 | 160 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/syntax_type.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2003 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE syntax_type.hpp 15 | * VERSION see 16 | * DESCRIPTION: Declares regular expression synatx type enumerator. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_SYNTAX_TYPE_HPP 20 | #define BOOST_REGEX_SYNTAX_TYPE_HPP 21 | 22 | namespace boost{ 23 | namespace regex_constants{ 24 | 25 | typedef unsigned char syntax_type; 26 | 27 | // 28 | // values chosen are binary compatible with previous version: 29 | // 30 | static const syntax_type syntax_char = 0; 31 | static const syntax_type syntax_open_mark = 1; 32 | static const syntax_type syntax_close_mark = 2; 33 | static const syntax_type syntax_dollar = 3; 34 | static const syntax_type syntax_caret = 4; 35 | static const syntax_type syntax_dot = 5; 36 | static const syntax_type syntax_star = 6; 37 | static const syntax_type syntax_plus = 7; 38 | static const syntax_type syntax_question = 8; 39 | static const syntax_type syntax_open_set = 9; 40 | static const syntax_type syntax_close_set = 10; 41 | static const syntax_type syntax_or = 11; 42 | static const syntax_type syntax_escape = 12; 43 | static const syntax_type syntax_dash = 14; 44 | static const syntax_type syntax_open_brace = 15; 45 | static const syntax_type syntax_close_brace = 16; 46 | static const syntax_type syntax_digit = 17; 47 | static const syntax_type syntax_comma = 27; 48 | static const syntax_type syntax_equal = 37; 49 | static const syntax_type syntax_colon = 36; 50 | static const syntax_type syntax_not = 53; 51 | 52 | // extensions: 53 | 54 | static const syntax_type syntax_hash = 13; 55 | static const syntax_type syntax_newline = 26; 56 | 57 | // escapes: 58 | 59 | typedef syntax_type escape_syntax_type; 60 | 61 | static const escape_syntax_type escape_type_word_assert = 18; 62 | static const escape_syntax_type escape_type_not_word_assert = 19; 63 | static const escape_syntax_type escape_type_control_f = 29; 64 | static const escape_syntax_type escape_type_control_n = 30; 65 | static const escape_syntax_type escape_type_control_r = 31; 66 | static const escape_syntax_type escape_type_control_t = 32; 67 | static const escape_syntax_type escape_type_control_v = 33; 68 | static const escape_syntax_type escape_type_ascii_control = 35; 69 | static const escape_syntax_type escape_type_hex = 34; 70 | static const escape_syntax_type escape_type_unicode = 0; // not used 71 | static const escape_syntax_type escape_type_identity = 0; // not used 72 | static const escape_syntax_type escape_type_backref = syntax_digit; 73 | static const escape_syntax_type escape_type_decimal = syntax_digit; // not used 74 | static const escape_syntax_type escape_type_class = 22; 75 | static const escape_syntax_type escape_type_not_class = 23; 76 | 77 | // extensions: 78 | 79 | static const escape_syntax_type escape_type_left_word = 20; 80 | static const escape_syntax_type escape_type_right_word = 21; 81 | static const escape_syntax_type escape_type_start_buffer = 24; // for \` 82 | static const escape_syntax_type escape_type_end_buffer = 25; // for \' 83 | static const escape_syntax_type escape_type_control_a = 28; // for \a 84 | static const escape_syntax_type escape_type_e = 38; // for \e 85 | static const escape_syntax_type escape_type_E = 47; // for \Q\E 86 | static const escape_syntax_type escape_type_Q = 48; // for \Q\E 87 | static const escape_syntax_type escape_type_X = 49; // for \X 88 | static const escape_syntax_type escape_type_C = 50; // for \C 89 | static const escape_syntax_type escape_type_Z = 51; // for \Z 90 | static const escape_syntax_type escape_type_G = 52; // for \G 91 | 92 | static const escape_syntax_type escape_type_property = 54; // for \p 93 | static const escape_syntax_type escape_type_not_property = 55; // for \P 94 | static const escape_syntax_type escape_type_named_char = 56; // for \N 95 | static const escape_syntax_type escape_type_extended_backref = 57; // for \g 96 | static const escape_syntax_type escape_type_reset_start_mark = 58; // for \K 97 | static const escape_syntax_type escape_type_line_ending = 59; // for \R 98 | 99 | static const escape_syntax_type syntax_max = 60; 100 | 101 | } 102 | } 103 | 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /src/Boost/boost/regex/v5/u32regex_iterator.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2003 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org for most recent version. 14 | * FILE u32regex_iterator.hpp 15 | * VERSION see 16 | * DESCRIPTION: Provides u32regex_iterator implementation. 17 | */ 18 | 19 | #ifndef BOOST_REGEX_V5_U32REGEX_ITERATOR_HPP 20 | #define BOOST_REGEX_V5_U32REGEX_ITERATOR_HPP 21 | 22 | namespace boost{ 23 | 24 | template 25 | class u32regex_iterator_implementation 26 | { 27 | typedef u32regex regex_type; 28 | 29 | match_results what; // current match 30 | BidirectionalIterator base; // start of sequence 31 | BidirectionalIterator end; // end of sequence 32 | const regex_type re; // the expression 33 | match_flag_type flags; // flags for matching 34 | 35 | public: 36 | u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) 37 | : base(), end(last), re(*p), flags(f){} 38 | bool init(BidirectionalIterator first) 39 | { 40 | base = first; 41 | return u32regex_search(first, end, what, re, flags, base); 42 | } 43 | bool compare(const u32regex_iterator_implementation& that) 44 | { 45 | if(this == &that) return true; 46 | return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); 47 | } 48 | const match_results& get() 49 | { return what; } 50 | bool next() 51 | { 52 | //if(what.prefix().first != what[0].second) 53 | // flags |= match_prev_avail; 54 | BidirectionalIterator next_start = what[0].second; 55 | match_flag_type f(flags); 56 | if(!what.length()) 57 | f |= regex_constants::match_not_initial_null; 58 | //if(base != next_start) 59 | // f |= regex_constants::match_not_bob; 60 | bool result = u32regex_search(next_start, end, what, re, f, base); 61 | if(result) 62 | what.set_base(base); 63 | return result; 64 | } 65 | private: 66 | u32regex_iterator_implementation& operator=(const u32regex_iterator_implementation&); 67 | }; 68 | 69 | template 70 | class u32regex_iterator 71 | { 72 | private: 73 | typedef u32regex_iterator_implementation impl; 74 | typedef std::shared_ptr pimpl; 75 | public: 76 | typedef u32regex regex_type; 77 | typedef match_results value_type; 78 | typedef typename std::iterator_traits::difference_type 79 | difference_type; 80 | typedef const value_type* pointer; 81 | typedef const value_type& reference; 82 | typedef std::forward_iterator_tag iterator_category; 83 | 84 | u32regex_iterator(){} 85 | u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, 86 | const regex_type& re, 87 | match_flag_type m = match_default) 88 | : pdata(new impl(&re, b, m)) 89 | { 90 | if(!pdata->init(a)) 91 | { 92 | pdata.reset(); 93 | } 94 | } 95 | u32regex_iterator(const u32regex_iterator& that) 96 | : pdata(that.pdata) {} 97 | u32regex_iterator& operator=(const u32regex_iterator& that) 98 | { 99 | pdata = that.pdata; 100 | return *this; 101 | } 102 | bool operator==(const u32regex_iterator& that)const 103 | { 104 | if((pdata.get() == 0) || (that.pdata.get() == 0)) 105 | return pdata.get() == that.pdata.get(); 106 | return pdata->compare(*(that.pdata.get())); 107 | } 108 | bool operator!=(const u32regex_iterator& that)const 109 | { return !(*this == that); } 110 | const value_type& operator*()const 111 | { return pdata->get(); } 112 | const value_type* operator->()const 113 | { return &(pdata->get()); } 114 | u32regex_iterator& operator++() 115 | { 116 | cow(); 117 | if(0 == pdata->next()) 118 | { 119 | pdata.reset(); 120 | } 121 | return *this; 122 | } 123 | u32regex_iterator operator++(int) 124 | { 125 | u32regex_iterator result(*this); 126 | ++(*this); 127 | return result; 128 | } 129 | private: 130 | 131 | pimpl pdata; 132 | 133 | void cow() 134 | { 135 | // copy-on-write 136 | if(pdata.get() && (pdata.use_count() > 1)) 137 | { 138 | pdata.reset(new impl(*(pdata.get()))); 139 | } 140 | } 141 | }; 142 | 143 | typedef u32regex_iterator utf8regex_iterator; 144 | typedef u32regex_iterator utf16regex_iterator; 145 | typedef u32regex_iterator utf32regex_iterator; 146 | 147 | inline u32regex_iterator make_u32regex_iterator(const char* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 148 | { 149 | return u32regex_iterator(p, p+std::strlen(p), e, m); 150 | } 151 | #ifndef BOOST_NO_WREGEX 152 | inline u32regex_iterator make_u32regex_iterator(const wchar_t* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 153 | { 154 | return u32regex_iterator(p, p+std::wcslen(p), e, m); 155 | } 156 | #endif 157 | #if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T) 158 | inline u32regex_iterator make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 159 | { 160 | return u32regex_iterator(p, p+u_strlen(p), e, m); 161 | } 162 | #endif 163 | template 164 | inline u32regex_iterator::const_iterator> make_u32regex_iterator(const std::basic_string& p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 165 | { 166 | typedef typename std::basic_string::const_iterator iter_type; 167 | return u32regex_iterator(p.begin(), p.end(), e, m); 168 | } 169 | inline u32regex_iterator make_u32regex_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 170 | { 171 | return u32regex_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, m); 172 | } 173 | 174 | } // namespace boost 175 | 176 | #endif // BOOST_REGEX_V5_REGEX_ITERATOR_HPP 177 | 178 | -------------------------------------------------------------------------------- /src/Boost/boost/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 1998-2002 4 | * John Maddock 5 | * 6 | * Use, modification and distribution are subject to the 7 | * Boost Software License, Version 1.0. (See accompanying file 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | */ 11 | 12 | /* 13 | * LOCATION: see http://www.boost.org/libs/regex for documentation. 14 | * FILE regex_fwd.cpp 15 | * VERSION see 16 | * DESCRIPTION: Forward declares boost::basic_regex<> and 17 | * associated typedefs. 18 | */ 19 | 20 | #ifndef BOOST_REGEX_FWD_HPP 21 | #define BOOST_REGEX_FWD_HPP 22 | 23 | #ifndef BOOST_REGEX_CONFIG_HPP 24 | #include 25 | #endif 26 | 27 | #ifdef BOOST_REGEX_CXX03 28 | #include 29 | #else 30 | #include 31 | #endif 32 | 33 | #endif 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/Boost/regex-boost-1.86.0.txt: -------------------------------------------------------------------------------- 1 | Source: 2 | https://github.com/boostorg/regex/releases/tag/boost-1.86.0 3 | 4 | using contents of include folder include, removed boost\regex\v4\ 5 | 6 | Documentation: 7 | https://www.boost.org/doc/libs/1_86_0/libs/regex/doc/html/index.html 8 | -------------------------------------------------------------------------------- /src/ColumnsPlusPlus.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coises/ColumnsPlusPlus/d8e2c8bcd9b753852f80422fabae6890e5418003/src/ColumnsPlusPlus.rc -------------------------------------------------------------------------------- /src/Host/BoostRegexSearch.h: -------------------------------------------------------------------------------- 1 | #ifndef BOOSTREGEXSEARCH_H 2 | #define BOOSTREGEXSEARCH_H 3 | 4 | #define SCFIND_REGEXP_DOTMATCHESNL 0x10000000 5 | #define SCFIND_REGEXP_EMPTYMATCH_MASK 0xE0000000 6 | #define SCFIND_REGEXP_EMPTYMATCH_NONE 0x00000000 7 | #define SCFIND_REGEXP_EMPTYMATCH_NOTAFTERMATCH 0x20000000 8 | #define SCFIND_REGEXP_EMPTYMATCH_ALL 0x40000000 9 | #define SCFIND_REGEXP_EMPTYMATCH_ALLOWATSTART 0x80000000 10 | #define SCFIND_REGEXP_SKIPCRLFASONE 0x08000000 11 | 12 | #ifdef SCI_OWNREGEX 13 | extern std::string g_exceptionMessage; 14 | #endif 15 | 16 | #endif -------------------------------------------------------------------------------- /src/Host/PluginInterface.h: -------------------------------------------------------------------------------- 1 | // This file is part of Notepad++ project 2 | // Copyright (C)2024 Don HO 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // at your option any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | 18 | 19 | // For more comprehensive information on plugin communication, please refer to the following resource: 20 | // https://npp-user-manual.org/docs/plugin-communication/ 21 | 22 | #pragma once 23 | 24 | #include "Scintilla.h" 25 | #include "Notepad_plus_msgs.h" 26 | 27 | 28 | typedef const wchar_t * (__cdecl * PFUNCGETNAME)(); 29 | 30 | struct NppData 31 | { 32 | HWND _nppHandle = nullptr; 33 | HWND _scintillaMainHandle = nullptr; 34 | HWND _scintillaSecondHandle = nullptr; 35 | }; 36 | 37 | typedef void (__cdecl * PFUNCSETINFO)(NppData); 38 | typedef void (__cdecl * PFUNCPLUGINCMD)(); 39 | typedef void (__cdecl * PBENOTIFIED)(SCNotification *); 40 | typedef LRESULT (__cdecl * PMESSAGEPROC)(UINT Message, WPARAM wParam, LPARAM lParam); 41 | 42 | 43 | struct ShortcutKey 44 | { 45 | bool _isCtrl = false; 46 | bool _isAlt = false; 47 | bool _isShift = false; 48 | UCHAR _key = 0; 49 | }; 50 | 51 | const int menuItemSize = 64; 52 | 53 | struct FuncItem 54 | { 55 | wchar_t _itemName[menuItemSize] = { '\0' }; 56 | PFUNCPLUGINCMD _pFunc = nullptr; 57 | int _cmdID = 0; 58 | bool _init2Check = false; 59 | ShortcutKey *_pShKey = nullptr; 60 | }; 61 | 62 | typedef FuncItem * (__cdecl * PFUNCGETFUNCSARRAY)(int *); 63 | 64 | // You should implement (or define an empty function body) those functions which are called by Notepad++ plugin manager 65 | extern "C" __declspec(dllexport) void setInfo(NppData); 66 | extern "C" __declspec(dllexport) const wchar_t * getName(); 67 | extern "C" __declspec(dllexport) FuncItem * getFuncsArray(int *); 68 | extern "C" __declspec(dllexport) void beNotified(SCNotification *); 69 | extern "C" __declspec(dllexport) LRESULT messageProc(UINT Message, WPARAM wParam, LPARAM lParam); 70 | 71 | // This API return always true now, since Notepad++ isn't compiled in ANSI mode anymore 72 | extern "C" __declspec(dllexport) BOOL isUnicode(); 73 | 74 | -------------------------------------------------------------------------------- /src/Host/Sci_Position.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Sci_Position.h 3 | ** Define the Sci_Position type used in Scintilla's external interfaces. 4 | ** These need to be available to clients written in C so are not in a C++ namespace. 5 | **/ 6 | // Copyright 2015 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef SCI_POSITION_H 10 | #define SCI_POSITION_H 11 | 12 | #include 13 | 14 | // Basic signed type used throughout interface 15 | typedef ptrdiff_t Sci_Position; 16 | 17 | // Unsigned variant used for ILexer::Lex and ILexer::Fold 18 | typedef size_t Sci_PositionU; 19 | 20 | // For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE 21 | typedef intptr_t Sci_PositionCR; 22 | 23 | #ifdef _WIN32 24 | #define SCI_METHOD __stdcall 25 | #else 26 | #define SCI_METHOD 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/Host/ScintillaCall.h: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2023 by Randall Joseph Fellmy , 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // at your option any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #ifndef SCINTILLACALL_H 18 | 19 | #define Failure __unused__Failure 20 | 21 | #include "original/ScintillaCall.h" 22 | 23 | #undef Failure 24 | 25 | #include 26 | 27 | namespace Scintilla { 28 | 29 | struct Failure : std::exception { 30 | Scintilla::Status status; 31 | explicit Failure(Scintilla::Status status) noexcept : status(status) {} 32 | virtual const char* what() const noexcept override { 33 | static char text[37] = "Scintilla error; status code "; 34 | static auto tcr = std::to_chars(text + 29, text + 36, static_cast(status)); 35 | if (tcr.ec == std::errc()) *tcr.ptr = 0; 36 | else strcpy(text + 29, "unknown"); 37 | return text; 38 | } 39 | }; 40 | 41 | } 42 | 43 | #endif -------------------------------------------------------------------------------- /src/Host/ScintillaStructures.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file ScintillaStructures.h 3 | ** Structures used to communicate with Scintilla. 4 | ** The same structures are defined for C in Scintilla.h. 5 | ** Uses definitions from ScintillaTypes.h. 6 | **/ 7 | // Copyright 2021 by Neil Hodgson 8 | // The License.txt file describes the conditions under which this software may be distributed. 9 | 10 | #ifndef SCINTILLASTRUCTURES_H 11 | #define SCINTILLASTRUCTURES_H 12 | 13 | namespace Scintilla { 14 | 15 | using PositionCR = intptr_t; 16 | 17 | struct CharacterRange { 18 | PositionCR cpMin; 19 | PositionCR cpMax; 20 | }; 21 | 22 | struct CharacterRangeFull { 23 | Position cpMin; 24 | Position cpMax; 25 | }; 26 | 27 | struct TextRange { 28 | CharacterRange chrg; 29 | char *lpstrText; 30 | }; 31 | 32 | struct TextRangeFull { 33 | CharacterRangeFull chrg; 34 | char *lpstrText; 35 | }; 36 | 37 | struct TextToFind { 38 | CharacterRange chrg; 39 | const char *lpstrText; 40 | CharacterRange chrgText; 41 | }; 42 | 43 | struct TextToFindFull { 44 | CharacterRangeFull chrg; 45 | const char *lpstrText; 46 | CharacterRangeFull chrgText; 47 | }; 48 | 49 | using SurfaceID = void *; 50 | 51 | struct Rectangle { 52 | int left; 53 | int top; 54 | int right; 55 | int bottom; 56 | }; 57 | 58 | /* This structure is used in printing. Not needed by most client code. */ 59 | 60 | struct RangeToFormat { 61 | SurfaceID hdc; 62 | SurfaceID hdcTarget; 63 | Rectangle rc; 64 | Rectangle rcPage; 65 | CharacterRange chrg; 66 | }; 67 | 68 | struct RangeToFormatFull { 69 | SurfaceID hdc; 70 | SurfaceID hdcTarget; 71 | Rectangle rc; 72 | Rectangle rcPage; 73 | CharacterRangeFull chrg; 74 | }; 75 | 76 | struct NotifyHeader { 77 | /* Compatible with Windows NMHDR. 78 | * hwndFrom is really an environment specific window handle or pointer 79 | * but most clients of Scintilla.h do not have this type visible. */ 80 | void *hwndFrom; 81 | uptr_t idFrom; 82 | Notification code; 83 | }; 84 | 85 | enum class Message; // Declare in case ScintillaMessages.h not included 86 | 87 | struct NotificationData { 88 | NotifyHeader nmhdr; 89 | Position position; 90 | /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */ 91 | /* SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, */ 92 | /* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */ 93 | /* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */ 94 | /* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ 95 | 96 | int ch; 97 | /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */ 98 | /* SCN_USERLISTSELECTION */ 99 | KeyMod modifiers; 100 | /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */ 101 | /* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */ 102 | 103 | ModificationFlags modificationType; /* SCN_MODIFIED */ 104 | const char *text; 105 | /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */ 106 | 107 | Position length; /* SCN_MODIFIED */ 108 | Position linesAdded; /* SCN_MODIFIED */ 109 | Message message; /* SCN_MACRORECORD */ 110 | uptr_t wParam; /* SCN_MACRORECORD */ 111 | sptr_t lParam; /* SCN_MACRORECORD */ 112 | Position line; /* SCN_MODIFIED */ 113 | FoldLevel foldLevelNow; /* SCN_MODIFIED */ 114 | FoldLevel foldLevelPrev; /* SCN_MODIFIED */ 115 | int margin; /* SCN_MARGINCLICK */ 116 | int listType; /* SCN_USERLISTSELECTION */ 117 | int x; /* SCN_DWELLSTART, SCN_DWELLEND */ 118 | int y; /* SCN_DWELLSTART, SCN_DWELLEND */ 119 | int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ 120 | Position annotationLinesAdded; /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */ 121 | Update updated; /* SCN_UPDATEUI */ 122 | CompletionMethods listCompletionMethod; 123 | /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */ 124 | CharacterSource characterSource; /* SCN_CHARADDED */ 125 | }; 126 | 127 | } 128 | 129 | #endif 130 | -------------------------------------------------------------------------------- /src/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | version.lib;%(AdditionalDependencies) 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/RegularExpression.h: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2023, 2025 by Randall Joseph Fellmy , 3 | 4 | // The Columns++ source code contained in this file is independent of Notepad++ code. 5 | // It is released under the MIT (Expat) license: 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 8 | // associated documentation files (the "Software"), to deal in the Software without restriction, 9 | // including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | // and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all copies or substantial 14 | // portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 17 | // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | #pragma once 23 | 24 | class WindowsScintillaCommon; 25 | 26 | class RegularExpressionInterface { 27 | public: 28 | virtual ~RegularExpressionInterface() {} 29 | virtual bool can_search( ) const = 0; 30 | virtual std::wstring find (const std::wstring& s, bool caseSensitive = false) = 0; 31 | virtual std::string format (const std::string& replacement ) const = 0; 32 | virtual void invalidate( ) = 0; 33 | virtual intptr_t length (int n = 0 ) const = 0; 34 | virtual size_t mark_count( ) const = 0; 35 | virtual intptr_t position (int n = 0 ) const = 0; 36 | virtual bool search (std::string_view s, size_t from = 0 ) = 0; 37 | virtual bool search (intptr_t from, intptr_t to, intptr_t start ) = 0; 38 | virtual size_t size ( ) const = 0; 39 | virtual std::string str (int n = 0 ) const = 0; 40 | virtual std::string str (std::string_view n ) const = 0; 41 | }; 42 | 43 | class RegularExpression { 44 | RegularExpressionInterface* rex = 0; 45 | public: 46 | RegularExpression(Scintilla::ScintillaCall& sci); 47 | ~RegularExpression() { if (rex) delete rex; } 48 | bool can_search( ) const {return rex->can_search( );} 49 | std::wstring find (const std::wstring& s, bool caseSensitive = false) {return rex->find (s, caseSensitive);} 50 | std::string format (const std::string& replacement ) const {return rex->format (replacement );} 51 | void invalidate( ) { rex->invalidate( );} 52 | intptr_t length (int n = 0 ) const {return rex->length (n );} 53 | size_t mark_count( ) const {return rex->mark_count( );} 54 | intptr_t position (int n = 0 ) const {return rex->position (n );} 55 | bool search (std::string_view s, size_t from = 0 ) {return rex->search (s, from );} 56 | bool search (intptr_t from, intptr_t to, intptr_t start ) {return rex->search (from, to, start );} 57 | size_t size ( ) const {return rex->size ( );} 58 | std::string str (int n = 0 ) const {return rex->str (n );} 59 | std::string str (std::string_view n ) const {return rex->str (n );} 60 | }; 61 | -------------------------------------------------------------------------------- /src/Search.h: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2023 by Randall Joseph Fellmy , 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // at your option any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #pragma warning (push) 18 | #pragma warning (disable: 4702) 19 | #define exprtk_disable_rtl_io 20 | #define exprtk_disable_rtl_io_file 21 | #define exprtk_disable_rtl_vecops 22 | #include "exprtk/exprtk.hpp" 23 | #pragma warning (pop) 24 | 25 | class RegexCalcHistory { 26 | public: 27 | std::vector> values; // Values of regex capture groups for each match 28 | std::vector> results; // Results of each expression for each match 29 | std::vector lastFiniteResult; // Last finite result of each expression 30 | size_t expressionIndex; // index of expression currently being processed 31 | }; 32 | 33 | // The following struct definitions implement functions that can be registered with ExprTk 34 | 35 | struct RCReg : public exprtk::ivararg_function { 36 | RegexCalcHistory& history; 37 | RCReg(RegexCalcHistory& history) : history(history) {} 38 | double operator()(const std::vector& arglist) { 39 | size_t capture = arglist.size() > 0 ? static_cast(arglist[0]) : 0; 40 | size_t previous = arglist.size() > 1 ? static_cast(arglist[1]) : 0; 41 | double n = std::numeric_limits::quiet_NaN(); 42 | if (previous >= 0 && capture >= 0 && previous < history.values.size() && capture < history.values[previous].size()) 43 | n = history.values[history.values.size() - previous - 1][capture]; 44 | if (arglist.size() > 2 && !std::isfinite(n)) n = arglist[2]; 45 | return n; 46 | } 47 | }; 48 | 49 | struct RCSub : public exprtk::ivararg_function { 50 | RegexCalcHistory& history; 51 | RCSub(RegexCalcHistory& history) : history(history) {} 52 | double operator()(const std::vector& arglist) { 53 | size_t substitution = arglist.size() > 0 ? static_cast(arglist[0]) : 0; 54 | size_t previous = arglist.size() > 1 ? static_cast(arglist[1]) : 0; 55 | double n = std::numeric_limits::quiet_NaN(); 56 | if (previous >= 0 && substitution >= 0 && previous < history.results.size() && substitution <= history.results[previous].size()) { 57 | if (substitution == 0) substitution = history.expressionIndex + 1; 58 | if (arglist.size() < 2) 59 | n = history.lastFiniteResult[substitution - 1]; 60 | else if (previous > 0 || substitution <= history.expressionIndex) 61 | n = history.results[history.results.size() - previous - 1][substitution - 1]; 62 | } 63 | if (arglist.size() > 2 && !std::isfinite(n)) n = arglist[2]; 64 | return n; 65 | } 66 | }; 67 | 68 | struct RCLast : public exprtk::ivararg_function { 69 | RegexCalcHistory& history; 70 | RCLast(RegexCalcHistory& history) : history(history) {exprtk::enable_zero_parameters(*this);} 71 | double operator()(const std::vector& arglist) { 72 | if (!arglist.size()) return history.lastFiniteResult[history.expressionIndex]; 73 | double n = std::numeric_limits::quiet_NaN(); 74 | size_t previous = static_cast(arglist[0]); 75 | if (previous > 0 && previous < history.results.size()) 76 | n = history.results[history.results.size() - previous - 1][history.expressionIndex]; 77 | if (arglist.size() > 1 && !std::isfinite(n)) n = arglist[1]; 78 | return n; 79 | } 80 | }; 81 | -------------------------------------------------------------------------------- /src/Selection.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2024 by Randall Joseph Fellmy , 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // at your option any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "ColumnsPlusPlus.h" 18 | 19 | namespace { 20 | 21 | struct SelectionInformation { 22 | ColumnsPlusPlusData& data; 23 | DocumentData* const ddp; 24 | const int blank1440; 25 | const int count; 26 | const Scintilla::SelectionMode mode; 27 | Scintilla::Line top, bottom; 28 | int left, right; 29 | 30 | int blankCount(intptr_t n) const { return static_cast(n >= 0 ? (n * 2880 + blank1440) / (2 * blank1440) : (n * 2880 - blank1440) / (2 * blank1440)); } 31 | int blankWidth(intptr_t n) const { return static_cast(n >= 0 ? (n * blank1440 + 720) / 1440 : (n * blank1440 - 720) / 1440); } 32 | 33 | SelectionInformation(ColumnsPlusPlusData& data) : data(data), 34 | blank1440(data.sci.TextWidth(STYLE_DEFAULT, std::string(1440, ' ').data())), 35 | ddp(data.settings.elasticEnabled ? data.getDocument() : 0), 36 | count(data.sci.Selections()), mode (data.sci.SelectionMode()) { 37 | if (mode == Scintilla::SelectionMode::Thin || mode == Scintilla::SelectionMode::Rectangle) { 38 | Scintilla::Position anchor = data.sci.SelectionNAnchor(0); 39 | Scintilla::Position anchorVs = data.sci.SelectionNAnchorVirtualSpace(0); 40 | Scintilla::Position caret = data.sci.SelectionNCaret(count - 1); 41 | Scintilla::Position caretVs = data.sci.SelectionNCaretVirtualSpace(count - 1); 42 | Scintilla::Line lna = data.sci.LineFromPosition(anchor); 43 | Scintilla::Line lnc = data.sci.LineFromPosition(caret); 44 | int pxa = data.sci.PointXFromPosition(anchor) + blankWidth(anchorVs); 45 | int pxc = data.sci.PointXFromPosition(caret ) + blankWidth(caretVs ); 46 | top = std::min(lna, lnc); 47 | bottom = std::max(lna, lnc); 48 | left = std::min(pxa, pxc); 49 | right = std::max(pxa, pxc); 50 | } 51 | else { 52 | top = std::numeric_limits::max(); 53 | bottom = 0; 54 | left = std::numeric_limits::max(); 55 | right = std::numeric_limits::min(); 56 | for (int i = 0; i < count; ++i) { 57 | Scintilla::Position p = data.sci.SelectionNStart(i); 58 | Scintilla::Position q = data.sci.SelectionNEnd(i); 59 | Scintilla::Line pLine = data.sci.LineFromPosition(p); 60 | Scintilla::Line qLine = data.sci.LineFromPosition(q); 61 | top = std::min(top, pLine); 62 | bottom = std::max(bottom, qLine); 63 | if (ddp) data.setTabstops(*ddp, pLine, qLine); 64 | if (pLine == qLine) { 65 | left = std::min(left , data.sci.PointXFromPosition(p)); 66 | right = std::max(right, data.sci.PointXFromPosition(q)); 67 | } 68 | else { 69 | left = data.sci.PointXFromPosition(0); 70 | for (Scintilla::Line j = pLine; j < qLine; ++j) right = std::max(right, data.sci.PointXFromPosition(data.sci.LineEndPosition(j))); 71 | right = std::max(right, data.sci.PointXFromPosition(q)); 72 | } 73 | } 74 | } 75 | } 76 | 77 | void select(Scintilla::Line anchorLine, int anchorPx, Scintilla::Line caretLine, int caretPx) { 78 | if (ddp) data.setTabstops(*ddp, std::min(anchorLine, caretLine), std::max(anchorLine, caretLine)); 79 | Scintilla::Position anchor = data.positionFromLineAndPointX(anchorLine, anchorPx); 80 | Scintilla::Position caret = data.positionFromLineAndPointX(caretLine , caretPx ); 81 | data.sci.SetSelectionMode(Scintilla::SelectionMode::Rectangle); 82 | data.sci.SetRectangularSelectionAnchor(anchor); 83 | data.sci.SetRectangularSelectionAnchorVirtualSpace(blankCount(anchorPx - data.sci.PointXFromPosition(anchor))); 84 | data.sci.SetRectangularSelectionCaret(caret); 85 | data.sci.SetRectangularSelectionCaretVirtualSpace(blankCount(caretPx - data.sci.PointXFromPosition(caret))); 86 | } 87 | 88 | }; 89 | 90 | } 91 | 92 | 93 | void ColumnsPlusPlusData::selectDown() { 94 | SelectionInformation si(*this); 95 | Scintilla::Line lastLine = sci.LineCount() - 1; 96 | if (sci.PositionFromLine(lastLine) == sci.LineEndPosition(lastLine) && lastLine > 0) --lastLine; 97 | si.select(lastLine, si.left, si.top, si.right); 98 | } 99 | 100 | void ColumnsPlusPlusData::selectEnclose() { 101 | SelectionInformation si(*this); 102 | si.select(si.top, si.left, si.bottom, si.right); 103 | } 104 | 105 | void ColumnsPlusPlusData::selectExtend() { 106 | SelectionInformation si(*this); 107 | if (si.top == si.bottom) { 108 | Scintilla::Line lastLine = sci.LineCount() - 1; 109 | if (sci.PositionFromLine(lastLine) == sci.LineEndPosition(lastLine) && lastLine > 0) --lastLine; 110 | si.select(lastLine, si.left, 0, si.right); 111 | } 112 | else if (sci.SelectionEmpty()) { 113 | if (si.ddp) setTabstops(*si.ddp, si.top, si.bottom); 114 | int right = si.left; 115 | for (Scintilla::Line i = si.top; i <= si.bottom; ++i) right = std::max(right, sci.PointXFromPosition(sci.LineEndPosition(i))); 116 | si.select(si.bottom, right, si.top, sci.PointXFromPosition(0)); 117 | } 118 | else si.select(si.top, si.left, si.bottom, si.right); 119 | } 120 | 121 | void ColumnsPlusPlusData::selectLeft() { 122 | SelectionInformation si(*this); 123 | si.select(si.top, sci.PointXFromPosition(0), si.bottom, si.right); 124 | } 125 | 126 | void ColumnsPlusPlusData::selectRight() { 127 | SelectionInformation si(*this); 128 | if (si.ddp) setTabstops(*si.ddp, si.top, si.bottom); 129 | int right = si.left; 130 | for (Scintilla::Line i = si.top; i <= si.bottom; ++i) right = std::max(right, sci.PointXFromPosition(sci.LineEndPosition(i))); 131 | si.select(si.top, right, si.bottom, si.left); 132 | } 133 | 134 | void ColumnsPlusPlusData::selectUp() { 135 | SelectionInformation si(*this); 136 | si.select(0, si.left, si.bottom, si.right); 137 | } 138 | 139 | 140 | void ColumnsPlusPlusData::buildSelectionMenu(int selectionItemIndex, int selectionMenuIndex) { 141 | 142 | MENUITEMINFO cmi; 143 | 144 | HMENU cppMenu = 0; 145 | HMENU nppPluginMenu = reinterpret_cast(SendMessage(nppData._nppHandle, NPPM_GETMENUHANDLE, 0, 0)); 146 | cmi.cbSize = sizeof(MENUITEMINFO); 147 | int plugMenuItemCount = GetMenuItemCount(nppPluginMenu); 148 | cmi.fMask = MIIM_STRING; 149 | cmi.dwTypeData = 0; 150 | for (int i = 0; i < plugMenuItemCount; ++i) { 151 | GetMenuItemInfo(nppPluginMenu, i, TRUE, &cmi); 152 | if (cmi.cch == 9) { 153 | TCHAR columnsText[10]; 154 | cmi.dwTypeData = columnsText; 155 | cmi.cch = 10; 156 | GetMenuItemInfo(nppPluginMenu, i, TRUE, &cmi); 157 | if (!_tcscmp(columnsText, TEXT("Columns++"))) { 158 | cmi.fMask = MIIM_SUBMENU; 159 | GetMenuItemInfo(nppPluginMenu, i, TRUE, &cmi); 160 | cppMenu = cmi.hSubMenu; 161 | break; 162 | } 163 | cmi.dwTypeData = 0; 164 | } 165 | } 166 | if (!cppMenu) return; 167 | 168 | int cppMenuItemCount = GetMenuItemCount(cppMenu); 169 | if (selectionItemIndex >= cppMenuItemCount) return; 170 | 171 | HMENU selectionMenu = CreateMenu(); 172 | 173 | cmi.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; 174 | for (int i = 0; i < cppMenuItemCount - selectionItemIndex; ++i) { 175 | cmi.dwTypeData = 0; 176 | GetMenuItemInfo(cppMenu, selectionItemIndex, TRUE, &cmi); 177 | std::wstring text(cmi.cch, 0); 178 | cmi.dwTypeData = text.data(); 179 | ++cmi.cch; 180 | GetMenuItemInfo(cppMenu, selectionItemIndex, TRUE, &cmi); 181 | InsertMenuItem(selectionMenu, 255, TRUE, &cmi); 182 | RemoveMenu(cppMenu, selectionItemIndex, MF_BYPOSITION); 183 | } 184 | 185 | cmi.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_SUBMENU; 186 | cmi.fType = MFT_STRING; 187 | cmi.dwTypeData = const_cast(TEXT("Selection")); 188 | cmi.hSubMenu = selectionMenu; 189 | InsertMenuItem(cppMenu, selectionMenuIndex, TRUE, &cmi); 190 | DrawMenuBar(nppData._nppHandle); 191 | 192 | } -------------------------------------------------------------------------------- /src/TimeFormats.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2023 by Randall Joseph Fellmy , 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // at your option any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include "ColumnsPlusPlus.h" 18 | #include "resource.h" 19 | 20 | 21 | INT_PTR CALLBACK timeFormatsDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { 22 | ColumnsPlusPlusData* data; 23 | if (uMsg == WM_INITDIALOG) { 24 | SetWindowLongPtr(hwndDlg, DWLP_USER, lParam); 25 | data = reinterpret_cast(lParam); 26 | } 27 | else data = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); 28 | return data->timeFormatsDialogProc(hwndDlg, uMsg, wParam, lParam); 29 | } 30 | 31 | void ColumnsPlusPlusData::showTimeFormatsDialog() { 32 | DialogBoxParam(dllInstance, MAKEINTRESOURCE(IDD_TIME_FORMATS), nppData._nppHandle, 33 | ::timeFormatsDialogProc, reinterpret_cast(this)); 34 | } 35 | 36 | BOOL ColumnsPlusPlusData::timeFormatsDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM) { 37 | 38 | switch (uMsg) { 39 | 40 | case WM_DESTROY: 41 | return TRUE; 42 | 43 | case WM_INITDIALOG: 44 | { 45 | RECT rcNpp, rcDlg; 46 | GetWindowRect(nppData._nppHandle, &rcNpp); 47 | GetWindowRect(hwndDlg, &rcDlg); 48 | SetWindowPos(hwndDlg, HWND_TOP, (rcNpp.left + rcNpp.right + rcDlg.left - rcDlg.right) / 2, 49 | (rcNpp.top + rcNpp.bottom + rcDlg.top - rcDlg.bottom) / 2, 0, 0, SWP_NOSIZE); 50 | switch (timeScalarUnit) { 51 | case 0: 52 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_DAYS, IDC_TIME_FORMATS_SECONDS, IDC_TIME_FORMATS_DAYS ); 53 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"days"); 54 | break; 55 | case 1: 56 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_DAYS, IDC_TIME_FORMATS_SECONDS, IDC_TIME_FORMATS_HOURS ); 57 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"hours"); 58 | break; 59 | case 2: 60 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_DAYS, IDC_TIME_FORMATS_SECONDS, IDC_TIME_FORMATS_MINUTES); 61 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"minutes"); 62 | break; 63 | default: 64 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_DAYS, IDC_TIME_FORMATS_SECONDS, IDC_TIME_FORMATS_SECONDS); 65 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"seconds"); 66 | } 67 | switch (timePartialRule) { 68 | case 0: 69 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_PARTIAL_0, IDC_TIME_FORMATS_PARTIAL_3, IDC_TIME_FORMATS_PARTIAL_0); 70 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"days:hours"); 71 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"days:hours:minutes"); 72 | break; 73 | case 1: 74 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_PARTIAL_0, IDC_TIME_FORMATS_PARTIAL_3, IDC_TIME_FORMATS_PARTIAL_1); 75 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"hours:minutes"); 76 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"days:hours:minutes"); 77 | break; 78 | case 2: 79 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_PARTIAL_0, IDC_TIME_FORMATS_PARTIAL_3, IDC_TIME_FORMATS_PARTIAL_2); 80 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"hours:minutes"); 81 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"hours:minutes:seconds"); 82 | break; 83 | default: 84 | CheckRadioButton(hwndDlg, IDC_TIME_FORMATS_PARTIAL_0, IDC_TIME_FORMATS_PARTIAL_3, IDC_TIME_FORMATS_PARTIAL_3); 85 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"minutes:seconds"); 86 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"hours:minutes:seconds"); 87 | } 88 | CheckDlgButton(hwndDlg, IDC_TIME_FORMATS_ENABLE_0, timeFormatEnable & 1); 89 | CheckDlgButton(hwndDlg, IDC_TIME_FORMATS_ENABLE_1, timeFormatEnable & 2); 90 | CheckDlgButton(hwndDlg, IDC_TIME_FORMATS_ENABLE_2, timeFormatEnable & 4); 91 | CheckDlgButton(hwndDlg, IDC_TIME_FORMATS_ENABLE_3, timeFormatEnable & 8); 92 | return TRUE; 93 | } 94 | 95 | case WM_COMMAND: 96 | switch (LOWORD(wParam)) { 97 | case IDCANCEL: 98 | EndDialog(hwndDlg, 1); 99 | return TRUE; 100 | case IDOK: 101 | timeScalarUnit = IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_DAYS ) == BST_CHECKED ? 0 102 | : IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_HOURS ) == BST_CHECKED ? 1 103 | : IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_MINUTES ) == BST_CHECKED ? 2 : 3; 104 | timePartialRule = IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_PARTIAL_0) == BST_CHECKED ? 0 105 | : IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_PARTIAL_1) == BST_CHECKED ? 1 106 | : IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_PARTIAL_2) == BST_CHECKED ? 2 : 3; 107 | timeFormatEnable = (IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_ENABLE_0) == BST_CHECKED ? 1 : 0) 108 | + (IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_ENABLE_1) == BST_CHECKED ? 2 : 0) 109 | + (IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_ENABLE_2) == BST_CHECKED ? 4 : 0) 110 | + (IsDlgButtonChecked(hwndDlg, IDC_TIME_FORMATS_ENABLE_3) == BST_CHECKED ? 8 : 0); 111 | EndDialog(hwndDlg, 0); 112 | return TRUE; 113 | case IDC_TIME_FORMATS_DAYS: 114 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"days"); 115 | break; 116 | case IDC_TIME_FORMATS_HOURS: 117 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"hours"); 118 | break; 119 | case IDC_TIME_FORMATS_MINUTES: 120 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"minutes"); 121 | break; 122 | case IDC_TIME_FORMATS_SECONDS: 123 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_0, L"seconds"); 124 | break; 125 | case IDC_TIME_FORMATS_PARTIAL_0: 126 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"days:hours"); 127 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"days:hours:minutes"); 128 | break; 129 | case IDC_TIME_FORMATS_PARTIAL_1: 130 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"hours:minutes"); 131 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"days:hours:minutes"); 132 | break; 133 | case IDC_TIME_FORMATS_PARTIAL_2: 134 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"hours:minutes"); 135 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"hours:minutes:seconds"); 136 | break; 137 | case IDC_TIME_FORMATS_PARTIAL_3: 138 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_1, L"minutes:seconds"); 139 | SetDlgItemText(hwndDlg, IDC_TIME_FORMATS_LABEL_2, L"hours:minutes:seconds"); 140 | break; 141 | } 142 | } 143 | return FALSE; 144 | } 145 | -------------------------------------------------------------------------------- /src/Timestamps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2024 by Randall Joseph Fellmy , 3 | 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // at your option any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program. If not, see . 16 | 17 | #include 18 | #include "ColumnsPlusPlus.h" 19 | #include "RegularExpression.h" 20 | 21 | 22 | struct LocaleWords { 23 | std::vector abbrMonth; 24 | std::vector fullMonth; 25 | std::vector geniMonth; 26 | std::vector dayAbbrev; 27 | std::vector dayOfWeek; 28 | std::vector ampm; 29 | const std::wstring locale; 30 | size_t fullMax = 0; 31 | size_t geniMax = 0; 32 | size_t weekMax = 0; 33 | LocaleWords(const std::wstring locale = L""); 34 | std::wstring formatTimePoint(int64_t counter, bool leap, const std::chrono::time_zone* tz, 35 | TimestampSettings::DateFormat format, const std::wstring& customPicture) const; 36 | }; 37 | 38 | 39 | class TimestampsCommon { 40 | 41 | public: 42 | 43 | struct Locale { 44 | std::wstring name; 45 | std::wstring language; 46 | std::wstring country; 47 | }; 48 | 49 | struct TimeZone { 50 | const std::chrono::time_zone* tz; 51 | std::wstring continent; 52 | std::wstring city; 53 | }; 54 | 55 | ColumnsPlusPlusData& data; 56 | std::map> locales; 57 | std::map> zones; 58 | bool dialogTzLInitialized = false; 59 | 60 | TimestampsCommon(ColumnsPlusPlusData& data); 61 | void initializeDialogLanguagesAndLocales(HWND hwndDlg, const std::wstring& initialLocale, int cbLanguage, int cbLocale); 62 | void initializeDialogTimeZones(HWND hwndDlg, const std::wstring& timeZone, int cbRegion, int cbZone); 63 | void updateDialogLocales(HWND hwndDlg, int cbLanguage, int cbLocale) const; 64 | void updateDialogTimeZones(HWND hwndDlg, int cbRegion, int cbZone) const; 65 | const std::chrono::time_zone* zoneNamed(const std::wstring& name) const; 66 | 67 | }; 68 | 69 | 70 | struct TimestampsParse { 71 | 72 | struct ParsedValues { 73 | std::chrono::year_month_day ymd; 74 | int64_t ticks = 0; 75 | int hour = 0; 76 | int minute = 0; 77 | int offset = 0; 78 | bool offsetFound = false; 79 | }; 80 | 81 | ColumnsPlusPlusData& data; 82 | RegularExpression rx; 83 | const intptr_t action; 84 | LocaleWords localeWords; 85 | unsigned int codepage = 0; 86 | 87 | TimestampsParse(ColumnsPlusPlusData& data, const intptr_t action, const std::wstring locale = L""); 88 | 89 | bool parseDateText(const std::string_view source, int64_t& counter, const std::chrono::time_zone* tz); 90 | bool parseGenericDateText(const std::string_view source, ParsedValues& pv) const; 91 | bool parsePatternDateText(const std::string_view source, ParsedValues& pv); 92 | 93 | }; 94 | -------------------------------------------------------------------------------- /src/Unicode/BuildUnicodeTables.py: -------------------------------------------------------------------------------- 1 | # This file is part of Columns++ for Notepad++. 2 | # Copyright 2025 by Randall Joseph Fellmy , 3 | # 4 | # The Python program contained in this file uses the files in the UCD sub-directory 5 | # to build the files: 6 | # UnicodeCharacterData.cpp 7 | # UnicodeCharacterData.h 8 | # which are used in Columns++ to support regular expressions for Unicode files. 9 | # 10 | # This file is released under the MIT (Expat) license: 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 13 | # associated documentation files (the "Software"), to deal in the Software without restriction, 14 | # including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 15 | # and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 16 | # subject to the following conditions: 17 | # 18 | # The above copyright notice and this permission notice shall be included in all copies or substantial 19 | # portions of the Software. 20 | # 21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 22 | # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | import re 28 | 29 | ucd = open("UCD\\UnicodeData.txt" , encoding='utf-8') 30 | ucf = open("UCD\\CaseFolding.txt" , encoding='utf-8') 31 | ucg = open("UCD\\GraphemeBreakProperty.txt", encoding='utf-8') 32 | dcp = open("UCD\\DerivedCoreProperties.txt", encoding='utf-8') 33 | emj = open("UCD\\emoji-data.txt" , encoding='utf-8') 34 | out = open("UnicodeCharacterData.cpp", "w" , encoding='utf-8') 35 | hdr = open("UnicodeCharacterData.h", "w" , encoding='utf-8') 36 | 37 | dcpParse = re.compile(r"([0-9a-fA-F]++)(?:\.\.([0-9a-fA-F]++))?+\s*+;\s*+InCB\s*+;\s*+(\w++)"); 38 | emojiParse = re.compile(r"([0-9a-fA-F]++)(?:\.\.([0-9a-fA-F]++))?+\s*+;\s*+Extended_Pictographic\b"); 39 | graphParse = re.compile(r"([0-9a-fA-F]++)(?:\.\.([0-9a-fA-F]++))?+\s*+;\s*+(\w++)"); 40 | 41 | excludeFrom = 0X32400 42 | excludeTo = 0XE0000 43 | stopAt = 0XF0000 44 | firstGraphBreakComplex = 0x200000 45 | 46 | codeCategory = [] 47 | caseFold = [] 48 | caseLower = [] 49 | caseUpper = [] 50 | graphBreak = dict() 51 | indicBreak = dict() 52 | foldPoints = set() 53 | extPict = set() 54 | 55 | def codeEntry(codept, fields) : 56 | global codeCategory 57 | global caseLower 58 | global caseUpper 59 | global foldPoints 60 | tag = f" | (GraphBreak_{graphBreak[codept]} << GraphBreakShift)" if codept in graphBreak else "" 61 | if codept in indicBreak : 62 | tag += f" | (IndicBreak_{indicBreak[codept]} << IndicBreakShift)" 63 | if codept in foldPoints : 64 | tag += " | unicode_has_fold" 65 | if (fields[13] != "") : 66 | caseLower.append("{" + f"{codept:#X}, 0X{fields[13]}" + "},\n") 67 | tag += " | unicode_has_lower" 68 | if (fields[12] != "") : 69 | caseUpper.append("{" + f"{codept:#X}, 0X{fields[12]}" + "},\n") 70 | tag += " | unicode_has_upper" 71 | if codept in extPict : 72 | tag += " | unicode_extended_pictographic" 73 | codeCategory.append(f"/* {codept:>5X} */ Category_{fields[2]}{tag},\n") 74 | 75 | for line in ucf: 76 | if line[0:1] == "#" : 77 | continue 78 | fields = line.split("; ") 79 | if len(fields) < 3 or (fields[1] != "C" and fields[1] != "S") : 80 | continue 81 | caseFold.append("{" + f"0X{fields[0]}, 0X{fields[2]}" + "},\n") 82 | foldPoints.add(int(fields[0], 16)) 83 | 84 | ucf.close() 85 | 86 | for line in ucg: 87 | gm = graphParse.match(line) 88 | if not gm : 89 | continue 90 | cp1 = int(gm.group(1), 16) 91 | cp2 = cp1 if not gm.group(2) else int(gm.group(2), 16) 92 | for cp in range(cp1, cp2 + 1) : 93 | graphBreak[cp] = gm.group(3) 94 | if firstGraphBreakComplex > cp1 and gm.group(3) != "Control" and gm.group(3) != "CR" and gm.group(3) != "LF" : 95 | firstGraphBreakComplex = cp1 96 | 97 | ucg.close() 98 | 99 | for line in dcp: 100 | indic = dcpParse.match(line) 101 | if not indic : 102 | continue 103 | cp1 = int(indic.group(1), 16) 104 | cp2 = cp1 if not indic.group(2) else int(indic.group(2), 16) 105 | for cp in range(cp1, cp2 + 1) : 106 | indicBreak[cp] = indic.group(3) 107 | 108 | dcp.close() 109 | 110 | for line in emj: 111 | emoji = emojiParse.match(line) 112 | if not emoji : 113 | continue 114 | cp1 = int(emoji.group(1), 16) 115 | cp2 = cp1 if not emoji.group(2) else int(emoji.group(2), 16) 116 | for cp in range(cp1, cp2 + 1) : 117 | extPict.add(cp) 118 | 119 | emj.close() 120 | 121 | last = -1; 122 | 123 | for line in ucd: 124 | fields = line.split(";") 125 | codept = int(fields[0], 16) 126 | if codept >= stopAt : 127 | break 128 | if fields[1].find(", Last>") >= 0 : 129 | for i in range(last + 1, codept) : 130 | codeEntry(i, fields) 131 | else : 132 | if (last + 1 != codept) : 133 | if codept >= excludeFrom and last <= excludeFrom : 134 | if codept < excludeTo : 135 | out.write(f"** ERROR: Code point {codept:X} within exclusion zone; table will be broken! **\n"); 136 | reps = codept - last - 1 - (excludeTo - excludeFrom) 137 | else : 138 | reps = codept - last - 1 139 | rep1 = reps // 40 140 | rep2 = reps % 40 141 | if (rep1 > 0) : 142 | codeCategory.append((("0," * 40) + "\n") * rep1) 143 | if (rep2 > 0) : 144 | codeCategory.append(("0," * rep2) + "\n") 145 | codeEntry(codept, fields) 146 | last = codept 147 | 148 | ucd.close() 149 | 150 | out.write('#include "UnicodeCharacterData.h"\n\nconst uint16_t unicode_character_data[] = {\n') 151 | out.writelines(codeCategory) 152 | out.write("};\n\nconst std::map unicode_fold = {\n") 153 | out.writelines(caseFold) 154 | out.write("};\n\nconst std::map unicode_lower = {\n") 155 | out.writelines(caseLower) 156 | out.write("};\n\nconst std::map unicode_upper = {\n") 157 | out.writelines(caseUpper) 158 | out.write("};\n") 159 | out.close() 160 | 161 | hdr.write("#pragma once\n\n") 162 | hdr.write(f"constexpr char32_t unicode_exclude_from = {excludeFrom:#X};\n") 163 | hdr.write(f"constexpr char32_t unicode_exclude_to = {excludeTo:#X};\n") 164 | hdr.write(f"constexpr char32_t unicode_last_codept = {last:#X};\n") 165 | hdr.write(f"constexpr char32_t unicode_first_GraphBreak_complex = {firstGraphBreakComplex:>#7X};\n\n") 166 | hdr.write('#include "UnicodeCharacterDataFixed.h"\n') 167 | hdr.close() 168 | -------------------------------------------------------------------------------- /src/Unicode/UCD/License.txt: -------------------------------------------------------------------------------- 1 | UNICODE LICENSE V3 2 | 3 | COPYRIGHT AND PERMISSION NOTICE 4 | 5 | Copyright © 1991-2024 Unicode, Inc. 6 | 7 | NOTICE TO USER: Carefully read the following legal agreement. BY 8 | DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR 9 | SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE 10 | TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT 11 | DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of data files and any associated documentation (the "Data Files") or 15 | software and any associated documentation (the "Software") to deal in the 16 | Data Files or Software without restriction, including without limitation 17 | the rights to use, copy, modify, merge, publish, distribute, and/or sell 18 | copies of the Data Files or Software, and to permit persons to whom the 19 | Data Files or Software are furnished to do so, provided that either (a) 20 | this copyright and permission notice appear with all copies of the Data 21 | Files or Software, or (b) this copyright and permission notice appear in 22 | associated Documentation. 23 | 24 | THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY 25 | KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 27 | THIRD PARTY RIGHTS. 28 | 29 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE 30 | BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, 31 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 32 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 33 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA 34 | FILES OR SOFTWARE. 35 | 36 | Except as contained in this notice, the name of a copyright holder shall 37 | not be used in advertising or otherwise to promote the sale, use or other 38 | dealings in these Data Files or Software without prior written 39 | authorization of the copyright holder. 40 | -------------------------------------------------------------------------------- /src/Unicode/UnicodeCharacterData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | constexpr char32_t unicode_exclude_from = 0X32400; 4 | constexpr char32_t unicode_exclude_to = 0XE0000; 5 | constexpr char32_t unicode_last_codept = 0XE01EF; 6 | constexpr char32_t unicode_first_GraphBreak_complex = 0X300; 7 | 8 | #include "UnicodeCharacterDataFixed.h" 9 | -------------------------------------------------------------------------------- /src/Unicode/UnicodeRegexTraits.h: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2025 by Randall Joseph Fellmy , 3 | 4 | // The Columns++ source code contained in this file is independent of Notepad++ code. 5 | // It is released under the MIT (Expat) license: 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 8 | // associated documentation files (the "Software"), to deal in the Software without restriction, 9 | // including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | // and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all copies or substantial 14 | // portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 17 | // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | #pragma once 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "UnicodeCharacterData.h" 29 | 30 | #pragma warning( push ) 31 | #pragma warning( disable : 4244 ) 32 | #include 33 | #pragma warning( pop ) 34 | 35 | namespace boost { 36 | namespace BOOST_REGEX_DETAIL_NS { 37 | template<> inline bool is_combining(char32_t c) { 38 | return ((1Ui64 << (unicodeGenCat(c) + 32)) & (CatMask_Mc | CatMask_Me | CatMask_Mn)); 39 | } 40 | template<> inline bool is_separator(char32_t c) { 41 | return c == 0x0A || c == 0x0D; 42 | } 43 | template<> inline char32_t global_lower(char32_t c) { 44 | return unicodeLower(c); 45 | } 46 | template<> inline char32_t global_upper(char32_t c) { 47 | return unicodeUpper(c); 48 | } 49 | } 50 | } 51 | 52 | 53 | struct utf32_regex_traits { 54 | 55 | typedef char32_t char_type; 56 | typedef std::size_t size_type; 57 | typedef std::basic_string string_type; 58 | typedef std::wstring locale_type; 59 | typedef uint64_t char_class_type; 60 | 61 | static constexpr char_class_type mask_upper = 0x0001; // upper case 62 | static constexpr char_class_type mask_lower = 0x0002; // lower case 63 | static constexpr char_class_type mask_digit = 0x0004; // decimal digits 64 | static constexpr char_class_type mask_punct = 0x0008; // punctuation characters 65 | static constexpr char_class_type mask_cntrl = 0x0010; // control characters 66 | static constexpr char_class_type mask_horizontal = 0x0020; // horizontal space 67 | static constexpr char_class_type mask_vertical = 0x0040; // vertical space 68 | static constexpr char_class_type mask_xdigit = 0x0080; // hexadecimal digits 69 | static constexpr char_class_type mask_alpha = 0x0100; // any linguistic character 70 | static constexpr char_class_type mask_word = 0x0200; // word characters (alpha, number and underscore) 71 | static constexpr char_class_type mask_graph = 0x0400; // any visible character 72 | static constexpr char_class_type mask_ascii = 0x0800; // code points < 128 73 | static constexpr char_class_type mask_unicode = 0x1000; // code points > 255 74 | 75 | static constexpr char_class_type mask_blank = mask_horizontal; 76 | static constexpr char_class_type mask_space = mask_horizontal | mask_vertical; 77 | static constexpr char_class_type mask_alnum = mask_alpha | mask_digit; 78 | static constexpr char_class_type mask_print = mask_graph | mask_space; 79 | 80 | static const char_class_type categoryMasks[]; 81 | static const char_class_type asciiMasks[]; 82 | static const std::map classnames; 83 | static const std::map character_names; 84 | static const std::set digraphs; 85 | 86 | locale_type locale; 87 | 88 | utf32_regex_traits() { 89 | locale.resize(LOCALE_NAME_MAX_LENGTH); 90 | int n = GetUserDefaultLocaleName(locale.data(), LOCALE_NAME_MAX_LENGTH); 91 | locale.resize(n - 1); 92 | } 93 | 94 | static size_type length(const char_type* p) { return std::char_traits::length(p); } 95 | 96 | char_type translate(char_type c) const { return c; } 97 | 98 | char_type translate_nocase(char_type c) const { return unicodeFold(c); } 99 | 100 | string_type transform(const char_type* p1, const char_type* p2) const { 101 | if (p1 == p2) return string_type(); 102 | std::wstring wc; 103 | for (const char_type* p = p1; p < p2; ++p) { 104 | if (*p > 0xffff) { 105 | wc += static_cast(0xD800 | ((*p - 0x10000) >> 10)); 106 | wc += static_cast(0xDC00 | (*p & 0x3ff)); 107 | } 108 | else wc += static_cast(*p); 109 | } 110 | int n = LCMapStringEx(locale.data(), LCMAP_SORTKEY | NORM_LINGUISTIC_CASING, 111 | wc.data(), static_cast(wc.length()), 0, 0, 0, 0, 0); 112 | std::wstring wt(n, 0); 113 | LCMapStringEx(locale.data(), LCMAP_SORTKEY | NORM_LINGUISTIC_CASING, 114 | wc.data(), static_cast(wc.length()), wt.data(), n, 0, 0, 0); 115 | string_type st; 116 | for (wchar_t c : wt) { 117 | if (!c) break; 118 | st += c; 119 | } 120 | return st; 121 | } 122 | 123 | string_type transform_primary(const char_type* p1, const char_type* p2) const { 124 | if (p1 == p2) return string_type(); 125 | std::wstring wc; 126 | for (const char_type* p = p1; p < p2; ++p) { 127 | if (*p > 0xffff) { 128 | wc += static_cast(0xD800 | ((*p - 0x10000) >> 10)); 129 | wc += static_cast(0xDC00 | (*p & 0x3ff)); 130 | } 131 | else wc += static_cast(*p); 132 | } 133 | int n = LCMapStringEx(locale.data(), 134 | LCMAP_SORTKEY | LINGUISTIC_IGNOREDIACRITIC | NORM_IGNORECASE | NORM_IGNOREKANATYPE 135 | | NORM_IGNOREWIDTH | NORM_LINGUISTIC_CASING, 136 | wc.data(), static_cast(wc.length()), 0, 0, 0, 0, 0); 137 | std::wstring wt(n, 0); 138 | LCMapStringEx(locale.data(), 139 | LCMAP_SORTKEY | LINGUISTIC_IGNOREDIACRITIC | NORM_IGNORECASE | NORM_IGNOREKANATYPE 140 | | NORM_IGNOREWIDTH | NORM_LINGUISTIC_CASING, 141 | wc.data(), static_cast(wc.length()), wt.data(), n, 0, 0, 0); 142 | string_type st; 143 | for (wchar_t c : wt) { 144 | if (!c) break; 145 | st += c; 146 | } 147 | return st; 148 | } 149 | 150 | char_class_type lookup_classname(const char_type* p1, const char_type* p2) const { 151 | std::string name; 152 | for (const char_type* p = p1; p < p2; ++p) { 153 | if (*p > 127) return 0; 154 | name += static_cast(std::tolower(static_cast(*p))); 155 | } 156 | if (classnames.contains(name)) return classnames.at(name); 157 | return 0; 158 | } 159 | 160 | string_type lookup_collatename(const char_type* p1, const char_type* p2) const { 161 | if (p2 - p1 < 2) return string_type(p1, p2); 162 | std::string s; 163 | for (const char_type* p = p1; p < p2; ++p) { 164 | if (*p > 127) return string_type(); 165 | s += static_cast(std::tolower(static_cast(*p))); 166 | } 167 | if (character_names.contains(s)) return string_type(1, character_names.at(s)); 168 | if (p2 - p1 != 2) return string_type(); 169 | string_type digraph(p1, p2); 170 | return digraphs.contains(digraph) ? digraph : string_type(); 171 | } 172 | 173 | bool isctype(char_type c, char_class_type class_mask) const { 174 | if (c < 128) return class_mask & asciiMasks[c]; 175 | if (c < 256) { 176 | if (c == 0x85) return (class_mask & (CatMask_Cc | mask_cntrl | mask_vertical)); 177 | } 178 | else if (class_mask & mask_unicode) return true; 179 | return class_mask & categoryMasks[unicodeGenCat(c)]; 180 | } 181 | 182 | int value(char_type c, int radix) const { 183 | int n = c < '0' ? -1 184 | : c <= '9' ? c - '0' 185 | : c < 'A' ? -1 186 | : c <= 'F' ? c - ('A' - 10) 187 | : c < 'a' ? -1 188 | : c <= 'f' ? c - ('a' - 10) 189 | : -1; 190 | return n < radix ? n : -1; 191 | } 192 | 193 | locale_type imbue(locale_type l) { 194 | std::wstring last = locale; 195 | locale = l; 196 | return last; 197 | } 198 | 199 | locale_type getloc() const { 200 | return locale; 201 | } 202 | 203 | }; 204 | -------------------------------------------------------------------------------- /src/WindowsScintillaCommon.h: -------------------------------------------------------------------------------- 1 | // This file is part of Columns++ for Notepad++. 2 | // Copyright 2025 by Randall Joseph Fellmy , 3 | 4 | // The Columns++ source code contained in this file is independent of Notepad++ code. 5 | // It is released under the MIT (Expat) license: 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 8 | // associated documentation files (the "Software"), to deal in the Software without restriction, 9 | // including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | // and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all copies or substantial 14 | // portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 17 | // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | // This file contains Windows, Scintilla and C++ standard library includes, and some helper functions, 23 | // which are used throughout Columns++. 24 | 25 | #pragma once 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define NOMINMAX 32 | #include 33 | #include 34 | #include 35 | 36 | #include "Host\ScintillaTypes.h" 37 | #include "Host\ScintillaMessages.h" 38 | #include "Host\ScintillaStructures.h" 39 | #include "Host\ScintillaCall.h" 40 | 41 | 42 | template< class T, class S > constexpr const T clamp_cast(const S& v) { 43 | using s = std::numeric_limits; 44 | using t = std::numeric_limits; 45 | if constexpr (!s::is_integer || !t::is_integer) return v; 46 | else if constexpr (s::is_signed == t::is_signed) 47 | if constexpr (t::max() >= s::max())return static_cast(v); 48 | else return static_cast(std::clamp(v, static_cast(t::min()), static_cast(t::max()))); 49 | else if constexpr (s::is_signed) 50 | if constexpr (t::max() >= static_cast(s::max())) return static_cast(std::max(v, static_cast(0))); 51 | else return static_cast(std::clamp(v, static_cast(0), static_cast(t::max()))); 52 | else if constexpr (static_cast(t::max()) >= s::max()) return static_cast(v); 53 | else return static_cast(std::min(v, static_cast(t::max()))); 54 | } 55 | 56 | 57 | inline std::string fromWide(std::wstring_view s, unsigned int codepage) { 58 | std::string r; 59 | size_t inputLength = s.length(); 60 | if (!inputLength) return r; 61 | constexpr unsigned int safeSize = std::numeric_limits::max() / 8; 62 | size_t workingPoint = 0; 63 | while (inputLength - workingPoint > safeSize) { 64 | int ss = safeSize; 65 | if (s[ss - 1] >= 0xD800 && s[ss - 1] <= 0xDBFF) --ss; // proposed block ends with high surrogate: leave it for the next block 66 | int segmentLength = WideCharToMultiByte(codepage, 0, s.data() + workingPoint, ss, 0, 0, 0, 0); 67 | size_t outputPoint = r.length(); 68 | r.resize(outputPoint + segmentLength); 69 | WideCharToMultiByte(codepage, 0, s.data() + workingPoint, ss, r.data() + outputPoint, segmentLength, 0, 0); 70 | workingPoint += ss; 71 | } 72 | int segmentLength = WideCharToMultiByte(codepage, 0, s.data() + workingPoint, static_cast(inputLength - workingPoint), 0, 0, 0, 0); 73 | size_t outputPoint = r.length(); 74 | r.resize(outputPoint + segmentLength); 75 | WideCharToMultiByte(codepage, 0, s.data() + workingPoint, static_cast(inputLength - workingPoint), r.data() + outputPoint, segmentLength, 0, 0); 76 | return r; 77 | } 78 | 79 | 80 | inline std::wstring toWide(std::string_view s, unsigned int codepage) { 81 | std::wstring r; 82 | size_t inputLength = s.length(); 83 | if (!inputLength) return r; 84 | constexpr unsigned int safeSize = std::numeric_limits::max() / 2; 85 | size_t workingPoint = 0; 86 | while (inputLength - workingPoint > safeSize) { 87 | int ss = safeSize; 88 | if (codepage == CP_UTF8 && ((s[ss] & 0xC0) == 0x80)) while ((s[--ss] & 0xC0) == 0x80); // find a first byte to start the next block 89 | int segmentLength = MultiByteToWideChar(codepage, 0, s.data() + workingPoint, ss, 0, 0); 90 | size_t outputPoint = r.length(); 91 | r.resize(outputPoint + segmentLength); 92 | MultiByteToWideChar(codepage, 0, s.data() + workingPoint, ss, r.data() + outputPoint, segmentLength); 93 | workingPoint += ss; 94 | } 95 | int segmentLength = MultiByteToWideChar(codepage, 0, s.data() + workingPoint, static_cast(inputLength - workingPoint), 0, 0); 96 | size_t outputPoint = r.length(); 97 | r.resize(outputPoint + segmentLength); 98 | MultiByteToWideChar(codepage, 0, s.data() + workingPoint, static_cast(inputLength - workingPoint), r.data() + outputPoint, segmentLength); 99 | return r; 100 | } 101 | 102 | 103 | inline std::wstring GetWindowString(HWND hWnd) { 104 | std::wstring s(GetWindowTextLength(hWnd), 0); 105 | if (!s.empty()) s.resize(GetWindowText(hWnd, s.data(), static_cast(s.length() + 1))); 106 | return s; 107 | } 108 | 109 | inline std::wstring GetDlgItemString(HWND hwndDlg, int item) { 110 | return GetWindowString(GetDlgItem(hwndDlg, item)); 111 | } 112 | 113 | 114 | inline void showBalloonTip(HWND hwndDlg, int control, const std::wstring& text, bool combobox = false) { 115 | HWND hControl = GetDlgItem(hwndDlg, control); 116 | if (combobox) { 117 | COMBOBOXINFO cbi; 118 | cbi.cbSize = sizeof(COMBOBOXINFO); 119 | GetComboBoxInfo(hControl, &cbi); 120 | hControl = cbi.hwndItem; 121 | } 122 | EDITBALLOONTIP ebt; 123 | ebt.cbStruct = sizeof(EDITBALLOONTIP); 124 | ebt.pszTitle = L""; 125 | ebt.ttiIcon = TTI_NONE; 126 | ebt.pszText = text.data(); 127 | SendMessage(hControl, EM_SHOWBALLOONTIP, 0, reinterpret_cast(&ebt)); 128 | SendMessage(hwndDlg, WM_NEXTDLGCTL, reinterpret_cast(hControl), TRUE); 129 | } 130 | 131 | 132 | inline std::wstring updateComboHistory(HWND dialog, int control, std::vector& history) { 133 | HWND h = GetDlgItem(dialog, control); 134 | auto n = GetWindowTextLength(h); 135 | std::wstring s(n, 0); 136 | s.resize(GetWindowText(h, s.data(), n + 1)); 137 | if (history.empty() || history.back() != s) { 138 | if (!history.empty()) { 139 | auto existing = std::find(history.begin(), history.end(), s); 140 | if (existing != history.end()) { 141 | SendMessage(h, CB_DELETESTRING, history.end() - existing - 1, 0); 142 | history.erase(existing); 143 | } 144 | } 145 | SendMessage(h, CB_INSERTSTRING, 0, reinterpret_cast(s.data())); 146 | SendMessage(h, CB_SETCURSEL, 0, 0); 147 | history.push_back(s); 148 | } 149 | return s; 150 | } 151 | 152 | 153 | inline bool validateSpin(int& value, HWND hwndDlg, int control, const wchar_t* message) { 154 | BOOL error; 155 | int n = static_cast(SendDlgItemMessage(hwndDlg, control, UDM_GETPOS32, 0, reinterpret_cast(&error))); 156 | if (error) { 157 | HWND edit = reinterpret_cast(SendDlgItemMessage(hwndDlg, control, UDM_GETBUDDY, 0, 0)); 158 | EDITBALLOONTIP ebt; 159 | ebt.cbStruct = sizeof(EDITBALLOONTIP); 160 | ebt.pszTitle = L""; 161 | ebt.ttiIcon = TTI_NONE; 162 | ebt.pszText = message; 163 | SendMessage(edit, EM_SHOWBALLOONTIP, 0, reinterpret_cast(&ebt)); 164 | SendMessage(hwndDlg, WM_NEXTDLGCTL, reinterpret_cast(edit), TRUE); 165 | return false; 166 | } 167 | value = n; 168 | return true; 169 | } 170 | -------------------------------------------------------------------------------- /src/nlohmann/LICENSE.MIT: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-2022 Niels Lohmann 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vs.proj/ColumnsPlusPlus.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33205.214 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ColumnsPlusPlus", "ColumnsPlusPlus.vcxproj", "{9D04DBD5-E12E-44E0-A683-6F43F21D533B}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6FF53EDD-4CC0-4905-963C-D71AAE74C48D}" 9 | ProjectSection(SolutionItems) = preProject 10 | ..\src\Unicode\BuildUnicodeTables.py = ..\src\Unicode\BuildUnicodeTables.py 11 | ..\CHANGELOG.md = ..\CHANGELOG.md 12 | ..\help.htm = ..\help.htm 13 | ..\LICENSE.txt = ..\LICENSE.txt 14 | ..\README.md = ..\README.md 15 | ..\source.txt = ..\source.txt 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|x64 = Debug|x64 21 | Debug|x86 = Debug|x86 22 | Release|x64 = Release|x64 23 | Release|x86 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Debug|x64.ActiveCfg = Debug|x64 27 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Debug|x64.Build.0 = Debug|x64 28 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Debug|x86.ActiveCfg = Debug|Win32 29 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Debug|x86.Build.0 = Debug|Win32 30 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Release|x64.ActiveCfg = Release|x64 31 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Release|x64.Build.0 = Release|x64 32 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Release|x86.ActiveCfg = Release|Win32 33 | {9D04DBD5-E12E-44E0-A683-6F43F21D533B}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {6B792AA3-93A7-4047-8A70-A0CCD2947411} 40 | EndGlobalSection 41 | EndGlobal 42 | --------------------------------------------------------------------------------