The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

fputs - put a string on a stream

 SYNOPSIS



#include <stdio.h>

int fputs(const char *s, FILE *stream);

 DESCRIPTION

The fputs() function writes the null-terminated string pointed to by s to the stream pointed to by stream. The terminating null byte is not written.

The st_ctime and st_mtime fields of the file will be marked for update between the successful execution of fputs() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().

 RETURN VALUE

Upon successful completion, fputs() returns a non-negative number. Otherwise it returns EOF, sets an error indicator for the stream and errno is set to indicate the error.

 ERRORS

Refer to fputc().

 EXAMPLES

None.

 APPLICATION USAGE

The puts() function appends a newline character while fputs() does not.

 FUTURE DIRECTIONS

None.

 SEE ALSO

fopen(), putc(), puts(), <stdio.h>.

DERIVATION

Derived from Issue 1 of the SVID.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]