xref: /original-bsd/lib/libc/stdio/fputs.3 (revision 454fcdce)
Copyright (c) 1990 The Regents of the University of California.
All rights reserved.

This code is derived from software contributed to Berkeley by
Chris Torek.

%sccs.include.redist.man%

@(#)fputs.3 6.3 (Berkeley) 03/05/91

FPUTS 3 ""
C 7
NAME
fputs, puts - put a line to a stream
SYNOPSIS
#include <stdio.h>

int
fputs(char *str, FILE *stream);

int
puts(char *str);
DESCRIPTION
Fputs writes the string str to the given stream .

Puts writes the string str to the standard output stream stdout , appending a newline character.

"RETURN VALUE"
Fputs returns 0 on success, EOF on error; puts returns a nonnegative integer on success, EOF on error.
"SEE ALSO"
putc(3), ferror(3), stdio(3)
ERRORS

15 [EBADF] Stream is not a writable stream.

Fputs and puts may also fail and set errno for any of the errors specified for the routines write (2).

STANDARDS
Fputs and puts conform to ANSI X3.159-1989 (``ANSI C'').