888 __extrem_(MAX__##TYPENAME##__##TYPENAME, TYPENAME, __time_cmp(op1, tmp) < 0) /* Overloaded function */ |
888 __extrem_(MAX__##TYPENAME##__##TYPENAME, TYPENAME, __time_cmp(op1, tmp) < 0) /* Overloaded function */ |
889 __ANY_DATE(__iec_) |
889 __ANY_DATE(__iec_) |
890 __iec_(TIME) |
890 __iec_(TIME) |
891 #undef __iec_ |
891 #undef __iec_ |
892 |
892 |
893 #define __STR_CMP(str1, str2) memcmp((char*)&str1.body,(char*)&str2.body, str1.len < str2.len ? str1.len : str2.len) |
893 inline int __str_cmp(uint8_t* str1, __strlen_t len1, uint8_t* str2, __strlen_t len2) { |
|
894 int cmp = memcmp(str1, str2, len1 < len2 ? len1 : len2); |
|
895 return cmp ? cmp : (len1 > len2 ? 1 : (len1 < len2 ? - 1 : 0)); |
|
896 } |
|
897 #define __STR_CMP(str1, str2) __str_cmp(str1.body, str1.len, str2.body, str2.len) |
894 |
898 |
895 /* Max for string data types */ |
899 /* Max for string data types */ |
896 __extrem_(MAX_STRING, STRING, __STR_CMP(op1,tmp) < 0) /* The explicitly typed standard functions */ |
900 __extrem_(MAX_STRING, STRING, __STR_CMP(op1,tmp) < 0) /* The explicitly typed standard functions */ |
897 __extrem_(MAX__STRING__STRING, STRING, __STR_CMP(op1,tmp) < 0) /* Overloaded function */ |
901 __extrem_(MAX__STRING__STRING, STRING, __STR_CMP(op1,tmp) < 0) /* Overloaded function */ |
898 |
902 |