Browse Source

Old version has been archived

avkonst 12 years ago
parent
commit
fb683fcf85

+ 5 - 0
old/.includepath

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<includepath>
+  <includepathentry path="./lib" />
+</includepath>
+

+ 17 - 0
old/.project

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SWI</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.epic.perleditor.perlbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.epic.perleditor.perlnature</nature>
+	</natures>
+</projectDescription>

+ 192 - 0
old/changelog.txt

@@ -0,0 +1,192 @@
+#
+#    Software Index, Copyright 2010, Software Index Project Team
+#    Link: http://swi.sourceforge.net
+#
+#    This file is part of Software Index Tool.
+#
+#    Software Index is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    Software Index is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+____________________________________________
+
+
+-- 2010/02/28: VERSION 0.9.2 released
+
+       -- Date:         2010/02/18
+          Reference:    noref
+          Issue type:   improvement
+          Severity:     None
+          Module(s):    Parser
+          Description:  Algorithm of generation of >>>GLOBAL<<< function changed.
+                        Now it does not include empty lines at the end.
+
+       -- Date:         2010/02/18
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Minor
+          Module(s):    Launcher
+          Description:  Exit code is now a sum of codes from scanner and appraiser
+
+       -- Date:         2010/02/18
+          Reference:    noref
+          Issue type:   improvement
+          Severity:     None
+          Module(s):    Launcher
+          Description:  Status message added at the end of execution
+
+       -- Date:         2010/02/16
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Minor
+          Module(s):    Appraiser
+          Description:  Infinity strings changed, perl warning removed
+
+       -- Date:         2010/02/16
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Critical
+          Module(s):    Gcov bridge
+          Description:  gcov usage command corrected
+          
+       -- Date:         2010/02/15
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Minor
+          Module(s):    Parser
+          Description:  regexp for C++ function identifier corrected
+
+____________________________________________
+
+
+-- 2010/02/15: VERSION 0.9.1 released
+
+       -- Date:         2010/02/14
+          Reference:    noref
+          Issue type:   feature
+          Severity:     Major
+          Module(s):    Appraiser
+          Description:  Relative limits are possible with zero numbers
+                        Infinity/-Infinity statistics supported
+
+       -- Date:         2010/02/14
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Major
+          Module(s):    Coverage indexer
+          Description:  Empty gcov data (no calls, no branches) is processed correctly now
+
+       -- Date:         2010/02/14
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Minor
+          Module(s):    Converter
+          Description:  Duplication messages are deactivated by default
+                        However, they are always printed if there corresponding failures
+
+       -- Date:         2010/02/14
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Minor
+          Module(s):    Scanner
+          Description:  Line offset bug fixed
+
+       -- Date:         2010/02/12
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Major
+          Module(s):    Processor
+          Description:  Calculation of length and crc statistics corrected for global code
+
+       -- Date:         2010/02/12
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Major
+          Module(s):    Appraiser
+          Description:  Calculation of avarage data fixed
+
+       -- Date:         2010/02/12
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Major
+          Module(s):    Duplication indexer
+          Description:  By default, it is now enabled
+
+       -- Date:         2010/02/12
+          Reference:    noref
+          Issue type:   improvement
+          Severity:     Minor
+          Module(s):    Images
+          Description:  Logos attached to the source control system
+
+       -- Date:         2010/02/12
+          Reference:    noref
+          Issue type:   improvement
+          Severity:     Minor
+          Module(s):    Parser (C++ language)
+          Description:  Excessive blank symbols are removed in names of functions-operators
+
+       -- Date:         2010/02/12
+          Reference:    noref
+          Issue type:   improvement
+          Severity:     Minor
+          Module(s):    Project description
+          Description:  Minor stylistic improvements
+
+       -- Date:         2010/02/11
+          Reference:    noref
+          Issue type:   feature
+          Severity:     Critical
+          Module(s):    Duplication indexer
+          Description:  Makefile added
+
+       -- Date:         2010/02/11
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Critical
+          Module(s):    Parser
+          Description:  C language, correction for nonamed enum, struct
+
+____________________________________________
+
+
+-- 2010/02/11: VERSION 0.9.0 released for internal beta testing
+
+       -- Date:         2010/02/10
+          Reference:    noref
+          Issue type:   feature
+          Severity:     Major
+          Module(s):    gcov bridge
+          Description:  Collection of coverage statistic added
+
+       -- Date:         2010/01/31
+          Reference:    noref
+          Issue type:   feature
+          Severity:     Critical
+          Module(s):    Parser
+          Description:  C++ language support added
+
+       -- Date:         2010/01/10
+          Reference:    noref
+          Issue type:   fix
+          Severity:     Critical
+          Module(s):    Parser
+          Description:  C language parser becomes loyal with code formating
+
+____________________________________________
+
+
+-- 2009/08/22: VERSION 0.8.0 released for internal beta testing
+____________________________________________
+
+
+-- 2009/07/13: VERSION 0.7.0 released for internal beta testing

+ 15 - 0
old/dupindex/Makefile

@@ -0,0 +1,15 @@
+#
+# Note: use gmake
+#
+
+PROGRAM    = bin/dupindex.exe
+SRC_CPP    = $(wildcard *.cpp)
+OBJECTS    = $(SRC_CPP:.cpp=.o)
+
+all: clean $(PROGRAM)
+
+$(PROGRAM): $(SRC_CPP)
+	g++ -O2 -o $@ $<
+
+clean:
+	rm $(PROGRAM) || echo ""

BIN
old/dupindex/bin/dupindex.exe


+ 476 - 0
old/dupindex/dupindex.cpp

@@ -0,0 +1,476 @@
+/*
+ *  Software Index, Copyright 2010, Software Index Project Team
+ *  Link: http://swi.sourceforge.net
+ *
+ *  This file is part of Software Index Tool.
+ *
+ *  Software Index is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, version 3 of the License.
+ *
+ *  Software Index is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <algorithm>
+#include <string>
+#include <vector>
+
+static const char SWI_EOF = '\x7'; // ASCII code 7 is used as EOF marker
+static const int  SWI_MAX_TEXT_LENGTH = 10000;
+
+/**
+ * Container for sortable stuff
+ * Strings are not moved, just bookmarks are sorted
+ */
+struct SwiBookmark
+{
+	int         m_possition;
+	const char* m_text;
+
+	// sort algorithm requires to define this operator
+	bool operator<(const SwiBookmark& another) const
+	{
+		return strcmp(another.m_text, m_text) < 0;
+	}
+};
+
+/**
+ * Container for the file/function record
+ */
+struct SwiRecord
+{
+	const char* functionName;
+	const char* fileName;
+	int         end;
+};
+
+/**
+ * Returns line number in intial record
+ * from the begging till the symbol by offset
+ */
+static int swiLineNumberGet(const char* text,
+							int         offset,
+							SwiRecord   files[],
+							int         fileIndex)
+{
+	const int start = (fileIndex == 0) ? 0 : files[fileIndex - 1].end;
+
+	int line = 1;
+	for (int i = start; i < offset; ++i)
+	{
+		if (text[i] == '\n')
+		{
+			++line;
+		}
+	}
+
+	return line;
+}
+
+/**
+ * Adds a character to the processed string,
+ * initializes new bookmark, and returns it
+ */
+static SwiBookmark swiProcessedCharacterAdd(char c, int originalPossition, char* processedText)
+{
+	static int processedPossition;
+	SwiBookmark bookmark;
+	bookmark.m_possition  = originalPossition;
+	bookmark.m_text = processedText + processedPossition;
+	processedText[processedPossition++] = c;
+	return bookmark;
+}
+
+/**
+ * Prints to stdout the found items
+ * The format of stdout is strictly defined by the caller: SWI/PROCESSOR
+ * Change it synchroniously with SWI/PROCESSOR code
+ */
+static void swiResultPrint(SwiBookmark bookmark,
+						   SwiRecord   files[],
+						   const char* originalText,
+						   int         numOfDuplicatedSymbols)
+{
+	int recordIndex = 0;
+	while (files[recordIndex].end <= bookmark.m_possition)
+	{
+		++recordIndex;
+	}
+
+	printf("duplication: file: '%s' function: '%s' possition: '%d' size: '%d' \n",
+		files[recordIndex].fileName,
+		files[recordIndex].functionName,
+		swiLineNumberGet(originalText, bookmark.m_possition, files, recordIndex),
+		numOfDuplicatedSymbols);
+}
+
+/**
+* Returns number of symbols which are equal from the beggining
+*/
+static int swiStringsCompare(SwiBookmark bookmarkFirst,
+							 SwiBookmark bookmarkSecond)
+{
+	int pos = 0;
+	for (; bookmarkFirst.m_text[pos] == bookmarkSecond.m_text[pos]; ++pos)
+	{
+		if (bookmarkFirst.m_text[pos] == SWI_EOF)
+		{
+			break;
+		}
+	}
+	return pos;
+}
+
+/**
+ * Checks if two strings are equal in the defined range of symbol's indexes:
+ * from the first symbol till upperLimit
+ */
+static bool swiStringsEqualCheck(SwiBookmark bookmarkFirst,
+								 SwiBookmark bookmarkSecond,
+								 int upperLimit,
+								 const char* endPos)
+{
+	if (bookmarkFirst.m_text + upperLimit >= endPos ||
+		bookmarkSecond.m_text + upperLimit >= endPos)
+	{
+		return false;
+	}
+
+	for (int i = upperLimit; i >= 0; --i)
+	{
+		if (bookmarkFirst.m_text[i] != bookmarkSecond.m_text[i])
+		{
+			return false;
+		}
+	}
+	return true;
+}
+
+/**
+ * Scans the original text into a processed text, which is returned.
+ * The processed string does not include the ignorable symbols
+ * The list of ignorable symbols is configured (usualy spaces)
+ * Bookmarks are installed for every newline
+ * if it begins from the 'regular' symbol
+ * The list of non-regular symbols is configred
+ */
+static const char* swiOriginalStringProcess(std::string               originalText,
+											std::vector<SwiBookmark>& bookmarks,
+											const char * ignorableSymbols,
+											const char * nonregularSymbols)
+{
+	char* const processedText = new char[originalText.length()];
+	bool  isNewlineDetected = true;
+
+	for (unsigned int i = 0; i < originalText.length(); ++i)
+	{
+		const char c = originalText[i];
+		bool isIgnorable  = false;
+		bool isRegular    = true;
+
+
+		// Processed text should not include the end-null symbol
+		if (c == '\0')
+		{
+			continue;
+		}
+
+		if (c == SWI_EOF)
+		{
+			swiProcessedCharacterAdd(c, i, processedText);
+			continue;
+		}
+
+		for (int j = 0; ignorableSymbols[j] != '\0'; ++j)
+		{
+			if (ignorableSymbols[j] == c)
+			{
+				isIgnorable = true;
+			}
+		}
+
+		for (int j = 0; nonregularSymbols[j] != '\0'; ++j)
+		{
+			if (nonregularSymbols[j] == c)
+			{
+				isRegular = false;
+			}
+		}
+
+		if (!isIgnorable)
+		{
+			if (isNewlineDetected && isRegular)
+			{
+				bookmarks.push_back(swiProcessedCharacterAdd(c, i, processedText));
+			}
+			else
+			{
+				swiProcessedCharacterAdd(c, i, processedText);
+			}
+
+			isNewlineDetected = false;
+		}
+
+		if (c == '\n')
+		{
+			isNewlineDetected = true;
+		}
+	}
+	swiProcessedCharacterAdd('\0', originalText.length(), processedText);
+
+	return processedText;
+}
+
+/**
+* Removes bookmarks which are in reported area already
+* It helps to prevent the unexpected reporting of the duplicatedSymbolsCount markers more than once
+*/
+static void swiBookmarksShift(std::vector<SwiBookmark>& bookmarks)
+{
+	unsigned int indexFrom = 0;
+	for (unsigned int indexTo = 0; indexTo < bookmarks.size() - 1; ++indexTo)
+	{
+		if (bookmarks[indexTo].m_text == 0)
+		{
+			if (indexFrom <= indexTo)
+			{
+				indexFrom = indexTo + 1;
+			}
+			while (indexFrom < bookmarks.size() &&
+				bookmarks[indexFrom].m_text == 0)
+			{
+				++indexFrom;
+			}
+
+			if (indexFrom == bookmarks.size())
+			{
+				break;
+			}
+
+			bookmarks[indexTo]= bookmarks[indexFrom];
+			bookmarks[indexFrom].m_text = 0;
+		}
+	}
+}
+
+/**
+ * Programm entry point
+ */
+int main(int argc, char* argv[])
+{
+	std::vector<SwiRecord>  files(0);
+	std::string commonString      = "";
+	int minLength         = 100;
+	int proximityFactor   = 100;
+	char * ignorabaleSymbols = new char[SWI_MAX_TEXT_LENGTH];
+	char * nonRegularSymbols = new char[SWI_MAX_TEXT_LENGTH];
+
+	strcpy(ignorabaleSymbols, " \t\n");
+	strcpy(nonRegularSymbols, "}");
+
+	while (1)
+	{
+		char * command = new char[SWI_MAX_TEXT_LENGTH];
+		scanf("%s", command);
+
+		if (strcmp(command, "start") == 0)
+		{
+			// Continue search algorithm
+			break;
+		}
+
+		if (strcmp(command, "exit") == 0)
+		{
+			// Breaking the search
+			exit(EXIT_SUCCESS);
+		}
+
+		if (strcmp(command, "init_length") == 0)
+		{
+			scanf("%d", &minLength);
+		}
+
+		if (strcmp(command, "init_proximity") == 0)
+		{
+			scanf("%d", &proximityFactor);
+
+			if (proximityFactor < 1 || proximityFactor > 100)
+			{
+				fprintf(stderr, "error: Proximity factor must be between 1 and 100 (inclusive)\n");
+				exit(EXIT_FAILURE);
+			}
+		}
+
+		if (strcmp(command, "init_ignorable") == 0)
+		{
+			// TODO: no ways to configure newline symbol
+			scanf("%s", ignorabaleSymbols);
+		}
+
+		if (strcmp(command, "init_nonregular") == 0)
+		{
+			// TODO: no ways to configure hewline symbol
+			scanf("%s", nonRegularSymbols);
+		}
+
+		if (strcmp(command, "init_file") == 0)
+		{
+			unsigned int fileLength = 0;
+			unsigned int functionLength = 0;
+			unsigned int textLength = 0;
+
+			scanf("%d", &fileLength);
+			scanf("%d", &functionLength);
+			scanf("%d", &textLength);
+
+			char * file     = new char[fileLength + 1];
+			char * function = new char[functionLength + 1];
+			char * text     = new char[textLength + 1 + 1]; // +1 for null pointer, +1 for EOF symbol
+
+			file[fileLength] = '\0';
+			function[functionLength] = '\0';
+			text[textLength] = SWI_EOF;
+			text[textLength + 1] = '\0';
+
+			fread(file, 1, 1, stdin); // Consume one empty symbol
+			fread(file, fileLength, 1, stdin);
+			fread(function, functionLength, 1, stdin);
+			fread(text, textLength, 1, stdin);
+
+			commonString += std::string(text);
+			SwiRecord record;
+			record.end        = commonString.length();
+			record.functionName = function;
+			record.fileName = file;
+			files.push_back(record);
+
+			delete text;
+		}
+
+		delete command;
+	}
+
+	if (commonString.length() == 0)
+	{
+		fprintf(stderr, "error: No files defined or they are empty\n");
+		exit(EXIT_FAILURE);
+	}
+
+	std::vector<SwiBookmark> bookmarks;
+	const char* processedText =
+		swiOriginalStringProcess(commonString, bookmarks, ignorabaleSymbols, nonRegularSymbols);
+	const char* processedEnd  = processedText + strlen(processedText);
+
+	std::sort(bookmarks.begin(), bookmarks.end());
+
+	while(1)
+	{
+		int longestDuplication = 0;
+		int firstInstanceIndex = 0;
+
+		// Find the two bookmarks that have the longest common substring.
+		for (unsigned int bookmarkIndex = 0; bookmarkIndex < bookmarks.size() - 1; ++bookmarkIndex)
+		{
+			if (bookmarks[bookmarkIndex + 1].m_text == 0)
+			{
+				break;
+			}
+
+			if (swiStringsEqualCheck(bookmarks[bookmarkIndex], bookmarks[bookmarkIndex + 1],
+				longestDuplication, processedEnd))
+			{
+				const int duplicatedSymbolsCount = swiStringsCompare(bookmarks[bookmarkIndex],
+					bookmarks[bookmarkIndex + 1]);
+				if (duplicatedSymbolsCount > longestDuplication)
+				{
+					firstInstanceIndex = bookmarkIndex;
+					longestDuplication = duplicatedSymbolsCount;
+				}
+			}
+		}
+
+		if (longestDuplication < minLength)
+		{
+			// Do not process too short strings
+			// This is the exit from the while loop
+			break;
+		}
+
+		int numberOfInstances        = 2;
+		int almostLongestDuplication = (longestDuplication * proximityFactor) / 100;
+		int initialIndexForScan = firstInstanceIndex;
+
+		// // Search for duplicated strings before the current pair.
+		for (int i = initialIndexForScan - 1; i >= 0; --i)
+		{
+			const int duplicatedSymbolsCount =
+				swiStringsCompare(bookmarks[initialIndexForScan], bookmarks[i]);
+
+			if (duplicatedSymbolsCount < almostLongestDuplication)
+			{
+				break;
+			}
+			numberOfInstances++;
+			if (longestDuplication > duplicatedSymbolsCount)
+			{
+				longestDuplication = duplicatedSymbolsCount;
+			}
+			firstInstanceIndex = i;
+		}
+
+		// Search for duplicated strings after the current pair.
+		for (unsigned int i = initialIndexForScan + 2; i < bookmarks.size(); ++i)
+		{
+			if (bookmarks[i].m_text == 0)
+			{
+				break;
+			}
+
+			const int duplicatedSymbolsCount = swiStringsCompare(bookmarks[initialIndexForScan],
+				bookmarks[i]);
+			if (duplicatedSymbolsCount < almostLongestDuplication)
+			{
+				break;
+			}
+			numberOfInstances++;
+			if (longestDuplication > duplicatedSymbolsCount)
+			{
+				longestDuplication = duplicatedSymbolsCount;
+			}
+		}
+
+		printf("info: group_start\n");
+		for (int i = 0; i < numberOfInstances; ++i)
+		{
+			swiResultPrint(bookmarks[firstInstanceIndex + i], &files[0],
+				commonString.c_str(), longestDuplication);
+
+			// Clear bookmarks that point out to the reported area.
+			const char* reportStart =
+				bookmarks[firstInstanceIndex + i].m_text;
+
+			for (unsigned int j = 0; j < bookmarks.size() - 1; ++j)
+			{
+				if (bookmarks[j].m_text >= reportStart &&
+					bookmarks[j].m_text < reportStart + longestDuplication)
+				{
+					bookmarks[j].m_text = 0;
+				}
+			}
+		}
+		printf("\n");
+
+		swiBookmarksShift(bookmarks);
+	}
+
+	delete [] processedText;
+	return 0;
+}
+
+

