From owner-cvs-src@FreeBSD.ORG Sun May 30 21:35:25 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FEBC16A4D1 for ; Sun, 30 May 2004 21:35:25 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id CDF4B43D4C for ; Sun, 30 May 2004 21:35:24 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 16532 invoked by uid 1000); 31 May 2004 04:35:26 -0000 Date: Sun, 30 May 2004 21:35:26 -0700 (PDT) From: Nate Lawson To: Pawel Jakub Dawidek In-Reply-To: <20040530094627.GD12007@darkness.comp.waw.pl> Message-ID: <20040530213504.I16510@root.org> References: <200405290641.i4T6fHhj002797@repoman.freebsd.org> <20040530094627.GD12007@darkness.comp.waw.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Bill Paul cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/compat/ndis subr_ndis.c src/sys/dev/if_ndis if_ndis.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2004 04:35:25 -0000 On Sun, 30 May 2004, Pawel Jakub Dawidek wrote: > On Fri, May 28, 2004 at 11:41:17PM -0700, Bill Paul wrote: > [...] > +> +static int > +> +my_strcasecmp(s1, s2, len) > +> + const char *s1; > +> + const char *s2; > +> + int len; > +> +{ > +> + int i; > +> + > +> + for (i = 0; i < len; i++) { > +> + if (toupper(s1[i]) != toupper(s2[i])) > +> + return(1); > +> + } > +> + > +> + return(0); > +> +} > +> + > > Could we move it to libkern? I want to use it too. While we're at it, two from acpi: /* FreeBSD doesn't have strupr, should be fixed. (move to libkern) */ static __inline char * strupr(char *str) { char *c = str; while(*c) { *c = toupper(*c); c++; } return(str); } #ifdef _KERNEL /* Or strstr (used in debugging mode, also move to libkern) */ static __inline char * strstr(char *s, char *find) { char c, sc; size_t len; if ((c = *find++) != 0) { len = strlen(find); do { do { if ((sc = *s++) == 0) return (NULL); } while (sc != c); } while (strncmp(s, find, len) != 0); s--; } return ((char *)s); } #endif /* _KERNEL */ -Nate