mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0030113: Data Exchange - STL file in text format with "Facet" keywords can't be imported
Case-sensitive method strncmp used in the REStl_Reader cosidered register of letter was replaced on the method _strnicmp for Windows and strncasecmp for Linux and MacOs Test script for case 0030113
This commit is contained in:
@@ -236,10 +236,14 @@ Standard_Boolean RWStl_Reader::IsAscii (Standard_IStream& theStream)
|
||||
#define GETPOS(aPos) ((int64_t)aPos)
|
||||
#endif
|
||||
|
||||
# if defined(_MSC_VER) && ! defined(strncasecmp)
|
||||
# define strncasecmp _strnicmp
|
||||
# endif
|
||||
|
||||
static inline bool str_starts_with (const char* theStr, const char* theWord, int theN)
|
||||
{
|
||||
while (isspace (*theStr) && *theStr != '\0') theStr++;
|
||||
return !strncmp (theStr, theWord, theN);
|
||||
return !strncasecmp (theStr, theWord, theN);
|
||||
}
|
||||
|
||||
static bool ReadVertex (const char* theStr, double& theX, double& theY, double& theZ)
|
||||
|
Reference in New Issue
Block a user