+ 20 - 0
old/dupindex/dupindex.sln

@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dupindex", "dupindex.vcproj", "{6D7440A9-F28B-4881-914F-79BDCF355F95}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{6D7440A9-F28B-4881-914F-79BDCF355F95}.Debug|Win32.ActiveCfg = Debug|Win32
+		{6D7440A9-F28B-4881-914F-79BDCF355F95}.Debug|Win32.Build.0 = Debug|Win32
+		{6D7440A9-F28B-4881-914F-79BDCF355F95}.Release|Win32.ActiveCfg = Release|Win32
+		{6D7440A9-F28B-4881-914F-79BDCF355F95}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 197 - 0
old/dupindex/dupindex.vcproj

@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="dupindex"
+	ProjectGUID="{6D7440A9-F28B-4881-914F-79BDCF355F95}"
+	RootNamespace="dupindex"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)bin"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="true"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\dupindex.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

BIN
old/images/logo.png


BIN
old/images/logo_project.jpg


BIN
old/images/logo_small.gif


BIN
old/images/logo_small.png


+ 11 - 0
old/index.html

@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-5" />
+<meta http-equiv="REFRESH" content="0;url=./project.html"></HEAD>
+<title>Index page, wait for redirect</title>
+</head>
+
+<body>
+</body>
+</html>

+ 91 - 0
old/lib/Internal/Output.pm

@@ -0,0 +1,91 @@
+#
+#    Software Index, Copyright 2010, Software Index Project Team
+#    Link: http://swi.sourceforge.net
+#
+#    This file is part of Software Index Tool.
+#
+#    Software Index is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    Software Index is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+#
+package Internal::Output;
+
+use strict;
+
+require Exporter;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $PREFERRED_PARSER);
+@ISA              = qw(Exporter);
+@EXPORT           = qw(DEBUG_ENABLED DEBUG STATUS PRINT);
+@EXPORT_OK        = qw(DEBUG_ENABLED DEBUG STATUS PRINT);
+$VERSION          = '1.0';
+$PREFERRED_PARSER = undef;
+
+#
+# Global variables
+#
+my $globalDebugEnabled = 0;
+
+#
+# Interfaces to get/set internal variables
+#
+
+sub DEBUG_ENABLED
+{
+    if (@_)
+    {
+        $globalDebugEnabled = shift();
+    }
+    return $globalDebugEnabled;
+}
+
+#
+# Interfaces to dump/print/publish the information
+#
+
+sub DEBUG
+{
+    my $text = shift();
+    if ( $globalDebugEnabled != 0 )
+    {
+        print "[SWI DEBUG  MESSAGE]: $text\n";
+    }
+}
+
+sub STATUS
+{
+    my $text = shift();
+    
+    print "[SWI STATUS MESSAGE]: $text\n";
+}
+
+sub PRINT
+{
+    my $file = shift();
+    my $line = shift();
+    my $severity = shift();
+    my $text = shift();
+    
+    $severity = lc $severity;
+    
+    if ( $severity ne 'debug' || $globalDebugEnabled != 0 )
+    {
+        if ($severity eq 'debug')
+        {
+            print STDOUT "$file:$line: $severity: $text\n";
+        }
+        elsif($severity eq 'error' || $severity eq 'warning' || $severity eq 'notice' || $severity eq 'info')
+        {
+            print STDERR "$file:$line: $severity: $text\n";
+        }
+    }
+}
+
+return 1;

File diff suppressed because it is too large
+ 1030 - 0
old/lib/SWI/Appraiser.pm


+ 351 - 0
old/lib/SWI/Converter.pm

@@ -0,0 +1,351 @@
+#
+#    Software Index, Copyright 2010, Software Index Project Team
+#    Link: http://swi.sourceforge.net
+#
+#    This file is part of Software Index Tool.
+#
+#    Software Index is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    Software Index is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+use strict;
+use XML::Simple;
+use FileHandle;
+use Data::Dumper;
+
+#
+# Export section
+#
+require Exporter;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $PREFERRED_PARSER);
+@ISA              = qw(Exporter);
+@EXPORT           = qw(swiConvert);
+@EXPORT_OK        = qw();
+$VERSION          = '1.0';
+$PREFERRED_PARSER = undef;
+
+#
+# Global variables
+#
+my $config = undef;
+
+#
+# Enter point
+#
+sub swiConvert
+{
+    $config = shift();
+
+    my $report   = undef;
+    my $exitCode = 0;
+
+    $report = XMLin(
+        $config->{"swi:report"}->{"swi:destination"} . "/"
+          . $config->{"swi:report"}->{"swi:xml"}->{"swi:name"},
+        ForceArray =>
+          [ "swi:module", "swi:file", "swi:function", "swi:reference" ]
+    );
+
+    # generate notification report
+    my $fh = new FileHandle(
+        $config->{"swi:report"}->{"swi:destination"} . "/"
+          . $config->{"swi:report"}->{"swi:notifications"}->{"swi:name"},
+        "w"
+      )
+      or die("Can not open output file!");
+
+    my $projectStat     = $report->{"swi:statistic"};
+    my $projectName     = $config->{"swi:info"}->{"swi:project"}->{"swi:name"};
+    my $projectLocation = $config->{"swi:report"}->{"swi:destination"};
+    my $projectDiff     = "modified";
+    $exitCode +=
+      swiNotificationPrint( $fh, $projectName, $projectLocation, undef,
+        $projectStat, $projectDiff );
+    for (
+        my $moduleId = 0 ;
+        $moduleId <= $#{ $report->{"swi:module"} } ;
+        $moduleId++
+      )
+    {
+        my $moduleStat = $report->{"swi:module"}[$moduleId]->{"swi:statistic"};
+        my $moduleName = $report->{"swi:module"}[$moduleId]->{"swi:name"};
+        my $moduleLocation =
+          $report->{"swi:module"}[$moduleId]->{"swi:location"};
+        my $moduleDiff =
+          $report->{"swi:module"}[$moduleId]->{"swi:modification"};
+        $exitCode +=
+          swiNotificationPrint( $fh, $projectName . "/" . $moduleName,
+            $moduleLocation, undef, $moduleStat, $moduleDiff );
+        for (
+            my $fileId = 0 ;
+            $fileId <= $#{ $report->{"swi:module"}[$moduleId]->{"swi:file"} } ;
+            $fileId++
+          )
+        {
+            my $fileStat =
+              $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+              ->{"swi:statistic"};
+            my $fileName =
+              $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+              ->{"swi:name"};
+            my $fileLocation =
+              $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+              ->{"swi:location"};
+            my $fileDiff =
+              $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+              ->{"swi:modification"};
+            $exitCode += swiNotificationPrint(
+                $fh, $projectName . "/" . $moduleName . "/" . $fileName,
+                $moduleLocation, $fileLocation . ":0",
+                $fileStat, $fileDiff
+            );
+            for (
+                my $functionId = 0 ;
+                $functionId <= $#{
+                    $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+                      ->{"swi:function"}
+                } ;
+                $functionId++
+              )
+            {
+                my $functionRefs =
+                  $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+                  ->{"swi:function"}[$functionId]->{"swi:reference"};
+                my $functionStat =
+                  $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+                  ->{"swi:function"}[$functionId]->{"swi:statistic"};
+                my $functionName =
+                  $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+                  ->{"swi:function"}[$functionId]->{"swi:name"};
+                my $functionLocation =
+                  $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+                  ->{"swi:function"}[$functionId]->{"swi:location"};
+                my $functionDiff =
+                  $report->{"swi:module"}[$moduleId]->{"swi:file"}[$fileId]
+                  ->{"swi:function"}[$functionId]->{"swi:modification"};
+                $exitCode += swiNotificationPrint(
+                    $fh,
+                    $projectName . "/"
+                      . $moduleName . "/"
+                      . $fileName . "/"
+                      . $functionName,
+                    $moduleLocation,
+                    $functionLocation,
+                    $functionStat,
+                    $functionDiff,
+                    $functionRefs
+                );
+            }
+        }
+    }
+    $fh->close();
+
+    $fh = new FileHandle(
+        $config->{"swi:report"}->{"swi:destination"} . "/"
+          . $config->{"swi:report"}->{"swi:notifications"}->{"swi:name"},
+        "r"
+      )
+      or die("Can not open input file!");
+
+    while (<$fh>)
+    {
+        print STDERR $_;
+    }
+    $fh->close();
+
+    return $exitCode;
+}
+
+sub swiNotificationPrint
+{
+    my $file         = shift();
+    my $objName      = shift();
+    my $modLocation  = shift();
+    my $fileLocation = shift();
+    my $objStat      = shift();
+    my $objDiff      = shift();
+    my $objRefs      = shift();
+    my $returnCode   = 0;
+
+    if ( !defined($fileLocation) )
+    {
+        $fileLocation = ".";
+    }
+
+    # Print 'swi:modifications'
+    if (   $objDiff ne "unmodified"
+        && $config->{"swi:report"}->{"swi:notifications"}->{"swi:print"}
+        ->{ "swi:" . $objDiff }->{"swi:modifications"} eq "on" )
+    {
+        my $notification =
+            "$modLocation/$fileLocation: " . "info"
+          . ": Object "
+          . $objName
+          . " has been "
+          . $objDiff
+          . "\n\tObject         : "
+          . $objName . "\n";
+        print $file $notification;
+        print $file "\n";
+    }
+
+    # Print 'swi:failures'
+    my $areThereDupViolations = 0;
+    foreach my $keyStat ( keys %$objStat )
+    {
+        my $subStat = $objStat->{$keyStat};
+        foreach my $keySubStat ( keys %$subStat )
+        {
+            my $types = $objStat->{$keyStat}->{$keySubStat};
+            foreach my $type ( keys %$types )
+            {
+                my $statInfo = $objStat->{$keyStat}->{$keySubStat}->{$type};
+                if (
+                    !(
+                        $statInfo->{"swi:level"} eq $statInfo->{"swi:suppress"}
+                        || (   $statInfo->{"swi:level"} eq "regular"
+                            && $statInfo->{"swi:suppress"} eq "undefined" )
+                    )
+                  )
+                {
+                    my $notification =
+                        "$modLocation/$fileLocation: "
+                      . $statInfo->{"swi:level"}
+                      . ": Index '"
+                      . "$keyStat/$keySubStat/$type"
+                      . "' exceeds the limit"
+                      . "\n\tObject         : "
+                      . $objName
+                      . "\n\tIndex value    : "
+                      . $statInfo->{"content"}
+                      . "\n\tModification   : "
+                      . $objDiff . " / "
+                      . $statInfo->{"swi:change"}
+                      . "\n\tSeverity       : "
+                      . $statInfo->{"swi:level"}
+                      . "\n\tCriteria       : "
+                      . $statInfo->{"swi:criteria"}
+                      . "\n\tSuppress level : "
+                      . $statInfo->{"swi:suppress"} . "\n";
+
+                    if ( $config->{"swi:report"}->{"swi:notifications"}
+                        ->{"swi:print"}->{ "swi:" . $objDiff }->{"swi:failures"}
+                        eq "on" )
+                    {
+                        print $file $notification;
+                        print $file "\n";
+
+                        if (   $keyStat eq "swi:duplication"
+                            && $keySubStat eq "swi:symbols"
+                            && $type       eq 'swi:exact' )
+                        {
+                            $areThereDupViolations = 1;
+                        }
+                    }
+
+                    if ( $config->{"swi:report"}->{"swi:notifications"}
+                        ->{"swi:error"}->{ "swi:" . $objDiff } eq "on" )
+                    {
+                        $returnCode++;
+                    }
+                }
+                if (   $statInfo->{"swi:level"} eq "unresolved"
+                    || $statInfo->{"swi:suppress"} eq "unresolved" )
+                {
+                    my $notification =
+                        "$modLocation/$fileLocation: "
+                      . $statInfo->{"swi:level"}
+                      . ": The level/severity of index '"
+                      . "$keyStat/$keySubStat/$type"
+                      . "' is unresolved"
+                      . "\n\tObject         : "
+                      . $objName
+                      . "\n\tIndex value    : "
+                      . $statInfo->{"content"}
+                      . "\n\tModification   : "
+                      . $objDiff . " / "
+                      . $statInfo->{"swi:change"}
+                      . "\n\tSeverity       : "
+                      . $statInfo->{"swi:level"}
+                      . "\n\tCriteria       : "
+                      . $statInfo->{"swi:criteria"}
+                      . "\n\tSuppress level : "
+                      . $statInfo->{"swi:suppress"} . "\n\n";
+
+                    print $file $notification;
+                    $returnCode++;
+                }
+            }
+        }
+    }
+
+    # Print 'swi:duplications'
+    if (
+        $areThereDupViolations == 1
+        || $config->{"swi:report"}->{"swi:notifications"}->{"swi:print"}
+        ->{ "swi:" . $objDiff }->{"swi:duplications"} eq "on"
+      )
+    {
+        my $isPrinted = 0;
+        foreach my $dupData ( @{$objRefs} )
+        {
+            if ( $dupData->{'swi:ref:type'} eq 'dup' )
+            {
+                print $file $modLocation . "/"
+                  . $dupData->{'swi:dup:file'} . ":"
+                  . $dupData->{'swi:dup:line'}
+                  . ": warning: '"
+                  . $dupData->{'swi:dup:size'}
+                  . "' executable symbols are duplicated in '"
+                  . $dupData->{'swi:dup:function'}
+                  . "' function\n";
+                $isPrinted = 1;
+            }
+        }
+        if ($isPrinted == 1)
+        {
+            print $file "\n";
+        }
+    }
+
+    # Print 'swi:scanmessages'
+    if ( $config->{"swi:report"}->{"swi:notifications"}->{"swi:print"}
+        ->{ "swi:" . $objDiff }->{"swi:scanmessages"} eq "on" )
+    {
+        foreach my $scanData ( @{$objRefs} )
+        {
+            if (
+                $scanData->{'swi:ref:type'} eq 'scan'
+                && !(
+                    defined( $scanData->{'swi:scan:suppress'} )
+                    && $scanData->{'swi:scan:suppress'} eq 'on'
+                )
+              )
+            {
+                print $file $modLocation . "/"
+                  . $scanData->{'swi:scan:file'} . ":"
+                  . $scanData->{'swi:scan:line'}
+                  . ": warning: "
+                  . $scanData->{'swi:scan:message'}
+                  . "\n\tObject         : "
+                  . $objName
+                  . "\n\tModification   : "
+                  . $objDiff . "\n\n";
+                $returnCode++;
+            }
+        }
+    }
+
+    return $returnCode;
+}
+
+return 1;

