Fix compiling with MSVC
Merge pull request #189 from ffes/fix-msvc-json

Fix compiling with MSVC
Lift up verbose lines in getSpecLanguageCommon to the function top level

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Fix unaligned indentation in getSpecLanguageCommon

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Use tasteLanguage before using getTwoGramLanguage

getTwoGramLanguage is unreliable technique; it is heavily
depends on prepared corpora and characters of input. Further
more it takes much cost of calculation than other methods.

Techniques in tasteLanguage are more reliable and take fewer
cost. So in this change, ctags tries tasteLanguage before
trying getTwoGramLanguage.

In this v2 patch, arbitrate parameter is introduced
as an argument for getSpecLanguageCommon; a caller
of getSpecLanguageCommon can specify what to do when
more than two languages are nominated for  given input.
This parameter is needed to avoid an infinite loop mentioned
in @dtikhonov in #186.

If getSpecLanguageCommon is called from getSpecLanguage,
just TwoGram technique is used to choose one of the languages.
If getSpecLanguageCommon is called from getPatternLanguage,
both tasting and TwoGram techniques are used to choose one.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Units: add a test case checking tasting is done before 2gram arbitration

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Merge pull request #190 from masatake/taste-befor-2gram-arbitration

Taste befor 2gram arbitration(v2)
units: print #valgrind-error line only if $WITH_VALGRIND is yes

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: print timeout limit in #TIMED-OUT of test summary

Signed-off-by: Masatake YAMATO <yamato@redhat.com>