├── extractheaders ├── stdafx.cpp ├── extractheaders.pro ├── stdafx.h ├── vsparsing.h ├── extractheaders.h ├── extractheaderslib.vcxproj ├── vsparsing.cpp └── extractheaders.cpp ├── extractheaderscmd ├── stdafx.cpp ├── postfix.txt ├── prefix.txt ├── extractheaderscmd.pro ├── stdafx.h ├── extractheaderscmd.cpp └── extractheaders.vcxproj ├── tests ├── diffutils │ ├── bin │ │ ├── cmp.exe │ │ ├── diff.exe │ │ ├── diff3.exe │ │ ├── sdiff.exe │ │ ├── libiconv2.dll │ │ └── libintl3.dll │ └── contrib │ │ └── diffutils │ │ └── 2.8.7 │ │ ├── diffutils-2.8.7-src │ │ ├── TODO │ │ ├── THANKS │ │ ├── ms │ │ │ └── README │ │ ├── README │ │ ├── AUTHORS │ │ ├── INSTALL │ │ ├── NEWS │ │ ├── COPYING │ │ └── ABOUT-NLS │ │ ├── depends-GnuWin32.lst │ │ └── diffutils-2.8.7-1-GnuWin32.README ├── readmeexample_test │ ├── pct_test │ │ ├── myinclude.h │ │ ├── file.cpp │ │ ├── expected.h │ │ ├── stdafx.cpp │ │ └── pct_test.vcxproj │ └── readmeexample.sln ├── sln_test.bat └── cmd_test.bat ├── genvs.bat ├── .gitignore ├── pct.pro ├── pct.sln ├── README.md └── License.md /extractheaders/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /extractheaderscmd/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /extractheaderscmd/postfix.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/diffutils/bin/cmp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g-h-c/pct/HEAD/tests/diffutils/bin/cmp.exe -------------------------------------------------------------------------------- /tests/diffutils/bin/diff.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g-h-c/pct/HEAD/tests/diffutils/bin/diff.exe -------------------------------------------------------------------------------- /tests/diffutils/bin/diff3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g-h-c/pct/HEAD/tests/diffutils/bin/diff3.exe -------------------------------------------------------------------------------- /tests/diffutils/bin/sdiff.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g-h-c/pct/HEAD/tests/diffutils/bin/sdiff.exe -------------------------------------------------------------------------------- /tests/diffutils/bin/libiconv2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g-h-c/pct/HEAD/tests/diffutils/bin/libiconv2.dll -------------------------------------------------------------------------------- /tests/diffutils/bin/libintl3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g-h-c/pct/HEAD/tests/diffutils/bin/libintl3.dll -------------------------------------------------------------------------------- /tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/TODO: -------------------------------------------------------------------------------- 1 | Add --include option (opposite of --exclude). 2 | -------------------------------------------------------------------------------- /extractheaderscmd/prefix.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | pct help 5 | 6 | 7 |
 8 | 	
 9 | 	
10 | 


--------------------------------------------------------------------------------
/tests/readmeexample_test/pct_test/myinclude.h:
--------------------------------------------------------------------------------
1 | #ifndef MYINCLUDE_H
2 | #define MYINCLUDE_H
3 | #include 
4 | #include 
5 | 
6 | #endif
7 | 
8 | 
9 | 


--------------------------------------------------------------------------------
/genvs.bat:
--------------------------------------------------------------------------------
1 | rem Run this on x64 Native tools command prompt
2 | 
3 | %QTDIR%\bin\qmake -r -spec win32-msvc2015 -tp vc QMAKE_CXXFLAGS+=/MP CONFIG+="%*" pct.pro
4 | 
5 | 
6 | 


--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
 1 | extractheaders/x64/
 2 | x64/
 3 | ipch/
 4 | *.suo
 5 | *.opendb
 6 | *.db
 7 | extractheaderscmd/debug/
 8 | extractheaderscmd/release/
 9 | extractheaders/debug/
10 | extractheaders/release/
11 | 


--------------------------------------------------------------------------------
/tests/readmeexample_test/pct_test/file.cpp:
--------------------------------------------------------------------------------
 1 | #include 
 2 | #include 
 3 | #include 
 4 | #include "myinclude.h"
 5 | 
 6 | int main()
 7 | {
 8 | 	// lots of interesting code here
 9 | }
10 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/depends-GnuWin32.lst:
--------------------------------------------------------------------------------
 1 | advapi32.dll
 2 | gdi32.dll
 3 | kernel32.dll
 4 | libiconv2.dll
 5 | libintl3.dll
 6 | msvcp60.dll
 7 | msvcrt.dll
 8 | ntdll.dll
 9 | ole32.dll
10 | rpcrt4.dll
11 | user32.dll
12 | 


--------------------------------------------------------------------------------
/tests/readmeexample_test/pct_test/expected.h:
--------------------------------------------------------------------------------
 1 | /* Machine generated code */
 2 | 
 3 | #ifndef STDAFX_H
 4 | #define STDAFX_H
 5 | #include 
 6 | #include 
 7 | #include 
 8 | #include 
 9 | #include 
10 | #endif
11 | 


--------------------------------------------------------------------------------
/pct.pro:
--------------------------------------------------------------------------------
 1 | TEMPLATE = subdirs
 2 | extracheaders.subdir=extractheaders
 3 | extractheaders.target=extractheaders
 4 | 
 5 | extracheaderscmd.subdir=extractheaderscmd
 6 | extractheaderscmd.target=extractheaderscmd
 7 |   
 8 | SUBDIRS += extractheaders extractheaderscmd
 9 |   
10 |   
11 |   
12 | 


--------------------------------------------------------------------------------
/tests/readmeexample_test/pct_test/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // pct_test.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 | 
5 | #include "stdafx.h"
6 | 
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 | 


--------------------------------------------------------------------------------
/extractheaders/extractheaders.pro:
--------------------------------------------------------------------------------
 1 | QT       += core gui
 2 | 
 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 4 | 
 5 | TARGET = extractheaderslib
 6 | TEMPLATE = lib
 7 | CONFIG += staticlib
 8 | 
 9 | HEADERS += tinyxml2.h \
10 | vsparsing.h \
11 | extractheaders.h
12 | 
13 | SOURCES += extractheaders.cpp \
14 | tinyxml2.cpp \
15 | vsparsing.cpp
16 | 
17 | INCLUDEPATH += $(BOOST_HOME)
18 | LIBS += -L$(BOOST_LIB)
19 | 


--------------------------------------------------------------------------------
/extractheaderscmd/extractheaderscmd.pro:
--------------------------------------------------------------------------------
 1 | TARGET = extractheaders
 2 | TEMPLATE = app
 3 | CONFIG+=console
 4 | SOURCES += extractheaderscmd.cpp
 5 | 
 6 | INCLUDEPATH += $(BOOST_HOME)
 7 |                INCLUDEPATH += ../extractheaders
 8 | 
 9 | CONFIG(debug, debug|release): CONF_FOLDER=debug
10 | CONFIG(release, debug|release): CONF_FOLDER=release
11 | LIBS += -L$(BOOST_LIB)
12 | LIBS += -L../extractheaders/$$CONF_FOLDER -lextractheaderslib
13 |         
14 | 
15 | 
16 | 


--------------------------------------------------------------------------------
/extractheaderscmd/stdafx.h:
--------------------------------------------------------------------------------
 1 | /* Machine generated code */
 2 | 
 3 | #ifndef STDAFX_H
 4 | #define STDAFX_H
 5 | #include 
 6 | #include 
 7 | #include 
 8 | #include 
 9 | #include 
10 | #include 
11 | #include 
12 | #include 
13 | #include 
14 | #include 
15 | #include 
16 | #include 
17 | #include 
18 | #include 
19 | #include 
20 | #include 
21 | #endif
22 | 


--------------------------------------------------------------------------------
/tests/sln_test.bat:
--------------------------------------------------------------------------------
 1 | rem Tests extractheaders when invoked with the --sln option.
 2 | rem Requires the environment variable %CONFIGURATION% to be set
 3 | @echo off
 4 | 
 5 | del readmeexample_test\pct_test\stdafx.h 2>NUL
 6 | ..\extractheaderscmd\%CONFIGURATION%\extractheaders --sln readmeexample_test\readmeexample.sln --sysinclude "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
 7 | 
 8 | IF %errorlevel% neq 0 (
 9 |    echo extractheaders failed with error code: %errorlevel% 
10 |    exit /B %errorlevel%  
11 | )
12 | 
13 | echo Comparing output with reference...
14 | diffutils\bin\diff readmeexample_test\pct_test\stdafx.h readmeexample_test\pct_test\expected.h
15 | echo.
16 | 
17 | IF %errorlevel% equ 0 (
18 |    echo No differences found.
19 |    exit /B 0
20 | ) ELSE (
21 |    echo Differences found, diff returned: %errorlevel%
22 |    exit /B %errorlevel%   
23 | )
24 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/THANKS:
--------------------------------------------------------------------------------
 1 | Thanks to all the following for their contributions to GNU diffutils:
 2 | 
 3 | Thomas Bushnell  
 4 | Wayne Davison  
 5 | Ulrich Drepper  
 6 | Paul Eggert  
 7 | Jay Fenlason 
 8 | John Gilmore  
 9 | Torbjorn Granlund  
10 | Mike Haertel  
11 | Bruno Haible  
12 | Chris Hanson 
13 | Jim Kingdon  
14 | Tom Lord  
15 | David J. MacKenzie  
16 | Roland McGrath  
17 | Jim Meyering  
18 | Eugene W. Myers  
19 | Randy Smith  
20 | Richard Stallman  
21 | Leonard H. Tower Jr.  
22 | Eli Zaretskii  
23 | 


--------------------------------------------------------------------------------
/extractheaders/stdafx.h:
--------------------------------------------------------------------------------
 1 | /* Machine generated code */
 2 | 
 3 | #ifndef STDAFX_H
 4 | #define STDAFX_H
 5 | #include 
 6 | #include 
 7 | #include 
 8 | #include 
 9 | #include 
10 | #include 
11 | #include 
12 | #include 
13 | #include 
14 | #include 
15 | #include 
16 | #include 
17 | #include 
18 | #include 
19 | #include 
20 | #include 
21 | #include 
22 | #include 
23 | #include 
24 | #include 
25 | #include 
26 | #include 
27 | #include 
28 | #include 
29 | #include 
30 | #include 
31 | #include 
32 | #include 
33 | #endif
34 | 


--------------------------------------------------------------------------------
/tests/cmd_test.bat:
--------------------------------------------------------------------------------
 1 | rem Tests extractheaders when invoked with the --input option.
 2 | rem Requires the environment variable %CONFIGURATION% to be set
 3 | 
 4 | @echo off
 5 | 
 6 | del readmeexample_test\pct_test\stdafx.h 2>NUL
 7 | ..\extractheaderscmd\%CONFIGURATION%\extractheaders --input readmeexample_test\pct_test\file.cpp --def "WIN32;WIN32;_M_X64" --sysinclude "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" --sysinclude "C:\Qt\5.6\msvc2015_64\include" -o readmeexample_test\pct_test\stdafx.h
 8 | 
 9 | IF %errorlevel% neq 0 (
10 |    echo extractheaders failed with error code: %errorlevel% 
11 |    exit /B %errorlevel%  
12 | )
13 | 
14 | echo Comparing output with reference...
15 | diffutils\bin\diff readmeexample_test\pct_test\stdafx.h readmeexample_test\pct_test\expected.h
16 | echo.
17 | 
18 | IF %errorlevel% equ 0 (
19 |    echo No differences found.
20 |    exit /B 0
21 | ) ELSE (
22 |    echo Differences found, diff returned: %errorlevel%
23 |    exit /B %errorlevel%   
24 | )
25 | 


--------------------------------------------------------------------------------
/tests/readmeexample_test/readmeexample.sln:
--------------------------------------------------------------------------------
 1 | 
 2 | Microsoft Visual Studio Solution File, Format Version 12.00
 3 | # Visual Studio 14
 4 | VisualStudioVersion = 14.0.25420.1
 5 | MinimumVisualStudioVersion = 10.0.40219.1
 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pct_test", "pct_test\pct_test.vcxproj", "{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}"
 7 | EndProject
 8 | Global
 9 | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | 		Debug|x64 = Debug|x64
11 | 		Debug|x86 = Debug|x86
12 | 		Release|x64 = Release|x64
13 | 		Release|x86 = Release|x86
14 | 	EndGlobalSection
15 | 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Debug|x64.ActiveCfg = Debug|x64
17 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Debug|x64.Build.0 = Debug|x64
18 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Debug|x86.ActiveCfg = Debug|Win32
19 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Debug|x86.Build.0 = Debug|Win32
20 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Release|x64.ActiveCfg = Release|x64
21 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Release|x64.Build.0 = Release|x64
22 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Release|x86.ActiveCfg = Release|Win32
23 | 		{2D39115B-68E3-4924-A2D9-0D98BD3EBF07}.Release|x86.Build.0 = Release|Win32
24 | 	EndGlobalSection
25 | 	GlobalSection(SolutionProperties) = preSolution
26 | 		HideSolutionNode = FALSE
27 | 	EndGlobalSection
28 | EndGlobal
29 | 


--------------------------------------------------------------------------------
/extractheaders/vsparsing.h:
--------------------------------------------------------------------------------
 1 | #ifndef VSPARSING_H
 2 | #define VSPARSING_H
 3 | 
 4 | #include "tinyxml2.h"
 5 | #include 
 6 | #include 
 7 | #include 
 8 | #include 
 9 | 
10 | struct ProjectConfiguration {
11 | 	std::string name;
12 | 	std::string configuration;
13 | 	std::string definitions;
14 | 	std::string additionalIncludeDirectories;
15 | 	std::string precompiledHeaderFile;
16 | };
17 | 
18 | struct Project {
19 | 	std::string name;
20 | 	std::string location;
21 | };
22 | 
23 | class VcxprojParsing {
24 | public:
25 | 
26 | 	// @path path to a .vcxproj
27 | 	// @throw std::runtime_error If the file could not be opened
28 | 	VcxprojParsing(const char* path, std::ostream& errStream);
29 | 	void parse(std::vector& configurations,
30 | 			   std::vector& files);
31 | 
32 | 	// VS2008 or earlier
33 | 	void parseLegacy(std::vector& configurations,
34 | 		             std::vector& files);
35 | 	void replaceEnvVars(std::string& paths);
36 | private:
37 | 	boost::filesystem::path filepath;
38 | 	tinyxml2::XMLDocument doc;
39 | 	std::ostream& errorStream;
40 | };
41 | 
42 | class SlnParsing {
43 | public:
44 | 
45 | 	// @path path to a .vcxproj
46 | 	// @throw std::runtime_error If the file could not be opened
47 | 	SlnParsing(const char* path, std::ostream& errStream);
48 | 	void parse(std::vector& projects);
49 | 
50 | private:
51 | 	std::vector fileContents;
52 | 	std::ostream& errorStream;
53 | };
54 | 
55 | #endif
56 | 


--------------------------------------------------------------------------------
/pct.sln:
--------------------------------------------------------------------------------
 1 | Microsoft Visual Studio Solution File, Format Version 12.00
 2 | # Visual Studio 14
 3 | VisualStudioVersion = 14.0.25402.0
 4 | MinimumVisualStudioVersion = 10.0.40219.1
 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "extractheaderslib", "extractheaders\extractheaderslib.vcxproj", "{CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}"
 6 | EndProject
 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "extractheaders", "extractheaderscmd\extractheaders.vcxproj", "{CF72E5A8-AE38-3B6A-A553-55FC7FBECCA9}"
 8 | 	ProjectSection(ProjectDependencies) = postProject
 9 | 		{CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96} = {CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}
10 | 	EndProjectSection
11 | EndProject
12 | Global
13 | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | 		Debug|x64 = Debug|x64
15 | 		Release|x64 = Release|x64
16 | 	EndGlobalSection
17 | 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | 		{CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}.Debug|x64.ActiveCfg = Debug|x64
19 | 		{CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}.Debug|x64.Build.0 = Debug|x64
20 | 		{CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}.Release|x64.ActiveCfg = Release|x64
21 | 		{CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}.Release|x64.Build.0 = Release|x64
22 | 		{CF72E5A8-AE38-3B6A-A553-55FC7FBECCA9}.Debug|x64.ActiveCfg = Debug|x64
23 | 		{CF72E5A8-AE38-3B6A-A553-55FC7FBECCA9}.Debug|x64.Build.0 = Debug|x64
24 | 		{CF72E5A8-AE38-3B6A-A553-55FC7FBECCA9}.Release|x64.ActiveCfg = Release|x64
25 | 		{CF72E5A8-AE38-3B6A-A553-55FC7FBECCA9}.Release|x64.Build.0 = Release|x64
26 | 	EndGlobalSection
27 | 	GlobalSection(SolutionProperties) = preSolution
28 | 		HideSolutionNode = FALSE
29 | 	EndGlobalSection
30 | EndGlobal
31 | 


--------------------------------------------------------------------------------
/extractheaders/extractheaders.h:
--------------------------------------------------------------------------------
 1 | #ifndef EXTRACTHEADERS_H
 2 | #define EXTRACTHEADERS_H
 3 | #include 
 4 | #include 
 5 | #include 
 6 | #include 
 7 | 
 8 | struct ExtractHeadersInput {
 9 | 	std::vector inputs;
10 | 	std::vector includedirsIn;
11 | 	std::vector includetreedirs;
12 | 	std::vector excludeheaders;
13 | 	std::vector includeheaders;
14 | 	std::vector sysincludedirs;
15 | 	std::vector sysincludetreedirs;
16 | 	std::vector cxxflags;
17 | 	std::string vcxproj;
18 | 	std::string configuration;
19 | 	std::string sln;
20 | 	std::vector excludedirs;
21 | 	std::vector excluderegexp;
22 | 
23 | 	int nesting;
24 | 	std::string outputfile;
25 | 	bool singlecore;
26 | 	bool verbose;
27 | 	bool pragma;
28 | };
29 | 
30 | struct ExtractHeadersConsoleOutput {
31 | 	ExtractHeadersConsoleOutput(std::ostream& errStream,
32 | 						std::ostream& infStream) :
33 | 		errorStream(errStream),
34 | 		infoStream(infStream)
35 | 	{
36 | 	}
37 | 
38 | 	// headersfound contains the headers inclusion, as they were found
39 | 	// in the file. This is how they will be copied to the generated
40 | 	// precompiled header, to keep relatives paths, case, etc.
41 | 	std::vector headersfound;
42 | 	std::ostream& errorStream;
43 | 	std::ostream& infoStream;
44 | };
45 | 
46 | class ExtractHeadersImpl;
47 | 
48 | void make_absolute(std::string& oldpath, const boost::filesystem::path& dir);
49 | 
50 | // Generates a precompiled headers for one project at a time. I.e. a .vcxproj file.
51 | // To generate precompiled headers for a complete solution, this class needs to
52 | // be instantiated for each vcxproj
53 | class ExtractHeaders {
54 | public:
55 | 	ExtractHeaders();
56 | 	~ExtractHeaders();
57 | 	void write_stdafx();
58 | 	// @outputfile absolute path where the precompiled header should be written,
59 | 	//
60 | 	void run(ExtractHeadersConsoleOutput& output, const ExtractHeadersInput& input);
61 | 
62 | private:
63 | 	std::unique_ptr impl;
64 | };
65 | 
66 | std::string& strtolower(std::string& str);
67 | 
68 | #endif
69 | 
70 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/ms/README:
--------------------------------------------------------------------------------
 1 | This directory contains files required to build GNU Diffutils on
 2 | MS_DOS and MS-Windows using the DJGPP tools.
 3 | 
 4 | To build Diffutils, you will need the following packages:
 5 | 
 6 |     . the basic DJGPP development kit: GCC, Binutils, and djdevNNN.zip
 7 |     . a DJGPP port of Bash (bsh204b.zip)
 8 |     . GNU Fileutils (fil40b.zip)
 9 |     . GNU Textutils (txt20b.zip)
