ML Reference
mlUtilsSystemC.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_UTILS_SYSTEM_C_H
14 #define ML_UTILS_SYSTEM_C_H
15 
17 
18 #include "mlUtilities.h"
19 
20 // Include global compiler switches for the ML.
21 #include "mlConfig.h"
22 
23 #include "mlTypeDefs.h"
24 
25 #include <ThirdPartyWarningsDisable.h>
26 
27 // We always need stdlib.h for e.g., size_t.
28 #include <cstdlib>
29 
30 // We always need stdio.h for e.g., FILE in mlFileSystem.
31 #include <cstdio>
32 
33 #include <ThirdPartyWarningsRestore.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 //--------------------------------------------------------------------------------------------
40 //
43 //
44 //--------------------------------------------------------------------------------------------
45 
51 extern ML_UTILS_EXPORT int MLAlwaysTrue;
52 
59 
67 
68 //----------------------------------------------------------------------------------
70 //----------------------------------------------------------------------------------
71 
72 #ifdef WIN32
73 
74  // WIN32 case:
76  #define strcasecmp(a,b) _stricmp((a),(b))
77 
79  #define strncasecmp(a,b,c) _strnicmp((a),(b),(c))
80 
83  #define strtold(a,b) strtod((a),(b))
84 
85 #else
86 
88  ML_UTILS_EXPORT char* strlwr(char* a);
89 
90 #endif
91 
100 [[nodiscard]]
101 ML_UTILS_EXPORT MLint64 MLint64Scan(const char* source, char** endPtr);
102 
111 [[nodiscard]]
112 ML_UTILS_EXPORT MLuint64 MLuint64Scan(const char* source, char** endPtr);
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif // __mlUtilsSystemC_H
120 
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
Definition: mlTypeDefs.h:425
INT64 MLint64
Include 64 bit integer support for Windows or Unix.
Definition: mlTypeDefs.h:412
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
Definition: mlUtilities.h:20
ML_UTILS_EXPORT int MLAlwaysFalse
Variable which is always false (=0), but non constant to make it impossible for compilers to detect t...
ML_UTILS_EXPORT int MLAlwaysTrue
Variable which is always true (=1), but non constant to make it impossible for compilers to detect th...
ML_UTILS_EXPORT MLuint64 MLuint64Scan(const char *source, char **endPtr)
Reads an MLuint64 from a character string source and returns scanned value as MLuint64.
ML_UTILS_EXPORT int MLAlwaysExecuted()
A do-nothing function call which cannot be optimized away to avoid that function bodies etc.
ML_UTILS_EXPORT MLint64 MLint64Scan(const char *source, char **endPtr)
Reads an MLint64 from a character string source and returns scanned value as MLint64.