Hello community,

here is the log from the commit of package editorconfig-core-c for 
openSUSE:Leap:15.2 checked in at 2020-02-24 11:50:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/editorconfig-core-c (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.editorconfig-core-c.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "editorconfig-core-c"

Mon Feb 24 11:50:15 2020 rev:14 rq:777375 version:0.12.3

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/editorconfig-core-c/editorconfig-core-c.changes    
    2020-01-15 14:53:37.457529346 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.editorconfig-core-c.new.26092/editorconfig-core-c.changes
     2020-02-24 11:50:16.382726625 +0100
@@ -1,0 +2,16 @@
+Tue Dec  4 21:12:48 UTC 2018 - Herbert Graeber <herb...@graeber-clan.de>
+
+- update to 0.12.3:
+  * Bump required minimum cmake version to 2.8.12.
+  * Support pcre2 and drop support for pcre.
+- use pkconfig to find libpcre2
+
+-------------------------------------------------------------------
+Fri May 18 11:14:25 UTC 2018 - astie...@suse.com
+
+- update to 0.12.2:
+  * Add support for pkgconfig
+  * Memory leaks and crash fixes
+  * Improve error messages
+
+-------------------------------------------------------------------

Old:
----
  editorconfig-core-c-0.12.1.tar.gz

New:
----
  editorconfig-core-c-0.12.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ editorconfig-core-c.spec ++++++
--- /var/tmp/diff_new_pack.0CrrYi/_old  2020-02-24 11:50:16.726727340 +0100
+++ /var/tmp/diff_new_pack.0CrrYi/_new  2020-02-24 11:50:16.726727340 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package editorconfig-core-c
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,25 +12,25 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           editorconfig-core-c
-Version:        0.12.1
+Version:        0.12.3
 Release:        0
 Summary:        EditorConfig core library written in C
-License:        BSD-2-Clause and BSD-3-Clause
+License:        BSD-2-Clause AND BSD-3-Clause
 Group:          Development/Libraries/C and C++
-Url:            http://editorconfig.org/
+URL:            http://editorconfig.org/
 Source:         
https://github.com/editorconfig/editorconfig-core-c/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source99:       baselibs.conf
 Patch0:         editorconfig-core-c-0.12.1-install_paths.patch
 Patch1:         editorconfig-core-c-0.12.1-no_timestamp.patch
-BuildRequires:  cmake >= 2.8.7
+BuildRequires:  cmake >= 2.8.12
 BuildRequires:  doxygen
-BuildRequires:  pcre-devel >= 0.12.0
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  pkgconfig
+BuildRequires:  pkgconfig(libpcre2-8)
 
 %description
 EditorConfig makes it easy to maintain the correct coding style when switching
@@ -100,23 +100,23 @@
 %postun -n libeditorconfig0 -p /sbin/ldconfig
 
 %files -n editorconfig
-%defattr(-,root,root)
-%doc LICENSE
+%license LICENSE
 %{_bindir}/editorconfig*
 %{_mandir}/man1/editorconfig*
 %{_mandir}/man5/editorconfig*
 
 %files -n libeditorconfig0
-%defattr(-,root,root)
-%doc LICENSE
+%license LICENSE
 %{_libdir}/libeditorconfig.so.0*
 
 %files -n libeditorconfig-devel
-%defattr(-,root,root)
-%doc CONTRIBUTORS LICENSE README.md
+%license LICENSE
+%doc CONTRIBUTORS README.md
 %{_docdir}/libeditorconfig-devel
 %{_includedir}/editorconfig
 %{_libdir}/libeditorconfig.so
 %{_mandir}/man3/editorconfig*
+%{_libdir}/pkgconfig/editorconfig.pc
+%{_libdir}/cmake/EditorConfig
 
 %changelog

++++++ editorconfig-core-c-0.12.1-install_paths.patch ++++++
--- /var/tmp/diff_new_pack.0CrrYi/_old  2020-02-24 11:50:16.746727381 +0100
+++ /var/tmp/diff_new_pack.0CrrYi/_new  2020-02-24 11:50:16.750727389 +0100
@@ -4,16 +4,16 @@
 Adjust the install paths
 Move HTML docs to devel package
 
-Index: editorconfig-core-c-0.12.1/doc/CMakeLists.txt
+Index: editorconfig-core-c-0.12.2/doc/CMakeLists.txt
 ===================================================================
---- editorconfig-core-c-0.12.1.orig/doc/CMakeLists.txt
-+++ editorconfig-core-c-0.12.1/doc/CMakeLists.txt
+--- editorconfig-core-c-0.12.2.orig/doc/CMakeLists.txt
++++ editorconfig-core-c-0.12.2/doc/CMakeLists.txt
 @@ -125,7 +125,7 @@ if(BUILD_DOCUMENTATION)
  
          if(INSTALL_HTML_DOC)
              install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
--                DESTINATION share/doc/editorconfig)
-+                DESTINATION share/doc/packages/libeditorconfig-devel)
+-                DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/editorconfig")
++                DESTINATION 
"${CMAKE_INSTALL_DATAROOTDIR}/doc/packages/libeditorconfig-devel")
          endif(INSTALL_HTML_DOC)
  
      else(DOXYGEN_FOUND)

++++++ editorconfig-core-c-0.12.1.tar.gz -> editorconfig-core-c-0.12.3.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/.gitignore 
new/editorconfig-core-c-0.12.3/.gitignore
--- old/editorconfig-core-c-0.12.1/.gitignore   2016-03-18 05:04:05.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/.gitignore   2018-11-16 01:10:15.000000000 
+0100
@@ -28,3 +28,6 @@
 # Generated by `make`
 /bin
 /lib
+
+# Eclipse
+.project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/.travis.yml 
new/editorconfig-core-c-0.12.3/.travis.yml
--- old/editorconfig-core-c-0.12.1/.travis.yml  2016-03-18 05:04:05.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/.travis.yml  2018-11-16 01:10:15.000000000 
+0100
@@ -4,6 +4,13 @@
   - gcc
   - clang
 
