From 90d3320d7f57fae3d2f89d907e8307b6a76d133d Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Fri, 21 Dec 2018 18:52:40 +0000 Subject: Refactor string benchtests Refactor string benchtests by moving duplicated defines into bench-string.h. * benchtests/bench-memchr.c: Cleanup defines. * benchtests/bench-memcmp.c: Likewise. * benchtests/bench-memset.c: Likewise. * benchtests/bench-memset-large.c: Likewise. * benchtests/bench-memset-walk.c: Likewise. * benchtests/bench-stpcpy.c: Likewise. * benchtests/bench-stpncpy.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-strcmp.c: Likewise. * benchtests/bench-strcpy.c: Likewise. * benchtests/bench-strcspn.c: Likewise. * benchtests/bench-string.h: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncat.c: Likewise. * benchtests/bench-strncmp.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise. * benchtests/bench-strpbrk.c: Likewise. * benchtests/bench-strrchr.c: Likewise. * benchtests/bench-strspn.c: Likewise. --- benchtests/bench-strspn.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'benchtests/bench-strspn.c') diff --git a/benchtests/bench-strspn.c b/benchtests/bench-strspn.c index 35afdd467c..14a983744e 100644 --- a/benchtests/bench-strspn.c +++ b/benchtests/bench-strspn.c @@ -24,24 +24,15 @@ #endif /* WIDE */ #include "bench-string.h" +#define BIG_CHAR MAX_CHAR + #ifndef WIDE -# define STRSPN strspn -# define CHAR char # define SIMPLE_STRSPN simple_strspn # define STUPID_STRSPN stupid_strspn -# define STRLEN strlen -# define STRCHR strchr -# define BIG_CHAR CHAR_MAX # define SMALL_CHAR 127 #else -# include -# define STRSPN wcsspn -# define CHAR wchar_t # define SIMPLE_STRSPN simple_wcsspn # define STUPID_STRSPN stupid_wcsspn -# define STRLEN wcslen -# define STRCHR wcschr -# define BIG_CHAR WCHAR_MAX # define SMALL_CHAR 1273 #endif /* WIDE */ -- cgit v1.2.3