Rename ENDSWITH to PUGI__ENDSWITH

Also add it to #undef list at the end to avoid conflicts

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1006 99668b35-9821-0410-8761-19e4c4f06640
Use PUGI__SCANWHILE for strconv utilities

This makes it easier to optimize strconv. For consistency move all definitions of parser-internal macros to one place.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1007 99668b35-9821-0410-8761-19e4c4f06640
Unroll performance-critical loops 4x

Use a special macro that unrolls the loop body and uses static branch prediction
to improve code generation.

This increases performance across all data sets from benchmark; clang x64 is 10%-40%
faster, clang x86 is 5%-20% faster, msvc is 5%-10% faster.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1008 99668b35-9821-0410-8761-19e4c4f06640
scripts: Add EXPORT pugixml-config
Merged pull request #7 from opoplawski/master.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1009 99668b35-9821-0410-8761-19e4c4f06640
tests: Add git-svn reviving script

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1010 99668b35-9821-0410-8761-19e4c4f06640
Fix VC 14 warnings

Fixes C4458: declaration of 'var' hides class member

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1011 99668b35-9821-0410-8761-19e4c4f06640
CMake tweaks:

- Include GNUInstallDirs which sets up standard install locations including
  lib64 for mulilib systems.
- Make BUILD_SHARED_LIBS an option instead of a variable which is better for
  use in either the cmake-gui or ccmake gui interfaces.
- Setup a destination for WIN32 runtime DLL's which is also helpful for MinGW
  installs.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1012 99668b35-9821-0410-8761-19e4c4f06640
Fix Jamrules.jam for Windows Kits 8.1

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1013 99668b35-9821-0410-8761-19e4c4f06640
Implement non-recursive node output

This makes node output 3% faster, prevents it from ever running out of
stack space and makes the profiling results more actionable for profilers
that can't merge information from recursive calls.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1014 99668b35-9821-0410-8761-19e4c4f06640
tests: Add a test for stackless write.

This test previously caused a stack overflow on x86/MSVC.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1015 99668b35-9821-0410-8761-19e4c4f06640
tests: Add test for custom indentation strings

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1016 99668b35-9821-0410-8761-19e4c4f06640
tests: Fix PUGIXML_WCHAR_MODE build

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1017 99668b35-9821-0410-8761-19e4c4f06640
Optimize text_output_indent

We now precompute indent length and have a fast path for lengths 0..4 that
avoids calling memcpy in a tight loop. This makes node output 20-30%
faster if indentation is enabled.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1018 99668b35-9821-0410-8761-19e4c4f06640
Optimize and refactor node output implementation a bit (+5% perf gain)

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1019 99668b35-9821-0410-8761-19e4c4f06640
tests: More XPath tests

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1020 99668b35-9821-0410-8761-19e4c4f06640
XPath: Optimize //name queries when possible

//name means /descendant-or-self::node()/child::name, but we frequently
can replace it with /descendant::name. This means we do not have to build
up a temporary node set with all descendants that can lead to 3x speedups.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1021 99668b35-9821-0410-8761-19e4c4f06640
tests: Add one more XPath optimization test

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1022 99668b35-9821-0410-8761-19e4c4f06640
Optimize xml_buffered_writer::write(const char_t*)

Instead of computing the length and doing memcpy we now copy the head of
the string into the buffer (like strcpy) and then use memcpy for tail if
necessary. This results in 10-15% speedup for writing typical documents with
a mix of short and long strings.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1023 99668b35-9821-0410-8761-19e4c4f06640
Optimize xml_buffered_writer::write(char_t...)

Make it easier for the compiler to generate good code by loading bufsize
into a local once and returning new offset from flush(). This results in
7% performance gain.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@1024 99668b35-9821-0410-8761-19e4c4f06640