+dist: xenial
+
+addons:
+  apt:
+    packages:
+     - libpcre2-dev
+
 # Settings to try
 env:
  - OPTIONS="-DCMAKE_BUILD_TYPE=Release -DBUILD_STATICALLY_LINKED_EXE=ON"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/CHANGELOG 
new/editorconfig-core-c-0.12.3/CHANGELOG
--- old/editorconfig-core-c-0.12.1/CHANGELOG    2016-03-18 05:04:05.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/CHANGELOG    2018-11-16 01:10:15.000000000 
+0100
@@ -1,3 +1,14 @@
+v0.12.3
+
+- Bump required minimum cmake version to 2.8.12.
+
+v0.12.2
+
+- Add support for pkgconfig.
+- Memory leaks and crash fixes.
+- Improve error messages.
+- Add CI on AppVeyor.
+
 v0.12.1
 
 - Fix an issue that libeditorconfig calls exit()---this should not be
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/CMakeLists.txt
--- old/editorconfig-core-c-0.12.1/CMakeLists.txt       2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011-2016 EditorConfig Team
+# Copyright (c) 2011-2018 EditorConfig Team
 # All rights reserved.
 # 
 # Redistribution and use in source and binary forms, with or without
@@ -24,17 +24,23 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-cmake_minimum_required(VERSION 2.8.7)
-cmake_policy(VERSION 2.8.7)
+cmake_minimum_required(VERSION 2.8.12)
+cmake_policy(VERSION 2.8.12)
+# project() command sets VERSION variables (since CMake 3.0).
+cmake_policy(SET CMP0048 NEW)
 
-set (editorconfig_VERSION_MAJOR 0)
-set (editorconfig_VERSION_MINOR 12)
-set (editorconfig_VERSION_PATCH 1)
+project(editorconfig C)
 