10 |     . GNU Sh-utils (shl112b.zip)
11 |     . GNU Grep (grep24b.zip)
12 |     . GNU Awk (gwk306b.zip)
13 |     . GNU Sed (sed302b.zip)
14 |     . GNU Make (mak3791b.zip)
15 | 
16 | The package names in parentheses indicate the oldest version which
17 | should work; newer versions are okay.  All those packages can be found
18 | on the usual DJGPP sites, in the v2gnu directory.  Please see
19 |  for a list of DJGPP sites.
20 | 
21 | The source distribution of Diffutils you find on DJGPP sites comes
22 | preconfigured for the latest officially released version of the DJGPP
23 | library, and without NLS support.  If that is what you have installed,
24 | and if you don't need NLS support in Diffutils, you don't need to run
25 | the configure script; proceed directly to the "make" step below.
26 | 
27 | If you are building the official GNU distribution, or your library is
28 | not the latest official release, or if you modified your headers or
29 | installed optional libraries, or if you want to have NLS support in
30 | Diffutils, you will have to reconfigure the package.  To this end,
31 | after unpacking the sources, chdir to the top-level directory created
32 | by unpacking, and type this command:
33 | 
34 |    ms\config [nls]
35 | 
36 | The "nls" option, if given, will configure the package for NLS
37 | support.
38 | 
39 | This will run for a while and create the Makefile's and the config.h
40 | header file.
41 | 
42 | Next type "make"; this will build the programs.
43 | 
44 | To install the package, type "make install".
45 | 
46 | That's it!
47 | 
48 | -----
49 | Copyright (C) 2001 Free Software Foundation, Inc.
50 | 
51 | This file is part of GNU DIFF.
52 | 
53 | GNU DIFF is free software; you can redistribute it and/or modify
54 | it under the terms of the GNU General Public License as published by
55 | the Free Software Foundation; either version 2, or (at your option)
56 | any later version.
57 | 
58 | GNU DIFF is distributed in the hope that it will be useful,
59 | but WITHOUT ANY WARRANTY; without even the implied warranty of
60 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
61 | GNU General Public License for more details.
62 | 
63 | You should have received a copy of the GNU General Public License
64 | along with tar; see the file COPYING.  If not, write to
65 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
66 | Boston, MA 02111-1307, USA.
67 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-1-GnuWin32.README:
--------------------------------------------------------------------------------
 1 | * DiffUtils-2.8.7 for Windows *
 2 | ===============================
 3 | 
 4 | What is it?
 5 | -----------
 6 | DiffUtils: show differences between files
 7 | 
 8 | Description
 9 | -----------
10 | You can use the diff command to show differences between two files, or each
11 | corresponding file in two directories. diff outputs differences between files
12 | line by line in any of several formats, selectable by command line options.
13 | This set of differences is often called a `diff' or `patch'. For files that
14 | are identical, diff normally produces no output; for binary (non-text) files,
15 | diff normally reports only that they are different. 
16 | 
17 | You can use the cmp command to show the offsets and line numbers where two
18 | files differ. cmp can also show all the characters that differ between the
19 | two files, side by side. 
20 | 
21 | You can use the diff3 command to show differences among three files. When
22 | two people have made independent changes to a common original, diff3 can
23 | report the differences between the original and the two changed versions,
24 | and can produce a merged file that contains both persons' changes together
25 | with warnings about conflicts. 
26 | 
27 | You can use the sdiff command to merge two files interactively.
28 | 	 
29 | Homepage
30 | --------
31 | http://www.gnu.org/software/diffutils/diffutils.html
32 | 	 
33 | System
34 | ------
35 | - MS-Windows 95 / 98 / ME / NT / 2000 / XP with msvcrt.dll
36 | - if msvcrt.dll is not in your Windows/System folder, get it from
37 |   Microsoft 
38 |   or by installing Internet Explorer 4.0 or higher
39 |    
40 | - libintl-2  
41 | - libiconv-2  
42 | - regex  
43 | 
44 | Notes
45 | -----
46 | - Bugs and questions on this MS-Windows port: gnuwin32@users.sourceforge.net
47 | 
48 | Package Availability
49 | --------------------
50 | - in: http://gnuwin32.sourceforge.net
51 | Installation
52 | ------------
53 | DiffUtils may be installed in any directory, provided the subdirectory
54 | structure is maintained. Native language support is also active.
55 | 
56 | The interactive mode of Sdiff does not work properly. Only redirection of 
57 | its output to a file works.
58 | 
59 | Sources
60 | -------
61 | - diffutils-2.8.7-1-src.zip
62 | 
63 | Compilation
64 | -----------
65 | The package has been compiled with GNU auto-tools, GNU make, and Mingw
66 | (GCC for MS-Windows). Any differences from the original sources are given
67 | in diffutils-2.8.7-1-GnuWin32.diffs in diffutils-2.8.7-1-src.zip. Libraries needed
68 | for compilation can be found at the lines starting with 'LIBS = ' in the
69 | Makefiles. Usually, these are standard libraries provided with Mingw, or
70 | libraries from the package itself; 'gw32c' refers to the libgw32c package,
71 | which provides MS-Windows substitutes or stubs for functions normally found in
72 | Unix. For more information, see: http://gnuwin32.sourceforge.net/compile.html
73 | and http://gnuwin32.sourceforge.net/packages/libgw32c.htm.
74 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/README:
--------------------------------------------------------------------------------
 1 | README for GNU DIFF
 2 | 
 3 | This directory contains the GNU diff, diff3, sdiff, and cmp utilities.
 4 | Their features are a superset of the Unix features and they are
 5 | significantly faster.
 6 | 
 7 | Please see the file COPYING for copying conditions.
 8 | 
 9 | Please see the file doc/version.texi for version information.
