[vtk-developers] New additions to vtkSetGet.h and vtkParse.y work fine.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Sat Apr 28 15:59:33 EDT 2001
hi,
I just finished building VTK with the proposed additions to
vtkSetClampMacro. It builds cleanly and runs fine. I just commited
the changes th vtkSetGet.h but am unsure if I should also commit the
vtkParse.y and vtkParse.tab.c. I patched vtkParse.y and obtained
vtkParse.tab.c using GNU bison version 1.22 (newer versions gave me
the error I reported earlier). Also, do I have to edit
wrap/README.txt and say I ran bison on 4/28/2001 or something?
Attached is the patch to vtkParse.y so you can check if things are
okay.
thanks,
prabhu
------------------------------------------------------------
--- vtkParse.y.orig Sun Apr 29 01:22:48 2001
+++ vtkParse.y Sun Apr 29 01:22:32 2001
@@ -424,12 +424,32 @@
{preSig("void Set"); postSig(" ("); } type_red2
{postSig(");"); openSig = 0;} ',' maybe_other_no_semi ')'
{
+ char *local = strdup(currentFunction->Signature);
+ sscanf (currentFunction->Signature, "%*s %*s (%s);", local);
sprintf(temps,"Set%s",$<str>3);
currentFunction->Name = strdup(temps);
currentFunction->NumberOfArguments = 1;
currentFunction->ArgTypes[0] = $<integer>6;
currentFunction->ArgCounts[0] = 0;
currentFunction->ReturnType = 2;
+ output_function();
+
+ currentFunction->Signature = (char *)malloc(2048);
+ sigAllocatedLength = 2048;
+ sprintf(currentFunction->Signature,"%s Get%sMinValue ();",local,$<str>3);
+ sprintf(temps,"Get%sMinValue",$<str>3);
+ currentFunction->Name = strdup(temps);
+ currentFunction->NumberOfArguments = 0;
+ currentFunction->ReturnType = $<integer>6;
+ output_function();
+
+ currentFunction->Signature = (char *)malloc(2048);
+ sigAllocatedLength = 2048;
+ sprintf(currentFunction->Signature,"%s Get%sMaxValue ();",local,$<str>3);
+ sprintf(temps,"Get%sMaxValue",$<str>3);
+ currentFunction->Name = strdup(temps);
+ currentFunction->NumberOfArguments = 0;
+ currentFunction->ReturnType = $<integer>6;
output_function();
}
| SetObjectMacro '(' any_id ','
More information about the vtk-developers
mailing list