BSD 4_3_Reno release
[unix-history] / usr / share / man / cat3 / strerror.0
PERROR(3) 1990 PERROR(3)
N\bNA\bAM\bME\bE
perror, strerror, sys_errlist, sys_nerr - system error mes-
sages
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
p\bpe\ber\brr\bro\bor\br(\b(s\bst\btr\bri\bin\bng\bg)\b)
c\bch\bha\bar\br *\b*s\bst\btr\bri\bin\bng\bg;\b;
c\bch\bha\bar\br *\b*
s\bst\btr\bre\ber\brr\bro\bor\br(\b(e\ber\brr\brn\bnu\bum\bm)\b)
i\bin\bnt\bt e\ber\brr\brn\bnu\bum\bm;\b;
e\bex\bxt\bte\ber\brn\bn i\bin\bnt\bt e\ber\brr\brn\bno\bo,\b, s\bsy\bys\bs_\b_n\bne\ber\brr\br;\b;
e\bex\bxt\bte\ber\brn\bn c\bch\bha\bar\br *\b*s\bsy\bys\bs_\b_e\ber\brr\brl\bli\bis\bst\bt[\b[]\b];\b;
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bP_\be_\br_\br_\bo_\br produces a short error message on the standard error
file describing the last error encountered during a call to
the system from a C program. If _\bs_\bt_\br_\bi_\bn_\bg is non-NULL, it is
printed, followed by a colon, followed by a space, followed
by the message and a new-line. Otherwise, just the message
and the new-line are printed. Most usefully, the argument
string is the name of the program which incurred the error.
The error number is taken from the external variable _\be_\br_\br_\bn_\bo
(see _\bi_\bn_\bt_\br_\bo(2)), which is set when errors occur but not
cleared when non-erroneous calls are made.
To simplify variant formatting of messages, the _\bs_\bt_\br_\be_\br_\br_\bo_\br
function returns a pointer to the error message string
mapped to the error number _\be_\br_\br_\bn_\bu_\bm.
The message strings can be accessed directly using the
external character array _\bs_\by_\bs__\be_\br_\br_\bl_\bi_\bs_\bt. _\bS_\by_\bs__\bn_\be_\br_\br is the total
number of messages in the array. The use of these variables
is deprecated; _\bs_\bt_\br_\be_\br_\br_\bo_\br should be used instead.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
intro(2)
Printed 7/27/90 June 1