1
0
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:
gka
2019-09-12 16:30:09 +03:00
committed by abv
parent 0cdaa8a4a5
commit d45b7860a5
2 changed files with 13 additions and 1 deletions

View File

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