+ 740 - 0
old/lib/SWI/Launcher.pm

@@ -0,0 +1,740 @@
+#
+#    Software Index, Copyright 2010, Software Index Project Team
+#    Link: http://swi.sourceforge.net
+#
+#    This file is part of Software Index Tool.
+#
+#    Software Index is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    Software Index is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+use strict;
+use XML::Simple;
+use FileHandle;
+
+#
+# Export section
+#
+require Exporter;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $PREFERRED_PARSER);
+@ISA              = qw(Exporter);
+@EXPORT           = qw(swiLaunch);
+@EXPORT_OK        = qw();
+$VERSION          = '1.0';
+$PREFERRED_PARSER = undef;
+
+#
+# Subroutine for troubleshooting purposes
+#
+use Internal::Output;
+
+#
+# Include SWI libs
+#
+require SWI::Appraiser;
+require SWI::Converter;
+require SWI::Merger;
+require SWI::Processor;
+
+#
+# Global variables
+#
+my $config = undef;
+
+#
+# Enter point
+#
+sub swiLaunch
+{
+    my $returnCode       = 0;
+    my $rootLocation     = shift();
+    my $swiConfiguration = shift();
+
+    # $returnCode == 0 => no critical errors and warnings
+    # $returnCode >  0 => no critical errors, there are warnings
+    # $returnCode <  0 => there are critical errors
+
+    if ( $returnCode >= 0 )
+    {
+        if ( $swiConfiguration eq "" )
+        {
+            STATUS("Configuration file should be specified!");
+            $returnCode = -1;
+        }
+        else
+        {
+            STATUS("Configuration file: $swiConfiguration.");
+        }
+    }
+
+    if ( $returnCode >= 0 )
+    {
+        if ( swiConfigurationValidate($swiConfiguration) != 0 )
+        {
+            STATUS("Wrong configuration file!");
+            $returnCode = -2;
+        }
+    }
+
+    if ( $returnCode >= 0 )
+    {
+
+        # Generate report for every module separately
+        for (
+            my $i = 0 ;
+            $i <= $#{ $config->{"swi:modules"}->{"swi:module"} } ;
+            $i++
+          )
+        {
+            STATUS( "Processing module: '"
+                  . $config->{"swi:modules"}->{"swi:module"}[$i]->{"swi:name"}
+                  . "'." );
+            my $result = swiProcess( $config, $i, $rootLocation );
+            if ( $result < 0 )
+            {
+                STATUS("The are problems to report the index for the module!");
+                $returnCode = -5;
+            }
+            elsif ( $result > 0 )
+            {
+                STATUS("The are scan warnings and/or errors.");
+                $returnCode += $result;
+            }
+            else
+            {
+                STATUS("The module has been processed succesfully.");
+            }
+        }
+    }
+
+    if ( $returnCode >= 0 )
+    {
+
+        # Merge reports
+        if ( swiMerge($config) )
+        {
+            STATUS("The are problems to merge files to one report!");
+            $returnCode = -3;
+        }
+        else
+        {
+            STATUS("Merged report has been created.");
+        }
+    }
+
+    if ( $returnCode >= 0 )
+    {
+
+        # Add average/min/max/total values and generate final XML report
+        if ( swiAppraise($config) )
+        {
+            STATUS("The are problems to add average/min/max/total values!");
+            $returnCode = -4;
+        }
+        else
+        {
+            STATUS("Average/min/max/total values have been added.");
+        }
+    }
+
+    if ( $returnCode >= 0 )
+    {
+
+        # Convert results
+        my $result = swiConvert($config);
+        if ( $result < 0 )
+        {
+            STATUS("The are problems to convert the report!");
+            $returnCode = -5;
+        }
+        elsif ( $result > 0 )
+        {
+            STATUS(
+                "Report has been converted. There are exceeded limitations.");
+            $returnCode += $result;
+        }
+        else
+        {
+            STATUS("Report has been converted.");
+        }
+    }
+
+    STATUS("Execution completed with exit code '$returnCode'.");
+    return $returnCode;
+}
+
+sub swiConfigurationValidate
+{
+    my $result = 0;
+    $config =
+      XMLin( shift(),
+        ForceArray => [ "swi:module", "swi:rule", "swi:pattern" ] );
+
+    if ( !defined( $config->{'swi:info'} ) )
+    {
+        STATUS("Wrong configuration: 'swi:info' section missed.");
+        $result++;
+    }
+    else
+    {
+        if ( !defined( $config->{'swi:info'}->{'swi:version'} ) )
+        {
+            STATUS(
+                "Wrong configuration: 'swi:info/swi:version' section missed.");
+            $result++;
+        }
+        elsif ( $config->{'swi:info'}->{'swi:version'} != 1 )
+        {
+            STATUS(
+"Wrong configuration: Unsupported version of the configuration file. Check 'swi:info/swi:version' section."
+            );
+            $result++;
+        }
+
+        if ( !defined( $config->{'swi:info'}->{'swi:project'} ) )
+        {
+            STATUS(
+                "Wrong configuration: 'swi:info/swi:project' section missed.");
+            $result++;
+        }
+        else
+        {
+            if (
+                !defined(
+                    $config->{'swi:info'}->{'swi:project'}->{'swi:name'}
+                )
+              )
+            {
+                STATUS(
+"Wrong configuration: 'swi:info/swi:project/swi:name' section missed."
+                );
+                $result++;
+            }
+            elsif ( $config->{'swi:info'}->{'swi:project'}->{'swi:name'} eq "" )
+            {
+                STATUS(
+"Wrong configuration: 'swi:info/swi:project/swi:name' is empty."
+                );
+                $result++;
+            }
+        }
+    }
+
+    if ( !defined( $config->{'swi:general'} )
+        || ref( $config->{'swi:general'} ) ne 'HASH' )
+    {
+        $config->{'swi:general'} = {};
+    }
+    if ( !defined( $config->{'swi:general'}->{'swi:debug'} )
+        || ref( $config->{'swi:general'}->{'swi:debug'} ) ne 'HASH' )
+    {
+        $config->{'swi:general'}->{'swi:debug'} = {};
+    }
+    if ( !defined( $config->{'swi:general'}->{'swi:debug'}->{'swi:enabled'} ) )
+    {
+        $config->{'swi:general'}->{'swi:debug'}->{'swi:enabled'} = 'off';
+    }
+    DEBUG_ENABLED(
+        ( $config->{'swi:general'}->{'swi:debug'}->{'swi:enabled'} eq 'on' )
+        ? 1
+        : 0
+    );
+
+    if ( !defined( $config->{'swi:modules'} )
+        || ref( $config->{'swi:modules'} ) ne 'HASH' )
+    {
+        STATUS("Wrong configuration: 'swi:modules' section missed.");
+        $result++;
+    }
+    else
+    {
+        if ( !defined( $config->{'swi:modules'}->{'swi:module'} )
+            || ref( $config->{'swi:modules'}->{'swi:module'} ) ne 'ARRAY' )
+        {
+            STATUS(
+                "Wrong configuration: 'swi:modules/swi:module' section missed."
+            );
+            $result++;
+        }
+        else
+        {
+            my $moduleId = 0;
+            foreach my $module ( @{ $config->{'swi:modules'}->{'swi:module'} } )
+            {
+                if ( !defined( $module->{'swi:name'} ) )
+                {
+                    STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:name' section missed."
+                    );
+                    $result++;
+                }
+                if ( !defined( $module->{'swi:location'} ) )
+                {
+                    STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:location' section missed."
+                    );
+                    $result++;
+                }
+
+                if ( !defined( $module->{'swi:files'} )
+                    || ref( $module->{'swi:files'} ) ne 'HASH' )
+                {
+                    $module->{'swi:files'} = {};
+                }
+                if ( !defined( $module->{'swi:files'}->{'swi:include'} ) )
+                {
+                    $module->{'swi:files'}->{'swi:include'} = '.*';
+                }
+                if ( !defined( $module->{'swi:files'}->{'swi:exclude'} ) )
+                {
+                    $module->{'swi:files'}->{'swi:exclude'} = '';
+                }
+
+                if ( !defined( $module->{'swi:preprocessor'} )
+                    || ref( $module->{'swi:preprocessor'} ) ne 'HASH' )
+                {
+                    $module->{'swi:preprocessor'} = {};
+                }
+                if ( !defined( $module->{'swi:preprocessor'}->{'swi:rule'} ) )
+                {
+                    $module->{'swi:preprocessor'}->{'swi:rule'} = [];
+                }
+
+                my $ruleId = 0;
+                foreach
+                  my $rule ( @{ $module->{'swi:preprocessor'}->{'swi:rule'} } )
+                {
+                    if ( !defined( $rule->{'swi:filepattern'} )
+                        || $rule->{'swi:filepattern'} eq "" )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:preprocessor/swi:rule[$ruleId]/swi:filepattern' section missed."
+                        );
+                        $result++;
+                    }
+                    if ( !defined( $rule->{'swi:searchpattern'} )
+                        || $rule->{'swi:searchpattern'} eq "" )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:preprocessor/swi:rule[$ruleId]/swi:searchpattern' section missed."
+                        );
+                        $result++;
+                    }
+                    if ( !defined( $rule->{'swi:replacepattern'} )
+                        || $rule->{'swi:replacepattern'} eq "" )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:preprocessor/swi:rule[$ruleId]/swi:replacepattern' section missed."
+                        );
+                        $result++;
+                    }
+
+                    $ruleId++;
+                }
+
+                if ( !defined( $module->{'swi:scanner'} )
+                    || ref( $module->{'swi:scanner'} ) ne 'HASH' )
+                {
+                    $module->{'swi:scanner'} = {};
+                }
+                if ( !defined( $module->{'swi:scanner'}->{'swi:rule'} ) )
+                {
+                    $module->{'swi:scanner'}->{'swi:rule'} = [];
+                }
+
+                $ruleId = 0;
+                foreach my $rule ( @{ $module->{'swi:scanner'}->{'swi:rule'} } )
+                {
+                    if ( !defined( $rule->{'swi:filepattern'} )
+                        || $rule->{'swi:filepattern'} eq "" )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:scanner/swi:rule[$ruleId]/swi:filepattern' section missed."
+                        );
+                        $result++;
+                    }
+                    if ( !defined( $rule->{'swi:searchpattern'} )
+                        || $rule->{'swi:searchpattern'} eq "" )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:scanner/swi:rule[$ruleId]/swi:searchpattern' section missed."
+                        );
+                        $result++;
+                    }
+                    if ( !defined( $rule->{'swi:messagepattern'} )
+                        || $rule->{'swi:messagepattern'} eq "" )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:scanner/swi:rule[$ruleId]/swi:messagepattern' section missed."
+                        );
+                        $result++;
+                    }
+
+                    if ( !defined( $rule->{'swi:codecontent'} )
+                        || $rule->{'swi:codecontent'} eq "" )
+                    {
+                        $rule->{'swi:codecontent'} = 'purified';
+                    }
+
+                    $ruleId++;
+                }
+
+                if ( !defined( $module->{'swi:scanner'}->{'swi:suppress'} ) )
+                {
+                    $module->{'swi:scanner'}->{'swi:suppress'} = {};
+                }
+                if (
+                    !defined(
+                        $module->{'swi:scanner'}->{'swi:suppress'}
+                          ->{'swi:pattern'}
+                    )
+                  )
+                {
+                    $module->{'swi:scanner'}->{'swi:suppress'}
+                      ->{'swi:pattern'} = [];
+                }
+
+                my $patternId = 0;
+                foreach my $pattern (
+                    @{
+                        $module->{'swi:scanner'}->{'swi:suppress'}
+                          ->{'swi:pattern'}
+                    }
+                  )
+                {
+                    if ( ref($pattern) ne 'HASH' )
+                    {
+                        STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:scanner/swi:suppress/swi:pattern[$patternId]' section is incorrect."
+                        );
+                        $result++;
+                    }
+                    else
+                    {
+                        if ( !defined( $pattern->{'swi:message'} )
+                            || $pattern->{'swi:message'} eq "" )
+                        {
+                            STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:scanner/swi:suppress/swi:pattern[$patternId]/swi:message' field is empty."
+                            );
+                            $result++;
+                        }
+                        if ( !defined( $pattern->{'content'} )
+                            || $pattern->{'content'} eq "" )
+                        {
+                            STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:scanner/swi:suppress/swi:pattern[$patternId]' object pattern is empty."
+                            );
+                            $result++;
+                        }
+                    }
+
+                    $patternId++;
+                }
+
+                if ( !defined( $module->{'swi:indexer:common'} )
+                    || ref( $module->{'swi:indexer:common'} ) ne 'HASH' )
+                {
+                    $module->{'swi:indexer:common'} = {};
+                }
+
+                if ( !defined( $module->{'swi:indexer:dup'} )
+                    || ref( $module->{'swi:indexer:dup'} ) ne 'HASH' )
+                {
+                    $module->{'swi:indexer:dup'} = {};
+                }
+                if (
+                    !defined(
+                        $module->{'swi:indexer:dup'}->{'swi:codecontent'}
+                    )
+                  )
+                {
+                    $module->{'swi:indexer:dup'}->{'swi:codecontent'} =
+                      'purified';
+                }
+                if ( !defined( $module->{'swi:indexer:dup'}->{'swi:enabled'} ) )
+                {
+                    $module->{'swi:indexer:dup'}->{'swi:enabled'} = 'on';
+                }
+                if ( !defined( $module->{'swi:indexer:dup'}->{'swi:minlength'} )
+                  )
+                {
+                    $module->{'swi:indexer:dup'}->{'swi:minlength'} = 100;
+                }
+                if ( $module->{'swi:indexer:dup'}->{'swi:minlength'} <= 0 )
+                {
+                    STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:indexer:dup/swi:minlength' can not be less than or equal to zero."
+                    );
+                    $result++;
+                }
+                if ( !defined( $module->{'swi:indexer:dup'}->{'swi:proximity'} )
+                  )
+                {
+                    $module->{'swi:indexer:dup'}->{'swi:proximity'} = 100;
+                }
+                if (   $module->{'swi:indexer:dup'}->{'swi:proximity'} <= 0
+                    || $module->{'swi:indexer:dup'}->{'swi:proximity'} > 100 )
+                {
+                    STATUS(
+"Wrong configuration: 'swi:modules/swi:module[$moduleId]/swi:indexer:dup/swi:proximity' should be in the range from 1 till 100."
+                    );
+                    $result++;
+                }
+                if (
+                    !defined(
+                        $module->{'swi:indexer:dup'}->{'swi:globalcode'}
+                    )
+                  )
+                {
+                    $module->{'swi:indexer:dup'}->{'swi:globalcode'} = 'off';
+                }
+
+                if ( !defined( $module->{'swi:indexer:gcov'} )
+                    || ref( $module->{'swi:indexer:gcov'} ) ne 'HASH' )
+                {
+                    $module->{'swi:indexer:gcov'} = {};
+                }
+                if ( !defined( $module->{'swi:indexer:gcov'}->{'swi:enabled'} ) )
+                {
+                    $module->{'swi:indexer:gcov'}->{'swi:enabled'} = 'off';
+                }
+                if ( !defined( $module->{'swi:indexer:gcov'}->{'swi:filepattern'} ) )
+                {
+                    $module->{'swi:indexer:gcov'}->{'swi:filepattern'} = '.*';
+                }
+                if ( !defined( $module->{'swi:indexer:gcov'}->{'swi:sourcefile'} ) )
+                {
+                    $module->{'swi:indexer:gcov'}->{'swi:sourcefile'} = '(.*)[.][cChH][pP]?[pP]?';
+                }
+                if ( !defined( $module->{'swi:indexer:gcov'}->{'swi:gcdafile'} ) )
+                {
+                    $module->{'swi:indexer:gcov'}->{'swi:gcdafile'} = '${1}.gcda';
+                }
+
+                $moduleId++;
+            }
+        }
+    }
+
+    if ( !defined( $config->{'swi:report'} )
+        || ref( $config->{'swi:report'} ) ne 'HASH' )
+    {
+        STATUS("Wrong configuration: 'swi:report' section missed.");
+        $result++;
+    }
+    else
+    {
+        if ( !defined( $config->{'swi:report'}->{'swi:destination'} ) )
+        {
+            STATUS(
+"Wrong configuration: 'swi:report/swi:destination' section missed."
+            );
+            $result++;
+        }
+
+        if ( !defined( $config->{'swi:report'}->{'swi:xml'} ) )
+        {
+            STATUS("Wrong configuration: 'swi:report/swi:xml' section missed.");
+            $result++;
+        }
+        else
+        {
+            if (
+                !defined( $config->{'swi:report'}->{'swi:xml'}->{'swi:name'} ) )
+            {
+                STATUS(
+"Wrong configuration: 'swi:report/swi:xml/swi:name' section is empty."
+                );
+                $result++;
+            }
+        }
+
+        if ( !defined( $config->{'swi:report'}->{'swi:notifications'} ) )
+        {
+            STATUS(
+"Wrong configuration: 'swi:report/swi:notifications' section missed."
+            );
+            $result++;
+        }
+        else
+        {
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}->{'swi:name'}
+                )
+              )
+            {
+                STATUS(
+"Wrong configuration: 'swi:report/swi:notifications/swi:name' section is empty."
+                );
+                $result++;
+            }
+
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}
+                )
+                || ref(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}
+                ) ne 'HASH'
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:error'} =
+                  {};
+            }
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}->{'swi:added'}
+                )
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:error'}
+                  ->{'swi:added'} = 'on';
+            }
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}->{'swi:removed'}
+                )
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:error'}
+                  ->{'swi:removed'} = 'on';
+            }
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}->{'swi:modified'}
+                )
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:error'}
+                  ->{'swi:modified'} = 'on';
+            }
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}->{'swi:cloned'}
+                )
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:error'}
+                  ->{'swi:cloned'} = 'on';
+            }
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:error'}->{'swi:unmodified'}
+                )
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:error'}
+                  ->{'swi:unmodified'} = 'on';
+            }
+
+            if (
+                !defined(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:print'}
+                )
+                || ref(
+                    $config->{'swi:report'}->{'swi:notifications'}
+                      ->{'swi:print'}
+                ) ne 'HASH'
+              )
+            {
+                $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'} =
+                  {};
+            }
+            swiUtilConfigFill_PrintSection($config, 'swi:added');
+            swiUtilConfigFill_PrintSection($config, 'swi:removed');
+            swiUtilConfigFill_PrintSection($config, 'swi:modified');
+            swiUtilConfigFill_PrintSection($config, 'swi:cloned');
+            swiUtilConfigFill_PrintSection($config, 'swi:unmodified');
+            
+        }
+    }
+    
+    # swi:limits section is verified in runtime
+    # no precheck currently 
+
+    DEBUG( "Configuration structure is: " . Dumper($config) );
+    return $result;
+}
+
+sub swiUtilConfigFill_PrintSection
+{
+    my $config  = shift();
+    my $modType = shift();
+
+    if (
+        !defined(
+            $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+              ->{$modType}
+        )
+        || ref(
+            $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+              ->{$modType}
+        ) ne 'HASH'
+      )
+    {
+        $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+          ->{$modType} = {};
+    }
+    
+    if (
+        !defined(
+            $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+              ->{$modType}->{'swi:failures'}
+        )
+      )
+    {
+        $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+          ->{$modType}->{'swi:failures'} = 'on';
+    }
+    if (
+        !defined(
+            $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+              ->{$modType}->{'swi:modifications'}
+        )
+      )
+    {
+        $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+          ->{$modType}->{'swi:modifications'} = 'on';
+    }
+    if (
+        !defined(
+            $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+              ->{$modType}->{'swi:duplications'}
+        )
+      )
+    {
+        $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+          ->{$modType}->{'swi:duplications'} = 'off';
+    }
+    if (
+        !defined(
+            $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+              ->{$modType}->{'swi:scanmessages'}
+        )
+      )
+    {
+        $config->{'swi:report'}->{'swi:notifications'}->{'swi:print'}
+          ->{$modType}->{'swi:scanmessages'} = 'on';
+    }
+}
+
+return 1;

