OAR

RTEMS GNU Tools On-Line Library


putchar

PREV UP NEXT Bookshelf

3.27: putchar---write a character (macro)

Synopsis

#include <stdio.h>
int putchar(int ch);

int _putchar_r(void *reent, int ch);

Description
putchar is a macro, defined in stdio.h. putchar writes its argument to the standard output stream, after converting it from an int to an unsigned char.

The alternate function _putchar_r is a reentrant version. The extra argument reent is a pointer to a reentrancy structure.


Returns
If successful, putchar returns its argument ch. If an error intervenes, the result is EOF. You can use `ferror(stdin)' to query for errors.


Portability
ANSI C requires putchar; it suggests, but does not require, that putchar be implemented as a macro.

Supporting OS subroutines required: close, fstat, isatty, lseek, read, sbrk, write.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.