1 Return-Path: <bryan.ivandyke.com>
2 X-Original-To: mbp.sourcefrog.net
3 Delivered-To: mbp.ozlabs.org
4 Received: from mta5.wss.scd.yahoo.com (mta5.wss.scd.yahoo.com [66.218.85.36])
5 by ozlabs.org (Postfix) with ESMTP id 26BEB2BD6B
6 for <mbp.sourcefrog.net>; Sat, 31 Jul 2004 05:16:07 +1000 (EST)
7 Received: from [192.168.0.15] (64.25.194.20) by mta5.wss.scd.yahoo.com (7.0.016) (authenticated as bryan.ivandyke.com)
8 id 40A02BAF03A65A34 for mbp.sourcefrog.net; Fri, 30 Jul 2004 12:16:01 -0700
9 Message-ID: <410A9E73.20301.ivandyke.com>
10 Date: Fri, 30 Jul 2004 15:16:03 -0400
11 From: Bryan VanDyke <bryan.ivandyke.com>
12 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616
13 X-Accept-Language: en-us, en
15 To: mbp.sourcefrog.net
16 Subject: Possible bug in natural sort strnatcmp.c
17 Content-Type: text/plain; charset=us-ascii; format=flowed
18 Content-Transfer-Encoding: 7bit
19 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on ozlabs.org
21 X-Spam-Status: No, hits=-4.1 required=3.2 tests=BAYES_00,RCVD_IN_BLARS_RBL
22 autolearn=no version=2.63
28 First, thank you for sharing your nice piece of code.
30 I was trying it out and was getting some weird results. It was giving
31 results different than what I wanted. I made a minor modification and
32 thought I pass the changes back to you incase they may be of some
51 /* skip over leading spaces or zeros */
60 /* skip over leading spaces or zeros */
61 while (isspace(ca) || ca == '0' )
64 while (isspace(cb) || cb == '0' )
67 I get the results I wanted: