vcprintf

Writes output to the console under format control.

Library:LibC
Classification:Other
Service:File and Directory I/O

Syntax

  #include <stdio.h> 
   
  int vcprintf (
     const char   *format,
     va_list       arg);
  

Parameters

format

(IN) Points to the format control string. See Print Format Control Strings.

arg

(IN) Specifies a variable argument list. The number of arguments is determined by the format string.

Return Values

If successful, returns the number of characters written. Otherwise, returns a negative value and sets errno to one of the following:

Decimal

Constant

Description

4

EBADF

The file descriptor is not a valid file descriptor open for writing.

5

ENOMEM

Insufficient storage space is available.

12

ENOSPC

No free space remains on the device containing the file.

24

EAGAIN

The O_NONBLOCK flag is set for the file descriptor, and the process cannot immediately perform the write operation.

25

ENXIO

A request was made of a nonexistent device, or the request was outside the capabilities of the device.

28

EIO

A physical I/O error has occurred.

32

EPIPE

An attempt was made to write to a pipe or FIFO that is not open for reading by any process.

63

EINTR

A signal interrupted the write operation.

71

EFBIG

An attempt was made to write to a file that exceeds the maximum file size.

Remarks

The vcprintf function writes output to the console under control of the format parameter. The vcprintf function is similar to printf, with the variable argument list replaced with arg, which has been initialized by the va_start macro.

The vcprintf function is a hard-wired console function. Even if stdout is redirected, vcprintf prints the data to the application screen.

If your application does not create a screen with the SCREENNAME directive at compile time, the output is directed to one of the following console screens:

  • On NetWare 5.x and earlier, to the System Console screen

  • On NetWare 6.0 and later, to the System Logger screen.

For more information on screen types and screen creation, see Section 3.3, Screen Management.

See Also