avoid using min
This commit is contained in:
parent
e6fbba4030
commit
e337d6aba0
7
C/text.c
7
C/text.c
@ -26,10 +26,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef HAVE_WCSNLEN
|
#ifndef HAVE_WCSNLEN
|
||||||
inline static min(size_t i, size_t j) {
|
inline static size_t
|
||||||
i < j ? return i : return j;
|
min_size(size_t i, size_t j) {
|
||||||
|
return ( i < j ? i : j );
|
||||||
}
|
}
|
||||||
#define wcsnlen(S, N) min(N, wcslen(S))
|
#define wcsnlen(S, N) min_size(N, wcslen(S))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline unsigned char *get_char(unsigned char *p, int *c) { *c = *p; return p+1; }
|
static inline unsigned char *get_char(unsigned char *p, int *c) { *c = *p; return p+1; }
|
||||||
|
Reference in New Issue
Block a user