BSD 4_4 development
[unix-history] / usr / share / man / cat3 / perror.0
index 6d09dd1..32b9186 100644 (file)
@@ -1,66 +1,52 @@
-
-
-
-PERROR(3)                    1990                      PERROR(3)
-
-
+STRERROR(3)                 BSD Programmer's Manual                STRERROR(3)
 
 N\bNA\bAM\bME\bE
 
 N\bNA\bAM\bME\bE
-     perror, strerror, sys_errlist, sys_nerr - system error mes-
-     sages
+     p\bpe\ber\brr\bro\bor\br, s\bst\btr\bre\ber\brr\bro\bor\br, s\bsy\bys\bs_\b_e\ber\brr\brl\bli\bis\bst\bt, s\bsy\bys\bs_\b_n\bne\ber\brr\br - system error messages
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 
 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)
-
-
-
-
-
-
-
+     #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bst\btd\bdi\bio\bo.\b.h\bh>\b>
 
 
+     _\bv_\bo_\bi_\bd
+     p\bpe\ber\brr\bro\bor\br(_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg);
 
 
+     _\be_\bx_\bt_\be_\br_\bn _\bc_\bh_\ba_\br _\b*_\bs_\by_\bs_\b__\be_\br_\br_\bl_\bi_\bs_\bt_\b[_\b]_\b;
+     _\be_\bx_\bt_\be_\br_\bn _\bi_\bn_\bt _\bs_\by_\bs_\b__\bn_\be_\br_\br_\b;
 
 
+     #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bst\btr\bri\bin\bng\bg.\b.h\bh>\b>
 
 
+     _\bc_\bh_\ba_\br _\b*
+     s\bst\btr\bre\ber\brr\bro\bor\br(_\bi_\bn_\bt _\be_\br_\br_\bn_\bu_\bm);
 
 
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     The s\bst\btr\bre\ber\brr\bro\bor\br() and p\bpe\ber\brr\bro\bor\br() functions look up the error message string
+     corresponding to an error number.
 
 
+     The s\bst\btr\bre\ber\brr\bro\bor\br() function accepts an error number argument _\be_\br_\br_\bn_\bu_\bm and re-
+     turns a pointer to the corresponding message string.
 
 
+     The p\bpe\ber\brr\bro\bor\br() function finds the error message corresponding to the cur-
+     rent value of the global variable _\be_\br_\br_\bn_\bo (intro(2))  and writes it, fol-
+     lowed by a newline, to the standard error file descriptor.  If the argu-
+     ment _\bs_\bt_\br_\bi_\bn_\bg is non-NULL, it is prepended to the message string and sepa-
+     rated from it by a colon and space (`: '). If _\bs_\bt_\br_\bi_\bn_\bg is NULL, only the
+     error message string is printed.
 
 
+     If _\be_\br_\br_\bn_\bu_\bm is not a recognized error number, the error message string will
+     contain ``Unknown error: '' followed by the error number in decimal.
 
 
+     The message strings can be accessed directly using the external array
+     _\bs_\by_\bs_\b__\be_\br_\br_\bl_\bi_\bs_\bt. The external value _\bs_\by_\bs_\b__\bn_\be_\br_\br contains a count of the messages
+     in _\bs_\by_\bs_\b__\be_\br_\br_\bl_\bi_\bs_\bt. The use of these variables is deprecated; s\bst\btr\bre\ber\brr\bro\bor\br()
+     should be used instead.
 
 
-Printed 7/27/90               June                             1
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+     intro(2),  psignal(3)
 
 
+H\bHI\bIS\bST\bTO\bOR\bRY\bY
+     The s\bst\btr\bre\ber\brr\bro\bor\br() and p\bpe\ber\brr\bro\bor\br() functions first appeared in 4.4BSD.
 
 
+B\bBU\bUG\bGS\bS
+     For unknown error numbers, the s\bst\btr\bre\ber\brr\bro\bor\br() function will return its result
+     in a static buffer which may be overwritten by subsequent calls.
 
 
+4th Berkeley Distribution        June 9, 1993                                1