Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D4jGr-00087l-GU for mharc-grub-devel@gnu.org; Fri, 25 Feb 2005 12:28:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D4jGn-00086u-Uu for grub-devel@gnu.org; Fri, 25 Feb 2005 12:28:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D4jGl-00085S-7Z for grub-devel@gnu.org; Fri, 25 Feb 2005 12:28:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D4jGk-00084X-Ov for grub-devel@gnu.org; Fri, 25 Feb 2005 12:28:50 -0500 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D4iz8-0006hw-Eu for grub-devel@gnu.org; Fri, 25 Feb 2005 12:10:38 -0500 Received: from ASSP-nospam (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 10B49FEBE500 for ; Fri, 25 Feb 2005 18:10:37 +0100 (CET) Received: from 127.0.0.1 ([127.0.0.1] helo=localhost) by ASSP-nospam ; 25 Feb 05 17:10:36 -0000 From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 25 Feb 2005 18:12:03 +0100 User-Agent: KMail/1.7.1 References: <421A4CEA.5030603@yahoo.fr> <421F118C.5000504@yahoo.fr> <5118c6fb99a015e564cf60860935ce8d@penguinppc.org> In-Reply-To: <5118c6fb99a015e564cf60860935ce8d@penguinppc.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502251812.04315.okuji@enbug.org> Subject: Re: [PATCHv2] dprintf implementation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 17:28:55 -0000 On Friday 25 February 2005 17:02, Hollis Blanchard wrote: > int > grub_strword (const char *haystack, const char *needle) > { > int pos = 0; > int found = 0; > > while (haystack[pos]) { > /* Advance to next word. */ > while (grub_iswordseparator (haystack[pos])) > pos++; > > if (0 == grub_strcmp (&haystack[pos], needle)) > { > found = 1; > break; > } > } > > return found; > } grub_strword ("filesystem", "file") returns 0 in your implementation. If I write this function, I use grub_strstr and check if the previous character and the next character are boundaries. Okuji