10 | 
11 | Please see the file doc/diff.texi (or doc/diff.info) for documentation
12 | that can be printed with TeX, or read with the `info' program or with
13 | Emacs's `M-x info'.  Brief man pages are in man/*, but they are no
14 | substitute for the documentation.
15 | 
16 | Please see the file ABOUT-NLS for notes about translations.
17 | 
18 | Please see the file INSTALL for generic compilation and installation
19 | instructions.  Briefly, you can run "./configure; make install".  The
20 | command "./configure --help" lists the supported --enable and --with
21 | options.
22 | 
23 | If you have a problem with internationalization, you might be able to
24 | work around it as described in ABOUT-NLS by invoking `./configure
25 | --disable-nls'.  Many of the problems arise from dynamic linking
26 | issues on non-GNU platforms (e.g. with the iconv library).  Such
27 | problems tend to be shared by other GNU applications on these
28 | platforms, and can usually be fixed by carefully tweaking your non-GNU
29 | installation.  If you have an older version of libiconv, please
30 | upgrade to the latest one; see .  If
31 | the problem seems isolated to diffutils, though, please report a bug.
32 | 
33 | This program requires a Standard C compiler (C89 or later).  If you
34 | have a nonstandard compiler, please install GCC first.
35 | 
36 | If you make changes to the source code, you may need appropriate
37 | versions of GNU build tools to regenerate the intermediate files.  The
38 | following versions were used to generate the intermediate files in
39 | this distribution:
40 | 
41 | * Autoconf 2.59   
42 | * Automake 1.8.3  
43 | * gettext 0.14.1  
44 | * help2man 1.33   
45 | * Texinfo 4.7     
46 | 
47 | Please report bugs to .
48 | 
49 | -----
50 | 
51 | Copyright (C) 1992, 1998, 2001, 2002, 2004 Free Software Foundation,
52 | Inc.
53 | 
54 | This file is part of GNU Diffutils.
55 | 
56 | This program is free software; you can redistribute it and/or modify
57 | it under the terms of the GNU General Public License as published by
58 | the Free Software Foundation; either version 2, or (at your option)
59 | any later version.
60 | 
61 | This program is distributed in the hope that it will be useful,
62 | but WITHOUT ANY WARRANTY; without even the implied warranty of
63 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64 | GNU General Public License for more details.
65 | 
66 | You should have received a copy of the GNU General Public License
67 | along with this program; see the file COPYING.  If not, write to
68 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
69 | Boston, MA 02111-1307, USA.
70 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/AUTHORS:
--------------------------------------------------------------------------------
  1 | Authors of GNU diffutils.
  2 | 
  3 | 	Copyright 2001 Free Software Foundation, Inc.
  4 | 
  5 | 	This file is part of GNU diffutils.
  6 | 
  7 | 	GNU diffutils is free software; you can redistribute it and/or modify
  8 | 	it under the terms of the GNU General Public License as published by
  9 | 	the Free Software Foundation; either version 2, or (at your option)
 10 | 	any later version.
 11 | 
 12 | 	GNU diffutils is distributed in the hope that it will be useful,
 13 | 	but WITHOUT ANY WARRANTY; without even the implied warranty of
 14 | 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 15 | 	GNU General Public License for more details.
 16 | 
 17 | 	You should have received a copy of the GNU General Public License
 18 | 	along with GNU diffutils; see the file COPYING.  If not, write to
 19 | 	the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 20 | 	Boston, MA 02111-1307, USA.
 21 | 
 22 | The following contributions warranted legal paper exchanges with the
 23 | Free Software Foundation.  Also see files ChangeLog and THANKS.
 24 | 
 25 | DIFFUTILS	Leonard H. Tower Jr.	US 1949	1987-03-09
 26 | Assigns diff (diff.c, initial version).
 27 | 
 28 | DIFFUTILS	Torbjorn Granlund	Sweden 1961	1988-01-11
 29 | Assigns cmp.
 30 | tege@matematik.su.se
 31 | 
 32 | DIFFUTILS	Mike Haertel	US 1967	1988-09-16
 33 | Assigns changes to diff.
 34 | 
 35 | DIFFUTILS	David S. Hayes	US ?	1988-01-12
 36 | Assigns changes to diff.
 37 | 
 38 | DIFFUTILS	Randall Smith	US 1964	1988-09-21
 39 | Assigns diff3.
 40 | 
 41 | DIFFUTILS	Richard Stallman	US 1953	1988-01-15
 42 | Assigns changes to GNU Diff.
 43 | 
 44 | DIFFUTILS	F. Thomas May	US 1965	1989-08-22
 45 | Assigns changes to diff (for -D).
 46 | 
 47 | DIFFUTILS	Optimal Solutions, Inc.	1989-08-14
 48 | Disclaims changes by Thomas May to diff.
 49 | 
 50 | DIFFUTILS	Wayne Davison	1990-09-10
 51 | Disclaims changes to diff.
 52 | 
 53 | DIFFUTILS	Digital Research Inc.	1990-09-13
 54 | Disclaims changes by Wayne Davison to diff.
 55 | 
 56 | DIFFUTILS	Paul Eggert	1990-03-16
 57 | Disclaims changes to diff.
 58 | eggert@twinsun.com
 59 | 
 60 | DIFFUTILS	Paul Eggert	1990-08-14
 61 | Disclaims changes to GNU Diff.
 62 | eggert@twinsun.com
 63 | 
 64 | DIFFUTILS	Twin Sun Inc.	1990-03-16
 65 | Disclaims changes to GNU Diff by Paul Eggert.
 66 | 
 67 | DIFFUTILS	Twin Sun Inc.	1990-08-14
 68 | Disclaims changes to GNU Diff by Paul Eggert.
 69 | 
 70 | DIFFUTILS	Chip Rosenthal	US 1959	1990-03-06
 71 | Assigns changes to diff.
 72 | chip@chinacat.Unicom.COM
 73 | 
 74 | DIFFUTILS	Unicom Systems Development	1990-03-06
 75 | Disclaims changes by Chip Rosenthal to diff.
 76 | 
 77 | GCC DIFFUTILS	Paul Eggert and Twin Sun Inc.	1992-03-11
 78 | Disclaims changes by Paul Eggert to gcc and diff.
 79 | eggert@twinsun.com
 80 | 
 81 | DIFF	Wayne Davison	1993-06-20
 82 | Disclaims diffcvt.c.
 83 | 
 84 | DIFFUTILS	Francois Pinard	Canada 1949	1993-01-15
 85 | Assigns wdiff and future changes submitted to the FSF.
 86 | pinard@iro.umontreal.ca
 87 | 
 88 | DIFFUTILS	Patrick D'Cruze	Australia 1971	1994-11-10
 89 | Assigns changes (makefile.in, analyze.c, cmp.c, error.c, diff.c,
 90 | diff3.c, getopt.c, getopt1.c, regex.c, sdiff.c, util.c, xmalloc.c;
 91 | new file: language.++)
 92 | 
 93 | DIFFUTILS	Paul R. Eggert	US 1954	1997-04-07
 94 | Assigns past and future changes.
 95 | eggert@twinsun.com
 96 | 
 97 | DIFFUTILS	Paul R. Eggert	US 1954	1997-04-07
 98 | Assigns past and future changes to manual.
 99 | eggert@twinsun.com
100 | 
101 | ANY DIFFUTILS GNATS	Cyclic Software	1997-11-11
102 | Assigns past and future works (work for hire by Tim Pierce (diffutils) and
103 | Abe Feldman (GNATS)).
104 | kingdon@cyclic.com
105 | 
106 | WEBPAGES        Gregory B. Harvey       Canada 1976     1998-02-14
107 | Assigns web pages describing GNU Diffutils and future changes.
108 | 
109 | DIFFUTILS	Olga Nikulin	Russia 1965	2001-01-11
110 | Assigns changes to diff. (diffutils-2.7.2/analyze.c, context.c, diff.[ch],
111 | ed.c, ifdef.c, io.c, normal.c, side.c, util.c)
112 | onikulin@yahoo.com
113 | 


--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
  1 | # pct [![AppVeyor build](https://ci.appveyor.com/api/projects/status/uiue2rplcirf0a38?svg=true)](https://ci.appveyor.com/project/g-h-c/pct/)
  2 | 
  3 | Pct (PreCompiled header tool) aims to be a bag of tools to help reducing and analysing C/C++ compilation times. There is only one tool for now, extractheaders.
  4 | 
  5 | ## extractheaders
  6 | 
  7 | Analyses C / C++ files to generate a precompiled header. It can get its input from Visual Studio project files (.vcxproj and .sln) or they can be specified explicitly through command line options. The precompiled header will consist of the standard headers that are included in the provided files (or any header included by the files recursively). It uses Boost Wave Preprocessor under the hood.
  8 | 
  9 | extractheaders can read Visual Studio project files with the options --sln and --vcxproj. E.g.
 10 | 
 11 | --sln c:\\path\\to\\mysolution.sln --sysinclude "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include" --configuration "Debug|x64"
 12 | 
 13 | This command line will parse all the .vcxproj in mysolution.sln, and will generate the precompiled headers according to the macros and include paths specified in the configuration Debug|x64
 14 | 
 15 | If you do not have Visual Studio project files, you can specify which are your inputs like this:
 16 | 
 17 | --sysinclude "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include" --sysinclude C:\\Qt\\Qt5.6.0\\5.6\\msvc2013_64\\include --sysinclude C:\\Qt\\Qt5.6.0\\5.6\\msvc2013_64\\include\\QtCore --def "_WIN32;WIN32;_M_X64_" --input c:\\path\\to\\file.cpp --include c:\\path\\to\\ 
 18 | 
 19 | Applied to this file.cpp:
 20 | 
 21 | ```cpp
 22 | #include 
 23 | #include 
 24 | #include 
 25 | #include "myinclude.h"
 26 | 
 27 | int main()
 28 | {
 29 |   // lots of interesting code here
 30 | }
 31 | ```
 32 | 
 33 | where myinclude.h is:
 34 | 
 35 | ```cpp
 36 | #include 
 37 | #include 
 38 | ```
 39 | 
 40 | will generate this precompiled header:
 41 | 
 42 | ```cpp
 43 | #ifndef STDAFX_H
 44 | #define STDAFX_H
 45 | #include 
 46 | #include 
 47 | #include 
 48 | #include 
 49 | #include 
 50 | #endif
 51 | ```
 52 | 
 53 | 
 54 | extractheaders can also be easily integrated with qmake. Imagine the previous example was built with this .pro file:
 55 | 
 56 | ```cpp
 57 | HEADERS += myinclude.h
 58 | SOURCES += file.cpp
 59 | INCLUDEPATH += "."
 60 | 
 61 | for (it, SOURCES) {    
 62 | 	INPUT_ARGUMENTS += --input \"$${it}\"
 63 | }
 64 | 
 65 | for (it, INCLUDEPATH) {    
 66 | 	INCLUDE_ARGUMENTS += --include \"$$PWD/$${it}\"
 67 | }
 68 | 
 69 | system(extractheaders --sysinclude \"c:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include\\" --sysincludetree C:\\Qt\\Qt5.6.0\\5.6\\msvc2013_64\\include --def "_WIN32;WIN32;_M_X64;_IOSTREAM_" $$INPUT_ARGUMENTS $$INCLUDE_ARGUMENTS) --excluderegexp "moc_.*"
 70 | ```
 71 | 
 72 | system() will invoke extractheaders in this case, generating the appropiate stdafx.h. The first two loops will generate the necessary arguments that the tool needs. The option --sysincludetree comes in handy to include all the Qt include subfolders.
 73 | 
 74 | The option --excluderegexp "moc_.*" avoids processing Qt moc-generated files, which otherwise will generate a lot of errors.
 75 | 
 76 | It may also be easier to generate Visual Studio project files with qmake and then tell extractheaders to parse them: https://cppisland.wordpress.com/2015/11/15/cross-platform-development-with-c/
 77 | 
 78 | The latest command line help is at the [wiki](https://github.com/g-h-c/pct/wiki)
 79 | 
 80 | **Compilation**
 81 | 
 82 | Requires boost libraries and C++ 11 compliant compiler. The environment variable BOOST_HOME needs to be set to point to the root of Boost libraries and BOOST_LIB needs to point the binaries. The least Boost version I tried was 1.58.0. I have only worked on 64 bits, a 32 bits build should work but I have not tested it. Althought the Visual Studio project files were generated with version 2015, the code compiles cleanly on 2013 as well (but you may need to select ```Visual Studio 2013 (v120)``` as Platform Toolset in Configuration Properties->General.
 83 | 
 84 | Both qmake and Visual Studio project files are provided. The script genvs.bat could be used to generate the Visual Studio project files from the qmake ones.
 85 | 
 86 | **Blog entries**
 87 | 
 88 | https://cppisland.wordpress.com/2016/06/05/introducing-pct-a-tool-to-help-reducing-cc-compilation-times/
 89 | 
 90 | https://cppisland.wordpress.com/2016/12/28/pct-1-0-supports-visual-studio-project-files-and-is-multithreaded/
 91 | 
 92 | **Troubleshooting**
 93 | 
 94 | > error: could not find include file: windows.h
 95 | 
 96 | Add the path to Windows SDK user mode header files, for instance with: --sysinclude C:\Program Files (x86)\Windows Kits\8.1\Include\um
 97 | 
 98 | > Could not find include file even if it is one of the specified include directories
 99 | 
100 | This may be caused by trying to include a system header using quotes, e.g. #include "string.h" or trying to include a user header using angle brackets, e.g. #include \. Best solution would be to be consistent with the normal convention, use quotes for user headers and angle bracket for system headers.
101 | 
102 | > pct hangs or says: error: ill formed preprocessor directive: #include "aheader.h"
103 | 
104 | This may be cause because one the preprocessed files does not include an end-of-line at the end of the file.
105 | 
106 | > error: Windows Kits\8.1\Include\shared\ws2def.h(221): error C2011: 'sockaddr' : 'struct' type redefinition
107 | 
108 | winsock2.h and windows.h are sensitive to the order in which they are included. winsock2.h must be included before windows.h or you can #define WIN32_LEAN_AND_MEAN if you do not need rarely used windows.h stuff
109 | 
110 | 
111 | 
112 | 
113 | 
114 | 


--------------------------------------------------------------------------------
/extractheaders/extractheaderslib.vcxproj:
--------------------------------------------------------------------------------
  1 | 
  2 | 
  3 |   
  4 |     
  5 |       Release
  6 |       x64
  7 |     
  8 |     
  9 |       Debug
 10 |       x64
 11 |     
 12 |   
 13 |   
 14 |     {CF1E84FC-48FB-3D48-8B4B-AF74F64C2F96}
 15 |     extractheaderslib
 16 |     Qt4VSv1.0
 17 |   
 18 |   
 19 |   
 20 |     v140
 21 |     release\
 22 |     false
 23 |     NotSet
 24 |     StaticLibrary
 25 |     release\
 26 |     extractheaderslib
 27 |   
 28 |   
 29 |     v140
 30 |     debug\
 31 |     false
 32 |     NotSet
 33 |     StaticLibrary
 34 |     debug\
 35 |     extractheaderslib
 36 |   
 37 |   
 38 |   
 39 |   
 40 |     
 41 |   
 42 |   
 43 |     
 44 |   
 45 |   
 46 |   
 47 |     release\
 48 |     release\
 49 |     extractheaderslib
 50 |     true
 51 |     debug\
 52 |     debug\
 53 |     extractheaderslib
 54 |     true
 55 |   
 56 |   
 57 |     
 58 |       .;$(BOOST_HOME);release;%(AdditionalIncludeDirectories)
 59 |       -Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)
 60 |       release\
 61 |       false
 62 |       None
 63 |       Sync
 64 |       true
 65 |       release\
 66 |       MaxSpeed
 67 |       _WINDOWS;UNICODE;WIN32;WIN64;NDEBUG;%(PreprocessorDefinitions)
 68 |       false
 69 |       
 70 |       
 71 |       MultiThreadedDLL
 72 |       true
 73 |       true
 74 |       true
 75 |       Level3
 76 |       Use
 77 |       stdafx.h
 78 |     
 79 |     
 80 |       $(OutDir)\extractheaderslib.lib
 81 |       true
 82 |     
 83 |     
 84 |       Unsigned
 85 |       None
 86 |       0
 87 |     
 88 |     
 89 |       _WINDOWS;UNICODE;WIN32;WIN64;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)
 90 |     
 91 |   
 92 |   
 93 |     
 94 |       .;$(BOOST_HOME);debug;%(AdditionalIncludeDirectories)
 95 |       -w34100 -w34189 -w44996 %(AdditionalOptions)
 96 |       debug\
 97 |       false
 98 |       ProgramDatabase
 99 |       Sync
100 |       true
101 |       debug\
102 |       Disabled
103 |       _WINDOWS;UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)
104 |       false
105 |       MultiThreadedDebugDLL
106 |       true
107 |       true
108 |       true
109 |       Level3
110 |       Use
111 |       stdafx.h
112 |     
113 |     
114 |       $(OutDir)\extractheaderslib.lib
115 |       true
116 |     
117 |     
118 |       Unsigned
119 |       None
120 |       0
121 |     
122 |     
123 |       _WINDOWS;UNICODE;WIN32;WIN64;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)
124 |     
125 |   
126 |   
127 |     
128 |     
129 |       Create
130 |       Create
131 |     
132 |     
133 |     
134 |   
135 |   
136 |     
137 |     
138 |     
139 |     
140 |   
141 |   
142 |   
143 | 


--------------------------------------------------------------------------------
/extractheaderscmd/extractheaderscmd.cpp:
--------------------------------------------------------------------------------
  1 | #include "extractheaders.h"
  2 | #include "vsparsing.h"
  3 | #include 
  4 | #include 
  5 | #include 
  6 | #include 
  7 | #include 
  8 | 
  9 | 
 10 | 
 11 | boost::program_options::variables_map vm;
 12 | using namespace boost::filesystem;
 13 | using namespace boost::program_options;
 14 | namespace po = boost::program_options;
 15 | using namespace std;
 16 | 
 17 | void readOptions(ExtractHeadersInput& input, int argc, char** argv)
 18 | {
 19 | 	boost::program_options::options_description desc_options("", 1000, 500);
 20 | 
 21 | 	desc_options.add_options()
 22 | 		("input", po::value >(&input.inputs)->composing(),
 23 | 		"Files/directory to parse in search of standard/thirdparty includes. In case of directories only .c .cc .cpp .cxx files will be parsed (and the headers included in those)"
 24 | 		"If a directory is specified, all the files of that directory will be parsed. More than one file can be specified if separated by semicolons"
 25 | 		"(this option could be specified multiple times)")
 26 | 		("include,I", po::value >(&input.includedirsIn)->composing(),
 27 | 		"specify an additional include directory")
 28 | 		("includetree,I", po::value >(&input.includetreedirs)->composing(),
 29 | 		"same as --include, but the subfolders of the specified folder are searched as well (non-recursively, i.e. only the first level of subfolders)")
 30 | 		/*("exclude,E", po::value >(&excludedirs)->composing(),
 31 | 		"specify a directory which files will be not included in the precompiled header (nor its subfolders, recursively)")*/
 32 | 		("excludeheader", po::value >(&input.excludeheaders)->composing(),
 33 | 		"specify a header file that will not be included in the precompiled header, nor it will be processed. This option is case insensitive.")
 34 | 		("excludedir", po::value >(&input.excludedirs)->composing(),
 35 | 		"Specify directories which files will not be added to the precompiled header.")
 36 | 		("excluderegexp", po::value>(&input.excluderegexp)->composing(),
 37 | 		"An ECMAScript regexp defining the files which filename will be not processed. E.g.  moc_.* will allow to exclude Qt moc files, even if they are referenced by a .vcxproj or appear in a folder that was supposed to be processed")
 38 | 		("includeheader", po::value >(&input.includeheaders)->composing(),
 39 | 		"specify a user header that will be included in the precompiled header, even if it was in a user include path. Written without brackets or quotes. E.g. stdio.h")
 40 | 		("sysinclude,S", po::value >(&input.sysincludedirs)->composing(),
 41 | 		"specify an additional system or thirdparty include directory")
 42 | 		("sysincludetree,S", po::value >(&input.sysincludetreedirs)->composing(),
 43 | 		"same as --sysinclude, but the subfolders of the specified folder are searched as well (non-recursively, i.e. only the first level of subfolders). Useful with some frameworks like Qt")
 44 | 		("nesting,n", po::value(&input.nesting)->default_value(0),
 45 | 		"specify maximal include nesting depth (normally should be 0)")
 46 | 		("def,D", po::value>(&input.cxxflags)->composing(),
 47 | 		"macros to be defined. Separated by semicolon E.g. --def _M_X64;_WIN32;WIN32")
 48 | 		("vcxproj", po::value(&input.vcxproj),
 49 | 		"The Visual Studio project file the precompiled header will be generated for. Used to get input file paths, macros, include directories and precompiled header location. "
 50 |         "Note that most of the Visual Studio build macros are not supported. Example of unsupported build macro: $(VSInstallDir). This option is incompatible with --sln")
 51 | 		("sln", po::value(&input.sln),
 52 | 		"Generates precompiled headers for all the projects specified in the solution. Note that most of the Visual Studio build macros are not supported. Example "
 53 |         "of unsupported build macro: $(VSInstallDir). This option is incompatible with --vcxproj")
 54 | 		("configuration", po::value(&input.configuration),
 55 | 		"When --vcxproj is defined, the configuration to read macro definitions from. e.g. Debug|x64")
 56 | 		("pragma", "If specified, #pragma once will be added to the output, instead of the include guards")
 57 | 		("output,o", po::value(&input.outputfile)->default_value("stdafx.h"),
 58 | 		"output file. This option will be ignored if the project file specified via --vcxproj or --sln already specify a precompiled header file")
 59 | 		("singlecore",
 60 | 		"Do not use multiple threads to process the input (applies only if the --sln option was specified)")
 61 | 		("verbose", "Verbose output")
 62 | 		("help,h", "Produces this help")
 63 | 		/*#if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
 64 | 		("noguard,G", "disable include guard detection")
 65 | 		#endif*/
 66 | 		// it may interesting to be able to specify a directory as input from user
 67 | 		// and also to allow an option -r to do it recursively
 68 | 		;
 69 | 
 70 | 	try {
 71 | 		parsed_options parsed = command_line_parser(argc, argv).options(desc_options).run();
 72 | 		store(parsed, vm);
 73 | 	}
 74 | 	catch (std::exception& e) {
 75 | 		cerr << "Error parsing command line: " << e.what() << endl;
 76 | 		exit(EXIT_FAILURE);
 77 | 	}
 78 | 
 79 | 	notify(vm);
 80 | 
 81 | 	if (vm.count("help") > 0) {
 82 | 		stringstream help_stream;
 83 | 
 84 | 		help_stream << "Analyses C / C++ files to generate a precompiled header. The precompiled header will consist of the standard headers that are included in the provided files (or any header included by the files recursively)." << endl;
 85 | 		help_stream << desc_options;
 86 | 		cout << help_stream.str();
 87 | 		exit(EXIT_SUCCESS);
 88 | 	}
 89 | 
 90 | 	for (auto& header : input.excludeheaders) {
 91 | 		strtolower(header);
 92 | 	}
 93 | 
 94 | 	input.verbose = vm.count("verbose") > 0;
 95 | 	input.pragma = vm.count("pragma") > 0;
 96 | 	input.singlecore = vm.count("singlecore") > 0;
 97 | }
 98 | 
 99 | int main(int argc, char** argv)
100 | {
101 | 	ofstream out;
102 | 	ExtractHeadersInput input;
103 | 
104 | 
105 | 	string outputfile;
106 | 
107 | 	readOptions(input, argc, argv);
108 | 
109 | 	if (input.verbose) {
110 | 		cout << "Arguments: " << endl;
111 | 		for (int arg = 0; arg < argc; arg++) {
112 | 			cout << argv[arg] << " ";
113 | 		}
114 | 		cout << endl;
115 | 	}
116 | 
117 | 	if (!input.vcxproj.empty() && !input.sln.empty()) {
118 | 		cerr << "Cannot specify options --vcxproj and --sln at the same time";
119 | 		exit(EXIT_FAILURE);
120 | 	}
121 | 
122 | 	try {
123 | 		if (input.sln.empty()) {
124 | 			ExtractHeaders extractHeaders;
125 | 			ExtractHeadersConsoleOutput output(cerr, cout);
126 | 
127 | 			extractHeaders.run(output, input);
128 | 			extractHeaders.write_stdafx();
129 | 		}
130 | 		else {
131 | 			vector projects;
132 | 			SlnParsing parsing(input.sln.c_str(), cerr);
133 | 			path sln_path(input.sln);
134 | 			path absolute_path = canonical(sln_path).remove_filename();
135 | 			vector> futures;
136 | 			parsing.parse(projects);
137 | 			// prevents cout and cerr flushing text to the console at the same time
138 | 			mutex consoleMutex;
139 | 
140 | 
141 | 			for (auto& project : projects) {
142 | 				make_absolute(project.location, absolute_path);
143 | 				input.vcxproj = project.location;
144 | 				futures.resize(futures.size() + 1);
145 | 
146 | 				futures.back() = async(std::launch::async, [&, input](){
147 | 					stringstream outputStream;
148 | 					stringstream errStream;
149 | 					ExtractHeaders extractHeaders;
150 | 					ExtractHeadersConsoleOutput output(errStream, outputStream);
151 | 
152 | 					extractHeaders.run(output, input);
153 | 					extractHeaders.write_stdafx();
154 | 
155 | 
156 | 					{
157 | 						lock_guard guard(consoleMutex);
158 | 
159 | 						cout << outputStream.str();
160 | 						cerr << errStream.str();
161 | 				    }
162 | 				});
163 | 
164 | 				if (input.singlecore)
165 | 					futures.back().wait();
166 | 			}
167 | 
168 | 			if (!input.singlecore) {
169 | 				for (auto& future : futures) {
170 | 					future.wait();
171 | 				}
172 | 			}
173 | 		}
174 | 	}
175 | 	catch (std::exception& e) {
176 | 		cerr << e.what();
177 | 		exit(EXIT_FAILURE);
178 | 	}
179 | 
180 | 	return EXIT_SUCCESS;
181 | }
182 | 
183 | 


--------------------------------------------------------------------------------
/License.md:
--------------------------------------------------------------------------------
  1 |                    GNU LESSER GENERAL PUBLIC LICENSE
  2 |                        Version 3, 29 June 2007
  3 | 
  4 |  Copyright (C) 2007 Free Software Foundation, Inc. 
  5 |  Everyone is permitted to copy and distribute verbatim copies
  6 |  of this license document, but changing it is not allowed.
  7 | 
  8 | 
  9 |   This version of the GNU Lesser General Public License incorporates
 10 | the terms and conditions of version 3 of the GNU General Public
 11 | License, supplemented by the additional permissions listed below.
 12 | 
 13 |   0. Additional Definitions.
 14 | 
 15 |   As used herein, "this License" refers to version 3 of the GNU Lesser
 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
 17 | General Public License.
 18 | 
 19 |   "The Library" refers to a covered work governed by this License,
 20 | other than an Application or a Combined Work as defined below.
 21 | 
 22 |   An "Application" is any work that makes use of an interface provided
 23 | by the Library, but which is not otherwise based on the Library.
 24 | Defining a subclass of a class defined by the Library is deemed a mode
 25 | of using an interface provided by the Library.
 26 | 
 27 |   A "Combined Work" is a work produced by combining or linking an
 28 | Application with the Library.  The particular version of the Library
 29 | with which the Combined Work was made is also called the "Linked
 30 | Version".
 31 | 
 32 |   The "Minimal Corresponding Source" for a Combined Work means the
 33 | Corresponding Source for the Combined Work, excluding any source code
 34 | for portions of the Combined Work that, considered in isolation, are
 35 | based on the Application, and not on the Linked Version.
 36 | 
 37 |   The "Corresponding Application Code" for a Combined Work means the
 38 | object code and/or source code for the Application, including any data
 39 | and utility programs needed for reproducing the Combined Work from the
 40 | Application, but excluding the System Libraries of the Combined Work.
 41 | 
 42 |   1. Exception to Section 3 of the GNU GPL.
 43 | 
 44 |   You may convey a covered work under sections 3 and 4 of this License
 45 | without being bound by section 3 of the GNU GPL.
 46 | 
 47 |   2. Conveying Modified Versions.
 48 | 
 49 |   If you modify a copy of the Library, and, in your modifications, a
 50 | facility refers to a function or data to be supplied by an Application
 51 | that uses the facility (other than as an argument passed when the
 52 | facility is invoked), then you may convey a copy of the modified
 53 | version:
 54 | 
 55 |    a) under this License, provided that you make a good faith effort to
 56 |    ensure that, in the event an Application does not supply the
 57 |    function or data, the facility still operates, and performs
 58 |    whatever part of its purpose remains meaningful, or
 59 | 
 60 |    b) under the GNU GPL, with none of the additional permissions of
 61 |    this License applicable to that copy.
 62 | 
 63 |   3. Object Code Incorporating Material from Library Header Files.
 64 | 
 65 |   The object code form of an Application may incorporate material from
 66 | a header file that is part of the Library.  You may convey such object
 67 | code under terms of your choice, provided that, if the incorporated
 68 | material is not limited to numerical parameters, data structure
 69 | layouts and accessors, or small macros, inline functions and templates
 70 | (ten or fewer lines in length), you do both of the following:
 71 | 
 72 |    a) Give prominent notice with each copy of the object code that the
 73 |    Library is used in it and that the Library and its use are
 74 |    covered by this License.
 75 | 
 76 |    b) Accompany the object code with a copy of the GNU GPL and this license
 77 |    document.
 78 | 
 79 |   4. Combined Works.
 80 | 
 81 |   You may convey a Combined Work under terms of your choice that,
 82 | taken together, effectively do not restrict modification of the
 83 | portions of the Library contained in the Combined Work and reverse
 84 | engineering for debugging such modifications, if you also do each of
 85 | the following:
 86 | 
 87 |    a) Give prominent notice with each copy of the Combined Work that
 88 |    the Library is used in it and that the Library and its use are
 89 |    covered by this License.
 90 | 
 91 |    b) Accompany the Combined Work with a copy of the GNU GPL and this license
 92 |    document.
 93 | 
 94 |    c) For a Combined Work that displays copyright notices during
 95 |    execution, include the copyright notice for the Library among
 96 |    these notices, as well as a reference directing the user to the
 97 |    copies of the GNU GPL and this license document.
 98 | 
 99 |    d) Do one of the following:
100 | 
101 |        0) Convey the Minimal Corresponding Source under the terms of this
102 |        License, and the Corresponding Application Code in a form
103 |        suitable for, and under terms that permit, the user to
104 |        recombine or relink the Application with a modified version of
105 |        the Linked Version to produce a modified Combined Work, in the
106 |        manner specified by section 6 of the GNU GPL for conveying
107 |        Corresponding Source.
108 | 
109 |        1) Use a suitable shared library mechanism for linking with the
110 |        Library.  A suitable mechanism is one that (a) uses at run time
111 |        a copy of the Library already present on the user's computer
112 |        system, and (b) will operate properly with a modified version
113 |        of the Library that is interface-compatible with the Linked
114 |        Version.
115 | 
116 |    e) Provide Installation Information, but only if you would otherwise
117 |    be required to provide such information under section 6 of the
118 |    GNU GPL, and only to the extent that such information is
119 |    necessary to install and execute a modified version of the
120 |    Combined Work produced by recombining or relinking the
121 |    Application with a modified version of the Linked Version. (If
122 |    you use option 4d0, the Installation Information must accompany
123 |    the Minimal Corresponding Source and Corresponding Application
124 |    Code. If you use option 4d1, you must provide the Installation
125 |    Information in the manner specified by section 6 of the GNU GPL
126 |    for conveying Corresponding Source.)
127 | 
128 |   5. Combined Libraries.
129 | 
130 |   You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 | 
136 |    a) Accompany the combined library with a copy of the same work based
137 |    on the Library, uncombined with any other library facilities,
138 |    conveyed under the terms of this License.
139 | 
140 |    b) Give prominent notice with the combined library that part of it
141 |    is a work based on the Library, and explaining where to find the
142 |    accompanying uncombined form of the same work.
143 | 
144 |   6. Revised Versions of the GNU Lesser General Public License.
145 | 
146 |   The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 | 
151 |   Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 | 
161 |   If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 | 


--------------------------------------------------------------------------------
/tests/readmeexample_test/pct_test/pct_test.vcxproj:
--------------------------------------------------------------------------------
  1 | 
  2 | 
  3 |   
  4 |     
  5 |       Debug
  6 |       Win32
  7 |     
  8 |     
  9 |       Release
 10 |       Win32
 11 |     
 12 |     
 13 |       Debug
 14 |       x64
 15 |     
 16 |     
 17 |       Release
 18 |       x64
 19 |     
 20 |   
 21 |   
 22 |     {2D39115B-68E3-4924-A2D9-0D98BD3EBF07}
 23 |     Win32Proj
 24 |     pct_test
 25 |     8.1
 26 |     readme_example
 27 |   
 28 |   
 29 |   
 30 |     Application
 31 |     true
 32 |     v140
 33 |     Unicode
 34 |   
 35 |   
 36 |     Application
 37 |     false
 38 |     v140
 39 |     true
 40 |     Unicode
 41 |   
 42 |   
 43 |     Application
 44 |     true
 45 |     v140
 46 |     Unicode
 47 |   
 48 |   
 49 |     Application
 50 |     false
 51 |     v140
 52 |     true
 53 |     Unicode
 54 |   
 55 |   
 56 |   
 57 |   
 58 |   
 59 |   
 60 |   
 61 |     
 62 |   
 63 |   
 64 |     
 65 |   
 66 |   
 67 |     
 68 |   
 69 |   
 70 |     
 71 |   
 72 |   
 73 |   
 74 |     true
 75 |   
 76 |   
 77 |     true
 78 |   
 79 |   
 80 |     false
 81 |   
 82 |   
 83 |     false
 84 |   
 85 |   
 86 |     
 87 |       Use
 88 |       Level3
 89 |       Disabled
 90 |       WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
 91 |       true
 92 |       C:\Qt\5.6\msvc2015_64\include
 93 |     
 94 |     
 95 |       Console
 96 |       true
 97 |     
 98 |   
 99 |   
100 |     
101 |       Use
102 |       Level3
103 |       Disabled
104 |       _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
105 |       true
106 |       C:\Qt\5.6\msvc2015_64\include
107 |     
108 |     
109 |       Console
110 |       true
111 |     
112 |   
113 |   
114 |     
115 |       Level3
116 |       Use
117 |       MaxSpeed
118 |       true
119 |       true
120 |       WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
121 |       true
122 |       C:\Qt\5.6\msvc2015_64\include
123 |     
124 |     
125 |       Console
126 |       true
127 |       true
128 |       true
129 |     
130 |   
131 |   
132 |     
133 |       Level3
134 |       Use
135 |       MaxSpeed
136 |       true
137 |       true
138 |       NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
139 |       true
140 |       C:\Qt\5.6\msvc2015_64\include
141 |     
142 |     
143 |       Console
144 |       true
145 |       true
146 |       true
147 |     
148 |   
149 |   
150 |     
151 |   
152 |   
153 |     
154 |     
155 |   
156 |   
157 |     
158 |     
159 |       Create
160 |       Create
161 |       Create
162 |       Create
163 |     
164 |   
165 |   
166 |   
167 |   
168 | 


--------------------------------------------------------------------------------
/extractheaders/vsparsing.cpp:
--------------------------------------------------------------------------------
  1 | #include "vsparsing.h"
  2 | #include 
  3 | #include 
  4 | #include 
  5 | #include 
  6 | #include 
  7 | #include 
  8 | #include 
  9 | 
 10 | 
 11 | using namespace tinyxml2;
 12 | using namespace boost::filesystem;
 13 | using namespace std;
 14 | 
 15 | VcxprojParsing::VcxprojParsing(const char* path,
 16 | 	                           std::ostream& errStream)
 17 | 	: errorStream(errStream),
 18 | 	  filepath(path)
 19 | {
 20 | 
 21 | 	if (doc.LoadFile(path) != XMLError::XML_SUCCESS)
 22 | 		throw runtime_error(string("Cannot open: ") + path + ": " + doc.ErrorName());
 23 | 
 24 | 	filepath = boost::filesystem::path(path);
 25 | 
 26 | }
 27 | 
 28 | void VcxprojParsing::replaceEnvVars(string& paths)
 29 | {
 30 | 	// both %MYVAR% or $(MYVAR) syntaxes would be expanded as environment
 31 | 	// variables in .vcxproj
 32 | 	regex rgxDollar("\\$\\((.+?)\\)");
 33 | 	regex rgxPercentage("%(.+?)%");
 34 | 	smatch match;
 35 | 	string remaining;
 36 | 
 37 | 	remaining = paths;
 38 | 	paths.clear();
 39 | 
 40 | 	while (regex_search(remaining,
 41 | 		                match,
 42 | 		                rgxDollar)) {
 43 | 		const char* envvarvalue = getenv(match[1].str().c_str());
 44 | 		string completeMatch = match[0].str();
 45 | 
 46 | 		paths += match.prefix().str() +
 47 | 			     (envvarvalue ? envvarvalue : completeMatch.c_str());
 48 | 		remaining = match.suffix().str();
 49 | 
 50 | 		if (!envvarvalue && completeMatch != "$(Configuration)")
 51 | 			errorStream << "Error: Variable not set: " << completeMatch << "\n";
 52 | 	}
 53 | 
 54 | 	if (!remaining.empty())
 55 | 		paths += remaining;
 56 | 
 57 | 	remaining = paths;
 58 | 	paths.clear();
 59 | 
 60 | 	while (regex_search(remaining,
 61 | 		                match,
 62 | 		                rgxPercentage)) {
 63 | 		const char* envvarvalue = getenv(match[1].str().c_str());
 64 | 		string completeMatch = match[0].str();
 65 | 
 66 | 		paths += match.prefix().str() +
 67 | 			(envvarvalue ? envvarvalue : completeMatch.c_str());
 68 | 		remaining = match.suffix().str();
 69 | 
 70 | 		if (!envvarvalue)
 71 | 			errorStream << "Environment variable not set: " << completeMatch << "\n";
 72 | 	}
 73 | 
 74 | 	if (!remaining.empty())
 75 | 		paths += remaining;
 76 | 
 77 | }
 78 | 
 79 | void VcxprojParsing::parse(vector& configurations,
 80 | 	                       vector& files)
 81 | {
 82 | 	if (filepath.extension().string() == ".vcproj")
 83 | 		return parseLegacy(configurations, files);
 84 | 	else {
 85 | 		XMLElement* project = project = doc.FirstChildElement("Project");
 86 | 
 87 | 		if (project) {
 88 | 			XMLElement* itemGroup = project->FirstChildElement("ItemGroup");
 89 | 			XMLElement* itemDefinitionGroup = project->FirstChildElement("ItemDefinitionGroup");
 90 | 
 91 | 			while (itemGroup) {
 92 | 				const char* labelItemGroup;
 93 | 				XMLElement* clCompile;
 94 | 
 95 | 				if ((labelItemGroup = itemGroup->Attribute("Label")) && !strcmp(labelItemGroup, "ProjectConfigurations")) {
 96 | 					XMLElement* projectConfiguration = itemGroup->FirstChildElement("ProjectConfiguration");
 97 | 
 98 | 					while (projectConfiguration) {
 99 | 						const char* label = projectConfiguration->Attribute("Include");
100 | 						const char* configurationName = projectConfiguration->FirstChildElement("Configuration")->GetText();
101 | 
102 | 						configurations.push_back({ label, configurationName });
103 | 						projectConfiguration = projectConfiguration->NextSiblingElement("ProjectConfiguration");
104 | 					}
105 | 				}
106 | 
107 | 				clCompile = itemGroup->FirstChildElement("ClCompile");
108 | 
109 | 				while (clCompile) {
110 | 					files.push_back(clCompile->Attribute("Include"));
111 | 					clCompile = clCompile->NextSiblingElement("ClCompile");
112 | 				}
113 | 
114 | 				itemGroup = itemGroup->NextSiblingElement("ItemGroup");
115 | 			}
116 | 
117 | 			while (itemDefinitionGroup) {
118 | 				for (auto& configuration : configurations) {
119 | 					const char* label = itemDefinitionGroup->Attribute("Condition");
120 | 
121 | 					if (label == "'$(Configuration)|$(Platform)'=='" + configuration.name + "'") {
122 | 						XMLElement* clCompile = itemDefinitionGroup->FirstChildElement("ClCompile");
123 | 						XMLElement* definitions = clCompile ? clCompile->FirstChildElement("PreprocessorDefinitions") : NULL;
124 | 						XMLElement* includeDirs = clCompile ? clCompile->FirstChildElement("AdditionalIncludeDirectories") : NULL;
125 | 						XMLElement* precompiledHeaderFile = clCompile ? clCompile->FirstChildElement("PrecompiledHeaderFile") : NULL;
126 | 
127 | 						if (definitions && definitions->FirstChild()) {
128 | 							configuration.definitions = definitions->FirstChild()->ToText()->Value();
129 | 							replaceEnvVars(configuration.definitions);
130 | 
131 | 							// replace things like %(PreprocessorDefinitions) which extract headers cannot understand
132 | 							configuration.definitions = regex_replace(configuration.definitions, regex("%\\(.*\\)"), string(""));
133 | 						}
134 | 
135 | 						if (includeDirs && includeDirs->FirstChild()) {
136 | 							configuration.additionalIncludeDirectories = includeDirs->FirstChild()->ToText()->Value();
137 | 							replaceEnvVars(configuration.additionalIncludeDirectories);
138 | 						}
139 | 
140 | 						if (precompiledHeaderFile && precompiledHeaderFile->FirstChild()) {
141 | 							configuration.precompiledHeaderFile = precompiledHeaderFile->FirstChild()->ToText()->Value();
142 | 							replaceEnvVars(configuration.precompiledHeaderFile);
143 | 						}
144 | 
145 | 					}
146 | 					itemDefinitionGroup = itemDefinitionGroup->NextSiblingElement("ItemDefinitionGroup");
147 | 				}
148 | 			}
149 | 		}
150 | 	}
151 | }
152 | 
153 | void VcxprojParsing::parseLegacy(vector& configurations,
154 | 	                             vector& files)
155 | {
156 | 	XMLElement* project = doc.FirstChildElement("VisualStudioProject");
157 | 
158 | 	if (project) {
159 | 		XMLElement* projectconfigurations = project->FirstChildElement("Configurations");
160 | 		XMLElement* configurationelement = projectconfigurations->FirstChildElement("Configuration");
161 | 		const char* label = configurationelement->Attribute("Name");
162 | 		std::vector results;
163 | 		boost::algorithm::split(results, label, boost::is_any_of(","));
164 | 		ProjectConfiguration configuration = { label, results.empty() ? "" : results[0] };
165 | 
166 | 		XMLElement* clCompile = configurationelement->FirstChildElement("Tool");
167 | 		while (clCompile) {
168 | 			const char* label = clCompile->Attribute("Name");
169 | 			if (label && !strcmp(label, "VCCLCompilerTool")) {
170 | 				const char * attr = clCompile->Attribute("PreprocessorDefinitions");
171 | 				if (attr) {
172 | 					configuration.definitions = attr;
173 | 					replaceEnvVars(configuration.definitions);
174 | 
175 | 					// replace things like %(PreprocessorDefinitions) which extract headers cannot understand
176 | 					configuration.definitions = regex_replace(configuration.definitions, regex("%\\(.*\\)"), string(""));
177 | 				}
178 | 
179 | 				attr = clCompile->Attribute("AdditionalIncludeDirectories");
180 | 				if (attr) {
181 | 					configuration.additionalIncludeDirectories = attr;
182 | 					replaceEnvVars(configuration.additionalIncludeDirectories);
183 | 				}
184 | 
185 | 				attr = clCompile->Attribute("PrecompiledHeaderThrough");
186 | 				if (attr) {
187 | 					configuration.precompiledHeaderFile = attr;
188 | 					if (configuration.precompiledHeaderFile.length() >= 2
189 | 						&& configuration.precompiledHeaderFile[0] == '"'
190 | 						&& configuration.precompiledHeaderFile[configuration.precompiledHeaderFile.length() - 1] == '"') {
191 | 						configuration.precompiledHeaderFile = configuration.precompiledHeaderFile.substr(1, configuration.precompiledHeaderFile.length() - 2);
192 | 					}
193 | 					replaceEnvVars(configuration.precompiledHeaderFile);
194 | 				}
195 | 			}
196 | 			clCompile = clCompile->NextSiblingElement("Tool");
197 | 		}
198 | 
199 | 		configurationelement = configurationelement->NextSiblingElement("Configuration");
200 | 		configurations.push_back(configuration);
201 | 
202 | 		XMLElement* fileselement = project->FirstChildElement("Files");
203 | 		if (fileselement) {
204 | 			XMLElement* filter = fileselement->FirstChildElement("Filter");
205 | 			while (filter) {
206 | 				XMLElement* file = filter->FirstChildElement("File");
207 | 				while (file) {
208 | 					files.push_back(file->Attribute("RelativePath"));
209 | 					file = file->NextSiblingElement("File");
210 | 				}
211 | 				filter = filter->NextSiblingElement("Filter");
212 | 			}
213 | 		}
214 | 	}
215 | }
216 | 
217 | SlnParsing::SlnParsing(const char* path, std::ostream& errStream)
218 | 	: errorStream(errStream)
219 | {
220 | 	std::ifstream file(path);
221 | 	string line;
222 | 
223 | 	while (getline(file, line)) {
224 | 		if (!line.empty())
225 | 			fileContents.push_back(line);
226 | 	}
227 | }
228 | 
229 | void SlnParsing::parse(std::vector& projects)
230 | {
231 | 		for (auto& line : fileContents) {
232 | 			regex rgx(R"%(Project\("\{.?.?.?.?.?.?.?.?-.?.?.?.?-.?.?.?.?-.?.?.?.?-.?.?.?.?.?.?.?.?.?.?.?.?\}"\)\s*=\s*"(.*)"\s*,\s*"(.*)"\s*,\s*"\{.?.?.?.?.?.?.?.?-.?.?.?.?-.?.?.?.?-.?.?.?.?-.?.?.?.?.?.?.?.?.?.?.?.?\}\s*")%");
233 | 			smatch match;
234 | 
235 | 			regex_search(line, match, rgx);
236 | 
237 | 			if (!match.empty() && match.length() >= 2) {
238 | 				Project project;
239 | 
240 | 				project.name = match[1];
241 | 				project.location = match[2];
242 | 				projects.push_back(project);
243 | 			}
244 | 		}
245 | }
246 | 
247 | 
248 | 
249 | 


--------------------------------------------------------------------------------
/extractheaderscmd/extractheaders.vcxproj:
--------------------------------------------------------------------------------
  1 | 
  2 | 
  3 |   
  4 |     
  5 |       Release
  6 |       x64
  7 |     
  8 |     
  9 |       Debug
 10 |       x64
 11 |     
 12 |   
 13 |   
 14 |     {CF72E5A8-AE38-3B6A-A553-55FC7FBECCA9}
 15 |     extractheaders
 16 |     Qt4VSv1.0
 17 |   
 18 |   
 19 |   
 20 |     v140
 21 |     release\
 22 |     false
 23 |     NotSet
 24 |     Application
 25 |     release\
 26 |     extractheaders
 27 |   
 28 |   
 29 |     v140
 30 |     debug\
 31 |     false
 32 |     NotSet
 33 |     Application
 34 |     debug\
 35 |     extractheaders
 36 |   
 37 |   
 38 |   
 39 |   
 40 |     
 41 |   
 42 |   
 43 |     
 44 |   
 45 |   
 46 |   
 47 |     release\
 48 |     release\
 49 |     extractheaders
 50 |     true
 51 |     false
 52 |     debug\
 53 |     debug\
 54 |     extractheaders
 55 |     true
 56 |   
 57 |   
 58 |     
 59 |       .;$(BOOST_HOME);..\extractheaders;release;%(AdditionalIncludeDirectories)
 60 |       -Zc:strictStrings -w34100 -w34189 -w44996 %(AdditionalOptions)
 61 |       release\
 62 |       false
 63 |       None
 64 |       Sync
 65 |       true
 66 |       release\
 67 |       MaxSpeed
 68 |       _CONSOLE;UNICODE;WIN32;WIN64;NDEBUG;%(PreprocessorDefinitions)
 69 |       false
 70 |       
 71 |       
 72 |       MultiThreadedDLL
 73 |       true
 74 |       true
 75 |       true
 76 |       Level3
 77 |       Use
 78 |       stdafx.h
 79 |     
 80 |     
 81 |       "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)
 82 |       extractheaderslib.lib;%(AdditionalDependencies)
 83 |       $(BOOST_LIB);..\extractheaders\release;%(AdditionalLibraryDirectories)
 84 |       true
 85 |       false
 86 |       true
 87 |       false
 88 |       $(OutDir)\extractheaders.exe
 89 |       true
 90 |       Console
 91 |       true
 92 |     
 93 |     
 94 |       Unsigned
 95 |       None
 96 |       0
 97 |     
 98 |     
 99 |       _CONSOLE;UNICODE;WIN32;WIN64;QT_NO_DEBUG;QT_GUI_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)
100 |     
101 |   
102 |   
103 |     
104 |       .;$(BOOST_HOME);..\extractheaders;debug;%(AdditionalIncludeDirectories)
105 |       -w34100 -w34189 -w44996 %(AdditionalOptions)
106 |       debug\
107 |       false
108 |       ProgramDatabase
109 |       Sync
110 |       true
111 |       debug\
112 |       Disabled
113 |       _CONSOLE;UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)
114 |       false
115 |       MultiThreadedDebugDLL
116 |       true
117 |       true
118 |       true
119 |       Level3
120 |       Use
121 |       stdafx.h
122 |     
123 |     
124 |       "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)
125 |       ..\extractheaders\debug\extractheaderslib.lib;%(AdditionalDependencies)
126 |       $(BOOST_LIB);..\extractheaders\debug;%(AdditionalLibraryDirectories)
127 |       true
128 |       true
129 |       true
130 |       $(OutDir)\extractheaders.exe
131 |       true
132 |       Console
133 |       true
134 |     
135 |     
136 |       Unsigned
137 |       None
138 |       0
139 |     
140 |     
141 |       _CONSOLE;UNICODE;WIN32;WIN64;QT_GUI_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)
142 |     
143 |   
144 |   
145 |     
146 |     
147 |       Create
148 |       Create
149 |     
150 |   
151 |   
152 |     
153 |   
154 |   
155 |   
156 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/INSTALL:
--------------------------------------------------------------------------------
  1 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
  2 | Foundation, Inc.
  3 | 
  4 |    This file is free documentation; the Free Software Foundation gives
  5 | unlimited permission to copy, distribute and modify it.
  6 | 
  7 | Basic Installation
  8 | ==================
  9 | 
 10 |    These are generic installation instructions.
 11 | 
 12 |    The `configure' shell script attempts to guess correct values for
 13 | various system-dependent variables used during compilation.  It uses
 14 | those values to create a `Makefile' in each directory of the package.
 15 | It may also create one or more `.h' files containing system-dependent
 16 | definitions.  Finally, it creates a shell script `config.status' that
 17 | you can run in the future to recreate the current configuration, and a
 18 | file `config.log' containing compiler output (useful mainly for
 19 | debugging `configure').
 20 | 
 21 |    It can also use an optional file (typically called `config.cache'
 22 | and enabled with `--cache-file=config.cache' or simply `-C') that saves
 23 | the results of its tests to speed up reconfiguring.  (Caching is
 24 | disabled by default to prevent problems with accidental use of stale
 25 | cache files.)
 26 | 
 27 |    If you need to do unusual things to compile the package, please try
 28 | to figure out how `configure' could check whether to do them, and mail
 29 | diffs or instructions to the address given in the `README' so they can
 30 | be considered for the next release.  If you are using the cache, and at
 31 | some point `config.cache' contains results you don't want to keep, you
 32 | may remove or edit it.
 33 | 
 34 |    The file `configure.ac' (or `configure.in') is used to create
 35 | `configure' by a program called `autoconf'.  You only need
 36 | `configure.ac' if you want to change it or regenerate `configure' using
 37 | a newer version of `autoconf'.
 38 | 
 39 | The simplest way to compile this package is:
 40 | 
 41 |   1. `cd' to the directory containing the package's source code and type
 42 |      `./configure' to configure the package for your system.  If you're
 43 |      using `csh' on an old version of System V, you might need to type
 44 |      `sh ./configure' instead to prevent `csh' from trying to execute
 45 |      `configure' itself.
 46 | 
 47 |      Running `configure' takes awhile.  While running, it prints some
 48 |      messages telling which features it is checking for.
 49 | 
 50 |   2. Type `make' to compile the package.
 51 | 
 52 |   3. Optionally, type `make check' to run any self-tests that come with
 53 |      the package.
 54 | 
 55 |   4. Type `make install' to install the programs and any data files and
 56 |      documentation.
 57 | 
 58 |   5. You can remove the program binaries and object files from the
 59 |      source code directory by typing `make clean'.  To also remove the
 60 |      files that `configure' created (so you can compile the package for
 61 |      a different kind of computer), type `make distclean'.  There is
 62 |      also a `make maintainer-clean' target, but that is intended mainly
 63 |      for the package's developers.  If you use it, you may have to get
 64 |      all sorts of other programs in order to regenerate files that came
 65 |      with the distribution.
 66 | 
 67 | Compilers and Options
 68 | =====================
 69 | 
 70 |    Some systems require unusual options for compilation or linking that
 71 | the `configure' script does not know about.  Run `./configure --help'
 72 | for details on some of the pertinent environment variables.
 73 | 
 74 |    You can give `configure' initial values for configuration parameters
 75 | by setting variables in the command line or in the environment.  Here
 76 | is an example:
 77 | 
 78 |      ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
 79 | 
 80 |    *Note Defining Variables::, for more details.
 81 | 
 82 | Compiling For Multiple Architectures
 83 | ====================================
 84 | 
 85 |    You can compile the package for more than one kind of computer at the
 86 | same time, by placing the object files for each architecture in their
 87 | own directory.  To do this, you must use a version of `make' that
 88 | supports the `VPATH' variable, such as GNU `make'.  `cd' to the
 89 | directory where you want the object files and executables to go and run
 90 | the `configure' script.  `configure' automatically checks for the
 91 | source code in the directory that `configure' is in and in `..'.
 92 | 
 93 |    If you have to use a `make' that does not support the `VPATH'
 94 | variable, you have to compile the package for one architecture at a
 95 | time in the source code directory.  After you have installed the
 96 | package for one architecture, use `make distclean' before reconfiguring
 97 | for another architecture.
 98 | 
 99 | Installation Names
100 | ==================
101 | 
102 |    By default, `make install' will install the package's files in
103 | `/usr/local/bin', `/usr/local/man', etc.  You can specify an
104 | installation prefix other than `/usr/local' by giving `configure' the
105 | option `--prefix=PATH'.
106 | 
107 |    You can specify separate installation prefixes for
108 | architecture-specific files and architecture-independent files.  If you
109 | give `configure' the option `--exec-prefix=PATH', the package will use
110 | PATH as the prefix for installing programs and libraries.
111 | Documentation and other data files will still use the regular prefix.
112 | 
113 |    In addition, if you use an unusual directory layout you can give
114 | options like `--bindir=PATH' to specify different values for particular
115 | kinds of files.  Run `configure --help' for a list of the directories
116 | you can set and what kinds of files go in them.
117 | 
118 |    If the package supports it, you can cause programs to be installed
119 | with an extra prefix or suffix on their names by giving `configure' the
120 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
121 | 
122 | Optional Features
123 | =================
124 | 
125 |    Some packages pay attention to `--enable-FEATURE' options to
126 | `configure', where FEATURE indicates an optional part of the package.
127 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE
128 | is something like `gnu-as' or `x' (for the X Window System).  The
129 | `README' should mention any `--enable-' and `--with-' options that the
130 | package recognizes.
131 | 
132 |    For packages that use the X Window System, `configure' can usually
133 | find the X include and library files automatically, but if it doesn't,
134 | you can use the `configure' options `--x-includes=DIR' and
135 | `--x-libraries=DIR' to specify their locations.
136 | 
137 | Specifying the System Type
138 | ==========================
139 | 
140 |    There may be some features `configure' cannot figure out
141 | automatically, but needs to determine by the type of machine the package
142 | will run on.  Usually, assuming the package is built to be run on the
143 | _same_ architectures, `configure' can figure that out, but if it prints
144 | a message saying it cannot guess the machine type, give it the
145 | `--build=TYPE' option.  TYPE can either be a short name for the system
146 | type, such as `sun4', or a canonical name which has the form:
147 | 
148 |      CPU-COMPANY-SYSTEM
149 | 
150 | where SYSTEM can have one of these forms:
151 | 
152 |      OS KERNEL-OS
153 | 
154 |    See the file `config.sub' for the possible values of each field.  If
155 | `config.sub' isn't included in this package, then this package doesn't
156 | need to know the machine type.
157 | 
158 |    If you are _building_ compiler tools for cross-compiling, you should
159 | use the `--target=TYPE' option to select the type of system they will
160 | produce code for.
161 | 
162 |    If you want to _use_ a cross compiler, that generates code for a
163 | platform different from the build platform, you should specify the
164 | "host" platform (i.e., that on which the generated programs will
165 | eventually be run) with `--host=TYPE'.
166 | 
167 | Sharing Defaults
168 | ================
169 | 
170 |    If you want to set default values for `configure' scripts to share,
171 | you can create a site shell script called `config.site' that gives
172 | default values for variables like `CC', `cache_file', and `prefix'.
173 | `configure' looks for `PREFIX/share/config.site' if it exists, then
174 | `PREFIX/etc/config.site' if it exists.  Or, you can set the
175 | `CONFIG_SITE' environment variable to the location of the site script.
176 | A warning: not all `configure' scripts look for a site script.
177 | 
178 | Defining Variables
179 | ==================
180 | 
181 |    Variables not defined in a site shell script can be set in the
182 | environment passed to `configure'.  However, some packages may run
183 | configure again during the build, and the customized values of these
184 | variables may be lost.  In order to avoid this problem, you should set
185 | them in the `configure' command line, using `VAR=value'.  For example:
186 | 
187 |      ./configure CC=/usr/local2/bin/gcc
188 | 
189 | will cause the specified gcc to be used as the C compiler (unless it is
190 | overridden in the site shell script).
191 | 
192 | `configure' Invocation
193 | ======================
194 | 
195 |    `configure' recognizes the following options to control how it
196 | operates.
197 | 
198 | `--help'
199 | `-h'
200 |      Print a summary of the options to `configure', and exit.
201 | 
202 | `--version'
203 | `-V'
204 |      Print the version of Autoconf used to generate the `configure'
205 |      script, and exit.
206 | 
207 | `--cache-file=FILE'
208 |      Enable the cache: use and save the results of the tests in FILE,
209 |      traditionally `config.cache'.  FILE defaults to `/dev/null' to
210 |      disable caching.
211 | 
212 | `--config-cache'
213 | `-C'
214 |      Alias for `--cache-file=config.cache'.
215 | 
216 | `--quiet'
217 | `--silent'
218 | `-q'
219 |      Do not print messages saying which checks are being made.  To
220 |      suppress all normal output, redirect it to `/dev/null' (any error
221 |      messages will still be shown).
222 | 
223 | `--srcdir=DIR'
224 |      Look for the package's source code in directory DIR.  Usually
225 |      `configure' can determine that directory automatically.
226 | 
227 | `configure' also accepts some other, not widely useful, options.  Run
228 | `configure --help' for more details.
229 | 
230 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/NEWS:
--------------------------------------------------------------------------------
  1 | Version 2.8.7 contains no user-visible changes.
  2 | 
  3 | User-visible changes in version 2.8.6:
  4 | 
  5 | * New diff3 option --strip-trailing-cr.
  6 | 
  7 | * With -N and -P, inaccessible empty regular files (the kind of files
  8 |   that 'patch' creates to indicate nonexistent backups) are now
  9 |   treated as nonexistent when they are in the 'backup' file position.
 10 | 
 11 | * If multiple SKIP values are given to cmp, e.g., `cmp -i 10 -i 20',
 12 |   cmp now uses the maximal value instead of the last one.
 13 | 
 14 | * diff now omits the ".000000000" on hosts that do not support
 15 |   fractional time stamps.
 16 | 
 17 | Version 2.8.5 was not publicly released.
 18 | 
 19 | User-visible changes in version 2.8.4:
 20 | 
 21 | * Diff now simply prints "Files A and B differ" instead of "Binary
 22 |   files A and B differ".  The message is output if either A or B
 23 |   appears to be a binary file, and the old wording was misleading
 24 |   because it implied that both files are binary, which is not
 25 |   necessarily the case.
 26 | 
 27 | User-visible changes in version 2.8.3:
 28 | 
 29 | * New locale: en_US.
 30 | 
 31 | User-visible changes in version 2.8.2:
 32 | 
 33 | * New diff and sdiff option:
 34 |   --tabsize=COLUMNS
 35 | * If --ignore-space-change or --ignore-all-space is also specified,
 36 |   --ignore-blank-lines now considers lines to be empty if they contain
 37 |   only white space.
 38 | * More platforms now handle multibyte characters correctly when
 39 |   excluding files by name (diff -x and -X).
 40 | * New locales: hu, pt_BR.
 41 | 
 42 | User-visible changes in version 2.8.1:
 43 | 
 44 | * Documentation fixes.
 45 | 
 46 | User-visible changes in version 2.8:
 47 | 
 48 | * cmp and diff now conform to POSIX 1003.1-2001 (IEEE Std 1003.1-2001)
 49 |   if the underlying system conforms to POSIX and if the _POSIX2_VERSION
 50 |   environment variable is set to 200112.  Conformance removes support
 51 |   for `diff -NUM', where NUM is a number.  Use -C NUM or -U NUM instead.
 52 | * cmp now supports trailing operands SKIP1 and SKIP2, like BSD cmp.
 53 | * cmp -i or --ignore-initial now accepts SKIP1:SKIP2 option value.
 54 | * New cmp option: -n or --bytes.
 55 | * cmp's old -c or --print-chars option has been renamed;
 56 |   use -b or --print-bytes instead.
 57 | * cmp now outputs "byte" rather than "char" outside the POSIX locale.
 58 | * cmp -l's index column width now adjusts to fit larger (or smaller) files.
 59 | * cmp -l -s and cmp -s -l are not allowed.  Use cmp -s or cmp -l instead.
 60 | * diff uses ISO 8601 style time stamps for output times (e.g. "2001-11-23
 61 |   16:44:36.875702460 -0800") unless in the C or POSIX locale and the
 62 |   -c style is specified.
 63 | * diff's -I and -F options use the regexp syntax of grep, not of Emacs.
 64 | * diff now accepts multiple context arguments, and uses their maximum value.
 65 | * New diff and sdiff options:
 66 |   -E  --ignore-tab-expansion
 67 |   --strip-trailing-cr
 68 | * New diff options:
 69 |   --from-file=FILE, --to-file=FILE
 70 |   --ignore-file-name-case
 71 |   --no-ignore-file-name-case
 72 | * New diff3 and sdiff option:
 73 |   --diff-program=PROGRAM
 74 | * The following diff options are still accepted, but are no longer documented.
 75 |   They may be withdrawn in future releases.
 76 |   -h (omit; it has no effect)
 77 |   -H (use --speed-large-files instead)
 78 |   -L (use --label instead)
 79 |   -P (use --unidirectional-new-file instead)
 80 |   --inhibit-hunk-merge (omit; it has no effect)
 81 | * Recursive diffs now sort file names according to the LC_COLLATE locale
 82 |   category if possible, instead of using native byte comparison.
 83 | * Recursive diffs now detect and report directory loops.
 84 | * Diff printf specs can now use the "0" and "'" flags.
 85 | * The new sdiff interactive command `ed' precedes each version with a header.
 86 | * On 64-bit hosts, files larger than 2 GB can be compared.
 87 | * Some internationalization support has been added, but multibyte locales
 88 |   are still not completely supported yet.
 89 | * Some diagnostics have been reworded slightly for consistency.
 90 |   Also, `diff -D FOO' now outputs `/* ! FOO */' instead of `/* not FOO */'.
 91 | * The `patch' part of the manual now describes `patch' version 2.5.4.
 92 | * Man pages are now distributed and installed.
 93 | * There is support for DJGPP; see the 'ms' subdirectory and the files
 94 |   m4/dos.m4 and */setmode.*.
 95 | 
 96 | 
 97 | User-visible changes in version 2.7:
 98 | 
 99 | * New diff option: --binary (useful only on non-POSIX hosts)
