Add printf(1)

This is a particularly interesting program.
I managed to implement everything according to POSIX except how
octal escapes are specified in the standard, which is yet another
format compared to the one demanded for tr(1).
This not only confuses people, it also adds unnecessary cruft
for no real gain.
So in order to be able to use unescape() easily and for consistency,
I used our initial format \o[oo] instead of \0[ooo].

Marked as optional is UTF-8 support for %c in the POSIX specification.
Given how well-developed libutf has become, doing this here was more
or less trivial, putting us yet again ahead of the competition.
This commit is contained in:
FRIGN
2015-02-15 14:46:58 +01:00
parent d7a438b2f8
commit bafd41e1cf
4 changed files with 145 additions and 848 deletions

2
TODO
View File

@@ -24,7 +24,7 @@ tput
The following programs have been imported from OpenBSD and need
replacing or cleaning up:
printf
(none)
If you are looking for some work to do on sbase, another option is to
pick a utility from the list in the README which has missing flags or