1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0024701: TKernel - drop redundant headers Standard_ctype.hxx and Standard_inverse.h

This commit is contained in:
kgv 2014-03-07 15:16:22 +04:00 committed by bugmaster
parent 3d68eaf52b
commit 971c281b11
7 changed files with 23 additions and 117 deletions

View File

@ -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

View File

@ -24,15 +24,10 @@
#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

View File

@ -24,20 +24,11 @@
#ifndef _Standard_ExtCharacter_HeaderFile
#define _Standard_ExtCharacter_HeaderFile
#ifndef _Standard_ctype_HeaderFile
#include <Standard_ctype.hxx>
#endif
#include <Standard_TypeDef.hxx>
#include <Standard_OStream.hxx>
#include <string.h>
#ifndef _Standard_TypeDef_HeaderFile
#include <Standard_TypeDef.hxx>
#endif
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_ExtCharacter_Type_();

View File

@ -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

View File

@ -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 ) )

View File

@ -12,26 +12,18 @@
// 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)

View File

@ -12,18 +12,16 @@
// 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);