Subject: Re: Linux's printf() extensions
To: None <tech-userlevel@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 09/25/1998 08:58:46
In article <Pine.NEB.4.02.9809250025110.5587-100000@starwolf.starwolf.com> greywolf@starwolf.com (Gandhi woulda smacked you) writes:
>
>Can anyone illustrate to this ignorant country mouse...er, wolf,
>exactly why, when we have printf() already, we need to add the ability
>to convolute the format strings in such a hideous manner?
>
>I mean a practical example, here, nothing frivolous.  I don't get it.

All this is for internationalization; some languages due to syntax differences
have a different word ordering. Since the format strings are different
depending on the locale, so you get something like:

	printf(catgets(catalog, set_id, msg_id, "default %s format string %d"),
		string, num);

some languages want to match string first and num second; others the other
way around. To accomodate both the easiest way is to specify the ordering
inside the format string.

christos