X-Git-Url: https://git.datadissipation.net/libcext/blobdiff_plain/576f1e91efe7bbb49a5682903b23d6d37b6b6725..8402ff584f71d3551d18865dce73b3f660fe9b36:/strdup.h diff --git a/strdup.h b/strdup.h index b7f1e3e..3d9f769 100644 --- a/strdup.h +++ b/strdup.h @@ -26,32 +26,32 @@ */ /* https://git.datadissipation.net */ -#ifndef STRDUP_H_ - #define STRDUP_H_ 1 +#ifndef LCE_STRDUP_H + #define LCE_STRDUP_H 1 - #ifdef STRDUP_INCLUDE_LIBC + #ifdef LCE_STRDUP_INCLUDE_LIBC #include #include - #endif /* STRDUP_INCLUDE_LIBC */ + #endif /* LCE_STRDUP_INCLUDE_LIBC */ #ifndef HAVE_STRDUP #define HAVE_STRDUP 1 - #define strdup i_strdup_ - #define strndup i_strndup_ -char *i_strdup_(const char *s); -char *i_strndup_(const char *s, size_t n); + #define strdup lce_strdup_ + #define strndup lce_strndup_ +char *lce_strdup_(const char *s); +char *lce_strndup_(const char *s, size_t n); #endif /* !HAVE_STRDUP */ - #ifdef STRDUP_IMPLEMENTATION + #ifdef LCE_STRDUP_IMPLEMENTATION char * -i_strdup_(const char *s) +lce_strdup_(const char *s) { /* avoid calling strlen twice by passing the maximum */ - return i_strndup_(s, ~(size_t)0); + return lce_strndup_(s, ~(size_t)0); } char * -i_strndup_(const char *s, size_t n) +lce_strndup_(const char *s, size_t n) { char *d; size_t t; @@ -65,5 +65,5 @@ i_strndup_(const char *s, size_t n) return memcpy(d, s, t - 1); } - #endif /* STRDUP_IMPLEMENTATION */ -#endif /* !STRDUP_H_ */ + #endif /* LCE_STRDUP_IMPLEMENTATION */ +#endif /* !LCE_STRDUP_H */