100 | * diff -b and -w now ignore line incompleteness; -B no longer does this.
101 | * cmp -c now uses locale to decide which output characters to quote.
102 | * Help and version messages are reorganized.
103 | 
104 | 
105 | User-visible changes in version 2.6:
106 | 
107 | * New cmp, diff, diff3, sdiff option: --help
108 | * A new heuristic for diff greatly reduces the time needed to compare
109 |   large input files that contain many differences.
110 | * Partly as a result, GNU diff's output is not exactly the same as before.
111 |   Usually it is a bit smaller, but sometimes it is a bit larger.
112 | 
113 | 
114 | User-visible changes in version 2.5:
115 | 
116 | * New cmp option: -v --version
117 | 
118 | 
119 | User-visible changes in version 2.4:
120 | 
121 | * New cmp option: --ignore-initial=BYTES
122 | * New diff3 option: -T --initial-tab
123 | * New diff option: --line-format=FORMAT
124 | * New diff group format specifications:
125 |   [eflmnEFLMN]
126 |       A printf spec followed by one of the following letters
127 |       causes the integer corresponding to that letter to be
128 |       printed according to the printf specification.
129 |       E.g. `%5df' prints the number of the first line in the
130 |       group in the old file using the "%5d" format.
131 | 	e: line number just before the group in old file; equals f - 1
132 | 	f: first line number in group in the old file
133 | 	l: last line number in group in the old file
134 | 	m: line number just after the group in old file; equals l + 1
135 | 	n: number of lines in group in the old file; equals l - f + 1
136 | 	E, F, L, M, N: likewise, for lines in the new file
137 |   %(A=B?T:E)
138 |       If A equals B then T else E.  A and B are each either a decimal
139 |       constant or a single letter interpreted as above.  T and E are
140 |       arbitrary format strings.  This format spec is equivalent to T if
141 |       A's value equals B's; otherwise it is equivalent to E.  For
142 |       example, `%(N=0?no:%dN) line%(N=1?:s)' is equivalent to `no lines'
143 |       if N (the number of lines in the group in the the new file) is 0,
144 |       to `1 line' if N is 1, and to `%dN lines' otherwise.
145 |   %c'C'
146 |       where C is a single character, stands for the character C.  C may not
147 |       be a backslash or an apostrophe.  E.g. %c':' stands for a colon.
148 |   %c'\O'
149 |       where O is a string of 1, 2, or 3 octal digits, stands for the
150 |       character with octal code O.  E.g. %c'\0' stands for a null character.
151 | * New diff line format specifications:
152 |   n
153 |       The line number, printed with .
154 |       E.g. `%5dn' prints the line number with a "%5d" format.
155 |   %c'C'
156 |   %c'\O'
157 |       The character C, or with octal code O, as above.
158 | * Supported s have the same meaning as with printf, but must
159 |   match the extended regular expression %-*[0-9]*(\.[0-9]*)?[doxX].
160 | * The format spec %0 introduced in version 2.1 has been removed, since it
161 |   is incompatible with printf specs like %02d.  To represent a null char,
162 |   use %c'\0' instead.
163 | * cmp and diff now conform to POSIX 1003.2-1992 (ISO/IEC 9945-2:1993)
164 |   if the underlying system conforms to POSIX:
165 |   - Some messages' wordings are changed in minor ways.
166 |   - ``White space'' is now whatever C's `isspace' says it is.
167 |   - When comparing directories, if `diff' finds a file that is not a regular
168 |     file or a directory, it reports the file's type instead of diffing it.
169 |     (As usual, it follows symbolic links first.)
170 |   - When signaled, sdiff exits with the signal's status, not with status 2.
171 | * Now portable to hosts where int, long, pointer, etc. are not all the same
172 |   size.
173 | * `cmp - -' now works like `diff - -'.
174 | 
175 | 
176 | User-visible changes in version 2.3:
177 | 
178 | * New diff option: --horizon-lines=lines
179 | 
180 | 
181 | User-visible changes in version 2.1:
182 | 
183 | * New diff options:
184 |   --{old,new,unchanged}-line-format='format'
185 |   --{old,new,unchanged,changed}-group-format='format'
186 |   -U
187 | * New diff3 option:
188 |   -A --show-all
189 | * diff3 -m now defaults to -A, not -E.
190 | * diff3 now takes up to three -L or --label options, not just two.
191 |   If just two options are given, they refer to the first two input files,
192 |   not the first and third input files.
193 | * sdiff and diff -y handle incomplete lines.
194 | 
195 | 
196 | User-visible changes in version 2.0:
197 | 
198 | * Add sdiff and cmp programs.
199 | * Add Texinfo documentation.
200 | * Add configure script.
201 | * Improve diff performance.
202 | * New diff options:
203 | -x --exclude
204 | -X --exclude-from
205 | -P --unidirectional-new-file
206 | -W --width
207 | -y --side-by-side
208 | --left-column
209 | --sdiff-merge-assist
210 | --suppress-common-lines
211 | * diff options renamed:
212 | --label renamed from --file-label
213 | --forward-ed renamed from --reversed-ed
214 | --paginate renamed from --print
215 | --entire-new-file renamed from --entire-new-files
216 | --new-file renamed from --new-files
217 | --all-text removed
218 | * New diff3 options:
219 | -v --version
220 | * Add long-named equivalents for other diff3 options.
221 | * diff options -F (--show-function-line) and -I (--ignore-matching-lines)
222 |   can now be given more than once.
223 | 
224 | 
225 | 
226 | Copyright (C) 1993, 1994, 1998, 2001, 2002, 2004 Free Software
227 | Foundation, Inc.
228 | 
229 | This file is part of GNU Diffutils.
230 | 
231 | This program is free software; you can redistribute it and/or modify
232 | it under the terms of the GNU General Public License as published by
233 | the Free Software Foundation; either version 2, or (at your option)
234 | any later version.
235 | 
236 | This program is distributed in the hope that they will be useful,
237 | but WITHOUT ANY WARRANTY; without even the implied warranty of
238 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
239 | GNU General Public License for more details.
240 | 
241 | You should have received a copy of the GNU General Public License
242 | along with this program; see the file COPYING.  If not, write to
243 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
244 | Boston, MA 02111-1307, USA.
245 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/COPYING:
--------------------------------------------------------------------------------
  1 | 		    GNU GENERAL PUBLIC LICENSE
  2 | 		       Version 2, June 1991
  3 | 
  4 |  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  5 |      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  6 |  Everyone is permitted to copy and distribute verbatim copies
  7 |  of this license document, but changing it is not allowed.
  8 | 
  9 | 			    Preamble
 10 | 
 11 |   The licenses for most software are designed to take away your
 12 | freedom to share and change it.  By contrast, the GNU General Public
 13 | License is intended to guarantee your freedom to share and change free
 14 | software--to make sure the software is free for all its users.  This
 15 | General Public License applies to most of the Free Software
 16 | Foundation's software and to any other program whose authors commit to
 17 | using it.  (Some other Free Software Foundation software is covered by
 18 | the GNU Library General Public License instead.)  You can apply it to
 19 | your programs, too.
 20 | 
 21 |   When we speak of free software, we are referring to freedom, not
 22 | price.  Our General Public Licenses are designed to make sure that you
 23 | have the freedom to distribute copies of free software (and charge for
 24 | this service if you wish), that you receive source code or can get it
 25 | if you want it, that you can change the software or use pieces of it
 26 | in new free programs; and that you know you can do these things.
 27 | 
 28 |   To protect your rights, we need to make restrictions that forbid
 29 | anyone to deny you these rights or to ask you to surrender the rights.
 30 | These restrictions translate to certain responsibilities for you if you
 31 | distribute copies of the software, or if you modify it.
 32 | 
 33 |   For example, if you distribute copies of such a program, whether
 34 | gratis or for a fee, you must give the recipients all the rights that
 35 | you have.  You must make sure that they, too, receive or can get the
 36 | source code.  And you must show them these terms so they know their
 37 | rights.
 38 | 
 39 |   We protect your rights with two steps: (1) copyright the software, and
 40 | (2) offer you this license which gives you legal permission to copy,
 41 | distribute and/or modify the software.
 42 | 
 43 |   Also, for each author's protection and ours, we want to make certain
 44 | that everyone understands that there is no warranty for this free
 45 | software.  If the software is modified by someone else and passed on, we
 46 | want its recipients to know that what they have is not the original, so
 47 | that any problems introduced by others will not reflect on the original
 48 | authors' reputations.
 49 | 
 50 |   Finally, any free program is threatened constantly by software
 51 | patents.  We wish to avoid the danger that redistributors of a free
 52 | program will individually obtain patent licenses, in effect making the
 53 | program proprietary.  To prevent this, we have made it clear that any
 54 | patent must be licensed for everyone's free use or not licensed at all.
 55 | 
 56 |   The precise terms and conditions for copying, distribution and
 57 | modification follow.
 58 | 
 59 | 		    GNU GENERAL PUBLIC LICENSE
 60 |    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 61 | 
 62 |   0. This License applies to any program or other work which contains
 63 | a notice placed by the copyright holder saying it may be distributed
 64 | under the terms of this General Public License.  The "Program", below,
 65 | refers to any such program or work, and a "work based on the Program"
 66 | means either the Program or any derivative work under copyright law:
 67 | that is to say, a work containing the Program or a portion of it,
 68 | either verbatim or with modifications and/or translated into another
 69 | language.  (Hereinafter, translation is included without limitation in
 70 | the term "modification".)  Each licensee is addressed as "you".
 71 | 
 72 | Activities other than copying, distribution and modification are not
 73 | covered by this License; they are outside its scope.  The act of
 74 | running the Program is not restricted, and the output from the Program
 75 | is covered only if its contents constitute a work based on the
 76 | Program (independent of having been made by running the Program).
 77 | Whether that is true depends on what the Program does.
 78 | 
 79 |   1. You may copy and distribute verbatim copies of the Program's
 80 | source code as you receive it, in any medium, provided that you
 81 | conspicuously and appropriately publish on each copy an appropriate
 82 | copyright notice and disclaimer of warranty; keep intact all the
 83 | notices that refer to this License and to the absence of any warranty;
 84 | and give any other recipients of the Program a copy of this License
 85 | along with the Program.
 86 | 
 87 | You may charge a fee for the physical act of transferring a copy, and
 88 | you may at your option offer warranty protection in exchange for a fee.
 89 | 
 90 |   2. You may modify your copy or copies of the Program or any portion
 91 | of it, thus forming a work based on the Program, and copy and
 92 | distribute such modifications or work under the terms of Section 1
 93 | above, provided that you also meet all of these conditions:
 94 | 
 95 |     a) You must cause the modified files to carry prominent notices
 96 |     stating that you changed the files and the date of any change.
 97 | 
 98 |     b) You must cause any work that you distribute or publish, that in
 99 |     whole or in part contains or is derived from the Program or any
