Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ puts(3S) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exit(2)

lseek(2)

write(2)

abort(3C)

fclose(3S)

ferror(3S)

fopen(3S)

fread(3S)

printf(3S)

putc(3S)

stdio(3S)

lfs(5)

stdio(5)

puts(3S)                                                           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
     puts() writes the string pointed to by s, followed by a new-line char-
     acter, to the standard output stream stdout.

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

     Neither function writes the terminating null character.

ERRORS
     The following error code descriptions are function-specific. You will
     find a general description in introprm2(2) or in errno(5).

     These functions will fail if either the stream is unbuffered or the
     stream's buffer needed to be flushed and:

     EAGAIN    The ONONBLOCK flag is set for the file descriptor and the
               process would be delayed in the write operation.

     EBADF     The file descriptor underlying stream is not a valid
               descriptor open for writing.

     EFBIG     An attempt was made to write to a file that exceeds the max-
               imum file size.

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

     EINTR     The write operation was terminated due to the receipt of a
               signal, and no data was transferred.

     EIO       A physical input/output error has occurred.

     ENOSPC    There was no free space remaining on the device.

     EPIPE     An attempt was made to write a pipe or FIFO that is not open
               for reading by any process. A SIGPIPE signal will be sent to
               the process.

RESULT
     On success both routines return the number of characters written; oth-
     erwise they return EOF.



Page 1                       Reliant UNIX 5.44                Printed 11/98

puts(3S)                                                           puts(3S)

NOTES
     puts() appends a new-line character while fputs() does not.

SEE ALSO
     exit(2), lseek(2), write(2), abort(3C), fclose(3S), ferror(3S),
     fopen(3S), fread(3S), printf(3S), putc(3S), stdio(3S), lfs(5),
     stdio(5).















































Page 2                       Reliant UNIX 5.44                Printed 11/98

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