Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ strerror(3C) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                             strerror(3C)



        _________________________________________________________________
        strerror                                                 function
        Return a string corresponding to an error code.
        _________________________________________________________________


        Calling Sequence

        char *strerror(), *message;
        int errno;
        message = strerror(errno);


          where   errno is the error code of the message string.



        Description

        The strerror function returns a pointer to a string corresponding
        to a given error code.  The error message file is read into an
        internal buffer to obtain the error message, and that buffer's
        address is returned.


        Returns

        See the description above.


        Related Functions

        See also the perror function.


        Example

        The following program prints an error message corresponding to
        the generic UNIX I/O message.
        /* Program test for the strerror() function */

        #include <errno.h>
        #include <stdio.h>

        char *strerror();

        main() {
            printf("Error message is: %s\n", strerror(EIO));
            return 0;
        }




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                             strerror(3C)



        A call to this program generates the output

        Error message is: Error EIO(5) -- Error in input/ouput.



















































        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026