This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add Roman numerals in *printf
- From: Martin Sebor <msebor at gmail dot com>
- To: Matteo Croce <matteo at openwrt dot org>, libc-alpha at sourceware dot org
- Date: Mon, 4 Apr 2016 16:59:50 -0600
- Subject: Re: [PATCH] Add Roman numerals in *printf
- Authentication-results: sourceware.org; auth=none
- References: <1459503215-21039-1-git-send-email-matteo at openwrt dot org>
This patch adds the `%r' modifier in all the *printf functions,
which can be used to represent a number in Roman numerals.
A bit late to the April 1 party, but a C++ Standard Library
implementation I worked on years ago actually has this feature.
It makes it possible to use the usual C++ iostream inserter and
extractor operators to format and parse not only Roman numerals
(that was done mostly just to give base 1 a meaning), but more
usefully numbers in any base between 1 and 36. The implementation
still ships with a number of compilers, though I think only one
(Compaq/HP CC for Tru64) has the version with the Roman numerals.