*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> fputs (3)              
Title
Content
Arch
Section
 

puts(3)

Contents


NAME    [Toc]    [Back]

       puts, fputs - Writes a string to a stream

SYNOPSIS    [Toc]    [Back]

       #include <stdio.h>

       int puts(
               const char *string ); int fputs(
               const char *string,
               FILE *stream );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Points to a string to be written to output.  Points to the
       FILE structure of an open file.

DESCRIPTION    [Toc]    [Back]

       The puts()  function  writes  the  null-terminated  string
       pointed  to by the string parameter, followed by a newline
       character, to the standard output stream, stdout.

       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.

       Neither function writes the terminating null byte.

       The  st_ctime  and  st_mtime fields of the file are marked
       for update between the successful execution of the  puts()
       or  fputs() function and the next successful completion of
       a call to one of the following: An  fflush()  or  fclose()
       function on the same stream The exit() or abort() function

NOTES    [Toc]    [Back]

       Full use.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the puts() and  fputs()  functions
  return  the number of characters written. Both subroutines
 return EOF on an error.

ERRORS    [Toc]    [Back]

       The puts() and fputs() functions fail under either of  the
       following  conditions:  The  stream  is  unbuffered.   The
       stream's buffer needed to be flushed,  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
       puts() or fputs() function sets errno to the corresponding
       value.  The O_NONBLOCK option is set for the file descriptor
  underlying stream and the process would be delayed in
       the  write  operation.   The  file  descriptor  underlying
       stream  is  not  a valid file descriptor open for writing.
       An attempt was made to write to a file  that  exceeds  the
       process's  file  size limit or the maximum file size.  The
       read operation  was  interrupted  by  a  signal  that  was
       caught,  and  no data was transferred.  The implementation
       supports job  control;  the  process  is  a  member  of  a
       background  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.   There  was no
       free space remaining on the device  containing  the  file.
       An attempt was made to write to a pipe or FIFO that is not
       open for reading by any process.  A  SIGPIPE  signal  will
       also be sent to the process.

SEE ALSO    [Toc]    [Back]

      
      
       Functions:   fgetws(3),   fputws(3),  gets(3),  printf(3),
       putc(3), putwc(3).



                                                          puts(3)
[ Back ]
 Similar pages
Name OS Title
XmCvtByteStreamToXmString HP-UX A compound string function that converts from a compound string in Byte Stream format to a compound string
XmCvtXmStringToByteStream HP-UX A compound string function that converts a compound string to a Byte Stream format
fgets Tru64 Get a string from a stream
fgetws Tru64 Get a string from a stream
putws IRIX put a wchar_t string on a stream
getws IRIX get a wchar_t string from a stream
gets IRIX get a string from a stream
gets Tru64 Get a string from a stream
puts IRIX put a string on a stream
fputws Tru64 Write a wide-character string to a stream
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service