+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/.clang-format polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/.clang-format
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/.clang-format 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/.clang-format 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,47 @@
++---
++# BasedOnStyle: LLVM
++AccessModifierOffset: -2
++ConstructorInitializerIndentWidth: 4
++AlignEscapedNewlinesLeft: false
++AlignTrailingComments: true
++AllowAllParametersOfDeclarationOnNextLine: true
++AllowShortIfStatementsOnASingleLine: false
++AllowShortLoopsOnASingleLine: false
++AlwaysBreakTemplateDeclarations: false
++AlwaysBreakBeforeMultilineStrings: false
++BreakBeforeBinaryOperators: false
++BreakBeforeTernaryOperators: true
++BreakConstructorInitializersBeforeComma: false
++BinPackParameters: false
++ColumnLimit: 80
++ConstructorInitializerAllOnOneLineOrOnePerLine: false
++DerivePointerBinding: false
++ExperimentalAutoDetectBinPacking: false
++IndentCaseLabels: false
++MaxEmptyLinesToKeep: 1
++NamespaceIndentation: None
++ObjCSpaceBeforeProtocolList: true
++PenaltyBreakBeforeFirstCallParameter: 19
++PenaltyBreakComment: 60
++PenaltyBreakString: 1000
++PenaltyBreakFirstLessLess: 120
++PenaltyExcessCharacter: 1000000
++PenaltyReturnTypeOnItsOwnLine: 60
++PointerBindsToType: true
++SpacesBeforeTrailingComments: 1
++Cpp11BracedListStyle: false
++Standard: Cpp03
++IndentWidth: 2
++TabWidth: 8
++UseTab: Never
++BreakBeforeBraces: Attach
++IndentFunctionDeclarationAfterType: false
++SpacesInParentheses: false
++SpacesInAngles: false
++SpaceInEmptyParentheses: false
++SpacesInCStyleCastParentheses: false
++SpaceAfterControlStatementKeyword: true
++SpaceBeforeAssignmentOperators: true
++ContinuationIndentWidth: 4
++...
++
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/CMakeLists.txt polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/CMakeLists.txt
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/CMakeLists.txt 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,160 @@
++# vim: et ts=4 sts=4 sw=4 tw=0
++
++CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
++PROJECT(jsoncpp)
++ENABLE_TESTING()
++
++OPTION(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" ON)
++OPTION(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" ON)
++OPTION(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF)
++OPTION(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C and ISO C++" ON)
++OPTION(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
++OPTION(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" OFF)
++OPTION(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
++OPTION(BUILD_STATIC_LIBS "Build jsoncpp_lib static library." ON)
++
++# Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
++IF(NOT WIN32)
++ IF(NOT CMAKE_BUILD_TYPE)
++ SET(CMAKE_BUILD_TYPE Release CACHE STRING
++ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage."
++ FORCE)
++ ENDIF()
++ENDIF()
++
++# Enable runtime search path support for dynamic libraries on OSX
++IF(APPLE)
++ SET(CMAKE_MACOSX_RPATH 1)
++ENDIF()
++
++SET(DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build")
++SET(LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory")
++
++SET(RUNTIME_INSTALL_DIR bin
++ CACHE PATH "Install dir for executables and dlls")
++SET(ARCHIVE_INSTALL_DIR lib${LIB_SUFFIX}
++ CACHE PATH "Install dir for static libraries")
++SET(LIBRARY_INSTALL_DIR lib${LIB_SUFFIX}
++ CACHE PATH "Install dir for shared libraries")
++SET(INCLUDE_INSTALL_DIR include
++ CACHE PATH "Install dir for headers")
++SET(PACKAGE_INSTALL_DIR lib${LIB_SUFFIX}/cmake
++ CACHE PATH "Install dir for cmake package config files")
++MARK_AS_ADVANCED( RUNTIME_INSTALL_DIR ARCHIVE_INSTALL_DIR INCLUDE_INSTALL_DIR PACKAGE_INSTALL_DIR )
++
++# Set variable named ${VAR_NAME} to value ${VALUE}
++FUNCTION(set_using_dynamic_name VAR_NAME VALUE)
++ SET( "${VAR_NAME}" "${VALUE}" PARENT_SCOPE)
++ENDFUNCTION()
++
++# Extract major, minor, patch from version text
++# Parse a version string "X.Y.Z" and outputs
++# version parts in ${OUPUT_PREFIX}_MAJOR, _MINOR, _PATCH.
++# If parse succeeds then ${OUPUT_PREFIX}_FOUND is TRUE.
++MACRO(jsoncpp_parse_version VERSION_TEXT OUPUT_PREFIX)
++ SET(VERSION_REGEX "[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9_]+)?")
++ IF( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
++ STRING(REGEX MATCHALL "[0-9]+|-([A-Za-z0-9_]+)" VERSION_PARTS ${VERSION_TEXT})
++ LIST(GET VERSION_PARTS 0 ${OUPUT_PREFIX}_MAJOR)
++ LIST(GET VERSION_PARTS 1 ${OUPUT_PREFIX}_MINOR)
++ LIST(GET VERSION_PARTS 2 ${OUPUT_PREFIX}_PATCH)
++ set_using_dynamic_name( "${OUPUT_PREFIX}_FOUND" TRUE )
++ ELSE( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
++ set_using_dynamic_name( "${OUPUT_PREFIX}_FOUND" FALSE )
++ ENDIF()
++ENDMACRO()
++
++# Read out version from "version" file
++#FILE(STRINGS "version" JSONCPP_VERSION)
++#SET( JSONCPP_VERSION_MAJOR X )
++#SET( JSONCPP_VERSION_MINOR Y )
++#SET( JSONCPP_VERSION_PATCH Z )
++SET( JSONCPP_VERSION 1.7.7 )
++jsoncpp_parse_version( ${JSONCPP_VERSION} JSONCPP_VERSION )
++#IF(NOT JSONCPP_VERSION_FOUND)
++# MESSAGE(FATAL_ERROR "Failed to parse version string properly. Expect X.Y.Z")
++#ENDIF(NOT JSONCPP_VERSION_FOUND)
++SET( JSONCPP_SOVERSION 11 )
++SET( JSONCPP_USE_SECURE_MEMORY "0" CACHE STRING "-D...=1 to use memory-wiping allocator for STL" )
++
++MESSAGE(STATUS "JsonCpp Version: ${JSONCPP_VERSION_MAJOR}.${JSONCPP_VERSION_MINOR}.${JSONCPP_VERSION_PATCH}")
++# File version.h is only regenerated on CMake configure step
++CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/src/lib_json/version.h.in"
++ "${PROJECT_SOURCE_DIR}/include/json/version.h"
++ NEWLINE_STYLE UNIX )
++CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/version.in"
++ "${PROJECT_SOURCE_DIR}/version"
++ NEWLINE_STYLE UNIX )
++
++macro(UseCompilationWarningAsError)
++ if ( MSVC )
++ # Only enabled in debug because some old versions of VS STL generate
++ # warnings when compiled in release configuration.
++ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX ")
++ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
++ if (JSONCPP_WITH_STRICT_ISO)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
++ endif ()
++ endif()
++endmacro()
++
++# Include our configuration header
++INCLUDE_DIRECTORIES( ${jsoncpp_SOURCE_DIR}/include )
++
++if ( MSVC )
++ # Only enabled in debug because some old versions of VS STL generate
++ # unreachable code warning when compiled in release configuration.
++ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W4 ")
++endif()
++
++if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
++ # using regular Clang or AppleClang
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Werror=conversion -Werror=sign-compare")
++elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
++ # using GCC
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra")
++ # not yet ready for -Wsign-conversion
++
++ if (JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion -pedantic")
++ endif ()
++elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
++ # using Intel compiler
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra -Werror=conversion")
++
++ if (JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
++ endif ()
++endif()
++
++find_program(CCACHE_FOUND ccache)
++if(CCACHE_FOUND)
++ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
++ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
++endif(CCACHE_FOUND)
++
++IF(JSONCPP_WITH_WARNING_AS_ERROR)
++ UseCompilationWarningAsError()
++ENDIF()
++
++IF(JSONCPP_WITH_PKGCONFIG_SUPPORT)
++ CONFIGURE_FILE(
++ "pkg-config/jsoncpp.pc.in"
++ "pkg-config/jsoncpp.pc"
++ @ONLY)
++ INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkg-config/jsoncpp.pc"
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
++ENDIF()
++
++IF(JSONCPP_WITH_CMAKE_PACKAGE)
++ INSTALL(EXPORT jsoncpp
++ DESTINATION ${PACKAGE_INSTALL_DIR}/jsoncpp
++ FILE jsoncppConfig.cmake)
++ENDIF()
++
++# Build the different applications
++ADD_SUBDIRECTORY( src )
++
++#install the includes
++ADD_SUBDIRECTORY( include )
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/dev.makefile polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/dev.makefile
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/dev.makefile 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/dev.makefile 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,35 @@
++# This is only for jsoncpp developers/contributors.
++# We use this to sign releases, generate documentation, etc.
++VER?=$(shell cat version)
++
++default:
++ @echo "VER=${VER}"
++sign: jsoncpp-${VER}.tar.gz
++ gpg --armor --detach-sign $<
++ gpg --verify $<.asc
++ # Then upload .asc to the release.
++jsoncpp-%.tar.gz:
++ curl https://github.com/open-source-parsers/jsoncpp/archive/$*.tar.gz -o $@
++dox:
++ python doxybuild.py --doxygen=$$(which doxygen) --in doc/web_doxyfile.in
++ rsync -va --delete dist/doxygen/jsoncpp-api-html-${VER}/ ../jsoncpp-docs/doxygen/
++ # Then 'git add -A' and 'git push' in jsoncpp-docs.
++build:
++ mkdir -p build/debug
++ cd build/debug; cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ../..
++ make -C build/debug
++
++# Currently, this depends on include/json/version.h generated
++# by cmake.
++test-amalgamate:
++ python2.7 amalgamate.py
++ python3.4 amalgamate.py
++ cd dist; gcc -I. -c jsoncpp.cpp
++
++valgrind:
++ valgrind --error-exitcode=42 --leak-check=full ./build/debug/src/test_lib_json/jsoncpp_test
++
++clean:
++ \rm -rf *.gz *.asc dist/
++
++.PHONY: build
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmw7.json polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmw7.json
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmw7.json 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmw7.json 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,33 @@
++{
++ "cmake_variants" : [
++ {"name": "generator",
++ "generators": [
++ {"generator": [
++ "Visual Studio 7 .NET 2003",
++ "Visual Studio 9 2008",
++ "Visual Studio 9 2008 Win64",
++ "Visual Studio 10",
++ "Visual Studio 10 Win64",
++ "Visual Studio 11",
++ "Visual Studio 11 Win64"
++ ]
++ },
++ {"generator": ["MinGW Makefiles"],
++ "env_prepend": [{"path": "c:/wut/prg/MinGW/bin"}]
++ }
++ ]
++ },
++ {"name": "shared_dll",
++ "variables": [
++ ["BUILD_SHARED_LIBS=true"],
++ ["BUILD_SHARED_LIBS=false"]
++ ]
++ },
++ {"name": "build_type",
++ "build_types": [
++ "debug",
++ "release"
++ ]
++ }
++ ]
++}
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmxp.json polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmxp.json
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmxp.json 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/agent_vmxp.json 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,26 @@
++{
++ "cmake_variants" : [
++ {"name": "generator",
++ "generators": [
++ {"generator": [
++ "Visual Studio 6",
++ "Visual Studio 7",
++ "Visual Studio 8 2005"
++ ]
++ }
++ ]
++ },
++ {"name": "shared_dll",
++ "variables": [
++ ["BUILD_SHARED_LIBS=true"],
++ ["BUILD_SHARED_LIBS=false"]
++ ]
++ },
++ {"name": "build_type",
++ "build_types": [
++ "debug",
++ "release"
++ ]
++ }
++ ]
++}
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/antglob.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/antglob.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/antglob.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/antglob.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,205 @@
++#!/usr/bin/env python
++# encoding: utf-8
++# Copyright 2009 Baptiste Lepilleur
++# Distributed under MIT license, or public domain if desired and
++# recognized in your jurisdiction.
++# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++from __future__ import print_function
++from dircache import listdir
++import re
++import fnmatch
++import os.path
++
++
++# These fnmatch expressions are used by default to prune the directory tree
++# while doing the recursive traversal in the glob_impl method of glob function.
++prune_dirs = '.git .bzr .hg .svn _MTN _darcs CVS SCCS '
++
++# These fnmatch expressions are used by default to exclude files and dirs
++# while doing the recursive traversal in the glob_impl method of glob function.
++##exclude_pats = prune_pats + '*~ #*# .#* %*% ._* .gitignore .cvsignore vssver.scc .DS_Store'.split()
++
++# These ant_glob expressions are used by default to exclude files and dirs and also prune the directory tree
++# while doing the recursive traversal in the glob_impl method of glob function.
++default_excludes = '''
++**/*~
++**/#*#
++**/.#*
++**/%*%
++**/._*
++**/CVS
++**/CVS/**
++**/.cvsignore
++**/SCCS
++**/SCCS/**
++**/vssver.scc
++**/.svn
++**/.svn/**
++**/.git
++**/.git/**
++**/.gitignore
++**/.bzr
++**/.bzr/**
++**/.hg
++**/.hg/**
++**/_MTN
++**/_MTN/**
++**/_darcs
++**/_darcs/**
++**/.DS_Store '''
++
++DIR = 1
++FILE = 2
++DIR_LINK = 4
++FILE_LINK = 8
++LINKS = DIR_LINK | FILE_LINK
++ALL_NO_LINK = DIR | FILE
++ALL = DIR | FILE | LINKS
++
++_ANT_RE = re.compile(r'(/\*\*/)|(\*\*/)|(/\*\*)|(\*)|(/)|([^\*/]*)')
++
++def ant_pattern_to_re(ant_pattern):
++ """Generates a regular expression from the ant pattern.
++ Matching convention:
++ **/a: match 'a', 'dir/a', 'dir1/dir2/a'
++ a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b'
++ *.py: match 'script.py' but not 'a/script.py'
++ """
++ rex = ['^']
++ next_pos = 0
++ sep_rex = r'(?:/|%s)' % re.escape(os.path.sep)
++## print 'Converting', ant_pattern
++ for match in _ANT_RE.finditer(ant_pattern):
++## print 'Matched', match.group()
++## print match.start(0), next_pos
++ if match.start(0) != next_pos:
++ raise ValueError("Invalid ant pattern")
++ if match.group(1): # /**/
++ rex.append(sep_rex + '(?:.*%s)?' % sep_rex)
++ elif match.group(2): # **/
++ rex.append('(?:.*%s)?' % sep_rex)
++ elif match.group(3): # /**
++ rex.append(sep_rex + '.*')
++ elif match.group(4): # *
++ rex.append('[^/%s]*' % re.escape(os.path.sep))
++ elif match.group(5): # /
++ rex.append(sep_rex)
++ else: # somepath
++ rex.append(re.escape(match.group(6)))
++ next_pos = match.end()
++ rex.append('$')
++ return re.compile(''.join(rex))
++
++def _as_list(l):
++ if isinstance(l, basestring):
++ return l.split()
++ return l
++
++def glob(dir_path,
++ includes = '**/*',
++ excludes = default_excludes,
++ entry_type = FILE,
++ prune_dirs = prune_dirs,
++ max_depth = 25):
++ include_filter = [ant_pattern_to_re(p) for p in _as_list(includes)]
++ exclude_filter = [ant_pattern_to_re(p) for p in _as_list(excludes)]
++ prune_dirs = [p.replace('/',os.path.sep) for p in _as_list(prune_dirs)]
++ dir_path = dir_path.replace('/',os.path.sep)
++ entry_type_filter = entry_type
++
++ def is_pruned_dir(dir_name):
++ for pattern in prune_dirs:
++ if fnmatch.fnmatch(dir_name, pattern):
++ return True
++ return False
++
++ def apply_filter(full_path, filter_rexs):
++ """Return True if at least one of the filter regular expression match full_path."""
++ for rex in filter_rexs:
++ if rex.match(full_path):
++ return True
++ return False
++
++ def glob_impl(root_dir_path):
++ child_dirs = [root_dir_path]
++ while child_dirs:
++ dir_path = child_dirs.pop()
++ for entry in listdir(dir_path):
++ full_path = os.path.join(dir_path, entry)
++## print 'Testing:', full_path,
++ is_dir = os.path.isdir(full_path)
++ if is_dir and not is_pruned_dir(entry): # explore child directory ?
++## print '===> marked for recursion',
++ child_dirs.append(full_path)
++ included = apply_filter(full_path, include_filter)
++ rejected = apply_filter(full_path, exclude_filter)
++ if not included or rejected: # do not include entry ?
++## print '=> not included or rejected'
++ continue
++ link = os.path.islink(full_path)
++ is_file = os.path.isfile(full_path)
++ if not is_file and not is_dir:
++## print '=> unknown entry type'
++ continue
++ if link:
++ entry_type = is_file and FILE_LINK or DIR_LINK
++ else:
++ entry_type = is_file and FILE or DIR
++## print '=> type: %d' % entry_type,
++ if (entry_type & entry_type_filter) != 0:
++## print ' => KEEP'
++ yield os.path.join(dir_path, entry)
++## else:
++## print ' => TYPE REJECTED'
++ return list(glob_impl(dir_path))
++
++
++if __name__ == "__main__":
++ import unittest
++
++ class AntPatternToRETest(unittest.TestCase):
++## def test_conversion(self):
++## self.assertEqual('^somepath$', ant_pattern_to_re('somepath').pattern)
++
++ def test_matching(self):
++ test_cases = [ ('path',
++ ['path'],
++ ['somepath', 'pathsuffix', '/path', '/path']),
++ ('*.py',
++ ['source.py', 'source.ext.py', '.py'],
++ ['path/source.py', '/.py', 'dir.py/z', 'z.pyc', 'z.c']),
++ ('**/path',
++ ['path', '/path', '/a/path', 'c:/a/path', '/a/b/path', '//a/path', '/a/path/b/path'],
++ ['path/', 'a/path/b', 'dir.py/z', 'somepath', 'pathsuffix', 'a/somepath']),
++ ('path/**',
++ ['path/a', 'path/path/a', 'path//'],
++ ['path', 'somepath/a', 'a/path', 'a/path/a', 'pathsuffix/a']),
++ ('/**/path',
++ ['/path', '/a/path', '/a/b/path/path', '/path/path'],
++ ['path', 'path/', 'a/path', '/pathsuffix', '/somepath']),
++ ('a/b',
++ ['a/b'],
++ ['somea/b', 'a/bsuffix', 'a/b/c']),
++ ('**/*.py',
++ ['script.py', 'src/script.py', 'a/b/script.py', '/a/b/script.py'],
++ ['script.pyc', 'script.pyo', 'a.py/b']),
++ ('src/**/*.py',
++ ['src/a.py', 'src/dir/a.py'],
++ ['a/src/a.py', '/src/a.py']),
++ ]
++ for ant_pattern, accepted_matches, rejected_matches in list(test_cases):
++ def local_path(paths):
++ return [ p.replace('/',os.path.sep) for p in paths ]
++ test_cases.append((ant_pattern, local_path(accepted_matches), local_path(rejected_matches)))
++ for ant_pattern, accepted_matches, rejected_matches in test_cases:
++ rex = ant_pattern_to_re(ant_pattern)
++ print('ant_pattern:', ant_pattern, ' => ', rex.pattern)
++ for accepted_match in accepted_matches:
++ print('Accepted?:', accepted_match)
++ self.assertTrue(rex.match(accepted_match) is not None)
++ for rejected_match in rejected_matches:
++ print('Rejected?:', rejected_match)
++ self.assertTrue(rex.match(rejected_match) is None)
++
++ unittest.main()
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/batchbuild.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/batchbuild.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/batchbuild.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/batchbuild.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,278 @@
++from __future__ import print_function
++import collections
++import itertools
++import json
++import os
++import os.path
++import re
++import shutil
++import string
++import subprocess
++import sys
++import cgi
++
++class BuildDesc:
++ def __init__(self, prepend_envs=None, variables=None, build_type=None, generator=None):
++ self.prepend_envs = prepend_envs or [] # [ { "var": "value" } ]
++ self.variables = variables or []
++ self.build_type = build_type
++ self.generator = generator
++
++ def merged_with(self, build_desc):
++ """Returns a new BuildDesc by merging field content.
++ Prefer build_desc fields to self fields for single valued field.
++ """
++ return BuildDesc(self.prepend_envs + build_desc.prepend_envs,
++ self.variables + build_desc.variables,
++ build_desc.build_type or self.build_type,
++ build_desc.generator or self.generator)
++
++ def env(self):
++ environ = os.environ.copy()
++ for values_by_name in self.prepend_envs:
++ for var, value in list(values_by_name.items()):
++ var = var.upper()
++ if type(value) is unicode:
++ value = value.encode(sys.getdefaultencoding())
++ if var in environ:
++ environ[var] = value + os.pathsep + environ[var]
++ else:
++ environ[var] = value
++ return environ
++
++ def cmake_args(self):
++ args = ["-D%s" % var for var in self.variables]
++ # skip build type for Visual Studio solution as it cause warning
++ if self.build_type and 'Visual' not in self.generator:
++ args.append("-DCMAKE_BUILD_TYPE=%s" % self.build_type)
++ if self.generator:
++ args.extend(['-G', self.generator])
++ return args
++
++ def __repr__(self):
++ return "BuildDesc(%s, build_type=%s)" % (" ".join(self.cmake_args()), self.build_type)
++
++class BuildData:
++ def __init__(self, desc, work_dir, source_dir):
++ self.desc = desc
++ self.work_dir = work_dir
++ self.source_dir = source_dir
++ self.cmake_log_path = os.path.join(work_dir, 'batchbuild_cmake.log')
++ self.build_log_path = os.path.join(work_dir, 'batchbuild_build.log')
++ self.cmake_succeeded = False
++ self.build_succeeded = False
++
++ def execute_build(self):
++ print('Build %s' % self.desc)
++ self._make_new_work_dir()
++ self.cmake_succeeded = self._generate_makefiles()
++ if self.cmake_succeeded:
++ self.build_succeeded = self._build_using_makefiles()
++ return self.build_succeeded
++
++ def _generate_makefiles(self):
++ print(' Generating makefiles: ', end=' ')
++ cmd = ['cmake'] + self.desc.cmake_args() + [os.path.abspath(self.source_dir)]
++ succeeded = self._execute_build_subprocess(cmd, self.desc.env(), self.cmake_log_path)
++ print('done' if succeeded else 'FAILED')
++ return succeeded
++
++ def _build_using_makefiles(self):
++ print(' Building:', end=' ')
++ cmd = ['cmake', '--build', self.work_dir]
++ if self.desc.build_type:
++ cmd += ['--config', self.desc.build_type]
++ succeeded = self._execute_build_subprocess(cmd, self.desc.env(), self.build_log_path)
++ print('done' if succeeded else 'FAILED')
++ return succeeded
++
++ def _execute_build_subprocess(self, cmd, env, log_path):
++ process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.work_dir,
++ env=env)
++ stdout, _ = process.communicate()
++ succeeded = (process.returncode == 0)
++ with open(log_path, 'wb') as flog:
++ log = ' '.join(cmd) + '\n' + stdout + '\nExit code: %r\n' % process.returncode
++ flog.write(fix_eol(log))
++ return succeeded
++
++ def _make_new_work_dir(self):
++ if os.path.isdir(self.work_dir):
++ print(' Removing work directory', self.work_dir)
++ shutil.rmtree(self.work_dir, ignore_errors=True)
++ if not os.path.isdir(self.work_dir):
++ os.makedirs(self.work_dir)
++
++def fix_eol(stdout):
++ """Fixes wrong EOL produced by cmake --build on Windows (\r\r\n instead of \r\n).
++ """
++ return re.sub('\r*\n', os.linesep, stdout)
++
++def load_build_variants_from_config(config_path):
++ with open(config_path, 'rb') as fconfig:
++ data = json.load(fconfig)
++ variants = data[ 'cmake_variants' ]
++ build_descs_by_axis = collections.defaultdict(list)
++ for axis in variants:
++ axis_name = axis["name"]
++ build_descs = []
++ if "generators" in axis:
++ for generator_data in axis["generators"]:
++ for generator in generator_data["generator"]:
++ build_desc = BuildDesc(generator=generator,
++ prepend_envs=generator_data.get("env_prepend"))
++ build_descs.append(build_desc)
++ elif "variables" in axis:
++ for variables in axis["variables"]:
++ build_desc = BuildDesc(variables=variables)
++ build_descs.append(build_desc)
++ elif "build_types" in axis:
++ for build_type in axis["build_types"]:
++ build_desc = BuildDesc(build_type=build_type)
++ build_descs.append(build_desc)
++ build_descs_by_axis[axis_name].extend(build_descs)
++ return build_descs_by_axis
++
++def generate_build_variants(build_descs_by_axis):
++ """Returns a list of BuildDesc generated for the partial BuildDesc for each axis."""
++ axis_names = list(build_descs_by_axis.keys())
++ build_descs = []
++ for axis_name, axis_build_descs in list(build_descs_by_axis.items()):
++ if len(build_descs):
++ # for each existing build_desc and each axis build desc, create a new build_desc
++ new_build_descs = []
++ for prototype_build_desc, axis_build_desc in itertools.product(build_descs, axis_build_descs):
++ new_build_descs.append(prototype_build_desc.merged_with(axis_build_desc))
++ build_descs = new_build_descs
++ else:
++ build_descs = axis_build_descs
++ return build_descs
++
++HTML_TEMPLATE = string.Template('''
++
++ $title
++
++
++
++
++
++
++ | Variables |
++ $th_vars
++
++
++ | Build type |
++ $th_build_types
++
++
++
++$tr_builds
++
++
++''')
++
++def generate_html_report(html_report_path, builds):
++ report_dir = os.path.dirname(html_report_path)
++ # Vertical axis: generator
++ # Horizontal: variables, then build_type
++ builds_by_generator = collections.defaultdict(list)
++ variables = set()
++ build_types_by_variable = collections.defaultdict(set)
++ build_by_pos_key = {} # { (generator, var_key, build_type): build }
++ for build in builds:
++ builds_by_generator[build.desc.generator].append(build)
++ var_key = tuple(sorted(build.desc.variables))
++ variables.add(var_key)
++ build_types_by_variable[var_key].add(build.desc.build_type)
++ pos_key = (build.desc.generator, var_key, build.desc.build_type)
++ build_by_pos_key[pos_key] = build
++ variables = sorted(variables)
++ th_vars = []
++ th_build_types = []
++ for variable in variables:
++ build_types = sorted(build_types_by_variable[variable])
++ nb_build_type = len(build_types_by_variable[variable])
++ th_vars.append('%s | ' % (nb_build_type, cgi.escape(' '.join(variable))))
++ for build_type in build_types:
++ th_build_types.append('%s | ' % cgi.escape(build_type))
++ tr_builds = []
++ for generator in sorted(builds_by_generator):
++ tds = [ '%s | \n' % cgi.escape(generator) ]
++ for variable in variables:
++ build_types = sorted(build_types_by_variable[variable])
++ for build_type in build_types:
++ pos_key = (generator, variable, build_type)
++ build = build_by_pos_key.get(pos_key)
++ if build:
++ cmake_status = 'ok' if build.cmake_succeeded else 'FAILED'
++ build_status = 'ok' if build.build_succeeded else 'FAILED'
++ cmake_log_url = os.path.relpath(build.cmake_log_path, report_dir)
++ build_log_url = os.path.relpath(build.build_log_path, report_dir)
++ td = 'CMake: %s' % ( build_status.lower(), cmake_log_url, cmake_status.lower(), cmake_status)
++ if build.cmake_succeeded:
++ td += ' Build: %s' % ( build_log_url, build_status.lower(), build_status)
++ td += ' | '
++ else:
++ td = ' | '
++ tds.append(td)
++ tr_builds.append('%s
' % '\n'.join(tds))
++ html = HTML_TEMPLATE.substitute( title='Batch build report',
++ th_vars=' '.join(th_vars),
++ th_build_types=' '.join(th_build_types),
++ tr_builds='\n'.join(tr_builds))
++ with open(html_report_path, 'wt') as fhtml:
++ fhtml.write(html)
++ print('HTML report generated in:', html_report_path)
++
++def main():
++ usage = r"""%prog WORK_DIR SOURCE_DIR CONFIG_JSON_PATH [CONFIG2_JSON_PATH...]
++Build a given CMake based project located in SOURCE_DIR with multiple generators/options.dry_run
++as described in CONFIG_JSON_PATH building in WORK_DIR.
++
++Example of call:
++python devtools\batchbuild.py e:\buildbots\jsoncpp\build . devtools\agent_vmw7.json
++"""
++ from optparse import OptionParser
++ parser = OptionParser(usage=usage)
++ parser.allow_interspersed_args = True
++# parser.add_option('-v', '--verbose', dest="verbose", action='store_true',
++# help="""Be verbose.""")
++ parser.enable_interspersed_args()
++ options, args = parser.parse_args()
++ if len(args) < 3:
++ parser.error("Missing one of WORK_DIR SOURCE_DIR CONFIG_JSON_PATH.")
++ work_dir = args[0]
++ source_dir = args[1].rstrip('/\\')
++ config_paths = args[2:]
++ for config_path in config_paths:
++ if not os.path.isfile(config_path):
++ parser.error("Can not read: %r" % config_path)
++
++ # generate build variants
++ build_descs = []
++ for config_path in config_paths:
++ build_descs_by_axis = load_build_variants_from_config(config_path)
++ build_descs.extend(generate_build_variants(build_descs_by_axis))
++ print('Build variants (%d):' % len(build_descs))
++ # assign build directory for each variant
++ if not os.path.isdir(work_dir):
++ os.makedirs(work_dir)
++ builds = []
++ with open(os.path.join(work_dir, 'matrix-dir-map.txt'), 'wt') as fmatrixmap:
++ for index, build_desc in enumerate(build_descs):
++ build_desc_work_dir = os.path.join(work_dir, '%03d' % (index+1))
++ builds.append(BuildData(build_desc, build_desc_work_dir, source_dir))
++ fmatrixmap.write('%s: %s\n' % (build_desc_work_dir, build_desc))
++ for build in builds:
++ build.execute_build()
++ html_report_path = os.path.join(work_dir, 'batchbuild-report.html')
++ generate_html_report(html_report_path, builds)
++ print('Done')
++
++
++if __name__ == '__main__':
++ main()
++
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/fixeol.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/fixeol.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/fixeol.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/fixeol.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,70 @@
++# Copyright 2010 Baptiste Lepilleur
++# Distributed under MIT license, or public domain if desired and
++# recognized in your jurisdiction.
++# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++from __future__ import print_function
++import os.path
++import sys
++
++def fix_source_eol(path, is_dry_run = True, verbose = True, eol = '\n'):
++ """Makes sure that all sources have the specified eol sequence (default: unix)."""
++ if not os.path.isfile(path):
++ raise ValueError('Path "%s" is not a file' % path)
++ try:
++ f = open(path, 'rb')
++ except IOError as msg:
++ print("%s: I/O Error: %s" % (file, str(msg)), file=sys.stderr)
++ return False
++ try:
++ raw_lines = f.readlines()
++ finally:
++ f.close()
++ fixed_lines = [line.rstrip('\r\n') + eol for line in raw_lines]
++ if raw_lines != fixed_lines:
++ print('%s =>' % path, end=' ')
++ if not is_dry_run:
++ f = open(path, "wb")
++ try:
++ f.writelines(fixed_lines)
++ finally:
++ f.close()
++ if verbose:
++ print(is_dry_run and ' NEED FIX' or ' FIXED')
++ return True
++##
++##
++##
++##def _do_fix(is_dry_run = True):
++## from waftools import antglob
++## python_sources = antglob.glob('.',
++## includes = '**/*.py **/wscript **/wscript_build',
++## excludes = antglob.default_excludes + './waf.py',
++## prune_dirs = antglob.prune_dirs + 'waf-* ./build')
++## for path in python_sources:
++## _fix_python_source(path, is_dry_run)
++##
++## cpp_sources = antglob.glob('.',
++## includes = '**/*.cpp **/*.h **/*.inl',
++## prune_dirs = antglob.prune_dirs + 'waf-* ./build')
++## for path in cpp_sources:
++## _fix_source_eol(path, is_dry_run)
++##
++##
++##def dry_fix(context):
++## _do_fix(is_dry_run = True)
++##
++##def fix(context):
++## _do_fix(is_dry_run = False)
++##
++##def shutdown():
++## pass
++##
++##def check(context):
++## # Unit tests are run when "check" target is used
++## ut = UnitTest.unit_test()
++## ut.change_to_testfile_dir = True
++## ut.want_to_see_test_output = True
++## ut.want_to_see_test_error = True
++## ut.run()
++## ut.print_results()
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/__init__.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/__init__.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/__init__.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/__init__.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,6 @@
++# Copyright 2010 Baptiste Lepilleur
++# Distributed under MIT license, or public domain if desired and
++# recognized in your jurisdiction.
++# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++# module
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/licenseupdater.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/licenseupdater.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/licenseupdater.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/licenseupdater.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,94 @@
++"""Updates the license text in source file.
++"""
++from __future__ import print_function
++
++# An existing license is found if the file starts with the string below,
++# and ends with the first blank line.
++LICENSE_BEGIN = "// Copyright "
++
++BRIEF_LICENSE = LICENSE_BEGIN + """2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++""".replace('\r\n','\n')
++
++def update_license(path, dry_run, show_diff):
++ """Update the license statement in the specified file.
++ Parameters:
++ path: path of the C++ source file to update.
++ dry_run: if True, just print the path of the file that would be updated,
++ but don't change it.
++ show_diff: if True, print the path of the file that would be modified,
++ as well as the change made to the file.
++ """
++ with open(path, 'rt') as fin:
++ original_text = fin.read().replace('\r\n','\n')
++ newline = fin.newlines and fin.newlines[0] or '\n'
++ if not original_text.startswith(LICENSE_BEGIN):
++ # No existing license found => prepend it
++ new_text = BRIEF_LICENSE + original_text
++ else:
++ license_end_index = original_text.index('\n\n') # search first blank line
++ new_text = BRIEF_LICENSE + original_text[license_end_index+2:]
++ if original_text != new_text:
++ if not dry_run:
++ with open(path, 'wb') as fout:
++ fout.write(new_text.replace('\n', newline))
++ print('Updated', path)
++ if show_diff:
++ import difflib
++ print('\n'.join(difflib.unified_diff(original_text.split('\n'),
++ new_text.split('\n'))))
++ return True
++ return False
++
++def update_license_in_source_directories(source_dirs, dry_run, show_diff):
++ """Updates license text in C++ source files found in directory source_dirs.
++ Parameters:
++ source_dirs: list of directory to scan for C++ sources. Directories are
++ scanned recursively.
++ dry_run: if True, just print the path of the file that would be updated,
++ but don't change it.
++ show_diff: if True, print the path of the file that would be modified,
++ as well as the change made to the file.
++ """
++ from devtools import antglob
++ prune_dirs = antglob.prune_dirs + 'scons-local* ./build* ./libs ./dist'
++ for source_dir in source_dirs:
++ cpp_sources = antglob.glob(source_dir,
++ includes = '''**/*.h **/*.cpp **/*.inl''',
++ prune_dirs = prune_dirs)
++ for source in cpp_sources:
++ update_license(source, dry_run, show_diff)
++
++def main():
++ usage = """%prog DIR [DIR2...]
++Updates license text in sources of the project in source files found
++in the directory specified on the command-line.
++
++Example of call:
++python devtools\licenseupdater.py include src -n --diff
++=> Show change that would be made to the sources.
++
++python devtools\licenseupdater.py include src
++=> Update license statement on all sources in directories include/ and src/.
++"""
++ from optparse import OptionParser
++ parser = OptionParser(usage=usage)
++ parser.allow_interspersed_args = False
++ parser.add_option('-n', '--dry-run', dest="dry_run", action='store_true', default=False,
++ help="""Only show what files are updated, do not update the files""")
++ parser.add_option('--diff', dest="show_diff", action='store_true', default=False,
++ help="""On update, show change made to the file.""")
++ parser.enable_interspersed_args()
++ options, args = parser.parse_args()
++ update_license_in_source_directories(args, options.dry_run, options.show_diff)
++ print('Done')
++
++if __name__ == '__main__':
++ import sys
++ import os.path
++ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
++ main()
++
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/tarball.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/tarball.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/tarball.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/devtools/tarball.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,52 @@
++# Copyright 2010 Baptiste Lepilleur
++# Distributed under MIT license, or public domain if desired and
++# recognized in your jurisdiction.
++# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++from contextlib import closing
++import os
++import tarfile
++
++TARGZ_DEFAULT_COMPRESSION_LEVEL = 9
++
++def make_tarball(tarball_path, sources, base_dir, prefix_dir=''):
++ """Parameters:
++ tarball_path: output path of the .tar.gz file
++ sources: list of sources to include in the tarball, relative to the current directory
++ base_dir: if a source file is in a sub-directory of base_dir, then base_dir is stripped
++ from path in the tarball.
++ prefix_dir: all files stored in the tarball be sub-directory of prefix_dir. Set to ''
++ to make them child of root.
++ """
++ base_dir = os.path.normpath(os.path.abspath(base_dir))
++ def archive_name(path):
++ """Makes path relative to base_dir."""
++ path = os.path.normpath(os.path.abspath(path))
++ common_path = os.path.commonprefix((base_dir, path))
++ archive_name = path[len(common_path):]
++ if os.path.isabs(archive_name):
++ archive_name = archive_name[1:]
++ return os.path.join(prefix_dir, archive_name)
++ def visit(tar, dirname, names):
++ for name in names:
++ path = os.path.join(dirname, name)
++ if os.path.isfile(path):
++ path_in_tar = archive_name(path)
++ tar.add(path, path_in_tar)
++ compression = TARGZ_DEFAULT_COMPRESSION_LEVEL
++ with closing(tarfile.TarFile.open(tarball_path, 'w:gz',
++ compresslevel=compression)) as tar:
++ for source in sources:
++ source_path = source
++ if os.path.isdir(source):
++ for dirpath, dirnames, filenames in os.walk(source_path):
++ visit(tar, dirpath, filenames)
++ else:
++ path_in_tar = archive_name(source_path)
++ tar.add(source_path, path_in_tar) # filename, arcname
++
++def decompress(tarball_path, base_dir):
++ """Decompress the gzipped tarball into directory base_dir.
++ """
++ with closing(tarfile.TarFile.open(tarball_path)) as tar:
++ tar.extractall(base_dir)
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/doxybuild.py polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/doxybuild.py
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/doxybuild.py 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/doxybuild.py 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,189 @@
++"""Script to generate doxygen documentation.
++"""
++from __future__ import print_function
++from __future__ import unicode_literals
++from devtools import tarball
++from contextlib import contextmanager
++import subprocess
++import traceback
++import re
++import os
++import sys
++import shutil
++
++@contextmanager
++def cd(newdir):
++ """
++ http://stackoverflow.com/questions/431684/how-do-i-cd-in-python
++ """
++ prevdir = os.getcwd()
++ os.chdir(newdir)
++ try:
++ yield
++ finally:
++ os.chdir(prevdir)
++
++def find_program(*filenames):
++ """find a program in folders path_lst, and sets env[var]
++ @param filenames: a list of possible names of the program to search for
++ @return: the full path of the filename if found, or '' if filename could not be found
++"""
++ paths = os.environ.get('PATH', '').split(os.pathsep)
++ suffixes = ('win32' in sys.platform) and '.exe .com .bat .cmd' or ''
++ for filename in filenames:
++ for name in [filename+ext for ext in suffixes.split(' ')]:
++ for directory in paths:
++ full_path = os.path.join(directory, name)
++ if os.path.isfile(full_path):
++ return full_path
++ return ''
++
++def do_subst_in_file(targetfile, sourcefile, dict):
++ """Replace all instances of the keys of dict with their values.
++ For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
++ then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
++ """
++ with open(sourcefile, 'r') as f:
++ contents = f.read()
++ for (k,v) in list(dict.items()):
++ v = v.replace('\\','\\\\')
++ contents = re.sub(k, v, contents)
++ with open(targetfile, 'w') as f:
++ f.write(contents)
++
++def getstatusoutput(cmd):
++ """cmd is a list.
++ """
++ try:
++ process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
++ output, _ = process.communicate()
++ status = process.returncode
++ except:
++ status = -1
++ output = traceback.format_exc()
++ return status, output
++
++def run_cmd(cmd, silent=False):
++ """Raise exception on failure.
++ """
++ info = 'Running: %r in %r' %(' '.join(cmd), os.getcwd())
++ print(info)
++ sys.stdout.flush()
++ if silent:
++ status, output = getstatusoutput(cmd)
++ else:
++ status, output = subprocess.call(cmd), ''
++ if status:
++ msg = 'Error while %s ...\n\terror=%d, output="""%s"""' %(info, status, output)
++ raise Exception(msg)
++
++def assert_is_exe(path):
++ if not path:
++ raise Exception('path is empty.')
++ if not os.path.isfile(path):
++ raise Exception('%r is not a file.' %path)
++ if not os.access(path, os.X_OK):
++ raise Exception('%r is not executable by this user.' %path)
++
++def run_doxygen(doxygen_path, config_file, working_dir, is_silent):
++ assert_is_exe(doxygen_path)
++ config_file = os.path.abspath(config_file)
++ with cd(working_dir):
++ cmd = [doxygen_path, config_file]
++ run_cmd(cmd, is_silent)
++
++def build_doc(options, make_release=False):
++ if make_release:
++ options.make_tarball = True
++ options.with_dot = True
++ options.with_html_help = True
++ options.with_uml_look = True
++ options.open = False
++ options.silent = True
++
++ version = open('version', 'rt').read().strip()
++ output_dir = 'dist/doxygen' # relative to doc/doxyfile location.
++ if not os.path.isdir(output_dir):
++ os.makedirs(output_dir)
++ top_dir = os.path.abspath('.')
++ html_output_dirname = 'jsoncpp-api-html-' + version
++ tarball_path = os.path.join('dist', html_output_dirname + '.tar.gz')
++ warning_log_path = os.path.join(output_dir, '../jsoncpp-doxygen-warning.log')
++ html_output_path = os.path.join(output_dir, html_output_dirname)
++ def yesno(bool):
++ return bool and 'YES' or 'NO'
++ subst_keys = {
++ '%JSONCPP_VERSION%': version,
++ '%DOC_TOPDIR%': '',
++ '%TOPDIR%': top_dir,
++ '%HTML_OUTPUT%': os.path.join('..', output_dir, html_output_dirname),
++ '%HAVE_DOT%': yesno(options.with_dot),
++ '%DOT_PATH%': os.path.split(options.dot_path)[0],
++ '%HTML_HELP%': yesno(options.with_html_help),
++ '%UML_LOOK%': yesno(options.with_uml_look),
++ '%WARNING_LOG_PATH%': os.path.join('..', warning_log_path)
++ }
++
++ if os.path.isdir(output_dir):
++ print('Deleting directory:', output_dir)
++ shutil.rmtree(output_dir)
++ if not os.path.isdir(output_dir):
++ os.makedirs(output_dir)
++
++ do_subst_in_file('doc/doxyfile', options.doxyfile_input_path, subst_keys)
++ run_doxygen(options.doxygen_path, 'doc/doxyfile', 'doc', is_silent=options.silent)
++ if not options.silent:
++ print(open(warning_log_path, 'r').read())
++ index_path = os.path.abspath(os.path.join('doc', subst_keys['%HTML_OUTPUT%'], 'index.html'))
++ print('Generated documentation can be found in:')
++ print(index_path)
++ if options.open:
++ import webbrowser
++ webbrowser.open('file://' + index_path)
++ if options.make_tarball:
++ print('Generating doc tarball to', tarball_path)
++ tarball_sources = [
++ output_dir,
++ 'README.md',
++ 'LICENSE',
++ 'NEWS.txt',
++ 'version'
++ ]
++ tarball_basedir = os.path.join(output_dir, html_output_dirname)
++ tarball.make_tarball(tarball_path, tarball_sources, tarball_basedir, html_output_dirname)
++ return tarball_path, html_output_dirname
++
++def main():
++ usage = """%prog
++ Generates doxygen documentation in build/doxygen.
++ Optionaly makes a tarball of the documentation to dist/.
++
++ Must be started in the project top directory.
++ """
++ from optparse import OptionParser
++ parser = OptionParser(usage=usage)
++ parser.allow_interspersed_args = False
++ parser.add_option('--with-dot', dest="with_dot", action='store_true', default=False,
++ help="""Enable usage of DOT to generate collaboration diagram""")
++ parser.add_option('--dot', dest="dot_path", action='store', default=find_program('dot'),
++ help="""Path to GraphViz dot tool. Must be full qualified path. [Default: %default]""")
++ parser.add_option('--doxygen', dest="doxygen_path", action='store', default=find_program('doxygen'),
++ help="""Path to Doxygen tool. [Default: %default]""")
++ parser.add_option('--in', dest="doxyfile_input_path", action='store', default='doc/doxyfile.in',
++ help="""Path to doxygen inputs. [Default: %default]""")
++ parser.add_option('--with-html-help', dest="with_html_help", action='store_true', default=False,
++ help="""Enable generation of Microsoft HTML HELP""")
++ parser.add_option('--no-uml-look', dest="with_uml_look", action='store_false', default=True,
++ help="""Generates DOT graph without UML look [Default: False]""")
++ parser.add_option('--open', dest="open", action='store_true', default=False,
++ help="""Open the HTML index in the web browser after generation""")
++ parser.add_option('--tarball', dest="make_tarball", action='store_true', default=False,
++ help="""Generates a tarball of the documentation in dist/ directory""")
++ parser.add_option('-s', '--silent', dest="silent", action='store_true', default=False,
++ help="""Hides doxygen output""")
++ parser.enable_interspersed_args()
++ options, args = parser.parse_args()
++ build_doc(options)
++
++if __name__ == '__main__':
++ main()
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitattributes polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitattributes
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitattributes 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitattributes 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,11 @@
++* text=auto
++*.h text
++*.cpp text
++*.json text
++*.in text
++*.sh eol=lf
++*.bat eol=crlf
++*.vcproj eol=crlf
++*.vcxproj eol=crlf
++*.sln eol=crlf
++devtools/agent_vm* eol=crlf
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitignore polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitignore
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitignore 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/.gitignore 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,52 @@
++/build/
++*.pyc
++*.swp
++*.actual
++*.actual-rewrite
++*.process-output
++*.rewrite
++/bin/
++/buildscons/
++/libs/
++/doc/doxyfile
++/dist/
++#/version
++#/include/json/version.h
++
++# MSVC project files:
++*.sln
++*.vcxproj
++*.filters
++*.user
++*.sdf
++*.opensdf
++*.suo
++
++# MSVC build files:
++*.lib
++*.obj
++*.tlog/
++*.pdb
++
++# CMake-generated files:
++CMakeFiles/
++CTestTestFile.cmake
++cmake_install.cmake
++pkg-config/jsoncpp.pc
++jsoncpp_lib_static.dir/
++
++# In case someone runs cmake in the root-dir:
++/CMakeCache.txt
++/Makefile
++/include/Makefile
++/src/Makefile
++/src/jsontestrunner/Makefile
++/src/jsontestrunner/jsontestrunner_exe
++/src/lib_json/Makefile
++/src/test_lib_json/Makefile
++/src/test_lib_json/jsoncpp_test
++
++# eclipse project files
++.project
++.cproject
++/.settings/
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/CMakeLists.txt polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/CMakeLists.txt
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/CMakeLists.txt 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,2 @@
++FILE(GLOB INCLUDE_FILES "json/*.h")
++INSTALL(FILES ${INCLUDE_FILES} DESTINATION ${INCLUDE_INSTALL_DIR}/json)
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/allocator.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/allocator.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/allocator.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/allocator.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,94 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef CPPTL_JSON_ALLOCATOR_H_INCLUDED
++#define CPPTL_JSON_ALLOCATOR_H_INCLUDED
++
++#include
++#include
++
++namespace Json {
++template
++class SecureAllocator {
++ public:
++ // Type definitions
++ using value_type = T;
++ using pointer = T*;
++ using const_pointer = const T*;
++ using reference = T&;
++ using const_reference = const T&;
++ using size_type = std::size_t;
++ using difference_type = std::ptrdiff_t;
++
++ /**
++ * Allocate memory for N items using the standard allocator.
++ */
++ pointer allocate(size_type n) {
++ // allocate using "global operator new"
++ return static_cast(::operator new(n * sizeof(T)));
++ }
++
++ /**
++ * Release memory which was allocated for N items at pointer P.
++ *
++ * The memory block is filled with zeroes before being released.
++ * The pointer argument is tagged as "volatile" to prevent the
++ * compiler optimizing out this critical step.
++ */
++ void deallocate(volatile pointer p, size_type n) {
++ std::memset(p, 0, n * sizeof(T));
++ // free using "global operator delete"
++ ::operator delete(p);
++ }
++
++ /**
++ * Construct an item in-place at pointer P.
++ */
++ template
++ void construct(pointer p, Args&&... args) {
++ // construct using "placement new" and "perfect forwarding"
++ ::new (static_cast(p)) T(std::forward(args)...);
++ }
++
++ size_type max_size() const {
++ return size_t(-1) / sizeof(T);
++ }
++
++ pointer address( reference x ) const {
++ return std::addressof(x);
++ }
++
++ const_pointer address( const_reference x ) const {
++ return std::addressof(x);
++ }
++
++ /**
++ * Destroy an item in-place at pointer P.
++ */
++ void destroy(pointer p) {
++ // destroy using "explicit destructor"
++ p->~T();
++ }
++
++ // Boilerplate
++ SecureAllocator() {}
++ template SecureAllocator(const SecureAllocator&) {}
++ template struct rebind { using other = SecureAllocator; };
++};
++
++
++template
++bool operator==(const SecureAllocator&, const SecureAllocator&) {
++ return true;
++}
++
++template
++bool operator!=(const SecureAllocator&, const SecureAllocator&) {
++ return false;
++}
++
++} //namespace Json
++
++#endif // CPPTL_JSON_ALLOCATOR_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/assertions.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/assertions.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/assertions.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/assertions.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,54 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
++#define CPPTL_JSON_ASSERTIONS_H_INCLUDED
++
++#include
++#include
++
++#if !defined(JSON_IS_AMALGAMATION)
++#include "config.h"
++#endif // if !defined(JSON_IS_AMALGAMATION)
++
++/** It should not be possible for a maliciously designed file to
++ * cause an abort() or seg-fault, so these macros are used only
++ * for pre-condition violations and internal logic errors.
++ */
++#if JSON_USE_EXCEPTION
++
++// @todo <= add detail about condition in exception
++# define JSON_ASSERT(condition) \
++ {if (!(condition)) {Json::throwLogicError( "assert json failed" );}}
++
++# define JSON_FAIL_MESSAGE(message) \
++ { \
++ JSONCPP_OSTRINGSTREAM oss; oss << message; \
++ Json::throwLogicError(oss.str()); \
++ abort(); \
++ }
++
++#else // JSON_USE_EXCEPTION
++
++# define JSON_ASSERT(condition) assert(condition)
++
++// The call to assert() will show the failure message in debug builds. In
++// release builds we abort, for a core-dump or debugger.
++# define JSON_FAIL_MESSAGE(message) \
++ { \
++ JSONCPP_OSTRINGSTREAM oss; oss << message; \
++ assert(false && oss.str().c_str()); \
++ abort(); \
++ }
++
++
++#endif
++
++#define JSON_ASSERT_MESSAGE(condition, message) \
++ if (!(condition)) { \
++ JSON_FAIL_MESSAGE(message); \
++ }
++
++#endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/autolink.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/autolink.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/autolink.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/autolink.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,25 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef JSON_AUTOLINK_H_INCLUDED
++#define JSON_AUTOLINK_H_INCLUDED
++
++#include "config.h"
++
++#ifdef JSON_IN_CPPTL
++#include
++#endif
++
++#if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && \
++ !defined(JSON_IN_CPPTL)
++#define CPPTL_AUTOLINK_NAME "json"
++#undef CPPTL_AUTOLINK_DLL
++#ifdef JSON_DLL
++#define CPPTL_AUTOLINK_DLL
++#endif
++#include "autolink.h"
++#endif
++
++#endif // JSON_AUTOLINK_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/config.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/config.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/config.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/config.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,178 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef JSON_CONFIG_H_INCLUDED
++#define JSON_CONFIG_H_INCLUDED
++#include
++#include //typedef String
++#include //typedef int64_t, uint64_t
++
++/// If defined, indicates that json library is embedded in CppTL library.
++//# define JSON_IN_CPPTL 1
++
++/// If defined, indicates that json may leverage CppTL library
++//# define JSON_USE_CPPTL 1
++/// If defined, indicates that cpptl vector based map should be used instead of
++/// std::map
++/// as Value container.
++//# define JSON_USE_CPPTL_SMALLMAP 1
++
++// If non-zero, the library uses exceptions to report bad input instead of C
++// assertion macros. The default is to use exceptions.
++#ifndef JSON_USE_EXCEPTION
++#define JSON_USE_EXCEPTION 1
++#endif
++
++/// If defined, indicates that the source file is amalgated
++/// to prevent private header inclusion.
++/// Remarks: it is automatically defined in the generated amalgated header.
++// #define JSON_IS_AMALGAMATION
++
++#ifdef JSON_IN_CPPTL
++#include
++#ifndef JSON_USE_CPPTL
++#define JSON_USE_CPPTL 1
++#endif
++#endif
++
++#ifdef JSON_IN_CPPTL
++#define JSON_API CPPTL_API
++#elif defined(JSON_DLL_BUILD)
++#if defined(_MSC_VER) || defined(__MINGW32__)
++#define JSON_API __declspec(dllexport)
++#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
++#endif // if defined(_MSC_VER)
++#elif defined(JSON_DLL)
++#if defined(_MSC_VER) || defined(__MINGW32__)
++#define JSON_API __declspec(dllimport)
++#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
++#endif // if defined(_MSC_VER)
++#endif // ifdef JSON_IN_CPPTL
++#if !defined(JSON_API)
++#define JSON_API
++#endif
++
++// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
++// integer
++// Storages, and 64 bits integer support is disabled.
++// #define JSON_NO_INT64 1
++
++#if defined(_MSC_VER) // MSVC
++# if _MSC_VER <= 1200 // MSVC 6
++ // Microsoft Visual Studio 6 only support conversion from __int64 to double
++ // (no conversion from unsigned __int64).
++# define JSON_USE_INT64_DOUBLE_CONVERSION 1
++ // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
++ // characters in the debug information)
++ // All projects I've ever seen with VS6 were using this globally (not bothering
++ // with pragma push/pop).
++# pragma warning(disable : 4786)
++# endif // MSVC 6
++
++# if _MSC_VER >= 1500 // MSVC 2008
++ /// Indicates that the following function is deprecated.
++# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
++# endif
++
++#endif // defined(_MSC_VER)
++
++// In c++11 the override keyword allows you to explicity define that a function
++// is intended to override the base-class version. This makes the code more
++// managable and fixes a set of common hard-to-find bugs.
++#if __cplusplus >= 201103L
++# define JSONCPP_OVERRIDE override
++#elif defined(_MSC_VER) && _MSC_VER > 1600
++# define JSONCPP_OVERRIDE override
++#else
++# define JSONCPP_OVERRIDE
++#endif
++
++#ifndef JSON_HAS_RVALUE_REFERENCES
++
++#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010
++#define JSON_HAS_RVALUE_REFERENCES 1
++#endif // MSVC >= 2010
++
++#ifdef __clang__
++#if __has_feature(cxx_rvalue_references)
++#define JSON_HAS_RVALUE_REFERENCES 1
++#endif // has_feature
++
++#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
++#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
++#define JSON_HAS_RVALUE_REFERENCES 1
++#endif // GXX_EXPERIMENTAL
++
++#endif // __clang__ || __GNUC__
++
++#endif // not defined JSON_HAS_RVALUE_REFERENCES
++
++#ifndef JSON_HAS_RVALUE_REFERENCES
++#define JSON_HAS_RVALUE_REFERENCES 0
++#endif
++
++#ifdef __clang__
++#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
++# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
++# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
++# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
++# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
++# endif // GNUC version
++#endif // __clang__ || __GNUC__
++
++#if !defined(JSONCPP_DEPRECATED)
++#define JSONCPP_DEPRECATED(message)
++#endif // if !defined(JSONCPP_DEPRECATED)
++
++#if __GNUC__ >= 6
++# define JSON_USE_INT64_DOUBLE_CONVERSION 1
++#endif
++
++#if !defined(JSON_IS_AMALGAMATION)
++
++# include "version.h"
++
++# if JSONCPP_USING_SECURE_MEMORY
++# include "allocator.h" //typedef Allocator
++# endif
++
++#endif // if !defined(JSON_IS_AMALGAMATION)
++
++namespace Json {
++typedef int Int;
++typedef unsigned int UInt;
++#if defined(JSON_NO_INT64)
++typedef int LargestInt;
++typedef unsigned int LargestUInt;
++#undef JSON_HAS_INT64
++#else // if defined(JSON_NO_INT64)
++// For Microsoft Visual use specific types as long long is not supported
++#if defined(_MSC_VER) // Microsoft Visual Studio
++typedef __int64 Int64;
++typedef unsigned __int64 UInt64;
++#else // if defined(_MSC_VER) // Other platforms, use long long
++typedef int64_t Int64;
++typedef uint64_t UInt64;
++#endif // if defined(_MSC_VER)
++typedef Int64 LargestInt;
++typedef UInt64 LargestUInt;
++#define JSON_HAS_INT64
++#endif // if defined(JSON_NO_INT64)
++#if JSONCPP_USING_SECURE_MEMORY
++#define JSONCPP_STRING std::basic_string, Json::SecureAllocator >
++#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream, Json::SecureAllocator >
++#define JSONCPP_OSTREAM std::basic_ostream>
++#define JSONCPP_ISTRINGSTREAM std::basic_istringstream, Json::SecureAllocator >
++#define JSONCPP_ISTREAM std::istream
++#else
++#define JSONCPP_STRING std::string
++#define JSONCPP_OSTRINGSTREAM std::ostringstream
++#define JSONCPP_OSTREAM std::ostream
++#define JSONCPP_ISTRINGSTREAM std::istringstream
++#define JSONCPP_ISTREAM std::istream
++#endif // if JSONCPP_USING_SECURE_MEMORY
++} // end namespace Json
++
++#endif // JSON_CONFIG_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/features.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/features.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/features.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/features.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,57 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
++#define CPPTL_JSON_FEATURES_H_INCLUDED
++
++#if !defined(JSON_IS_AMALGAMATION)
++#include "forwards.h"
++#endif // if !defined(JSON_IS_AMALGAMATION)
++
++namespace Json {
++
++/** \brief Configuration passed to reader and writer.
++ * This configuration object can be used to force the Reader or Writer
++ * to behave in a standard conforming way.
++ */
++class JSON_API Features {
++public:
++ /** \brief A configuration that allows all features and assumes all strings
++ * are UTF-8.
++ * - C & C++ comments are allowed
++ * - Root object can be any JSON value
++ * - Assumes Value strings are encoded in UTF-8
++ */
++ static Features all();
++
++ /** \brief A configuration that is strictly compatible with the JSON
++ * specification.
++ * - Comments are forbidden.
++ * - Root object must be either an array or an object value.
++ * - Assumes Value strings are encoded in UTF-8
++ */
++ static Features strictMode();
++
++ /** \brief Initialize the configuration like JsonConfig::allFeatures;
++ */
++ Features();
++
++ /// \c true if comments are allowed. Default: \c true.
++ bool allowComments_;
++
++ /// \c true if root must be either an array or an object value. Default: \c
++ /// false.
++ bool strictRoot_;
++
++ /// \c true if dropped null placeholders are allowed. Default: \c false.
++ bool allowDroppedNullPlaceholders_;
++
++ /// \c true if numeric object key are allowed. Default: \c false.
++ bool allowNumericKeys_;
++};
++
++} // namespace Json
++
++#endif // CPPTL_JSON_FEATURES_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/forwards.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/forwards.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/forwards.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/forwards.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,37 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef JSON_FORWARDS_H_INCLUDED
++#define JSON_FORWARDS_H_INCLUDED
++
++#if !defined(JSON_IS_AMALGAMATION)
++#include "config.h"
++#endif // if !defined(JSON_IS_AMALGAMATION)
++
++namespace Json {
++
++// writer.h
++class FastWriter;
++class StyledWriter;
++
++// reader.h
++class Reader;
++
++// features.h
++class Features;
++
++// value.h
++typedef unsigned int ArrayIndex;
++class StaticString;
++class Path;
++class PathArgument;
++class Value;
++class ValueIteratorBase;
++class ValueIterator;
++class ValueConstIterator;
++
++} // namespace Json
++
++#endif // JSON_FORWARDS_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/json.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/json.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/json.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/json.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,15 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef JSON_JSON_H_INCLUDED
++#define JSON_JSON_H_INCLUDED
++
++#include "autolink.h"
++#include "value.h"
++#include "reader.h"
++#include "writer.h"
++#include "features.h"
++
++#endif // JSON_JSON_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/reader.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/reader.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/reader.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/reader.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,404 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef CPPTL_JSON_READER_H_INCLUDED
++#define CPPTL_JSON_READER_H_INCLUDED
++
++#if !defined(JSON_IS_AMALGAMATION)
++#include "features.h"
++#include "value.h"
++#endif // if !defined(JSON_IS_AMALGAMATION)
++#include
++#include
++#include
++#include
++#include
++
++// Disable warning C4251: : needs to have dll-interface to
++// be used by...
++#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
++#pragma warning(push)
++#pragma warning(disable : 4251)
++#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
++
++namespace Json {
++
++/** \brief Unserialize a JSON document into a
++ *Value.
++ *
++ * \deprecated Use CharReader and CharReaderBuilder.
++ */
++class JSON_API Reader {
++public:
++ typedef char Char;
++ typedef const Char* Location;
++
++ /** \brief An error tagged with where in the JSON text it was encountered.
++ *
++ * The offsets give the [start, limit) range of bytes within the text. Note
++ * that this is bytes, not codepoints.
++ *
++ */
++ struct StructuredError {
++ ptrdiff_t offset_start;
++ ptrdiff_t offset_limit;
++ JSONCPP_STRING message;
++ };
++
++ /** \brief Constructs a Reader allowing all features
++ * for parsing.
++ */
++ Reader();
++
++ /** \brief Constructs a Reader allowing the specified feature set
++ * for parsing.
++ */
++ Reader(const Features& features);
++
++ /** \brief Read a Value from a JSON
++ * document.
++ * \param document UTF-8 encoded string containing the document to read.
++ * \param root [out] Contains the root value of the document if it was
++ * successfully parsed.
++ * \param collectComments \c true to collect comment and allow writing them
++ * back during
++ * serialization, \c false to discard comments.
++ * This parameter is ignored if
++ * Features::allowComments_
++ * is \c false.
++ * \return \c true if the document was successfully parsed, \c false if an
++ * error occurred.
++ */
++ bool
++ parse(const std::string& document, Value& root, bool collectComments = true);
++
++ /** \brief Read a Value from a JSON
++ document.
++ * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the
++ document to read.
++ * \param endDoc Pointer on the end of the UTF-8 encoded string of the
++ document to read.
++ * Must be >= beginDoc.
++ * \param root [out] Contains the root value of the document if it was
++ * successfully parsed.
++ * \param collectComments \c true to collect comment and allow writing them
++ back during
++ * serialization, \c false to discard comments.
++ * This parameter is ignored if
++ Features::allowComments_
++ * is \c false.
++ * \return \c true if the document was successfully parsed, \c false if an
++ error occurred.
++ */
++ bool parse(const char* beginDoc,
++ const char* endDoc,
++ Value& root,
++ bool collectComments = true);
++
++ /// \brief Parse from input stream.
++ /// \see Json::operator>>(std::istream&, Json::Value&).
++ bool parse(JSONCPP_ISTREAM& is, Value& root, bool collectComments = true);
++
++ /** \brief Returns a user friendly string that list errors in the parsed
++ * document.
++ * \return Formatted error message with the list of errors with their location
++ * in
++ * the parsed document. An empty string is returned if no error
++ * occurred
++ * during parsing.
++ * \deprecated Use getFormattedErrorMessages() instead (typo fix).
++ */
++ JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.")
++ JSONCPP_STRING getFormatedErrorMessages() const;
++
++ /** \brief Returns a user friendly string that list errors in the parsed
++ * document.
++ * \return Formatted error message with the list of errors with their location
++ * in
++ * the parsed document. An empty string is returned if no error
++ * occurred
++ * during parsing.
++ */
++ JSONCPP_STRING getFormattedErrorMessages() const;
++
++ /** \brief Returns a vector of structured erros encounted while parsing.
++ * \return A (possibly empty) vector of StructuredError objects. Currently
++ * only one error can be returned, but the caller should tolerate
++ * multiple
++ * errors. This can occur if the parser recovers from a non-fatal
++ * parse error and then encounters additional errors.
++ */
++ std::vector getStructuredErrors() const;
++
++ /** \brief Add a semantic error message.
++ * \param value JSON Value location associated with the error
++ * \param message The error message.
++ * \return \c true if the error was successfully added, \c false if the
++ * Value offset exceeds the document size.
++ */
++ bool pushError(const Value& value, const JSONCPP_STRING& message);
++
++ /** \brief Add a semantic error message with extra context.
++ * \param value JSON Value location associated with the error
++ * \param message The error message.
++ * \param extra Additional JSON Value location to contextualize the error
++ * \return \c true if the error was successfully added, \c false if either
++ * Value offset exceeds the document size.
++ */
++ bool pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra);
++
++ /** \brief Return whether there are any errors.
++ * \return \c true if there are no errors to report \c false if
++ * errors have occurred.
++ */
++ bool good() const;
++
++private:
++ enum TokenType {
++ tokenEndOfStream = 0,
++ tokenObjectBegin,
++ tokenObjectEnd,
++ tokenArrayBegin,
++ tokenArrayEnd,
++ tokenString,
++ tokenNumber,
++ tokenTrue,
++ tokenFalse,
++ tokenNull,
++ tokenArraySeparator,
++ tokenMemberSeparator,
++ tokenComment,
++ tokenError
++ };
++
++ class Token {
++ public:
++ TokenType type_;
++ Location start_;
++ Location end_;
++ };
++
++ class ErrorInfo {
++ public:
++ Token token_;
++ JSONCPP_STRING message_;
++ Location extra_;
++ };
++
++ typedef std::deque Errors;
++
++ bool readToken(Token& token);
++ void skipSpaces();
++ bool match(Location pattern, int patternLength);
++ bool readComment();
++ bool readCStyleComment();
++ bool readCppStyleComment();
++ bool readString();
++ void readNumber();
++ bool readValue();
++ bool readObject(Token& token);
++ bool readArray(Token& token);
++ bool decodeNumber(Token& token);
++ bool decodeNumber(Token& token, Value& decoded);
++ bool decodeString(Token& token);
++ bool decodeString(Token& token, JSONCPP_STRING& decoded);
++ bool decodeDouble(Token& token);
++ bool decodeDouble(Token& token, Value& decoded);
++ bool decodeUnicodeCodePoint(Token& token,
++ Location& current,
++ Location end,
++ unsigned int& unicode);
++ bool decodeUnicodeEscapeSequence(Token& token,
++ Location& current,
++ Location end,
++ unsigned int& unicode);
++ bool addError(const JSONCPP_STRING& message, Token& token, Location extra = 0);
++ bool recoverFromError(TokenType skipUntilToken);
++ bool addErrorAndRecover(const JSONCPP_STRING& message,
++ Token& token,
++ TokenType skipUntilToken);
++ void skipUntilSpace();
++ Value& currentValue();
++ Char getNextChar();
++ void
++ getLocationLineAndColumn(Location location, int& line, int& column) const;
++ JSONCPP_STRING getLocationLineAndColumn(Location location) const;
++ void addComment(Location begin, Location end, CommentPlacement placement);
++ void skipCommentTokens(Token& token);
++
++ typedef std::stack Nodes;
++ Nodes nodes_;
++ Errors errors_;
++ JSONCPP_STRING document_;
++ Location begin_;
++ Location end_;
++ Location current_;
++ Location lastValueEnd_;
++ Value* lastValue_;
++ JSONCPP_STRING commentsBefore_;
++ Features features_;
++ bool collectComments_;
++}; // Reader
++
++/** Interface for reading JSON from a char array.
++ */
++class JSON_API CharReader {
++public:
++ virtual ~CharReader() {}
++ /** \brief Read a Value from a JSON
++ document.
++ * The document must be a UTF-8 encoded string containing the document to read.
++ *
++ * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the
++ document to read.
++ * \param endDoc Pointer on the end of the UTF-8 encoded string of the
++ document to read.
++ * Must be >= beginDoc.
++ * \param root [out] Contains the root value of the document if it was
++ * successfully parsed.
++ * \param errs [out] Formatted error messages (if not NULL)
++ * a user friendly string that lists errors in the parsed
++ * document.
++ * \return \c true if the document was successfully parsed, \c false if an
++ error occurred.
++ */
++ virtual bool parse(
++ char const* beginDoc, char const* endDoc,
++ Value* root, JSONCPP_STRING* errs) = 0;
++
++ class JSON_API Factory {
++ public:
++ virtual ~Factory() {}
++ /** \brief Allocate a CharReader via operator new().
++ * \throw std::exception if something goes wrong (e.g. invalid settings)
++ */
++ virtual CharReader* newCharReader() const = 0;
++ }; // Factory
++}; // CharReader
++
++/** \brief Build a CharReader implementation.
++
++Usage:
++\code
++ using namespace Json;
++ CharReaderBuilder builder;
++ builder["collectComments"] = false;
++ Value value;
++ JSONCPP_STRING errs;
++ bool ok = parseFromStream(builder, std::cin, &value, &errs);
++\endcode
++*/
++class JSON_API CharReaderBuilder : public CharReader::Factory {
++public:
++ // Note: We use a Json::Value so that we can add data-members to this class
++ // without a major version bump.
++ /** Configuration of this builder.
++ These are case-sensitive.
++ Available settings (case-sensitive):
++ - `"collectComments": false or true`
++ - true to collect comment and allow writing them
++ back during serialization, false to discard comments.
++ This parameter is ignored if allowComments is false.
++ - `"allowComments": false or true`
++ - true if comments are allowed.
++ - `"strictRoot": false or true`
++ - true if root must be either an array or an object value
++ - `"allowDroppedNullPlaceholders": false or true`
++ - true if dropped null placeholders are allowed. (See StreamWriterBuilder.)
++ - `"allowNumericKeys": false or true`
++ - true if numeric object keys are allowed.
++ - `"allowSingleQuotes": false or true`
++ - true if '' are allowed for strings (both keys and values)
++ - `"stackLimit": integer`
++ - Exceeding stackLimit (recursive depth of `readValue()`) will
++ cause an exception.
++ - This is a security issue (seg-faults caused by deeply nested JSON),
++ so the default is low.
++ - `"failIfExtra": false or true`
++ - If true, `parse()` returns false when extra non-whitespace trails
++ the JSON value in the input string.
++ - `"rejectDupKeys": false or true`
++ - If true, `parse()` returns false when a key is duplicated within an object.
++ - `"allowSpecialFloats": false or true`
++ - If true, special float values (NaNs and infinities) are allowed
++ and their values are lossfree restorable.
++
++ You can examine 'settings_` yourself
++ to see the defaults. You can also write and read them just like any
++ JSON Value.
++ \sa setDefaults()
++ */
++ Json::Value settings_;
++
++ CharReaderBuilder();
++ ~CharReaderBuilder() JSONCPP_OVERRIDE;
++
++ CharReader* newCharReader() const JSONCPP_OVERRIDE;
++
++ /** \return true if 'settings' are legal and consistent;
++ * otherwise, indicate bad settings via 'invalid'.
++ */
++ bool validate(Json::Value* invalid) const;
++
++ /** A simple way to update a specific setting.
++ */
++ Value& operator[](JSONCPP_STRING key);
++
++ /** Called by ctor, but you can use this to reset settings_.
++ * \pre 'settings' != NULL (but Json::null is fine)
++ * \remark Defaults:
++ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
++ */
++ static void setDefaults(Json::Value* settings);
++ /** Same as old Features::strictMode().
++ * \pre 'settings' != NULL (but Json::null is fine)
++ * \remark Defaults:
++ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
++ */
++ static void strictMode(Json::Value* settings);
++};
++
++/** Consume entire stream and use its begin/end.
++ * Someday we might have a real StreamReader, but for now this
++ * is convenient.
++ */
++bool JSON_API parseFromStream(
++ CharReader::Factory const&,
++ JSONCPP_ISTREAM&,
++ Value* root, std::string* errs);
++
++/** \brief Read from 'sin' into 'root'.
++
++ Always keep comments from the input JSON.
++
++ This can be used to read a file into a particular sub-object.
++ For example:
++ \code
++ Json::Value root;
++ cin >> root["dir"]["file"];
++ cout << root;
++ \endcode
++ Result:
++ \verbatim
++ {
++ "dir": {
++ "file": {
++ // The input stream JSON would be nested here.
++ }
++ }
++ }
++ \endverbatim
++ \throw std::exception on parse error.
++ \see Json::operator<<()
++*/
++JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&);
++
++} // namespace Json
++
++#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
++#pragma warning(pop)
++#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
++
++#endif // CPPTL_JSON_READER_H_INCLUDED
+diff -Nuar polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/value.h polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/value.h
+--- polybar-3.2.1.orig/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/value.h 1970-01-01 02:00:00.000000000 +0200
++++ polybar-3.2.1/lib/i3ipcpp/libs/jsoncpp-1.7.7/include/json/value.h 2017-12-03 19:05:22.000000000 +0300
+@@ -0,0 +1,867 @@
++// Copyright 2007-2010 Baptiste Lepilleur
++// Distributed under MIT license, or public domain if desired and
++// recognized in your jurisdiction.
++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
++
++#ifndef CPPTL_JSON_H_INCLUDED
++#define CPPTL_JSON_H_INCLUDED
++
++#if !defined(JSON_IS_AMALGAMATION)
++#include "forwards.h"
++#endif // if !defined(JSON_IS_AMALGAMATION)
++#include
++#include
++#include
++
++#ifndef JSON_USE_CPPTL_SMALLMAP
++#include