2009-04-22 21:50:31 +08:00
|
|
|
|
// The majority of the application is dedicated to building the
|
|
|
|
|
// current contribitors list by parsing the ChangeLog, it just takes
|
|
|
|
|
// one line in the main itself to report the version number.
|
|
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
#include <OpenThreads/Version>
|
|
|
|
|
|
2008-08-18 20:39:18 +08:00
|
|
|
|
#include <osg/Notify>
|
2005-03-13 09:47:46 +08:00
|
|
|
|
#include <osg/Version>
|
2005-11-15 01:07:11 +08:00
|
|
|
|
#include <osg/ArgumentParser>
|
|
|
|
|
#include <osg/ApplicationUsage>
|
2008-04-04 02:36:50 +08:00
|
|
|
|
|
|
|
|
|
#include <osg/Matrix>
|
|
|
|
|
#include <osg/Plane>
|
|
|
|
|
#include <osg/BoundingBox>
|
|
|
|
|
#include <osg/BoundingSphere>
|
|
|
|
|
|
2008-11-07 23:08:08 +08:00
|
|
|
|
#include <osgDB/fstream>
|
2008-04-04 02:36:50 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
using namespace std;
|
2005-03-13 09:47:46 +08:00
|
|
|
|
|
2005-11-17 23:18:48 +08:00
|
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
|
#pragma setlocale("C")
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
typedef pair<string, string> NamePair;
|
|
|
|
|
typedef map<NamePair, unsigned int> NameMap;
|
|
|
|
|
typedef vector<string> Words;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
|
|
|
|
NamePair EmptyNamePair;
|
2009-04-22 21:50:31 +08:00
|
|
|
|
NamePair NameRobertOsfield("Robert", "Osfield");
|
|
|
|
|
NamePair NameDonBurns ("Don", "Burns");
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
2005-12-16 04:56:06 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
const char* validNames[] =
|
|
|
|
|
{
|
|
|
|
|
"de",
|
|
|
|
|
"den",
|
|
|
|
|
"van"
|
|
|
|
|
};
|
2005-12-16 04:56:06 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
const char* invalidNames[] =
|
|
|
|
|
{
|
|
|
|
|
"Added",
|
|
|
|
|
"AnimationPath",
|
|
|
|
|
"AnimationPathCallback",
|
|
|
|
|
"AnimationPathManipulator",
|
|
|
|
|
"ArgumentParser",
|
|
|
|
|
"AttrData",
|
|
|
|
|
"AutoTransform",
|
|
|
|
|
"AutoTransform.",
|
|
|
|
|
"Azimuth",
|
|
|
|
|
"BlenColour(Vec4",
|
|
|
|
|
"Camera",
|
|
|
|
|
"CameraBarrierCallback",
|
|
|
|
|
"CameraNode",
|
|
|
|
|
"Canvas",
|
|
|
|
|
"CluserCullingCallback",
|
|
|
|
|
"ClusterCullingCallback",
|
|
|
|
|
"CoordinateSystem",
|
|
|
|
|
"CoordinateSystemNode",
|
|
|
|
|
"CoordinateSystemNode&",
|
|
|
|
|
"CopyOp",
|
|
|
|
|
"Copyright",
|
|
|
|
|
"Core",
|
|
|
|
|
"Creator",
|
|
|
|
|
"CullCallbacks",
|
|
|
|
|
"CullingSettngs",
|
|
|
|
|
"CullVisitor",
|
|
|
|
|
"CullVistor",
|
|
|
|
|
"Cygwin",
|
|
|
|
|
"DatabasePager",
|
|
|
|
|
"DataSet",
|
|
|
|
|
"DataVariance",
|
|
|
|
|
"DeleteHandler",
|
|
|
|
|
"DisplaySettings",
|
|
|
|
|
"Drawable",
|
|
|
|
|
"DrawElementsUByte",
|
|
|
|
|
"Endian",
|
|
|
|
|
"Escape",
|
|
|
|
|
"EventQueue",
|
|
|
|
|
"Face",
|
|
|
|
|
"Files",
|
|
|
|
|
"Fixed",
|
|
|
|
|
"Fixes",
|
|
|
|
|
"FluidProgram",
|
|
|
|
|
"FontImplementation",
|
|
|
|
|
"FrameStats",
|
|
|
|
|
"Framstamp",
|
|
|
|
|
"FreeBSD",
|
|
|
|
|
"Geode",
|
|
|
|
|
"GeoemtryTechnique",
|
|
|
|
|
"GeometryTechnique",
|
|
|
|
|
"GeoSet",
|
|
|
|
|
"GraphicsContext",
|
|
|
|
|
"GraphicsContextImplementation",
|
|
|
|
|
"GraphicsThread",
|
|
|
|
|
"GraphicsWindowX11",
|
|
|
|
|
"Group",
|
|
|
|
|
"Image",
|
|
|
|
|
"ImageOptions",
|
|
|
|
|
"Images",
|
|
|
|
|
"Images/SolarSystem",
|
|
|
|
|
"ImageStream",
|
|
|
|
|
"Improved",
|
|
|
|
|
"IndexBlock",
|
|
|
|
|
"IndexFaceSets",
|
|
|
|
|
"IntersectVisitor",
|
|
|
|
|
"Inventor",
|
|
|
|
|
"KdTree",
|
|
|
|
|
"KeyboardMouse",
|
|
|
|
|
"KeyboardMouseCallback",
|
|
|
|
|
"LightModel",
|
|
|
|
|
"LightPointNode",
|
|
|
|
|
"LineSegment",
|
|
|
|
|
"LineStipple",
|
|
|
|
|
"Logos",
|
|
|
|
|
"LongIDRecord",
|
|
|
|
|
"Make",
|
|
|
|
|
"Makefile",
|
|
|
|
|
"Material",
|
|
|
|
|
"Matrix",
|
|
|
|
|
"Matrix*",
|
|
|
|
|
"MatrixManipulator",
|
|
|
|
|
"MatrixTransform",
|
|
|
|
|
"MemoryManager",
|
|
|
|
|
"MergeGeometryVisitor",
|
|
|
|
|
"MeshRecord",
|
|
|
|
|
"Mode",
|
|
|
|
|
"Mr",
|
|
|
|
|
"Multigen",
|
|
|
|
|
"New",
|
|
|
|
|
"NewCullVisitor",
|
|
|
|
|
"NodeVisitor",
|
|
|
|
|
"Object",
|
|
|
|
|
"OpenDX",
|
|
|
|
|
"OpenSceneGraph",
|
|
|
|
|
"OpenSceneGraph-2",
|
|
|
|
|
"OpenSceneGraph-osgWidget-dev",
|
|
|
|
|
"OpenThreads",
|
|
|
|
|
"OperationThread",
|
|
|
|
|
"Optimizer",
|
|
|
|
|
"OrientationConverter",
|
|
|
|
|
"Osfields",
|
|
|
|
|
"Ouput",
|
|
|
|
|
"Output",
|
|
|
|
|
"OveralyNode",
|
|
|
|
|
"PagedLOD",
|
|
|
|
|
"PageLOD",
|
|
|
|
|
"Paging",
|
|
|
|
|
"ParentList",
|
|
|
|
|
"Performer",
|
|
|
|
|
"PickHandler",
|
|
|
|
|
"PixelDataBufferObject",
|
|
|
|
|
"PolygonStipple",
|
|
|
|
|
"PolytopeVisitor",
|
|
|
|
|
"PrimitiveIndexFunctor",
|
|
|
|
|
"Prodcuer",
|
|
|
|
|
"Producer",
|
|
|
|
|
"ProducerEventCallback",
|
|
|
|
|
"Program",
|
|
|
|
|
"Proxy",
|
|
|
|
|
"ProxyNode",
|
|
|
|
|
"Quake3",
|
|
|
|
|
"Quicktime",
|
|
|
|
|
"ReaderWriters",
|
|
|
|
|
"ReentrantMutex",
|
|
|
|
|
"Referenced",
|
|
|
|
|
"ReferenceFrame",
|
|
|
|
|
"Removed",
|
|
|
|
|
"RemoveLoadedProxyNodes",
|
|
|
|
|
"RenderStage",
|
|
|
|
|
"RenderTargetFallback",
|
|
|
|
|
"RenderToTextureStage",
|
|
|
|
|
"SceneGraphBuilder",
|
|
|
|
|
"SceneView",
|
|
|
|
|
"Sequence",
|
|
|
|
|
"Shape",
|
|
|
|
|
"SimpleViewer",
|
|
|
|
|
"SimpleViewer",
|
|
|
|
|
"SmokeTrailEffect",
|
|
|
|
|
"Source",
|
|
|
|
|
"SpotExponent",
|
|
|
|
|
"State",
|
|
|
|
|
"StateAttribute",
|
|
|
|
|
"Stats",
|
|
|
|
|
"StatsVisitor",
|
|
|
|
|
"Studio",
|
|
|
|
|
"Support",
|
|
|
|
|
"Switch",
|
|
|
|
|
"TechniqueEventHandler",
|
|
|
|
|
"TerraPage",
|
|
|
|
|
"TessellationHints",
|
|
|
|
|
"TestManipulator",
|
|
|
|
|
"TestSupportCallback",
|
|
|
|
|
"TexEnv",
|
|
|
|
|
"TexMat(Matrix",
|
|
|
|
|
"Texture",
|
|
|
|
|
"Texture2DArray",
|
|
|
|
|
"Texture3D",
|
|
|
|
|
"TextureCubeMap",
|
|
|
|
|
"TextureObjectManager",
|
|
|
|
|
"TextureRectangle",
|
|
|
|
|
"TextureRectangle(Image*",
|
|
|
|
|
"TextureType",
|
|
|
|
|
"Texuture",
|
|
|
|
|
"TriStripVisitor",
|
|
|
|
|
"TrPageViewer",
|
|
|
|
|
"Uniform",
|
|
|
|
|
"UseFarLineSegments",
|
|
|
|
|
"UserData",
|
|
|
|
|
"Valve",
|
|
|
|
|
"Vec*",
|
|
|
|
|
"Vec2d",
|
|
|
|
|
"Vec3d",
|
|
|
|
|
"Vec4ub",
|
|
|
|
|
"Version",
|
2009-04-25 04:37:33 +08:00
|
|
|
|
"VertexData",
|
2009-04-22 21:50:31 +08:00
|
|
|
|
"View",
|
|
|
|
|
"Viewer",
|
|
|
|
|
"ViewPoint",
|
|
|
|
|
"Viewport",
|
|
|
|
|
"Viewport",
|
|
|
|
|
"Visual",
|
|
|
|
|
"VisualStudio",
|
|
|
|
|
"WindowData",
|
|
|
|
|
"Windows",
|
|
|
|
|
"X",
|
|
|
|
|
"Xcode",
|
|
|
|
|
"Y"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct TypoCorrection
|
|
|
|
|
{
|
|
|
|
|
const char* original;
|
|
|
|
|
const char* corrected;
|
|
|
|
|
};
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
TypoCorrection typoCorrections[] =
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
{"Aderian", "Adrian"},
|
|
|
|
|
{"Adndre", "Andre"},
|
|
|
|
|
{"Adrain", "Adrian"},
|
|
|
|
|
{"Amueller", "Aumueller"},
|
|
|
|
|
{"Andew", "Andrew"},
|
|
|
|
|
{"André", "Andr<EFBFBD>"},
|
|
|
|
|
{"Antione", "Antoine"},
|
|
|
|
|
{"Antonoine", "Antoine"},
|
|
|
|
|
{"Atr", "Art"},
|
|
|
|
|
{"Baverage", "Beverage"},
|
|
|
|
|
{"Bistroviae", "Bistrovic"},
|
|
|
|
|
{"Callue", "Callu"},
|
|
|
|
|
{"Christaiansen", "Christiansen"},
|
|
|
|
|
{"Cobin", "Corbin"},
|
|
|
|
|
{"Comporesi", "Camporesi"},
|
|
|
|
|
{"Connel", "Connell"},
|
|
|
|
|
{"Cullu", "Callu"},
|
|
|
|
|
{"Daneil", "Daniel"},
|
|
|
|
|
{"Daust", "Daoust"},
|
|
|
|
|
{"Daved", "David"},
|
|
|
|
|
{"Drederic", "Frederic"},
|
|
|
|
|
{"Eileman", "Eilemann"},
|
|
|
|
|
{"Elgi", "Egli"},
|
|
|
|
|
{"Fabian", "Fabien"},
|
|
|
|
|
{"Fautre", "Fautr<EFBFBD>"},
|
|
|
|
|
{"Frashid", "Farshid"},
|
|
|
|
|
{"Fred", "Frederic"},
|
|
|
|
|
{"Fredrick", "Frederic"},
|
|
|
|
|
{"Fredric", "Frederic"},
|
|
|
|
|
{"Froechlich", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Froehilch", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Froehlich", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Froelich", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Froenlich", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Fröhlich", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Fruciel", "Frauciel"},
|
|
|
|
|
{"García", "Garcea"},
|
|
|
|
|
{"Garrat", "Garrett"},
|
|
|
|
|
{"Garret", "Garrett"},
|
|
|
|
|
{"Geof", "Geoff"},
|
|
|
|
|
{"Giatan", "Gaitan"},
|
|
|
|
|
{"Gronenger", "Gronager"},
|
|
|
|
|
{"Gronger", "Gronager"},
|
|
|
|
|
{"Haritchablaet", "Haritchabalet"},
|
|
|
|
|
{"Hebelin", "Herbelin"},
|
|
|
|
|
{"Heirtlein", "Hertlein"},
|
|
|
|
|
{"Heirtlein", "Hertlein"},
|
|
|
|
|
{"Hertleinm", "Hertlein"},
|
|
|
|
|
{"Hertlien", "Hertlein"},
|
|
|
|
|
{"Hi", "He"},
|
|
|
|
|
{"Hooper", "Hopper"},
|
|
|
|
|
{"Inverson", "Iverson"},
|
|
|
|
|
{"Iversion", "Iverson"},
|
|
|
|
|
{"Jean-Sebastein", "Jean-Sebastien"},
|
|
|
|
|
{"Jean-Sebastian", "Jean-Sebastien"},
|
|
|
|
|
{"Jean-Sebastirn", "Jean-Sebastien"},
|
|
|
|
|
{"Jea-Sebastien", "Jean-Sebastien"},
|
|
|
|
|
{"Johhansen", "Johansen"},
|
|
|
|
|
{"Johnansen", "Johansen"},
|
|
|
|
|
{"Johnasen", "Johansen"},
|
|
|
|
|
{"Jolly", "Jolley"},
|
|
|
|
|
{"Jose", "Jos<EFBFBD>"},
|
|
|
|
|
{"José", "Jos<EFBFBD>"},
|
|
|
|
|
{"Joson", "Jason"},
|
|
|
|
|
{"J", "Jos<EFBFBD>"},
|
|
|
|
|
{"Keuhne", "Kuehne"},
|
|
|
|
|
{"Kheune", "Kuehne"},
|
|
|
|
|
{"Lagrade", "Lagarde"},
|
|
|
|
|
{"Larshkari", "Lashkari"},
|
|
|
|
|
{"Lashakari", "Lashkari"},
|
|
|
|
|
{"Lashari", "Lashkari"},
|
|
|
|
|
{"Lasharki", "Lashkari"},
|
|
|
|
|
{"Laskari", "Lashkari"},
|
|
|
|
|
{"Leandowski", "Lewandowski"},
|
|
|
|
|
{"Lawandowski", "Lewandowski"},
|
|
|
|
|
{"Lucas", "Luaces"},
|
|
|
|
|
{"Lugi", "Luigi"},
|
|
|
|
|
{"Lweandowski", "Lewandowski"},
|
|
|
|
|
{"Maceij", "Maciej"},
|
|
|
|
|
{"Machler", "M<EFBFBD>chler"},
|
|
|
|
|
{"Macro", "Marco"},
|
|
|
|
|
{"Maechler", "M<EFBFBD>chler"},
|
|
|
|
|
{"Mahai", "Mihai"},
|
|
|
|
|
{"Mammond", "Marmond"},
|
|
|
|
|
{"March", "Marco"},
|
|
|
|
|
{"Martsz", "Martz"},
|
|
|
|
|
{"Marz", "Martz"},
|
|
|
|
|
{"Matz", "Martz"},
|
|
|
|
|
{"Melchoir", "Melchior"},
|
|
|
|
|
{"Mellis", "Melis"},
|
|
|
|
|
{"Messerschimdt", "Messerschmidt"},
|
|
|
|
|
{"Micheal", "Michael"},
|
|
|
|
|
{"Mihair", "Mihai"},
|
|
|
|
|
{"Molishtan", "Moloshtan"},
|
|
|
|
|
{"Molishtan", "Moloshtan"},
|
|
|
|
|
{"Moloshton", "Moloshtan"},
|
|
|
|
|
{"Morné", "Morn<EFBFBD>"},
|
|
|
|
|
{"Morne", "Morn<EFBFBD>"},
|
|
|
|
|
{"Moule", "Moiule"},
|
|
|
|
|
{"Narache", "Marache"},
|
|
|
|
|
{"Nicklov", "Nikolov"},
|
|
|
|
|
{"Nickolov", "Nikolov"},
|
|
|
|
|
{"Olad", "Olaf"},
|
|
|
|
|
{"Olar", "Olaf"},
|
|
|
|
|
{"Oritz", "Ortiz"},
|
|
|
|
|
{"Osfeld", "Osfield"},
|
|
|
|
|
{"Osfied", "Osfield"},
|
|
|
|
|
{"Pail", "Paul"},
|
|
|
|
|
{"Rajce", "Trajce"},
|
|
|
|
|
{"Randal", "Randall"},
|
|
|
|
|
{"Robet", "Robert"},
|
|
|
|
|
{"Rodger", "Roger"},
|
|
|
|
|
{"Rolad", "Roland"},
|
|
|
|
|
{"Rucard", "Richard"},
|
|
|
|
|
{"Sekender", "Sukender"},
|
|
|
|
|
{"Sewel", "Sewell"},
|
|
|
|
|
{"Simmonson", "Simonsson"},
|
|
|
|
|
{"Simmonsson", "Simonsson"},
|
|
|
|
|
{"Sjolie", "Sj<EFBFBD>lie"},
|
|
|
|
|
{"Sjölie", "Sj<EFBFBD>lie"},
|
|
|
|
|
{"Skinnder", "Skinner"},
|
|
|
|
|
{"Sokolosky", "Sokolowsky"},
|
|
|
|
|
{"Sokolowky", "Sokolowsky"},
|
|
|
|
|
{"Sokolowki", "Sokolowsky"},
|
|
|
|
|
{"Sokolowski", "Sokolowsky"},
|
|
|
|
|
{"Sokolsky", "Sokolowsky"},
|
|
|
|
|
{"Sokolwsky", "Sokolowsky"},
|
|
|
|
|
{"Sonda", "Sondra"},
|
|
|
|
|
{"Stansilav", "Stanislav"},
|
|
|
|
|
{"Stefan", "Stephan"},
|
|
|
|
|
{"Stell", "Steel"},
|
|
|
|
|
{"Sylvan", "Sylvain"},
|
|
|
|
|
{"Takeahei", "Takahei"},
|
|
|
|
|
{"Takehei", "Takahei"},
|
|
|
|
|
{"Tarantilils", "Tarantilis"},
|
|
|
|
|
{"Trastenjak", "Trstenjak"},
|
|
|
|
|
{"Urlich", "Ulrich"},
|
|
|
|
|
{"Vines", "Vine"},
|
|
|
|
|
{"Waldrom", "Waldron"},
|
|
|
|
|
{"Wedner", "Weidner"},
|
|
|
|
|
{"Weidemann", "Wiedemann"},
|
|
|
|
|
{"Wieblen", "Weiblen"},
|
|
|
|
|
{"Woesnner", "Woessner"},
|
|
|
|
|
{"Wojchiech", "Wojciech"},
|
|
|
|
|
{"Wojiech", "Wojciech"},
|
|
|
|
|
{"Xennon", "Hanson"},
|
|
|
|
|
{"Yefrei", "Yefei"},
|
|
|
|
|
{"Yfei", "Yefei"}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct NameCorrection
|
|
|
|
|
{
|
|
|
|
|
const char* originalFirst;
|
|
|
|
|
const char* originalSecond;
|
|
|
|
|
const char* correctedFirst;
|
|
|
|
|
const char* correctedSecond;
|
|
|
|
|
};
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
NameCorrection nameCorrections[] =
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
{"Marc", "Sciabica",
|
|
|
|
|
"Mark", "Sciabica"},
|
|
|
|
|
{"Jean", "Sebastien",
|
|
|
|
|
"Jean-Sebastien", "Guay"},
|
|
|
|
|
{"Michale", "Platings",
|
|
|
|
|
"Michael", "Platings"},
|
|
|
|
|
{"Mick", "",
|
|
|
|
|
"Maik", "Keller"},
|
|
|
|
|
{"Gary", "Quin",
|
|
|
|
|
"Gary", "Quinn"},
|
|
|
|
|
{"BjornHein", "",
|
|
|
|
|
"Bj<EFBFBD>rn", "Hein"},
|
|
|
|
|
{"Bjorn", "Hein",
|
|
|
|
|
"Bj<EFBFBD>rn", "Hein"},
|
|
|
|
|
{"Erik", "van",
|
|
|
|
|
"Erik", "den Dekker"},
|
|
|
|
|
{"Erik", "den",
|
|
|
|
|
"Erik", "den Dekker"},
|
|
|
|
|
{"Jeoen", "den",
|
|
|
|
|
"Jeroen", "den Dekker"},
|
|
|
|
|
{"John", "Vidar",
|
|
|
|
|
"John", "Vidar Larring"},
|
|
|
|
|
{"John", "Vida",
|
|
|
|
|
"John", "Vidar Larring"},
|
|
|
|
|
{"Sebastien", "Messerschmidt",
|
|
|
|
|
"Sebastian", "Messerschmidt"},
|
|
|
|
|
{"Mattias", "Fr<EFBFBD>hlich",
|
|
|
|
|
"Mathias", "Fr<EFBFBD>hlich"},
|
|
|
|
|
{"Mathias", "Helsing",
|
|
|
|
|
"Mattias", "Helsing"},
|
|
|
|
|
{"Jose", "Delport",
|
|
|
|
|
"J.P.", "Delport"},
|
|
|
|
|
{"Jos<EFBFBD>", "Delport",
|
|
|
|
|
"J.P.", "Delport"},
|
|
|
|
|
{"Franz", "Melchior",
|
|
|
|
|
"Melchior", "Franz"},
|
|
|
|
|
{"Glen", "Waldon",
|
|
|
|
|
"Glenn", "Waldron"},
|
|
|
|
|
{"Ralf", "Karn",
|
|
|
|
|
"Ralf", "Kern"},
|
|
|
|
|
{"Donny", "Cipperly",
|
|
|
|
|
"Donald", "Cipperly"},
|
|
|
|
|
{"Gino", "van",
|
|
|
|
|
"Gino", "van den Bergen"},
|
|
|
|
|
{"Radu", "Mihai",
|
|
|
|
|
"Mihai", "Radu"},
|
|
|
|
|
{"Art", "Trevs",
|
|
|
|
|
"Art", "Tevs"},
|
|
|
|
|
{"Tim", "More",
|
|
|
|
|
"Tim", "Moore"},
|
|
|
|
|
{"Andre", "Garneau",
|
|
|
|
|
"Andr<EFBFBD>", "Garneau"},
|
|
|
|
|
{"Eric", "Hammil",
|
|
|
|
|
"Chris", "Hanson"},
|
|
|
|
|
{"Paul", "de",
|
|
|
|
|
"Paul", "de Repentigny"},
|
|
|
|
|
{"Raymond", "de",
|
|
|
|
|
"Raymond", "de Vries"},
|
|
|
|
|
{"Nick", "",
|
|
|
|
|
"Trajce", "Nikolov"},
|
|
|
|
|
{"Daniel", "",
|
|
|
|
|
"Daniel", "Sj<EFBFBD>lie"},
|
|
|
|
|
{"Julia", "Ortiz",
|
|
|
|
|
"Julian", "Ortiz"},
|
|
|
|
|
{"Rune", "Schmidt",
|
|
|
|
|
"Rune", "Schmidt Jensen"},
|
|
|
|
|
{"Romano", "Jos<EFBFBD>",
|
|
|
|
|
"Romano", "Jos<EFBFBD> Magacho da Silva"},
|
|
|
|
|
{"Rommano", "Silva",
|
|
|
|
|
"Romano", "Jos<EFBFBD> Magacho da Silva"},
|
|
|
|
|
{"Leandro", "Motta",
|
|
|
|
|
"Leandro", "Motta Barros"},
|
|
|
|
|
{"A", "Botorabi",
|
|
|
|
|
"Ali", "Botorabi"},
|
|
|
|
|
{"Waltice", "",
|
|
|
|
|
"Walter", "J. Altice"},
|
|
|
|
|
{"Drew", "",
|
|
|
|
|
"Drew", "Whitehouse"},
|
|
|
|
|
{"Douglas", "A",
|
|
|
|
|
"Douglas", "A. Pouk"},
|
|
|
|
|
{"Colin", "MacDonald",
|
|
|
|
|
"Colin", "McDonald"},
|
|
|
|
|
{"Nikolov", "Trajce",
|
|
|
|
|
"Trajce", "Nikolov"},
|
|
|
|
|
{"Frauciel", "Luc",
|
|
|
|
|
"Luc", "Frauciel"},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool validName(const string& first)
|
|
|
|
|
{
|
|
|
|
|
// Check for valid names
|
|
|
|
|
for (unsigned int i = 0; i < sizeof(validNames) / sizeof(char*); ++i)
|
2008-11-29 20:16:04 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (first == validNames[i])
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2008-11-29 20:16:04 +08:00
|
|
|
|
}
|
2009-01-30 21:05:07 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (first.empty()) return false;
|
2008-05-31 05:23:49 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (first[0] < 'A' || first[0] > 'Z') return false;
|
2008-10-08 21:18:14 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (first.size() >= 2 && (first[1] < 'a' || first[1] > 'z') && (first[1] != '.') && (first[1] != ',')) return false;
|
2008-05-12 20:16:14 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
// Check for invalid names
|
|
|
|
|
for (unsigned int i = 0; i < sizeof(invalidNames) / sizeof(char*); ++i)
|
2008-05-08 23:14:13 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (first == invalidNames[i])
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2005-11-15 05:40:28 +08:00
|
|
|
|
}
|
2005-11-15 18:05:31 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
// Default to a valid name
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2005-11-15 18:05:31 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
string typoCorrection(const string& name)
|
|
|
|
|
{
|
|
|
|
|
// Loop over all known typo corrections
|
|
|
|
|
for (unsigned int i = 0; i < sizeof(typoCorrections) / sizeof(TypoCorrection); ++i)
|
2006-07-13 21:00:22 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
// If a typo is found
|
|
|
|
|
if (name == typoCorrections[i].original)
|
|
|
|
|
{
|
|
|
|
|
// Return the correction
|
|
|
|
|
return typoCorrections[i].corrected;
|
|
|
|
|
}
|
2006-07-13 21:00:22 +08:00
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void nameCorrection(NamePair& name)
|
|
|
|
|
{
|
|
|
|
|
// Loop over all known name corrections
|
|
|
|
|
for (unsigned int i = 0; i < sizeof(nameCorrections) / sizeof(NameCorrection); ++i)
|
2007-08-13 19:59:19 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
// If a matching name is found
|
|
|
|
|
if (name.first == nameCorrections[i].originalFirst &&
|
|
|
|
|
name.second == nameCorrections[i].originalSecond)
|
|
|
|
|
{
|
|
|
|
|
// Return the correction
|
|
|
|
|
name.first = nameCorrections[i].correctedFirst;
|
|
|
|
|
name.second = nameCorrections[i].correctedSecond;
|
|
|
|
|
|
|
|
|
|
// Early out, since we don't want corrections of corrections
|
|
|
|
|
return;
|
|
|
|
|
}
|
2007-08-13 19:59:19 +08:00
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
void lastValidCharacter(const string& name, unsigned int& pos, char c)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
for (unsigned int i = 0; i < pos; ++i)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (name[i] == c)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
|
|
|
|
pos = i;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
void lastValidCharacter(const string& name, unsigned int& last)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
|
|
|
|
lastValidCharacter(name, last, '.');
|
|
|
|
|
lastValidCharacter(name, last, ',');
|
|
|
|
|
lastValidCharacter(name, last, '\'');
|
|
|
|
|
lastValidCharacter(name, last, '/');
|
|
|
|
|
lastValidCharacter(name, last, '\\');
|
|
|
|
|
lastValidCharacter(name, last, ':');
|
|
|
|
|
lastValidCharacter(name, last, ';');
|
|
|
|
|
lastValidCharacter(name, last, ')');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
NamePair createName(const string& first, const string& second)
|
2005-03-13 09:47:46 +08:00
|
|
|
|
{
|
2005-11-15 01:07:11 +08:00
|
|
|
|
if (first.empty()) return EmptyNamePair;
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
// cout << "first = " << first << " second = " << second << endl;
|
|
|
|
|
|
2005-11-15 01:07:11 +08:00
|
|
|
|
unsigned int last = first.size();
|
|
|
|
|
lastValidCharacter(first, last);
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
if (last == 0) return EmptyNamePair;
|
|
|
|
|
|
|
|
|
|
string name;
|
|
|
|
|
|
|
|
|
|
name.append(first.begin(), first.begin() + last);
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
|
|
|
|
if (!validName(name)) return EmptyNamePair;
|
|
|
|
|
|
|
|
|
|
name = typoCorrection(name);
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 18:05:31 +08:00
|
|
|
|
if (second.empty() ||
|
2009-04-22 21:50:31 +08:00
|
|
|
|
!validName(second))
|
2005-11-15 18:05:31 +08:00
|
|
|
|
{
|
|
|
|
|
// filter any single or two letter words as unlike to be names.
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (name.size() <= 2) return EmptyNamePair;
|
2005-11-15 18:05:31 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
return NamePair(name, "");
|
2005-11-15 18:05:31 +08:00
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
|
|
|
|
last = second.size();
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 01:07:11 +08:00
|
|
|
|
lastValidCharacter(second, last);
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
if (last > 0)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
string surname(second.begin(), second.begin() + last);
|
|
|
|
|
|
2005-11-15 23:07:17 +08:00
|
|
|
|
if (validName(surname))
|
|
|
|
|
{
|
|
|
|
|
surname = typoCorrection(surname);
|
|
|
|
|
return NamePair(name, surname);
|
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 18:05:31 +08:00
|
|
|
|
// filter any single or two letter words as unlike to be names.
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (name.size() <= 2) return EmptyNamePair;
|
|
|
|
|
|
|
|
|
|
return NamePair(name, "");
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 04:51:28 +08:00
|
|
|
|
bool submissionsSequence(const Words& words, unsigned int& i)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (i + 1 >= words.size()) return false;
|
|
|
|
|
|
|
|
|
|
if (words[i] == "From" ||
|
|
|
|
|
words[i] == "from" ||
|
|
|
|
|
words[i] == "From:" ||
|
|
|
|
|
words[i] == "from:" ||
|
|
|
|
|
words[i] == "Merged" ||
|
|
|
|
|
words[i] == "Integrated") return true;
|
|
|
|
|
|
|
|
|
|
if (i + 2 >= words.size()) return false;
|
|
|
|
|
|
|
|
|
|
if (words[i] == "submitted" && words[i + 1] == "by")
|
2005-11-15 04:51:28 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 1;
|
2005-11-15 04:51:28 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
if (words[i] == "Folded" && words[i + 1] == "in")
|
2005-11-15 04:51:28 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 1;
|
2005-11-15 04:51:28 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (words[i] == "Rolled" && words[i + 1] == "in")
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 1;
|
2005-11-15 23:07:17 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (words[i] == "Checked" && words[i + 1] == "in")
|
2005-11-15 04:51:28 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 1;
|
2005-11-15 04:51:28 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (i + 3 >= words.size()) return false;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (words[i] == "sent" && words[i + 1] == "in" && words[i + 2] == "by")
|
2005-11-15 04:51:28 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 2;
|
2005-11-15 04:51:28 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2005-11-15 05:40:28 +08:00
|
|
|
|
|
2005-11-15 04:51:28 +08:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
void readContributors(NameMap& names, const string& file)
|
2005-11-15 04:51:28 +08:00
|
|
|
|
{
|
2008-11-07 23:08:08 +08:00
|
|
|
|
osgDB::ifstream fin(file.c_str());
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 01:07:11 +08:00
|
|
|
|
Words words;
|
|
|
|
|
while(fin)
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
string keyword;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
fin >> keyword;
|
|
|
|
|
words.push_back(keyword);
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
string blank_string;
|
|
|
|
|
|
|
|
|
|
for(unsigned int i = 0; i < words.size(); ++i)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (submissionsSequence(words, i))
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (i + 2 < words.size() && validName(words[i + 1]))
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
NamePair name = createName(words[i + 1], words[i + 2]);
|
2005-11-15 01:07:11 +08:00
|
|
|
|
nameCorrection(name);
|
2005-11-15 23:07:17 +08:00
|
|
|
|
if (!name.first.empty()) ++names[name];
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 2;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
else if (i + 1 < words.size() && validName(words[i + 1]))
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
NamePair name = createName(words[i + 1], blank_string);
|
2005-11-15 01:07:11 +08:00
|
|
|
|
nameCorrection(name);
|
2005-11-15 23:07:17 +08:00
|
|
|
|
if (!name.first.empty()) ++names[name];
|
2009-04-22 21:50:31 +08:00
|
|
|
|
i += 1;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2005-11-15 23:07:17 +08:00
|
|
|
|
else
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (words[i] == "robert")
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
|
|
|
|
++names[NameRobertOsfield];
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
else if (words[i] == "don")
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
|
|
|
|
++names[NameDonBurns];
|
|
|
|
|
}
|
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2005-11-15 23:07:17 +08:00
|
|
|
|
// reassign fisrt name entries to their full names entries
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (names.size() > 1)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
for (NameMap::iterator itr = names.begin(); itr != names.end(); )
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (itr->first.second.empty())
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2005-11-15 23:07:17 +08:00
|
|
|
|
NameMap::iterator next_itr = itr;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
++next_itr;
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
if (next_itr != names.end() && itr->first.first == next_itr->first.first)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2005-11-15 23:07:17 +08:00
|
|
|
|
next_itr->second += itr->second;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
names.erase(itr);
|
|
|
|
|
itr = next_itr;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
++itr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
++itr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 23:07:17 +08:00
|
|
|
|
// remove the double entries from Robert's contributions
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (names.size() > 1)
|
|
|
|
|
{
|
|
|
|
|
for (NameMap::iterator itr = names.begin(); itr != names.end(); ++itr)
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
if (itr->first != NameRobertOsfield && itr->first != NameDonBurns)
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
|
|
|
|
names[NameRobertOsfield] -= itr->second;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2005-11-15 23:07:17 +08:00
|
|
|
|
void buildContributors(NameMap& names)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2005-11-15 23:07:17 +08:00
|
|
|
|
// top five contributors
|
2009-04-22 21:50:31 +08:00
|
|
|
|
++names[NamePair("Robert", "Osfield")];
|
|
|
|
|
++names[NamePair("Don", "Burns")];
|
|
|
|
|
++names[NamePair("Marco", "Jez")];
|
|
|
|
|
++names[NamePair("Mike", "Weiblen")];
|
|
|
|
|
++names[NamePair("Geoff", "Michel")];
|
|
|
|
|
++names[NamePair("Ben", "van Basten")];
|
|
|
|
|
|
2005-11-15 23:07:17 +08:00
|
|
|
|
// contributors that don't appear in the ChangeLog due to their contributions
|
|
|
|
|
// being before CVS started for the OSG, or before the name logging began.
|
2009-04-22 21:50:31 +08:00
|
|
|
|
++names[NamePair("Karsten", "Weiss")];
|
|
|
|
|
++names[NamePair("Graeme", "Harkness")];
|
|
|
|
|
++names[NamePair("Axel", "Volley")];
|
|
|
|
|
++names[NamePair("Nikolaus", "Hanekamp")];
|
|
|
|
|
++names[NamePair("Kristopher", "Bixler")];
|
|
|
|
|
++names[NamePair("Tanguy", "Fautr<EFBFBD>")];
|
|
|
|
|
++names[NamePair("J.E.", "Hoffmann")];
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
int main( int argc, char** argv)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
osg::ArgumentParser arguments(&argc, argv);
|
|
|
|
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName() + " [options]");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("-h or --help", "Display this information");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--entries", "Print out number of entries into the ChangeLog file for each contributor.");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--version-number", "Print out version number only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--major-number", "Print out major version number only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--minor-number", "Print out minor version number only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--patch-number", "Print out patch version number only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--so-number ", "Print out shared object version number only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--openthreads-version-number", "Print out version number for OpenThreads only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("--openthreads-soversion-number", "Print out shared object version number for OpenThreads only");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("Matrix::value_type", "Print the value of Matrix::value_type");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("Plane::value_type", "Print the value of Plane::value_type");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("BoundingSphere::value_type", "Print the value of BoundingSphere::value_type");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("BoundingBox::value_type", "Print the value of BoundingBox::value_type");
|
|
|
|
|
arguments.getApplicationUsage()->addCommandLineOption("-r <file> or --read <file>", "Read the ChangeLog to generate an estimated contributors list.");
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
2007-04-23 05:40:46 +08:00
|
|
|
|
if (arguments.read("--version-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << osgGetVersion() << endl;
|
2007-04-23 05:40:46 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2007-09-25 20:34:01 +08:00
|
|
|
|
if (arguments.read("--major-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OPENSCENEGRAPH_MAJOR_VERSION << endl;
|
2007-09-25 20:34:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2007-09-25 20:34:01 +08:00
|
|
|
|
if (arguments.read("--minor-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OPENSCENEGRAPH_MINOR_VERSION << endl;
|
2007-09-25 20:34:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2007-09-25 20:34:01 +08:00
|
|
|
|
if (arguments.read("--patch-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OPENSCENEGRAPH_PATCH_VERSION << endl;
|
2007-09-25 20:34:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2008-03-11 04:30:56 +08:00
|
|
|
|
if (arguments.read("--soversion-number") || arguments.read("--so-number") )
|
2007-09-11 18:10:43 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << osgGetSOVersion() << endl;
|
2007-09-11 18:10:43 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2007-09-25 20:34:01 +08:00
|
|
|
|
|
2007-09-11 18:10:43 +08:00
|
|
|
|
if (arguments.read("--openthreads-version-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OpenThreadsGetVersion() << endl;
|
2007-09-11 18:10:43 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2007-09-25 20:34:01 +08:00
|
|
|
|
if (arguments.read("--openthreads-major-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OPENTHREADS_MAJOR_VERSION << endl;
|
2007-09-25 20:34:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2007-09-25 20:34:01 +08:00
|
|
|
|
if (arguments.read("--openthreads-minor-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OPENTHREADS_MINOR_VERSION << endl;
|
2007-09-25 20:34:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2007-09-25 20:34:01 +08:00
|
|
|
|
if (arguments.read("--openthreads-patch-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OPENTHREADS_PATCH_VERSION << endl;
|
2007-09-25 20:34:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-11 18:10:43 +08:00
|
|
|
|
if (arguments.read("--openthreads-soversion-number"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << OpenThreadsGetSOVersion() << endl;
|
2007-09-11 18:10:43 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2008-04-04 02:36:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (arguments.read("Matrix::value_type"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << ((sizeof(osg::Matrix::value_type) == 4) ? "float" : "double") << endl;
|
2008-04-04 02:36:50 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (arguments.read("Plane::value_type"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << ((sizeof(osg::Plane::value_type) == 4) ? "float" : "double") << endl;
|
2008-04-04 02:36:50 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (arguments.read("BoundingSphere::value_type"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << ((sizeof(osg::BoundingSphere::value_type) == 4) ? "float" : "double") << endl;
|
2008-04-04 02:36:50 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
2008-04-04 02:36:50 +08:00
|
|
|
|
if (arguments.read("BoundingBox::value_type"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << ((sizeof(osg::BoundingBox::value_type) == 4) ? "float" : "double") << endl;
|
2008-04-04 02:36:50 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-04-22 21:50:31 +08:00
|
|
|
|
|
|
|
|
|
cout << osgGetLibraryName() << " " << osgGetVersion() << endl << endl;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
|
|
|
|
bool printContributors = false;
|
2009-04-22 21:50:31 +08:00
|
|
|
|
bool printNumEntries = false;
|
|
|
|
|
while (arguments.read("--entries"))
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
|
|
|
|
printContributors = true;
|
2009-04-22 21:50:31 +08:00
|
|
|
|
printNumEntries = true;
|
2005-11-15 23:07:17 +08:00
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
string changeLog;
|
|
|
|
|
while (arguments.read("-r", changeLog) ||
|
|
|
|
|
arguments.read("--read", changeLog)) printContributors = true;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
|
|
|
|
|
// if user request help write it out to cout.
|
|
|
|
|
if (arguments.read("-h") || arguments.read("--help"))
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << arguments.getApplicationUsage()->getCommandLineUsage() << endl;
|
|
|
|
|
arguments.getApplicationUsage()->write(cout, arguments.getApplicationUsage()->getCommandLineOptions());
|
2005-11-15 01:07:11 +08:00
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (printContributors)
|
|
|
|
|
{
|
2005-11-15 23:07:17 +08:00
|
|
|
|
NameMap names;
|
2005-11-15 01:07:11 +08:00
|
|
|
|
buildContributors(names);
|
|
|
|
|
if (!changeLog.empty())
|
|
|
|
|
{
|
|
|
|
|
readContributors(names, changeLog);
|
|
|
|
|
}
|
2005-11-15 23:07:17 +08:00
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
typedef multimap<unsigned int, NamePair> SortedNameMap;
|
|
|
|
|
|
|
|
|
|
SortedNameMap sortedNames;
|
|
|
|
|
for (NameMap::iterator itr = names.begin(); itr != names.end(); ++itr)
|
2005-11-15 01:07:11 +08:00
|
|
|
|
{
|
2005-11-15 23:07:17 +08:00
|
|
|
|
sortedNames.insert(SortedNameMap::value_type(itr->second, itr->first));
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << names.size() << " Contributors:" << endl << endl;
|
|
|
|
|
|
2005-11-15 23:07:17 +08:00
|
|
|
|
if (printNumEntries)
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << "Entries Firstname Surname" << endl;
|
|
|
|
|
cout << "-------------------------" << endl;
|
|
|
|
|
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << sitr->first << "\t" << sitr->second.first << " " << sitr->second.second << endl;
|
2005-11-15 23:07:17 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << "Firstname Surname" << endl;
|
|
|
|
|
cout << "-----------------" << endl;
|
|
|
|
|
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
|
2005-11-15 23:07:17 +08:00
|
|
|
|
{
|
2009-04-22 21:50:31 +08:00
|
|
|
|
cout << sitr->second.first << " " << sitr->second.second << endl;
|
2005-11-15 23:07:17 +08:00
|
|
|
|
}
|
2005-11-15 01:07:11 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-13 09:47:46 +08:00
|
|
|
|
return 0;
|
|
|
|
|
}
|