100 |     part thereof, to be licensed as a whole at no charge to all third
101 |     parties under the terms of this License.
102 | 
103 |     c) If the modified program normally reads commands interactively
104 |     when run, you must cause it, when started running for such
105 |     interactive use in the most ordinary way, to print or display an
106 |     announcement including an appropriate copyright notice and a
107 |     notice that there is no warranty (or else, saying that you provide
108 |     a warranty) and that users may redistribute the program under
109 |     these conditions, and telling the user how to view a copy of this
110 |     License.  (Exception: if the Program itself is interactive but
111 |     does not normally print such an announcement, your work based on
112 |     the Program is not required to print an announcement.)
113 | 
114 | These requirements apply to the modified work as a whole.  If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works.  But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 | 
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 | 
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 | 
134 |   3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 | 
138 |     a) Accompany it with the complete corresponding machine-readable
139 |     source code, which must be distributed under the terms of Sections
140 |     1 and 2 above on a medium customarily used for software interchange; or,
141 | 
142 |     b) Accompany it with a written offer, valid for at least three
143 |     years, to give any third party, for a charge no more than your
144 |     cost of physically performing source distribution, a complete
145 |     machine-readable copy of the corresponding source code, to be
146 |     distributed under the terms of Sections 1 and 2 above on a medium
147 |     customarily used for software interchange; or,
148 | 
149 |     c) Accompany it with the information you received as to the offer
150 |     to distribute corresponding source code.  (This alternative is
151 |     allowed only for noncommercial distribution and only if you
152 |     received the program in object code or executable form with such
153 |     an offer, in accord with Subsection b above.)
154 | 
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it.  For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable.  However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 | 
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 | 
172 |   4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License.  Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 | 
180 |   5. You are not required to accept this License, since you have not
181 | signed it.  However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works.  These actions are
183 | prohibited by law if you do not accept this License.  Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 | 
189 |   6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions.  You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 | 
197 |   7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License.  If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all.  For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 | 
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 | 
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices.  Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 | 
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 | 
229 |   8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded.  In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 | 
237 |   9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time.  Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 | 
242 | Each version is given a distinguishing version number.  If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation.  If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 | 
250 |   10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission.  For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this.  Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 | 
258 | 			    NO WARRANTY
259 | 
260 |   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 | 
270 |   12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 | 
280 | 		     END OF TERMS AND CONDITIONS
281 | 
282 | 	    How to Apply These Terms to Your New Programs
283 | 
284 |   If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 | 
288 |   To do so, attach the following notices to the program.  It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 | 
293 |     
294 |     Copyright (C)   
295 | 
296 |     This program is free software; you can redistribute it and/or modify
297 |     it under the terms of the GNU General Public License as published by
298 |     the Free Software Foundation; either version 2 of the License, or
299 |     (at your option) any later version.
300 | 
301 |     This program is distributed in the hope that it will be useful,
302 |     but WITHOUT ANY WARRANTY; without even the implied warranty of
303 |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
304 |     GNU General Public License for more details.
305 | 
306 |     You should have received a copy of the GNU General Public License
307 |     along with this program; if not, write to the Free Software
308 |     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
309 | 
310 | 
311 | Also add information on how to contact you by electronic and paper mail.
312 | 
313 | If the program is interactive, make it output a short notice like this
314 | when it starts in an interactive mode:
315 | 
316 |     Gnomovision version 69, Copyright (C) year  name of author
317 |     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 |     This is free software, and you are welcome to redistribute it
319 |     under certain conditions; type `show c' for details.
320 | 
321 | The hypothetical commands `show w' and `show c' should show the appropriate
322 | parts of the General Public License.  Of course, the commands you use may
323 | be called something other than `show w' and `show c'; they could even be
324 | mouse-clicks or menu items--whatever suits your program.
325 | 
326 | You should also get your employer (if you work as a programmer) or your
327 | school, if any, to sign a "copyright disclaimer" for the program, if
328 | necessary.  Here is a sample; alter the names:
329 | 
330 |   Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 |   `Gnomovision' (which makes passes at compilers) written by James Hacker.
332 | 
333 |   , 1 April 1989
334 |   Ty Coon, President of Vice
335 | 
336 | This General Public License does not permit incorporating your program into
337 | proprietary programs.  If your program is a subroutine library, you may
338 | consider it more useful to permit linking proprietary applications with the
339 | library.  If this is what you want to do, use the GNU Library General
340 | Public License instead of this License.
341 | 


--------------------------------------------------------------------------------
/extractheaders/extractheaders.cpp:
--------------------------------------------------------------------------------
  1 | #include "extractheaders.h"
  2 | 
  3 | #include "vsparsing.h"
  4 | #include 
  5 | #include 
  6 | #include 
  7 | #include 
  8 | #include 
  9 | #include 
 10 | #include 
 11 | #include 
 12 | #include 
 13 | #include 
 14 | #include 
 15 | #include 
 16 | #include 
 17 | #include 
 18 | #include 
 19 | using namespace std;
 20 | using namespace boost;
 21 | using namespace wave;
 22 | using namespace boost::wave;
 23 | 
 24 | using namespace boost::filesystem;
 25 | 
 26 | typedef boost::wave::cpplexer::lex_token<> token_type;
 27 | 
 28 | typedef boost::wave::cpplexer::lex_iterator lexer_type;
 29 | 
 30 | 
 31 | 
 32 | template 
 33 | class find_includes_hooks
 34 | 	: public boost::wave::context_policies::eat_whitespace
 35 | {
 36 | public:
 37 | 	template 
 38 | 	void
 39 | 		opened_include_file(Context const& ctx, std::string relname,
 40 | 		std::string absname, bool is_system_include)
 41 | 	{
 42 | 		path file_path(relname);
 43 | 		string filename = strtolower(string(file_path.filename().string()));
 44 | 
 45 | 		if (find(impl->input.includeheaders.begin(), impl->input.includeheaders.end(), relname) != impl->input.includeheaders.end())
 46 | 			impl->systemheaders.insert(relname);
 47 | 		else {
 48 | 			if (find(impl->input.excludeheaders.begin(), impl->input.excludeheaders.end(), filename) == impl->input.excludeheaders.end()) {
 49 | 				if (!is_system_include)
 50 | 					impl->userheadersqueue.push(boost::filesystem::canonical(absname));
 51 | 				else
 52 | 					if (!subpath(impl->input.excludedirs, absname))
 53 | 						impl->systemheaders.insert(relname);
 54 | 			}
 55 | 		}
 56 | 	}
 57 | 
 58 | 	template 
 59 | 	void
 60 | 		detected_include_guard(Context const& ctx, std::string const& filename,
 61 | 		std::string const& include_guard)
 62 | 	{
 63 | 	}
 64 | 
 65 | 	template 
 66 | 	bool found_include_directive(Context const& ctx,
 67 | 		std::string const &filename, bool include_next)
 68 | 	{
 69 | 		impl->output.headersfound.push_back(filename);
 70 | 		return false;
 71 | 	}
 72 | 
 73 | 	ExtractHeadersImpl* impl = NULL;
 74 | };
 75 | 
 76 | typedef boost::wave::context<
 77 | 	std::string::const_iterator, lexer_type,
 78 | 	boost::wave::iteration_context_policies::load_file_to_string,
 79 | 	find_includes_hooks > context_type;
 80 | 
 81 | 
 82 | class ExtractHeadersImpl {
 83 | public:
 84 | 	ExtractHeadersImpl(ExtractHeadersConsoleOutput& out, const ExtractHeadersInput& in);
 85 | 	void process_file(const path& filename);
 86 | 	void add_macro_definitions(context_type& context, const std::string& cxx_flags);
 87 | 	void add_system_includes(context_type& ctx);
 88 | 	void add_user_includes(context_type& ctx, const boost::filesystem::path& filename);
 89 | 	void write_stdafx();
 90 | 	void run();
 91 | 
 92 | 	queue userheadersqueue;
 93 | 	set headersprocessed;
 94 | 	set includedirs;
 95 | 	set sysincludedirs;
 96 | 	// system or thirdparty headers
 97 | 	set systemheaders;
 98 | 
 99 | 	const ExtractHeadersInput& originalInput;
100 | 	// same as originalInput but some parameters may contain more information E.g.
101 | 	// input.inputs may get some elements from the .vcxproj
102 | 	ExtractHeadersInput input;
103 | 	ExtractHeadersConsoleOutput& output;
104 | };
105 | 
106 | 
107 | ExtractHeaders::~ExtractHeaders()
108 | {
109 | }
110 | 
111 | bool iscplusplusfile(path filepath)
112 | {
113 | 	const char* extensions[] =
114 | 	{ ".cpp",
115 | 	".cxx",
116 | 	".c",
117 | 	".cc",
118 | 	NULL
119 | 	};
120 | 	const string file_ext = filepath.extension().string();
121 | 	unsigned int pos = 0;
122 | 
123 | 	while (extensions[pos]) {
124 | 		if (file_ext == extensions[pos])
125 | 			return true;
126 | 
127 | 		pos++;
128 | 	}
129 | 
130 | 	return false;
131 | }
132 | 
133 | // gets all files in a dir (non-recursively)
134 | vector getAllFilesInDir(const char* dir)
135 | {
136 | 	path path(dir);
137 | 	directory_iterator end_iter;
138 | 	vector result;
139 | 
140 | 	if (exists(path) && is_directory(path))
141 | 	{
142 | 		for (directory_iterator dir_iter(path); dir_iter != end_iter; ++dir_iter)
143 | 		{
144 | 			if (is_regular_file(dir_iter->status()) &&
145 | 				iscplusplusfile(dir_iter->path()))
146 | 				result.push_back(dir_iter->path().string());
147 | 		}
148 | 	}
149 | 
150 | 	return result;
151 | }
152 | 
153 | // gets all dirs in a dir (non-recursively)
154 | vector getAllDirsInDir(const char* dir)
155 | {
156 | 	path path(dir);
157 | 	directory_iterator end_iter;
158 | 	vector result;
159 | 
160 | 	if (exists(path) && is_directory(path))
161 | 	{
162 | 		for (directory_iterator dir_iter(path); dir_iter != end_iter; ++dir_iter)
163 | 		{
164 | 			if (is_directory(dir_iter->status()))
165 | 				result.push_back(dir_iter->path().string());
166 | 		}
167 | 	}
168 | 
169 | 	return result;
170 | }
171 | 
172 | void make_absolute(string& oldpath, const path& dir)
173 | {
174 | 
175 | 	path newpath(oldpath.c_str());
176 | 
177 | 	if (!newpath.is_absolute()) {
178 | 		try {
179 | 			newpath = boost::filesystem::absolute(newpath, dir);
180 | 			oldpath = newpath.string();
181 | 		}
182 | 		catch (std::exception& e) {
183 | 			// TODO ghc log this error somehow?
184 | 		}
185 | 	}
186 | }
187 | 
188 | 
189 | bool subpath(const vector paths, const string& path)
190 | {
191 | 	vector::const_iterator path_it = paths.begin();
192 | 	boost::filesystem::path canonical_path = boost::filesystem::canonical(path);
193 | 
194 | 	while (path_it != paths.end()) {
195 | 		boost::filesystem::path exclude_path = boost::filesystem::canonical(*path_it);
196 | 
197 | 		if (canonical_path.string().find(exclude_path.string()) != string::npos)
198 | 			return true;
199 | 
200 | 		path_it++;
201 | 	}
202 | 
203 | 	return false;
204 | }
205 | 
206 | string trim(string& str)
207 | {
208 | 	size_t first = str.find_first_not_of(' ');
209 | 	size_t last = str.find_last_not_of(' ');
210 | 
211 | 	return str.substr(first, (last - first + 1));
212 | }
213 | 
214 | 
215 | 
216 | ExtractHeaders::ExtractHeaders()
217 | 
218 | {
219 | }
220 | 
221 | ExtractHeadersImpl::ExtractHeadersImpl(ExtractHeadersConsoleOutput& out, const ExtractHeadersInput& in) :
222 |     originalInput(in),
223 | 	input(in),
224 | 	output(out)
225 | {
226 | 
227 | }
228 | 
229 | void ExtractHeaders::write_stdafx()
230 | {
231 | 	assert(impl && "run has not been called yet");
232 | 	impl->write_stdafx();
233 | }
234 | 
235 | void ExtractHeaders::run(ExtractHeadersConsoleOutput& output, const ExtractHeadersInput& input)
236 | {
237 | 	impl.reset(new ExtractHeadersImpl(output, input));
238 | 	try {
239 | 		impl->run();
240 | 	}
241 | 	catch (std::exception& e) {
242 | 		output.errorStream << e.what() << endl;
243 | 	}
244 | }
245 | 
246 | void ExtractHeadersImpl::add_macro_definitions(context_type& context, const string& cxx_flags)
247 | {
248 | 	string definition;
249 | 
250 | 	if (!cxx_flags.empty()) {
251 | 		for (auto elem : cxx_flags) {
252 | 			if (elem == ';') {
253 | 				context.add_macro_definition(definition, false);
254 | 				definition.clear();
255 | 			}
256 | 			else
257 | 				definition += elem;
258 | 		}
259 | 
260 | 		context.add_macro_definition(definition, false);
261 | 	}
262 | }
263 | 
264 | 
265 | void ExtractHeadersImpl::add_system_includes(context_type& ctx)
266 | {
267 | 
268 | 	for (auto& sysdir : input.sysincludetreedirs) {
269 | 
270 | 		sysincludedirs.insert(sysdir);
271 | 
272 | 		if (is_directory(sysdir)) {
273 | 			vector dirs = getAllDirsInDir(sysdir.c_str());
274 | 
275 | 			for (auto& dir : dirs) {
276 | 
277 | 				sysincludedirs.insert(dir);
278 | 			}
279 | 		}
280 | 	}
281 | 
282 | 	for (auto dir : sysincludedirs)  {
283 | 		ctx.add_sysinclude_path(dir.c_str());
284 | 	}
285 | }
286 | 
287 | void ExtractHeadersImpl::add_user_includes(context_type& ctx, const path& filename)
288 | {
289 | 	path filepath(filename);
290 | 
291 | 	for (auto& userdir : input.includetreedirs) {
292 | 
293 | 		includedirs.insert(boost::filesystem::canonical(userdir));
294 | 
295 | 		if (is_directory(userdir)) {
296 | 			vector dirs = getAllDirsInDir(userdir.c_str());
297 | 
298 | 			for (auto& dir : dirs) {
299 | 
300 | 				includedirs.insert(boost::filesystem::canonical(dir));
301 | 			}
302 | 		}
303 | 	}
304 | 
305 | 	for (auto dir : includedirs)  {
306 | 		ctx.add_include_path(dir.string().c_str());
307 | 	}
308 | 
309 | 	ctx.add_include_path(filepath.remove_filename().string().c_str());
310 | }
311 | 
312 | void ExtractHeadersImpl::process_file(const path& filename)
313 | {
314 | 	//  create the wave::context object and initialize it from the file to
315 | 	//  preprocess (may contain options inside of special comments)
316 | 
317 | 	std::ifstream instream(filename.string().c_str());
318 | 	string instr;
319 | 	context_type::iterator_type it;
320 | 	context_type::iterator_type end;
321 | 	bool is_end = false;
322 | 	string cxxflagsstr;
323 | 	find_includes_hooks  hooks;
324 | 
325 | 
326 | 	hooks.impl = this;
327 | 	instream.unsetf(std::ios::skipws);
328 | 	instr = std::string(std::istreambuf_iterator(instream.rdbuf()),
329 | 		std::istreambuf_iterator());
330 | 
331 | 	if (input.verbose)
332 | 		output.infoStream << "Preprocessing input file: " << filename.generic_string()
333 | 		<< "..." << std::endl;
334 | 
335 | 	context_type ctx(instr.begin(),
336 | 		instr.end(),
337 | 		filename.string().c_str(),
338 | 		hooks);
339 | 
340 | 	ctx.set_language(language_support(support_cpp11 |
341 | 		support_option_variadics |
342 | 		support_option_long_long |
343 | 		support_option_include_guard_detection
344 | 		));
345 | 	// it is best not to go too deep, headers like  on windows
346 | 	// give problems with boost wave
347 | 	ctx.set_max_include_nesting_depth(input.nesting);
348 | 
349 | 	for (auto def : input.cxxflags) {
350 | 
351 | 		if (def.back() == ';')
352 | 			def.resize(def.size() - 1);
353 | 
354 | 		if (cxxflagsstr.empty())
355 | 			cxxflagsstr += def;
356 | 		else
357 | 			cxxflagsstr += ";" + def;
358 | 	}
359 | 
360 | 	add_macro_definitions(ctx, cxxflagsstr);
361 | 
362 | 	for (const auto& includeDir : input.includedirsIn)
363 | 	{
364 | 		if (boost::filesystem::exists(includeDir))
365 | 			includedirs.insert(boost::filesystem::canonical(includeDir));
366 | 	}
367 | 
368 | 	for (const auto& includeDir : input.sysincludedirs)
369 | 	{
370 | 		sysincludedirs.insert(includeDir);
371 | 	}
372 | 
373 | 	input.excludeheaders.push_back("stdafx.h");
374 | 	input.excludeheaders.push_back("stdafx.cpp");
375 | 	input.excludeheaders.push_back(input.outputfile);
376 |     add_system_includes(ctx);
377 |     add_user_includes(ctx, filename);
378 | 
379 | 	//  preprocess the input, loop over all generated tokens collecting the
380 | 	//  generated text
381 | 	it = ctx.begin();
382 | 	end = ctx.end();
383 | 
384 | 	// perform actual preprocessing
385 | 	do
386 | 	{
387 | 		using namespace boost::wave;
388 | 
389 | 		try {
390 | 			++it;
391 | 			// operator == could also throw an exception
392 | 			is_end = it == end;
393 | 		}
394 | 		catch (boost::wave::cpplexer::lexing_exception const& e) {
395 | 
396 | 			std::string filename = e.file_name();
397 | 			output.errorStream
398 | 				<< filename << "(" << e.line_no() << "): "
399 | 				<< "Lexical error: " << e.description() << std::endl;
400 | 			break;
401 | 		}
402 | 		catch (boost::wave::cpp_exception const& e) {
403 | 			if (e.get_errorcode() != preprocess_exception::include_nesting_too_deep) {
404 | 				std::string filename = e.file_name();
405 | 				output.errorStream
406 | 					<< filename << "(" << e.line_no() << "): "
407 | 					<< e.description() << std::endl;
408 | 			}
409 | 		}
410 | 	} while (!is_end);
411 | }
412 | 
413 | void ExtractHeadersImpl::write_stdafx()
414 | {
415 | 	path outputpath(input.outputfile);
416 | 	string guardname = outputpath.filename().string();
417 | 	size_t dotpos = guardname.find_first_of(".");
418 | 	std::ofstream outputStream;
419 | 
420 |     outputStream = std::ofstream(input.outputfile);
421 | 	guardname = guardname.substr(0, dotpos);
422 | 
423 | 	for (auto & c : guardname)
424 | 		c = toupper(c);
425 | 
426 | 	if (!outputStream.is_open()) {
427 | 		cerr << "Cannot open: " << input.outputfile;
428 | 		exit(EXIT_FAILURE);
429 | 	}
430 | 
431 | 	outputStream << "/* Machine generated code */\n\n";
432 | 
433 | 	if (input.pragma)
434 | 		outputStream << "#pragma once\n\n";
435 | 	else {
436 | 		outputStream << "#ifndef " + guardname + "_H\n";
437 | 		outputStream << "#define " + guardname + "_H\n";
438 | 	}
439 | 
440 | 
441 | 	for (const auto& header : systemheaders) {
442 | 		string headername = header.filename().string();
443 | 		auto header_it = output.headersfound.begin();
444 | 
445 | 		while (header_it != output.headersfound.end()) {
446 | 			regex rg = regex(".*\\b" + headername + "\\b.*");
447 | 
448 | 			if (regex_match(*header_it, rg)) {
449 | 				string trimmed_headername = trim(*header_it);
450 | 
451 | 				if (trimmed_headername.size() >= 2 &&
452 | 					(trimmed_headername)[0] == '"' &&
453 | 					trimmed_headername[trimmed_headername.size() - 1] == '"') {
454 | 					string unquoted = trimmed_headername;
455 | 
456 | 					unquoted.erase(0, 1);
457 | 					unquoted.resize(unquoted.size() - 1);
458 | 
459 | 					if (find(input.includeheaders.begin(), input.includeheaders.end(), unquoted) == input.includeheaders.end())
460 | 						break;
461 | 				}
462 | 
463 | 				outputStream << "#include " << *header_it << "\n";
464 | 				output.headersfound.erase(header_it);
465 | 				break;
466 | 
467 | 			}
468 | 			header_it++;
469 | 		}
470 | 	}
471 | 
472 | 	if (!input.pragma)
473 | 		outputStream << "#endif\n";
474 | 
475 | 	output.infoStream << "Precompiled header generated at: " << canonical(input.outputfile).string() << endl;
476 | }
477 | 
478 | // splits a semicolon-separated list of words and returns a vector
479 | void splitInput(vector& elems, const string& inputstr)
480 | {
481 | 	string elem;
482 | 
483 | 	if (!inputstr.empty()) {
484 | 		for (auto character : inputstr) {
485 | 			if (character == ';') {
486 | 				elems.push_back(elem);
487 | 				elem.clear();
488 | 			}
489 | 			else
490 | 				elem += character;
491 | 		}
492 | 
493 | 		elems.push_back(elem);
494 | 	}
495 | }
496 | 
497 | 
498 | // @throws runtime_error if an input path does no exist
499 | void ExtractHeadersImpl::run()
500 | {
501 | 	if (!input.vcxproj.empty()) {
502 | 		try {
503 | 			VcxprojParsing parser(input.vcxproj.c_str(), output.errorStream);
504 | 			vector configurations;
505 | 			vector::iterator configuration_it;
506 | 			vector files;
507 | 			string definitions;
508 | 			string additionalIncludeDirectories;
509 | 			string precompiledHeaderFile;
510 | 			string configurationName;
511 | 			path vcxproj_dir = canonical(path(input.vcxproj).remove_filename());
512 | 
513 | 			parser.parse(configurations, files);
514 | 
515 | 			if (configurations.empty())
516 | 				throw runtime_error("File: " + input.vcxproj + " contains no configurations");
517 | 
518 | 			// if the user did not define the configuration to get the macros and include directories from,
519 | 			// we just choose the first one
520 | 			definitions = configurations[0].definitions;
521 | 			additionalIncludeDirectories = configurations[0].additionalIncludeDirectories;
522 | 			precompiledHeaderFile = configurations[0].precompiledHeaderFile;
523 | 			configuration_it = configurations.begin();
524 | 
525 | 			while (configuration_it != configurations.end()) {
526 | 
527 | 				if (configuration_it->name == input.configuration) {
528 | 					definitions = configuration_it->definitions;
529 | 					additionalIncludeDirectories = configuration_it->additionalIncludeDirectories;
530 | 					precompiledHeaderFile = configuration_it->precompiledHeaderFile;
531 | 					configurationName = configuration_it->configuration;
532 | 				}
533 | 
534 | 				configuration_it++;
535 | 			}
536 | 
537 | 			if (!definitions.empty())
538 | 				input.cxxflags.push_back(definitions);
539 | 
540 | 			for (auto file : files) {
541 | 				boost::replace_all(file, "$(Configuration)", configurationName);
542 | 				make_absolute(file, vcxproj_dir);
543 | 				input.inputs.push_back(file);
544 | 			}
545 | 
546 | 			if (!additionalIncludeDirectories.empty()) {
547 | 				vector directories;
548 | 
549 | 				splitInput(directories, additionalIncludeDirectories);
550 | 
551 | 				for (auto dir : directories) {
552 | 					boost::replace_all(dir, "$(Configuration)", configurationName);
553 | 
554 | 					// because we do not which ones are system include
555 | 					// directories and which are user include dirs, we
556 | 					// add what we find in the vcxproj to both
557 | 					make_absolute(dir, vcxproj_dir);
558 | 					input.includedirsIn.push_back(dir);
559 | 					input.sysincludedirs.push_back(dir);
560 | 				}
561 | 
562 | 			}
563 | 
564 | 			if (!precompiledHeaderFile.empty()) {
565 | 				make_absolute(precompiledHeaderFile, vcxproj_dir);
566 | 				input.outputfile = precompiledHeaderFile;
567 | 			}
568 | 
569 | 			make_absolute(input.outputfile, vcxproj_dir);
570 | 
571 | 		} catch (runtime_error& ex) {
572 | 			throw runtime_error(string("Cannot parse: ") + input.vcxproj + ": " + ex.what());
573 | 		}
574 | 	}
575 | 
576 | 	for (auto& input : input.inputs) {
577 | 		vector inputList;
578 | 		splitInput(inputList, input);
579 | 
580 | 		for (auto& input_path : inputList) {
581 | 
582 | 			if (is_directory(input_path)) {
583 | 				vector files = getAllFilesInDir(input_path.c_str());
584 | 
585 | 				for (auto& file : files) {
586 | 					userheadersqueue.push(boost::filesystem::canonical(file));
587 | 				}
588 | 			}
589 | 			else if (!exists(input_path))
590 | 				output.errorStream << "Cannot find: " << input_path << "\n";
591 | 			else
592 | 				userheadersqueue.push(boost::filesystem::canonical(input_path));
593 | 		}
594 | 	}
595 | 
596 | 	if (!input.vcxproj.empty()) {
597 | 		output.infoStream << endl;
598 | 		output.infoStream << "********************************************************************************" << endl;
599 | 		output.infoStream << "Generating precompiled header for " << input.vcxproj << endl;
600 | 	}
601 | 	output.infoStream << "Processing " << userheadersqueue.size() << " reported includes" << endl;
602 | 
603 | 	while (!userheadersqueue.empty()) {
604 | 		path header = userheadersqueue.front();
605 | 
606 | 
607 | 		if (headersprocessed.count(header) == 0) {
608 | 			auto regexp_it = input.excluderegexp.begin();
609 | 			bool match = false;
610 |             regex excluderegexp;
611 | 
612 |             if (regexp_it != input.excluderegexp.end())
613 |                 excluderegexp = regex(*regexp_it);
614 | 
615 | 			while (regexp_it != input.excluderegexp.end() &&
616 | 				   !(match = regex_match(header.filename().string(), excluderegexp))) {
617 | 				regexp_it++;
618 | 			}
619 | 
620 | 			if (!match && find(input.excludeheaders.begin(), input.excludeheaders.end(), header.filename().string()) == input.excludeheaders.end())
621 | 			   process_file(header);
622 | 
623 | 			headersprocessed.insert(header);
624 | 		}
625 | 
626 | 		userheadersqueue.pop();
627 | 	}
628 | }
629 | 
630 | std::string& strtolower(std::string& str)
631 | {
632 | 	transform(str.begin(), str.end(), str.begin(), ::tolower);
633 | 
634 | 	return str;
635 | }
636 | 


--------------------------------------------------------------------------------
/tests/diffutils/contrib/diffutils/2.8.7/diffutils-2.8.7-src/ABOUT-NLS:
--------------------------------------------------------------------------------
  1 | Notes on the Free Translation Project
  2 | *************************************
  3 | 
  4 | Free software is going international!  The Free Translation Project is
  5 | a way to get maintainers of free software, translators, and users all
  6 | together, so that will gradually become able to speak many languages.
  7 | A few packages already provide translations for their messages.
  8 | 
  9 |    If you found this `ABOUT-NLS' file inside a distribution, you may
 10 | assume that the distributed package does use GNU `gettext' internally,
 11 | itself available at your nearest GNU archive site.  But you do _not_
 12 | need to install GNU `gettext' prior to configuring, installing or using
 13 | this package with messages translated.
 14 | 
 15 |    Installers will find here some useful hints.  These notes also
 16 | explain how users should proceed for getting the programs to use the
 17 | available translations.  They tell how people wanting to contribute and
 18 | work at translations should contact the appropriate team.
 19 | 
 20 |    When reporting bugs in the `intl/' directory or bugs which may be
 21 | related to internationalization, you should tell about the version of
 22 | `gettext' which is used.  The information can be found in the
 23 | `intl/VERSION' file, in internationalized packages.
 24 | 
 25 | Quick configuration advice
 26 | ==========================
 27 | 
 28 | If you want to exploit the full power of internationalization, you
 29 | should configure it using
 30 | 
 31 |      ./configure --with-included-gettext
 32 | 
 33 | to force usage of internationalizing routines provided within this
 34 | package, despite the existence of internationalizing capabilities in the
 35 | operating system where this package is being installed.  So far, only
 36 | the `gettext' implementation in the GNU C library version 2 provides as
 37 | many features (such as locale alias, message inheritance, automatic
 38 | charset conversion or plural form handling) as the implementation here.
 39 | It is also not possible to offer this additional functionality on top
 40 | of a `catgets' implementation.  Future versions of GNU `gettext' will
 41 | very likely convey even more functionality.  So it might be a good idea
 42 | to change to GNU `gettext' as soon as possible.
 43 | 
 44 |    So you need _not_ provide this option if you are using GNU libc 2 or
 45 | you have installed a recent copy of the GNU gettext package with the
 46 | included `libintl'.
 47 | 
 48 | INSTALL Matters
 49 | ===============
 50 | 
 51 | Some packages are "localizable" when properly installed; the programs
 52 | they contain can be made to speak your own native language.  Most such
 53 | packages use GNU `gettext'.  Other packages have their own ways to
 54 | internationalization, predating GNU `gettext'.
 55 | 
 56 |    By default, this package will be installed to allow translation of
 57 | messages.  It will automatically detect whether the system already
 58 | provides the GNU `gettext' functions.  If not, the GNU `gettext' own
 59 | library will be used.  This library is wholly contained within this
 60 | package, usually in the `intl/' subdirectory, so prior installation of
 61 | the GNU `gettext' package is _not_ required.  Installers may use
 62 | special options at configuration time for changing the default
 63 | behaviour.  The commands:
 64 | 
 65 |      ./configure --with-included-gettext
 66 |      ./configure --disable-nls
 67 | 
 68 | will respectively bypass any pre-existing `gettext' to use the
 69 | internationalizing routines provided within this package, or else,
 70 | _totally_ disable translation of messages.
 71 | 
 72 |    When you already have GNU `gettext' installed on your system and run
 73 | configure without an option for your new package, `configure' will
 74 | probably detect the previously built and installed `libintl.a' file and
 75 | will decide to use this.  This might be not what is desirable.  You
 76 | should use the more recent version of the GNU `gettext' library.  I.e.
 77 | if the file `intl/VERSION' shows that the library which comes with this
 78 | package is more recent, you should use
 79 | 
 80 |      ./configure --with-included-gettext
 81 | 
 82 | to prevent auto-detection.
 83 | 
 84 |    The configuration process will not test for the `catgets' function
 85 | and therefore it will not be used.  The reason is that even an
 86 | emulation of `gettext' on top of `catgets' could not provide all the
 87 | extensions of the GNU `gettext' library.
 88 | 
 89 |    Internationalized packages have usually many `po/LL.po' files, where
 90 | LL gives an ISO 639 two-letter code identifying the language.  Unless
 91 | translations have been forbidden at `configure' time by using the
 92 | `--disable-nls' switch, all available translations are installed
 93 | together with the package.  However, the environment variable `LINGUAS'
 94 | may be set, prior to configuration, to limit the installed set.
 95 | `LINGUAS' should then contain a space separated list of two-letter
 96 | codes, stating which languages are allowed.
 97 | 
 98 | Using This Package
 99 | ==================
