0024701: TKernel - drop redundant headers Standard_ctype.hxx and Standard_inverse.h
authorkgv <kgv@opencascade.com>
Fri, 7 Mar 2014 11:16:22 +0000 (15:16 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 13 Mar 2014 09:24:31 +0000 (13:24 +0400)
src/Standard/FILES
src/Standard/Standard_Character.hxx
src/Standard/Standard_ExtCharacter.hxx
src/Standard/Standard_ctype.hxx [deleted file]
src/Standard/Standard_inverse.h [deleted file]
src/TCollection/TCollection_AsciiString.cxx
src/TCollection/TCollection_ExtendedString.cxx

index 140178f..7c1524e 100755 (executable)
@@ -55,8 +55,6 @@ Standard_Time.hxx
 Standard_Transient.hxx
 Standard_Transient_proto.hxx
 Standard_TypeDef.hxx
-Standard_ctype.hxx
-Standard_inverse.h
 Standard_math.cxx
 Standard_math.hxx
 Standard_osd_ffi.c
index b973a8e..6b0adfa 100644 (file)
 #ifndef _Standard_Character_HeaderFile
 #define _Standard_Character_HeaderFile
 
-#ifndef _Standard_ctype_HeaderFile
-#include <Standard_ctype.hxx>
-#endif
+#include <Standard_TypeDef.hxx>
 
 #include <string.h>
-
-#ifndef _Standard_TypeDef_HeaderFile
-#include <Standard_TypeDef.hxx>
-#endif
+#include <cctype>
 
 class Handle_Standard_Type;
 
@@ -91,19 +86,19 @@ inline Standard_Boolean IsSimilar(const Standard_Character One,
 // IsAlphabetic : Returns Standard_True if a character is alphabetic
 // ==================================================================
 inline Standard_Boolean IsAlphabetic(const Standard_Character me) 
-{ return isalpha((unsigned char)me); }
+{ return std::isalpha ((unsigned char)me); }
 
 // ==================================================================
 // IsDigit : Returns Standard_True if a character is a digit
 // ==================================================================
 inline Standard_Boolean IsDigit(const Standard_Character me) 
-{ return isdigit((unsigned char)me); }
+{ return std::isdigit ((unsigned char)me); }
 
 // ==================================================================
 // IsXDigit : Returns Standard_True if a character is a digit
 // ==================================================================
 inline Standard_Boolean IsXDigit(const Standard_Character me) 
-{ return isxdigit((unsigned char)me); }
+{ return std::isxdigit((unsigned char)me); }
 
 // ==================================================================
 // IsAlphanumeric : Returns Standard_True if a character is alphanumeric
@@ -115,26 +110,26 @@ inline Standard_Boolean IsAlphanumeric(const Standard_Character me)
 // IsControl : Returns Standard_True if a character  is a control character
 // ==================================================================
 inline Standard_Boolean IsControl(const Standard_Character me) 
-{ return iscntrl((unsigned char)me); }
+{ return std::iscntrl((unsigned char)me); }
 
 
 // ==================================================================
 // IsGraphic : Returns Standard_True if a character is graphic
 // ==================================================================
 inline Standard_Boolean IsGraphic(const Standard_Character me) 
-{ return isgraph((unsigned char)me); }
+{ return std::isgraph((unsigned char)me); }
 
 // ==================================================================
 // IsLowerCase : Returns Standard_True if a character is lowercase
 // ==================================================================
 inline Standard_Boolean IsLowerCase(const Standard_Character me) 
-{ return islower((unsigned char)me); }
+{ return std::islower((unsigned char)me); }
 
 // ==================================================================
 // IsPrintable : Returns Standard_True if a character is printable
 // ==================================================================
 inline Standard_Boolean IsPrintable(const Standard_Character me) 
-{ return isprint((unsigned char)me); }
+{ return std::isprint((unsigned char)me); }
 
 // ==================================================================
 // IsPunctuation : Returns Standard_True if a character is a graphic and 
@@ -147,25 +142,25 @@ inline Standard_Boolean IsPunctuation(const Standard_Character me)
 // IsSpace : Returns Standard_True if a character is a space
 // ==================================================================
 inline Standard_Boolean IsSpace(const Standard_Character me) 
-{ return isspace((unsigned char)me); }
+{ return std::isspace((unsigned char)me); }
 
 // ==================================================================
 // IsUppercase : Returns Standard_True if a character is uppercase
 // ==================================================================
 inline Standard_Boolean IsUpperCase(const Standard_Character me) 
-{ return isupper((unsigned char)me); }
+{ return std::isupper((unsigned char)me); }
 
 // ==================================================================
 // LowerCase : Returns a lowercase character
 // ==================================================================
 inline Standard_Character LowerCase(const Standard_Character me) 
-{ return (Standard_Character)(unsigned char)tolower(me); }
+{ return (Standard_Character)(unsigned char)std::tolower(me); }
 
 // ==================================================================
 // UpperCase : Returns a uppercase character
 // ==================================================================
 inline Standard_Character UpperCase(const Standard_Character me) 
-{ return (Standard_Character)(unsigned char)toupper(me); }
+{ return (Standard_Character)(unsigned char)std::toupper(me); }
 
 // ------------------------------------------------------------------
 // ShallowCopy : Make a copy of one Character
@@ -174,17 +169,3 @@ inline Standard_Character ShallowCopy (const Standard_Character me)
 { return me; }
 
 #endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 68e2668..35b8ef8 100644 (file)
 #ifndef _Standard_ExtCharacter_HeaderFile
 #define _Standard_ExtCharacter_HeaderFile
 
-#ifndef _Standard_ctype_HeaderFile
-#include <Standard_ctype.hxx>
-#endif
-
-#include <string.h>
-
-#ifndef _Standard_TypeDef_HeaderFile
 #include <Standard_TypeDef.hxx>
-#endif
-
-#ifndef _Standard_OStream_HeaderFile
 #include <Standard_OStream.hxx>
-#endif
+
+#include <string.h>
 
 class Handle_Standard_Type;
 
diff --git a/src/Standard/Standard_ctype.hxx b/src/Standard/Standard_ctype.hxx
deleted file mode 100644 (file)
index 793f38d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-//============================================================================
-//==== Titre: Standard_ctype.hxx.hxx
-//==== Role : This file is dedicated to encapsulate ctype.h file
-//==== At the origin this file contains #define _U _X .... statements
-//==== and conflicts with generated variables names may occur
-//==== 
-//==== Implementation: The #define _X .. statements have been replaced
-//==== with #define Standard_ctype_X ... statements
-//==== Only tested on sun platform
-//============================================================================
-
-
-/*     @(#)ctype.h 1.9 89/10/06 SMI; from UCB 4.1 83/05/03     */
-
-
-#ifndef _Standard_ctype_HeaderFile
-#define _Standard_ctype_HeaderFile
-#include <ctype.h>
-#endif 
diff --git a/src/Standard/Standard_inverse.h b/src/Standard/Standard_inverse.h
deleted file mode 100644 (file)
index b70fac3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright (c) 1998-1999 Matra Datavision
- Copyright (c) 1999-2014 OPEN CASCADE SAS
-
- This file is part of Open CASCADE Technology software library.
-
- 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.
-
- Alternatively, this file may be used under the terms of Open CASCADE
- commercial license or contractual agreement.
-*/
-
-#define inverse(a)\
-(0 | (( a & 0x000000ff ) << 24 )\
-|    (( a & 0x0000ff00 ) << 8  )\
-|    (( a & 0x00ff0000 ) >> 8  )\
-|    (( a >> 24 ) & 0x000000ff ) )
index ed20c7b..ca23604 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <cstdio>
-
 #include <TCollection_AsciiString.ixx>
+#include <TCollection_ExtendedString.hxx>
+
 #include <Standard.hxx>
 #include <Standard_NullObject.hxx>
 #include <Standard_OutOfRange.hxx>
 #include <Standard_NegativeValue.hxx>
 #include <Standard_NumericError.hxx>
-#include <Standard_ctype.hxx>
 
-#include <TCollection_ExtendedString.hxx>
-
-// ###### PLACER LE TYPE NON DEFINI strtol (portabilite) ######
-#ifdef WNT
-# include <cstring>
-#else
-extern "C" {
-     long strtol(const char*, char**, int);
-}
-#endif  // WNT
+#include <cstdio>
+#include <cctype>
+#include <cstring>
 
 // Shortcuts to standard allocate and reallocate functions
 static inline Standard_PCharacter Allocate(const Standard_Size aLength)
index 7e22807..b71ae73 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-//#if defined(WNT) || defined(LIN)
-#include <stdio.h>
-//#endif
-
 #include <TCollection_ExtendedString.ixx>
 #include <Standard.hxx>
 #include <Standard_ExtString.hxx>
 #include <Standard_NullObject.hxx>
 #include <Standard_OutOfRange.hxx>
-#include <Standard_ctype.hxx>
 #include <TCollection_AsciiString.hxx>
 
+#include <cstdio>
+#include <cctype>
+
 static
   Standard_PExtCharacter Allocate(const Standard_Size aLength);