perror()

write error message on standard error 

Function


SYNOPSIS

#include <stdio.h>

void perror(const char *s);


DESCRIPTION

The perror() function produces a message on the standard error output describing the error condition associated with the current value of errno. The string s is printed first, followed by a colon, a blank, the error message and a newline. If s is a null pointer or points to a null string, the colon is not printed.


PARAMETERS

s 

Is either null or a pointer to a null-terminated string.


RETURN VALUES

None.


CONFORMANCE

ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

If standard error is open in text mode, linefeed is translated to carriage-return linefeed on output. No such translation occurs if standard error is open in text mode.

In addition to printing messages for traditional UNIX errno values, the NuTCRACKER Platform implementation of perror() prints messages for Win32-specific error conditions. See api_intro for a description of how Win32 errors are interpreted.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

api_intro

Functions:
strerror()

Miscellaneous:
errno


PTC MKS Toolkit 10.5 Documentation Build 40.