Messages in this thread | | | Date | Tue, 8 Dec 1998 16:31:05 -0500 (EST) | From | Bradley M Keryan <> | Subject | Re: Internationalizing Linux |
| |
On Mon, 7 Dec 1998, Tim Smith wrote:
[...] > If the error message has three parameters, I'd write > > printf( msg[code], p1, p2, p3, p2, p1, p2, p3 ); > > and so on. I'm definitely not proud of this gross hack. >
Umm, right. Why not just add support for positional parameters to the kernel vsprintf()? Then all you have to do is change the format string, which can specify the appropriate parameters; "%4$s" would refer to the 4th string, for instance.
An example of this is in Ulrich Drepper's paper on "Internationalization in the GNU Project" from 1996:
http://i44www.info.uni-karlsruhe.de/~drepper/conf96/paper-7.html#ss7.1
The reason he states that it can't be used in GNU packages (portability--not all OSes support it) doesn't seem to apply to the Linux kernel, as it provides its own vsprintf (upon which printk is based).
Brad
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |