Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ puts(3S) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

write(2)

intro(3)

fclose(3S)

ferror(3S)

fopen(3S)

printf(3S)

putc(3S)

stdio(3S)

attributes(5)

puts(3S)

NAME

puts, fputs − put a string on a stream

SYNOPSIS

#include <stdio.h>

int puts(const char ∗s);

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

DESCRIPTION

The puts() function writes the string pointed to by s, followed by a NEWLINE character, to the standard output stream stdout (see intro(3)). 

The fputs() function writes the null-terminated string pointed to by s to the named output stream.

Neither function writes the terminating null character. 

RETURN VALUES

On success both routines return the number of characters written; otherwise they return EOF. 

ERRORS

The puts() and fputs() functions will fail if either the stream is unbuffered or the stream’s buffer needed to be flushed and:

EFBIG
The file is a regular file and an attempt was made to write at or beyond the offset maximum.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe

SEE ALSO

write(2), intro(3)), fclose(3S), ferror(3S), fopen(3S), printf(3S), putc(3S), stdio(3S), attributes(5)

NOTES

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

SunOS 5.6  —  Last change: 30 Dec 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026