+ 105 - 0
old/lib/SWI/Merger.pm

@@ -0,0 +1,105 @@
+#
+#    Software Index, Copyright 2010, Software Index Project Team
+#    Link: http://swi.sourceforge.net
+#
+#    This file is part of Software Index Tool.
+#
+#    Software Index is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    Software Index is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+use strict;
+use FileHandle;
+use XML::Simple;
+
+#
+# Export section
+#
+require Exporter;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $PREFERRED_PARSER);
+@ISA              = qw(Exporter);
+@EXPORT           = qw(swiMerge);
+@EXPORT_OK        = qw();
+$VERSION          = '1.0';
+$PREFERRED_PARSER = undef;
+
+#
+# Enter point
+#
+sub swiMerge
+{
+    my $config         = shift();
+    
+    my $reportLocation =
+        $config->{"swi:report"}->{"swi:destination"} . "/"
+      . $config->{"swi:report"}->{"swi:xml"}->{"swi:name"};
+
+    my $fh = new FileHandle( $reportLocation . ".x", "w" ) or die ("Can not open output file '$reportLocation'!");
+
+    print $fh "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+    print $fh "<swi:report>\n";
+    print $fh "\n";
+    print $fh "  <swi:info>\n";
+    print $fh "    <swi:version>1.0</swi:version>\n";
+    if (defined($ENV{USER}))
+    {
+        print $fh "    <swi:user>" . $ENV{USER} . "</swi:user>\n";
+    }
+    print $fh "    <swi:generator>SWI/MERGER</swi:generator>\n";
+    print $fh "  </swi:info>\n";
+    print $fh "\n";
+    
+    my $modulesCount = $#{ $config->{"swi:modules"}->{"swi:module"} } + 1;
+    my $filesCount = 0;
+    my $functionsCount = 0;
+
+    for ( my $i = 0 ; $i < $modulesCount ; $i++ )
+    {
+        my $modFh = new FileHandle( "$reportLocation.$i", "r" ) or die ("Can not open input file '$reportLocation.$i'!");
+        my @lines = <$modFh>;
+        $modFh->close();
+        for ( my $j = 3 ; $j < $#lines ; $j++ )
+        {
+            print $fh $lines[$j];
+            if ($lines[$j] =~ m/^[ ]*<swi:count>[ ]*$/)
+            {
+                if ($lines[$j+1] =~ m/^[ ]*<swi:files[ ]+swi:exact="([0-9]*)"[ ]*\/>[ ]*$/)
+                {
+                    my $numFilesInModule = $1;
+                    if ($lines[$j+2] =~ m/^[ ]*<swi:functions[ ]+swi:exact="([0-9]*)"[ ]*\/>[ ]*$/)
+                    {
+                        my $numFunctionsInModule = $1;
+                        $functionsCount += $numFunctionsInModule;
+                        $filesCount += $numFilesInModule;
+                    }
+                }
+            }
+        }
+    }
+
+    print $fh "  <swi:statistic>\n";
+    print $fh "    <swi:count>\n";
+    print $fh "      <swi:modules swi:exact=\"" . $modulesCount . "\" />\n";
+    print $fh "      <swi:files swi:exact=\"" . $filesCount . "\" />\n";
+    print $fh "      <swi:functions swi:exact=\"" . $functionsCount . "\" />\n";
+    print $fh "    </swi:count>\n";
+    print $fh "  </swi:statistic>\n";
+    print $fh "\n";
+
+    print $fh "</swi:report>\n";
+    
+    $fh->close();
+
+    return 0;
+}
+
+return 1;

File diff suppressed because it is too large
+ 1710 - 0
old/lib/SWI/Processor.pm


+ 324 - 0
old/lib/String/CRC/Cksum.pm

@@ -0,0 +1,324 @@
+
+package String::CRC::Cksum;
+
+#use 5.6.1;
+use strict;
+use warnings;
+use Carp;
+
+require Exporter;
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(cksum);
+our @EXPORT = qw();
+our $VERSION = '0.03';
+
+use fields qw(cksum size);
+
+my @crctab = (
+    0x00000000,
+    0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
+    0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
+    0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
+    0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
+    0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
+    0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
+    0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
+    0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
+    0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
+    0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
+    0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
+    0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
+    0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
+    0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
+    0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
+    0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
+    0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
+    0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
+    0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
+    0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
+    0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
+    0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
+    0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
+    0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
+    0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
+    0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
+);
+
+
+sub new {
+    my $class = shift;
+    my String::CRC::Cksum $self = fields::new(ref $class || $class);
+    return $self->reset;
+}   # new
+
+
+sub reset {
+    my String::CRC::Cksum $self = shift;
+    $self->{cksum} = $self->{size} = 0;
+    return $self;
+}   # reset
+
+
+sub add {
+    use integer;
+    my String::CRC::Cksum $self = shift;
+    my $cksum = $self->{cksum};
+    my $size = $self->{size};
+
+    while(@_) {
+        my $n = length $_[0];
+
+        for(my $i = 0; $i < $n; ++$i) {
+            my $c = unpack 'C', substr $_[0], $i, 1;
+            $cksum = ($cksum << 8) ^ $crctab[($cksum >> 24) ^ $c];
+            ++$size;
+        }
+
+    }
+    continue { shift }
+
+    $self->{cksum} = $cksum;
+    $self->{size} = $size;
+
+    return $self;
+}   # add
+
+
+sub addfile {
+    my String::CRC::Cksum $self = shift;
+    my $stat;
+
+    local $_;
+    while(my $ifd = shift) {
+        $self->add($_) while $stat = read $ifd, $_, 4096;
+
+        if(! defined $stat) {
+            croak "error reading from filehandle: $!";
+        }
+    }
+
+    return $self;
+}   # addfile
+
+
+sub peek {
+    use integer;
+    my String::CRC::Cksum $self = shift;
+    my $cksum = $self->{cksum};
+    my $size = $self->{size};
+
+    # Extend with the length of the data
+    while($size != 0) {
+        my $c = $size & 0377;
+        $size >>= 8;
+        $cksum = ($cksum << 8) ^ $crctab[($cksum >> 24) ^ $c];
+    }
+    $cksum = ~ $cksum;
+
+    no integer;
+    my $crc = $cksum;
+    $crc += 4294967296 if $crc < 0;
+
+    return wantarray ? ($crc, $self->{size}) : $crc;
+
+}   # addfile
+
+
+sub result {
+    my String::CRC::Cksum $self = shift;
+    my ($cksum, $size) = $self->peek;
+    $self->reset;
+    return wantarray ? ($cksum, $size) : $cksum;
+}   # result
+
+
+sub cksum(@) {
+    my $sum = String::CRC::Cksum->new;
+
+    while(@_) {
+        if(ref $_[0])
+            { $sum->addfile($_[0]) }
+        else
+            { $sum->add($_[0]) }
+    }
+    continue { shift }
+
+    return $sum->result;
+}   # cksum
+
+1;
+
+__END__
+
+=head1 NAME
+
+String::CRC::Cksum - Perl extension for calculating checksums
+in a manner compatible with the POSIX cksum program.
+
+=head1 SYNOPSIS
+
+B<OO style>:
+  use String::CRC::Cksum;
+
+  $cksum = String::CRC::Cksum->new;
+  $cksum1 = $cksum->new;     # clone (clone is reset)
+
+  $cksum->add("string1");
+  $cksum->add("string2");
+  $cksum->add("string3", "string4", "string5", ...);
+  ...
+  ($cksum, $size) = $cksum->peek;
+  $cksum->add("string6", ...);
+  ...
+  ($cksum, $size) = $cksum->result;
+
+  $cksum1->addfile(\*file1);     # note: adding many files
+  $cksum1->addfile(\*file2);     # is probably a silly thing
+  $cksum1->addfile(\*file3);     # to do, but you *could*...
+  ...
+
+B<Functional style>:
+  use String::CRC::Cksum qw(cksum);
+
+  $cksum = cksum("string1", "string2", ...);
+
+  ($cksum, $size) = cksum("string1", "string2", ...);
+
+  $cksum = cksum(\*FILE);
+
+  ($cksum, $size) = cksum(\*FILE);
+
+=head1 DESCRIPTION
+
+The String::CRC::Cksum module calculates a 32 bit CRC,
+generating the same CRC value as the POSIX cksum program.
+If called in a list context, returns the length of the data
+object as well, which is useful for fully emulating
+the cksum program. The returned checksum will always be
+a non-negative integral number in the range 0..2^32-1.
+
+Despite its name, this module is able to compute the
+checksum of files as well as of strings.
+Just pass in a reference to a filehandle,
+or a reference to any object that can respond to
+a read() call and eventually return 0 at "end of file".
+
+Beware: consider proper use of binmode()
+if you are on a non-UNIX platform
+or processing files derived from other platforms.
+
+The object oriented interface can be used
+to progressively add data into the checksum
+before yielding the result.
+
+The functional interface is a convenient way
+to get a checksum of a single data item.
+
+None of the routines make local copies of passed-in strings
+so you can safely Cksum large strings safe in the knowledge
+that there won't be any memory issues.
+
+Passing in multiple files is acceptable,
+but perhaps of questionable value.
+However I don't want to hamper your creativity...
+
+=head1 FUNCTIONS                                                        
+
+The following functions are provided
+by the "String::CRC::Cksum" module.
+None of these functions are exported by default.
+
+=over 4
+
+=item B<new()>
+
+Creates a new String::CRC::Cksum object
+which is in a reset state, ready for action.
+If passed an existing String::CRC::Cksum object,
+it takes only the class -
+ie yields a fresh, reset object.
+
+=item B<reset()>
+
+Resets the Cksum object to the intialized state.
+An interesting phenomenom is,
+the CRC is not zero but 0xFFFFFFFF
+for a reset Cksum object.
+The returned size of a reset item will be zero.
+
+=item B<add("string", ...)>
+
+Progressively inject data into the Cksum object
+prior to requesting the final result.
+
+=item B<addfile(\*FILE, ...)>
+
+Progressively inject all (remaining) data from the file
+into the Cksum object prior to requesting the final result.
+The file handle passed in
+need only respond to the read() function to be usable,
+so feel free to pass in IO handles as needed.
+[hmmm - methinks I should have a test for that]
+
+=item B<peek($)>
+
+Yields the CRC checksum
+(and optionally the total size in list context)
+but does not reset the Cksum object.
+Repeated calls to peek() may be made
+and more data may be added.
+
+=item B<result($)>
+
+Yields the CRC checksum
+(and optionally the total size in list context)
+and then resets the Cksum object.
+
+=item B<cksum(@)>
+
+A convenient functional interface
+that may be passed a list of strings and filehandles.
+It will instantiate a Cksum object,
+apply the data and return the result
+in one swift, sweet operation.
+See how much I'm looking after you?
+
+NOTE: the filehandles must be passed as \*FD
+because I'm detecting a file handle using the ref() function.
+Therefore any blessed IO handle will also satisfy ref()
+and be interpreted as a file handle.
+
+=back
+
+=head2 EXPORT
+
+None by default.
+
+=head1 SEE ALSO
+
+manpages: cksum(1) or cksum(C) depending on your flavour of UNIX.
+
+http://www.opengroup.org/onlinepubs/007904975/utilities/cksum.html
+
+=head1 AUTHOR
+
+Andrew Hamm, E<lt>ahamm@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright disclaimed 2003 by Andrew Hamm
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+Since I collected the algorithm
+from the Open Group web pages,
+they might have some issues but I doubt it.
+Let better legal minds than mine
+determine the issues if you need.
+[hopefully the CPAN and PAUSE administrators and/or testers
+will understand the issues better,
+and will replace this entire section
+with something reasonable - hint hint.]
+
+=cut

File diff suppressed because it is too large
+ 3284 - 0
old/lib/XML/Simple.pm


+ 646 - 0
old/lib/XML/Simple/FAQ.pod

@@ -0,0 +1,646 @@
+package XML::Simple::FAQ;
+1;
+
+__END__
+
+=head1 Frequently Asked Questions about XML::Simple
+
+
+=head1 Basics
+
+
+=head2 What is XML::Simple designed to be used for?
+
+XML::Simple is a Perl module that was originally developed as a tool for
+reading and writing configuration data in XML format.  You can use it for
+many other purposes that involve storing and retrieving structured data in
+XML.
+
+You might also find XML::Simple a good starting point for playing with XML
+from Perl.  It doesn't have a steep learning curve and if you outgrow its
+capabilities there are plenty of other Perl/XML modules to 'step up' to.
+
+
+=head2 Why store configuration data in XML anyway?
+
+The many advantages of using XML format for configuration data include:
+
+=over 4
+
+=item *
+
+Using existing XML parsing tools requires less development time, is easier
+and more robust than developing your own config file parsing code
+
+=item *
+
+XML can represent relationships between pieces of data, such as nesting of
+sections to arbitrary levels (not easily done with .INI files for example)
+
+=item *
+
+XML is basically just text, so you can easily edit a config file (easier than
+editing a Win32 registry)
+
+=item *
+
+XML provides standard solutions for handling character sets and encoding
+beyond basic ASCII (important for internationalization)
+
+=item *
+
+If it becomes necessary to change your configuration file format, there are
+many tools available for performing transformations on XML files
+
+=item *
+
+XML is an open standard (the world does not need more proprietary binary
+file formats)
+
+=item *
+
+Taking the extra step of developing a DTD allows the format of configuration
+files to be validated before your program reads them (not directly supported
+by XML::Simple)
+
+=item *
+
+Combining a DTD with a good XML editor can give you a GUI config editor for
+minimal coding effort
+
+=back
+
+
+=head2 What isn't XML::Simple good for?
+
+The main limitation of XML::Simple is that it does not work with 'mixed
+content' (see the next question).  If you consider your XML files contain
+marked up text rather than structured data, you should probably use another
+module.
+
+If you are working with very large XML files, XML::Simple's approach of
+representing the whole file in memory as a 'tree' data structure may not be
+suitable.
+
+
+=head2 What is mixed content?
+
+Consider this example XML:
+
+  <document>
+    <para>This is <em>mixed</em> content.</para>
+  </document>
+
+This is said to be mixed content, because the E<lt>paraE<gt> element contains
+both character data (text content) and nested elements.
+
+Here's some more XML:
+
+  <person>
+    <first_name>Joe</first_name>
+    <last_name>Bloggs</last_name>
+    <dob>25-April-1969</dob>
+  </person>
+
+This second example is not generally considered to be mixed content.  The
+E<lt>first_nameE<gt>, E<lt>last_nameE<gt> and E<lt>dobE<gt> elements contain
+only character data and the  E<lt>personE<gt> element contains only nested
+elements.  (Note: Strictly speaking, the whitespace between the nested
+elements is character data, but it is ignored by XML::Simple).
+
+
+=head2 Why doesn't XML::Simple handle mixed content?
+
+Because if it did, it would no longer be simple :-)
+
+Seriously though, there are plenty of excellent modules that allow you to
+work with mixed content in a variety of ways.  Handling mixed content
+correctly is not easy and by ignoring these issues, XML::Simple is able to
+present an API without a steep learning curve.
+
+
+=head2 Which Perl modules do handle mixed content?
+
+Every one of them except XML::Simple :-)
+
+If you're looking for a recommendation, I'd suggest you look at the Perl-XML
+FAQ at:
+
+  http://perl-xml.sourceforge.net/faq/
+
+
+=head1 Installation
+
+
+=head2 How do I install XML::Simple?
+
+If you're running ActiveState Perl, you've probably already got XML::Simple 
+(although you may want to upgrade to version 1.09 or better for SAX support).
+
+If you do need to install XML::Simple, you'll need to install an XML parser
+module first.  Install either XML::Parser (which you may have already) or
+XML::SAX.  If you install both, XML::SAX will be used by default.
+
+Once you have a parser installed ...
+
+On Unix systems, try:
+
+  perl -MCPAN -e 'install XML::Simple'
+
+If that doesn't work, download the latest distribution from
+ftp://ftp.cpan.org/pub/CPAN/authors/id/G/GR/GRANTM , unpack it and run these
+commands:
+
+  perl Makefile.PL
+  make
+  make test
+  make install
+
+On Win32, if you have a recent build of ActiveState Perl (618 or better) try
+this command:
+
+  ppm install XML::Simple
+
+If that doesn't work, you really only need the Simple.pm file, so extract it
+from the .tar.gz file (eg: using WinZIP) and save it in the \site\lib\XML 
+directory under your Perl installation (typically C:\Perl).
+
+
+=head2 I'm trying to install XML::Simple and 'make test' fails
+
+Is the directory where you've unpacked XML::Simple mounted from a file server
+using NFS, SMB or some other network file sharing?  If so, that may cause
+errors in the the following test scripts:
+
+  3_Storable.t
+  4_MemShare.t
+  5_MemCopy.t
+
+The test suite is designed to exercise the boundary conditions of all
+XML::Simple's functionality and these three scripts exercise the caching
+functions.  If XML::Simple is asked to parse a file for which it has a cached
+copy of a previous parse, then it compares the timestamp on the XML file with
+the timestamp on the cached copy.  If the cached copy is *newer* then it will
+be used.  If the cached copy is older or the same age then the file is
+re-parsed.  The test scripts will get confused by networked filesystems if
+the workstation and server system clocks are not synchronised (to the
+second).
+
+If you get an error in one of these three test scripts but you don't plan to
+use the caching options (they're not enabled by default), then go right ahead
+and run 'make install'.  If you do plan to use caching, then try unpacking
+the distribution on local disk and doing the build/test there.
+
+It's probably not a good idea to use the caching options with networked
+filesystems in production.  If the file server's clock is ahead of the local
+clock, XML::Simple will re-parse files when it could have used the cached
+copy.  However if the local clock is ahead of the file server clock and a
+file is changed immediately after it is cached, the old cached copy will be
+used.
+
+Is one of the three test scripts (above) failing but you're not running on
+a network filesystem?  Are you running Win32?  If so, you may be seeing a bug
+in Win32 where writes to a file do not affect its modfication timestamp.
+
+If none of these scenarios match your situation, please confirm you're
+running the latest version of XML::Simple and then email the output of
+'make test' to me at grantm@cpan.org
+
+=head2 Why is XML::Simple so slow?
+
+If you find that XML::Simple is very slow reading XML, the most likely reason
+is that you have XML::SAX installed but no additional SAX parser module.  The
+XML::SAX distribution includes an XML parser written entirely in Perl.  This is
+very portable but not very fast.  For better performance install either
+XML::SAX::Expat or XML::LibXML.
+
+
+=head1 Usage
+
+=head2 How do I use XML::Simple?
+
+If you had an XML document called /etc/appconfig/foo.xml you could 'slurp' it
+into a simple data structure (typically a hashref) with these lines of code:
+
+  use XML::Simple;
+
+  my $config = XMLin('/etc/appconfig/foo.xml');
+
+The XMLin() function accepts options after the filename.
+
+
+=head2 There are so many options, which ones do I really need to know about?
+
+Although you can get by without using any options, you shouldn't even
+consider using XML::Simple in production until you know what these two
+options do:
+
+=over 4
+
+=item *
+
+forcearray
+
+=item *
+
+keyattr
+
+=back
+
+The reason you really need to read about them is because the default values
+for these options will trip you up if you don't.  Although everyone agrees
+that these defaults are not ideal, there is not wide agreement on what they
+should be changed to.  The answer therefore is to read about them (see below)
+and select values which are right for you.
+
+
+=head2 What is the forcearray option all about?
+
+Consider this XML in a file called ./person.xml:
+
+  <person>
+    <first_name>Joe</first_name>
+    <last_name>Bloggs</last_name>
+    <hobbie>bungy jumping</hobbie>
+    <hobbie>sky diving</hobbie>
+    <hobbie>knitting</hobbie>
+  </person>
+
+You could read it in with this line:
+
+  my $person = XMLin('./person.xml');
+
+Which would give you a data structure like this:
+
+  $person = {
+    'first_name' => 'Joe',
+    'last_name'  => 'Bloggs',
+    'hobbie'     => [ 'bungy jumping', 'sky diving', 'knitting' ]
+  };
+
+The E<lt>first_nameE<gt> and E<lt>last_nameE<gt> elements are represented as
+simple scalar values which you could refer to like this:
+
+  print "$person->{first_name} $person->{last_name}\n";
+
+The E<lt>hobbieE<gt> elements are represented as an array - since there is
+more than one.  You could refer to the first one like this:
+
+  print $person->{hobbie}->[0], "\n";
+
+Or the whole lot like this:
+
+  print join(', ', @{$person->{hobbie}} ), "\n";
+
+The catch is, that these last two lines of code will only work for people
+who have more than one hobbie.  If there is only one E<lt>hobbieE<gt>
+element, it will be represented as a simple scalar (just like
+E<lt>first_nameE<gt> and E<lt>last_nameE<gt>).  Which might lead you to write
+code like this:
+
+  if(ref($person->{hobbie})) {
+    print join(', ', @{$person->{hobbie}} ), "\n";
+  }
+  else {
+    print $person->{hobbie}, "\n";
+  }
+
+Don't do that.
+
+One alternative approach is to set the forcearray option to a true value:
+
+  my $person = XMLin('./person.xml', forcearray => 1);
+
+Which will give you a data structure like this:
+
+  $person = {
+    'first_name' => [ 'Joe' ],
+    'last_name'  => [ 'Bloggs' ],
+    'hobbie'     => [ 'bungy jumping', 'sky diving', 'knitting' ]
+  };
+
+Then you can use this line to refer to all the list of hobbies even if there
+was only one:
+
+  print join(', ', @{$person->{hobbie}} ), "\n";
+
+The downside of this approach is that the E<lt>first_nameE<gt> and
+E<lt>last_nameE<gt> elements will also always be represented as arrays even
+though there will never be more than one:
+
+  print "$person->{first_name}->[0] $person->{last_name}->[0]\n";
+
+This might be OK if you change the XML to use attributes for things that
+will always be singular and nested elements for things that may be plural:
+
+  <person first_name="Jane" last_name="Bloggs">
+    <hobbie>motorcycle maintenance</hobbie>
+  </person>
+
+On the other hand, if you prefer not to use attributes, then you could
+specify that any E<lt>hobbieE<gt> elements should always be represented as
+arrays and all other nested elements should be simple scalar values unless
+there is more than one:
+
+  my $person = XMLin('./person.xml', forcearray => [ 'hobbie' ]);
+
+The forcearray option accepts a list of element names which should always
+be forced to an array representation:
+
+  forcearray => [ qw(hobbie qualification childs_name) ]
+
+See the XML::Simple manual page for more information.
+
+
+=head2 What is the keyattr option all about?
+
+Consider this sample XML:
+
+  <catalog>
+    <part partnum="1842334" desc="High pressure flange" price="24.50" />
+    <part partnum="9344675" desc="Threaded gasket"      price="9.25" />
+    <part partnum="5634896" desc="Low voltage washer"   price="12.00" />
+  </catalog>
+
+You could slurp it in with this code:
+
+  my $catalog = XMLin('./catalog.xml');
+
+Which would return a data structure like this:
+
+  $catalog = {
+      'part' => [
+          {
+            'partnum' => '1842334',
+            'desc'    => 'High pressure flange',
+            'price'   => '24.50'
+          },
+          {
+            'partnum' => '9344675',
+            'desc'    => 'Threaded gasket',
+            'price'   => '9.25'
+          },
+          {
+            'partnum' => '5634896',
+            'desc'    => 'Low voltage washer',
+            'price'   => '12.00'
+          }
+      ]
+  };
+
+Then you could access the description of the first part in the catalog
+with this code:
+
+  print $catalog->{part}->[0]->{desc}, "\n";
+
+However, if you wanted to access the description of the part with the
+part number of "9344675" then you'd have to code a loop like this:
+
+  foreach my $part (@{$catalog->{part}}) {
+    if($part->{partnum} eq '9344675') {
+      print $part->{desc}, "\n";
+      last;
+    }
+  }
+
+The knowledge that each E<lt>partE<gt> element has a unique partnum attribute
+allows you to eliminate this search.  You can pass this knowledge on to
+XML::Simple like this:
+
+  my $catalog = XMLin($xml, keyattr => ['partnum']);
+
+Which will return a data structure like this:
+
+  $catalog = {
+    'part' => {
+      '5634896' => { 'desc' => 'Low voltage washer',   'price' => '12.00' },
+      '1842334' => { 'desc' => 'High pressure flange', 'price' => '24.50' },
+      '9344675' => { 'desc' => 'Threaded gasket',      'price' => '9.25'  }
+    }
+  };
+
+XML::Simple has been able to transform $catalog->{part} from an arrayref to
+a hashref (keyed on partnum).  This transformation is called 'array folding'.
+
+Through the use of array folding, you can now index directly to the
+description of the part you want:
+
+  print $catalog->{part}->{9344675}->{desc}, "\n";
+
+The 'keyattr' option also enables array folding when the unique key is in a
+nested element rather than an attribute.  eg:
+
+  <catalog>
+    <part>
+      <partnum>1842334</partnum>
+      <desc>High pressure flange</desc>
+      <price>24.50</price>
+    </part>
+    <part>
+      <partnum>9344675</partnum>
+      <desc>Threaded gasket</desc>
+      <price>9.25</price>
+    </part>
+    <part>
+      <partnum>5634896</partnum>
+      <desc>Low voltage washer</desc>
+      <price>12.00</price>
+    </part>
+  </catalog>
+
+See the XML::Simple manual page for more information.
+
+
+=head2 So what's the catch with 'keyattr'?
+
+One thing to watch out for is that you might get array folding even if you
+don't supply the keyattr option.  The default value for this option is:
+
+  [ 'name', 'key', 'id']
+
+Which means if your XML elements have a 'name', 'key' or 'id' attribute (or
+nested element) then they may get folded on those values.  This means that
+you can take advantage of array folding simply through careful choice of
+attribute names.  On the hand, if you really don't want array folding at all,
+you'll need to set 'key attr to an empty list:
+
+  my $ref = XMLin($xml, keyattr => []);
+
+A second 'gotcha' is that array folding only works on arrays.  That might
+seem obvious, but if there's only one record in your XML and you didn't set
+the 'forcearray' option then it won't be represented as an array and
+consequently won't get folded into a hash.  The moral is that if you're
+using array folding, you should always turn on the forcearray option.
+
+You probably want to be as specific as you can be too.  For instance, the
+safest way to parse the E<lt>catalogE<gt> example above would be:
+
+  my $catalog = XMLin($xml, keyattr => { part => 'partnum'},
+                            forcearray => ['part']);
+
+By using the hashref for keyattr, you can specify that only E<lt>partE<gt>
+elements should be folded on the 'partnum' attribute (and that the
+E<lt>partE<gt> elements should not be folded on any other attribute).
+
+By supplying a list of element names for forcearray, you're ensuring that
+folding will work even if there's only one E<lt>partE<gt>.  You're also
+ensuring that if the 'partnum' unique key is supplied in a nested element
+then that element won't get forced to an array too.
+
+
+=head2 How do I know what my data structure should look like?
+
+The rules are fairly straightforward:
+
+=over 4
+
+=item *
+
+each element gets represented as a hash
+
+=item *
+
+unless it contains only text, in which case it'll be a simple scalar value
+
+=item *
+
+or unless there's more than one element with the same name, in which case
+they'll be represented as an array
+
+=item *
+
+unless you've got array folding enabled, in which case they'll be folded into
+a hash
+
+=item *
+
+empty elements (no text contents B<and> no attributes) will either be
+represented as an empty hash, an empty string or undef - depending on the value
+of the 'suppressempty' option.
+
+=back
+
+If you're in any doubt, use Data::Dumper, eg:
+
+  use XML::Simple;
+  use Data::Dumper;
+  
+  my $ref = XMLin($xml);
+
+  print Dumper($ref);
+
+
+=head2 I'm getting 'Use of uninitialized value' warnings
+
+You're probably trying to index into a non-existant hash key - try
+Data::Dumper.
+
+
+=head2 I'm getting a 'Not an ARRAY reference' error
+
+Something that you expect to be an array is not.  The two most likely causes
+are that you forgot to use 'forcearray' or that the array got folded into a
+hash - try Data::Dumper.
+
+
+=head2 I'm getting a 'No such array field' error
+
+Something that you expect to be a hash is actually an array.  Perhaps array
+folding failed because one element was missing the key attribute - try
+Data::Dumper.
+
+
+=head2 I'm getting an 'Out of memory' error
+
+Something in the data structure is not as you expect and Perl may be trying
+unsuccessfully to autovivify things - try Data::Dumper.
+
+If you're already using Data::Dumper, try calling Dumper() immediately after
+XMLin() - ie: before you attempt to access anything in the data structure.
+
+
+=head2 My element order is getting jumbled up
+
+If you read an XML file with XMLin() and then write it back out with
+XMLout(), the order of the elements will likely be different.  (However, if
+you read the file back in with XMLin() you'll get the same Perl data
+structure).
+
+The reordering happens because XML::Simple uses hashrefs to store your data
+and Perl hashes do not really have any order.
+
+It is possible that a future version of XML::Simple will use Tie::IxHash
+to store the data in hashrefs which do retain the order.  However this will
+not fix all cases of element order being lost.
+
+If your application really is sensitive to element order, don't use
+XML::Simple (and don't put order-sensitive values in attributes).
+
+
+=head2 XML::Simple turns nested elements into attributes
+
+If you read an XML file with XMLin() and then write it back out with
+XMLout(), some data which was originally stored in nested elements may end up
+in attributes.  (However, if you read the file back in with XMLin() you'll
+get the same Perl data structure).
+
+There are a number of ways you might handle this:
+
+=over 4
+
+=item *
+
+use the 'forcearray' option with XMLin()
+
+=item *
+
+use the 'noattr' option with XMLout()
+
+=item *
+
+live with it
+
+=item *
+
+don't use XML::Simple
+
+=back
+
+
+=head2 Why does XMLout() insert E<lt>nameE<gt> elements (or attributes)?
+
+Try setting keyattr => [].
+
+When you call XMLin() to read XML, the 'keyattr' option controls whether arrays
+get 'folded' into hashes.  Similarly, when you call XMLout(), the 'keyattr'
+option controls whether hashes get 'unfolded' into arrays.  As described above,
+'keyattr' is enabled by default.
+
+=head2 Why are empty elements represented as empty hashes?
+
+An element is always represented as a hash unless it contains only text, in
+which case it is represented as a scalar string.
+
+If you would prefer empty elements to be represented as empty strings or the
+undefined value, set the 'suppressempty' option to '' or undef respectively.
+
+=head2 Why is ParserOpts deprecated?
+
+The C<ParserOpts> option is a remnant of the time when XML::Simple only worked
+with the XML::Parser API.  Its value is completely ignored if you're using a
+SAX parser, so writing code which relied on it would bar you from taking
+advantage of SAX.
+
+Even if you are using XML::Parser, it is seldom necessary to pass options to
+the parser object.  A number of people have written to say they use this option
+to set XML::Parser's C<ProtocolEncoding> option.  Don't do that, it's wrong,
+Wrong, WRONG!  Fix the XML document so that it's well-formed and you won't have
+a problem.
+
+Having said all of that, as long as XML::Simple continues to support the
+XML::Parser API, this option will not be removed.  There are currently no plans
+to remove support for the XML::Parser API.
+
+=cut
+
+

+ 252 - 0
old/project.html

@@ -0,0 +1,252 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<!--
+
+    Software Index, Copyright 2010, Software Index Project Team
+    Link: http://swi.sourceforge.net
+    
+    This file is part of Software Index Tool.
+    
+    Software Index is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, version 3 of the License.
+    
+    Software Index is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-5" />
+<title>Software Index Project</title>
+<link href="style.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<table border="0" align="center" cellpadding="0" cellspacing="0" width="1000">
+  <tr>
+    <td>&nbsp;</td>
+    <td valign="middle">&nbsp;</td>
+  </tr>
+  <tr>
+    <td width="350"><img src="images/logo_project.jpg" alt="Software Index Project Page" width="350" height="128" /></td>
+    <td valign="bottom">      <div align="right">
+      <p><a href="http://sourceforge.net/projects/swi"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=275605&amp;type=10" alt="Get Software Index at SourceForge.net. Fast, secure and Free Open Source software downloads" width="80" height="15" border="0" /></a></p>
+      <p>&nbsp;</p>
+      <p><a href="#Description">Overview</a> | <a href="#Download">Download &amp; Installation </a> | <a href="#License">License</a> | <a href="#Documentation">Documentation</a> | <a href="#Getsupport">Get support </a>| <a href="#Fordevelopers">For developers</a></p>
+    </div></td>
+  </tr>
+  <tr>
+    <td colspan="2"><hr></td>
+  </tr>  <tr>
+    <td colspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="10">
+      
+      <tr>
+        <td valign="top"><h3><a id="Description"></a>Overview</h3>
+          <p><span class="normalImportance">Software Index </span>measures, reports and validates software statistic,
+            searches for duplications, scans for errors, 'coding style' violations
+            and occasions of broken design patterns which are defined by your design team.</p>
+          <h4>The list of collected statistics:</h4>
+          <ul>
+                <li>Number of <span class="normalImportance">executable symbols</span> and <span class="normalImportance">lines</span> </li>
+                <li>Number of <span class="normalImportance">symbols</span> and <span class="normalImportance">lines in comments</span></li>
+                <li>Number of <span class="normalImportance">symbols</span> and<span class="normalImportance"> lines in initial source file</span></li>
+                <li>Number of <span class="normalImportance">lines in specific comments</span><br />
+                (header descriptions before functions)  </li>
+                <li>Number of <span class="normalImportance">symbols in name</span> of a function </li>
+                <li>Number of <span class="normalImportance">blocks</span></li>
+                <li>Maximum <span class="normalImportance">indent level</span> (depth level) </li>
+                <li><span class="normalImportance">Cyclomatic complexity</span> (McCabe's / Myer's) index </li>
+                <li>Number of <span class="normalImportance">functions, files, modules</span></li>
+                <li>Number of symbols in <span class="normalImportance">duplicated fragments</span></li>
+                <li><span class="normalImportance">Code coverage</span> indexes<br />
+                (line coverage, branch coverage and entry/exit coverage data from external gcov tool) </li>
+          </ul>
+          <h4>Parsing, scaning and searching can be performed for the different content:</h4>
+          <ul>
+            <li><span class="normalImportance">initial</span>         - the initial source content</li>
+            <li> <span class="normalImportance">code</span>            - the initial code (without comments)</li>
+            <li> <span class="normalImportance">comments</span>        - comments only (no code)</li>
+            <li> <span class="normalImportance">no preprocessor</span>  - preprocessor strings excluded (without comments and preprocessor)</li>
+            <li> <span class="normalImportance">no strings</span>       - strings excluded (without comments and strings)</li>
+            <li> <span class="normalImportance">purified</span>        - strings and preprocessor excluded (without comments, strings and preprocessor)</li>
+            <li> <span class="normalImportance">comment header</span>   - comments before function's header</li>
+            <li> <span class="normalImportance">function's name</span>    - name of a function</li>
+            <li> <span class="normalImportance">function's head</span>    - purified function's header, no body</li>
+            <li> <span class="normalImportance">function's body</span>    - purified function's body, no header</li>
+            </ul>
+          <h4>Every counter is collected per:</h4>
+          <ul>
+            <li>function</li>
+            <li> file</li>
+            <li>module</li>
+            <li>project</li>
+            </ul>
+          <h4>Single indexes and indexes for distributions are collected:</h4>
+          <ul>
+            <li><span class="normalImportance">exact</span> value</li>
+            <li> <span class="normalImportance">average</span> value within a distribution</li>
+            <li> <span class="normalImportance">minimum</span> value within a distribution</li>
+            <li> <span class="normalImportance">maximum</span> value within a distribution</li>
+            <li><span class="normalImportance">sum</span> of values within a distribution</li>
+            </ul>
+          <h4>Validation rules can be applied to the different content:</h4>
+          <ul>
+            <li><span class="normalImportance">added</span> functions (objects)</li>
+            <li> <span class="normalImportance">removed</span> functions (objects)</li>
+            <li> <span class="normalImportance">modified</span> functions (objects)</li>
+            <li><span class="normalImportance">cloned</span> functions (objects)</li>
+            <li><span class="normalImportance">unmodified</span> functions (objects)</li>
+          </ul>
+          <h4>Internal tools helps to adapt Software Index for your specific needs:</h4>
+          <ul>
+            <li><span class="normalImportance">code preprocessor</span>: simplifies the code parsing and scaning with preprocessor definitions</li>
+            <li> <span class="normalImportance">code scanner</span>: similar 'grep' tool, helps to find occasion of 'bad' coding style/formating and detect broken  rules which defined by your design team, has flexible suppress methods </li>
+            <li><span class="normalImportance">code indexer</span>: collect the statistics, there 3 levels of severity (info, notice, warning) for limits which are easily configurable, has flexible suppress methods</li>
+            <li><span class="normalImportance">searcher of duplicated fragments</span>: helps to find and reduce duplication in your source code</li>
+            <li><span class="normalImportance">report converter</span>: processes the final report in XML format, filters the information according configuration and dumps the info messages, notices, warnings and erros to file and stderr stream</li>
+            </ul>
+          <h4>Supported languages:</h4>
+          <ul>
+            <li>C (stable version) </li>
+            <li>C++ (beta version) </li>
+            </ul>
+          <h4>Limitations:</h4>
+          <ul>
+            <li>Parser does not detect functions (C language) with declarations of local variables outside of function's body. However, it is not a problem for a major part of software products. The example below demostrates problematic formatting/style:</li>
+            </ul>
+          <table width="80%" border="0" align="center" cellpadding="2" cellspacing="2">
+            <tr>
+              <td width="50%">This function is <span class="highImportance">not detectable</span> by Software Index. </td>
+              <td width="50%">This function is <span class="normalImportance">parsable</span>. </td>
+            </tr>
+            <tr>
+              <td><pre>int <strong>getMax</strong>(int* array, int length)
+<span class="highImportance">    int i = 0;
+    int curMax;</span>
+<strong>{</strong>
+    /* ... */
+<strong>}</strong></pre>                </td>
+              <td><pre>int <strong>getMax</strong>(int* array, int length)
+<strong>{</strong>
+<span class="normalImportance">    int i = 0;
+    int curMax;</span>
+    /* ... */
+<strong>}</strong></pre>
+              </td>
+            </tr>
+          </table>
+          <ul>
+            <li>Comments inside preprocessor strings are not acceptable (C/C++ languages). Otherwise, some code can be unrecognizable by Software Index.<br />
+            </li>
+            </ul>
+          <table width="80%" border="0" align="center" cellpadding="2" cellspacing="2">
+            <tr>
+              <td width="50%">This code is <span class="highImportance">not recognizable </span> by Software Index. </td>
+              <td width="50%">This code is <span class="normalImportance">parsable</span>.</td>
+            </tr>
+            <tr>
+              <td><pre>#define <strong>GET_MAX</strong>(a, b)       \
+<span class="highImportance">    /*                      \
+     * This macros returns  \
+     * maximum from a and b \
+     */                     \
+</span>    ((a &gt; b) ? a : b)</pre>
+              </td>
+              <td><pre><span class="normalImportance">/*
+ * This macros returns
+ * maximum from a and b
+ */
+</span>#define <strong>GET_MAX</strong>(a, b) \
+    ((a &gt; b) ? a : b)</pre>
+              </td>
+            </tr>
+          </table>
+          <ul>
+            <li>Interface with gcov tool is not tested for C++ language.</li>
+            </ul>
+          <h3><a id="Download"></a>Download &amp; Installation</h3>
+          <p>For the installation of the <span class="normalImportance">Software Index</span> <a href="http://sourceforge.net/projects/swi/files/">download</a> the archive with all required modules and unpack it to some folder. Also, you have got an option to get the <a href="http://swi.svn.sourceforge.net/viewvc/swi/">source code</a> from the version conrol sytem.</p>
+          <p><em class="highImportance">Warning:</em> <span class="normalImportance">Software Index</span> has an internal tool (dupindex) which should be compiled for the target platform.
+            By default, the distributable archive includes the compiled binary for PC Windows (x86) platform.
+            Recompile it if you need (only one file: dupindex.cpp), using g++ or some other C++ compiler for your specific platform. There is a project configuration file for users of Microsoft Visual Studio 2008. There is Makefile for users of gmake and g++ tools. </p>
+          <h4>Prerequisites:</h4>
+          <ul>
+            <li>Perl Runtime Environment (version 5.6.x or later)</li>
+            <li>Perl modules (usualy, they are all included to the standard installation package of Perl engine):
+              <ul>
+                <li>Cwd</li>
+                <li>Pod::Usage</li>
+                <li> Data::Dumper</li>
+                <li> FileHandle</li>
+                <li>IPC::Open3</li>
+                <li> XML::Simple (included to the distributable archive with <span class="normalImportance">Software Index</span>)</li>
+                <li> String::CRC::Cksum (included to the distributable archive with <span class="normalImportance">Software Index</span>)</li>
+                </ul>
+            </li>
+            <li>gcov (optional, it is needed if you like to collect coverage statistic)</li>
+          </ul>
+          <h3><a name="License" id="Download"></a>License</h3>
+          <p> This program is free software; you can redistribute it and/or modify 
+            it under the terms of the GNU General Public License as published by 
+            the Free Software Foundation; version 3 of the License.</p>
+          <p> This program is distributed in the hope that it will be useful,
+            but WITHOUT ANY WARRANTY; without even the implied warranty of
+            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+            GNU General Public License for more details.</p>
+          <p> You should have received a copy of the GNU General Public License along
+            with the <span class="normalImportance">Software Index</span>; if not, contact <a href="mailto:avkonst@users.sourceforge.net">Project Administrator</a> and write to the Free Software Foundation, Inc.,
+            51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</p>
+          <h3><a id="Documentation"></a>Documentation</h3>
+          <p>The context help is available by:</p>
+          <pre>&gt; perl swi_main.pl --help</pre>
+          <p>The sample/description of the configuration file is available by link:</p>
+		  <pre><a href="http://swi.svn.sourceforge.net/viewvc/swi/swi_config_sample.xml?view=markup" target="_blank">http://swi.svn.sourceforge.net/viewvc/swi/swi_config_sample.xml?view=markup</a></pre>
+          <p> In the command line context, it is accessable by:</p>
+          <pre>&gt; perl swi_main.pl --sample</pre>
+          <h3><a id="Getsupport"></a>Get support</h3>
+          <p>The best way to get help is by <a href="https://sourceforge.net/tracker/?func=add&amp;group_id=275605&amp;atid=1170878">creating a new item</a> in the 'Request Tracker'.</p>
+          <h4>Alternatives</h4>
+          <p>If you  believe the project may  have a different support resource that would be better for submitting the  particular issue, please consider the following alternatives:</p>
+          <ul>
+                <li><a href="mailto:avkonst@users.sourceforge.net">Mail to the Administrator</a> </li>
+            <li><a href="https://sourceforge.net/sendmessage.php?touser=2608471">Mail to the Administrator using WEB form</a></li>
+            <li><a href="https://sourceforge.net/tracker/?func=add&amp;group_id=275605&amp;atid=1170877">Create new bug report </a></li>
+            <li><a href="https://sourceforge.net/tracker/?func=add&amp;group_id=275605&amp;atid=1170880">Create new  feature request</a></li>
+          </ul>
+          <h4>Our time response</h4>
+          <p><span class="normalImportance">Software Index</span> is used in real, time critical software development projects. It profiles software products which should work stably 24 hours a day, 7 days a week. As a result, we catch major portion of bugs ourself before the official release of new version of the <span class="normalImportance">Software Index</span>.</p>
+          <p>In addition to this, please, notice that it is developed by enthusiasts in their free time. Thus, we can not guarantee the immediate response. However, we always try to process bug reports and support requests as soon as possible, prioritizing the support activities.</p>
+          <h3><a id="Fordevelopers"></a>For developers</h3>
+          <p>If you have troubleshooted the problem, prepared the correction and believe that it should be included to the official distributive, please create <a href="https://sourceforge.net/tracker/?func=add&amp;group_id=275605&amp;atid=1170879">new patch review request</a> and attach the Patch to the tracker.</p>
+          <p><em>Note:</em> Patch files are  simply Unified-Diff files showing the differences between your working copy and  the base revision.</p>
+          <h4>Join this project:</h4>
+          <p>In order to participate in development activities,  join this project:<br /> 
+            please, contact the project administrators of this project, as shown on the <a href="http://sourceforge.net/projects/swi/"> project summary page</a>. </p>
+          <h4> Get the source code:</h4>
+          <p> Source code for this project may be available as <a href="http://sourceforge.net/projects/swi/files/">downloads</a> or through the  Subversion SCM <a href="http://swi.svn.sourceforge.net/viewvc/swi/">repository</a> used by the project. </p>
+          <h4>Beta testing:</h4>
+          <p>You are very welcome to <a href="http://sourceforge.net/projects/swi/files/">download</a> beta versions and provide your feedback, reporting proposals and new issues in <a href="https://sourceforge.net/tracker/?group_id=275605&amp;atid=1170877">bug tracker</a> system used by the project.</p>
+          <p>If you requested a feature, we are happy to deliver it to you firstly for beta testing before including to the  final release version. </p>
+          <h4>Update project web pages:</h4>
+          <p> If you are a web page developer interested in this project, please consider reaching out to the project <a href="https://sourceforge.net/sendmessage.php?touser=2608471">Administrator</a> (per the &quot;Join this project&quot; section, above) to offer your assistance.</p></td>
+      </tr>
+    </table>
+        <hr></td>
+  </tr>
+  <tr>
+    <td colspan="2"><div align="center">      
+      <p align="right">Copyright <strong>&copy; </strong>2009 - 2010<br />  
+        <a href="mailto:avkonst@users.sourceforge.net"><span class="normalImportance">Software Index</span> Project</a></p>
+      <p align="right">License: <a href="http://www.gnu.org/licenses/gpl.txt">GPL</a></p>
+      <h3 align="right"></h3>
+    </div></td>
+  </tr>
+</table>
+<p></p>
+</body>
+</html>

+ 0 - 0
old/prototype/New Text Document.txt


+ 227 - 0
old/prototype/scroll-grid.txt

@@ -0,0 +1,227 @@
+
+<html>

+

+<!--

+

+copyright pavan

+http://fixed-header-using-jquery.blogspot.com/2009/05/scrollable-table-with-fixed-header-and.html

+

+-->

+

+<head>

+<!--<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>-->

+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

+<script>

+

+$(document).ready(function(){

+  fnAdjustTable();

+});

+

+fnAdjustTable = function(){

+

+  var colCount = $('#firstTr>td').length; //get total number of column

+

+  var m = 0;

+  var n = 0;

+  var brow = 'mozilla';

+  

+  jQuery.each(jQuery.browser, function(i, val) {

+    if(val == true){

+      brow = i.toString();

+    }

+  });

+  

+  $('.tableHeader').each(function(i){

+    if (m < colCount){

+

+      if (brow == 'mozilla'){

+        $('#firstTd').css("width",$('.tableFirstCol').innerWidth());//for adjusting first td

+        $(this).css('width',$('#table_div td:eq('+m+')').innerWidth());//for assigning width to table Header div

+      }

+      else if (brow == 'msie'){

+        $('#firstTd').css("width",$('.tableFirstCol').width());

+        $(this).css('width',$('#table_div td:eq('+m+')').width()-2);//In IE there is difference of 2 px

+      }

+      else if (brow == 'safari'){

+        $('#firstTd').css("width",$('.tableFirstCol').width());

+        $(this).css('width',$('#table_div td:eq('+m+')').width());

+      }

+      else {

+        $('#firstTd').css("width",$('.tableFirstCol').width());

+        $(this).css('width',$('#table_div td:eq('+m+')').innerWidth());

+      }

+    }

+    m++;

+  });

+

+  $('.tableFirstCol').each(function(i){

+    if(brow == 'mozilla'){

+      $(this).css('height',$('#table_div td:eq('+colCount*n+')').outerHeight());//for providing height using scrollable table column height

+    }

+    else if(brow == 'msie'){

+      $(this).css('height',$('#table_div td:eq('+colCount*n+')').innerHeight()-2);

+    }

+    else {

+      $(this).css('height',$('#table_div td:eq('+colCount*n+')').height());

+    }

+    n++;

+  });

+

+}

+

+//function to support scrolling of title and first column

+fnScroll = function(){

+  $('#divHeader').scrollLeft($('#table_div').scrollLeft());

+  $('#firstcol').scrollTop($('#table_div').scrollTop());

+}

+

+</script>

+</head>

+

+

+

+

+

+<body>

+<table cellspacing="0" cellpadding="0" border="0" >

+  <tr>

+    <td id="firstTd">

+    </td>

+    <td>

+      <div id="divHeader" style="overflow:hidden;width:284px;">

+        <table cellspacing="0" cellpadding="0" border="1" >

+          <tr>

+            <td>

+              <div class="tableHeader">Title1</div>

+            </td>

+            <td>

+              <div class="tableHeader">Title2</div>

+            </td>

+            <td>

+              <div class="tableHeader">Title3</div>

+            </td>

+            <td>

+              <div class="tableHeader">Title4</div>

+            </td>

+            <td>

+              <div class="tableHeader">Title5</div>

+            </td>

+          </tr>

+        </table>

+      </div>

+    </td>

+  </tr>

+  <tr>

+  

+    <td valign="top">

+      <div id="firstcol" style="overflow: hidden;height:80px">

+        <table width="200px" cellspacing="0" cellpadding="0" border="1" >

+          <tr>

+            <td class="tableFirstCol">First Col row1 </td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row2</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row3</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row4</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row5</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row6</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row7</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row8</td>

+          </tr>

+          <tr>

+            <td class="tableFirstCol">First Col row9</td>

+          </tr>

+        </table>

+      </div>

+    </td>

+    

+    <td valign="top">

+      <div id="table_div" style="overflow: scroll;width:300px;height:100px;position:relative" onscroll="fnScroll()" >

+        <table width="500px" cellspacing="0" cellpadding="0" border="1" >

+          <tr id='firstTr'>

+            <td>Row1Col1</td>

+            <td>Row1Col2</td>

+            <td>Row1Col3</td>

+            <td>Row1Col4</td>

+            <td>Row1Col5</td>

+          </tr>

+          <tr>

+            <td>Row2Col1</td>

+            <td>Row2Col2</td>

+            <td>Row2Col3</td>

+            <td>Row2Col4</td>

+            <td>Row3Col5</td>

+          </tr>

+          <tr>

+            <td>Row3Col1</td>

+            <td>Row3Col2</td>

+            <td>Row3Col3</td>

+            <td>Row3Col4</td>

+            <td>Row3Col5</td>

+          </tr>

+          <tr>

+            <td>Row4Col1</td>

+            <td>Row4Col2</td>

+            <td>Row4Col3</td>

+            <td>Row4Col4</td>

+            <td>Row4Col5</td>

+          </tr>

+          <tr>

+            <td>Row5Col1</td>

+            <td>Row5Col2</td>

+            <td>Row5Col3</td>

+            <td>Row5Col4</td>

+            <td>Row5Col5</td>

+          </tr>

+          <tr>

+            <td>Row6Col1</td>

+            <td>Row6Col2</td>

+            <td>Row6Col3 is both wider and<br />taller than surrounding cells, yet<br />fixed elements still line up correctly</td>

+            <td>Row6Col4</td>

+            <td>Row6Col5</td>

+          </tr>

+          <tr>

+            <td>Row7Col1</td>

+            <td>Row7Col2</td>

+            <td>Row7Col3</td>

+            <td>Row7Col4</td>

+            <td>Row7Col5</td>

+          </tr>

+          <tr>

+            <td>Row8Col1</td>

+            <td>Row8Col2</td>

+            <td>Row8Col3</td>

+            <td>Row8Col4</td>

+            <td>Row8Col5</td>

+          </tr>

+          <tr>

+            <td>Row9Col1</td>

+            <td>Row9Col2</td>

+            <td>Row9Col3</td>

+            <td>Row9Col4</td>

+            <td>Row9Col5</td>

+          </tr>

+        </table>

+      </div>

+    </td>

+  </tr>

+</table>

+

+<p><a href="http://fixed-header-using-jquery.blogspot.com/2009/05/scrollable-table-with-fixed-header-and.html">Pavan's original post</a></p>

+<p><a href="http://snipt.org/loz">Formatted source code</p>

+  

+</body>

+

+</html>

+ 19 - 0
old/prototype/swi_report.xsl

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="WINDOWS-1251" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
+<xsl:template match="/">
+<table border="1">
+<tr bgcolor="#CCCCCC">
+<td align="center"><strong>Function</strong></td>
+<td align="center"><strong>Change</strong></td>
+<td align="center"><strong>Checksum</strong></td>
+</tr>
+<xsl:for-each select="swi:report/swi:module/swi:file/swi:function">
+<tr bgcolor="#F5F5F5">
+<td><xsl:value-of select="swi:name"/></td>
+<td align="right"><xsl:value-of select="swi:modification"/></td>
+<td><xsl:value-of select="swi:statistic/swi:checksum/swi:source/swi:exact"/></td>
+</tr>
+</xsl:for-each>
+</table>
+</xsl:template>
+</xsl:stylesheet>

+ 6 - 0
old/prototype/test.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type='text/xsl' href='swi_report.xsl'?>
+<swi:tutorial>
+<swi:title></swi:title>
+<swi:author></swi:author>
+</swi:tutorial>

+ 128 - 0
old/style.css

@@ -0,0 +1,128 @@
+/*
+
+    Software Index, Copyright 2010, Software Index Project Team
+    Link: http://swi.sourceforge.net
+    
+    This file is part of Software Index Tool.
+    
+    Software Index is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, version 3 of the License.
+    
+    Software Index is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+ 
+*/
+
+/***********************************************/
+/* HTML tag styles                             */
+/***********************************************/ 
+
+body{
+	font-family: Arial, sans-serif;
+	color: #333333;
+	line-height: 1.166;
+	margin: 0px;
+	padding: 10px;
+	font-size: 14px;
+}
+
+pre{
+    font-size: 100%;
+    padding-left: 50;
+}
+td{
+	background-position: left;
+	background-repeat: no-repeat;
+}
+
+a{
+	color: #AA0033;
+	text-decoration: none;
+}
+
+a:link{
+	color: #AA0033;
+	text-decoration: none;
+}
+
+a:visited{
+	color: #AA0033;
+	text-decoration: none;
+}
+
+a:hover{
+	color: #FF9933;
+	text-decoration: underline;
+}
+
+h1{
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 130%;
+ color: #116633;
+ margin: 0px;
+ padding: 0px;
+}
+
+h2{
+ font-family: Arial,sans-serif;
+ font-size: 120%;
+ color: #330099;
+ margin: 0px;
+ padding: 0px;
+}
+
+h3{
+ font-family: Arial, sans-serif;
+ font-size: 120%;
+ color: #AA0033;
+ margin: 0px;
+ padding: 0px;
+}
+
+h4{
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 100%;
+ color: #334d55;
+ margin: 0px;
+ padding: 0px;
+}
+
+h5{
+ margin: 0px;
+ padding: 0px;
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 100%;
+ color: #334d55;
+}
+
+ul{
+ list-style-type: disc;
+}
+
+ul ul{
+ list-style-type: circle;
+}
+
+ul ul ul{
+ list-style-type: disc;
+}
+
+label{
+	font-family: Arial, sans-serif;
+	font-size: 100%;
+	color: #116633;
+}
+
+.highImportance {
+	color: #FF0000
+}
+
+.normalImportance {
+	color: #009900}
+

File diff suppressed because it is too large
+ 1167 - 0
old/swi_config_sample.xml


+ 130 - 0
old/swi_main.pl

@@ -0,0 +1,130 @@
+#!/usr/bin/perl
+#
+#    Software Index, Copyright 2010, Software Index Project Team
+#    Link: http://swi.sourceforge.net
+#
+#    This file is part of Software Index Tool.
+#
+#    Software Index is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    Software Index is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+=head1 OVERVIEW
+
+Software Index measures, reports and validates software statistic,
+searches for duplications, scans for errors, 'coding style' violations
+and occasions of broken design patterns which are defined by your design team.
+
+More information available at 'http://swi.sourceforge.net'.
+
+=head1 SYNOPSIS
+
+In order to get the context help (this text):
+
+    perl swi_main.pl -h
+    perl swi_main.pl -help
+    perl swi_main.pl --help
+    
+In order to get the sample configuration file and it's description:
+
+    perl swi_main.pl -s
+    perl swi_main.pl -sample
+    perl swi_main.pl --sample
+
+In order to launch the tool with the prepared configuration file:
+
+    perl swi_main.pl </path/to/configuration/file.xml>
+
+=head1 OPTIONS
+
+=over 4
+
+=item -h, -help, --help
+
+Prints this help page.
+
+=item -s, -sample, --sample
+
+Prints the example of configuration file and it's description.
+The sample explains every section in details and gives several usage examples.
+Use this as a start up framework for your initial configs.
+For example:
+
+    > perl swi_main.pl -sample > my_config.xml
+
+=item </path/to/configuration/file.xml>
+
+Full or relative path to the configuration file for the tool. 
+
+=back
+
+=head1 ENVIRONMENT
+
+The tool requires Perl Runtime Environment. Required Perl version is 5.6.x or later.
+
+=head1 COPYRIGHT 
+
+Software Index, Copyright 2009, 2010, Software Index Project Team,
+Link: http://swi.sourceforge.net
+
+=head1 LICENSE
+
+Software Index is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, version 3 of the License.
+
+Software Index is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Software Index.  If not, see <http://www.gnu.org/licenses/>.
+
+=cut
+
+use strict;
+use Cwd qw(abs_path);
+use Pod::Usage;
+
+$0 =~ m/(.*)swi_main.pl$/;
+my $globalRootDirectory = abs_path($1);
+
+push( @INC, "$globalRootDirectory/lib" );
+require SWI::Launcher;
+
+if (   !defined( $ARGV[0] )
+    || $ARGV[0] eq "-help"
+    || $ARGV[0] eq "--help"
+    || $ARGV[0] eq "-h" )
+{
+    pod2usage( -exitstatus => 0, -verbose => 2 );
+    exit 0;
+}
+
+if (   $ARGV[0] eq "-sample"
+    || $ARGV[0] eq "--sample"
+    || $ARGV[0] eq "-s" )
+{
+    my $fh = new FileHandle( "$globalRootDirectory/swi_config_sample.xml", "r" )
+      or die(
+        "Can not open input file '$globalRootDirectory/swi_config_sample.xml'!"
+      );
+
+    while (<$fh>)
+    {
+        print $_;
+    }
+    exit 0;
+}
+
+exit swiLaunch( $globalRootDirectory, @ARGV );

BIN
old/test/Metrics.xlsx


+ 213 - 0
old/test/swi_config_ddd.xml

@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="utf-8"?>
+<swi:configuration>
+  
+  <swi:info>
+    <swi:version>1</swi:version>
+    <swi:project>
+      <swi:name>DDD</swi:name>
+    </swi:project>
+    <swi:history>
+      <swi:revision>
+        <swi:name>ALFA</swi:name>
+        <swi:user>USER</swi:user>
+        <swi:comment>Configuration for DDD project</swi:comment>
+      </swi:revision>
+    </swi:history>
+  </swi:info>
+  
+  <swi:general>
+    <swi:debug>
+       <swi:enabled>off</swi:enabled>
+    </swi:debug>
+  </swi:general>
+  
+  <swi:modules>
+    <swi:module>
+      <swi:name>DDD-SOURCES</swi:name>
+      <swi:location>../GNU-SRC/ddd/ddd</swi:location>
+      <swi:files>
+        <swi:include>^.*[chCH]$</swi:include>
+        
+        <!--
+          Excluding the following files:
+          FILE:             - REASON:
+          
+          ddd.info.txt.gz.C - just too big file
+          vsl-lex.C         - brackets mismatch without preprocessor work
+          rxscan.C          - undefined block start without preprocessor work
+          vsl-gramma.C      - definition of local variables in old style
+        -->
+        <swi:exclude>ddd.info.txt.gz.C|vsl-lex.C|rxscan.C|vsl-gramma.C</swi:exclude>
+      </swi:files>
+      
+      <swi:preprocessor>
+        <swi:rule>
+          <swi:filepattern>^PrintGC.h$</swi:filepattern>
+          <swi:searchpattern>([^_a-zA-Z0-9])(DECLARE_TYPE_INFO)([^_a-zA-Z0-9])</swi:searchpattern>
+          <swi:replacepattern>$1$2;$3</swi:replacepattern>
+        </swi:rule>
+        <swi:rule>
+          <swi:filepattern>.*</swi:filepattern>
+          <swi:searchpattern>(\s+)(union\s*)({)</swi:searchpattern>
+          <swi:replacepattern>$1$2 _noname_ $3</swi:replacepattern>
+        </swi:rule>
+      </swi:preprocessor>
+      
+      <swi:scanner>
+      	<!--
+      	    The codecontent option defines the content for scanner, it can be:
+      	    
+      	    initial         - the initial source content
+      	    code            - the initial code (without comments)
+      	    comments        - comments only (no code)
+      	    nopreprocessor  - preprocessor strings excluded (without comments and preprocessor)
+      	    nostrings       - strings excluded (without comments and strings)
+      	    purified        - strings and preprocessor excluded (without comments, strings and preprocessor)
+      	    
+      	    By default, the 'purified' content is scanned
+      	-->
+        <swi:rule>
+          <swi:filepattern>.*</swi:filepattern>
+          <swi:searchpattern>(\s+)((union)|(enum)|(struct))(\s*{)</swi:searchpattern>
+          <swi:messagepattern>Noname '$2' detected.</swi:messagepattern>
+          <swi:codecontent>purified</swi:codecontent>
+          
+        </swi:rule>
+
+        <swi:suppress>
+          <swi:pattern swi:message="Noname 'struct'">.*</swi:pattern>
+          <swi:pattern swi:message="Noname 'useless'">.*</swi:pattern>
+        </swi:suppress>
+
+      </swi:scanner>
+      
+      <swi:indexer:common>
+        <!-- No settings currently available -->
+      </swi:indexer:common>
+      
+      <swi:indexer:dup>
+      	<!--
+      	    The codecontent option defines the content for scanner, it can be:
+      	    
+      	    initial         - the initial source content
+      	    code            - the initial code (without comments)
+      	    comments        - comments only (no code)
+      	    nopreprocessor  - preprocessor strings excluded (without comments and preprocessor)
+      	    nostrings       - strings excluded (without comments and strings)
+      	    purified        - strings and preprocessor excluded (without comments, strings and preprocessor)
+      	    
+      	    By default, the 'purified' content is scanned
+      	-->
+      	<swi:codecontent>purified</swi:codecontent>
+        <swi:enabled>on</swi:enabled>
+        <swi:minlength>100</swi:minlength>
+        <swi:proximity>100</swi:proximity>
+        <swi:globalcode>on</swi:globalcode>
+      </swi:indexer:dup>
+
+      <swi:indexer:gcov>
+        <swi:enabled>on</swi:enabled>
+        <swi:filepattern>^.*[.][cC][pP]?[pP]?$</swi:filepattern>
+        <swi:sourcefile>(.*)[.][cC][pP]?[pP]?</swi:sourcefile>
+        <swi:gcdafile>${1}.gcda</swi:gcdafile>
+      </swi:indexer:gcov>
+    </swi:module>
+ 
+  </swi:modules>
+  
+  <swi:report>
+    <swi:destination>.</swi:destination>
+    <swi:xml>
+      <swi:name>swi_report_ddd.xml</swi:name>
+    </swi:xml>
+    <swi:notifications>
+      <swi:name>swi_report_ddd.log</swi:name>
+      <swi:error>
+        <swi:added>on</swi:added>
+        <swi:removed>on</swi:removed>
+        <swi:modified>on</swi:modified>
+        <swi:cloned>on</swi:cloned>
+        <swi:unmodified>on</swi:unmodified>
+      </swi:error>
+      <swi:print>
+        <swi:added>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+          <swi:duplications>off</swi:duplications>
+          <swi:scanmessages>on</swi:scanmessages>
+        </swi:added>
+        <swi:removed>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+          <swi:duplications>off</swi:duplications>
+          <swi:scanmessages>on</swi:scanmessages>
+        </swi:removed>
+        <swi:modified>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+          <swi:duplications>off</swi:duplications>
+          <swi:scanmessages>on</swi:scanmessages>
+        </swi:modified>
+        <swi:cloned>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+          <swi:duplications>off</swi:duplications>
+          <swi:scanmessages>on</swi:scanmessages>
+        </swi:cloned>
+        <swi:unmodified>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+          <swi:duplications>off</swi:duplications>
+          <swi:scanmessages>on</swi:scanmessages>
+        </swi:unmodified>
+      </swi:print>
+    </swi:notifications>
+  </swi:report>
+  
+  <swi:limits>
+    
+    <swi:lines>
+      <swi:comment:header>
+        <swi:exact>
+          <swi:info>5</swi:info>
+          <swi:notice>3</swi:notice>
+          <swi:warning>1</swi:warning>
+	  
+          <swi:suppress>
+              <swi:pattern swi:level="warning">.*</swi:pattern>
+          </swi:suppress>
+	  
+        </swi:exact>
+      </swi:comment:header>
+    </swi:lines>
+
+    <swi:duplication>
+      <swi:symbols>
+        <swi:exact swi:relation="swi:length/swi:executable/swi:exact">
+          <swi:info>0.28</swi:info>
+          <swi:notice>0.40</swi:notice>
+          <swi:warning>0.60</swi:warning>
+          
+          
+          <swi:suppress>
+              <swi:pattern swi:level="warning">Useless pattern</swi:pattern>
+          </swi:suppress>
+          
+        </swi:exact>
+      </swi:symbols>
+    </swi:duplication>
+    
+    
+    <swi:coverage>
+      <swi:gcov:lines>
+        <swi:exact swi:relation="swi:coverage/swi:gsum:lines/swi:exact">
+          <swi:info>0.99</swi:info>
+          <swi:notice>0.9</swi:notice>
+          <swi:warning>0.84</swi:warning>
+        </swi:exact>
+      </swi:gcov:lines>
+    </swi:coverage>
+
+    </swi:limits>
+
+</swi:configuration>

+ 108 - 0
old/test/swi_config_test.xml

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<swi:configuration>
+  
+  <swi:info>
+    <swi:version>1</swi:version>
+    <swi:project>
+      <swi:name>DDD</swi:name>
+    </swi:project>
+    <swi:history>
+      <swi:revision>
+        <swi:name>ALFA</swi:name>
+        <swi:user>avkonst</swi:user>
+        <swi:comment>Configuration for TEST project</swi:comment>
+      </swi:revision>
+    </swi:history>
+  </swi:info>
+      
+  <swi:modules>
+    <swi:module>
+      <swi:name>TEST_FOLDER</swi:name>
+      <swi:location>test</swi:location>
+      <swi:files>
+        <swi:include>.*[chCH]</swi:include>
+        <swi:exclude></swi:exclude>
+      </swi:files>
+      
+      <swi:dupfinder>
+        <swi:enabled>on</swi:enabled>
+      </swi:dupfinder>
+      
+    </swi:module>
+ 
+  </swi:modules>
+  
+  <swi:report>
+    <swi:destination>.</swi:destination>
+    <swi:xml>
+      <swi:name>swi_report_test.xml</swi:name>
+    </swi:xml>
+    <swi:notifications>
+      <swi:name>swi_report_test.log</swi:name>
+      <swi:stdout>on</swi:stdout>
+      <swi:error>
+        <swi:added>on</swi:added>
+        <swi:removed>on</swi:removed>
+        <swi:modified>on</swi:modified>
+        <swi:cloned>on</swi:cloned>
+        <swi:unmodified>on</swi:unmodified>
+      </swi:error>
+      <swi:print>
+        <swi:added>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+        </swi:added>
+        <swi:removed>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+        </swi:removed>
+        <swi:modified>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+        </swi:modified>
+        <swi:cloned>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+        </swi:cloned>
+        <swi:unmodified>
+          <swi:failures>on</swi:failures>
+          <swi:modifications>off</swi:modifications>
+        </swi:unmodified>
+      </swi:print>
+    </swi:notifications>
+    <swi:dup>
+      <swi:name>swi_report_ddd.dup</swi:name>
+    </swi:dup>
+  </swi:report>
+  
+  <swi:limits>
+    <swi:lines>
+    
+      <swi:comment:header>
+        <swi:exact>
+          <swi:info>5</swi:info>
+          <swi:notice>3</swi:notice>
+          <swi:warning>1</swi:warning>
+	  
+          <swi:suppress>
+              <swi:pattern swi:level="info">.*</swi:pattern>
+          </swi:suppress>
+	  
+        </swi:exact>
+      </swi:comment:header>
+    </swi:lines>
+
+
+    <swi:duplication>
+      <swi:symbols>
+        <swi:exact swi:relation="swi:length/swi:executable/swi:exact">
+          <swi:info>0.28</swi:info>
+          <swi:notice>0.40</swi:notice>
+          <swi:warning>0.60</swi:warning>
+        </swi:exact>
+      </swi:symbols>
+    </swi:duplication>
+
+  </swi:limits>
+
+</swi:configuration>