[Previous]
[Contents]
[Next]

cputs()

write a character string directly to the console

Synopsis:

#include <conio.h>
int cputs( const char *buf );

Description:

The cputs() function writes the character string pointed to by buf directly to the console using the putch() function. Unlike the puts() function, the carriage-return and line-feed characters are not appended to the string. The terminating null character is not written.

Returns:

0
Success
Nonzero
An error occurred. When an error has occurred, errno contains a value indicating the type of error that has been detected.

Examples:

#include <conio.h>

void main()
  {
    char buffer[82];

    buffer[0] = 80;
    cgets( buffer );
    cputs( &buffer[2] );
    putch( '\r' );
    putch( '\n' );
  }

Classification:

WATCOM

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, fputs(), putch(), puts()


[Previous]
[Contents]
[Next]