100 | 
101 | As a user, if your language has been installed for this package, you
102 | only have to set the `LANG' environment variable to the appropriate
103 | `LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
104 | and `CC' is an ISO 3166 two-letter country code.  For example, let's
105 | suppose that you speak German and live in Germany.  At the shell
106 | prompt, merely execute `setenv LANG de_DE' (in `csh'),
107 | `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
108 | This can be done from your `.login' or `.profile' file, once and for
109 | all.
110 | 
111 |    You might think that the country code specification is redundant.
112 | But in fact, some languages have dialects in different countries.  For
113 | example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
114 | country code serves to distinguish the dialects.
115 | 
116 |    The locale naming convention of `LL_CC', with `LL' denoting the
117 | language and `CC' denoting the country, is the one use on systems based
118 | on GNU libc.  On other systems, some variations of this scheme are
119 | used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
120 | locales supported by your system for your country by running the command
121 | `locale -a | grep '^LL''.
122 | 
123 |    Not all programs have translations for all languages.  By default, an
124 | English message is shown in place of a nonexistent translation.  If you
125 | understand other languages, you can set up a priority list of languages.
126 | This is done through a different environment variable, called
127 | `LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
128 | for the purpose of message handling, but you still need to have `LANG'
129 | set to the primary language; this is required by other parts of the
130 | system libraries.  For example, some Swedish users who would rather
131 | read translations in German than English for when Swedish is not
132 | available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
133 | 
134 |    Special advice for Norwegian users: The language code for Norwegian
135 | bokma*l changed from `no' to `nb' recently (in 2003).  During the
136 | transition period, while some message catalogs for this language are
137 | installed under `nb' and some older ones under `no', it's recommended
138 | for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
139 | older translations are used.
140 | 
141 |    In the `LANGUAGE' environment variable, but not in the `LANG'
142 | environment variable, `LL_CC' combinations can be abbreviated as `LL'
143 | to denote the language's main dialect.  For example, `de' is equivalent
144 | to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
145 | (Portuguese as spoken in Portugal) in this context.
146 | 
147 | Translating Teams
148 | =================
149 | 
150 | For the Free Translation Project to be a success, we need interested
151 | people who like their own language and write it well, and who are also
152 | able to synergize with other translators speaking the same language.
153 | Each translation team has its own mailing list.  The up-to-date list of
154 | teams can be found at the Free Translation Project's homepage,
155 | `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
156 | area.
157 | 
158 |    If you'd like to volunteer to _work_ at translating messages, you
159 | should become a member of the translating team for your own language.
160 | The subscribing address is _not_ the same as the list itself, it has
161 | `-request' appended.  For example, speakers of Swedish can send a
162 | message to `sv-request@li.org', having this message body:
163 | 
164 |      subscribe
165 | 
166 |    Keep in mind that team members are expected to participate
167 | _actively_ in translations, or at solving translational difficulties,
168 | rather than merely lurking around.  If your team does not exist yet and
169 | you want to start one, or if you are unsure about what to do or how to
170 | get started, please write to `translation@iro.umontreal.ca' to reach the
171 | coordinator for all translator teams.
172 | 
173 |    The English team is special.  It works at improving and uniformizing
174 | the terminology in use.  Proven linguistic skill are praised more than
175 | programming skill, here.
176 | 
177 | Available Packages
178 | ==================
179 | 
180 | Languages are not equally supported in all packages.  The following
181 | matrix shows the current state of internationalization, as of January
182 | 2004.  The matrix shows, in regard of each package, for which languages
183 | PO files have been submitted to translation coordination, with a
184 | translation percentage of at least 50%.
185 | 
186 |      Ready PO files       af am ar az be bg bs ca cs da de el en en_GB eo es
187 |                         +----------------------------------------------------+
188 |      a2ps               |             []             [] [] []                |
189 |      aegis              |                               ()                   |
190 |      ant-phone          |                               ()                   |
191 |      anubis             |                                                    |
192 |      ap-utils           |                                                    |
193 |      aspell             |             []                                     |
194 |      bash               |                      []       []             [] [] |
195 |      batchelor          |                                                    |
196 |      bfd                |                            []                   [] |
197 |      binutils           |                            []                   [] |
198 |      bison              |                            [] []                [] |
199 |      bluez-pin          | []                      []                   []    |
200 |      clisp              |                                                    |
201 |      clisp              |                               []    []          [] |
202 |      console-tools      |                         []    []                   |
203 |      coreutils          |                      []    [] []                [] |
204 |      cpio               |                            [] []                [] |
205 |      darkstat           |                []          ()                   [] |
206 |      diffutils          |                      [] [] [] [] []          [] [] |
207 |      e2fsprogs          |                         []    []                [] |
208 |      enscript           |                      []    [] []        []         |
209 |      error              |                      []    [] []        []      [] |
210 |      fetchmail          |                      [] () [] [] []             [] |
211 |      fileutils          |                            [] []                [] |
212 |      findutils          |             []       []    [] [] []          [] [] |
213 |      flex               |                      []    [] []                [] |
214 |      fslint             |                                                    |
215 |      gas                |                                                 [] |
216 |      gawk               |                      []    [] []                [] |
217 |      gbiff              |                               []                   |
218 |      gcal               |                      []                            |
219 |      gcc                |                            []                   [] |
220 |      gettext            |             []       []    [] []                [] |
221 |      gettext-examples   | []                   []       []                [] |
222 |      gettext-runtime    |             []       []    [] []                [] |
223 |      gettext-tools      |                      []       []                [] |
224 |      gimp-print         |                         [] [] []        []      [] |
225 |      gliv               |                                                    |
226 |      glunarclock        |                            [] []                   |
227 |      gnubiff            |                               []                   |
228 |      gnucash            |                         []    ()        []      [] |
229 |      gnucash-glossary   |                            [] ()                [] |
230 |      gnupg              |                      [] ()    [] []          [] [] |
231 |      gpe-aerial         |                         []                         |
232 |      gpe-beam           |                         []    []                   |
233 |      gpe-calendar       |                         []    []                   |
234 |      gpe-clock          |                         []    []                   |
235 |      gpe-conf           |                         []    []                   |
236 |      gpe-contacts       |                         []    []                   |
237 |      gpe-edit           |                         []                         |
238 |      gpe-go             |                         []                         |
239 |      gpe-login          |                         []    []                   |
240 |      gpe-ownerinfo      |                         []    []                   |
241 |      gpe-sketchbook     |                         []    []                   |
242 |      gpe-su             |                         []    []                   |
243 |      gpe-taskmanager    |                         []    []                   |
244 |      gpe-timesheet      |                         []                         |
245 |      gpe-today          |                         []    []                   |
246 |      gpe-todo           |                         []    []                   |
247 |      gphoto2            |                         [] [] []                [] |
248 |      gprof              |                            [] []                [] |
249 |      gpsdrive           |                               ()    ()          () |
250 |      gramadoir          |                               []                   |
251 |      grep               |             [] []    []       [] []             [] |
252 |      gretl              |                                                 [] |
253 |      gtick              | []                            ()                   |
254 |      hello              |                      []    [] [] []          [] [] |
255 |      id-utils           |                            [] []                   |
256 |      indent             |                      []       []             [] [] |
257 |      iso_3166           |          []    [] [] [] [] [] [] []          [] [] |
258 |      iso_3166_1         |                      [] [] [] [] []             [] |
259 |      iso_3166_2         |                                                    |
260 |      iso_3166_3         |                               []                   |
261 |      iso_4217           |                      []    [] []                [] |
262 |      iso_639            |                                                    |
263 |      jpilot             |                         [] []                   [] |
264 |      jtag               |                                                    |
265 |      jwhois             |                                                 [] |
266 |      kbd                |                         [] [] [] []             [] |
267 |      latrine            |                               ()                   |
268 |      ld                 |                            []                   [] |
269 |      libc               |                      [] [] [] [] []             [] |
270 |      libgpewidget       |                         []    []                   |
271 |      libiconv           |                      []    [] []             [] [] |
272 |      lifelines          |                            [] ()                   |
273 |      lilypond           |                               []                   |
274 |      lingoteach         |                                                    |
275 |      lingoteach_lessons |                               ()                () |
276 |      lynx               |                      [] [] [] []                   |
277 |      m4                 |                         [] [] [] []                |
278 |      mailutils          |                      []                         [] |
279 |      make               |                            [] []                [] |
280 |      man-db             |                      [] () [] []                () |
281 |      minicom            |                         []    []                [] |
282 |      mysecretdiary      |                            [] []                [] |
283 |      nano               |                      [] () [] []                [] |
284 |      nano_1_0           |                      [] () [] []                [] |
285 |      opcodes            |                                                 [] |
286 |      parted             |                      [] [] [] []                [] |
287 |      ptx                |                      []    [] []             [] [] |
288 |      python             |                                                    |
289 |      radius             |                                                 [] |
290 |      recode             |             []       []    [] [] []          [] [] |
291 |      rpm                |                         [] []                      |
292 |      screem             |                                                    |
293 |      scrollkeeper       |             []       [] [] [] []                [] |
294 |      sed                | []                   []    [] []             [] [] |
295 |      sh-utils           |                            [] []                [] |
296 |      shared-mime-info   |                                                    |
297 |      sharutils          |                      [] [] [] [] []             [] |
298 |      silky              |                               ()                   |
299 |      skencil            |                            [] ()                [] |
300 |      sketch             |                            [] ()                [] |
301 |      soundtracker       |                            [] []                [] |
302 |      sp                 |                               []                   |
303 |      tar                |                         [] [] []                [] |
304 |      texinfo            |                            [] []             []    |
305 |      textutils          |                      []    [] []                [] |
306 |      tin                |                               ()        ()         |
307 |      tp-robot           |                                                    |
308 |      tuxpaint           |                      [] [] [] [] []     []      [] |
309 |      unicode-han-tra... |                                                    |
310 |      unicode-transla... |                                                    |
311 |      util-linux         |                      [] [] [] []                [] |
312 |      vorbis-tools       |             []          [] []                   [] |
313 |      wastesedge         |                               ()                   |
314 |      wdiff              |                      []    [] []                [] |
315 |      wget               |                []    []    [] [] []             [] |
316 |      xchat              |                      []       [] []             [] |
317 |      xfree86_xkb_xml    |                         [] []                      |
318 |      xpad               |                                                 [] |
319 |                         +----------------------------------------------------+
320 |                           af am ar az be bg bs ca cs da de el en en_GB eo es
321 |                            4  0  0  1  9  4  1 40 41 60 78 17  1   5   13 68
322 |      
323 |                           et eu fa fi fr ga gl he hr hu id is it ja ko lg
324 |                         +-------------------------------------------------+
325 |      a2ps               | []       [] []                      ()    ()    |
326 |      aegis              |                                                 |
327 |      ant-phone          |             []                                  |
328 |      anubis             |             []                                  |
329 |      ap-utils           |             []                                  |
330 |      aspell             |             [] []                               |
331 |      bash               |             []             []                   |
332 |      batchelor          |             [] []                               |
333 |      bfd                |             []                                  |
334 |      binutils           |             []                         []       |
335 |      bison              | []          []                []    []          |
336 |      bluez-pin          |          [] [] []          [] []                |
337 |      clisp              |                                                 |
338 |      clisp              |             []                                  |
339 |      console-tools      |                                                 |
340 |      coreutils          | []       [] [] []                   [] []       |
341 |      cpio               |             []    []       []             []    |
342 |      darkstat           |             () []          [] []                |
343 |      diffutils          |          [] []    [] []    [] []       []       |
344 |      e2fsprogs          |                                                 |
345 |      enscript           |             []          []                      |
346 |      error              |          [] [] []          []                   |
347 |      fetchmail          |                                        []       |
348 |      fileutils          | []          [] []          []       [] []       |
349 |      findutils          | []       [] [] [] []    [] [] []    [] [] []    |
350 |      flex               |             [] []                         []    |
351 |      fslint             |             []                                  |
352 |      gas                |             []                                  |
353 |      gawk               |             []       []                []       |
354 |      gbiff              |             []                                  |
355 |      gcal               |             []                                  |
356 |      gcc                |             []                                  |
357 |      gettext            |             []                         [] []    |
358 |      gettext-examples   |             []                         []       |
359 |      gettext-runtime    |          [] []                []       [] []    |
360 |      gettext-tools      |             []                         [] []    |
361 |      gimp-print         |             []                         []       |
362 |      gliv               |             ()                                  |
363 |      glunarclock        |          []    [] []       []                   |
364 |      gnubiff            |             []                                  |
365 |      gnucash            |             ()                      []          |
366 |      gnucash-glossary   |                                     []          |
367 |      gnupg              | []       [] []    []          []    [] []       |
368 |      gpe-aerial         |             []                                  |
369 |      gpe-beam           |             []                                  |
370 |      gpe-calendar       |             []             [] []                |
371 |      gpe-clock          |             []                                  |
372 |      gpe-conf           |             []                                  |
373 |      gpe-contacts       |             []             []                   |
374 |      gpe-edit           |             []                []                |
375 |      gpe-go             |             []                                  |
376 |      gpe-login          |             []             []                   |
377 |      gpe-ownerinfo      |             []             [] []                |
378 |      gpe-sketchbook     |             []                                  |
379 |      gpe-su             |             []                                  |
380 |      gpe-taskmanager    |             []                                  |
381 |      gpe-timesheet      |             [] []             []                |
382 |      gpe-today          |             [] []                               |
383 |      gpe-todo           |             []                []                |
384 |      gphoto2            |             []             []          []       |
385 |      gprof              |             []                []                |
386 |      gpsdrive           |             ()                      () ()       |
387 |      gramadoir          |             [] []                               |
388 |      grep               | []       [] [] [] [] [] [] [] []    [] []       |
389 |      gretl              |             []                      []          |
390 |      gtick              |          [] [] []                               |
391 |      hello              | []    [] [] [] [] [] [] [] [] []    [] [] []    |
392 |      id-utils           |             []             [] []    []          |
393 |      indent             | []       [] [] [] []       [] []    [] []       |
394 |      iso_3166           |    []       [] []       [] [] []    []          |
395 |      iso_3166_1         |    []       [] []          [] []                |
396 |      iso_3166_2         |                                                 |
397 |      iso_3166_3         |                                                 |
398 |      iso_4217           | []          []    []       []       [] []       |
399 |      iso_639            |                                                 |
400 |      jpilot             |             []                         ()       |
401 |      jtag               |             []                                  |
402 |      jwhois             |             []             [] []    []          |
403 |      kbd                |             []                                  |
404 |      latrine            |             []                                  |
405 |      ld                 |             []                                  |
406 |      libc               |          [] []    []       []          [] []    |
407 |      libgpewidget       |             [] []          [] []                |
408 |      libiconv           | []       [] [] [] []    [] [] []    []          |
409 |      lifelines          |             ()                                  |
410 |      lilypond           |             []                                  |
411 |      lingoteach         |             []                []                |
412 |      lingoteach_lessons |                                                 |
413 |      lynx               | []                         []       [] []       |
414 |      m4                 |             []    []          []       []       |
415 |      mailutils          |                                                 |
416 |      make               |             []    [] [] []             [] []    |
417 |      man-db             |                                     () ()       |
418 |      minicom            |          [] []             []          []       |
419 |      mysecretdiary      |             []                []                |
420 |      nano               |             []    []          []    []          |
421 |      nano_1_0           |             []    []          []    []          |
422 |      opcodes            |             []                                  |
423 |      parted             |             []    []                   []       |
424 |      ptx                | []       [] [] [] []       [] []                |
425 |      python             |                                                 |
426 |      radius             |             []                                  |
427 |      recode             |             []    [] []    [] []    []          |
428 |      rpm                |             []                            []    |
429 |      screem             |                                                 |
430 |      scrollkeeper       |                            []                   |
431 |      sed                | []       [] [] [] []       [] []    [] []       |
432 |      sh-utils           | []       [] [] []          []       [] []       |
433 |      shared-mime-info   |          [] []             []                   |
434 |      sharutils          | []          []    []       []          []       |
435 |      silky              |          () []             ()       ()          |
436 |      skencil            |             []                                  |
437 |      sketch             |             []                                  |
438 |      soundtracker       |             []                      []          |
439 |      sp                 |             []                         ()       |
440 |      tar                | []       [] []    []    [] [] []    [] []       |
441 |      texinfo            |             []       [] []             []       |
442 |      textutils          |             [] [] []       []          [] []    |
443 |      tin                | []          ()                                  |
444 |      tp-robot           |             []                                  |
445 |      tuxpaint           |          [] []       []    [] [] [] [] [] []    |
446 |      unicode-han-tra... |                                                 |
447 |      unicode-transla... |             [] []                               |
448 |      util-linux         | []       [] []             []       () []       |
449 |      vorbis-tools       |             []                                  |
450 |      wastesedge         |             ()                                  |
451 |      wdiff              | []          [] [] []       [] []                |
452 |      wget               | []       [] []    []    [] []          []       |
453 |      xchat              | []       [] []                                  |
454 |      xfree86_xkb_xml    |             []             []                   |
455 |      xpad               |             [] []                               |
456 |                         +-------------------------------------------------+
457 |                           et eu fa fi fr ga gl he hr hu id is it ja ko lg
458 |                           22  2  1 26 106 28 24  8 10 41 33  1 26 33 12  0
459 |      
460 |                           lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
461 |                         +-----------------------------------------------------+
462 |      a2ps               |             []       []    ()     ()     []   [] [] |
463 |      aegis              |                      ()                       () () |
464 |      ant-phone          |                      []                       []    |
465 |      anubis             |             []    [] []           []          [] [] |
466 |      ap-utils           |                      []           ()          []    |
467 |      aspell             |                      []                             |
468 |      bash               |                                          []   [] [] |
469 |      batchelor          |                                               []    |
470 |      bfd                |                                               []    |
471 |      binutils           |                                                  [] |
472 |      bison              |             []       []                  []   [] [] |
473 |      bluez-pin          |                      []           []          []    |
474 |      clisp              |                                                     |
475 |      clisp              |                      []                             |
476 |      console-tools      |                                                  [] |
477 |      coreutils          |                                   []             [] |
478 |      cpio               |                      []           []     []   [] [] |
479 |      darkstat           |             []       []                  []   []    |
480 |      diffutils          |             []       []           []     []   [] [] |
481 |      e2fsprogs          |                                   []                |
482 |      enscript           |                      []                  []   [] [] |
483 |      error              |                      []                  []   []    |
484 |      fetchmail          |                      []           []     ()      [] |
485 |      fileutils          |                                   []          [] [] |
486 |      findutils          |                      []           []     []   [] [] |
487 |      flex               |                                   []     []   [] [] |
488 |      fslint             |                      []                       []    |
489 |      gas                |                                                     |
490 |      gawk               |                                   []     []   []    |
491 |      gbiff              |                      []                       []    |
492 |      gcal               |                                                     |
493 |      gcc                |                                                     |
494 |      gettext            |                                   []          [] [] |
495 |      gettext-examples   |                      []           []          []    |
496 |      gettext-runtime    |                      []           []          [] [] |
497 |      gettext-tools      |                                   []          []    |
498 |      gimp-print         |                      []                             |
499 |      gliv               |                      []                  []   []    |
500 |      glunarclock        |             []       []                       [] [] |
501 |      gnubiff            |                      []                             |
502 |      gnucash            |                      []              []  ()      [] |
503 |      gnucash-glossary   |                      []              []             |
504 |      gnupg              |                                               []    |
505 |      gpe-aerial         |                      []              []       [] [] |
506 |      gpe-beam           |                      []              []       [] [] |
507 |      gpe-calendar       |                      []              []       [] [] |
508 |      gpe-clock          |                      []              []       [] [] |
509 |      gpe-conf           |                      []              []       [] [] |
510 |      gpe-contacts       |                      []              []       [] [] |
511 |      gpe-edit           |                      []              []       [] [] |
512 |      gpe-go             |                      []                       [] [] |
513 |      gpe-login          |                      []              []       [] [] |
514 |      gpe-ownerinfo      |                      []              []       [] [] |
515 |      gpe-sketchbook     |                      []              []       [] [] |
516 |      gpe-su             |                      []              []       [] [] |
517 |      gpe-taskmanager    |                      []              []       [] [] |
518 |      gpe-timesheet      |                      []              []       [] [] |
519 |      gpe-today          |                      []              []       [] [] |
520 |      gpe-todo           |                      []              []       [] [] |
521 |      gphoto2            |                                               []    |
522 |      gprof              |                                          []   []    |
523 |      gpsdrive           |                      ()    ()                 []    |
524 |      gramadoir          |                      ()                       []    |
525 |      grep               |                                   [] []  []   [] [] |
526 |      gretl              |                                                     |
527 |      gtick              |                      []                       [] [] |
528 |      hello              |    []       []    [] [] [] []     []     []   [] [] |
529 |      id-utils           |                      []                  []   [] [] |
530 |      indent             |                      []                  []   [] [] |
531 |      iso_3166           |          []                [] []                    |
532 |      iso_3166_1         |                      []    []                       |
533 |      iso_3166_2         |                                                     |
534 |      iso_3166_3         |                      []                             |
535 |      iso_4217           |          []          [] [] []     [] []  []      [] |
536 |      iso_639            |          []                                         |
537 |      jpilot             |                      ()    ()                       |
538 |      jtag               |                                                     |
539 |      jwhois             |                      []           []     []   [] () |
540 |      kbd                |                      []           []          []    |
541 |      latrine            |                                               []    |
542 |      ld                 |                                                     |
543 |      libc               |                   []       []     []     []         |
544 |      libgpewidget       |                      []              []       []    |
545 |      libiconv           |                      []           []     []   [] [] |
546 |      lifelines          |                                                     |
547 |      lilypond           |                                                     |
548 |      lingoteach         |                                                     |
549 |      lingoteach_lessons |                                                     |
550 |      lynx               |                      []                  []      [] |
551 |      m4                 |                      []           []     []   [] [] |
552 |      mailutils          |                                   []          [] [] |
553 |      make               |                      []           []     []      [] |
554 |      man-db             |                                               []    |
555 |      minicom            |                                   []     []   [] [] |
556 |      mysecretdiary      |                      []                  []   []    |
557 |      nano               |             []       []           []          [] [] |
558 |      nano_1_0           |             []    []    []        []          [] [] |
559 |      opcodes            |                      []                       []    |
560 |      parted             |                         []        [] []  []         |
561 |      ptx                |                   [] []    []     [] []  []   [] [] |
562 |      python             |                                                     |
563 |      radius             |                                   []             [] |
564 |      recode             |                                   []     []   [] [] |
565 |      rpm                |                                   [] []          [] |
566 |      screem             |                                                     |
567 |      scrollkeeper       |                   [] []           []          [] [] |
568 |      sed                |                                   []     []   []    |
569 |      sh-utils           |                   []                             [] |
570 |      shared-mime-info   |                      [] []                          |
571 |      sharutils          |                      []                          [] |
572 |      silky              |                                                  () |
573 |      skencil            |                                      []  []         |
574 |      sketch             |                                      []  []         |
575 |      soundtracker       |                                                     |
576 |      sp                 |                                                     |
577 |      tar                |             []    []       []     []     []   []    |
578 |      texinfo            |                   []              []          [] [] |
579 |      textutils          |                   []                             [] |
580 |      tin                |                                                     |
581 |      tp-robot           |                      []                             |
582 |      tuxpaint           | []          []       [] []        [] []  []   []    |
583 |      unicode-han-tra... |                                                     |
584 |      unicode-transla... |                                                     |
585 |      util-linux         |                      []                  []      [] |
586 |      vorbis-tools       |                      []                       [] [] |
587 |      wastesedge         |                                                     |
588 |      wdiff              |             []                    []     []   [] [] |
589 |      wget               |                                   []          [] [] |
590 |      xchat              |    []                []                          [] |
591 |      xfree86_xkb_xml    |                      []                          [] |
592 |      xpad               |                      []                       []    |
593 |                         +-----------------------------------------------------+
594 |                           lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
595 |                            1  2  0  3 12  0 10 69  6  7  1  40 26  36   76 63
596 |      
597 |                           sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
598 |                         +-----------------------------------------------------+
599 |      a2ps               |    []    []       [] []                             | 16
600 |      aegis              |                                                     |  0
601 |      ant-phone          |                                                     |  3
602 |      anubis             |                   [] []                             |  9
603 |      ap-utils           |                      ()                             |  3
604 |      aspell             |                                                     |  4
605 |      bash               |                                                     |  9
606 |      batchelor          |                                                     |  3
607 |      bfd                |          []       []                                |  6
608 |      binutils           |          []       []                  []            |  8
609 |      bison              |          []       []                                | 14
610 |      bluez-pin          | []       []                    []                   | 14
611 |      clisp              |                                                     |  0
612 |      clisp              |                                                     |  5
613 |      console-tools      |                                                     |  3
614 |      coreutils          |    []    []       []                        []      | 16
615 |      cpio               |          []                           []            | 14
616 |      darkstat           | []    [] []                           ()    ()      | 12
617 |      diffutils          |          []       []                        []      | 23
618 |      e2fsprogs          |          []       []                                |  6
619 |      enscript           |          []       []                                | 12
620 |      error              | []                []                        []      | 15
621 |      fetchmail          | []                []                                | 11
622 |      fileutils          |    []    []       []                  []    []      | 17
623 |      findutils          | [] [] [] []       []                  []            | 29
624 |      flex               |          []       []                                | 13
625 |      fslint             |                                                     |  3
626 |      gas                |                   []                                |  3
627 |      gawk               |          []       []                                | 12
628 |      gbiff              |                                                     |  4
629 |      gcal               |          []       []                                |  4
630 |      gcc                |                   []                                |  4
631 |      gettext            | [] []    []       []                        []      | 16
632 |      gettext-examples   | []    [] []       []                  []            | 14
633 |      gettext-runtime    | [] [] [] []       [] []               []    []      | 22
634 |      gettext-tools      | [] [] [] []       []                  []            | 14
635 |      gimp-print         | []       []                                         | 10
636 |      gliv               |                                                     |  3
637 |      glunarclock        |       [] []                    []                   | 13
638 |      gnubiff            |                                                     |  3
639 |      gnucash            | []                                          []      |  9
640 |      gnucash-glossary   | []       []                                 []      |  8
641 |      gnupg              | []       []       []                        []      | 17
642 |      gpe-aerial         |          []                                         |  7
643 |      gpe-beam           |          []                                         |  8
644 |      gpe-calendar       | []       []                    []           []      | 13
645 |      gpe-clock          | []    [] []                                         | 10
646 |      gpe-conf           | []       []                                         |  9
647 |      gpe-contacts       | []       []                                 []      | 11
648 |      gpe-edit           | []    [] []                    []           []      | 12
649 |      gpe-go             |                                                     |  5
650 |      gpe-login          | []    [] []                    []           []      | 13
651 |      gpe-ownerinfo      | []    [] []                                 []      | 13
652 |      gpe-sketchbook     | []       []                                         |  9
653 |      gpe-su             | []    [] []                                         | 10
654 |      gpe-taskmanager    | []    [] []                                         | 10
655 |      gpe-timesheet      | []    [] []                                 []      | 12
656 |      gpe-today          | []    [] []                    []           []      | 13
657 |      gpe-todo           | []       []                    []           []      | 12
658 |      gphoto2            | []       []                           []            | 11
659 |      gprof              |          []       []                                |  9
660 |      gpsdrive           | []       []                                         |  3
661 |      gramadoir          | []                                                  |  5
662 |      grep               |    [] []          [] []                             | 26
663 |      gretl              |                                                     |  3
664 |      gtick              |                                                     |  7
665 |      hello              | []    [] []       [] []                             | 34
666 |      id-utils           |          []       []                                | 12
667 |      indent             | []    [] []       []                                | 21
668 |      iso_3166           | [] [] [] []       []    []     []                   | 27
669 |      iso_3166_1         | [] []             []                                | 16
670 |      iso_3166_2         |                                                     |  0
671 |      iso_3166_3         |                                                     |  2
672 |      iso_4217           | [] []    []       [] []               []            | 24
673 |      iso_639            |                                                     |  1
674 |      jpilot             |          []       []        []        []    []      |  9
675 |      jtag               | []                                                  |  2
676 |      jwhois             |          ()       []                        []      | 11
677 |      kbd                |          []       []                                | 11
678 |      latrine            |                                                     |  2
679 |      ld                 |          []       []                                |  5
680 |      libc               | []       []       []                  []            | 20
681 |      libgpewidget       | []    [] []                    []                   | 13
682 |      libiconv           | [] [] [] []       [] []        []     []            | 27
683 |      lifelines          |          []                                         |  2
684 |      lilypond           |          []                                         |  3
685 |      lingoteach         |                                                     |  2
686 |      lingoteach_lessons |                                       ()            |  0
687 |      lynx               |          []       [] []                             | 14
688 |      m4                 |          []                           []            | 15
689 |      mailutils          |                                                     |  5
690 |      make               |          []       []                  []            | 16
691 |      man-db             |          []                                         |  5
692 |      minicom            |                                                     | 11
693 |      mysecretdiary      |          []       []                                | 10
694 |      nano               |       [] []       [] []                             | 17
695 |      nano_1_0           |          []       [] []                             | 17
696 |      opcodes            |          []       []                                |  6
697 |      parted             |          []       []                  []            | 15
698 |      ptx                |          []       []                                | 22
699 |      python             |                                                     |  0
700 |      radius             |                                                     |  4
701 |      recode             |    []    []       []                                | 20
702 |      rpm                |          []       []                                |  9
703 |      screem             |          []                           []            |  2
704 |      scrollkeeper       | []    [] []                                         | 15
705 |      sed                | [] [] [] []       [] []                             | 24
706 |      sh-utils           |    []             []                                | 14
707 |      shared-mime-info   |       [] []                                         |  7
708 |      sharutils          |       [] []       []                        []      | 17
709 |      silky              | ()                                                  |  3
710 |      skencil            |          []                                         |  6
711 |      sketch             |          []                                         |  6
712 |      soundtracker       | []       []                                         |  7
713 |      sp                 |                   []                                |  3
714 |      tar                | [] []    []       []                  []            | 24
715 |      texinfo            |          []       []                  []            | 14
716 |      textutils          |    []    []       []                        []      | 16
717 |      tin                |                                                     |  1
718 |      tp-robot           |                                                     |  2
719 |      tuxpaint           | []       []       []           []     []            | 29
720 |      unicode-han-tra... |                                                     |  0
721 |      unicode-transla... |                                                     |  2
722 |      util-linux         |          []       []                                | 15
723 |      vorbis-tools       |                                                     |  8
724 |      wastesedge         |                                                     |  0
725 |      wdiff              | []       []       []                                | 18
726 |      wget               | [] [] [] []       [] []               []    []      | 24
727 |      xchat              | [] [] [] []                           []            | 15
728 |      xfree86_xkb_xml    | []    []          [] []               []            | 11
729 |      xpad               |                                                     |  5
730 |                         +-----------------------------------------------------+
731 |        63 teams           sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
732 |       131 domains         47 19 28 83  0  0 59 13  1   1 11  0  22    22    0  1373
733 | 
734 |    Some counters in the preceding matrix are higher than the number of
735 | visible blocks let us expect.  This is because a few extra PO files are
736 | used for implementing regional variants of languages, or language
737 | dialects.
738 | 
739 |    For a PO file in the matrix above to be effective, the package to
740 | which it applies should also have been internationalized and
741 | distributed as such by its maintainer.  There might be an observable
742 | lag between the mere existence a PO file and its wide availability in a
743 | distribution.
744 | 
745 |    If January 2004 seems to be old, you may fetch a more recent copy of
746 | this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
747 | matrix with full percentage details can be found at
748 | `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
749 | 
750 | Using `gettext' in new packages
751 | ===============================
752 | 
753 | If you are writing a freely available program and want to
754 | internationalize it you are welcome to use GNU `gettext' in your
755 | package.  Of course you have to respect the GNU Library General Public
756 | License which covers the use of the GNU `gettext' library.  This means
757 | in particular that even non-free programs can use `libintl' as a shared
758 | library, whereas only free software can use `libintl' as a static
759 | library or use modified versions of `libintl'.
760 | 
761 |    Once the sources are changed appropriately and the setup can handle
762 | the use of `gettext' the only thing missing are the translations.  The
763 | Free Translation Project is also available for packages which are not
764 | developed inside the GNU project.  Therefore the information given above
765 | applies also for every other Free Software Project.  Contact
766 | `translation@iro.umontreal.ca' to make the `.pot' files available to
767 | the translation teams.
768 | 
769 | 


--------------------------------------------------------------------------------