server/admin.c (a_format): Introduce `?ERR' for explicitly named errors.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 13 May 2018 11:30:06 +0000 (12:30 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Jan 2019 12:10:31 +0000 (12:10 +0000)
commite4b47618f00dc9ae93ccc24a9271d92faec63536
treec51c66368c51bdc6814cd0c26593327e84bc8c47
parent7487f3478dd948824e2ec5898a439d08c63dcdf2
server/admin.c (a_format): Introduce `?ERR' for explicitly named errors.

Judging by the documentation, `?ERRNO' is supposed to take an `int'
argument and format the error it specifies; but it actually works by
examining `errno', and all the callers know this.  Changing it now seems
pointless, but I do want to be able to report errors in cases where
`errno' is or might be stale, and stuffing an error code back into
`errno' just so that it can be reported seems rather ugly.

Instead, add `?ERR' which /does/ accept an `int' argument, and fix the
documentation so that it describes reality.
server/admin.c
server/tripe.h