Subject: Re: Linux's printf() extensions
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Perry E. Metzger <perry@piermont.com>
List: tech-userlevel
Date: 09/23/1998 00:08:16
I believe OpenBSD may have the guts of some of this stuff, if someone
felt it was a) a standard and b) worth stealing.

.pm

der Mouse writes:
> > Linux (apparently) allows qualifiers of the form "$n", where "n" is a
> > number to specify a different sequence in which the printf()
> > arguments are to be output.
> 
> Not just Linux.  I saw this on some vendor OS too (Solaris? I forget),
> which makes me suspect it's actually a part of some standard.
> 
> > Has anyone seen this facility ported to NetBSD?
> 
> Not me.  Speaking as someone who basically reimplemented the guts of
> printf a while ago, it would be nontrivial to do, and impossible in
> some situations (for example, if $n is not used by the format, it's not
> possible to handle $m correctly for m>n...unless certain
> architecture-specific assumptions hold - assumptions which fail on many
> current architectures).
> 
> The reimplementation I referred to is one that I can make available.
> If anyone wants to pay me to add $n support to it... :-)