From mboxrd@z Thu Jan 1 00:00:00 1970 From: Isaac Jurado Subject: Re: [PATCH] [BUILTIN] Allow SIG* signal names. Date: Mon, 2 Jul 2012 20:57:54 +0200 Message-ID: References: <4ff0274f.c54fb40a.47e2.6814@mx.google.com> <4FF1A76F.6020307@redhat.com> <2D2FC58C-ACD5-4113-9A1D-C53A854C3CD7@aim.com> <4FF1AE9C.7040307@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-vb0-f46.google.com ([209.85.212.46]:63313 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881Ab2GBS5z (ORCPT ); Mon, 2 Jul 2012 14:57:55 -0400 Received: by vbbff1 with SMTP id ff1so3739725vbb.19 for ; Mon, 02 Jul 2012 11:57:54 -0700 (PDT) In-Reply-To: Sender: dash-owner@vger.kernel.org List-Id: dash@vger.kernel.org To: Eric Blake Cc: Paul Gilmartin , dash On Mon, Jul 2, 2012 at 8:53 PM, Isaac Jurado wrote: > > Since the set of signal names to be recognized is known at compile > time, you can use a perfect hash function generator like GNU Perf [1] > which minimizes character comparisons in order to return the desired > constant assigned to a name/symbol/token/whatever-string. As usual, I forgot the link. My apologies: [1] http://www.gnu.org/software/gperf/ -- Isaac Jurado "The noblest pleasure is the joy of understanding" Leonardo da Vinci