Backport change from trunk:
api/maptermlist.h,api/matchspy.cc,api/omdatabase.cc,
backends/inmemory/inmemory_database.cc,
backends/inmemory/inmemory_positionlist.cc,
backends/multi/multi_postlist.cc,backends/remote/net_termlist.cc,
bin/xapian-delve.cc,matcher/exactphrasepostlist.cc,
matcher/mergepostlist.cc,matcher/phrasepostlist.cc,
tests/harness/backendmanager.cc: Prefer ++i to i++.

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@16994 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
backends/brass/brass_compact.cc,backends/chert/chert_compact.cc:
Remove unused variables (spotted by cppcheck).

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@16995 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
matcher/multimatch.cc: We no longer use the highest weighted
MSet entry to calculate percentages, so stop searching for it.
(Spotted by cppcheck)

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@16996 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
api/valuerangeproc.cc: Move 3 declarations to where we first use the
variables.

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@16997 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport changes from trunk:
examples/quest.cc: Need <algorithm> for lower_bound().
examples/quest.cc: Align option descriptions in --help output, and
make the initial letter of such descriptions consistently lowercase.
examples/quest.cc: Add --flags command line option to allow setting
arbitrary QueryParser flags.

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@16998 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
Makefile.am,languages/Makefile.mk,queryparser/Makefile.mk,
tests/Makefile.am: In automake, INCLUDES is now deprecated in favour
of AM_CPPFLAGS so update to use the latter.

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@16999 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
backends/brass/brass_database.cc,backends/chert/chert_database.cc:
Fix "if (fd > 0)" tests to be "if (fd >= 0)" in code related to
replication.  In practice this is unlikely to actually have caused
problems in real world cases.


git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@17000 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
api/compactor.cc,common/,languages/compiler/syswords2.h,
tests/api_compact.cc: Remove extra blank lines at end of files.


git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@17001 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
backends/brass/brass_databasereplicator.cc,
backends/chert/chert_databasereplicator.cc: Simplify how we open the
.DB file on the replication slave to just call open() once with
O_CREAT, rather than once without, than stat() if that fails, and
then again with O_CREAT|O_TRUNC if stat() doesn't show an ordinary
file exists.


git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@17002 6b2f1b92-a4f3-0310-943f-de3cbe41748b
bin/Makefile.mk: Fix srcdir != builddir buidl (broken by INCLUDES
to AM_CPPFLAGS change).

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@17003 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Fix bad entries for last few commits.


git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@17004 6b2f1b92-a4f3-0310-943f-de3cbe41748b
Backport change from trunk:
configure.ac: Use user-specified LIBS for configure tests, which is
what's expected, and provides a way for the user to tell configure
where to find library functions which configure can't find for
itself.

git-svn-id: file:///home/xapian-svn/xapian/branches/1.2@17005 6b2f1b92-a4f3-0310-943f-de3cbe41748b