Skip to content

Commit

Permalink
Manual search & destroy of (B|E)TX
Browse files Browse the repository at this point in the history
First automatically removed lines with only BTX/ETX
from .h files with the following regexes:

^ *// *BTX\r
^ *// *ETX\r

and replaced occurances with nothing. Committed that, then manually
removed various remaining cases of BTX/ETX, and related comments, and parsing stuff,
then trashed the first commit.
  • Loading branch information
seanm committed May 20, 2016
1 parent 61b3201 commit 55878a2
Show file tree
Hide file tree
Showing 23 changed files with 3 additions and 136 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ set(VTK_PYTHON_VERSION 2 CACHE STRING
# Add the option for build the Python wrapping to VTK.
option(VTK_WRAP_JAVA "Should VTK Java wrapping be built?" OFF)

# FIXME: This variable should not be necessary once we are done
set(VTK_IGNORE_BTX ON CACHE INTERNAL "VTK modular always ignores BTX")

# Force reset of hints file location in cache if it was moved
if(VTK_WRAP_HINTS)
if(NOT EXISTS ${VTK_WRAP_HINTS})
Expand Down
1 change: 0 additions & 1 deletion Common/Core/Testing/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ vtk_add_test_python(
TestEnums.py
TestExecuteMethodFinalizeCrash.py
TestGhost.py
TestIgnoreBTX.py
TestMutable.py
TestNumpySupport.py
TestNumpyInterface.py
Expand Down
18 changes: 0 additions & 18 deletions Common/Core/Testing/Python/TestIgnoreBTX.py

This file was deleted.

1 change: 0 additions & 1 deletion Common/Core/Testing/Tcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ vtk_add_test_tcl(
# TestEmptyInput.tcl
# TestSetGet.tcl
TestString.tcl
TestIgnoreBTX.tcl
otherInterp.tcl
otherPrint.tcl
)
26 changes: 0 additions & 26 deletions Common/Core/Testing/Tcl/TestIgnoreBTX.tcl

This file was deleted.

2 changes: 0 additions & 2 deletions Common/Core/vtkCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "vtkCommonCoreModule.h" // For export macro
#include "vtkObject.h"

//BTX - begin tcl exclude
class vtkCollectionElement //;prevents pick-up by man page generator
{
public:
Expand All @@ -40,7 +39,6 @@ class vtkCollectionElement //;prevents pick-up by man page generator
vtkCollectionElement *Next;
};
typedef void * vtkCollectionSimpleIterator;
//ETX end tcl exclude

class vtkCollectionIterator;

Expand Down
4 changes: 0 additions & 4 deletions Common/DataModel/vtkAbstractCellLocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
// When deriving a class from vtkAbstractCellLocator, one should include the
// 'hidden' member functions by the following construct in the derived class
// \verbatim
// //BTX
// using vtkAbstractCellLocator::IntersectWithLine;
// using vtkAbstractCellLocator::FindClosestPoint;
// using vtkAbstractCellLocator::FindClosestPointWithinRadius;
// //ETX
// \endverbatim

//
Expand Down Expand Up @@ -259,9 +257,7 @@ class VTKCOMMONDATAMODEL_EXPORT vtkAbstractCellLocator : public vtkLocator
int LazyEvaluation;
int UseExistingSearchStructure;
vtkGenericCell *GenericCell;
//BTX - begin tcl exclude
double (*CellBounds)[6];
//ETX - end tcl exclude

private:
vtkAbstractCellLocator(const vtkAbstractCellLocator&); // Not implemented.
Expand Down
4 changes: 0 additions & 4 deletions Filters/Core/vtkDecimatePro.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,6 @@ class VTKFILTERSCORE_EXPORT vtkDecimatePro : public vtkPolyDataAlgorithm
//
// Special classes for manipulating data
//
//BTX - begin tcl exclude
//
// Special structures for building loops
class LocalVertex
{
Expand Down Expand Up @@ -340,8 +338,6 @@ class VTKFILTERSCORE_EXPORT vtkDecimatePro : public vtkPolyDataAlgorithm
LocalTri *Array; // pointer to data
vtkIdType MaxId; // maximum index inserted thus far
};
//ETX - end tcl exclude
//

private:
void InitializeQueue(vtkIdType numPts);
Expand Down
2 changes: 0 additions & 2 deletions Filters/FlowPaths/vtkStreamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ class VTKFILTERSFLOWPATHS_EXPORT vtkStreamer : public vtkPolyDataAlgorithm
//
// Special classes for manipulating data
//
//BTX - begin tcl exclude
//
class StreamPoint {
public:
double x[3]; // position
Expand Down
3 changes: 1 addition & 2 deletions Filters/General/vtkHyperStreamline.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ vtkStandardNewMacro(vtkHyperStreamline);

//
// Special classes for manipulating data
//BTX
//
class vtkHyperPoint { //;prevent man page generation
public:
vtkHyperPoint(); // method sets up storage
Expand All @@ -46,7 +46,6 @@ class vtkHyperPoint { //;prevent man page generation
double S; // scalar value
double D; // distance travelled so far
};
//ETX

class vtkHyperArray { //;prevent man page generation
public:
Expand Down
3 changes: 1 addition & 2 deletions Filters/General/vtkUncertaintyTubeFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ vtkStandardNewMacro(vtkUncertaintyTubeFilter);

//
// Special classes for manipulating data
//BTX
//
class vtkTubePoint { //;prevent man page generation
public:
vtkTubePoint(); // method sets up storage
Expand All @@ -44,7 +44,6 @@ class vtkTubePoint { //;prevent man page generation
double V2[3]; // another, orthogonal normal to the line
double Vector[3];//local uncertainty vector
};
//ETX

class vtkTubeArray { //;prevent man page generation
public:
Expand Down
2 changes: 0 additions & 2 deletions Filters/Hybrid/Testing/Cxx/TestTemporalCacheSimple.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ class vtkTemporalSphereSource : public vtkSphereSource {
// Save the range of valid timestep index values.
vtkGetVector2Macro(TimeStepRange, int);

//BTX
// void GetTimeStepValues(std::vector<double> &steps);
//ETX

protected:
vtkTemporalSphereSource();
Expand Down
1 change: 0 additions & 1 deletion Geovis/Core/vtkCompassWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class VTKGEOVISCORE_EXPORT vtkCompassWidget : public vtkAbstractWidget
static void MoveAction(vtkAbstractWidget*);
static void TimerAction(vtkAbstractWidget*);

//BTX - manage the state of the widget
int WidgetState;
enum _WidgetState
{
Expand Down
4 changes: 0 additions & 4 deletions Imaging/Morphological/vtkImageConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class vtkImageData;
//
// Special classes for manipulating data
//
//BTX - begin tcl exclude
//
// For the breadth first search
class vtkImageConnectorSeed { //;prevent man page generation
public:
Expand All @@ -45,8 +43,6 @@ class vtkImageConnectorSeed { //;prevent man page generation
int Index[3];
vtkImageConnectorSeed *Next;
};
//ETX - end tcl exclude
//


class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageConnector : public vtkObject
Expand Down
2 changes: 0 additions & 2 deletions Utilities/Doxygen/doc_index.stop
Original file line number Diff line number Diff line change
Expand Up @@ -727,5 +727,3 @@ ymax
ymin
zmax
zmin
ETX
BTX
6 changes: 1 addition & 5 deletions Utilities/Upgrading/README.WindowsMangling.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ of whether windows.h has been included before it:
#ifdef VTK_WORKAROUND_WINDOWS_MANGLE
# undef GetClassNameW
# undef GetClassNameA
//BTX
const char* GetClassNameA() const;
const char* GetClassNameW() const;
//ETX
#endif

The method GetClassName has three cases. If windows.h is not included
Expand All @@ -103,9 +101,7 @@ preprocessor will not recursively expand a macro, so replacement stops
there and the GetClassName method is declared. When UNICODE is
defined the same process occurs but through GetClassNameW instead.
The methods GetClassNameA and GetClassNameW are not mangled so they
can be provided directly. They are surrounded by a BTX/ETX pair
because they should not be wrapped since scripting language code will
not be mangled by windows.h.
can be provided directly.

Now that all three names are provided we can address the fact that
GetClassName is supposed to be a virtual function. When a subclass
Expand Down
6 changes: 0 additions & 6 deletions Wrapping/Tools/lex.yy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2305,16 +2305,10 @@ YY_RULE_SETUP
case 4:
YY_RULE_SETUP

{
if (!IgnoreBTX) {
skip_ahead_until("//ETX");
}
}
YY_BREAK
case 5:
YY_RULE_SETUP

/* eat mismatched ETX */
YY_BREAK
case 6:
YY_RULE_SETUP
Expand Down
5 changes: 0 additions & 5 deletions Wrapping/Tools/vtkParse.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ void vtkParse_IncludeDirectory(const char *dirname);
*/
const char *vtkParse_FindIncludeFile(const char *filename);

/**
* Ignore BTX/ETX markers
*/
void vtkParse_SetIgnoreBTX(int option);

/**
* Set the command name, for error reporting and diagnostics.
*/
Expand Down
8 changes: 0 additions & 8 deletions Wrapping/Tools/vtkParse.l
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ ID [a-zA-Z_\x80-\xff][0-9a-zA-Z_\x80-\xff]*

"/*" { skip_comment(); }

^[\t ]*"//BTX".* {
if (!IgnoreBTX) {
skip_ahead_until("//ETX");
}
}

^[\t ]*"//ETX".* /* eat mismatched ETX */

^[\t ]*("@interface"|"@implementation") {
skip_ahead_until("@end");
}
Expand Down
14 changes: 0 additions & 14 deletions Wrapping/Tools/vtkParse.tab.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ int NumberOfDefinitions = 0;
const char **Definitions;

/* options that can be set by the programs that use the parser */
int IgnoreBTX = 0;
int Recursive = 0;
const char *CommandName = NULL;

Expand Down Expand Up @@ -12397,19 +12396,6 @@ void outputGetVectorMacro(const char *var, unsigned int paramType,
output_function();
}

/* Set a flag to ignore BTX/ETX markers in the files */
void vtkParse_SetIgnoreBTX(int option)
{
if (option)
{
IgnoreBTX = 1;
}
else
{
IgnoreBTX = 0;
}
}

/* Set a flag to recurse into included files */
void vtkParse_SetRecursive(int option)
{
Expand Down
14 changes: 0 additions & 14 deletions Wrapping/Tools/vtkParse.y
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ int NumberOfDefinitions = 0;
const char **Definitions;

/* options that can be set by the programs that use the parser */
int IgnoreBTX = 0;
int Recursive = 0;
const char *CommandName = NULL;

Expand Down Expand Up @@ -4974,19 +4973,6 @@ void outputGetVectorMacro(const char *var, unsigned int paramType,
output_function();
}

/* Set a flag to ignore BTX/ETX markers in the files */
void vtkParse_SetIgnoreBTX(int option)
{
if (option)
{
IgnoreBTX = 1;
}
else
{
IgnoreBTX = 0;
}
}

/* Set a flag to recurse into included files */
void vtkParse_SetRecursive(int option)
{
Expand Down
7 changes: 0 additions & 7 deletions Wrapping/Tools/vtkParseMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,6 @@ FileInfo *vtkParse_Main(int argc, char *argv[])
exit(1);
}

/* if a hierarchy is was given, then BTX/ETX can be ignored */
vtkParse_SetIgnoreBTX(0);
if (options.HierarchyFileNames)
{
vtkParse_SetIgnoreBTX(1);
}

/* parse the input file */
data = vtkParse_ParseFile(options.InputFileName, ifile, stderr);

Expand Down
3 changes: 0 additions & 3 deletions Wrapping/Tools/vtkWrapHierarchy.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,6 @@ static char **vtkWrapHierarchy_ParseHeaderFile(
lines[0] = NULL;
}

/* always ignore BTX markers when building hierarchy files */
vtkParse_SetIgnoreBTX(1);

/* the "concrete" flag doesn't matter, just set to zero */
data = vtkParse_ParseFile(filename, fp, stderr);

Expand Down

0 comments on commit 55878a2

Please sign in to comment.