public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Wille Padnos <spadnos@sover.net>
To: Kay Sievers <lkml001@vrfy.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: why does sscanf() does not interpret number length attributes?
Date: Wed, 02 Jul 2003 19:00:32 -0400	[thread overview]
Message-ID: <3F036410.9000800@sover.net> (raw)
In-Reply-To: <20030702203433.GA14854@vrfy.org>

Kay Sievers wrote:

[snip]

>but sscanf in linux-2.5/lib/vsprintf.c interpretes length attributes
>only when the type is a string. It uses simple_strtoul() and it will
>read the buffer until it finds a non-(hex)digit.
>  
>
[snip]
You could always try truncating the string, then using strtoul().  Save 
the character you replace if you want to restore the string to its 
former glory :)

eg.:
...
savechar = str[3];
str[3]=0;
i = simple_strtoul(str);
str[3]=savechar;
...
- Steve



      parent reply	other threads:[~2003-07-02 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02 20:34 why does sscanf() does not interpret number length attributes? Kay Sievers
2003-07-02 20:55 ` Richard B. Johnson
2003-07-02 22:26   ` Kay Sievers
2003-07-02 23:00 ` Stephen Wille Padnos [this message]

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=3F036410.9000800@sover.net \
    --to=spadnos@sover.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml001@vrfy.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