|
Message-ID: <20140620143200.GA783@muslin>
Date: Fri, 20 Jun 2014 07:32:01 -0700
From: Isaac Dunham <ibid.ag@...il.com>
To: musl@...ts.openwall.com
Subject: [PATCH v3] Implement fmtmsg
Here's a third revision of fmtmsg.
As per Rich's comments, my testing with glibc, and my reading of netbsd,
fmtmsg no longer lets MSGVERB reorder output.
This involved a switch from _writemsg to dprintf, as well as using an
int to store the components to print.
Note that any argument can be 0 or (char*)0; this should result in no
output of that field.
I also made console output handle that, which could be done
in one of two ways:
dprintf("%s...", msg?msg:"", ...)
or
if (!msg) msg="";
...
dprintf("%s...", msg, ...)
The latter actually won't work too well, now that I think about it,
since the field separators cannot be removed that way.
The other change is one comment in the section that checks
MSGVERB. ;)
Thanks,
Isaac Dunham
View attachment "fmtmsg.diff" of type "text/plain" (3568 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.