vwarnx()

write formatted error message to standard error 

Function


SYNOPSIS

#include <err.h>

void vwarnx(const char *fmt, va_list vargs);


DESCRIPTION

The function vwarnx() writes a formatted error message to the standard error stream. The first part of the output line sent to standard error consists of the file name of the executable, followed by a colon and a space. If the value of fmt is not null, this is followed by a message containing the optional variables, formatted according to fmt, followed by a trailing colon and space. The output line is terminated by a linefeed.

The function vwarnx() is roughly equivalent to

fprintf(stderr,"%s: ", argv[0]);
vfprintf(stderr, fmt, vargs);
fprintf(stderr,"\n");

PARAMETERS

fmt 

Is the format string for optional arguments, or the null pointer if no formatted message is to be written.

vargs 

Are optional arguments to the formatted message.


RETURN VALUES

The vwarnx() function has no return. If there is an error writing to the standard output stream, errno is set to one of the following values:

EACCES 

Another process has the file locked.

EBADF 

The standard error stream has been closed.

EINTR 

A signal interrupted the call.

EIO 

An output error occurred.

ENOMEM 

Memory could not be allocated for internal buffers.

ENOSPC 

An attempt was made to write to a full disk.

ENXIO 

A device error occurred.

EPIPE 

An attempt was made to write to a closed pipe.


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None.


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

Functions:
err(), errx(), verr(), verrx(), vfprintf(), vwarn(), warn(), warnx()


PTC MKS Toolkit 10.3 Documentation Build 39.