From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VmiHe-00066S-Qm for mharc-grub-devel@gnu.org; Sat, 30 Nov 2013 06:00:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmiHV-00065Y-HG for grub-devel@gnu.org; Sat, 30 Nov 2013 06:00:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmiHL-0003f5-JY for grub-devel@gnu.org; Sat, 30 Nov 2013 06:00:13 -0500 Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:62951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmiHL-0003Z3-Aj for grub-devel@gnu.org; Sat, 30 Nov 2013 06:00:03 -0500 Received: by mail-lb0-f171.google.com with SMTP id q8so7467724lbi.16 for ; Sat, 30 Nov 2013 03:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type; bh=CnXn+2IwEWUUzlnbyoeK2JDUlaLZp/Fq5aEWrG2GZps=; b=cPpFTjT2d+WsP55pX99wuJLenNhLUYEIb7uWC1/wPFqOBYUsEQV46iijnDx1YmGRcw 9s8JFBkzeWFMv6Ax3mTzCI7PXHpho5VBoHfRGX8YmTraF6GSiEbbrK8Sicybh9x0xi+D Ff/bVDWd5hjdQN6qZfcnLw5Vdrz4UMsq0g1NdScZ9MTmuH4GcDBGc/MWg+HmE982jwtO g155zVCP1irY/uEMtr3DX9vymqQ17HE89gNIVn7V9P/RjW3ktCwljsUg2z1uxT4SwAe/ ACaOBoUlCO/05cLGmvQhkn5Thn/zBABsfVq+NWVD5xQikxXcQUptqUxKi1Y0r/rJ0Rp3 Auyg== X-Received: by 10.112.204.74 with SMTP id kw10mr36717049lbc.13.1385809201611; Sat, 30 Nov 2013 03:00:01 -0800 (PST) Received: from opensuse.site (ppp91-76-134-134.pppoe.mtu-net.ru. [91.76.134.134]) by mx.google.com with ESMTPSA id xl4sm64715504lac.9.2013.11.30.03.00.00 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sat, 30 Nov 2013 03:00:00 -0800 (PST) Date: Sat, 30 Nov 2013 14:59:59 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: [PATCH] add grub_qsort_strcmp to use when sorting array of strings Message-ID: <20131130145959.0c2f158a@opensuse.site> In-Reply-To: <5299C050.4040507@gmail.com> References: <1385744460-6624-1-git-send-email-arvidjaar@gmail.com> <5299C050.4040507@gmail.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/w_66LVsrLDsughuNN2fKzAS"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22b X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 11:00:22 -0000 --Sig_/w_66LVsrLDsughuNN2fKzAS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Sat, 30 Nov 2013 11:39:12 +0100 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > On 29.11.2013 18:01, Andrey Borzenkov wrote: > > Compare function used in qsort gets arguments by reference, so strcmp > > cannot be used directly - it expects pointer to char, but gets pointer > > to pointer to char. > >=20 > > Introduce new helper grub_qsort_strcmp and use it in grub-install. > > This helper is going to be used in a couple more places as well so > > add it to global file, not in grub-install.c. > >=20 > Nice catch. But I don't we have enough use for grub_qsort_strcmp to make > it global. Can you make it static in grub-install.c ? I have pending patches to sort long lists in help output of commands (grub-mkimage and grub-probe target lists). They are long enough to wish some ordering. --Sig_/w_66LVsrLDsughuNN2fKzAS Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlKZxS8ACgkQR6LMutpd94w0SACeMMBvPn/QOBN8S6Z3LMmRRJz4 Qd0An2iILzVPEEoymAPeaAji5IX0FWvw =MvGy -----END PGP SIGNATURE----- --Sig_/w_66LVsrLDsughuNN2fKzAS--