linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] keytable: Remove comments before processing keymaps
Date: Tue, 2 Jul 2019 10:08:04 +0100	[thread overview]
Message-ID: <20190702090804.lhxll6g7l6bdlmll@gofer.mess.org> (raw)
In-Reply-To: <20190701163813.25032-2-hadess@hadess.net>

On Mon, Jul 01, 2019 at 06:38:13PM +0200, Bastien Nocera wrote:
> Do our best to remove comments from each line we process from the keymap
> sources, so as to avoid commented duplicates and false positives
> sneaking in to the keymap definitions.
> 
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> ---
>  utils/keytable/gen_keytables.pl | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/utils/keytable/gen_keytables.pl b/utils/keytable/gen_keytables.pl
> index 3dc74ba6..d73daf58 100755
> --- a/utils/keytable/gen_keytables.pl
> +++ b/utils/keytable/gen_keytables.pl
> @@ -138,6 +138,9 @@ sub parse_file($$)
>  		}
>  
>  		if ($read) {
> +			# Remove comments
> +			~ s#/\*.*?\*/##sg;
> +			~ s#.*\*/##sg;

This doesn't solve the

	/* { 0x800ff40b, KEY_ENTER },
	   not used */

case. Or // comments.

>  			if (m/(0x[\dA-Fa-f]+)[\s\,]+(KEY|BTN)(\_[^\s\,\}]+)/) {
>  				$out .= "$1 = \"$2$3\"\n";
>  				next;
> -- 
> 2.21.0

  reply	other threads:[~2019-07-02  9:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 16:38 [PATCH 1/2] keytable: Add source information in generated keymaps Bastien Nocera
2019-07-01 16:38 ` [PATCH 2/2] keytable: Remove comments before processing keymaps Bastien Nocera
2019-07-02  9:08   ` Sean Young [this message]
2019-07-02  9:29     ` Bastien Nocera
2019-07-02  9:43     ` Bastien Nocera
2019-07-02 11:44       ` Sean Young
2019-07-02 13:20         ` Bastien Nocera
2019-07-03 15:33 ` [PATCH 1/2] keytable: Add source information in generated keymaps Sean Young
2019-07-04 13:22   ` Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190702090804.lhxll6g7l6bdlmll@gofer.mess.org \
    --to=sean@mess.org \
    --cc=hadess@hadess.net \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).