From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932846AbcDERZa (ORCPT ); Tue, 5 Apr 2016 13:25:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39826 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758499AbcDERZ3 (ORCPT ); Tue, 5 Apr 2016 13:25:29 -0400 Date: Tue, 5 Apr 2016 13:25:27 -0400 From: Jessica Yu To: Shahbaz Youssefi Cc: LKML Subject: Re: sscanf: implement basic character sets Message-ID: <20160405172526.GB10567@packer-debian-8-amd64.digitalocean.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux eisen.io 3.16.0-4-amd64 x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 05 Apr 2016 17:25:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Shahbaz Youssefi [05/04/16 10:32 -0400]: >Note: CC me > >I just read on lwn about the implementation of `%[` in sscanf. Just >wanted to point out my implementation (which supports `]` ranges (`-`) >and negation (`^`)) and let you know that you are free to take >code/inspiration from it: > >https://github.com/ShabbyX/kio/blob/master/src/scanf.c#L398 Thanks Shahbaz, this is helpful. You are of course welcome to submit a patch adding ranges and other missing features to the kernel sscanf() as well, if that's something you're interested in doing. Jessica