0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / QADNaming / QADNaming_SelectionCommands.cxx
old mode 100755 (executable)
new mode 100644 (file)
index cca42fe..acbeb60
@@ -1,24 +1,18 @@
 // Created on: 1997-10-20
 // Created by: Yves FRICAUD
 // Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <QADNaming.hxx>
 
@@ -134,7 +128,7 @@ static Standard_Integer QADNaming_Select (Draw_Interpretor& di, Standard_Integer
     }
     return 0;  
   }
-  di << "QADNaming_Select : Error" << "\n";
+  di << "QADNaming_Select : Error\n";
   return 1;
 }
 
@@ -154,17 +148,17 @@ static Standard_Integer QADNaming_SolveSelection (Draw_Interpretor& di, Standard
     Standard_Integer i;
     for(i=3;i<n;i++) {
       TDF_Label aValidLab;
-      if (!DDF::FindLabel(aLabel.Data(),a[i],aValidLab)) di<<"Warning: label "<<a[i]<<" not exists"<<"\n";
+      if (!DDF::FindLabel(aLabel.Data(),a[i],aValidLab)) di<<"Warning: label "<<a[i]<<" not exists\n";
       else valid.Add(aValidLab);
     }
     Standard_Boolean done = SL.Solve(valid);
     TopoDS_Shape Res = TNaming_Tool::CurrentShape(SL.NamedShape());
     //TopoDS_Shape Res = TNaming_Tool::CurrentShape(NS);
-    sprintf (name,"%s_%s","new",a[2]);
+    Sprintf (name,"%s_%s","new",a[2]);
     Display (name,Res);
     return done?0:1;
   }
-  di << "Usage:  DumpSelection DF entry [validlabel1 validlabel2 ...]" << "\n";
+  di << "Usage:  DumpSelection DF entry [validlabel1 validlabel2 ...]\n";
   return 1;
 }
 
@@ -183,7 +177,7 @@ static Standard_Integer QADNaming_DumpSelection (Draw_Interpretor& di,
     if (!DDF::FindLabel(DF,a[2],L)) return 1;
     Handle(TNaming_Naming) naming;
     if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {  
-      di <<"QADNaming_DumpSelection : not a selection" << "\n";
+      di <<"QADNaming_DumpSelection : not a selection\n";
       return 1;
     }
     DumpNaming(naming, di);
@@ -206,7 +200,7 @@ static Standard_Integer QADNaming_DumpSelection (Draw_Interpretor& di,
     }
     return 0;
   }
-  di << "QADNaming_DumpSelection : Error" << "\n";
+  di << "QADNaming_DumpSelection : Error\n";
   return 1;  
 }
 
@@ -225,7 +219,7 @@ static Standard_Integer QADNaming_ArgsSelection (Draw_Interpretor& di,
     if (!DDF::FindLabel(DF,a[2],L)) return 1;
     Handle(TNaming_Naming) naming;
     if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {  
-      di <<"QADNaming_DumpSelection : not a selection" << "\n";
+      di <<"QADNaming_DumpSelection : not a selection\n";
       return 1;
     }  
     TCollection_AsciiString Entry;
@@ -240,7 +234,7 @@ static Standard_Integer QADNaming_ArgsSelection (Draw_Interpretor& di,
     di << "\n";
     return 0;
   }
-  di << "QADNaming_ArgsSelection : Error" << "\n";
+  di << "QADNaming_ArgsSelection : Error\n";
   return 1;  
 }
 
@@ -308,7 +302,7 @@ static Standard_Integer QADNaming_Attachment (Draw_Interpretor& di,
     di << "\n";
     return 0;
   }
-  di << "QADNaming_Attachment : Error" << "\n";
+  di << "QADNaming_Attachment : Error\n";
   return 1;  
 }