Re: [PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp

2013-01-15 Thread Peter Hutterer
On Mon, Jan 14, 2013 at 11:29:46PM -0800, Alan Coopersmith wrote: Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |3 +++ xev.c| 12 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index

Re: [PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp

2013-01-15 Thread Alan Coopersmith
On 01/15/13 03:51 PM, Peter Hutterer wrote: +#ifndef HAVE_STRNCASECMP char *cp; for (cp = s; *cp; cp++) { if (isascii (*cp) isupper (*cp)) *cp = tolower (*cp); } +#define strncasecmp strncmp +#endif -if (strncmp (s, notuseful, len) == 0) return

Re: [PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp

2013-01-15 Thread Peter Hutterer
On Tue, Jan 15, 2013 at 04:07:58PM -0800, Alan Coopersmith wrote: On 01/15/13 03:51 PM, Peter Hutterer wrote: +#ifndef HAVE_STRNCASECMP char *cp; for (cp = s; *cp; cp++) { if (isascii (*cp) isupper (*cp)) *cp = tolower (*cp); } +#define strncasecmp

[PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp

2013-01-14 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |3 +++ xev.c| 12 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0af7b2d..6016d62 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,7