-set (editorconfig_VERSION_SUFFIX "")
+# Must be placed after the call to project().
+set(PROJECT_VERSION_MAJOR 0)
+set(PROJECT_VERSION_MINOR 12)
+set(PROJECT_VERSION_PATCH 3)
+set(PROJECT_VERSION
+    
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
 
-project(editorconfig C)
+set(PROJECT_VERSION_SUFFIX "")
 
+include(GNUInstallDirs)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake_Modules")
 
 # set default compilation directory
@@ -57,9 +63,9 @@
 set(MAILING_LIST "editorcon...@googlegroups.com")
 
 set(CPACK_PACKAGE_VENDOR "EditorConfig Team")
-set(CPACK_PACKAGE_VERSION_MAJOR ${editorconfig_VERSION_MAJOR})
-set(CPACK_PACKAGE_VERSION_MINOR ${editorconfig_VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${editorconfig_VERSION_PATCH})
+set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.1/CMake_Modules/FindPCRE.cmake 
new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE.cmake
--- old/editorconfig-core-c-0.12.1/CMake_Modules/FindPCRE.cmake 2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE.cmake 1970-01-01 
01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-# Copyright (C) 2007-2009 LuaDist.
-# Created by Peter Kapec <kap...@gmail.com>
-# Redistribution and use of this file is allowed according to the terms of the 
MIT license.
-# For details see the COPYRIGHT file distributed with LuaDist.
-#      Note:
-#              Searching headers and libraries is very simple and is NOT as 
powerful as scripts
-#              distributed with CMake, because LuaDist defines directories to 
search for.
-#              Everyone is encouraged to contact the author with improvements. 
Maybe this file
-#              becomes part of CMake distribution sometimes.
-
-# - Find pcre
-# Find the native PCRE headers and libraries.
-#
-# PCRE_INCLUDE_DIRS    - where to find pcre.h, etc.
-# PCRE_LIBRARIES       - List of libraries when using pcre.
-# PCRE_FOUND   - True if pcre found.
-
-# Look for the header file.
-FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h)
-
-# Look for the library.
-FIND_LIBRARY(PCRE_LIBRARY NAMES pcre)
-
-# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all 
listed variables are TRUE.
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY 
PCRE_INCLUDE_DIR)
-
-# Copy the results to the output variables.
-IF(PCRE_FOUND)
-       SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
-       SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
-ELSE(PCRE_FOUND)
-       SET(PCRE_LIBRARIES)
-       SET(PCRE_INCLUDE_DIRS)
-ENDIF(PCRE_FOUND)
-
-MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.1/CMake_Modules/FindPCRE2.cmake 
new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE2.cmake
--- old/editorconfig-core-c-0.12.1/CMake_Modules/FindPCRE2.cmake        
1970-01-01 01:00:00.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/CMake_Modules/FindPCRE2.cmake        
2018-11-16 01:10:15.000000000 +0100
@@ -0,0 +1,38 @@
+# Copyright (C) 2018 Sven Strickroth <email AT cs-ware DOT de>
+# Copyright (C) 2007-2009 LuaDist.
+# Created by Peter Kapec <kap...@gmail.com>
+# Redistribution and use of this file is allowed according to the terms of the 
MIT license.
+# For details see the COPYRIGHT file distributed with LuaDist.
+#      Note:
+#              Searching headers and libraries is very simple and is NOT as 
powerful as scripts
+#              distributed with CMake, because LuaDist defines directories to 
search for.
+#              Everyone is encouraged to contact the author with improvements. 
Maybe this file
+#              becomes part of CMake distribution sometimes.
+
+# - Find pcre2
+# Find the native PCRE2 headers and libraries.
+#
+# PCRE2_INCLUDE_DIRS   - where to find pcre.h, etc.
+# PCRE2_LIBRARIES      - List of libraries when using pcre.
+# PCRE2_FOUND  - True if pcre found.
+
+# Look for the header file.
+FIND_PATH(PCRE2_INCLUDE_DIR NAMES pcre2.h)
+
+# Look for the library.
+FIND_LIBRARY(PCRE2_LIBRARY NAMES pcre2-8)
+
+# Handle the QUIETLY and REQUIRED arguments and set PCRE2_FOUND to TRUE if all 
listed variables are TRUE.
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 DEFAULT_MSG PCRE2_LIBRARY 
PCRE2_INCLUDE_DIR)
+
+# Copy the results to the output variables.
+IF(PCRE2_FOUND)
+       SET(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
+       SET(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
+ELSE(PCRE2_FOUND)
+       SET(PCRE2_LIBRARIES)
+       SET(PCRE2_INCLUDE_DIRS)
+ENDIF(PCRE2_FOUND)
+
+MARK_AS_ADVANCED(PCRE2_INCLUDE_DIRS PCRE2_LIBRARIES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/INSTALL.md 
new/editorconfig-core-c-0.12.3/INSTALL.md
--- old/editorconfig-core-c-0.12.1/INSTALL.md   2016-03-18 05:04:05.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/INSTALL.md   2018-11-16 01:10:15.000000000 
+0100
@@ -6,13 +6,13 @@
 Installing from a binary package
 ================================
 
-Binary packages can be downloaded 
[here](http://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/).
+Windows binary packages can be downloaded 
[here](http://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/).
 
 Windows users can also install EditorConfig core by 
[Chocolatey](http://chocolatey.org/packages/editorconfig.core).
 
 Debian (Jessie and later): `apt-get install editorconfig`
 
-ArchLinux: An [Arch AUR 
package](https://aur.archlinux.org/packages/editorconfig-core-c) is available.
+ArchLinux: `pacman -S editorconfig-core-c`
 
 Mac OS X users can `brew install editorconfig` with [Homebrew](http://brew.sh).
 Generally Linux users can also install with 
[LinuxBrew](https://github.com/Homebrew/linuxbrew)
@@ -28,8 +28,12 @@
 - Homebrew on OS X: `brew install cmake pcre`
 - Ubuntu/Debian: `apt-get install cmake libpcre3-dev`
 
-Make sure cmake is in your PATH environment variable. Switch to the root
-directory of editorconfig and execute the following command:
+Make sure cmake is in your PATH environment variable. on Windows, you also need
+to build pcre from source. If you want to build the MT version of this library,
+after running `cmake .` in the pcre source directory, please replace all
+occurrence of "MD" with "MT" in the CMakeCache.txt.
+
+Switch to the root directory of editorconfig and execute the following command:
 
     cmake .
 
@@ -43,7 +47,9 @@
 
     -DBUILD_STATICALLY_LINKED_EXE=[ON|OFF]  Default: OFF
     If this option is on, the executable will be linked statically to all
-    libraries. This option is currently only valid for gcc.
+    libraries. On MSVC, this means that EditorConfig will be statically
+    linked to the executable. On GCC, this means all libraries (glibc and 
+    EditorConfig) are statically linked to the executable.
     e.g. cmake -DBUILD_STATICALLY_LINKED_EXE=ON .
 
     -DINSTALL_HTML_DOC=[ON|OFF]             Default: OFF
@@ -59,7 +65,7 @@
     -DMSVC_MD=[ON|OFF]                      Default: OFF
     Use /MD instead of /MT flag when compiling with Microsoft Visual C++. This
     option takes no effect when using compilers other than Microsoft Visual
-    C++.
+    C++. Note that the option chosen here must be consistent with pcre.
     e.g. We want to use /MD instead of /MT when compiling with MSVC.
     cmake -DMSVC_MD=ON .
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/README.md 
new/editorconfig-core-c-0.12.3/README.md
--- old/editorconfig-core-c-0.12.1/README.md    2016-03-18 05:04:05.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/README.md    2018-11-16 01:10:15.000000000 
+0100
@@ -2,6 +2,7 @@
 ================
 
 [![Build 
Status](https://secure.travis-ci.org/editorconfig/editorconfig-core-c.svg?branch=master)](http://travis-ci.org/editorconfig/editorconfig-core-c)
+[![Build 
status](https://ci.appveyor.com/api/projects/status/u9t8m4uech5kejoi/branch/master?svg=true)](https://ci.appveyor.com/project/xuhdev/editorconfig-core-c/branch/master)
 
 EditorConfig makes it easy to maintain the correct coding style when switching
 between different text editors and between different projects.  The
@@ -22,17 +23,13 @@
 When developing an editor plugin for reading EditorConfig files, the
 EditorConfig core code can be used to locate and parse these files. This means
 the file locator, INI parser, and file globbing mechanisms can all be
-maintained in one code base, resulting in less code repitition between plugins.
+maintained in one code base, resulting in less code repetition between plugins.
 
 
 Installation
 ------------
 
-To install the EditorConfig core from source see the [INSTALL.md][] file.
-
-Binary installation packages for the EditorConfig core can be found on
-[SourceForge downloads page][downloads].
-
+See the [INSTALL.md][] file for instructions.
 
 Getting Help
 ------------
@@ -55,8 +52,8 @@
 Unless otherwise stated, all files are distributed under the Simplified BSD
 license. The inih(`src/lib/ini.c` and `src/lib/ini.h`) library is distributed
 under the New BSD license. `src/lib/utarray.h` is distributed under the Revised
-BSD License. The See LICENSE file for details. Some code in src/lib/misc.c is
-idstributed under their own license (see the source file for details). See the
+BSD License. The See LICENSE file for details. Some code in `src/lib/misc.c` is
+distributed under their own license (see the source file for details). See the
 LICENSE file for details.
 
 [EditorConfig]: http://editorconfig.org "EditorConfig Homepage"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/appveyor.yml 
new/editorconfig-core-c-0.12.3/appveyor.yml
--- old/editorconfig-core-c-0.12.1/appveyor.yml 1970-01-01 01:00:00.000000000 
+0100
+++ new/editorconfig-core-c-0.12.3/appveyor.yml 2018-11-16 01:10:15.000000000 
+0100
@@ -0,0 +1,42 @@
+image:
+  - Visual Studio 2017
+  
+environment:
+  CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64'
+  CONFIG: Release
+  ARCH: x64
+  CMAKE_INSTALL_PREFIX: ..\build
+  PCRE2_DEST: C:\projects\bin\%ARCH%-static\pcre2
+  CORE_DEST: C:\projects\bin\%ARCH%-static\core
+
+install:
+  - cmake --version
+  - git submodule init
+  - git submodule update
+  - cd C:\projects
+  # Download PCRE2 sources
+  - curl -o pcre2.zip https://ftp.pcre.org/pub/pcre/pcre2-10.32.zip
+  - 7z x -y pcre2.zip > nul
+  - rename pcre2-10.32 pcre2
+  # Build and install PCRE2
+  - mkdir %PCRE2_DEST%
+  - cd %PCRE2_DEST%
+  - cmake -G "%CMAKE_GENERATOR%" 
-DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DPCRE2_STATIC_RUNTIME="ON" 
-DBUILD_SHARED_LIBS="OFF" -DPCRE2_BUILD_PCRE2GREP="OFF" 
-DPCRE2_BUILD_TESTS="OFF" C:\projects\pcre2
+  - cd %PCRE2_DEST%
+  - cmake --build %PCRE2_DEST% --target install -- /p:Configuration=%CONFIG%
+
+build_script:
+  # Build and install editorconfig-core-c
+  - mkdir %CORE_DEST%
+  - cd %CORE_DEST%
+  - cmake -G "%CMAKE_GENERATOR%" 
-DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DMSVC_MD="OFF" 
-DPCRE2_STATIC="ON" C:\projects\editorconfig-core-c
+  - cmake --build %CORE_DEST% --target install -- /p:Configuration=%CONFIG%
+
+test_script:
+  # Run the core tests
+  - cd %CORE_DEST%
+  - ctest -E utf_8_char -VV --output-on-failure .
+
+on_failure:
+  - echo. && echo. && echo. && echo "Tests for editorconfig-core-c failed. 
Here is their detailed output:" && echo. && echo. && echo.
+  - type C:\projects\bin\x64-static\core\Testing\Temporary\LastTest.log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/doc/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/doc/CMakeLists.txt
--- old/editorconfig-core-c-0.12.1/doc/CMakeLists.txt   2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/doc/CMakeLists.txt   2018-11-16 
01:10:15.000000000 +0100
@@ -107,17 +107,17 @@
         # we need to exclude it when installing man3. Same for
         # editorconfig-format.3
         install(DIRECTORY ${EC_MANPAGE3_DIR}
-            DESTINATION share/man
+            DESTINATION "${CMAKE_INSTALL_MANDIR}"
             PATTERN editorconfig.3 EXCLUDE
             PATTERN editorconfig-format.3 EXCLUDE
             REGEX ._include_. EXCLUDE)
 
         install(FILES
             ${EC_MANPAGE1_DIR}/editorconfig.1
-            DESTINATION share/man/man1)
+            DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
         install(FILES
             ${EC_MANPAGE5_DIR}/editorconfig-format.5
-            DESTINATION share/man/man5)
+            DESTINATION "${CMAKE_INSTALL_MANDIR}/man5")
 
         # "make clean" should also clean generated docs
         set_directory_properties(PROPERTIES
@@ -125,7 +125,7 @@
 
         if(INSTALL_HTML_DOC)
             install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
-                DESTINATION share/doc/editorconfig)
+                DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/editorconfig")
         endif(INSTALL_HTML_DOC)
 
     else(DOXYGEN_FOUND)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/include/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/include/CMakeLists.txt
--- old/editorconfig-core-c-0.12.1/include/CMakeLists.txt       2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/include/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -27,5 +27,5 @@
 install(FILES
     editorconfig/editorconfig.h
     editorconfig/editorconfig_handle.h
-    DESTINATION include/editorconfig)
+    DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/editorconfig")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.1/include/editorconfig/editorconfig.h 
new/editorconfig-core-c-0.12.3/include/editorconfig/editorconfig.h
--- old/editorconfig-core-c-0.12.1/include/editorconfig/editorconfig.h  
2016-03-18 05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/include/editorconfig/editorconfig.h  
2018-11-16 01:10:15.000000000 +0100
@@ -161,11 +161,17 @@
  *
  * @endmanonly
  *
- * The backslash character (\) can be used to escape a character so it is not 
interpreted as a special character.
+ * The backslash character (\) can be used to escape a character so it is not
+ * interpreted as a special character.
+ *
+ * The maximum length of a section name is 4096 characters. All sections
+ * exceeding this limit are ignored.
  *
  * @section properties Supported Properties
  *
- * EditorConfig file sections contain properties, which are name-value pairs 
separated by an equal sign (=). EditorConfig plugins will ignore unrecognized 
property names and properties with invalid values.
+ * EditorConfig file sections contain properties, which are name-value pairs
+ * separated by an equal sign (=). EditorConfig plugins will ignore 
unrecognized
+ * property names and properties with invalid values.
  *
  * Here is the list of all property names understood by EditorConfig and all 
valid values for these properties:
  *
@@ -180,7 +186,14 @@
  * <li><strong>root</strong>: special property that should be specified at the 
top of the file outside of any sections. Set to "true" to stop 
<code>.editorconfig</code> files search on current file. The value is case 
insensitive.</li>
  * </ul>
  *
- * Property names are case insensitive and all property names are lowercased 
when parsing.
+ * For any property, a value of "unset" is to remove the effect of that
+ * property, even if it has been set before. For example, add "indent_size =
+ * unset" to undefine indent_size property (and use editor default).
+ *
+ * Property names are case insensitive and all property names are lowercased
+ * when parsing. The maximum length of a property name is 50 characters and the
+ * maximum length of a property value is 255 characters. Any property beyond
+ * these limits would be ignored.
  */
 
 /*!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/mk-src-archive.sh 
new/editorconfig-core-c-0.12.3/mk-src-archive.sh
--- old/editorconfig-core-c-0.12.1/mk-src-archive.sh    2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/mk-src-archive.sh    2018-11-16 
01:10:15.000000000 +0100
@@ -10,5 +10,5 @@
   exit
 fi
 
-curl -L https://raw.github.com/Kentzo/git-archive-all/master/git-archive-all | 
python - editorconfig-core-c-$*.tar.gz
-curl -L https://raw.github.com/Kentzo/git-archive-all/master/git-archive-all | 
python - editorconfig-core-c-$*.zip
+curl -L 
https://raw.githubusercontent.com/Kentzo/git-archive-all/master/git_archive_all.py
 | python - editorconfig-core-c-$*.tar.gz
+curl -L 
https://raw.githubusercontent.com/Kentzo/git-archive-all/master/git_archive_all.py
 | python - editorconfig-core-c-$*.zip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/src/CMakeLists.txt
--- old/editorconfig-core-c-0.12.1/src/CMakeLists.txt   2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/CMakeLists.txt   2018-11-16 
01:10:15.000000000 +0100
@@ -27,11 +27,11 @@
 include(CheckFunctionExists)
 include(CheckTypeSize)
 
-find_package(PCRE REQUIRED)
+find_package(PCRE2 REQUIRED)
 
-if(PCRE_FOUND)
-    include_directories(BEFORE ${PCRE_INCLUDE_DIRS})
-    option(PCRE_STATIC "Turn this option ON when linking to PCRE static 
library" OFF)
+if(PCRE2_FOUND)
+    include_directories(BEFORE ${PCRE2_INCLUDE_DIRS})
+    option(PCRE2_STATIC "Turn this option ON when linking to PCRE2 static 
library" OFF)
 endif()
 
 # config.h will be generated in src/auto, we should include it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/bin/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/src/bin/CMakeLists.txt
--- old/editorconfig-core-c-0.12.1/src/bin/CMakeLists.txt       2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/bin/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -32,13 +32,16 @@
 endif(CMAKE_COMPILER_IS_GNUCC)
 
 option(BUILD_STATICALLY_LINKED_EXE
-    "Link the standard library statically when building the executable.(Only 
valid for gcc)"
+    "Statically link all libraries when building the executable."
     ${BUILD_STATICALLY_LINKED_EXE_DEFAULT_VAL})
 
 if(CMAKE_COMPILER_IS_GNUCC)
     if(BUILD_STATICALLY_LINKED_EXE)
         # Add -static for linker if we want a statically linked executable
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
+
+        # libpcre2 might be dynamically linked against pthreads (at least on 
Ubuntu Xenial)
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif(BUILD_STATICALLY_LINKED_EXE)
 endif(CMAKE_COMPILER_IS_GNUCC)
 
@@ -47,12 +50,15 @@
 
 # targets
 add_executable(editorconfig_bin ${editorconfig_BINSRCS})
-target_link_libraries(editorconfig_bin editorconfig_static)
+if(BUILD_STATICALLY_LINKED_EXE)
+    target_link_libraries(editorconfig_bin editorconfig_static)
+else(BUILD_STATICALLY_LINKED_EXE)
+    target_link_libraries(editorconfig_bin editorconfig_shared)
+endif(BUILD_STATICALLY_LINKED_EXE)
 set_target_properties(editorconfig_bin PROPERTIES
     OUTPUT_NAME editorconfig
-    VERSION
-    
${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_PATCH})
+    VERSION ${PROJECT_VERSION})
 
 install(TARGETS editorconfig_bin
-    RUNTIME DESTINATION bin)
+    RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/bin/main.c 
new/editorconfig-core-c-0.12.3/src/bin/main.c
--- old/editorconfig-core-c-0.12.1/src/bin/main.c       2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/bin/main.c       2018-11-16 
01:10:15.000000000 +0100
@@ -223,7 +223,8 @@
             /* print error message */
             fputs(editorconfig_get_error_msg(err_num), stderr);
             if (err_num > 0)
-                fprintf(stderr, "\"%s\"", 
editorconfig_handle_get_err_file(eh));
+                fprintf(stderr, ":%d \"%s\"", err_num,
+                        editorconfig_handle_get_err_file(eh));
             fprintf(stderr, "\n");
             exit(1);
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/config.h.in 
new/editorconfig-core-c-0.12.3/src/config.h.in
--- old/editorconfig-core-c-0.12.1/src/config.h.in      2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/config.h.in      2018-11-16 
01:10:15.000000000 +0100
@@ -52,7 +52,8 @@
 #cmakedefine CMAKE_COMPILER_IS_GNUCC
 #cmakedefine MSVC
 
-#cmakedefine PCRE_STATIC
+#cmakedefine PCRE2_STATIC
+#define PCRE2_CODE_UNIT_WIDTH 8
 
 /* For gcc, we define _GNU_SOURCE to use gcc extensions */
 #ifdef CMAKE_COMPILER_IS_GNUCC
@@ -71,10 +72,10 @@
 # define _Bool signed char
 #endif
 
-#define editorconfig_VERSION_MAJOR @editorconfig_VERSION_MAJOR@
-#define editorconfig_VERSION_MINOR @editorconfig_VERSION_MINOR@
-#define editorconfig_VERSION_PATCH @editorconfig_VERSION_PATCH@
-#define editorconfig_VERSION_SUFFIX "@editorconfig_VERSION_SUFFIX@"
+#define EC_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
+#define EC_VERSION_MINOR @PROJECT_VERSION_MINOR@
+#define EC_VERSION_PATCH @PROJECT_VERSION_PATCH@
+#define EC_VERSION_SUFFIX "@PROJECT_VERSION_SUFFIX@"
 
 
 #endif /* !__CONFIG_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/lib/CMakeLists.txt 
new/editorconfig-core-c-0.12.3/src/lib/CMakeLists.txt
--- old/editorconfig-core-c-0.12.1/src/lib/CMakeLists.txt       2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/CMakeLists.txt       2018-11-16 
01:10:15.000000000 +0100
@@ -24,8 +24,6 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-include(GNUInstallDirs)
-
 set(editorconfig_LIBSRCS
     ec_glob.c
     editorconfig.c
@@ -38,29 +36,63 @@
 set_target_properties(editorconfig_shared PROPERTIES
     OUTPUT_NAME editorconfig
     SOVERSION 0
-    VERSION
-    
${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_PATCH})
+    VERSION ${PROJECT_VERSION})
 
 # We need to link Shwapi since we use PathIsRelative
 if(WIN32)
     target_link_libraries(editorconfig_shared Shlwapi)
 endif()
-target_link_libraries(editorconfig_shared ${PCRE_LIBRARIES})
+target_link_libraries(editorconfig_shared ${PCRE2_LIBRARIES})
 
 add_library(editorconfig_static STATIC ${editorconfig_LIBSRCS})
 set_target_properties(editorconfig_static PROPERTIES
     OUTPUT_NAME editorconfig_static
-    VERSION
-    
${editorconfig_VERSION_MAJOR}.${editorconfig_VERSION_MINOR}.${editorconfig_VERSION_PATCH})
+    VERSION ${PROJECT_VERSION})
 
 # We need to link Shwapi since we use PathIsRelative
 if(WIN32)
     target_link_libraries(editorconfig_static Shlwapi)
 endif()
-target_link_libraries(editorconfig_static ${PCRE_LIBRARIES})
+target_link_libraries(editorconfig_static ${PCRE2_LIBRARIES})
+
+# EditorConfig package name for find_package() and the CMake package registry.
+# On UNIX the system registry is usually just "lib/cmake/<package>".
+# See cmake-package(7) for details.
+set(config_package_name "EditorConfig")
+set(editorconfig_CONFIG_NAME "${config_package_name}Config")
+set(editorconfig_CONFIG_VERSION_NAME "${config_package_name}ConfigVersion")
+set(editorconfig_CONFIG_EXPORT_NAME "${config_package_name}Targets")
+set(editorconfig_CONFIG_INSTALL_LIBDIR
+    "${CMAKE_INSTALL_LIBDIR}/cmake/${config_package_name}")
 
 install(TARGETS editorconfig_shared editorconfig_static
+    EXPORT ${editorconfig_CONFIG_EXPORT_NAME}
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
+configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/editorconfig.pc.in
+    ${CMAKE_CURRENT_BINARY_DIR}/editorconfig.pc
+    @ONLY)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/editorconfig.pc
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+include(CMakePackageConfigHelpers)
+
+configure_package_config_file(${editorconfig_CONFIG_NAME}.cmake.in
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_NAME}.cmake
+    INSTALL_DESTINATION ${editorconfig_CONFIG_INSTALL_LIBDIR})
+
+write_basic_package_version_file(
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_VERSION_NAME}.cmake
+    COMPATIBILITY AnyNewerVersion)
+
+install(FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_NAME}.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/${editorconfig_CONFIG_VERSION_NAME}.cmake
+    DESTINATION ${editorconfig_CONFIG_INSTALL_LIBDIR})
+
+install(EXPORT ${editorconfig_CONFIG_EXPORT_NAME}
+    DESTINATION ${editorconfig_CONFIG_INSTALL_LIBDIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.1/src/lib/EditorConfigConfig.cmake.in 
new/editorconfig-core-c-0.12.3/src/lib/EditorConfigConfig.cmake.in
--- old/editorconfig-core-c-0.12.1/src/lib/EditorConfigConfig.cmake.in  
1970-01-01 01:00:00.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/EditorConfigConfig.cmake.in  
2018-11-16 01:10:15.000000000 +0100
@@ -0,0 +1,3 @@
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/@editorconfig_CONFIG_EXPORT_NAME@.cmake")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/lib/ec_glob.c 
new/editorconfig-core-c-0.12.3/src/lib/ec_glob.c
--- old/editorconfig-core-c-0.12.1/src/lib/ec_glob.c    2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/ec_glob.c    2018-11-16 
01:10:15.000000000 +0100
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014 Hong Xu <hong AT topbug DOT net>
+ * Copyright (c) 2018 Sven Strickroth <email AT cs-ware DOT de>
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -28,7 +29,7 @@
 
 #include <ctype.h>
 #include <string.h>
-#include <pcre.h>
+#include <pcre2.h>
 
 #define oom() { return -1; }
 #include "utarray.h"
@@ -36,6 +37,9 @@
 
 #include "ec_glob.h"
 
+/* Special characters */
+const char ec_special_chars[] = "?[]\\*-{},";
+
 typedef struct int_pair
 {
     int     num1;
@@ -52,7 +56,7 @@
     p += string_len; \
 } while(0)
 
-#define PATTERN_MAX  300
+#define PATTERN_MAX  4097
 /*
  * Whether the string matches the given glob pattern
  */
@@ -67,14 +71,13 @@
     char *                    pcre_str_end;
     int                       brace_level = 0;
     _Bool                     is_in_bracket = 0;
-    const char *              error_msg;
-    int                       erroffset;
-    pcre *                    re;
+    int                       error_code;
+    size_t                    erroffset;
+    pcre2_code *              re;
     int                       rc;
-    int *                     pcre_result;
-    size_t                    pcre_result_len;
+    size_t *                  pcre_result;
+    pcre2_match_data *        pcre_match_data;
     char                      l_pattern[2 * PATTERN_MAX];
-    int                       pattern_length = strlen(pattern);
     _Bool                     are_brace_paired;
     UT_array *                nums;     /* number ranges */
     int                       ret = 0;
@@ -104,8 +107,8 @@
     }
 
     /* used to search for {num1..num2} case */
-    re = pcre_compile("^\\{[\\+\\-]?\\d+\\.\\.[\\+\\-]?\\d+\\}$", 0,
-            &error_msg, &erroffset, NULL);
+    re = pcre2_compile("^\\{[\\+\\-]?\\d+\\.\\.[\\+\\-]?\\d+\\}$", 
PCRE2_ZERO_TERMINATED, 0,
+            &error_code, &erroffset, NULL);
     if (!re)        /* failed to compile */
         return -1;
 
@@ -169,11 +172,21 @@
                 {
                     char *           right_bracket = strchr(c, ']');
 
+                    if (!right_bracket)  /* The right bracket may not exist */
+                        right_bracket = c + strlen(c);
+
                     strcat(p_pcre, "\\");
                     strncat(p_pcre, c, right_bracket - c);
-                    strcat(p_pcre, "\\]");
+                    if (*right_bracket)  /* right_bracket is a bracket */
+                        strcat(p_pcre, "\\]");
                     p_pcre += strlen(p_pcre);
                     c = right_bracket;
+                    if (!*c)
+                        /* end of string, meaning that right_bracket is not a
+                         * bracket. Then we go back one character to make the
+                         * parsing end normally for the counter in the "for"
+                         * loop. */
+                        c -= 1;
                     break;
                 }
             }
@@ -235,11 +248,13 @@
                 {
                     const char *        double_dots;
                     int_pair            pair;
-                    int                 pcre_res[3];
+
+                    pcre2_match_data *  match_data = 
pcre2_match_data_create_from_pattern(re, NULL);
 
                     /* Check the case of {num1..num2} */
-                    rc = pcre_exec(re, NULL, c, (int) (cc - c + 1), 0, 0,
-                            pcre_res, 3);
+                    rc = pcre2_match(re, c, cc - c + 1, 0, 0, match_data, 
NULL);
+
+                    pcre2_match_data_free(match_data);
 
                     if (rc < 0)    /* not {num1..num2} case */
                     {
@@ -309,34 +324,35 @@
 
     *(p_pcre ++) = '$';
 
-    pcre_free(re); /* ^\\d+\\.\\.\\d+$ */
+    pcre2_code_free(re); /* ^\\d+\\.\\.\\d+$ */
 
-    re = pcre_compile(pcre_str, 0, &error_msg, &erroffset, NULL);
+    re = pcre2_compile(pcre_str, PCRE2_ZERO_TERMINATED, 0, &error_code, 
&erroffset, NULL);
 
     if (!re)        /* failed to compile */
+    {
+        utarray_free(nums);
         return -1;
+    }
 
-    pcre_result_len = 3 * (utarray_len(nums) + 1);
-    pcre_result = (int *) calloc(pcre_result_len, sizeof(int_pair));
-    rc = pcre_exec(re, NULL, string, (int) strlen(string), 0, 0,
-            pcre_result, pcre_result_len);
+    pcre_match_data = pcre2_match_data_create_from_pattern(re, NULL);
+    rc = pcre2_match(re, string, strlen(string), 0, 0, pcre_match_data, NULL);
 
     if (rc < 0)     /* failed to match */
     {
-        int         ret;
-        if (rc == PCRE_ERROR_NOMATCH)
+        if (rc == PCRE2_ERROR_NOMATCH)
             ret = EC_GLOB_NOMATCH;
         else
             ret = rc;
 
-        pcre_free(re);
-        free(pcre_result);
+        pcre2_code_free(re);
+        pcre2_match_data_free(pcre_match_data);
         utarray_free(nums);
 
         return ret;
     }
 
     /* Whether the numbers are in the desired range? */
+    pcre_result = pcre2_get_ovector_pointer(pcre_match_data);
     for(p = (int_pair *) utarray_front(nums), i = 1; p;
             ++ i, p = (int_pair *) utarray_next(nums, p))
     {
@@ -360,8 +376,8 @@
     if (p != NULL)      /* numbers not matched */
         ret = EC_GLOB_NOMATCH;
 
-    pcre_free(re);
-    free(pcre_result);
+    pcre2_code_free(re);
+    pcre2_match_data_free(pcre_match_data);
     utarray_free(nums);
 
     return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/lib/ec_glob.h 
new/editorconfig-core-c-0.12.3/src/lib/ec_glob.h
--- old/editorconfig-core-c-0.12.1/src/lib/ec_glob.h    2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/ec_glob.h    2018-11-16 
01:10:15.000000000 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Hong Xu <hong AT topbug DOT net>
+ * Copyright (c) 2014-2018 Hong Xu <hong AT topbug DOT net>
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,10 @@
 #endif
 EDITORCONFIG_LOCAL
 int ec_glob(const char * pattern, const char * string);
+
+/* Special characters. */
+extern const char ec_special_chars[];
+
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/lib/editorconfig.c 
new/editorconfig-core-c-0.12.3/src/lib/editorconfig.c
--- old/editorconfig-core-c-0.12.1/src/lib/editorconfig.c       2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/editorconfig.c       2018-11-16 
01:10:15.000000000 +0100
@@ -89,7 +89,7 @@
             !strcmp(nv->name, "charset"))
         strlwr(nv->value);
 
-    /* set speical pointers */
+    /* set special pointers */
     set_special_property_name_value_pointers(nv, spnvp);
 }
 
@@ -228,16 +228,34 @@
         return 1;
     }
 
-    /* pattern would be: /dir/of/editorconfig/file[double_star]/[section] if
+    /* Pattern would be: /dir/of/editorconfig/file[double_star]/[section] if
      * section does not contain '/', or /dir/of/editorconfig/file[section]
      * if section starts with a '/', or /dir/of/editorconfig/file/[section] if
-     * section contains '/' but does not start with '/' */
+     * section contains '/' but does not start with '/'.
+     *
+     * If the dir part has any special characters as defined by ec_glob.c, we
+     * need to escape them.
+     */
     pattern = (char*)malloc(
-            strlen(hfparam->editorconfig_file_dir) * sizeof(char) +
+        /* The 2 here is for possible escaping. */
+        strlen(hfparam->editorconfig_file_dir) * sizeof(char) * 2 +
             sizeof("**/") + strlen(section) * sizeof(char));
     if (!pattern)
         return 0;
-    strcpy(pattern, hfparam->editorconfig_file_dir);
+
+    /* Escaping special characters in the directory part. */
+    char* ptr = hfparam->editorconfig_file_dir;
+    char* ptr_prev = ptr;
+    char* ptr_pattern = pattern;
+    for (; ptr = strpbrk(ptr, ec_special_chars); ++ ptr, ptr_prev = ptr)
+    {
+        ptrdiff_t s = ptr - ptr_prev;
+        memcpy(ptr_pattern, ptr_prev, s * sizeof(char));
+        ptr_pattern += s;
+        *(ptr_pattern ++) = '\\';  /* escaping char */
+        *(ptr_pattern ++) = *ptr;
+    }
+    strcpy(ptr_pattern, ptr_prev);
 
     if (strchr(section, '/') == NULL) /* No / is found, append '[star][star]/' 
*/
         strcat(pattern, "**/");
@@ -409,7 +427,7 @@
     if (editorconfig_compare_version(&eh->ver, &cur_ver) > 0)
         return EDITORCONFIG_PARSE_VERSION_TOO_NEW;
 
-    if (!eh->err_file) {
+    if (eh->err_file) {
         free(eh->err_file);
         eh->err_file = NULL;
     }
@@ -523,11 +541,11 @@
 void editorconfig_get_version(int* major, int* minor, int* patch)
 {
     if (major)
-        *major = editorconfig_VERSION_MAJOR;
+        *major = EC_VERSION_MAJOR;
     if (minor)
-        *minor = editorconfig_VERSION_MINOR;
+        *minor = EC_VERSION_MINOR;
     if (patch)
-        *patch = editorconfig_VERSION_PATCH;
+        *patch = EC_VERSION_PATCH;
 }
 
 /*
@@ -536,5 +554,5 @@
 EDITORCONFIG_EXPORT
 const char* editorconfig_get_version_suffix(void)
 {
-    return editorconfig_VERSION_SUFFIX;
+    return EC_VERSION_SUFFIX;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.1/src/lib/editorconfig.pc.in 
new/editorconfig-core-c-0.12.3/src/lib/editorconfig.pc.in
--- old/editorconfig-core-c-0.12.1/src/lib/editorconfig.pc.in   1970-01-01 
01:00:00.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/editorconfig.pc.in   2018-11-16 
01:10:15.000000000 +0100
@@ -0,0 +1,9 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+ 
+Name: editorconfig
+Description: Library handling EditorConfig files, a file format defining 
coding styles in projects.
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -leditorconfig
+Cflags: -I${includedir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/editorconfig-core-c-0.12.1/src/lib/editorconfig_handle.c 
new/editorconfig-core-c-0.12.3/src/lib/editorconfig_handle.c
--- old/editorconfig-core-c-0.12.1/src/lib/editorconfig_handle.c        
2016-03-18 05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/editorconfig_handle.c        
2018-11-16 01:10:15.000000000 +0100
@@ -112,7 +112,7 @@
         ((struct editorconfig_handle*)h)->ver.minor = minor;
 
     if (patch >= 0)
-        ((struct editorconfig_handle*)h)->ver.patch = minor;
+        ((struct editorconfig_handle*)h)->ver.patch = patch;
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/lib/ini.c 
new/editorconfig-core-c-0.12.3/src/lib/ini.c
--- old/editorconfig-core-c-0.12.1/src/lib/ini.c        2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/ini.c        2018-11-16 
01:10:15.000000000 +0100
@@ -40,7 +40,7 @@
 
 #include "ini.h"
 
-#define MAX_LINE 200
+#define MAX_LINE 5000
 #define MAX_SECTION MAX_SECTION_NAME
 #define MAX_NAME MAX_PROPERTY_NAME
 
@@ -104,8 +104,8 @@
 {
     /* Uses a fair bit of stack (use heap instead if you need to) */
     char line[MAX_LINE];
-    char section[MAX_SECTION] = "";
-    char prev_name[MAX_NAME] = "";
+    char section[MAX_SECTION+1] = "";
+    char prev_name[MAX_NAME+1] = "";
 
     char* start;
     char* end;
@@ -144,6 +144,9 @@
             end = find_last_char_or_comment(start + 1, ']');
             if (*end == ']') {
                 *end = '\0';
+                /* Section name too long. Skipped. */
+                if (end - start - 1 > MAX_SECTION_NAME)
+                    continue;
                 strncpy0(section, start + 1, sizeof(section));
                 *prev_name = '\0';
             }
@@ -167,6 +170,11 @@
                     *end = '\0';
                 rstrip(value);
 
+                /* Either name or value is too long. Skip it. */
+                if (strlen(name) > MAX_PROPERTY_NAME ||
+                    strlen(value) > MAX_PROPERTY_VALUE)
+                    continue;
+
                 /* Valid name[=:]value pair found, call handler */
                 strncpy0(prev_name, name, sizeof(prev_name));
                 if (!handler(user, section, name, value) && !error)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/editorconfig-core-c-0.12.1/src/lib/ini.h 
new/editorconfig-core-c-0.12.3/src/lib/ini.h
--- old/editorconfig-core-c-0.12.1/src/lib/ini.h        2016-03-18 
05:04:05.000000000 +0100
+++ new/editorconfig-core-c-0.12.3/src/lib/ini.h        2018-11-16 
01:10:15.000000000 +0100
@@ -77,8 +77,9 @@
 #define INI_ALLOW_MULTILINE 0
 #endif
 
-#define MAX_SECTION_NAME 500
-#define MAX_PROPERTY_NAME 500
+#define MAX_SECTION_NAME 4096
+#define MAX_PROPERTY_NAME 50
+#define MAX_PROPERTY_VALUE 255
 
 /* Nonzero to allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of
    the file. See http://code.google.com/p/inih/issues/detail?id=21 */


Reply via email to