X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cfc676704bebcd57e5ea98bb43154245a150948f..0c1113a3d64447cac78d831318fd050b8d2ae9a4:/include/xbt/str.h diff --git a/include/xbt/str.h b/include/xbt/str.h index 05da4c6807..634291f45c 100644 --- a/include/xbt/str.h +++ b/include/xbt/str.h @@ -16,10 +16,6 @@ #include /* va_* */ #include /* FILE */ -#ifdef _MSC_VER -#define strcasecmp _stricmp -#endif - SG_BEGIN_DECL() /** @addtogroup XBT_str @@ -44,11 +40,9 @@ XBT_PUBLIC(xbt_dynar_t) xbt_str_split_str(const char *s, const char *sep); XBT_PUBLIC(char *) xbt_str_join(xbt_dynar_t dynar, const char *sep); XBT_PUBLIC(char *) xbt_str_join_array(const char *const *strs, const char *sep); -/* */ XBT_PUBLIC(void) xbt_str_subst(char *str, char from, char to, int amount); XBT_PUBLIC(char *) xbt_str_varsubst(const char *str, xbt_dict_t patterns); -/* */ XBT_PUBLIC(char *) xbt_str_from_file(FILE * file); XBT_PUBLIC(long int) xbt_str_parse_int(const char* str, const char* error_msg); @@ -62,7 +56,6 @@ XBT_PUBLIC(double) xbt_str_parse_double(const char* str, const char* error_msg); */ static inline unsigned int xbt_str_hash_ext(const char *str, int str_len) { - #ifdef DJB2_HASH_FUNCTION /* fast implementation of djb2 algorithm */ int c; @@ -118,9 +111,7 @@ static inline unsigned int xbt_str_hash(const char *str) while (*str) { /* multiply by the 32 bit FNV magic prime mod 2^32 */ - hash += - (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + - (hash << 24); + hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24); /* xor the bottom with the current byte */ hash ^= (unsigned int) *str++; @@ -138,6 +129,5 @@ static inline unsigned int xbt_str_hash(const char *str) } /**@}*/ - SG_END_DECL() #endif /* XBT_STR_H */