warn

OS/161 Reference Manual

Name

warn, warnx, vwarn, vwarnx - print warning messages

Library

Standard C Library (libc, -lc)

Synopsis

#include <err.h>

void
warn(const char *format, ...);

void
warnx(const char *format, ...);

void
vwarn(const char *format, va_list);

void
vwarnx(const char *format, va_list);

Description

The warn, warnx, vwarn, and vwarnx functions print warning messages to the standard error stream.

warnx prints the name of the program, a colon, the text generated by passing format and subsequent args through printf, and a newline.

warn prints the same thing, except that a colon and the error string for the current error (obtained by calling strerror on errno) are printed prior to the newline.

vwarnx and vwarn are the same as warnx and warn respectively, except that the additional arguments for printf are taken to have been already packaged up in a va_list by use of the stdarg facility.

See Also

err