home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / clib / fputs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-09  |  831 b   |  57 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: fputs.c,v 1.2 1996/12/11 11:22:35 aros Exp $
  4.  
  5.     Desc: ANSI C function fputs()
  6.     Lang: english
  7. */
  8.  
  9. /*****************************************************************************
  10.  
  11.     NAME */
  12. #include <stdio.h>
  13.  
  14.     int fputs (
  15.  
  16. /*  SYNOPSIS */
  17.     const char * str,
  18.     FILE       * fh)
  19.  
  20. /*  FUNCTION
  21.     Write a string to the specified stream.
  22.  
  23.     INPUTS
  24.     str - Output this string...
  25.     fh - ...to this stream
  26.  
  27.     RESULT
  28.     > 0 on success and EOF on error.
  29.  
  30.     NOTES
  31.  
  32.     EXAMPLE
  33.  
  34.     BUGS
  35.  
  36.     SEE ALSO
  37.     puts(), fputc(), putc()
  38.  
  39.     INTERNALS
  40.  
  41.     HISTORY
  42.     10.12.1996 digulla created
  43.  
  44. ******************************************************************************/
  45. {
  46.     while (*str)
  47.     {
  48.     if (putc (*str, fh) == EOF)
  49.         return EOF;
  50.  
  51.     str ++;
  52.     }
  53.  
  54.     return 1;
  55. } /* fputs */
  56.  
  57.