Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
Guardian Native C Library Calls (f) fputs(3)
NAME
fputs - Writes a string to a stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
int fputs(
const char *string,
FILE *stream);
PARAMETERS
string Points to a string to be written to output.
stream Points to the FILE structure of an open file.
DESCRIPTION
The fputs( ) function writes the null-terminated string pointed to by the string parameter to the
output stream specified by the stream parameter. The fputs( ) function does not append a newline
character or write the terminating null byte.
The st_ctime and st_mtime fields of the file are marked for update between the successful exe-
cution of the fputs() function, and the next successful completion of a call to the fflush() or
fclose( ) function on the same stream, or a call to the exit() or abort() function.
RETURN VALUES
Upon successful completion, the fputs() function returns the number of characters written. This
function can return EOF on an error.
ERRORS
The fputs( ) function fails if either the stream is unbuffered, or the stream’s buffer needed to be
flushed and the function call caused an underlying write( ) or lseek() to be invoked and this
underlying operation fails with incomplete output. In addition, if any of the following conditions
occur, the fputs() function sets errno to the corresponding value:
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor underlying stream and the
process would be delayed in the write operation.
[EBADF] The file descriptor underlying stream is not a valid file descriptor open for writ-
ing.
[EFBIG] An attempt was made to write at or beyond the file offset maximum. |
[EINTR] The read operation was interrupted by a signal that was caught, and no data was
transferred.
[EIO] The implementation supports job control; the process is a member of a back-
ground process group attempting to write to its controlling terminal; TOSTOP is
set; the process is neither ignoring nor blocking SIGTTOU, and the process
group of the process is orphaned. This error may also be returned under
implementation-defined conditions.
527192-007 Hewlett-Packard Company 2−63