[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: please unblock gworldclock for squeeze



On Sat, 2010-09-04 at 12:54 +0200, Julien Cristau wrote:
> On Wed, Sep  1, 2010 at 15:32:13 +1000, Drew Parsons wrote:
> 
> > Dear Release Managers,
> > 
> > I would like to request you to unblock gworldclock to allow 1.4.4-8 into
> > squeeze.
> > 
> > I have finally been able to resolve a good number of outstanding bugs,
> > which will make the clock better behaved and easier for users to locate
> > in the archive. (There had been some bizarre locale bugs preventing me
> > from finding the fix before now).
> > 
> +  * Use %ms rather than %as in scanf to get dynamic allocation of
> +    input strings. See man scanf.
> 
> what is this referring to?  my scanf manual says
> 
>        ·      An  optional  'a'  character.   This is used with string conver‐
>               sions, and relieves the caller of the need to allocate a  corre‐
>               sponding  buffer to hold the input: instead, scanf() allocates a
>               buffer of sufficient size,
...
> This  is  a
>               GNU  extension;  C99  employs  the 'a' character as a conversion
>               specifier (and it can also be used as such in the GNU  implemen‐
>               tation).
> 
> and I can't see anything about 'm'.


You can see it further below in the man page (in NOTES):

	Since version 2.7, glibc also provides the m modifier for the same pur‐
       pose as the a modifier.  The m modifier has the following advantages:

       * It may also be applied to %c conversion specifiers (e.g., %3mc).

       * It avoids ambiguity with respect to the %a floating-point  conversion
         specifier (and is unaffected by gcc -std=c99 etc.)

       * It is specified in the upcoming revision of the POSIX.1 standard.



I'm blaming %as on the character encoding troubles I'd been having,
which was impeding fixing the bugs sooner.  The problem seemed to
disappear after I replaced %as with %ms.

Drew


Reply to: